summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau
diff options
context:
space:
mode:
authorChristian König <[email protected]>2013-07-15 02:35:37 -0600
committerChristian König <[email protected]>2013-08-19 10:21:15 +0200
commit8e423ab98403135140a093be3c66c88b9a36ad5c (patch)
tree28c6df9df774c8c3fef1eafad73dae002b0e82f2 /src/gallium/drivers/nouveau
parent53e20b8b418cc85e13d70f41ce160e17847a5096 (diff)
vl: rename enum pipe_video_codec to pipe_video_format
Signed-off-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nouveau')
-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
5 files changed, 28 insertions, 28 deletions
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);