[vlc-devel] [RFC PATCH] input: decoder: optimize dpb_size of H264
Zhao Zhili
wantlamy at gmail.com
Fri May 19 12:36:20 CEST 2017
Hi Francois,
On Fri, May 19, 2017 at 4:40 PM, Francois Cartegnie <fcvlcdev at free.fr>
wrote:
> Le 19/05/2017 à 10:31, Zhao Zhili a écrit :
>
> > + {
> > +#define H264_MAX_DPB_SIZE 18
> > + dpb_size = H264_MAX_DPB_SIZE;
> > +
> > + int profile = -1;
> > + int level = -1;
> > +
> > + profile = p_dec->fmt_in.i_profile;
> > + level = p_dec->fmt_in.i_level;
> > + if( profile == -1 || level == -1 )
> > + {
> > + if( h264_get_profile_level( &p_dec->fmt_in,
> &profile,
> > &level, NULL ) == false )
> > + {
> > + msg_Warn( p_dec, "get profile and level failed"
> );
> > + break;
> > + }
> > + }
> > + msg_Dbg( p_dec, "H264 profile %d, level %d", profile,
> > level );
> > +
> > +#define PROFILE_H264_MAIN 77
> > +#define PROFILE_H264_HIGH 100
> > + if( profile != PROFILE_H264_MAIN && profile !=
> > PROFILE_H264_HIGH )
> > + break;
>
> Unfortunately, because of possible configuration changes, that max DPB
> will always be set to max.
>
> And in all cases, dpb value computation does not belong to core, and
> cannot be correct if relying on extradata.
>
>
Thanks for your review. I know this patch is ugly and not work in many
cases.
I just wonder how to reduce the memory usage when playing ultra high
definition
videos. Since ultra high definition videos have smaller dpb_size, a lot of
memory
can be saved. It would be better if we can use the number of reference
frames
directly. I don't know how to make this work and don't break anything. Any
suggestions would be appreciated.
Francois
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20170519/0f96f948/attachment.html>
More information about the vlc-devel
mailing list