summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2013-07-15 02:35:37 -0600
committerChristian König <christian.koenig@amd.com>2013-08-19 10:21:15 +0200
commit8e423ab98403135140a093be3c66c88b9a36ad5c (patch)
tree28c6df9df774c8c3fef1eafad73dae002b0e82f2 /src
parent53e20b8b418cc85e13d70f41ce160e17847a5096 (diff)
vl: rename enum pipe_video_codec to pipe_video_format
Signed-off-by: Christian König <christian.koenig@amd.com>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/auxiliary/util/u_video.h12
-rw-r--r--src/gallium/auxiliary/vl/vl_decoder.c4
-rw-r--r--src/gallium/auxiliary/vl/vl_mpeg12_bitstream.c2
-rw-r--r--src/gallium/auxiliary/vl/vl_mpeg12_decoder.c4
-rw-r--r--src/gallium/drivers/nouveau/nouveau_video.c2
-rw-r--r--src/gallium/drivers/nouveau/nouveau_vp3_video.c30
-rw-r--r--src/gallium/drivers/nouveau/nouveau_vp3_video.h2
-rw-r--r--src/gallium/drivers/nouveau/nouveau_vp3_video_bsp.c10
-rw-r--r--src/gallium/drivers/nouveau/nouveau_vp3_video_vp.c12
-rw-r--r--src/gallium/drivers/nv50/nv84_video.c8
-rw-r--r--src/gallium/drivers/nv50/nv98_video.c8
-rw-r--r--src/gallium/drivers/nv50/nv98_video_bsp.c8
-rw-r--r--src/gallium/drivers/nv50/nv98_video_ppp.c12
-rw-r--r--src/gallium/drivers/nv50/nv98_video_vp.c8
-rw-r--r--src/gallium/drivers/nvc0/nvc0_video.c8
-rw-r--r--src/gallium/drivers/nvc0/nvc0_video_bsp.c6
-rw-r--r--src/gallium/drivers/nvc0/nvc0_video_ppp.c12
-rw-r--r--src/gallium/drivers/nvc0/nvc0_video_vp.c8
-rw-r--r--src/gallium/drivers/r600/r600_uvd.c6
-rw-r--r--src/gallium/drivers/radeon/radeon_uvd.c38
-rw-r--r--src/gallium/include/pipe/p_video_enums.h18
-rw-r--r--src/gallium/include/pipe/p_video_state.h4
-rw-r--r--src/gallium/state_trackers/vdpau/decode.c8
-rw-r--r--src/gallium/state_trackers/xvmc/surface.c2
24 files changed, 116 insertions, 116 deletions
diff --git a/src/gallium/auxiliary/util/u_video.h b/src/gallium/auxiliary/util/u_video.h
index e575947d4e3..276e46097ef 100644
--- a/src/gallium/auxiliary/util/u_video.h
+++ b/src/gallium/auxiliary/util/u_video.h
@@ -39,7 +39,7 @@ extern "C" {
#include "pipe/p_compiler.h"
#include "util/u_debug.h"
-static INLINE enum pipe_video_codec
+static INLINE enum pipe_video_format
u_reduce_video_profile(enum pipe_video_profile profile)
{
switch (profile)
@@ -47,24 +47,24 @@ u_reduce_video_profile(enum pipe_video_profile profile)
case PIPE_VIDEO_PROFILE_MPEG1:
case PIPE_VIDEO_PROFILE_MPEG2_SIMPLE:
case PIPE_VIDEO_PROFILE_MPEG2_MAIN:
- return PIPE_VIDEO_CODEC_MPEG12;
+ return PIPE_VIDEO_FORMAT_MPEG12;
case PIPE_VIDEO_PROFILE_MPEG4_SIMPLE:
case PIPE_VIDEO_PROFILE_MPEG4_ADVANCED_SIMPLE:
- return PIPE_VIDEO_CODEC_MPEG4;
+ return PIPE_VIDEO_FORMAT_MPEG4;
case PIPE_VIDEO_PROFILE_VC1_SIMPLE:
case PIPE_VIDEO_PROFILE_VC1_MAIN:
case PIPE_VIDEO_PROFILE_VC1_ADVANCED:
- return PIPE_VIDEO_CODEC_VC1;
+ return PIPE_VIDEO_FORMAT_VC1;
case PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE:
case PIPE_VIDEO_PROFILE_MPEG4_AVC_MAIN:
case PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH:
- return PIPE_VIDEO_CODEC_MPEG4_AVC;
+ return PIPE_VIDEO_FORMAT_MPEG4_AVC;
default:
- return PIPE_VIDEO_CODEC_UNKNOWN;
+ return PIPE_VIDEO_FORMAT_UNKNOWN;
}
}
diff --git a/src/gallium/auxiliary/vl/vl_decoder.c b/src/gallium/auxiliary/vl/vl_decoder.c
index dcbb77c9bfd..60e0ce995e6 100644
--- a/src/gallium/auxiliary/vl/vl_decoder.c
+++ b/src/gallium/auxiliary/vl/vl_decoder.c
@@ -37,7 +37,7 @@ vl_profile_supported(struct pipe_screen *screen, enum pipe_video_profile profile
{
assert(screen);
switch (u_reduce_video_profile(profile)) {
- case PIPE_VIDEO_CODEC_MPEG12:
+ case PIPE_VIDEO_FORMAT_MPEG12:
return true;
default:
return false;
@@ -82,7 +82,7 @@ vl_create_decoder(struct pipe_context *pipe,
temp.height = pot_buffers ? util_next_power_of_two(height) : align(height, VL_MACROBLOCK_HEIGHT);
switch (u_reduce_video_profile(temp.profile)) {
- case PIPE_VIDEO_CODEC_MPEG12:
+ case PIPE_VIDEO_FORMAT_MPEG12:
return vl_create_mpeg12_decoder(pipe, &temp);
default:
diff --git a/src/gallium/auxiliary/vl/vl_mpeg12_bitstream.c b/src/gallium/auxiliary/vl/vl_mpeg12_bitstream.c
index 81199e433b5..d8c53117db4 100644
--- a/src/gallium/auxiliary/vl/vl_mpeg12_bitstream.c
+++ b/src/gallium/auxiliary/vl/vl_mpeg12_bitstream.c
@@ -814,7 +814,7 @@ decode_slice(struct vl_mpg12_bs *bs, struct pipe_video_buffer *target)
signed x = -1;
memset(&mb, 0, sizeof(mb));
- mb.base.codec = PIPE_VIDEO_CODEC_MPEG12;
+ mb.base.codec = PIPE_VIDEO_FORMAT_MPEG12;
mb.y = vl_vlc_get_uimsbf(&bs->vlc, 8) - 1;
mb.blocks = dct_blocks;
diff --git a/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c b/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c
index 48661cf589c..9349b5e171c 100644
--- a/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c
+++ b/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c
@@ -582,7 +582,7 @@ vl_mpeg12_decode_macroblock(struct pipe_video_decoder *decoder,
unsigned i, j, mv_weights[2];
assert(dec && target && picture);
- assert(macroblocks && macroblocks->codec == PIPE_VIDEO_CODEC_MPEG12);
+ assert(macroblocks && macroblocks->codec == PIPE_VIDEO_FORMAT_MPEG12);
buf = vl_mpeg12_get_decode_buffer(dec, target);
assert(buf);
@@ -1024,7 +1024,7 @@ vl_create_mpeg12_decoder(struct pipe_context *context,
const struct format_config *format_config;
struct vl_mpeg12_decoder *dec;
- assert(u_reduce_video_profile(templat->profile) == PIPE_VIDEO_CODEC_MPEG12);
+ assert(u_reduce_video_profile(templat->profile) == PIPE_VIDEO_FORMAT_MPEG12);
dec = CALLOC_STRUCT(vl_mpeg12_decoder);
diff --git a/src/gallium/drivers/nouveau/nouveau_video.c b/src/gallium/drivers/nouveau/nouveau_video.c
index d6ca13f9d90..9cf5e349bd7 100644
--- a/src/gallium/drivers/nouveau/nouveau_video.c
+++ b/src/gallium/drivers/nouveau/nouveau_video.c
@@ -515,7 +515,7 @@ nouveau_create_decoder(struct pipe_context *context,
if (getenv("XVMC_VL"))
goto vl;
- if (u_reduce_video_profile(templ->profile) != PIPE_VIDEO_CODEC_MPEG12)
+ if (u_reduce_video_profile(templ->profile) != PIPE_VIDEO_FORMAT_MPEG12)
goto vl;
if (screen->device->chipset >= 0x98 && screen->device->chipset != 0xa0)
goto vl;
diff --git a/src/gallium/drivers/nouveau/nouveau_vp3_video.c b/src/gallium/drivers/nouveau/nouveau_vp3_video.c
index 36fea5879d0..611b455a46a 100644
--- a/src/gallium/drivers/nouveau/nouveau_vp3_video.c
+++ b/src/gallium/drivers/nouveau/nouveau_vp3_video.c
@@ -234,15 +234,15 @@ nouveau_vp3_decoder_init_common(struct pipe_video_decoder *dec)
static void vp3_getpath(enum pipe_video_profile profile, char *path)
{
switch (u_reduce_video_profile(profile)) {
- case PIPE_VIDEO_CODEC_MPEG12: {
+ case PIPE_VIDEO_FORMAT_MPEG12: {
sprintf(path, "/lib/firmware/nouveau/vuc-vp3-mpeg12-0");
break;
}
- case PIPE_VIDEO_CODEC_VC1: {
+ case PIPE_VIDEO_FORMAT_VC1: {
sprintf(path, "/lib/firmware/nouveau/vuc-vp3-vc1-0");
break;
}
- case PIPE_VIDEO_CODEC_MPEG4_AVC: {
+ case PIPE_VIDEO_FORMAT_MPEG4_AVC: {
sprintf(path, "/lib/firmware/nouveau/vuc-vp3-h264-0");
break;
}
@@ -253,19 +253,19 @@ static void vp3_getpath(enum pipe_video_profile profile, char *path)
static void vp4_getpath(enum pipe_video_profile profile, char *path)
{
switch (u_reduce_video_profile(profile)) {
- case PIPE_VIDEO_CODEC_MPEG12: {
+ case PIPE_VIDEO_FORMAT_MPEG12: {
sprintf(path, "/lib/firmware/nouveau/vuc-mpeg12-0");
break;
}
- case PIPE_VIDEO_CODEC_MPEG4: {
+ case PIPE_VIDEO_FORMAT_MPEG4: {
sprintf(path, "/lib/firmware/nouveau/vuc-mpeg4-0");
break;
}
- case PIPE_VIDEO_CODEC_VC1: {
+ case PIPE_VIDEO_FORMAT_VC1: {
sprintf(path, "/lib/firmware/nouveau/vuc-vc1-0");
break;
}
- case PIPE_VIDEO_CODEC_MPEG4_AVC: {
+ case PIPE_VIDEO_FORMAT_MPEG4_AVC: {
sprintf(path, "/lib/firmware/nouveau/vuc-h264-0");
break;
}
@@ -322,22 +322,22 @@ nouveau_vp3_load_firmware(struct nouveau_vp3_decoder *dec,
r = (intptr_t)end - (intptr_t)dec->fw_bo->map + 4;
switch (u_reduce_video_profile(profile)) {
- case PIPE_VIDEO_CODEC_MPEG12: {
+ case PIPE_VIDEO_FORMAT_MPEG12: {
assert((r & 0xff) == 0xe0);
dec->fw_sizes = (0x2e0<<16) | (r - 0x2e0);
break;
}
- case PIPE_VIDEO_CODEC_MPEG4: {
+ case PIPE_VIDEO_FORMAT_MPEG4: {
assert((r & 0xff) == 0xe0);
dec->fw_sizes = (0x2e0<<16) | (r - 0x2e0);
break;
}
- case PIPE_VIDEO_CODEC_VC1: {
+ case PIPE_VIDEO_FORMAT_VC1: {
assert((r & 0xff) == 0xac);
dec->fw_sizes = (0x3ac<<16) | (r - 0x3ac);
break;
}
- case PIPE_VIDEO_CODEC_MPEG4_AVC: {
+ case PIPE_VIDEO_FORMAT_MPEG4_AVC: {
assert((r & 0xff) == 0x70);
dec->fw_sizes = (0x370<<16) | (r - 0x370);
break;
@@ -358,17 +358,17 @@ nouveau_vp3_screen_get_video_param(struct pipe_screen *pscreen,
int chipset = nouveau_screen(pscreen)->device->chipset;
int vp3 = chipset < 0xa3 || chipset == 0xaa || chipset == 0xac;
int vp5 = chipset >= 0xd0;
- enum pipe_video_codec codec = u_reduce_video_profile(profile);
+ enum pipe_video_format codec = u_reduce_video_profile(profile);
switch (param) {
case PIPE_VIDEO_CAP_SUPPORTED:
/* For now, h264 and mpeg4 don't work on pre-nvc0. */
if (chipset < 0xc0)
- return codec == PIPE_VIDEO_CODEC_MPEG12 ||
- codec == PIPE_VIDEO_CODEC_VC1;
+ return codec == PIPE_VIDEO_FORMAT_MPEG12 ||
+ codec == PIPE_VIDEO_FORMAT_VC1;
/* In the general case, this should work, once the pre-nvc0 problems are
* resolved. */
return profile >= PIPE_VIDEO_PROFILE_MPEG1 && (
- !vp3 || codec != PIPE_VIDEO_CODEC_MPEG4);
+ !vp3 || codec != PIPE_VIDEO_FORMAT_MPEG4);
case PIPE_VIDEO_CAP_NPOT_TEXTURES:
return 1;
case PIPE_VIDEO_CAP_MAX_WIDTH:
diff --git a/src/gallium/drivers/nouveau/nouveau_vp3_video.h b/src/gallium/drivers/nouveau/nouveau_vp3_video.h
index f1a10548518..9af29cddaed 100644
--- a/src/gallium/drivers/nouveau/nouveau_vp3_video.h
+++ b/src/gallium/drivers/nouveau/nouveau_vp3_video.h
@@ -185,7 +185,7 @@ nouveau_vp3_inter_sizes(struct nouveau_vp3_decoder *dec, uint32_t slice_count,
uint32_t *ring_size)
{
*slice_size = (SLICE_SIZE * slice_count)>>8;
- if (u_reduce_video_profile(dec->base.profile) == PIPE_VIDEO_CODEC_MPEG12)
+ if (u_reduce_video_profile(dec->base.profile) == PIPE_VIDEO_FORMAT_MPEG12)
*bucket_size = 0;
else
*bucket_size = mb(dec->base.width) * 3;
diff --git a/src/gallium/drivers/nouveau/nouveau_vp3_video_bsp.c b/src/gallium/drivers/nouveau/nouveau_vp3_video_bsp.c
index 03118540ad3..ba2a91716d2 100644
--- a/src/gallium/drivers/nouveau/nouveau_vp3_video_bsp.c
+++ b/src/gallium/drivers/nouveau/nouveau_vp3_video_bsp.c
@@ -236,7 +236,7 @@ nouveau_vp3_bsp(struct nouveau_vp3_decoder *dec, union pipe_desc desc,
unsigned comm_seq, unsigned num_buffers,
const void *const *data, const unsigned *num_bytes)
{
- enum pipe_video_codec codec = u_reduce_video_profile(dec->base.profile);
+ enum pipe_video_format codec = u_reduce_video_profile(dec->base.profile);
struct nouveau_bo *bsp_bo = dec->bsp_bo[comm_seq % NOUVEAU_VP3_VIDEO_QDEPTH];
char *bsp;
uint32_t endmarker, caps;
@@ -252,20 +252,20 @@ nouveau_vp3_bsp(struct nouveau_vp3_decoder *dec, union pipe_desc desc,
*/
switch (codec){
- case PIPE_VIDEO_CODEC_MPEG12:
+ case PIPE_VIDEO_FORMAT_MPEG12:
endmarker = 0xb7010000;
caps = nouveau_vp3_fill_picparm_mpeg12_bsp(dec, desc.mpeg12, bsp);
break;
- case PIPE_VIDEO_CODEC_MPEG4:
+ case PIPE_VIDEO_FORMAT_MPEG4:
endmarker = 0xb1010000;
caps = nouveau_vp3_fill_picparm_mpeg4_bsp(dec, desc.mpeg4, bsp);
break;
- case PIPE_VIDEO_CODEC_VC1: {
+ case PIPE_VIDEO_FORMAT_VC1: {
endmarker = 0x0a010000;
caps = nouveau_vp3_fill_picparm_vc1_bsp(dec, desc.vc1, bsp);
break;
}
- case PIPE_VIDEO_CODEC_MPEG4_AVC: {
+ case PIPE_VIDEO_FORMAT_MPEG4_AVC: {
endmarker = 0x0b010000;
caps = nouveau_vp3_fill_picparm_h264_bsp(dec, desc.h264, bsp);
break;
diff --git a/src/gallium/drivers/nouveau/nouveau_vp3_video_vp.c b/src/gallium/drivers/nouveau/nouveau_vp3_video_vp.c
index c9b1b996bd0..199c43d6d00 100644
--- a/src/gallium/drivers/nouveau/nouveau_vp3_video_vp.c
+++ b/src/gallium/drivers/nouveau/nouveau_vp3_video_vp.c
@@ -171,7 +171,7 @@ struct h264_picparm_vp { // 700..a00
static void
nouveau_vp3_handle_references(struct nouveau_vp3_decoder *dec, struct nouveau_vp3_video_buffer *refs[16], unsigned seq, struct nouveau_vp3_video_buffer *target)
{
- unsigned h264 = u_reduce_video_profile(dec->base.profile) == PIPE_VIDEO_CODEC_MPEG4_AVC;
+ unsigned h264 = u_reduce_video_profile(dec->base.profile) == PIPE_VIDEO_FORMAT_MPEG4_AVC;
unsigned i, idx, empty_spot = dec->base.max_references + 1;
for (i = 0; i < dec->base.max_references; ++i) {
if (!refs[i])
@@ -457,24 +457,24 @@ void nouveau_vp3_vp_caps(struct nouveau_vp3_decoder *dec, union pipe_desc desc,
struct nouveau_vp3_video_buffer *refs[16])
{
struct nouveau_bo *bsp_bo = dec->bsp_bo[comm_seq % NOUVEAU_VP3_VIDEO_QDEPTH];
- enum pipe_video_codec codec = u_reduce_video_profile(dec->base.profile);
+ enum pipe_video_format codec = u_reduce_video_profile(dec->base.profile);
char *vp = bsp_bo->map + VP_OFFSET;
switch (codec){
- case PIPE_VIDEO_CODEC_MPEG12:
+ case PIPE_VIDEO_FORMAT_MPEG12:
*caps = nouveau_vp3_fill_picparm_mpeg12_vp(dec, desc.mpeg12, refs, is_ref, vp);
nouveau_vp3_handle_references(dec, refs, dec->fence_seq, target);
return;
- case PIPE_VIDEO_CODEC_MPEG4:
+ case PIPE_VIDEO_FORMAT_MPEG4:
*caps = nouveau_vp3_fill_picparm_mpeg4_vp(dec, desc.mpeg4, refs, is_ref, vp);
nouveau_vp3_handle_references(dec, refs, dec->fence_seq, target);
return;
- case PIPE_VIDEO_CODEC_VC1: {
+ case PIPE_VIDEO_FORMAT_VC1: {
*caps = nouveau_vp3_fill_picparm_vc1_vp(dec, desc.vc1, refs, is_ref, vp);
nouveau_vp3_handle_references(dec, refs, dec->fence_seq, target);
return;
}
- case PIPE_VIDEO_CODEC_MPEG4_AVC: {
+ case PIPE_VIDEO_FORMAT_MPEG4_AVC: {
*caps = nouveau_vp3_fill_picparm_h264_vp(dec, desc.h264, refs, is_ref, vp);
nouveau_vp3_handle_references(dec, refs, dec->fence_seq, target);
nouveau_vp3_fill_picparm_h264_vp_refs(dec, desc.h264, refs, target, vp);
diff --git a/src/gallium/drivers/nv50/nv84_video.c b/src/gallium/drivers/nv50/nv84_video.c
index aedb9efc149..7c81d2d4025 100644
--- a/src/gallium/drivers/nv50/nv84_video.c
+++ b/src/gallium/drivers/nv50/nv84_video.c
@@ -274,8 +274,8 @@ nv84_create_decoder(struct pipe_context *context,
union pipe_color_union color;
struct nv04_fifo nv04_data = { .vram = 0xbeef0201, .gart = 0xbeef0202 };
int ret, i;
- int is_h264 = u_reduce_video_profile(templ->profile) == PIPE_VIDEO_CODEC_MPEG4_AVC;
- int is_mpeg12 = u_reduce_video_profile(templ->profile) == PIPE_VIDEO_CODEC_MPEG12;
+ int is_h264 = u_reduce_video_profile(templ->profile) == PIPE_VIDEO_FORMAT_MPEG4_AVC;
+ int is_mpeg12 = u_reduce_video_profile(templ->profile) == PIPE_VIDEO_FORMAT_MPEG12;
if (getenv("XVMC_VL"))
return vl_create_decoder(context, templ);
@@ -748,8 +748,8 @@ nv84_screen_get_video_param(struct pipe_screen *pscreen,
{
switch (param) {
case PIPE_VIDEO_CAP_SUPPORTED:
- return u_reduce_video_profile(profile) == PIPE_VIDEO_CODEC_MPEG4_AVC ||
- u_reduce_video_profile(profile) == PIPE_VIDEO_CODEC_MPEG12;
+ return u_reduce_video_profile(profile) == PIPE_VIDEO_FORMAT_MPEG4_AVC ||
+ u_reduce_video_profile(profile) == PIPE_VIDEO_FORMAT_MPEG12;
case PIPE_VIDEO_CAP_NPOT_TEXTURES:
return 1;
case PIPE_VIDEO_CAP_MAX_WIDTH:
diff --git a/src/gallium/drivers/nv50/nv98_video.c b/src/gallium/drivers/nv50/nv98_video.c
index 60bc79b222c..541cd729352 100644
--- a/src/gallium/drivers/nv50/nv98_video.c
+++ b/src/gallium/drivers/nv50/nv98_video.c
@@ -152,24 +152,24 @@ nv98_create_decoder(struct pipe_context *context,
goto fail;
switch (u_reduce_video_profile(templ->profile)) {
- case PIPE_VIDEO_CODEC_MPEG12: {
+ case PIPE_VIDEO_FORMAT_MPEG12: {
codec = 1;
assert(templ->max_references <= 2);
break;
}
- case PIPE_VIDEO_CODEC_MPEG4: {
+ case PIPE_VIDEO_FORMAT_MPEG4: {
codec = 4;
tmp_size = mb(templ->height)*16 * mb(templ->width)*16;
assert(templ->max_references <= 2);
break;
}
- case PIPE_VIDEO_CODEC_VC1: {
+ case PIPE_VIDEO_FORMAT_VC1: {
ppp_codec = codec = 2;
tmp_size = mb(templ->height)*16 * mb(templ->width)*16;
assert(templ->max_references <= 2);
break;
}
- case PIPE_VIDEO_CODEC_MPEG4_AVC: {
+ case PIPE_VIDEO_FORMAT_MPEG4_AVC: {
codec = 3;
dec->tmp_stride = 16 * mb_half(templ->width) * nouveau_vp3_video_align(templ->height) * 3 / 2;
tmp_size = dec->tmp_stride * (templ->max_references + 1);
diff --git a/src/gallium/drivers/nv50/nv98_video_bsp.c b/src/gallium/drivers/nv50/nv98_video_bsp.c
index 65128da9e6b..9a5639eb5cd 100644
--- a/src/gallium/drivers/nv50/nv98_video_bsp.c
+++ b/src/gallium/drivers/nv50/nv98_video_bsp.c
@@ -40,7 +40,7 @@ nv98_decoder_bsp(struct nouveau_vp3_decoder *dec, union pipe_desc desc,
struct nouveau_vp3_video_buffer *refs[16])
{
struct nouveau_pushbuf *push = dec->pushbuf[0];
- enum pipe_video_codec codec = u_reduce_video_profile(dec->base.profile);
+ enum pipe_video_format codec = u_reduce_video_profile(dec->base.profile);
uint32_t bsp_addr, comm_addr, inter_addr;
uint32_t slice_size, bucket_size, ring_size;
uint32_t caps;
@@ -76,7 +76,7 @@ nv98_decoder_bsp(struct nouveau_vp3_decoder *dec, union pipe_desc desc,
nouveau_vp3_vp_caps(dec, desc, target, comm_seq, vp_caps, is_ref, refs);
- nouveau_pushbuf_space(push, 6 + (codec == PIPE_VIDEO_CODEC_MPEG4_AVC ? 9 : 8) + fence_extra + 2, num_refs, 0);
+ nouveau_pushbuf_space(push, 6 + (codec == PIPE_VIDEO_FORMAT_MPEG4_AVC ? 9 : 8) + fence_extra + 2, num_refs, 0);
nouveau_pushbuf_refn(push, bo_refs, num_refs);
bsp_addr = bsp_bo->offset >> 8;
@@ -96,9 +96,9 @@ nv98_decoder_bsp(struct nouveau_vp3_decoder *dec, union pipe_desc desc,
PUSH_DATA (push, comm_addr); // 70c comm
PUSH_DATA (push, comm_seq); // 710 seq
- if (codec != PIPE_VIDEO_CODEC_MPEG4_AVC) {
+ if (codec != PIPE_VIDEO_FORMAT_MPEG4_AVC) {
u32 bitplane_addr;
- int mpeg12 = (codec == PIPE_VIDEO_CODEC_MPEG12);
+ int mpeg12 = (codec == PIPE_VIDEO_FORMAT_MPEG12);
bitplane_addr = dec->bitplane_bo->offset >> 8;
diff --git a/src/gallium/drivers/nv50/nv98_video_ppp.c b/src/gallium/drivers/nv50/nv98_video_ppp.c
index 03659750659..a26c661cfa4 100644
--- a/src/gallium/drivers/nv50/nv98_video_ppp.c
+++ b/src/gallium/drivers/nv50/nv98_video_ppp.c
@@ -90,7 +90,7 @@ nv98_decoder_vc1_ppp(struct nouveau_vp3_decoder *dec, struct pipe_vc1_picture_de
void
nv98_decoder_ppp(struct nouveau_vp3_decoder *dec, union pipe_desc desc, struct nouveau_vp3_video_buffer *target, unsigned comm_seq) {
- enum pipe_video_codec codec = u_reduce_video_profile(dec->base.profile);
+ enum pipe_video_format codec = u_reduce_video_profile(dec->base.profile);
struct nouveau_pushbuf *push = dec->pushbuf[2];
unsigned ppp_caps = 0x10;
unsigned fence_extra = 0;
@@ -99,17 +99,17 @@ nv98_decoder_ppp(struct nouveau_vp3_decoder *dec, union pipe_desc desc, struct n
fence_extra = 4;
#endif
- nouveau_pushbuf_space(push, 11 + (codec == PIPE_VIDEO_CODEC_VC1 ? 2 : 0) + 3 + fence_extra + 2, 4, 0);
+ nouveau_pushbuf_space(push, 11 + (codec == PIPE_VIDEO_FORMAT_VC1 ? 2 : 0) + 3 + fence_extra + 2, 4, 0);
switch (codec) {
- case PIPE_VIDEO_CODEC_MPEG12: {
+ case PIPE_VIDEO_FORMAT_MPEG12: {
unsigned mpeg2 = dec->base.profile != PIPE_VIDEO_PROFILE_MPEG1;
nv98_decoder_setup_ppp(dec, target, 0x1410 | mpeg2);
break;
}
- case PIPE_VIDEO_CODEC_MPEG4: nv98_decoder_setup_ppp(dec, target, 0x1414); break;
- case PIPE_VIDEO_CODEC_VC1: ppp_caps = nv98_decoder_vc1_ppp(dec, desc.vc1, target); break;
- case PIPE_VIDEO_CODEC_MPEG4_AVC: nv98_decoder_setup_ppp(dec, target, 0x1413); break;
+ case PIPE_VIDEO_FORMAT_MPEG4: nv98_decoder_setup_ppp(dec, target, 0x1414); break;
+ case PIPE_VIDEO_FORMAT_VC1: ppp_caps = nv98_decoder_vc1_ppp(dec, desc.vc1, target); break;
+ case PIPE_VIDEO_FORMAT_MPEG4_AVC: nv98_decoder_setup_ppp(dec, target, 0x1413); break;
default: assert(0);
}
BEGIN_NV04(push, SUBC_PPP(0x734), 2);
diff --git a/src/gallium/drivers/nv50/nv98_video_vp.c b/src/gallium/drivers/nv50/nv98_video_vp.c
index adba58becf3..4fbce69bcf2 100644
--- a/src/gallium/drivers/nv50/nv98_video_vp.c
+++ b/src/gallium/drivers/nv50/nv98_video_vp.c
@@ -73,7 +73,7 @@ nv98_decoder_vp(struct nouveau_vp3_decoder *dec, union pipe_desc desc,
struct nouveau_pushbuf *push = dec->pushbuf[1];
uint32_t bsp_addr, comm_addr, inter_addr, ucode_addr, pic_addr[17], last_addr, null_addr;
uint32_t slice_size, bucket_size, ring_size, i;
- enum pipe_video_codec codec = u_reduce_video_profile(dec->base.profile);
+ enum pipe_video_format codec = u_reduce_video_profile(dec->base.profile);
struct nouveau_bo *bsp_bo = dec->bsp_bo[comm_seq % NOUVEAU_VP3_VIDEO_QDEPTH];
struct nouveau_bo *inter_bo = dec->inter_bo[comm_seq & 1];
u32 fence_extra = 0, codec_extra = 0;
@@ -92,7 +92,7 @@ nv98_decoder_vp(struct nouveau_vp3_decoder *dec, union pipe_desc desc,
fence_extra = 4;
#endif
- if (codec == PIPE_VIDEO_CODEC_MPEG4_AVC) {
+ if (codec == PIPE_VIDEO_FORMAT_MPEG4_AVC) {
nouveau_vp3_inter_sizes(dec, desc.h264->slice_count, &slice_size, &bucket_size, &ring_size);
codec_extra += 2;
} else
@@ -115,7 +115,7 @@ nv98_decoder_vp(struct nouveau_vp3_decoder *dec, union pipe_desc desc,
if (!is_ref)
nv98_decoder_kick_ref(dec, target);
- nouveau_pushbuf_space(push, 8 + 3 * (codec != PIPE_VIDEO_CODEC_MPEG12) +
+ nouveau_pushbuf_space(push, 8 + 3 * (codec != PIPE_VIDEO_FORMAT_MPEG12) +
6 + codec_extra + fence_extra + 2, num_refs, 0);
nouveau_pushbuf_refn(push, bo_refs, num_refs);
@@ -166,7 +166,7 @@ nv98_decoder_vp(struct nouveau_vp3_decoder *dec, union pipe_desc desc,
}
}
- if (codec == PIPE_VIDEO_CODEC_MPEG4_AVC) {
+ if (codec == PIPE_VIDEO_FORMAT_MPEG4_AVC) {
BEGIN_NV04(push, SUBC_VP(0x438), 1);
PUSH_DATA (push, desc.h264->slice_count);
}
diff --git a/src/gallium/drivers/nvc0/nvc0_video.c b/src/gallium/drivers/nvc0/nvc0_video.c
index 1b2dcd18ffc..e913126df4c 100644
--- a/src/gallium/drivers/nvc0/nvc0_video.c
+++ b/src/gallium/drivers/nvc0/nvc0_video.c
@@ -184,24 +184,24 @@ nvc0_create_decoder(struct pipe_context *context,
goto fail;
switch (u_reduce_video_profile(templ->profile)) {
- case PIPE_VIDEO_CODEC_MPEG12: {
+ case PIPE_VIDEO_FORMAT_MPEG12: {
codec = 1;
assert(templ->max_references <= 2);
break;
}
- case PIPE_VIDEO_CODEC_MPEG4: {
+ case PIPE_VIDEO_FORMAT_MPEG4: {
codec = 4;
tmp_size = mb(templ->height)*16 * mb(templ->width)*16;
assert(templ->max_references <= 2);
break;
}
- case PIPE_VIDEO_CODEC_VC1: {
+ case PIPE_VIDEO_FORMAT_VC1: {
ppp_codec = codec = 2;
tmp_size = mb(templ->height)*16 * mb(templ->width)*16;
assert(templ->max_references <= 2);
break;
}
- case PIPE_VIDEO_CODEC_MPEG4_AVC: {
+ case PIPE_VIDEO_FORMAT_MPEG4_AVC: {
codec = 3;
dec->tmp_stride = 16 * mb_half(templ->width) * nouveau_vp3_video_align(templ->height) * 3 / 2;
tmp_size = dec->tmp_stride * (templ->max_references + 1);
diff --git a/src/gallium/drivers/nvc0/nvc0_video_bsp.c b/src/gallium/drivers/nvc0/nvc0_video_bsp.c
index 2ce551995a8..2edfb8a7b71 100644
--- a/src/gallium/drivers/nvc0/nvc0_video_bsp.c
+++ b/src/gallium/drivers/nvc0/nvc0_video_bsp.c
@@ -40,7 +40,7 @@ nvc0_decoder_bsp(struct nouveau_vp3_decoder *dec, union pipe_desc desc,
struct nouveau_vp3_video_buffer *refs[16])
{
struct nouveau_pushbuf *push = dec->pushbuf[0];
- enum pipe_video_codec codec = u_reduce_video_profile(dec->base.profile);
+ enum pipe_video_format codec = u_reduce_video_profile(dec->base.profile);
uint32_t bsp_addr, comm_addr, inter_addr;
uint32_t slice_size, bucket_size, ring_size;
uint32_t caps;
@@ -76,7 +76,7 @@ nvc0_decoder_bsp(struct nouveau_vp3_decoder *dec, union pipe_desc desc,
nouveau_vp3_vp_caps(dec, desc, target, comm_seq, vp_caps, is_ref, refs);
- nouveau_pushbuf_space(push, 6 + (codec == PIPE_VIDEO_CODEC_MPEG4_AVC ? 9 : 7) + fence_extra + 2, num_refs, 0);
+ nouveau_pushbuf_space(push, 6 + (codec == PIPE_VIDEO_FORMAT_MPEG4_AVC ? 9 : 7) + fence_extra + 2, num_refs, 0);
nouveau_pushbuf_refn(push, bo_refs, num_refs);
bsp_addr = bsp_bo->offset >> 8;
@@ -96,7 +96,7 @@ nvc0_decoder_bsp(struct nouveau_vp3_decoder *dec, union pipe_desc desc,
PUSH_DATA (push, comm_addr); // 70c comm
PUSH_DATA (push, comm_seq); // 710 seq
- if (codec != PIPE_VIDEO_CODEC_MPEG4_AVC) {
+ if (codec != PIPE_VIDEO_FORMAT_MPEG4_AVC) {
u32 bitplane_addr;
bitplane_addr = dec->bitplane_bo->offset >> 8;
diff --git a/src/gallium/drivers/nvc0/nvc0_video_ppp.c b/src/gallium/drivers/nvc0/nvc0_video_ppp.c
index 496db80a23e..c1fd1fd16a8 100644
--- a/src/gallium/drivers/nvc0/nvc0_video_ppp.c
+++ b/src/gallium/drivers/nvc0/nvc0_video_ppp.c
@@ -90,7 +90,7 @@ nvc0_decoder_vc1_ppp(struct nouveau_vp3_decoder *dec, struct pipe_vc1_picture_de
void
nvc0_decoder_ppp(struct nouveau_vp3_decoder *dec, union pipe_desc desc, struct nouveau_vp3_video_buffer *target, unsigned comm_seq) {
- enum pipe_video_codec codec = u_reduce_video_profile(dec->base.profile);
+ enum pipe_video_format codec = u_reduce_video_profile(dec->base.profile);
struct nouveau_pushbuf *push = dec->pushbuf[2];
unsigned ppp_caps = 0x10;
unsigned fence_extra = 0;
@@ -99,17 +99,17 @@ nvc0_decoder_ppp(struct nouveau_vp3_decoder *dec, union pipe_desc desc, struct n
fence_extra = 4;
#endif
- nouveau_pushbuf_space(push, 11 + (codec == PIPE_VIDEO_CODEC_VC1 ? 2 : 0) + 3 + fence_extra + 2, 4, 0);
+ nouveau_pushbuf_space(push, 11 + (codec == PIPE_VIDEO_FORMAT_VC1 ? 2 : 0) + 3 + fence_extra + 2, 4, 0);
switch (codec) {
- case PIPE_VIDEO_CODEC_MPEG12: {
+ case PIPE_VIDEO_FORMAT_MPEG12: {
unsigned mpeg2 = dec->base.profile != PIPE_VIDEO_PROFILE_MPEG1;
nvc0_decoder_setup_ppp(dec, target, 0x1410 | mpeg2);
break;
}
- case PIPE_VIDEO_CODEC_MPEG4: nvc0_decoder_setup_ppp(dec, target, 0x1414); break;
- case PIPE_VIDEO_CODEC_VC1: ppp_caps = nvc0_decoder_vc1_ppp(dec, desc.vc1, target); break;
- case PIPE_VIDEO_CODEC_MPEG4_AVC: nvc0_decoder_setup_ppp(dec, target, 0x1413); break;
+ case PIPE_VIDEO_FORMAT_MPEG4: nvc0_decoder_setup_ppp(dec, target, 0x1414); break;
+ case PIPE_VIDEO_FORMAT_VC1: ppp_caps = nvc0_decoder_vc1_ppp(dec, desc.vc1, target); break;
+ case PIPE_VIDEO_FORMAT_MPEG4_AVC: nvc0_decoder_setup_ppp(dec, target, 0x1413); break;
default: assert(0);
}
BEGIN_NVC0(push, SUBC_PPP(0x734), 2);
diff --git a/src/gallium/drivers/nvc0/nvc0_video_vp.c b/src/gallium/drivers/nvc0/nvc0_video_vp.c
index eb4f1a9f415..df9633e28c2 100644
--- a/src/gallium/drivers/nvc0/nvc0_video_vp.c
+++ b/src/gallium/drivers/nvc0/nvc0_video_vp.c
@@ -73,7 +73,7 @@ nvc0_decoder_vp(struct nouveau_vp3_decoder *dec, union pipe_desc desc,
struct nouveau_pushbuf *push = dec->pushbuf[1];
uint32_t bsp_addr, comm_addr, inter_addr, ucode_addr, pic_addr[17], last_addr, null_addr;
uint32_t slice_size, bucket_size, ring_size, i;
- enum pipe_video_codec codec = u_reduce_video_profile(dec->base.profile);
+ enum pipe_video_format codec = u_reduce_video_profile(dec->base.profile);
struct nouveau_bo *bsp_bo = dec->bsp_bo[comm_seq % NOUVEAU_VP3_VIDEO_QDEPTH];
struct nouveau_bo *inter_bo = dec->inter_bo[comm_seq & 1];
u32 fence_extra = 0, codec_extra = 0;
@@ -92,7 +92,7 @@ nvc0_decoder_vp(struct nouveau_vp3_decoder *dec, union pipe_desc desc,
fence_extra = 4;
#endif
- if (codec == PIPE_VIDEO_CODEC_MPEG4_AVC) {
+ if (codec == PIPE_VIDEO_FORMAT_MPEG4_AVC) {
nouveau_vp3_inter_sizes(dec, desc.h264->slice_count, &slice_size, &bucket_size, &ring_size);
codec_extra += 2;
} else
@@ -115,7 +115,7 @@ nvc0_decoder_vp(struct nouveau_vp3_decoder *dec, union pipe_desc desc,
if (!is_ref)
nvc0_decoder_kick_ref(dec, target);
- nouveau_pushbuf_space(push, 8 + 3 * (codec != PIPE_VIDEO_CODEC_MPEG12) +
+ nouveau_pushbuf_space(push, 8 + 3 * (codec != PIPE_VIDEO_FORMAT_MPEG12) +
6 + codec_extra + fence_extra + 2, num_refs, 0);
nouveau_pushbuf_refn(push, bo_refs, num_refs);
@@ -166,7 +166,7 @@ nvc0_decoder_vp(struct nouveau_vp3_decoder *dec, union pipe_desc desc,
}
}
- if (codec == PIPE_VIDEO_CODEC_MPEG4_AVC) {
+ if (codec == PIPE_VIDEO_FORMAT_MPEG4_AVC) {
BEGIN_NVC0(push, SUBC_VP(0x438), 1);
PUSH_DATA (push, desc.h264->slice_count);
}
diff --git a/src/gallium/drivers/r600/r600_uvd.c b/src/gallium/drivers/r600/r600_uvd.c
index 62c8e525e12..288790591ce 100644
--- a/src/gallium/drivers/r600/r600_uvd.c
+++ b/src/gallium/drivers/r600/r600_uvd.c
@@ -180,15 +180,15 @@ int r600_uvd_get_video_param(struct pipe_screen *screen,
/* UVD 2.x limits */
if (rscreen->family < CHIP_PALM) {
- enum pipe_video_codec codec = u_reduce_video_profile(profile);
+ enum pipe_video_format codec = u_reduce_video_profile(profile);
switch (param) {
case PIPE_VIDEO_CAP_SUPPORTED:
/* no support for MPEG4 */
- return codec != PIPE_VIDEO_CODEC_MPEG4;
+ return codec != PIPE_VIDEO_FORMAT_MPEG4;
case PIPE_VIDEO_CAP_PREFERS_INTERLACED:
case PIPE_VIDEO_CAP_SUPPORTS_INTERLACED:
/* and MPEG2 only with shaders */
- return codec != PIPE_VIDEO_CODEC_MPEG12;
+ return codec != PIPE_VIDEO_FORMAT_MPEG12;
default:
break;
}
diff --git a/src/gallium/drivers/radeon/radeon_uvd.c b/src/gallium/drivers/radeon/radeon_uvd.c
index 55aca415045..fd6bc4c20cf 100644
--- a/src/gallium/drivers/radeon/radeon_uvd.c
+++ b/src/gallium/drivers/radeon/radeon_uvd.c
@@ -243,16 +243,16 @@ static void next_buffer(struct ruvd_decoder *dec)
static uint32_t profile2stream_type(enum pipe_video_profile profile)
{
switch (u_reduce_video_profile(profile)) {
- case PIPE_VIDEO_CODEC_MPEG4_AVC:
+ case PIPE_VIDEO_FORMAT_MPEG4_AVC:
return RUVD_CODEC_H264;
- case PIPE_VIDEO_CODEC_VC1:
+ case PIPE_VIDEO_FORMAT_VC1:
return RUVD_CODEC_VC1;
- case PIPE_VIDEO_CODEC_MPEG12:
+ case PIPE_VIDEO_FORMAT_MPEG12:
return RUVD_CODEC_MPEG2;
- case PIPE_VIDEO_CODEC_MPEG4:
+ case PIPE_VIDEO_FORMAT_MPEG4:
return RUVD_CODEC_MPEG4;
default:
@@ -283,7 +283,7 @@ static unsigned calc_dpb_size(const struct pipe_video_decoder *templ)
height_in_mb = align(height / VL_MACROBLOCK_HEIGHT, 2);
switch (u_reduce_video_profile(templ->profile)) {
- case PIPE_VIDEO_CODEC_MPEG4_AVC:
+ case PIPE_VIDEO_FORMAT_MPEG4_AVC:
// the firmware seems to allways assume a minimum of ref frames
max_references = MAX2(NUM_H264_REFS, max_references);
@@ -297,7 +297,7 @@ static unsigned calc_dpb_size(const struct pipe_video_decoder *templ)
dpb_size += width_in_mb * height_in_mb * 32;
break;
- case PIPE_VIDEO_CODEC_VC1:
+ case PIPE_VIDEO_FORMAT_VC1:
// reference picture buffer
dpb_size = image_size * max_references;
@@ -314,12 +314,12 @@ static unsigned calc_dpb_size(const struct pipe_video_decoder *templ)
dpb_size += align(MAX2(width_in_mb, height_in_mb) * 7 * 16, 64);
break;
- case PIPE_VIDEO_CODEC_MPEG12:
+ case PIPE_VIDEO_FORMAT_MPEG12:
// reference picture buffer, must be big enough for all frames
dpb_size = image_size * NUM_MPEG2_REFS;
break;
- case PIPE_VIDEO_CODEC_MPEG4:
+ case PIPE_VIDEO_FORMAT_MPEG4:
// reference picture buffer
dpb_size = image_size * max_references;
@@ -767,19 +767,19 @@ static void ruvd_end_frame(struct pipe_video_decoder *decoder,
dt = dec->set_dtb(&msg, (struct vl_video_buffer *)target);
switch (u_reduce_video_profile(picture->profile)) {
- case PIPE_VIDEO_CODEC_MPEG4_AVC:
+ case PIPE_VIDEO_FORMAT_MPEG4_AVC:
msg.body.decode.codec.h264 = get_h264_msg(dec, (struct pipe_h264_picture_desc*)picture);
break;
- case PIPE_VIDEO_CODEC_VC1:
+ case PIPE_VIDEO_FORMAT_VC1:
msg.body.decode.codec.vc1 = get_vc1_msg((struct pipe_vc1_picture_desc*)picture);
break;
- case PIPE_VIDEO_CODEC_MPEG12:
+ case PIPE_VIDEO_FORMAT_MPEG12:
msg.body.decode.codec.mpeg2 = get_mpeg2_msg(dec, (struct pipe_mpeg12_picture_desc*)picture);
break;
- case PIPE_VIDEO_CODEC_MPEG4:
+ case PIPE_VIDEO_FORMAT_MPEG4:
msg.body.decode.codec.mpeg4 = get_mpeg4_msg(dec, (struct pipe_mpeg4_picture_desc*)picture);
break;
@@ -831,13 +831,13 @@ struct pipe_video_decoder *ruvd_create_decoder(struct pipe_context *context,
ws->query_info(ws, &info);
switch(u_reduce_video_profile(templ->profile)) {
- case PIPE_VIDEO_CODEC_MPEG12:
+ case PIPE_VIDEO_FORMAT_MPEG12:
if (templ->entrypoint > PIPE_VIDEO_ENTRYPOINT_BITSTREAM || info.family < CHIP_PALM)
return vl_create_mpeg12_decoder(context, templ);
/* fall through */
- case PIPE_VIDEO_CODEC_MPEG4:
- case PIPE_VIDEO_CODEC_MPEG4_AVC:
+ case PIPE_VIDEO_FORMAT_MPEG4:
+ case PIPE_VIDEO_FORMAT_MPEG4_AVC:
width = align(width, VL_MACROBLOCK_WIDTH);
height = align(height, VL_MACROBLOCK_HEIGHT);
break;
@@ -1080,10 +1080,10 @@ int ruvd_get_video_param(struct pipe_screen *screen,
switch (param) {
case PIPE_VIDEO_CAP_SUPPORTED:
switch (u_reduce_video_profile(profile)) {
- case PIPE_VIDEO_CODEC_MPEG12:
- case PIPE_VIDEO_CODEC_MPEG4:
- case PIPE_VIDEO_CODEC_MPEG4_AVC:
- case PIPE_VIDEO_CODEC_VC1:
+ case PIPE_VIDEO_FORMAT_MPEG12:
+ case PIPE_VIDEO_FORMAT_MPEG4:
+ case PIPE_VIDEO_FORMAT_MPEG4_AVC:
+ case PIPE_VIDEO_FORMAT_VC1:
return true;
default:
return false;
diff --git a/src/gallium/include/pipe/p_video_enums.h b/src/gallium/include/pipe/p_video_enums.h
index e66948e1e95..46dad949079 100644
--- a/src/gallium/include/pipe/p_video_enums.h
+++ b/src/gallium/include/pipe/p_video_enums.h
@@ -28,6 +28,15 @@
#ifndef PIPE_VIDEO_ENUMS_H
#define PIPE_VIDEO_ENUMS_H
+enum pipe_video_format
+{
+ PIPE_VIDEO_FORMAT_UNKNOWN = 0,
+ PIPE_VIDEO_FORMAT_MPEG12, /**< MPEG1, MPEG2 */
+ PIPE_VIDEO_FORMAT_MPEG4, /**< DIVX, XVID */
+ PIPE_VIDEO_FORMAT_VC1, /**< WMV */
+ PIPE_VIDEO_FORMAT_MPEG4_AVC /**< H.264 */
+};
+
enum pipe_video_profile
{
PIPE_VIDEO_PROFILE_UNKNOWN,
@@ -58,15 +67,6 @@ enum pipe_video_cap
PIPE_VIDEO_CAP_MAX_LEVEL = 8
};
-enum pipe_video_codec
-{
- PIPE_VIDEO_CODEC_UNKNOWN = 0,
- PIPE_VIDEO_CODEC_MPEG12, /**< MPEG1, MPEG2 */
- PIPE_VIDEO_CODEC_MPEG4, /**< DIVX, XVID */
- PIPE_VIDEO_CODEC_VC1, /**< WMV */
- PIPE_VIDEO_CODEC_MPEG4_AVC /**< H.264 */
-};
-
enum pipe_video_entrypoint
{
PIPE_VIDEO_ENTRYPOINT_UNKNOWN,
diff --git a/src/gallium/include/pipe/p_video_state.h b/src/gallium/include/pipe/p_video_state.h
index 00390d3e170..1fb6ff2078b 100644
--- a/src/gallium/include/pipe/p_video_state.h
+++ b/src/gallium/include/pipe/p_video_state.h
@@ -108,12 +108,12 @@ struct pipe_picture_desc
struct pipe_quant_matrix
{
- enum pipe_video_codec codec;
+ enum pipe_video_format codec;
};
struct pipe_macroblock
{
- enum pipe_video_codec codec;
+ enum pipe_video_format codec;
};
struct pipe_mpeg12_picture_desc
diff --git a/src/gallium/state_trackers/vdpau/decode.c b/src/gallium/state_trackers/vdpau/decode.c
index c0af83bdc7d..e254c50c1f7 100644
--- a/src/gallium/state_trackers/vdpau/decode.c
+++ b/src/gallium/state_trackers/vdpau/decode.c
@@ -495,18 +495,18 @@ vlVdpDecoderRender(VdpDecoder decoder,
memset(&desc, 0, sizeof(desc));
desc.base.profile = dec->profile;
switch (u_reduce_video_profile(dec->profile)) {
- case PIPE_VIDEO_CODEC_MPEG12:
+ case PIPE_VIDEO_FORMAT_MPEG12:
ret = vlVdpDecoderRenderMpeg12(&desc.mpeg12, (VdpPictureInfoMPEG1Or2 *)picture_info);
break;
- case PIPE_VIDEO_CODEC_MPEG4:
+ case PIPE_VIDEO_FORMAT_MPEG4:
ret = vlVdpDecoderRenderMpeg4(&desc.mpeg4, (VdpPictureInfoMPEG4Part2 *)picture_info);
break;
- case PIPE_VIDEO_CODEC_VC1:
+ case PIPE_VIDEO_FORMAT_VC1:
if (dec->profile == PIPE_VIDEO_PROFILE_VC1_ADVANCED)
vlVdpDecoderFixVC1Startcode(&bitstream_buffer_count, buffers, sizes);
ret = vlVdpDecoderRenderVC1(&desc.vc1, (VdpPictureInfoVC1 *)picture_info);
break;
- case PIPE_VIDEO_CODEC_MPEG4_AVC:
+ case PIPE_VIDEO_FORMAT_MPEG4_AVC:
ret = vlVdpDecoderRenderH264(&desc.h264, (VdpPictureInfoH264 *)picture_info);
break;
default:
diff --git a/src/gallium/state_trackers/xvmc/surface.c b/src/gallium/state_trackers/xvmc/surface.c
index 6a895aaed6b..de90e54057d 100644
--- a/src/gallium/state_trackers/xvmc/surface.c
+++ b/src/gallium/state_trackers/xvmc/surface.c
@@ -57,7 +57,7 @@ MacroBlocksToPipe(XvMCContextPrivate *context,
assert(num_macroblocks);
for (; num_macroblocks > 0; --num_macroblocks) {
- mb->base.codec = PIPE_VIDEO_CODEC_MPEG12;
+ mb->base.codec = PIPE_VIDEO_FORMAT_MPEG12;
mb->x = xvmc_mb->x;
mb->y = xvmc_mb->y;
mb->macroblock_type = xvmc_mb->macroblock_type;