vl: rename pipe_video_decoder to pipe_video_codec
Signed-off-by: Christian König <christian.koenig@amd.com>
This commit is contained in:
parent
8e423ab984
commit
f2f7064e56
|
@ -29,7 +29,7 @@
|
||||||
#define vl_compositor_h
|
#define vl_compositor_h
|
||||||
|
|
||||||
#include "pipe/p_state.h"
|
#include "pipe/p_state.h"
|
||||||
#include "pipe/p_video_decoder.h"
|
#include "pipe/p_video_codec.h"
|
||||||
#include "pipe/p_video_state.h"
|
#include "pipe/p_video_state.h"
|
||||||
|
|
||||||
#include "util/u_rect.h"
|
#include "util/u_rect.h"
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
*
|
*
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
#include "pipe/p_video_decoder.h"
|
#include "pipe/p_video_codec.h"
|
||||||
|
|
||||||
#include "util/u_video.h"
|
#include "util/u_video.h"
|
||||||
|
|
||||||
|
@ -59,12 +59,12 @@ vl_level_supported(struct pipe_screen *screen, enum pipe_video_profile profile)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct pipe_video_decoder *
|
struct pipe_video_codec *
|
||||||
vl_create_decoder(struct pipe_context *pipe,
|
vl_create_decoder(struct pipe_context *pipe,
|
||||||
const struct pipe_video_decoder *templat)
|
const struct pipe_video_codec *templat)
|
||||||
{
|
{
|
||||||
unsigned width = templat->width, height = templat->height;
|
unsigned width = templat->width, height = templat->height;
|
||||||
struct pipe_video_decoder temp;
|
struct pipe_video_codec temp;
|
||||||
bool pot_buffers;
|
bool pot_buffers;
|
||||||
|
|
||||||
assert(pipe);
|
assert(pipe);
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
#ifndef vl_decoder_h
|
#ifndef vl_decoder_h
|
||||||
#define vl_decoder_h
|
#define vl_decoder_h
|
||||||
|
|
||||||
#include "pipe/p_video_decoder.h"
|
#include "pipe/p_video_codec.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* check if a given profile is supported with shader based decoding
|
* check if a given profile is supported with shader based decoding
|
||||||
|
@ -44,10 +44,10 @@ int
|
||||||
vl_level_supported(struct pipe_screen *screen, enum pipe_video_profile profile);
|
vl_level_supported(struct pipe_screen *screen, enum pipe_video_profile profile);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* standard implementation of pipe->create_video_decoder
|
* standard implementation of pipe->create_video_codec
|
||||||
*/
|
*/
|
||||||
struct pipe_video_decoder *
|
struct pipe_video_codec *
|
||||||
vl_create_decoder(struct pipe_context *pipe,
|
vl_create_decoder(struct pipe_context *pipe,
|
||||||
const struct pipe_video_decoder *templat);
|
const struct pipe_video_codec *templat);
|
||||||
|
|
||||||
#endif /* vl_decoder_h */
|
#endif /* vl_decoder_h */
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
*
|
*
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
#include "pipe/p_video_decoder.h"
|
#include "pipe/p_video_codec.h"
|
||||||
#include "util/u_memory.h"
|
#include "util/u_memory.h"
|
||||||
|
|
||||||
#include "vl_vlc.h"
|
#include "vl_vlc.h"
|
||||||
|
@ -965,7 +965,7 @@ decode_slice(struct vl_mpg12_bs *bs, struct pipe_video_buffer *target)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
vl_mpg12_bs_init(struct vl_mpg12_bs *bs, struct pipe_video_decoder *decoder)
|
vl_mpg12_bs_init(struct vl_mpg12_bs *bs, struct pipe_video_codec *decoder)
|
||||||
{
|
{
|
||||||
static bool tables_initialized = false;
|
static bool tables_initialized = false;
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
|
|
||||||
struct vl_mpg12_bs
|
struct vl_mpg12_bs
|
||||||
{
|
{
|
||||||
struct pipe_video_decoder *decoder;
|
struct pipe_video_codec *decoder;
|
||||||
|
|
||||||
struct pipe_mpeg12_picture_desc *desc;
|
struct pipe_mpeg12_picture_desc *desc;
|
||||||
struct dct_coeff *intra_dct_tbl;
|
struct dct_coeff *intra_dct_tbl;
|
||||||
|
@ -43,7 +43,7 @@ struct vl_mpg12_bs
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
vl_mpg12_bs_init(struct vl_mpg12_bs *bs, struct pipe_video_decoder *decoder);
|
vl_mpg12_bs_init(struct vl_mpg12_bs *bs, struct pipe_video_codec *decoder);
|
||||||
|
|
||||||
void
|
void
|
||||||
vl_mpg12_bs_decode(struct vl_mpg12_bs *bs,
|
vl_mpg12_bs_decode(struct vl_mpg12_bs *bs,
|
||||||
|
|
|
@ -399,7 +399,7 @@ vl_mpeg12_destroy_buffer(void *buffer)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
vl_mpeg12_destroy(struct pipe_video_decoder *decoder)
|
vl_mpeg12_destroy(struct pipe_video_codec *decoder)
|
||||||
{
|
{
|
||||||
struct vl_mpeg12_decoder *dec = (struct vl_mpeg12_decoder*)decoder;
|
struct vl_mpeg12_decoder *dec = (struct vl_mpeg12_decoder*)decoder;
|
||||||
unsigned i;
|
unsigned i;
|
||||||
|
@ -503,7 +503,7 @@ error_vertex_buffer:
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
vl_mpeg12_begin_frame(struct pipe_video_decoder *decoder,
|
vl_mpeg12_begin_frame(struct pipe_video_codec *decoder,
|
||||||
struct pipe_video_buffer *target,
|
struct pipe_video_buffer *target,
|
||||||
struct pipe_picture_desc *picture)
|
struct pipe_picture_desc *picture)
|
||||||
{
|
{
|
||||||
|
@ -568,7 +568,7 @@ vl_mpeg12_begin_frame(struct pipe_video_decoder *decoder,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
vl_mpeg12_decode_macroblock(struct pipe_video_decoder *decoder,
|
vl_mpeg12_decode_macroblock(struct pipe_video_codec *decoder,
|
||||||
struct pipe_video_buffer *target,
|
struct pipe_video_buffer *target,
|
||||||
struct pipe_picture_desc *picture,
|
struct pipe_picture_desc *picture,
|
||||||
const struct pipe_macroblock *macroblocks,
|
const struct pipe_macroblock *macroblocks,
|
||||||
|
@ -638,7 +638,7 @@ vl_mpeg12_decode_macroblock(struct pipe_video_decoder *decoder,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
vl_mpeg12_decode_bitstream(struct pipe_video_decoder *decoder,
|
vl_mpeg12_decode_bitstream(struct pipe_video_codec *decoder,
|
||||||
struct pipe_video_buffer *target,
|
struct pipe_video_buffer *target,
|
||||||
struct pipe_picture_desc *picture,
|
struct pipe_picture_desc *picture,
|
||||||
unsigned num_buffers,
|
unsigned num_buffers,
|
||||||
|
@ -664,7 +664,7 @@ vl_mpeg12_decode_bitstream(struct pipe_video_decoder *decoder,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
vl_mpeg12_end_frame(struct pipe_video_decoder *decoder,
|
vl_mpeg12_end_frame(struct pipe_video_codec *decoder,
|
||||||
struct pipe_video_buffer *target,
|
struct pipe_video_buffer *target,
|
||||||
struct pipe_picture_desc *picture)
|
struct pipe_picture_desc *picture)
|
||||||
{
|
{
|
||||||
|
@ -757,7 +757,7 @@ vl_mpeg12_end_frame(struct pipe_video_decoder *decoder,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
vl_mpeg12_flush(struct pipe_video_decoder *decoder)
|
vl_mpeg12_flush(struct pipe_video_codec *decoder)
|
||||||
{
|
{
|
||||||
assert(decoder);
|
assert(decoder);
|
||||||
|
|
||||||
|
@ -1016,9 +1016,9 @@ mc_frag_shader_callback(void *priv, struct vl_mc *mc,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct pipe_video_decoder *
|
struct pipe_video_codec *
|
||||||
vl_create_mpeg12_decoder(struct pipe_context *context,
|
vl_create_mpeg12_decoder(struct pipe_context *context,
|
||||||
const struct pipe_video_decoder *templat)
|
const struct pipe_video_codec *templat)
|
||||||
{
|
{
|
||||||
const unsigned block_size_pixels = VL_BLOCK_WIDTH * VL_BLOCK_HEIGHT;
|
const unsigned block_size_pixels = VL_BLOCK_WIDTH * VL_BLOCK_HEIGHT;
|
||||||
const struct format_config *format_config;
|
const struct format_config *format_config;
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
#ifndef vl_mpeg12_decoder_h
|
#ifndef vl_mpeg12_decoder_h
|
||||||
#define vl_mpeg12_decoder_h
|
#define vl_mpeg12_decoder_h
|
||||||
|
|
||||||
#include "pipe/p_video_decoder.h"
|
#include "pipe/p_video_codec.h"
|
||||||
|
|
||||||
#include "vl_mpeg12_bitstream.h"
|
#include "vl_mpeg12_bitstream.h"
|
||||||
#include "vl_zscan.h"
|
#include "vl_zscan.h"
|
||||||
|
@ -43,7 +43,7 @@ struct pipe_context;
|
||||||
|
|
||||||
struct vl_mpeg12_decoder
|
struct vl_mpeg12_decoder
|
||||||
{
|
{
|
||||||
struct pipe_video_decoder base;
|
struct pipe_video_codec base;
|
||||||
|
|
||||||
unsigned chroma_width, chroma_height;
|
unsigned chroma_width, chroma_height;
|
||||||
|
|
||||||
|
@ -102,8 +102,8 @@ struct vl_mpeg12_buffer
|
||||||
/**
|
/**
|
||||||
* creates a shader based mpeg12 decoder
|
* creates a shader based mpeg12 decoder
|
||||||
*/
|
*/
|
||||||
struct pipe_video_decoder *
|
struct pipe_video_codec *
|
||||||
vl_create_mpeg12_decoder(struct pipe_context *pipe,
|
vl_create_mpeg12_decoder(struct pipe_context *pipe,
|
||||||
const struct pipe_video_decoder *templat);
|
const struct pipe_video_codec *templat);
|
||||||
|
|
||||||
#endif /* vl_mpeg12_decoder_h */
|
#endif /* vl_mpeg12_decoder_h */
|
||||||
|
|
|
@ -186,11 +186,11 @@ vl_video_buffer_max_size(struct pipe_screen *screen)
|
||||||
|
|
||||||
void
|
void
|
||||||
vl_video_buffer_set_associated_data(struct pipe_video_buffer *vbuf,
|
vl_video_buffer_set_associated_data(struct pipe_video_buffer *vbuf,
|
||||||
struct pipe_video_decoder *vdec,
|
struct pipe_video_codec *vcodec,
|
||||||
void *associated_data,
|
void *associated_data,
|
||||||
void (*destroy_associated_data)(void *))
|
void (*destroy_associated_data)(void *))
|
||||||
{
|
{
|
||||||
vbuf->decoder = vdec;
|
vbuf->codec = vcodec;
|
||||||
|
|
||||||
if (vbuf->associated_data == associated_data)
|
if (vbuf->associated_data == associated_data)
|
||||||
return;
|
return;
|
||||||
|
@ -204,9 +204,9 @@ vl_video_buffer_set_associated_data(struct pipe_video_buffer *vbuf,
|
||||||
|
|
||||||
void *
|
void *
|
||||||
vl_video_buffer_get_associated_data(struct pipe_video_buffer *vbuf,
|
vl_video_buffer_get_associated_data(struct pipe_video_buffer *vbuf,
|
||||||
struct pipe_video_decoder *vdec)
|
struct pipe_video_codec *vcodec)
|
||||||
{
|
{
|
||||||
if (vbuf->decoder == vdec)
|
if (vbuf->codec == vcodec)
|
||||||
return vbuf->associated_data;
|
return vbuf->associated_data;
|
||||||
else
|
else
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
#define vl_video_buffer_h
|
#define vl_video_buffer_h
|
||||||
|
|
||||||
#include "pipe/p_context.h"
|
#include "pipe/p_context.h"
|
||||||
#include "pipe/p_video_decoder.h"
|
#include "pipe/p_video_codec.h"
|
||||||
|
|
||||||
#include "vl_defines.h"
|
#include "vl_defines.h"
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ vl_video_buffer_is_format_supported(struct pipe_screen *screen,
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
vl_video_buffer_set_associated_data(struct pipe_video_buffer *vbuf,
|
vl_video_buffer_set_associated_data(struct pipe_video_buffer *vbuf,
|
||||||
struct pipe_video_decoder *vdec,
|
struct pipe_video_codec *vcodec,
|
||||||
void *associated_data,
|
void *associated_data,
|
||||||
void (*destroy_associated_data)(void *));
|
void (*destroy_associated_data)(void *));
|
||||||
|
|
||||||
|
@ -89,7 +89,7 @@ vl_video_buffer_set_associated_data(struct pipe_video_buffer *vbuf,
|
||||||
*/
|
*/
|
||||||
void *
|
void *
|
||||||
vl_video_buffer_get_associated_data(struct pipe_video_buffer *vbuf,
|
vl_video_buffer_get_associated_data(struct pipe_video_buffer *vbuf,
|
||||||
struct pipe_video_decoder *vdec);
|
struct pipe_video_codec *vcodec);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* fill a resource template for the given plane
|
* fill a resource template for the given plane
|
||||||
|
|
|
@ -35,9 +35,9 @@
|
||||||
* Nothing here. We could make use of the video codec engine someday.
|
* Nothing here. We could make use of the video codec engine someday.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static struct pipe_video_decoder *
|
static struct pipe_video_codec *
|
||||||
ilo_create_video_decoder(struct pipe_context *pipe,
|
ilo_create_video_decoder(struct pipe_context *pipe,
|
||||||
const struct pipe_video_decoder *templ)
|
const struct pipe_video_codec *templ)
|
||||||
{
|
{
|
||||||
return vl_create_decoder(pipe, templ);
|
return vl_create_decoder(pipe, templ);
|
||||||
}
|
}
|
||||||
|
@ -55,6 +55,6 @@ ilo_create_video_buffer(struct pipe_context *pipe,
|
||||||
void
|
void
|
||||||
ilo_init_video_functions(struct ilo_context *ilo)
|
ilo_init_video_functions(struct ilo_context *ilo)
|
||||||
{
|
{
|
||||||
ilo->base.create_video_decoder = ilo_create_video_decoder;
|
ilo->base.create_video_codec = ilo_create_video_decoder;
|
||||||
ilo->base.create_video_buffer = ilo_create_video_buffer;
|
ilo->base.create_video_buffer = ilo_create_video_buffer;
|
||||||
}
|
}
|
||||||
|
|
|
@ -403,14 +403,14 @@ nouveau_decoder_surface_index(struct nouveau_decoder *dec,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nouveau_decoder_begin_frame(struct pipe_video_decoder *decoder,
|
nouveau_decoder_begin_frame(struct pipe_video_codec *decoder,
|
||||||
struct pipe_video_buffer *target,
|
struct pipe_video_buffer *target,
|
||||||
struct pipe_picture_desc *picture)
|
struct pipe_picture_desc *picture)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nouveau_decoder_decode_macroblock(struct pipe_video_decoder *decoder,
|
nouveau_decoder_decode_macroblock(struct pipe_video_codec *decoder,
|
||||||
struct pipe_video_buffer *target,
|
struct pipe_video_buffer *target,
|
||||||
struct pipe_picture_desc *picture,
|
struct pipe_picture_desc *picture,
|
||||||
const struct pipe_macroblock *pipe_mb,
|
const struct pipe_macroblock *pipe_mb,
|
||||||
|
@ -457,14 +457,14 @@ nouveau_decoder_decode_macroblock(struct pipe_video_decoder *decoder,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nouveau_decoder_end_frame(struct pipe_video_decoder *decoder,
|
nouveau_decoder_end_frame(struct pipe_video_codec *decoder,
|
||||||
struct pipe_video_buffer *target,
|
struct pipe_video_buffer *target,
|
||||||
struct pipe_picture_desc *picture)
|
struct pipe_picture_desc *picture)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nouveau_decoder_flush(struct pipe_video_decoder *decoder)
|
nouveau_decoder_flush(struct pipe_video_codec *decoder)
|
||||||
{
|
{
|
||||||
struct nouveau_decoder *dec = (struct nouveau_decoder *)decoder;
|
struct nouveau_decoder *dec = (struct nouveau_decoder *)decoder;
|
||||||
if (dec->ofs)
|
if (dec->ofs)
|
||||||
|
@ -472,7 +472,7 @@ nouveau_decoder_flush(struct pipe_video_decoder *decoder)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nouveau_decoder_destroy(struct pipe_video_decoder *decoder)
|
nouveau_decoder_destroy(struct pipe_video_codec *decoder)
|
||||||
{
|
{
|
||||||
struct nouveau_decoder *dec = (struct nouveau_decoder*)decoder;
|
struct nouveau_decoder *dec = (struct nouveau_decoder*)decoder;
|
||||||
|
|
||||||
|
@ -497,9 +497,9 @@ nouveau_decoder_destroy(struct pipe_video_decoder *decoder)
|
||||||
FREE(dec);
|
FREE(dec);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct pipe_video_decoder *
|
static struct pipe_video_codec *
|
||||||
nouveau_create_decoder(struct pipe_context *context,
|
nouveau_create_decoder(struct pipe_context *context,
|
||||||
const struct pipe_video_decoder *templ,
|
const struct pipe_video_codec *templ,
|
||||||
struct nouveau_screen *screen)
|
struct nouveau_screen *screen)
|
||||||
{
|
{
|
||||||
struct nv04_fifo nv04_data = { .vram = 0xbeef0201, .gart = 0xbeef0202 };
|
struct nv04_fifo nv04_data = { .vram = 0xbeef0201, .gart = 0xbeef0202 };
|
||||||
|
@ -867,9 +867,9 @@ nouveau_screen_init_vdec(struct nouveau_screen *screen)
|
||||||
screen->base.is_video_format_supported = vl_video_buffer_is_format_supported;
|
screen->base.is_video_format_supported = vl_video_buffer_is_format_supported;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct pipe_video_decoder *
|
static struct pipe_video_codec *
|
||||||
nouveau_context_create_decoder(struct pipe_context *context,
|
nouveau_context_create_decoder(struct pipe_context *context,
|
||||||
const struct pipe_video_decoder *templ)
|
const struct pipe_video_codec *templ)
|
||||||
{
|
{
|
||||||
struct nouveau_screen *screen = nouveau_context(context)->screen;
|
struct nouveau_screen *screen = nouveau_context(context)->screen;
|
||||||
return nouveau_create_decoder(context, templ, screen);
|
return nouveau_create_decoder(context, templ, screen);
|
||||||
|
@ -886,6 +886,6 @@ nouveau_context_video_buffer_create(struct pipe_context *pipe,
|
||||||
void
|
void
|
||||||
nouveau_context_init_vdec(struct nouveau_context *nv)
|
nouveau_context_init_vdec(struct nouveau_context *nv)
|
||||||
{
|
{
|
||||||
nv->pipe.create_video_decoder = nouveau_context_create_decoder;
|
nv->pipe.create_video_codec = nouveau_context_create_decoder;
|
||||||
nv->pipe.create_video_buffer = nouveau_context_video_buffer_create;
|
nv->pipe.create_video_buffer = nouveau_context_video_buffer_create;
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@ struct nouveau_video_buffer {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct nouveau_decoder {
|
struct nouveau_decoder {
|
||||||
struct pipe_video_decoder base;
|
struct pipe_video_codec base;
|
||||||
struct nouveau_screen *screen;
|
struct nouveau_screen *screen;
|
||||||
struct nouveau_pushbuf *push;
|
struct nouveau_pushbuf *push;
|
||||||
struct nouveau_object *chan;
|
struct nouveau_object *chan;
|
||||||
|
|
|
@ -169,26 +169,26 @@ error:
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nouveau_vp3_decoder_flush(struct pipe_video_decoder *decoder)
|
nouveau_vp3_decoder_flush(struct pipe_video_codec *decoder)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nouveau_vp3_decoder_begin_frame(struct pipe_video_decoder *decoder,
|
nouveau_vp3_decoder_begin_frame(struct pipe_video_codec *decoder,
|
||||||
struct pipe_video_buffer *target,
|
struct pipe_video_buffer *target,
|
||||||
struct pipe_picture_desc *picture)
|
struct pipe_picture_desc *picture)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nouveau_vp3_decoder_end_frame(struct pipe_video_decoder *decoder,
|
nouveau_vp3_decoder_end_frame(struct pipe_video_codec *decoder,
|
||||||
struct pipe_video_buffer *target,
|
struct pipe_video_buffer *target,
|
||||||
struct pipe_picture_desc *picture)
|
struct pipe_picture_desc *picture)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nouveau_vp3_decoder_destroy(struct pipe_video_decoder *decoder)
|
nouveau_vp3_decoder_destroy(struct pipe_video_codec *decoder)
|
||||||
{
|
{
|
||||||
struct nouveau_vp3_decoder *dec = (struct nouveau_vp3_decoder *)decoder;
|
struct nouveau_vp3_decoder *dec = (struct nouveau_vp3_decoder *)decoder;
|
||||||
int i;
|
int i;
|
||||||
|
@ -223,7 +223,7 @@ nouveau_vp3_decoder_destroy(struct pipe_video_decoder *decoder)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
nouveau_vp3_decoder_init_common(struct pipe_video_decoder *dec)
|
nouveau_vp3_decoder_init_common(struct pipe_video_codec *dec)
|
||||||
{
|
{
|
||||||
dec->destroy = nouveau_vp3_decoder_destroy;
|
dec->destroy = nouveau_vp3_decoder_destroy;
|
||||||
dec->flush = nouveau_vp3_decoder_flush;
|
dec->flush = nouveau_vp3_decoder_flush;
|
||||||
|
|
|
@ -60,7 +60,7 @@ union pipe_desc {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct nouveau_vp3_decoder {
|
struct nouveau_vp3_decoder {
|
||||||
struct pipe_video_decoder base;
|
struct pipe_video_codec base;
|
||||||
struct nouveau_client *client;
|
struct nouveau_client *client;
|
||||||
struct nouveau_object *channel[3], *bsp, *vp, *ppp;
|
struct nouveau_object *channel[3], *bsp, *vp, *ppp;
|
||||||
struct nouveau_pushbuf *pushbuf[3];
|
struct nouveau_pushbuf *pushbuf[3];
|
||||||
|
@ -198,7 +198,7 @@ nouveau_vp3_video_buffer_create(struct pipe_context *pipe,
|
||||||
int flags);
|
int flags);
|
||||||
|
|
||||||
void
|
void
|
||||||
nouveau_vp3_decoder_init_common(struct pipe_video_decoder *decoder);
|
nouveau_vp3_decoder_init_common(struct pipe_video_codec *decoder);
|
||||||
|
|
||||||
int
|
int
|
||||||
nouveau_vp3_load_firmware(struct nouveau_vp3_decoder *dec,
|
nouveau_vp3_load_firmware(struct nouveau_vp3_decoder *dec,
|
||||||
|
|
|
@ -265,11 +265,11 @@ nv50_create(struct pipe_screen *pscreen, void *priv)
|
||||||
} else if (screen->base.device->chipset < 0x98 ||
|
} else if (screen->base.device->chipset < 0x98 ||
|
||||||
screen->base.device->chipset == 0xa0) {
|
screen->base.device->chipset == 0xa0) {
|
||||||
/* VP2 */
|
/* VP2 */
|
||||||
pipe->create_video_decoder = nv84_create_decoder;
|
pipe->create_video_codec = nv84_create_decoder;
|
||||||
pipe->create_video_buffer = nv84_video_buffer_create;
|
pipe->create_video_buffer = nv84_video_buffer_create;
|
||||||
} else {
|
} else {
|
||||||
/* VP3/4 */
|
/* VP3/4 */
|
||||||
pipe->create_video_decoder = nv98_create_decoder;
|
pipe->create_video_codec = nv98_create_decoder;
|
||||||
pipe->create_video_buffer = nv98_video_buffer_create;
|
pipe->create_video_buffer = nv98_video_buffer_create;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -290,9 +290,9 @@ void nv50_vertex_arrays_validate(struct nv50_context *nv50);
|
||||||
void nv50_push_vbo(struct nv50_context *, const struct pipe_draw_info *);
|
void nv50_push_vbo(struct nv50_context *, const struct pipe_draw_info *);
|
||||||
|
|
||||||
/* nv84_video.c */
|
/* nv84_video.c */
|
||||||
struct pipe_video_decoder *
|
struct pipe_video_codec *
|
||||||
nv84_create_decoder(struct pipe_context *context,
|
nv84_create_decoder(struct pipe_context *context,
|
||||||
const struct pipe_video_decoder *templ);
|
const struct pipe_video_codec *templ);
|
||||||
|
|
||||||
struct pipe_video_buffer *
|
struct pipe_video_buffer *
|
||||||
nv84_video_buffer_create(struct pipe_context *pipe,
|
nv84_video_buffer_create(struct pipe_context *pipe,
|
||||||
|
@ -309,9 +309,9 @@ nv84_screen_video_supported(struct pipe_screen *screen,
|
||||||
enum pipe_video_profile profile);
|
enum pipe_video_profile profile);
|
||||||
|
|
||||||
/* nv98_video.c */
|
/* nv98_video.c */
|
||||||
struct pipe_video_decoder *
|
struct pipe_video_codec *
|
||||||
nv98_create_decoder(struct pipe_context *context,
|
nv98_create_decoder(struct pipe_context *context,
|
||||||
const struct pipe_video_decoder *templ);
|
const struct pipe_video_codec *templ);
|
||||||
|
|
||||||
struct pipe_video_buffer *
|
struct pipe_video_buffer *
|
||||||
nv98_video_buffer_create(struct pipe_context *pipe,
|
nv98_video_buffer_create(struct pipe_context *pipe,
|
||||||
|
|
|
@ -121,7 +121,7 @@ nv84_load_vp_firmware_mpeg(struct nouveau_device *dev, struct nv84_decoder *dec)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nv84_decoder_decode_bitstream_h264(struct pipe_video_decoder *decoder,
|
nv84_decoder_decode_bitstream_h264(struct pipe_video_codec *decoder,
|
||||||
struct pipe_video_buffer *video_target,
|
struct pipe_video_buffer *video_target,
|
||||||
struct pipe_picture_desc *picture,
|
struct pipe_picture_desc *picture,
|
||||||
unsigned num_buffers,
|
unsigned num_buffers,
|
||||||
|
@ -140,26 +140,26 @@ nv84_decoder_decode_bitstream_h264(struct pipe_video_decoder *decoder,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nv84_decoder_flush(struct pipe_video_decoder *decoder)
|
nv84_decoder_flush(struct pipe_video_codec *decoder)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nv84_decoder_begin_frame_h264(struct pipe_video_decoder *decoder,
|
nv84_decoder_begin_frame_h264(struct pipe_video_codec *decoder,
|
||||||
struct pipe_video_buffer *target,
|
struct pipe_video_buffer *target,
|
||||||
struct pipe_picture_desc *picture)
|
struct pipe_picture_desc *picture)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nv84_decoder_end_frame_h264(struct pipe_video_decoder *decoder,
|
nv84_decoder_end_frame_h264(struct pipe_video_codec *decoder,
|
||||||
struct pipe_video_buffer *target,
|
struct pipe_video_buffer *target,
|
||||||
struct pipe_picture_desc *picture)
|
struct pipe_picture_desc *picture)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nv84_decoder_decode_bitstream_mpeg12(struct pipe_video_decoder *decoder,
|
nv84_decoder_decode_bitstream_mpeg12(struct pipe_video_codec *decoder,
|
||||||
struct pipe_video_buffer *video_target,
|
struct pipe_video_buffer *video_target,
|
||||||
struct pipe_picture_desc *picture,
|
struct pipe_picture_desc *picture,
|
||||||
unsigned num_buffers,
|
unsigned num_buffers,
|
||||||
|
@ -179,7 +179,7 @@ nv84_decoder_decode_bitstream_mpeg12(struct pipe_video_decoder *decoder,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nv84_decoder_begin_frame_mpeg12(struct pipe_video_decoder *decoder,
|
nv84_decoder_begin_frame_mpeg12(struct pipe_video_codec *decoder,
|
||||||
struct pipe_video_buffer *target,
|
struct pipe_video_buffer *target,
|
||||||
struct pipe_picture_desc *picture)
|
struct pipe_picture_desc *picture)
|
||||||
{
|
{
|
||||||
|
@ -202,7 +202,7 @@ nv84_decoder_begin_frame_mpeg12(struct pipe_video_decoder *decoder,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nv84_decoder_end_frame_mpeg12(struct pipe_video_decoder *decoder,
|
nv84_decoder_end_frame_mpeg12(struct pipe_video_codec *decoder,
|
||||||
struct pipe_video_buffer *target,
|
struct pipe_video_buffer *target,
|
||||||
struct pipe_picture_desc *picture)
|
struct pipe_picture_desc *picture)
|
||||||
{
|
{
|
||||||
|
@ -213,7 +213,7 @@ nv84_decoder_end_frame_mpeg12(struct pipe_video_decoder *decoder,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nv84_decoder_decode_macroblock(struct pipe_video_decoder *decoder,
|
nv84_decoder_decode_macroblock(struct pipe_video_codec *decoder,
|
||||||
struct pipe_video_buffer *target,
|
struct pipe_video_buffer *target,
|
||||||
struct pipe_picture_desc *picture,
|
struct pipe_picture_desc *picture,
|
||||||
const struct pipe_macroblock *macroblocks,
|
const struct pipe_macroblock *macroblocks,
|
||||||
|
@ -229,7 +229,7 @@ nv84_decoder_decode_macroblock(struct pipe_video_decoder *decoder,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nv84_decoder_destroy(struct pipe_video_decoder *decoder)
|
nv84_decoder_destroy(struct pipe_video_codec *decoder)
|
||||||
{
|
{
|
||||||
struct nv84_decoder *dec = (struct nv84_decoder *)decoder;
|
struct nv84_decoder *dec = (struct nv84_decoder *)decoder;
|
||||||
|
|
||||||
|
@ -261,9 +261,9 @@ nv84_decoder_destroy(struct pipe_video_decoder *decoder)
|
||||||
FREE(dec);
|
FREE(dec);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct pipe_video_decoder *
|
struct pipe_video_codec *
|
||||||
nv84_create_decoder(struct pipe_context *context,
|
nv84_create_decoder(struct pipe_context *context,
|
||||||
const struct pipe_video_decoder *templ)
|
const struct pipe_video_codec *templ)
|
||||||
{
|
{
|
||||||
struct nv50_context *nv50 = (struct nv50_context *)context;
|
struct nv50_context *nv50 = (struct nv50_context *)context;
|
||||||
struct nouveau_screen *screen = &nv50->screen->base;
|
struct nouveau_screen *screen = &nv50->screen->base;
|
||||||
|
|
|
@ -58,7 +58,7 @@ struct nv84_video_buffer {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct nv84_decoder {
|
struct nv84_decoder {
|
||||||
struct pipe_video_decoder base;
|
struct pipe_video_codec base;
|
||||||
struct nouveau_client *client;
|
struct nouveau_client *client;
|
||||||
struct nouveau_object *bsp_channel, *vp_channel, *bsp, *vp;
|
struct nouveau_object *bsp_channel, *vp_channel, *bsp, *vp;
|
||||||
struct nouveau_pushbuf *bsp_pushbuf, *vp_pushbuf;
|
struct nouveau_pushbuf *bsp_pushbuf, *vp_pushbuf;
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#include "util/u_format.h"
|
#include "util/u_format.h"
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nv98_decoder_decode_bitstream(struct pipe_video_decoder *decoder,
|
nv98_decoder_decode_bitstream(struct pipe_video_codec *decoder,
|
||||||
struct pipe_video_buffer *video_target,
|
struct pipe_video_buffer *video_target,
|
||||||
struct pipe_picture_desc *picture,
|
struct pipe_picture_desc *picture,
|
||||||
unsigned num_buffers,
|
unsigned num_buffers,
|
||||||
|
@ -56,9 +56,9 @@ nv98_decoder_decode_bitstream(struct pipe_video_decoder *decoder,
|
||||||
nv98_decoder_ppp(dec, desc, target, comm_seq);
|
nv98_decoder_ppp(dec, desc, target, comm_seq);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct pipe_video_decoder *
|
struct pipe_video_codec *
|
||||||
nv98_create_decoder(struct pipe_context *context,
|
nv98_create_decoder(struct pipe_context *context,
|
||||||
const struct pipe_video_decoder *templ)
|
const struct pipe_video_codec *templ)
|
||||||
{
|
{
|
||||||
struct nouveau_screen *screen = &((struct nv50_context *)context)->screen->base;
|
struct nouveau_screen *screen = &((struct nv50_context *)context)->screen->base;
|
||||||
struct nouveau_vp3_decoder *dec;
|
struct nouveau_vp3_decoder *dec;
|
||||||
|
|
|
@ -286,7 +286,7 @@ nvc0_create(struct pipe_screen *pscreen, void *priv)
|
||||||
draw_set_rasterize_stage(nvc0->draw, nvc0_draw_render_stage(nvc0));
|
draw_set_rasterize_stage(nvc0->draw, nvc0_draw_render_stage(nvc0));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
pipe->create_video_decoder = nvc0_create_decoder;
|
pipe->create_video_codec = nvc0_create_decoder;
|
||||||
pipe->create_video_buffer = nvc0_video_buffer_create;
|
pipe->create_video_buffer = nvc0_video_buffer_create;
|
||||||
|
|
||||||
/* shader builtin library is per-screen, but we need a context for m2mf */
|
/* shader builtin library is per-screen, but we need a context for m2mf */
|
||||||
|
|
|
@ -333,9 +333,9 @@ void nvc0_vertex_arrays_validate(struct nvc0_context *);
|
||||||
void nvc0_idxbuf_validate(struct nvc0_context *);
|
void nvc0_idxbuf_validate(struct nvc0_context *);
|
||||||
|
|
||||||
/* nvc0_video.c */
|
/* nvc0_video.c */
|
||||||
struct pipe_video_decoder *
|
struct pipe_video_codec *
|
||||||
nvc0_create_decoder(struct pipe_context *context,
|
nvc0_create_decoder(struct pipe_context *context,
|
||||||
const struct pipe_video_decoder *templ);
|
const struct pipe_video_codec *templ);
|
||||||
|
|
||||||
struct pipe_video_buffer *
|
struct pipe_video_buffer *
|
||||||
nvc0_video_buffer_create(struct pipe_context *pipe,
|
nvc0_video_buffer_create(struct pipe_context *pipe,
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#include "util/u_format.h"
|
#include "util/u_format.h"
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nvc0_decoder_decode_bitstream(struct pipe_video_decoder *decoder,
|
nvc0_decoder_decode_bitstream(struct pipe_video_codec *decoder,
|
||||||
struct pipe_video_buffer *video_target,
|
struct pipe_video_buffer *video_target,
|
||||||
struct pipe_picture_desc *picture,
|
struct pipe_picture_desc *picture,
|
||||||
unsigned num_buffers,
|
unsigned num_buffers,
|
||||||
|
@ -56,9 +56,9 @@ nvc0_decoder_decode_bitstream(struct pipe_video_decoder *decoder,
|
||||||
nvc0_decoder_ppp(dec, desc, target, comm_seq);
|
nvc0_decoder_ppp(dec, desc, target, comm_seq);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct pipe_video_decoder *
|
struct pipe_video_codec *
|
||||||
nvc0_create_decoder(struct pipe_context *context,
|
nvc0_create_decoder(struct pipe_context *context,
|
||||||
const struct pipe_video_decoder *templ)
|
const struct pipe_video_codec *templ)
|
||||||
{
|
{
|
||||||
struct nouveau_screen *screen = &((struct nvc0_context *)context)->screen->base;
|
struct nouveau_screen *screen = &((struct nvc0_context *)context)->screen->base;
|
||||||
struct nouveau_vp3_decoder *dec;
|
struct nouveau_vp3_decoder *dec;
|
||||||
|
|
|
@ -409,7 +409,7 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen,
|
||||||
r300_init_render_functions(r300);
|
r300_init_render_functions(r300);
|
||||||
r300_init_states(&r300->context);
|
r300_init_states(&r300->context);
|
||||||
|
|
||||||
r300->context.create_video_decoder = vl_create_decoder;
|
r300->context.create_video_codec = vl_create_decoder;
|
||||||
r300->context.create_video_buffer = vl_video_buffer_create;
|
r300->context.create_video_buffer = vl_video_buffer_create;
|
||||||
|
|
||||||
r300->uploader = u_upload_create(&r300->context, 256 * 1024, 4,
|
r300->uploader = u_upload_create(&r300->context, 256 * 1024, 4,
|
||||||
|
|
|
@ -400,10 +400,10 @@ static struct pipe_context *r600_create_context(struct pipe_screen *screen, void
|
||||||
r600_init_surface_functions(rctx);
|
r600_init_surface_functions(rctx);
|
||||||
|
|
||||||
if (rscreen->info.has_uvd) {
|
if (rscreen->info.has_uvd) {
|
||||||
rctx->context.create_video_decoder = r600_uvd_create_decoder;
|
rctx->context.create_video_codec = r600_uvd_create_decoder;
|
||||||
rctx->context.create_video_buffer = r600_video_buffer_create;
|
rctx->context.create_video_buffer = r600_video_buffer_create;
|
||||||
} else {
|
} else {
|
||||||
rctx->context.create_video_decoder = vl_create_decoder;
|
rctx->context.create_video_codec = vl_create_decoder;
|
||||||
rctx->context.create_video_buffer = vl_video_buffer_create;
|
rctx->context.create_video_buffer = vl_video_buffer_create;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -890,8 +890,8 @@ unsigned r600_tex_compare(unsigned compare);
|
||||||
bool sampler_state_needs_border_color(const struct pipe_sampler_state *state);
|
bool sampler_state_needs_border_color(const struct pipe_sampler_state *state);
|
||||||
|
|
||||||
/* r600_uvd.c */
|
/* r600_uvd.c */
|
||||||
struct pipe_video_decoder *r600_uvd_create_decoder(struct pipe_context *context,
|
struct pipe_video_codec *r600_uvd_create_decoder(struct pipe_context *context,
|
||||||
const struct pipe_video_decoder *decoder);
|
const struct pipe_video_codec *decoder);
|
||||||
|
|
||||||
struct pipe_video_buffer *r600_video_buffer_create(struct pipe_context *pipe,
|
struct pipe_video_buffer *r600_video_buffer_create(struct pipe_context *pipe,
|
||||||
const struct pipe_video_buffer *tmpl);
|
const struct pipe_video_buffer *tmpl);
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "pipe/p_video_decoder.h"
|
#include "pipe/p_video_codec.h"
|
||||||
|
|
||||||
#include "util/u_memory.h"
|
#include "util/u_memory.h"
|
||||||
#include "util/u_video.h"
|
#include "util/u_video.h"
|
||||||
|
@ -164,8 +164,8 @@ static struct radeon_winsys_cs_handle* r600_uvd_set_dtb(struct ruvd_msg *msg, st
|
||||||
}
|
}
|
||||||
|
|
||||||
/* create decoder */
|
/* create decoder */
|
||||||
struct pipe_video_decoder *r600_uvd_create_decoder(struct pipe_context *context,
|
struct pipe_video_codec *r600_uvd_create_decoder(struct pipe_context *context,
|
||||||
const struct pipe_video_decoder *templat)
|
const struct pipe_video_codec *templat)
|
||||||
{
|
{
|
||||||
struct r600_context *ctx = (struct r600_context *)context;
|
struct r600_context *ctx = (struct r600_context *)context;
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "pipe/p_video_decoder.h"
|
#include "pipe/p_video_codec.h"
|
||||||
|
|
||||||
#include "util/u_memory.h"
|
#include "util/u_memory.h"
|
||||||
#include "util/u_video.h"
|
#include "util/u_video.h"
|
||||||
|
@ -65,7 +65,7 @@ struct ruvd_buffer
|
||||||
|
|
||||||
/* UVD decoder representation */
|
/* UVD decoder representation */
|
||||||
struct ruvd_decoder {
|
struct ruvd_decoder {
|
||||||
struct pipe_video_decoder base;
|
struct pipe_video_codec base;
|
||||||
|
|
||||||
ruvd_set_dtb set_dtb;
|
ruvd_set_dtb set_dtb;
|
||||||
|
|
||||||
|
@ -262,7 +262,7 @@ static uint32_t profile2stream_type(enum pipe_video_profile profile)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* calculate size of reference picture buffer */
|
/* calculate size of reference picture buffer */
|
||||||
static unsigned calc_dpb_size(const struct pipe_video_decoder *templ)
|
static unsigned calc_dpb_size(const struct pipe_video_codec *templ)
|
||||||
{
|
{
|
||||||
unsigned width_in_mb, height_in_mb, image_size, dpb_size;
|
unsigned width_in_mb, height_in_mb, image_size, dpb_size;
|
||||||
|
|
||||||
|
@ -613,7 +613,7 @@ static struct ruvd_mpeg4 get_mpeg4_msg(struct ruvd_decoder *dec,
|
||||||
/**
|
/**
|
||||||
* destroy this video decoder
|
* destroy this video decoder
|
||||||
*/
|
*/
|
||||||
static void ruvd_destroy(struct pipe_video_decoder *decoder)
|
static void ruvd_destroy(struct pipe_video_codec *decoder)
|
||||||
{
|
{
|
||||||
struct ruvd_decoder *dec = (struct ruvd_decoder*)decoder;
|
struct ruvd_decoder *dec = (struct ruvd_decoder*)decoder;
|
||||||
struct ruvd_msg msg;
|
struct ruvd_msg msg;
|
||||||
|
@ -650,7 +650,7 @@ static void ruvd_destroy_associated_data(void *data)
|
||||||
/**
|
/**
|
||||||
* start decoding of a new frame
|
* start decoding of a new frame
|
||||||
*/
|
*/
|
||||||
static void ruvd_begin_frame(struct pipe_video_decoder *decoder,
|
static void ruvd_begin_frame(struct pipe_video_codec *decoder,
|
||||||
struct pipe_video_buffer *target,
|
struct pipe_video_buffer *target,
|
||||||
struct pipe_picture_desc *picture)
|
struct pipe_picture_desc *picture)
|
||||||
{
|
{
|
||||||
|
@ -672,7 +672,7 @@ static void ruvd_begin_frame(struct pipe_video_decoder *decoder,
|
||||||
/**
|
/**
|
||||||
* decode a macroblock
|
* decode a macroblock
|
||||||
*/
|
*/
|
||||||
static void ruvd_decode_macroblock(struct pipe_video_decoder *decoder,
|
static void ruvd_decode_macroblock(struct pipe_video_codec *decoder,
|
||||||
struct pipe_video_buffer *target,
|
struct pipe_video_buffer *target,
|
||||||
struct pipe_picture_desc *picture,
|
struct pipe_picture_desc *picture,
|
||||||
const struct pipe_macroblock *macroblocks,
|
const struct pipe_macroblock *macroblocks,
|
||||||
|
@ -685,7 +685,7 @@ static void ruvd_decode_macroblock(struct pipe_video_decoder *decoder,
|
||||||
/**
|
/**
|
||||||
* decode a bitstream
|
* decode a bitstream
|
||||||
*/
|
*/
|
||||||
static void ruvd_decode_bitstream(struct pipe_video_decoder *decoder,
|
static void ruvd_decode_bitstream(struct pipe_video_codec *decoder,
|
||||||
struct pipe_video_buffer *target,
|
struct pipe_video_buffer *target,
|
||||||
struct pipe_picture_desc *picture,
|
struct pipe_picture_desc *picture,
|
||||||
unsigned num_buffers,
|
unsigned num_buffers,
|
||||||
|
@ -728,7 +728,7 @@ static void ruvd_decode_bitstream(struct pipe_video_decoder *decoder,
|
||||||
/**
|
/**
|
||||||
* end decoding of the current frame
|
* end decoding of the current frame
|
||||||
*/
|
*/
|
||||||
static void ruvd_end_frame(struct pipe_video_decoder *decoder,
|
static void ruvd_end_frame(struct pipe_video_codec *decoder,
|
||||||
struct pipe_video_buffer *target,
|
struct pipe_video_buffer *target,
|
||||||
struct pipe_picture_desc *picture)
|
struct pipe_picture_desc *picture)
|
||||||
{
|
{
|
||||||
|
@ -809,17 +809,17 @@ static void ruvd_end_frame(struct pipe_video_decoder *decoder,
|
||||||
/**
|
/**
|
||||||
* flush any outstanding command buffers to the hardware
|
* flush any outstanding command buffers to the hardware
|
||||||
*/
|
*/
|
||||||
static void ruvd_flush(struct pipe_video_decoder *decoder)
|
static void ruvd_flush(struct pipe_video_codec *decoder)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* create and UVD decoder
|
* create and UVD decoder
|
||||||
*/
|
*/
|
||||||
struct pipe_video_decoder *ruvd_create_decoder(struct pipe_context *context,
|
struct pipe_video_codec *ruvd_create_decoder(struct pipe_context *context,
|
||||||
const struct pipe_video_decoder *templ,
|
const struct pipe_video_codec *templ,
|
||||||
struct radeon_winsys* ws,
|
struct radeon_winsys* ws,
|
||||||
ruvd_set_dtb set_dtb)
|
ruvd_set_dtb set_dtb)
|
||||||
{
|
{
|
||||||
unsigned dpb_size = calc_dpb_size(templ);
|
unsigned dpb_size = calc_dpb_size(templ);
|
||||||
unsigned width = templ->width, height = templ->height;
|
unsigned width = templ->width, height = templ->height;
|
||||||
|
|
|
@ -345,10 +345,10 @@ typedef struct radeon_winsys_cs_handle* (*ruvd_set_dtb)
|
||||||
(struct ruvd_msg* msg, struct vl_video_buffer *vb);
|
(struct ruvd_msg* msg, struct vl_video_buffer *vb);
|
||||||
|
|
||||||
/* create an UVD decode */
|
/* create an UVD decode */
|
||||||
struct pipe_video_decoder *ruvd_create_decoder(struct pipe_context *context,
|
struct pipe_video_codec *ruvd_create_decoder(struct pipe_context *context,
|
||||||
const struct pipe_video_decoder *templat,
|
const struct pipe_video_codec *templat,
|
||||||
struct radeon_winsys* ws,
|
struct radeon_winsys* ws,
|
||||||
ruvd_set_dtb set_dtb);
|
ruvd_set_dtb set_dtb);
|
||||||
|
|
||||||
/* join surfaces into the same buffer with identical tiling params
|
/* join surfaces into the same buffer with identical tiling params
|
||||||
sumup their sizes and replace the backend buffers with a single bo */
|
sumup their sizes and replace the backend buffers with a single bo */
|
||||||
|
|
|
@ -230,10 +230,10 @@ static struct pipe_context *r600_create_context(struct pipe_screen *screen, void
|
||||||
si_init_compute_functions(rctx);
|
si_init_compute_functions(rctx);
|
||||||
|
|
||||||
if (rscreen->info.has_uvd) {
|
if (rscreen->info.has_uvd) {
|
||||||
rctx->context.create_video_decoder = radeonsi_uvd_create_decoder;
|
rctx->context.create_video_codec = radeonsi_uvd_create_decoder;
|
||||||
rctx->context.create_video_buffer = radeonsi_video_buffer_create;
|
rctx->context.create_video_buffer = radeonsi_video_buffer_create;
|
||||||
} else {
|
} else {
|
||||||
rctx->context.create_video_decoder = vl_create_decoder;
|
rctx->context.create_video_codec = vl_create_decoder;
|
||||||
rctx->context.create_video_buffer = vl_video_buffer_create;
|
rctx->context.create_video_buffer = vl_video_buffer_create;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -277,8 +277,8 @@ void r600_trace_emit(struct r600_context *rctx);
|
||||||
void si_init_compute_functions(struct r600_context *rctx);
|
void si_init_compute_functions(struct r600_context *rctx);
|
||||||
|
|
||||||
/* radeonsi_uvd.c */
|
/* radeonsi_uvd.c */
|
||||||
struct pipe_video_decoder *radeonsi_uvd_create_decoder(struct pipe_context *context,
|
struct pipe_video_codec *radeonsi_uvd_create_decoder(struct pipe_context *context,
|
||||||
const struct pipe_video_decoder *templ);
|
const struct pipe_video_codec *templ);
|
||||||
|
|
||||||
struct pipe_video_buffer *radeonsi_video_buffer_create(struct pipe_context *pipe,
|
struct pipe_video_buffer *radeonsi_video_buffer_create(struct pipe_context *pipe,
|
||||||
const struct pipe_video_buffer *tmpl);
|
const struct pipe_video_buffer *tmpl);
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "pipe/p_video_decoder.h"
|
#include "pipe/p_video_codec.h"
|
||||||
|
|
||||||
#include "util/u_memory.h"
|
#include "util/u_memory.h"
|
||||||
#include "util/u_video.h"
|
#include "util/u_video.h"
|
||||||
|
@ -146,8 +146,8 @@ static struct radeon_winsys_cs_handle* radeonsi_uvd_set_dtb(struct ruvd_msg *msg
|
||||||
/**
|
/**
|
||||||
* creates an UVD compatible decoder
|
* creates an UVD compatible decoder
|
||||||
*/
|
*/
|
||||||
struct pipe_video_decoder *radeonsi_uvd_create_decoder(struct pipe_context *context,
|
struct pipe_video_codec *radeonsi_uvd_create_decoder(struct pipe_context *context,
|
||||||
const struct pipe_video_decoder *templ)
|
const struct pipe_video_codec *templ)
|
||||||
{
|
{
|
||||||
struct r600_context *ctx = (struct r600_context *)context;
|
struct r600_context *ctx = (struct r600_context *)context;
|
||||||
|
|
||||||
|
|
|
@ -228,7 +228,7 @@ softpipe_create_context( struct pipe_screen *screen,
|
||||||
|
|
||||||
softpipe->pipe.render_condition = softpipe_render_condition;
|
softpipe->pipe.render_condition = softpipe_render_condition;
|
||||||
|
|
||||||
softpipe->pipe.create_video_decoder = vl_create_decoder;
|
softpipe->pipe.create_video_codec = vl_create_decoder;
|
||||||
softpipe->pipe.create_video_buffer = vl_video_buffer_create;
|
softpipe->pipe.create_video_buffer = vl_video_buffer_create;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -65,7 +65,7 @@ struct pipe_transfer;
|
||||||
struct pipe_vertex_buffer;
|
struct pipe_vertex_buffer;
|
||||||
struct pipe_vertex_element;
|
struct pipe_vertex_element;
|
||||||
struct pipe_video_buffer;
|
struct pipe_video_buffer;
|
||||||
struct pipe_video_decoder;
|
struct pipe_video_codec;
|
||||||
struct pipe_viewport_state;
|
struct pipe_viewport_state;
|
||||||
struct pipe_compute_state;
|
struct pipe_compute_state;
|
||||||
union pipe_color_union;
|
union pipe_color_union;
|
||||||
|
@ -430,10 +430,10 @@ struct pipe_context {
|
||||||
void (*texture_barrier)(struct pipe_context *);
|
void (*texture_barrier)(struct pipe_context *);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a video decoder for a specific video codec/profile
|
* Creates a video codec for a specific video format/profile
|
||||||
*/
|
*/
|
||||||
struct pipe_video_decoder *(*create_video_decoder)( struct pipe_context *context,
|
struct pipe_video_codec *(*create_video_codec)( struct pipe_context *context,
|
||||||
const struct pipe_video_decoder *templat );
|
const struct pipe_video_codec *templat );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a video buffer as decoding target
|
* Creates a video buffer as decoding target
|
||||||
|
|
|
@ -41,9 +41,9 @@ struct pipe_picture_desc;
|
||||||
struct pipe_fence_handle;
|
struct pipe_fence_handle;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gallium video decoder for a specific codec/profile
|
* Gallium video codec for a specific format/profile
|
||||||
*/
|
*/
|
||||||
struct pipe_video_decoder
|
struct pipe_video_codec
|
||||||
{
|
{
|
||||||
struct pipe_context *context;
|
struct pipe_context *context;
|
||||||
|
|
||||||
|
@ -58,19 +58,19 @@ struct pipe_video_decoder
|
||||||
/**
|
/**
|
||||||
* destroy this video decoder
|
* destroy this video decoder
|
||||||
*/
|
*/
|
||||||
void (*destroy)(struct pipe_video_decoder *decoder);
|
void (*destroy)(struct pipe_video_codec *codec);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* start decoding of a new frame
|
* start decoding of a new frame
|
||||||
*/
|
*/
|
||||||
void (*begin_frame)(struct pipe_video_decoder *decoder,
|
void (*begin_frame)(struct pipe_video_codec *codec,
|
||||||
struct pipe_video_buffer *target,
|
struct pipe_video_buffer *target,
|
||||||
struct pipe_picture_desc *picture);
|
struct pipe_picture_desc *picture);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* decode a macroblock
|
* decode a macroblock
|
||||||
*/
|
*/
|
||||||
void (*decode_macroblock)(struct pipe_video_decoder *decoder,
|
void (*decode_macroblock)(struct pipe_video_codec *codec,
|
||||||
struct pipe_video_buffer *target,
|
struct pipe_video_buffer *target,
|
||||||
struct pipe_picture_desc *picture,
|
struct pipe_picture_desc *picture,
|
||||||
const struct pipe_macroblock *macroblocks,
|
const struct pipe_macroblock *macroblocks,
|
||||||
|
@ -79,7 +79,7 @@ struct pipe_video_decoder
|
||||||
/**
|
/**
|
||||||
* decode a bitstream
|
* decode a bitstream
|
||||||
*/
|
*/
|
||||||
void (*decode_bitstream)(struct pipe_video_decoder *decoder,
|
void (*decode_bitstream)(struct pipe_video_codec *codec,
|
||||||
struct pipe_video_buffer *target,
|
struct pipe_video_buffer *target,
|
||||||
struct pipe_picture_desc *picture,
|
struct pipe_picture_desc *picture,
|
||||||
unsigned num_buffers,
|
unsigned num_buffers,
|
||||||
|
@ -89,7 +89,7 @@ struct pipe_video_decoder
|
||||||
/**
|
/**
|
||||||
* end decoding of the current frame
|
* end decoding of the current frame
|
||||||
*/
|
*/
|
||||||
void (*end_frame)(struct pipe_video_decoder *decoder,
|
void (*end_frame)(struct pipe_video_codec *codec,
|
||||||
struct pipe_video_buffer *target,
|
struct pipe_video_buffer *target,
|
||||||
struct pipe_picture_desc *picture);
|
struct pipe_picture_desc *picture);
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ struct pipe_video_decoder
|
||||||
* flush any outstanding command buffers to the hardware
|
* flush any outstanding command buffers to the hardware
|
||||||
* should be called before a video_buffer is acessed by the state tracker again
|
* should be called before a video_buffer is acessed by the state tracker again
|
||||||
*/
|
*/
|
||||||
void (*flush)(struct pipe_video_decoder *decoder);
|
void (*flush)(struct pipe_video_codec *codec);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -139,9 +139,9 @@ struct pipe_video_buffer
|
||||||
void *associated_data;
|
void *associated_data;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* decoder where the associated data came from
|
* codec where the associated data came from
|
||||||
*/
|
*/
|
||||||
struct pipe_video_decoder *decoder;
|
struct pipe_video_codec *codec;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* destroy the associated data
|
* destroy the associated data
|
|
@ -44,7 +44,7 @@ vlVdpDecoderCreate(VdpDevice device,
|
||||||
uint32_t max_references,
|
uint32_t max_references,
|
||||||
VdpDecoder *decoder)
|
VdpDecoder *decoder)
|
||||||
{
|
{
|
||||||
struct pipe_video_decoder templat = {};
|
struct pipe_video_codec templat = {};
|
||||||
struct pipe_context *pipe;
|
struct pipe_context *pipe;
|
||||||
struct pipe_screen *screen;
|
struct pipe_screen *screen;
|
||||||
vlVdpDevice *dev;
|
vlVdpDevice *dev;
|
||||||
|
@ -97,7 +97,7 @@ vlVdpDecoderCreate(VdpDevice device,
|
||||||
templat.height = height;
|
templat.height = height;
|
||||||
templat.max_references = max_references;
|
templat.max_references = max_references;
|
||||||
|
|
||||||
vldecoder->decoder = pipe->create_video_decoder(pipe, &templat);
|
vldecoder->decoder = pipe->create_video_codec(pipe, &templat);
|
||||||
|
|
||||||
if (!vldecoder->decoder) {
|
if (!vldecoder->decoder) {
|
||||||
ret = VDP_STATUS_ERROR;
|
ret = VDP_STATUS_ERROR;
|
||||||
|
@ -426,7 +426,7 @@ vlVdpDecoderRender(VdpDecoder decoder,
|
||||||
vlVdpSurface *vlsurf;
|
vlVdpSurface *vlsurf;
|
||||||
VdpStatus ret;
|
VdpStatus ret;
|
||||||
struct pipe_screen *screen;
|
struct pipe_screen *screen;
|
||||||
struct pipe_video_decoder *dec;
|
struct pipe_video_codec *dec;
|
||||||
bool buffer_support[2];
|
bool buffer_support[2];
|
||||||
unsigned i;
|
unsigned i;
|
||||||
union {
|
union {
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
#include <vdpau/vdpau_x11.h>
|
#include <vdpau/vdpau_x11.h>
|
||||||
|
|
||||||
#include "pipe/p_compiler.h"
|
#include "pipe/p_compiler.h"
|
||||||
#include "pipe/p_video_decoder.h"
|
#include "pipe/p_video_codec.h"
|
||||||
|
|
||||||
#include "util/u_debug.h"
|
#include "util/u_debug.h"
|
||||||
#include "util/u_rect.h"
|
#include "util/u_rect.h"
|
||||||
|
@ -387,7 +387,7 @@ typedef struct
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
vlVdpDevice *device;
|
vlVdpDevice *device;
|
||||||
struct pipe_video_decoder *decoder;
|
struct pipe_video_codec *decoder;
|
||||||
} vlVdpDecoder;
|
} vlVdpDecoder;
|
||||||
|
|
||||||
typedef uint32_t vlHandle;
|
typedef uint32_t vlHandle;
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
#include <X11/extensions/XvMClib.h>
|
#include <X11/extensions/XvMClib.h>
|
||||||
|
|
||||||
#include "pipe/p_screen.h"
|
#include "pipe/p_screen.h"
|
||||||
#include "pipe/p_video_decoder.h"
|
#include "pipe/p_video_codec.h"
|
||||||
#include "pipe/p_video_state.h"
|
#include "pipe/p_video_state.h"
|
||||||
#include "pipe/p_state.h"
|
#include "pipe/p_state.h"
|
||||||
|
|
||||||
|
@ -191,7 +191,7 @@ Status XvMCCreateContext(Display *dpy, XvPortID port, int surface_type_id,
|
||||||
Status ret;
|
Status ret;
|
||||||
struct vl_screen *vscreen;
|
struct vl_screen *vscreen;
|
||||||
struct pipe_context *pipe;
|
struct pipe_context *pipe;
|
||||||
struct pipe_video_decoder templat = {};
|
struct pipe_video_codec templat = {};
|
||||||
XvMCContextPrivate *context_priv;
|
XvMCContextPrivate *context_priv;
|
||||||
vl_csc_matrix csc;
|
vl_csc_matrix csc;
|
||||||
|
|
||||||
|
@ -253,7 +253,7 @@ Status XvMCCreateContext(Display *dpy, XvPortID port, int surface_type_id,
|
||||||
templat.max_references = 2;
|
templat.max_references = 2;
|
||||||
templat.expect_chunked_decode = true;
|
templat.expect_chunked_decode = true;
|
||||||
|
|
||||||
context_priv->decoder = pipe->create_video_decoder(pipe, &templat);
|
context_priv->decoder = pipe->create_video_codec(pipe, &templat);
|
||||||
|
|
||||||
if (!context_priv->decoder) {
|
if (!context_priv->decoder) {
|
||||||
XVMC_MSG(XVMC_ERR, "[XvMC] Could not create VL decoder.\n");
|
XVMC_MSG(XVMC_ERR, "[XvMC] Could not create VL decoder.\n");
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
#include <X11/extensions/XvMClib.h>
|
#include <X11/extensions/XvMClib.h>
|
||||||
|
|
||||||
#include "pipe/p_screen.h"
|
#include "pipe/p_screen.h"
|
||||||
#include "pipe/p_video_decoder.h"
|
#include "pipe/p_video_codec.h"
|
||||||
#include "pipe/p_state.h"
|
#include "pipe/p_state.h"
|
||||||
|
|
||||||
#include "util/u_memory.h"
|
#include "util/u_memory.h"
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
#include <X11/Xlibint.h>
|
#include <X11/Xlibint.h>
|
||||||
|
|
||||||
#include "pipe/p_video_decoder.h"
|
#include "pipe/p_video_codec.h"
|
||||||
#include "pipe/p_video_state.h"
|
#include "pipe/p_video_state.h"
|
||||||
#include "pipe/p_state.h"
|
#include "pipe/p_state.h"
|
||||||
|
|
||||||
|
@ -215,7 +215,7 @@ Status XvMCRenderSurface(Display *dpy, XvMCContext *context, unsigned int pictur
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
struct pipe_mpeg12_macroblock mb[num_macroblocks];
|
struct pipe_mpeg12_macroblock mb[num_macroblocks];
|
||||||
struct pipe_video_decoder *decoder;
|
struct pipe_video_codec *decoder;
|
||||||
struct pipe_mpeg12_picture_desc desc;
|
struct pipe_mpeg12_picture_desc desc;
|
||||||
|
|
||||||
XvMCContextPrivate *context_priv;
|
XvMCContextPrivate *context_priv;
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
#define BLOCK_SIZE_SAMPLES 64
|
#define BLOCK_SIZE_SAMPLES 64
|
||||||
#define BLOCK_SIZE_BYTES (BLOCK_SIZE_SAMPLES * 2)
|
#define BLOCK_SIZE_BYTES (BLOCK_SIZE_SAMPLES * 2)
|
||||||
|
|
||||||
struct pipe_video_decoder;
|
struct pipe_video_codec;
|
||||||
struct pipe_video_buffer;
|
struct pipe_video_buffer;
|
||||||
|
|
||||||
struct pipe_sampler_view;
|
struct pipe_sampler_view;
|
||||||
|
@ -52,7 +52,7 @@ typedef struct
|
||||||
{
|
{
|
||||||
struct vl_screen *vscreen;
|
struct vl_screen *vscreen;
|
||||||
struct pipe_context *pipe;
|
struct pipe_context *pipe;
|
||||||
struct pipe_video_decoder *decoder;
|
struct pipe_video_codec *decoder;
|
||||||
|
|
||||||
enum VL_CSC_COLOR_STANDARD color_standard;
|
enum VL_CSC_COLOR_STANDARD color_standard;
|
||||||
struct vl_procamp procamp;
|
struct vl_procamp procamp;
|
||||||
|
|
Loading…
Reference in New Issue