[FFmpeg-devel] [PATCH] H264: move avctx->refs init down to SPS
Michael Niedermayer
michaelni
Wed Apr 14 15:28:08 CEST 2010
On Wed, Apr 14, 2010 at 09:48:22AM +0200, Gwenole Beauchesne wrote:
> Hi,
>
> This patches moves initialization of AVCodecContext.refs down to the point
> sps.ref_frame_count is actually initialized through
> ff_h264_decode_seq_parameter_set().
>
> Rationale: AVCodecContext.refs needs to be set before
> AVCodecContext.get_format() is called so that a HW decoder can use it as a
> hint to preinitialize the right number of HW surfaces, and then increase
> them when needed.
>
> Regards,
> Gwenole.
> h264.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
> d2ac629f224aec2ba0fd9b8347d8adadf9d94448 ffmpeg.h264.refs.patch
> commit 837dcdec35c721f5c56dcbbc31e2290957c3e2b1
> Author: Gwenole Beauchesne <gbeauchesne at splitted-desktop.com>
> Date: Wed Apr 14 07:10:35 2010 +0200
>
> Move avctx->refs initialization down to SPS.
this patch is incorrect there can be several SPS, you wont know before
the slice header which is used.
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
In a rich man's house there is no place to spit but his face.
-- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100414/f7cd1146/attachment.pgp>
More information about the ffmpeg-devel
mailing list