[FFmpeg-devel] [PATCHv6 4/4] libavcodec: v4l2: add support for v4l2 mem2mem codecs

Jorge Ramirez jorge.ramirez-ortiz at linaro.org
Mon Aug 28 11:24:53 EEST 2017


On 08/25/2017 05:35 PM, wm4 wrote:
>> +    /*
>> +     * increase the number of buffers to support h.264/h.265
>> +     * default (configurable via option) is 16
>> +     */
>> +    switch (avctx->codec_id) {
>> +    case AV_CODEC_ID_H264:
>> +    case AV_CODEC_ID_HEVC:
>> +        output->num_buffers += 4;
>> +        break;
>> +     }
> That sounds questionable. The maximum DPB for h264 and HEVC are usually
> put at 16. So it should add 14 buffers, assuming traditional MPEG
> codecs use 2. VP9 uses something between.
>

ffmpeg will request 20 out buffers (ie, input frames to the driver) in 
this case (16 + 4).
The kernel _driver_ might return more or less depending on what the 
hardware can handle and the codec_id.

this is just a tentative...




More information about the ffmpeg-devel mailing list