[FFmpeg-devel] [PATCH] avcodec/encode: restructure the core encoding code

James Almer jamrial at gmail.com
Wed Jun 10 00:34:23 EEST 2020


On 6/9/2020 6:33 PM, Michael Niedermayer wrote:
> On Tue, May 26, 2020 at 11:35:39AM -0300, James Almer wrote:
>> This commit follows the same logic as 061a0c14bb, but for the encode API: The
>> new public encoding API will no longer be a wrapper around the old deprecated
>> one, and the internal API used by the encoders now consists of a single
>> receive_packet() callback that pulls frames as required.
>>
>> amf encoders adapted by James Almer
>> librav1e encoder adapted by James Almer
>> nvidia encoders adapted by James Almer
>> MediaFoundation encoders adapted by James Almer
>> vaapi encoders adapted by Linjie Fu
>> v4l2_m2m encoders adapted by Andriy Gelman
>>
>> Signed-off-by: James Almer <jamrial at gmail.com>
>> ---
>>  libavcodec/amfenc.c             |  43 ++---
>>  libavcodec/amfenc.h             |   2 -
>>  libavcodec/amfenc_h264.c        |   1 -
>>  libavcodec/amfenc_hevc.c        |   1 -
>>  libavcodec/avcodec.h            |  12 +-
>>  libavcodec/encode.c             | 286 ++++++++++++++++++++++++--------
>>  libavcodec/encode.h             |  39 +++++
>>  libavcodec/internal.h           |   7 +-
>>  libavcodec/librav1e.c           |  51 ++++--
>>  libavcodec/mfenc.c              |  58 ++++---
>>  libavcodec/nvenc.c              |  72 ++++----
>>  libavcodec/nvenc.h              |   9 +-
>>  libavcodec/nvenc_h264.c         |   6 -
>>  libavcodec/nvenc_hevc.c         |   4 -
>>  libavcodec/utils.c              |  10 +-
>>  libavcodec/v4l2_m2m.c           |   8 +
>>  libavcodec/v4l2_m2m.h           |   3 +
>>  libavcodec/v4l2_m2m_enc.c       |  15 +-
>>  libavcodec/vaapi_encode.c       |  26 ++-
>>  libavcodec/vaapi_encode.h       |   3 +-
>>  libavcodec/vaapi_encode_h264.c  |   1 -
>>  libavcodec/vaapi_encode_h265.c  |   1 -
>>  libavcodec/vaapi_encode_mjpeg.c |   1 -
>>  libavcodec/vaapi_encode_mpeg2.c |   1 -
>>  libavcodec/vaapi_encode_vp8.c   |   1 -
>>  libavcodec/vaapi_encode_vp9.c   |   1 -
>>  26 files changed, 442 insertions(+), 220 deletions(-)
>>  create mode 100644 libavcodec/encode.h
> 
> this doesnt apply (anymore) automatically
> 
> Applying: This commit follows the same logic as 061a0c14bb, but for the encode API: The
> Using index info to reconstruct a base tree...
> M	libavcodec/avcodec.h
> M	libavcodec/encode.c
> M	libavcodec/internal.h
> M	libavcodec/mfenc.c
> M	libavcodec/nvenc.c
> M	libavcodec/utils.c
> M	libavcodec/v4l2_m2m_enc.c
> Falling back to patching base and 3-way merge...
> Auto-merging libavcodec/v4l2_m2m_enc.c
> Auto-merging libavcodec/utils.c
> Auto-merging libavcodec/nvenc.c
> Auto-merging libavcodec/mfenc.c
> Auto-merging libavcodec/internal.h
> Auto-merging libavcodec/encode.c
> Auto-merging libavcodec/avcodec.h
> CONFLICT (content): Merge conflict in libavcodec/avcodec.h

Yeah, Anton moved AVCodec to codec.h, so i need to rebase. Will send an
updated version soon.


More information about the ffmpeg-devel mailing list