On 5/30/2019 8:04 AM, Jing Sun wrote:
> Signed-off-by: Zhengxu Huang <[email protected]>
> Signed-off-by: Hassene Tmar <[email protected]>
> Signed-off-by: Jun Zhao <[email protected]>
> Signed-off-by: Jing Sun <[email protected]>
> ---
> configure | 4 +
> libavcodec/Makefile | 1 +
> libavcodec/allcodecs.c | 1 +
> libavcodec/libsvt_hevc.c | 510
> +++++++++++++++++++++++++++++++++++++++++++++++
> libavcodec/version.h | 2 +-
> 5 files changed, 517 insertions(+), 1 deletion(-)
> create mode 100644 libavcodec/libsvt_hevc.c
[...]
> +AVCodec ff_libsvt_hevc_encoder = {
> + .name = "libsvt_hevc",
> + .long_name = NULL_IF_CONFIG_SMALL("SVT-HEVC(Scalable Video
> Technology for HEVC) encoder"),
> + .priv_data_size = sizeof(SvtContext),
> + .type = AVMEDIA_TYPE_VIDEO,
> + .id = AV_CODEC_ID_HEVC,
> + .init = eb_enc_init,
> + .encode2 = eb_encode_frame,
Why the switch to encode2? All previous versions were using the
send/receive API, and seeing SVT also uses a decoupled input/output API,
it was certainly the most adequate option.
Were you running into some issue? A quick look at v12 shows you were
using ff_alloc_packet2(), which afaik you shouldn't have. It's meant for
the encode2() API only, where user provided buffers are allowed, and it
alone does not ensure the packet will be reference counted, which is
required for the send/receive API.
> + .close = eb_enc_close,
> + .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AUTO_THREADS,
> + .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P,
> + AV_PIX_FMT_YUV420P10,
> + AV_PIX_FMT_YUV422P,
> + AV_PIX_FMT_YUV420P10,
> + AV_PIX_FMT_YUV444P,
> + AV_PIX_FMT_YUV444P10,
> + AV_PIX_FMT_NONE },
> + .priv_class = &class,
> + .defaults = eb_enc_defaults,
> + .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
> + .wrapper_name = "libsvt_hevc",
> +};
> diff --git a/libavcodec/version.h b/libavcodec/version.h
> index 7ed6071..8773fee 100644
> --- a/libavcodec/version.h
> +++ b/libavcodec/version.h
> @@ -29,7 +29,7 @@
>
> #define LIBAVCODEC_VERSION_MAJOR 58
> #define LIBAVCODEC_VERSION_MINOR 52
> -#define LIBAVCODEC_VERSION_MICRO 102
> +#define LIBAVCODEC_VERSION_MICRO 103
>
> #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
> LIBAVCODEC_VERSION_MINOR, \
>
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".