[FFmpeg-devel] [PATCH v1 1/1] vaapi_encode: replace av_new_packet with ff_alloc_packet2

James Almer jamrial at gmail.com
Mon Jun 3 16:55:14 EEST 2019


On 6/3/2019 3:39 AM, Sun, Jing A wrote:
> -----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,

I can't find this anywhere in the tree. Are you sure you're looking at
ffmpeg's libavcodec?

>     ...
> };
> 
> 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
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
> 



More information about the ffmpeg-devel mailing list