[FFmpeg-devel] [PATCH 3/4] libavcodec/qsvdec.c: The ff_qsv_decode() now guarantees the consumption of whole packet.
Michael Niedermayer
michael at niedermayer.cc
Fri Jul 24 11:26:27 CEST 2015
On Fri, Jul 24, 2015 at 11:56:54AM +0300, Ivan Uskov wrote:
> Hello Michael,
>
> Friday, July 24, 2015, 2:48:45 AM, you wrote:
>
>
> >> + /* A decoder's latency depends not only by async_depth
> >> + but by DPB size too. The latency may acheve 16 frames.
> >> + So it is necessary to handle the size of async_fifo dynamically:
> >> + */
> >> + if (av_fifo_space(q->async_fifo) < sizeof(out_frame) + sizeof(sync))
> >> + av_fifo_grow(q->async_fifo, sizeof(out_frame)+sizeof(sync));
>
> MN> the DPB cannot be arbitrary large, so maybe the grow code could be
> MN> avoided ?
> MN> or maybe i missunderstand
>
> As you can see, the current implementation pre-allocates async_fifo
> for async_depth+1 elements where async_depth==4 by default (see
> tehff_qsv_decode_init() function).
> For h.264 and HEVC max DPB size is 16. So we theoretically can
> hard-code 16+1 size for this fifo.
> Also same code will be used for mpeg2, mjpeg, vc1 where 16+1 most
> likely too big.
> Are you agree to use fixed size for fifo?
yes, it seems simpler,
and its only structs, not bitmaps so space wise it should not be a
problem
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
It is dangerous to be right in matters on which the established authorities
are wrong. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150724/35aac493/attachment.sig>
More information about the ffmpeg-devel
mailing list