]> git.sesse.net Git - ffmpeg/commitdiff
libavcodec: add a new AV_CODEC_EXPORT_DATA_FILM_GRAIN flag and option
authorLynne <dev@lynne.ee>
Thu, 12 Nov 2020 16:46:09 +0000 (17:46 +0100)
committerLynne <dev@lynne.ee>
Wed, 25 Nov 2020 22:06:33 +0000 (23:06 +0100)
This introduces a new field to allow decoders to export their film grain
parameters.
Will be used by the next patch.

doc/APIchanges
libavcodec/avcodec.h
libavcodec/options_table.h

index 58837090cf99f603182c53f6d8382b0df4778a1b..b18f3acaea56264792a8364f25cc741af2e76f82 100644 (file)
@@ -15,6 +15,9 @@ libavutil:     2017-10-21
 
 API changes, most recent first:
 
+2020-11-25 - xxxxxxxxxx - lavc 58.113.100 - avcodec.h
+  Adds a new flag AV_CODEC_EXPORT_DATA_FILM_GRAIN for export_side_data.
+
 2020-11-25 - 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.
index 20af3ef00d605179979623c8736b3739b7a25b94..5047da0f6a2cef75538401120ee64d52d89e579b 100644 (file)
@@ -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.
index 66bda426635613ed4f851bd93f3dd8b43b98a959..1b9d39a3a7d016633fd8c3d596dc9e6b4a34381f 100644 (file)
@@ -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"},
+{"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},