[vlc-devel] commit: Allowed H264 direct rendering for non reference frames only ( avcodec). (Laurent Aimar )
git version control
git at videolan.org
Fri Feb 26 21:00:31 CET 2010
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Fri Feb 26 20:58:29 2010 +0100| [37ab7434c092ef57e464202b4d224e7e37b44e82] | committer: Laurent Aimar
Allowed H264 direct rendering for non reference frames only (avcodec).
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=37ab7434c092ef57e464202b4d224e7e37b44e82
---
modules/codec/avcodec/video.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index e21b4ad..3ac6474 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -298,8 +298,6 @@ int InitVideoDec( decoder_t *p_dec, AVCodecContext *p_context,
p_sys->i_direct_rendering_used = -1;
if( var_CreateGetBool( p_dec, "ffmpeg-dr" ) &&
(p_sys->p_codec->capabilities & CODEC_CAP_DR1) &&
- /* H264 uses too many reference frames */
- p_sys->i_codec_id != CODEC_ID_H264 &&
/* No idea why ... but this fixes flickering on some TSCC streams */
p_sys->i_codec_id != CODEC_ID_TSCC &&
!p_sys->p_context->debug_mv )
@@ -923,9 +921,12 @@ static int ffmpeg_GetFrameBuf( struct AVCodecContext *p_context,
}
return 0;
}
- else if( !p_sys->b_direct_rendering )
+ else if( !p_sys->b_direct_rendering ||
+ ( p_sys->i_codec_id == CODEC_ID_H264 && p_ff_pic->reference ) )
{
- /* Not much to do in indirect rendering mode */
+ /* Not much to do in indirect rendering mode.
+ * XXX We also do not allow direct rendering with H264 reference frames
+ * as there can be too many of them. */
return avcodec_default_get_buffer( p_context, p_ff_pic );
}
More information about the vlc-devel
mailing list