This introduces a new field to allow decoders to export their film grain parameters. Will be used by the next patch.
Patch attached.
>From d5d5e1e5f90938ac5cfa462efc13658ab411246b Mon Sep 17 00:00:00 2001 From: Lynne <d...@lynne.ee> Date: Thu, 12 Nov 2020 17:46:09 +0100 Subject: [PATCH v2 2/3] libavcodec: add a new AV_CODEC_EXPORT_DATA_FILM_GRAIN flag and option This introduces a new field to allow decoders to export their film grain parameters. Will be used by the next patch. --- doc/APIchanges | 3 +++ libavcodec/avcodec.h | 5 +++++ libavcodec/options_table.h | 1 + libavcodec/version.h | 4 ++-- 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/doc/APIchanges b/doc/APIchanges index 41248724d9..9d0ddb4ff6 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -15,6 +15,9 @@ libavutil: 2017-10-21 API changes, most recent first: +2020-xx-xx - xxxxxxxxxx - lavc 58.113.100 - avcodec.h + Adds a new flag AV_CODEC_EXPORT_DATA_FILM_GRAIN for export_side_data. + 2020-xx-xx - xxxxxxxxxx - lavu 56.61.100 - film_grain_params.h Adds a new API for extracting codec film grain parameters as side data. Adds a new AVFrameSideDataType entry AV_FRAME_DATA_FILM_GRAIN_PARAMS for it. diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 20af3ef00d..5047da0f6a 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -410,6 +410,11 @@ typedef struct RcOverride{ * Export the AVVideoEncParams structure through frame side data. */ #define AV_CODEC_EXPORT_DATA_VIDEO_ENC_PARAMS (1 << 2) +/** + * Decoding only. + * Do not apply film grain, export it instead. + */ +#define AV_CODEC_EXPORT_DATA_FILM_GRAIN (1 << 3) /** * Pan Scan area. diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h index 66bda42663..77e1211ae0 100644 --- a/libavcodec/options_table.h +++ b/libavcodec/options_table.h @@ -83,6 +83,7 @@ static const AVOption avcodec_options[] = { {"mvs", "export motion vectors through frame side data", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_EXPORT_DATA_MVS}, INT_MIN, INT_MAX, V|D, "export_side_data"}, {"prft", "export Producer Reference Time through packet side data", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_EXPORT_DATA_PRFT}, INT_MIN, INT_MAX, A|V|S|E, "export_side_data"}, {"venc_params", "export video encoding parameters through frame side data", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_EXPORT_DATA_VIDEO_ENC_PARAMS}, INT_MIN, INT_MAX, V|D, "export_side_data"}, +{"export_film_grain", "export film grain parameters through frame side data", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_EXPORT_DATA_FILM_GRAIN}, INT_MIN, INT_MAX, V|D, "export_side_data"}, {"time_base", NULL, OFFSET(time_base), AV_OPT_TYPE_RATIONAL, {.dbl = 0}, 0, INT_MAX}, {"g", "set the group of picture (GOP) size", OFFSET(gop_size), AV_OPT_TYPE_INT, {.i64 = 12 }, INT_MIN, INT_MAX, V|E}, {"ar", "set audio sampling rate (in Hz)", OFFSET(sample_rate), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, INT_MAX, A|D|E}, diff --git a/libavcodec/version.h b/libavcodec/version.h index 1585d95777..37fa426f40 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -28,8 +28,8 @@ #include "libavutil/version.h" #define LIBAVCODEC_VERSION_MAJOR 58 -#define LIBAVCODEC_VERSION_MINOR 112 -#define LIBAVCODEC_VERSION_MICRO 103 +#define LIBAVCODEC_VERSION_MINOR 113 +#define LIBAVCODEC_VERSION_MICRO 100 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ LIBAVCODEC_VERSION_MINOR, \ -- 2.29.2
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".