summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv50
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/nv50
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/nv50')
-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
5 files changed, 22 insertions, 22 deletions
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);
}