[FFmpeg-devel] [PATCH v1 1/1] vaapi_encode: replace av_new_packet with ff_alloc_packet2
Sun, Jing A
jing.a.sun at intel.com
Mon Jun 3 09:39:27 EEST 2019
-----Original Message-----
From: ffmpeg-devel [mailto:ffmpeg-devel-bounces at ffmpeg.org] On Behalf Of James Almer
Sent: Saturday, June 1, 2019 3:06 AM
To: ffmpeg-devel at ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH v1 1/1] vaapi_encode: replace av_new_packet with ff_alloc_packet2
>vaapi_encode seems to be using send/receive API, though, and not encode2.
>I see ff_vaapi_encode_receive_packet() -> vaapi_encode_output(), and the former is the callback function used in all vaapi encoders as AVCodec.receive_packet, so this patch in not needed.
Hi James,
vaapi_encode uses encode2 API as well, such as vaapi_h264:
AVCodec ff_h264_vaapi_encoder = {
...
.encode2 = &ff_vaapi_encode2,
...
};
Whether encoder2 or send_frame/receive_packet, the upper callers are the same avcodec_send_frame/avcodec_receive_packet pair, which calls send_frame/receive_packet if exist, or calls encode2 instead. Please correct me if I am wrong.
And would you please review the other patch "[PATCH v13 1/2] lavc/svt_hevc: add libsvt hevc encoder wrapper" for another time? I have updated it again. Thanks a lot in advance!
Regards,
Sun, Jing
More information about the ffmpeg-devel
mailing list