History

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.

Lynne committed 6 years ago

Commit d243dd51 parent 4f9ee873 files · +9 −0Browse files

Unified · Split

3 files
  1. doc/APIchanges +3 −0
  2. libavcodec/avcodec.h +5 −0
  3. libavcodec/options_table.h +1 −0
doc/APIchanges+3−0
@@ -15,6 +15,9 @@ libavutil: 2017-10-21 · 14 unmodified lines
15 15
16API changes, most recent first:16API changes, most recent first:
17 17
182020-11-25 - xxxxxxxxxx - lavc 58.113.100 - avcodec.h
19 Adds a new flag AV_CODEC_EXPORT_DATA_FILM_GRAIN for export_side_data.
20
182020-11-25 - xxxxxxxxxx - lavu 56.61.100 - film_grain_params.h212020-11-25 - xxxxxxxxxx - lavu 56.61.100 - film_grain_params.h
19 Adds a new API for extracting codec film grain parameters as side data.22 Adds a new API for extracting codec film grain parameters as side data.
20 Adds a new AVFrameSideDataType entry AV_FRAME_DATA_FILM_GRAIN_PARAMS for it.23 Adds a new AVFrameSideDataType entry AV_FRAME_DATA_FILM_GRAIN_PARAMS for it.
libavcodec/avcodec.h+5−0
@@ -410,6 +410,11 @@ typedef struct RcOverride{ · 409 unmodified lines
410 * Export the AVVideoEncParams structure through frame side data.410 * Export the AVVideoEncParams structure through frame side data.
411 */411 */
412#define AV_CODEC_EXPORT_DATA_VIDEO_ENC_PARAMS (1 << 2)412#define AV_CODEC_EXPORT_DATA_VIDEO_ENC_PARAMS (1 << 2)
413/**
414 * Decoding only.
415 * Do not apply film grain, export it instead.
416 */
417#define AV_CODEC_EXPORT_DATA_FILM_GRAIN (1 << 3)
413 418
414/**419/**
415 * Pan Scan area.420 * Pan Scan area.
libavcodec/options_table.h+1−0
@@ -83,6 +83,7 @@ static const AVOption avcodec_options[] = { · 82 unmodified lines
83{"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"},83{"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"},
84{"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"},84{"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"},
85{"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"},85{"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"},
86{"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"},
86{"time_base", NULL, OFFSET(time_base), AV_OPT_TYPE_RATIONAL, {.dbl = 0}, 0, INT_MAX},87{"time_base", NULL, OFFSET(time_base), AV_OPT_TYPE_RATIONAL, {.dbl = 0}, 0, INT_MAX},
87{"g", "set the group of picture (GOP) size", OFFSET(gop_size), AV_OPT_TYPE_INT, {.i64 = 12 }, INT_MIN, INT_MAX, V|E},88{"g", "set the group of picture (GOP) size", OFFSET(gop_size), AV_OPT_TYPE_INT, {.i64 = 12 }, INT_MIN, INT_MAX, V|E},
88{"ar", "set audio sampling rate (in Hz)", OFFSET(sample_rate), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, INT_MAX, A|D|E},89{"ar", "set audio sampling rate (in Hz)", OFFSET(sample_rate), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, INT_MAX, A|D|E},

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t