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

James Almer jamrial at gmail.com
Tue Jun 9 18:27:29 EEST 2020


On 5/26/2020 11:35 AM, 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

Will apply soon now that 4.3 branch was created.


More information about the ffmpeg-devel mailing list