History

avcodec: add an AVCodecContext flag to export PRFT side data on demand

James Almer committed 6 years ago

Commit d005a7c1 parent c6666895 files · +15 −2Browse files

Unified · Split

5 files
  1. doc/APIchanges +3 −0
  2. doc/codecs.texi +3 −0
  3. libavcodec/avcodec.h +7 −1
  4. libavcodec/options_table.h +1 −0
  5. libavcodec/version.h +1 −1
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-02-21 - xxxxxxxxxx - lavc 58.73.101 - avcodec.h
19 Add AV_CODEC_EXPORT_DATA_PRFT.
20
182020-02-21 - xxxxxxxxxx - lavc 58.73.100 - avcodec.h212020-02-21 - xxxxxxxxxx - lavc 58.73.100 - avcodec.h
19 Add AVCodecContext.export_side_data and AV_CODEC_EXPORT_DATA_MVS.22 Add AVCodecContext.export_side_data and AV_CODEC_EXPORT_DATA_MVS.
20 23
doc/codecs.texi+3−0
@@ -795,6 +795,9 @@ Possible values: · 794 unmodified lines
795@item mvs795@item mvs
796Export motion vectors into frame side-data (see @code{AV_FRAME_DATA_MOTION_VECTORS})796Export motion vectors into frame side-data (see @code{AV_FRAME_DATA_MOTION_VECTORS})
797for codecs that support it. See also @file{doc/examples/export_mvs.c}.797for codecs that support it. See also @file{doc/examples/export_mvs.c}.
798@item prft
799Export encoder Producer Reference Time into packet side-data (see @code{AV_PKT_DATA_PRFT})
800for codecs that support it.
798@end table801@end table
799 802
800@item error @var{integer} (@emph{encoding,video})803@item error @var{integer} (@emph{encoding,video})
libavcodec/avcodec.h+7−1
@@ -1110,6 +1110,10 @@ typedef struct RcOverride{ · 1109 unmodified lines
1110 * Export motion vectors through frame side data1110 * Export motion vectors through frame side data
1111 */1111 */
1112#define AV_CODEC_EXPORT_DATA_MVS (1 << 0)1112#define AV_CODEC_EXPORT_DATA_MVS (1 << 0)
1113/**
1114 * Export encoder Producer Reference Time through packet side data
1115 */
1116#define AV_CODEC_EXPORT_DATA_PRFT (1 << 1)
1113 1117
1114/**1118/**
1115 * Pan Scan area.1119 * Pan Scan area.
@@ -1430,7 +1434,9 @@ enum AVPacketSideDataType { · 314 unmodified lines
1430 AV_PKT_DATA_AFD,1434 AV_PKT_DATA_AFD,
1431 1435
1432 /**1436 /**
1433 * Producer Reference Time data corresponding to the AVProducerReferenceTime struct.1437 * Producer Reference Time data corresponding to the AVProducerReferenceTime struct,
1438 * usually exported by some encoders (on demand through the prft flag set in the
1439 * AVCodecContext export_side_data field).
1434 */1440 */
1435 AV_PKT_DATA_PRFT,1441 AV_PKT_DATA_PRFT,
1436 1442
libavcodec/options_table.h+1−0
@@ -80,6 +80,7 @@ static const AVOption avcodec_options[] = { · 79 unmodified lines
80{"ass_ro_flush_noop", "do not reset ASS ReadOrder field on flush", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG2_RO_FLUSH_NOOP}, INT_MIN, INT_MAX, S|D, "flags2"},80{"ass_ro_flush_noop", "do not reset ASS ReadOrder field on flush", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG2_RO_FLUSH_NOOP}, INT_MIN, INT_MAX, S|D, "flags2"},
81{"export_side_data", "Export metadata as side data", OFFSET(export_side_data), AV_OPT_TYPE_FLAGS, {.i64 = DEFAULT}, 0, UINT_MAX, A|V|S|D|E, "export_side_data"},81{"export_side_data", "Export metadata as side data", OFFSET(export_side_data), AV_OPT_TYPE_FLAGS, {.i64 = DEFAULT}, 0, UINT_MAX, A|V|S|D|E, "export_side_data"},
82{"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"},82{"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{"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"},
83{"time_base", NULL, OFFSET(time_base), AV_OPT_TYPE_RATIONAL, {.dbl = 0}, 0, INT_MAX},84{"time_base", NULL, OFFSET(time_base), AV_OPT_TYPE_RATIONAL, {.dbl = 0}, 0, INT_MAX},
84{"g", "set the group of picture (GOP) size", OFFSET(gop_size), AV_OPT_TYPE_INT, {.i64 = 12 }, INT_MIN, INT_MAX, V|E},85{"g", "set the group of picture (GOP) size", OFFSET(gop_size), AV_OPT_TYPE_INT, {.i64 = 12 }, INT_MIN, INT_MAX, V|E},
85{"ar", "set audio sampling rate (in Hz)", OFFSET(sample_rate), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, INT_MAX, A|D|E},86{"ar", "set audio sampling rate (in Hz)", OFFSET(sample_rate), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, INT_MAX, A|D|E},
libavcodec/version.h+1−1
@@ -29,7 +29,7 @@ · 28 unmodified lines
29 29
30#define LIBAVCODEC_VERSION_MAJOR 5830#define LIBAVCODEC_VERSION_MAJOR 58
31#define LIBAVCODEC_VERSION_MINOR 7331#define LIBAVCODEC_VERSION_MINOR 73
32#define LIBAVCODEC_VERSION_MICRO 10032#define LIBAVCODEC_VERSION_MICRO 101
33 33
34#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \34#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
35 LIBAVCODEC_VERSION_MINOR, \35 LIBAVCODEC_VERSION_MINOR, \

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