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? -- Best regards, Ivan mailto:ivan.us...@nablet.com _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel