History

avcodec: add frame side data array to AVCodecContext

This allows configuring an encoder by using AVFrameSideData.

Jan Ekström committed 4 years ago

Commit 0d368441 parent d9ade144 files · +20 −2Browse files

Unified · Split

4 files
  1. doc/APIchanges +3 −0
  2. libavcodec/avcodec.h +13 −0
  3. libavcodec/options.c +2 −0
  4. libavcodec/version.h +2 −2
doc/APIchanges+3−0
@@ -2,6 +2,9 @@ The last version increases of all libraries were on 2024-03-07 · 1 unmodified line
22
33 API changes, most recent first:
44
5+2024-03-xx - xxxxxxxxxx - lavc 61.2.100 - avcodec.h
6+ Add AVCodecContext.[nb_]decoded_side_data.
7+
58 2024-03-xx - xxxxxxxxxx - lavu 59.3.100 - frame.h
69 Add av_frame_side_data_free(), av_frame_side_data_new(),
710 av_frame_side_data_clone(), av_frame_side_data_get() as well
libavcodec/avcodec.h+13−0
@@ -2062,6 +2062,19 @@ typedef struct AVCodecContext { · 2061 unmodified lines
20622062 * Number of entries in side_data_prefer_packet.
20632063 */
20642064 unsigned nb_side_data_prefer_packet;
2065+
2066+ /**
2067+ * Array containing static side data, such as HDR10 CLL / MDCV structures.
2068+ * Side data entries should be allocated by usage of helpers defined in
2069+ * libavutil/frame.h.
2070+ *
2071+ * - encoding: may be set by user before calling avcodec_open2() for
2072+ * encoder configuration. Afterwards owned and freed by the
2073+ * encoder.
2074+ * - decoding: unused
2075+ */
2076+ AVFrameSideData **decoded_side_data;
2077+ int nb_decoded_side_data;
20652078 } AVCodecContext;
20662079
20672080 /**
libavcodec/options.c+2−0
@@ -176,6 +176,8 @@ void avcodec_free_context(AVCodecContext **pavctx) · 175 unmodified lines
176176 av_freep(&avctx->inter_matrix);
177177 av_freep(&avctx->rc_override);
178178 av_channel_layout_uninit(&avctx->ch_layout);
179+ av_frame_side_data_free(
180+ &avctx->decoded_side_data, &avctx->nb_decoded_side_data);
179181
180182 av_freep(pavctx);
181183 }
libavcodec/version.h+2−2
@@ -29,8 +29,8 @@ · 28 unmodified lines
2929
3030 #include "version_major.h"
3131
32−#define LIBAVCODEC_VERSION_MINOR 1
33−#define LIBAVCODEC_VERSION_MICRO 101
32+#define LIBAVCODEC_VERSION_MINOR 2
33+#define LIBAVCODEC_VERSION_MICRO 100
3434
3535 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
3636 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