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
2 2
3API changes, most recent first:3API changes, most recent first:
4 4
52024-03-xx - xxxxxxxxxx - lavc 61.2.100 - avcodec.h
6 Add AVCodecContext.[nb_]decoded_side_data.
7
52024-03-xx - xxxxxxxxxx - lavu 59.3.100 - frame.h82024-03-xx - xxxxxxxxxx - lavu 59.3.100 - frame.h
6 Add av_frame_side_data_free(), av_frame_side_data_new(),9 Add av_frame_side_data_free(), av_frame_side_data_new(),
7 av_frame_side_data_clone(), av_frame_side_data_get() as well10 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
2062 * Number of entries in side_data_prefer_packet.2062 * Number of entries in side_data_prefer_packet.
2063 */2063 */
2064 unsigned nb_side_data_prefer_packet;2064 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;
2065} AVCodecContext;2078} AVCodecContext;
2066 2079
2067/**2080/**
libavcodec/options.c+2−0
@@ -176,6 +176,8 @@ void avcodec_free_context(AVCodecContext **pavctx) · 175 unmodified lines
176 av_freep(&avctx->inter_matrix);176 av_freep(&avctx->inter_matrix);
177 av_freep(&avctx->rc_override);177 av_freep(&avctx->rc_override);
178 av_channel_layout_uninit(&avctx->ch_layout);178 av_channel_layout_uninit(&avctx->ch_layout);
179 av_frame_side_data_free(
180 &avctx->decoded_side_data, &avctx->nb_decoded_side_data);
179 181
180 av_freep(pavctx);182 av_freep(pavctx);
181}183}
libavcodec/version.h+2−2
@@ -29,8 +29,8 @@ · 28 unmodified lines
29 29
30#include "version_major.h"30#include "version_major.h"
31 31
32#define LIBAVCODEC_VERSION_MINOR 132#define LIBAVCODEC_VERSION_MINOR 2
33#define LIBAVCODEC_VERSION_MICRO 10133#define LIBAVCODEC_VERSION_MICRO 100
34 34
35#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \35#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
36 LIBAVCODEC_VERSION_MINOR, \36 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