nv50: enable H.264 for NV98+ (VP3, VP4.0)
PATCH 1/1 nv50: enable H.264 for NV98+ (VP3, VP4.0)
Create the ref_bo without any storage type flags set for now. This can probably be split up somehow later on, but this seems to work.
---
Would be great if someone could see if this also makes MPEG4 work on NVA3+. In order to do that, remove the if (chipset < 0xc0) conditional entirely from nouveau_vp3_video.c (which I modify in this patch).
src/gallium/drivers/nouveau/nouveau_vp3_video.c | 5 +++-- src/gallium/drivers/nouveau/nv50/nv98_video.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-)
src/gallium/drivers/nouveau/nouveau_vp3_video.c +3 -2
@@ -362,10 +362,11 @@ nouveau_vp3_screen_get_video_param(struct pipe_screen *pscreen,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. */ +/* For now, mpeg4 doesn't work on pre-nvc0. */ if (chipset <0xc0 )return codec ==PIPE_VIDEO_FORMAT_MPEG12 || - codec ==PIPE_VIDEO_FORMAT_VC1 ; + codec ==PIPE_VIDEO_FORMAT_VC1 || + codec ==PIPE_VIDEO_FORMAT_MPEG4_AVC ;/* In the general case, this should work, once the pre-nvc0 problems are * resolved. */ return profile >= PIPE_VIDEO_PROFILE_MPEG1 && (
src/gallium/drivers/nouveau/nv50/nv98_video.c +1 -1
@@ -200,7 +200,7 @@ nv98_create_decoder(struct pipe_context *context, dec->ref_stride =mb (templ->width)*16 * (mb_half (templ->height)*32 +nouveau_vp3_video_align (templ->height)/2 ); ret =nouveau_bo_new (screen->device,NOUVEAU_BO_VRAM ,0 , dec->ref_stride * (templ->max_references+2 ) + tmp_size, - &cfg, &dec->ref_bo); +NULL , &dec->ref_bo);if (ret) goto fail;
Signature · 1 line
1.8.3.2
A message that is not in the archive (sent off-list or not yet received): 1386391387-26182-1-git-send-email-imirkin-FrUbXkNCsVf2fBVCVOL8/[email protected]
PATCH 1/1 nv50: enable MPEG-4 for NVA3+ (VP4.0)
From: Martin Peres <[email protected]>
This patch is a follow-up from Ilia Mirkin's enable H.264 patch which solves the problem that prevented MPEG-4 videos to play correctly.
Tested on an nva3.
--- src/gallium/drivers/nouveau/nouveau_vp3_video.c | 5 ----- 1 file changed, 5 deletions(-)
src/gallium/drivers/nouveau/nouveau_vp3_video.c +0 -5
@@ -362,11 +362,6 @@ nouveau_vp3_screen_get_video_param(struct pipe_screen *pscreen,enum pipe_video_format codec =u_reduce_video_profile (profile);switch (param) {case PIPE_VIDEO_CAP_SUPPORTED : -/* For now, mpeg4 doesn't work on pre-nvc0. */ -if (chipset <0xc0 ) -return codec ==PIPE_VIDEO_FORMAT_MPEG12 || - codec ==PIPE_VIDEO_FORMAT_VC1 || - codec ==PIPE_VIDEO_FORMAT_MPEG4_AVC ;/* In the general case, this should work, once the pre-nvc0 problems are * resolved. */ return profile >= PIPE_VIDEO_PROFILE_MPEG1 && (
Signature · 1 line
1.8.4.2
Re: [Nouveau] [PATCH] nv50: enable MPEG-4 for NVA3+ (VP4.0)
Quoted 6 lines · Martin Peres
From: Martin Peres <[email protected]>
This patch is a follow-up from Ilia Mirkin's enable H.264 patch which solves the problem that prevented MPEG-4 videos to play correctly.
Tested on an nva3.
I might reword this as
"""
VP3/VP4 now work on all the codecs they are supposed to, remove old restriction.
Tested on NVA3
"""
Or something like that...
Quoted 12 lines
Signed-off-by Martin Peres <[email protected]>Tested-by Martin Peres <[email protected]>Cc "10.0" <[email protected]>--- src/gallium/drivers/nouveau/nouveau_vp3_video.c | 5 ----- 1 file changed, 5 deletions(-)src/gallium/drivers/nouveau/nouveau_vp3_video.c +0
-0
src/gallium/drivers/nouveau/nouveau_vp3_video.c nouveau_vp3_screen_get_video_param(struct pipe_screen *pscreen, · line 366
Quoted 10 lines
src/gallium/drivers/nouveau/nouveau_vp3_video.c +0
-5@@ -362,11 +362,6 @@ nouveau_vp3_screen_get_video_param(struct pipe_screen *pscreen,enum pipe_video_format codec =u_reduce_video_profile (profile);switch (param) {case PIPE_VIDEO_CAP_SUPPORTED : -/* For now, mpeg4 doesn't work on pre-nvc0. */ -if (chipset <0xc0 ) -return codec ==PIPE_VIDEO_FORMAT_MPEG12 || - codec ==PIPE_VIDEO_FORMAT_VC1 || - codec ==PIPE_VIDEO_FORMAT_MPEG4_AVC ;/* In the general case, this should work, once the pre-nvc0 problems are * resolved. */
Update this comment to reflect reality. Or just remove it.
With that change,
Or I can fold this into my h264 change if you don't want to send a v2, up to you.
Quoted 8 lines
src/gallium/drivers/nouveau/nouveau_vp3_video.c +0
-1return profile >= PIPE_VIDEO_PROFILE_MPEG1 && ( --1.8.4.2
_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau
A message that is not in the archive (sent off-list or not yet received): CAKb7UviogOGD1XnwpsKyG0H=RKRW+5j1vn85zmOhb45VUiHHHg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Re: [PATCH] nv50: enable MPEG-4 for NVA3+ (VP4.0)
Quoted 10 lines · Ilia Mirkin
Quoted 6 lines · Martin Peres
From: Martin Peres <[email protected]>
This patch is a follow-up from Ilia Mirkin's enable H.264 patch which solves the problem that prevented MPEG-4 videos to play correctly.
Tested on an nva3.
I might reword this as
Quoted 7 lines
"""
VP3/VP4 now work on all the codecs they are supposed to, remove old restriction.Tested on NVA3
"""Or something like that...
Yeah, that would make more sense. Feel free to reword it before committing.
Quoted 10 lines · Ilia Mirkin
Create the
ref_bowithout any storage type flags set for now. This can probably be split up somehow later on, but this seems to work.Cc "10.0" <[email protected]>---
Would be great if someone could see if this also makes MPEG4 work on NVA3+. In order to do that, remove the if (chipset <
0xc0) conditional entirely fromnouveau_vp3_video.c(which I modify in this patch).
Martin Peres did that, and it seems to work. I'm going to send an updated series.
Quoted 39 lines
src/gallium/drivers/nouveau/nouveau_vp3_video.c | 5 +++-- src/gallium/drivers/nouveau/nv50/nv98_video.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-)src/gallium/drivers/nouveau/nouveau_vp3_video.c +3
-2@@ -362,10 +362,11 @@ nouveau_vp3_screen_get_video_param(struct pipe_screen *pscreen,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. */ +/* For now, mpeg4 doesn't work on pre-nvc0. */ if (chipset <0xc0 )return codec ==PIPE_VIDEO_FORMAT_MPEG12 || - codec ==PIPE_VIDEO_FORMAT_VC1 ; + codec ==PIPE_VIDEO_FORMAT_VC1 || + codec ==PIPE_VIDEO_FORMAT_MPEG4_AVC ;/* In the general case, this should work, once the pre-nvc0 problems are * resolved. */ return profile >= PIPE_VIDEO_PROFILE_MPEG1 && (src/gallium/drivers/nouveau/nv50/nv98_video.c +1
-2@@ -200,7 +200,7 @@ nv98_create_decoder(struct pipe_context *context, dec->ref_stride =mb (templ->width)*16 * (mb_half (templ->height)*32 +nouveau_vp3_video_align (templ->height)/2 ); ret =nouveau_bo_new (screen->device,NOUVEAU_BO_VRAM ,0 , dec->ref_stride * (templ->max_references+2 ) + tmp_size, - &cfg, &dec->ref_bo); +NULL , &dec->ref_bo);if (ret) goto fail; --1.8.3.2