[vlc-devel] commit: Do not uselessly disable direct rendering in avcodec. ( Laurent Aimar )
git version control
git at videolan.org
Sun Jul 19 00:18:21 CEST 2009
vlc | branch: 1.0-bugfix | Laurent Aimar <fenrir at videolan.org> | Fri Jul 17 19:06:29 2009 +0200| [3491ad532af0425e51072cdd5b95a343164917f6] | committer: Jean-Baptiste Kempf
Do not uselessly disable direct rendering in avcodec.
It allows to use direct rendering if the chroma/size changes.
It also avoid *always* disabling it after a seek...
(It cost about 6% of CPU for video HD on my dual core in memcpy).
(cherry picked from commit 0f79a0a02de9aa8f7aa6f5d0d797df3250fd4d85)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3491ad532af0425e51072cdd5b95a343164917f6
---
modules/codec/avcodec/video.c | 9 ++-------
1 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index 7940405..b606cff 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -919,21 +919,16 @@ static int ffmpeg_GetFrameBuf( struct AVCodecContext *p_context,
/* We only pad picture up to 16 */
PAD(p_sys->p_context->width,16) < i_width || PAD(p_sys->p_context->height,16) < i_height ||
p_context->pix_fmt == PIX_FMT_PAL8 )
- {
- msg_Dbg( p_dec, "disabling direct rendering" );
- p_sys->b_direct_rendering = false;
return avcodec_default_get_buffer( p_context, p_ff_pic );
- }
+
p_dec->fmt_out.i_codec = p_dec->fmt_out.video.i_chroma;
/* Get a new picture */
//p_sys->p_vout->render.b_allow_modify_pics = 0;
p_pic = ffmpeg_NewPictBuf( p_dec, p_sys->p_context );
if( !p_pic )
- {
- p_sys->b_direct_rendering = false;
return avcodec_default_get_buffer( p_context, p_ff_pic );
- }
+
p_sys->p_context->draw_horiz_band = NULL;
p_ff_pic->opaque = (void*)p_pic;
More information about the vlc-devel
mailing list