FFmpeg
libaribb24.c
Go to the documentation of this file.
1 /*
2  * ARIB STD-B24 caption decoder using the libaribb24 library
3  * Copyright (c) 2019 Jan Ekström
4  *
5  * This file is part of FFmpeg.
6  *
7  * FFmpeg is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * FFmpeg is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with FFmpeg; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21 
22 #include "avcodec.h"
23 #include "libavcodec/ass.h"
24 #include "codec_internal.h"
25 #include "libavutil/log.h"
26 #include "libavutil/opt.h"
27 
28 #include <aribb24/aribb24.h>
29 #include <aribb24/parser.h>
30 #include <aribb24/decoder.h>
31 
32 typedef struct Libaribb24Context {
33  AVClass *class;
34 
35  arib_instance_t *lib_instance;
36  arib_parser_t *parser;
37  arib_decoder_t *decoder;
38 
40 
42  unsigned int aribb24_skip_ruby;
44 
45 static unsigned int get_profile_font_size(int profile)
46 {
47  switch (profile) {
49  return 36;
51  return 18;
52  default:
53  return 0;
54  }
55 }
56 
57 static void libaribb24_log(void *p, const char *msg)
58 {
59  av_log((AVCodecContext *)p, AV_LOG_INFO, "%s\n", msg);
60 }
61 
63 {
64  unsigned int plane_width = 0;
65  unsigned int plane_height = 0;
66  unsigned int font_size = 0;
67 
68  switch (avctx->profile) {
70  plane_width = 960;
71  plane_height = 540;
72  font_size = get_profile_font_size(avctx->profile);
73  break;
75  plane_width = 320;
76  plane_height = 180;
77  font_size = get_profile_font_size(avctx->profile);
78  break;
79  default:
80  av_log(avctx, AV_LOG_ERROR, "Unknown or unsupported profile set!\n");
81  return AVERROR(EINVAL);
82  }
83 
85  "[Script Info]\r\n"
86  "; Script generated by FFmpeg/Lavc%s\r\n"
87  "ScriptType: v4.00+\r\n"
88  "PlayResX: %d\r\n"
89  "PlayResY: %d\r\n"
90  "\r\n"
91  "[V4+ Styles]\r\n"
92 
93  /* ASSv4 header */
94  "Format: Name, "
95  "Fontname, Fontsize, "
96  "PrimaryColour, SecondaryColour, OutlineColour, BackColour, "
97  "Bold, Italic, Underline, StrikeOut, "
98  "ScaleX, ScaleY, "
99  "Spacing, Angle, "
100  "BorderStyle, Outline, Shadow, "
101  "Alignment, MarginL, MarginR, MarginV, "
102  "Encoding\r\n"
103 
104  "Style: "
105  "Default," /* Name */
106  "%s,%d," /* Font{name,size} */
107  "&H%x,&H%x,&H%x,&H%x," /* {Primary,Secondary,Outline,Back}Colour */
108  "%d,%d,%d,0," /* Bold, Italic, Underline, StrikeOut */
109  "100,100," /* Scale{X,Y} */
110  "0,0," /* Spacing, Angle */
111  "%d,1,0," /* BorderStyle, Outline, Shadow */
112  "%d,10,10,10," /* Alignment, Margin[LRV] */
113  "0\r\n" /* Encoding */
114 
115  "\r\n"
116  "[Events]\r\n"
117  "Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text\r\n",
119  plane_width, plane_height,
124 
125  if (!avctx->subtitle_header)
126  return AVERROR(ENOMEM);
127 
128  avctx->subtitle_header_size = strlen(avctx->subtitle_header);
129 
130  return 0;
131 }
132 
133 static int libaribb24_init(AVCodecContext *avctx)
134 {
135  Libaribb24Context *b24 = avctx->priv_data;
136  void(* arib_dec_init)(arib_decoder_t* decoder) = NULL;
137  int ret_code = AVERROR_EXTERNAL;
138 
139  if (!(b24->lib_instance = arib_instance_new(avctx))) {
140  av_log(avctx, AV_LOG_ERROR, "Failed to initialize libaribb24!\n");
141  goto init_fail;
142  }
143 
144  if (b24->aribb24_base_path) {
145  av_log(avctx, AV_LOG_INFO, "Setting the libaribb24 base path to '%s'\n",
146  b24->aribb24_base_path);
147  arib_set_base_path(b24->lib_instance, b24->aribb24_base_path);
148  }
149 
150  arib_register_messages_callback(b24->lib_instance, libaribb24_log);
151 
152  if (!(b24->parser = arib_get_parser(b24->lib_instance))) {
153  av_log(avctx, AV_LOG_ERROR, "Failed to initialize libaribb24 PES parser!\n");
154  goto init_fail;
155  }
156  if (!(b24->decoder = arib_get_decoder(b24->lib_instance))) {
157  av_log(avctx, AV_LOG_ERROR, "Failed to initialize libaribb24 decoder!\n");
158  goto init_fail;
159  }
160 
161  switch (avctx->profile) {
163  arib_dec_init = arib_initialize_decoder_a_profile;
164  break;
166  arib_dec_init = arib_initialize_decoder_c_profile;
167  break;
168  default:
169  av_log(avctx, AV_LOG_ERROR, "Unknown or unsupported profile set!\n");
170  ret_code = AVERROR(EINVAL);
171  goto init_fail;
172  }
173 
174  arib_dec_init(b24->decoder);
175 
176  if (libaribb24_generate_ass_header(avctx) < 0) {
177  ret_code = AVERROR(ENOMEM);
178  goto init_fail;
179  }
180 
181  return 0;
182 
183 init_fail:
184  if (b24->decoder)
185  arib_finalize_decoder(b24->decoder);
186 
187  if (b24->lib_instance)
188  arib_instance_destroy(b24->lib_instance);
189 
190  return ret_code;
191 }
192 
194 {
195  Libaribb24Context *b24 = avctx->priv_data;
196 
197  if (b24->decoder)
198  arib_finalize_decoder(b24->decoder);
199 
200  if (b24->lib_instance)
201  arib_instance_destroy(b24->lib_instance);
202 
203  return 0;
204 }
205 
206 #define RGB_TO_BGR(c) (((c) & 0xff) << 16 | ((c) & 0xff00) | (((c) >> 16) & 0xff))
207 
209 {
210  Libaribb24Context *b24 = avctx->priv_data;
211  const arib_buf_region_t *region = arib_decoder_get_regions(b24->decoder);
212  unsigned int profile_font_size = get_profile_font_size(avctx->profile);
213  AVBPrint buf = { 0 };
214  int ret = 0;
215 
217 
218  while (region) {
219  ptrdiff_t region_length = region->p_end - region->p_start;
220  unsigned int ruby_region =
221  region->i_fontheight == (profile_font_size / 2);
222 
223  // ASS requires us to make the colors BGR, so we convert here
224  int foreground_bgr_color = RGB_TO_BGR(region->i_foreground_color);
225  int background_bgr_color = RGB_TO_BGR(region->i_background_color);
226 
227  if (region_length < 0) {
228  av_log(avctx, AV_LOG_ERROR, "Invalid negative region length!\n");
230  break;
231  }
232 
233  if (region_length == 0 || (ruby_region && b24->aribb24_skip_ruby)) {
234  goto next_region;
235  }
236 
237  // color and alpha
238  if (foreground_bgr_color != ASS_DEFAULT_COLOR)
239  av_bprintf(&buf, "{\\1c&H%06x&}", foreground_bgr_color);
240 
241  if (region->i_foreground_alpha != 0)
242  av_bprintf(&buf, "{\\1a&H%02x&}", region->i_foreground_alpha);
243 
244  if (background_bgr_color != ASS_DEFAULT_BACK_COLOR)
245  av_bprintf(&buf, "{\\3c&H%06x&}", background_bgr_color);
246 
247  if (region->i_background_alpha != 0)
248  av_bprintf(&buf, "{\\3a&H%02x&}", region->i_background_alpha);
249 
250  // font size
251  if (region->i_fontwidth != profile_font_size ||
252  region->i_fontheight != profile_font_size) {
253  av_bprintf(&buf, "{\\fscx%"PRId64"\\fscy%"PRId64"}",
254  av_rescale(region->i_fontwidth, 100,
255  profile_font_size),
256  av_rescale(region->i_fontheight, 100,
257  profile_font_size));
258  }
259 
260  // TODO: positioning
261 
262  av_bprint_append_data(&buf, region->p_start, region_length);
263 
264  av_bprintf(&buf, "{\\r}");
265 
266 next_region:
267  region = region->p_next;
268  }
269 
270  if (!av_bprint_is_complete(&buf))
271  ret = AVERROR(ENOMEM);
272 
273  if (ret == 0) {
274  av_log(avctx, AV_LOG_DEBUG, "Styled ASS line: %s\n",
275  buf.str);
276 
277  ret = ff_ass_add_rect(sub, buf.str, b24->read_order++,
278  0, NULL, NULL);
279  }
280 
281  av_bprint_finalize(&buf, NULL);
282 
283  return ret;
284 }
285 
287  int *got_sub_ptr, const AVPacket *pkt)
288 {
289  Libaribb24Context *b24 = avctx->priv_data;
290  size_t parsed_data_size = 0;
291  size_t decoded_subtitle_size = 0;
292  const unsigned char *parsed_data = NULL;
293  char *decoded_subtitle = NULL;
294  time_t subtitle_duration = 0;
295  int ret = 0;
296 
297  if (pkt->size <= 0)
298  return pkt->size;
299 
300  arib_parse_pes(b24->parser, pkt->data, pkt->size);
301 
302  parsed_data = arib_parser_get_data(b24->parser,
303  &parsed_data_size);
304  if (!parsed_data || !parsed_data_size) {
305  av_log(avctx, AV_LOG_DEBUG, "No decode'able data was received from "
306  "packet (dts: %"PRId64", pts: %"PRId64").\n",
307  pkt->dts, pkt->pts);
308  return pkt->size;
309  }
310 
311  decoded_subtitle_size = parsed_data_size * 4;
312  if (!(decoded_subtitle = av_mallocz(decoded_subtitle_size + 1))) {
313  av_log(avctx, AV_LOG_ERROR,
314  "Failed to allocate buffer for decoded subtitle!\n");
315  return AVERROR(ENOMEM);
316  }
317 
318  decoded_subtitle_size = arib_decode_buffer(b24->decoder,
319  parsed_data,
320  parsed_data_size,
321  decoded_subtitle,
322  decoded_subtitle_size);
323 
324  subtitle_duration = arib_decoder_get_time(b24->decoder);
325 
326  if (avctx->pkt_timebase.num && pkt->pts != AV_NOPTS_VALUE)
327  sub->pts = av_rescale_q(pkt->pts,
328  avctx->pkt_timebase, AV_TIME_BASE_Q);
329 
330  sub->end_display_time = subtitle_duration ?
331  av_rescale_q(subtitle_duration,
333  (AVRational){1, 1000}) :
334  UINT32_MAX;
335 
336  av_log(avctx, AV_LOG_DEBUG,
337  "Result: '%s' (size: %zu, pkt_pts: %"PRId64", sub_pts: %"PRId64" "
338  "duration: %"PRIu32", pkt_timebase: %d/%d, time_base: %d/%d')\n",
339  decoded_subtitle ? decoded_subtitle : "<no subtitle>",
340  decoded_subtitle_size,
341  pkt->pts, sub->pts,
342  sub->end_display_time,
343  avctx->pkt_timebase.num, avctx->pkt_timebase.den,
344  avctx->time_base.num, avctx->time_base.den);
345 
346  if (decoded_subtitle)
348 
349  *got_sub_ptr = sub->num_rects > 0;
350 
351  av_free(decoded_subtitle);
352 
353  // flush the region buffers, otherwise the linked list keeps getting
354  // longer and longer...
355  arib_finalize_decoder(b24->decoder);
356 
357  return ret < 0 ? ret : pkt->size;
358 }
359 
360 static void libaribb24_flush(AVCodecContext *avctx)
361 {
362  Libaribb24Context *b24 = avctx->priv_data;
363  if (!(avctx->flags2 & AV_CODEC_FLAG2_RO_FLUSH_NOOP))
364  b24->read_order = 0;
365 }
366 
367 #define OFFSET(x) offsetof(Libaribb24Context, x)
368 #define SD AV_OPT_FLAG_SUBTITLE_PARAM | AV_OPT_FLAG_DECODING_PARAM
369 static const AVOption options[] = {
370  { "aribb24-base-path", "set the base path for the libaribb24 library",
371  OFFSET(aribb24_base_path), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, SD },
372  { "aribb24-skip-ruby-text", "skip ruby text blocks during decoding",
373  OFFSET(aribb24_skip_ruby), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, SD },
374  { NULL }
375 };
376 
377 static const AVClass aribb24_class = {
378  .class_name = "libaribb24 decoder",
379  .item_name = av_default_item_name,
380  .option = options,
381  .version = LIBAVUTIL_VERSION_INT,
382 };
383 
385  .p.name = "libaribb24",
386  .p.long_name = NULL_IF_CONFIG_SMALL("libaribb24 ARIB STD-B24 caption decoder"),
387  .p.type = AVMEDIA_TYPE_SUBTITLE,
388  .p.id = AV_CODEC_ID_ARIB_CAPTION,
389  .p.priv_class = &aribb24_class,
390  .p.wrapper_name = "libaribb24",
391  .priv_data_size = sizeof(Libaribb24Context),
393  .close = libaribb24_close,
395  .flush = libaribb24_flush,
396 };
LIBAVCODEC_VERSION
#define LIBAVCODEC_VERSION
Definition: version.h:38
AVSubtitle
Definition: avcodec.h:2305
AVMEDIA_TYPE_SUBTITLE
@ AVMEDIA_TYPE_SUBTITLE
Definition: avutil.h:204
AV_BPRINT_SIZE_UNLIMITED
#define AV_BPRINT_SIZE_UNLIMITED
AVERROR
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
opt.h
av_bprint_finalize
int av_bprint_finalize(AVBPrint *buf, char **ret_str)
Finalize a print buffer.
Definition: bprint.c:235
av_bprint_init
void av_bprint_init(AVBPrint *buf, unsigned size_init, unsigned size_max)
Definition: bprint.c:69
sub
static float sub(float src0, float src1)
Definition: dnn_backend_native_layer_mathbinary.c:31
Libaribb24Context::lib_instance
arib_instance_t * lib_instance
Definition: libaribb24.c:35
AV_TIME_BASE_Q
#define AV_TIME_BASE_Q
Internal time base represented as fractional value.
Definition: avutil.h:260
av_asprintf
char * av_asprintf(const char *fmt,...)
Definition: avstring.c:116
libaribb24_generate_ass_header
static int libaribb24_generate_ass_header(AVCodecContext *avctx)
Definition: libaribb24.c:62
ASS_DEFAULT_ALIGNMENT
#define ASS_DEFAULT_ALIGNMENT
Definition: ass.h:42
ff_ass_add_rect
int ff_ass_add_rect(AVSubtitle *sub, const char *dialog, int readorder, int layer, const char *style, const char *speaker)
Add an ASS dialog to a subtitle.
Definition: ass.c:157
AVPacket::data
uint8_t * data
Definition: packet.h:374
AVOption
AVOption.
Definition: opt.h:251
FFCodec
Definition: codec_internal.h:112
AVCodecContext::subtitle_header
uint8_t * subtitle_header
Header containing style information for text subtitles.
Definition: avcodec.h:1705
ASS_DEFAULT_BORDERSTYLE
#define ASS_DEFAULT_BORDERSTYLE
Definition: ass.h:43
av_bprint_append_data
void av_bprint_append_data(AVBPrint *buf, const char *data, unsigned size)
Append data to a print buffer.
Definition: bprint.c:158
Libaribb24Context::decoder
arib_decoder_t * decoder
Definition: libaribb24.c:37
init
static int init
Definition: av_tx.c:47
get_profile_font_size
static unsigned int get_profile_font_size(int profile)
Definition: libaribb24.c:45
decoder
static const chunk_decoder decoder[8]
Definition: dfa.c:331
FFCodec::p
AVCodec p
The public AVCodec.
Definition: codec_internal.h:116
RGB_TO_BGR
#define RGB_TO_BGR(c)
Definition: libaribb24.c:206
AVCodecContext::flags
int flags
AV_CODEC_FLAG_*.
Definition: avcodec.h:469
SD
#define SD
Definition: libaribb24.c:368
AVRational::num
int num
Numerator.
Definition: rational.h:59
ass.h
ff_libaribb24_decoder
const FFCodec ff_libaribb24_decoder
Definition: libaribb24.c:384
pkt
AVPacket * pkt
Definition: movenc.c:59
AV_LOG_ERROR
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:180
ASS_DEFAULT_FONT
#define ASS_DEFAULT_FONT
Definition: ass.h:35
FF_PROFILE_ARIB_PROFILE_C
#define FF_PROFILE_ARIB_PROFILE_C
Definition: avcodec.h:1663
AV_LOG_DEBUG
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
Definition: log.h:201
av_rescale_q
int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq)
Rescale a 64-bit integer by 2 rational numbers.
Definition: mathematics.c:142
AV_CODEC_ID_ARIB_CAPTION
@ AV_CODEC_ID_ARIB_CAPTION
Definition: codec_id.h:552
ASS_DEFAULT_BACK_COLOR
#define ASS_DEFAULT_BACK_COLOR
Definition: ass.h:38
libaribb24_handle_regions
static int libaribb24_handle_regions(AVCodecContext *avctx, AVSubtitle *sub)
Definition: libaribb24.c:208
LIBAVUTIL_VERSION_INT
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
AVClass
Describe the class of an AVClass context structure.
Definition: log.h:66
NULL
#define NULL
Definition: coverity.c:32
options
static const AVOption options[]
Definition: libaribb24.c:369
AVRational
Rational number (pair of numerator and denominator).
Definition: rational.h:58
av_default_item_name
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:237
AVCodecContext::subtitle_header_size
int subtitle_header_size
Definition: avcodec.h:1706
av_bprint_is_complete
static int av_bprint_is_complete(const AVBPrint *buf)
Test if the print buffer is complete (not truncated).
Definition: bprint.h:185
AVCodecContext::time_base
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented.
Definition: avcodec.h:512
AVCodecContext::flags2
int flags2
AV_CODEC_FLAG2_*.
Definition: avcodec.h:476
ASS_DEFAULT_BOLD
#define ASS_DEFAULT_BOLD
Definition: ass.h:39
AVPacket::size
int size
Definition: packet.h:375
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:117
codec_internal.h
Libaribb24Context
Definition: libaribb24.c:32
libaribb24_flush
static void libaribb24_flush(AVCodecContext *avctx)
Definition: libaribb24.c:360
Libaribb24Context::aribb24_base_path
char * aribb24_base_path
Definition: libaribb24.c:41
AVCodecContext::pkt_timebase
AVRational pkt_timebase
Timebase in which pkt_dts/pts and AVPacket.dts/pts are.
Definition: avcodec.h:1746
OFFSET
#define OFFSET(x)
Definition: libaribb24.c:367
AV_NOPTS_VALUE
#define AV_NOPTS_VALUE
Undefined timestamp value.
Definition: avutil.h:248
Libaribb24Context::parser
arib_parser_t * parser
Definition: libaribb24.c:36
AVPacket::dts
int64_t dts
Decompression timestamp in AVStream->time_base units; the time at which the packet is decompressed.
Definition: packet.h:373
AVERROR_EXTERNAL
#define AVERROR_EXTERNAL
Generic error in an external library.
Definition: error.h:59
AV_LOG_INFO
#define AV_LOG_INFO
Standard information.
Definition: log.h:191
ASS_DEFAULT_UNDERLINE
#define ASS_DEFAULT_UNDERLINE
Definition: ass.h:41
FF_PROFILE_ARIB_PROFILE_A
#define FF_PROFILE_ARIB_PROFILE_A
Definition: avcodec.h:1662
log.h
AVPacket::pts
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
Definition: packet.h:367
AV_STRINGIFY
#define AV_STRINGIFY(s)
Definition: macros.h:66
av_mallocz
void * av_mallocz(size_t size)
Allocate a memory block with alignment suitable for all memory accesses (including vectors if availab...
Definition: mem.c:264
AVCodec::name
const char * name
Name of the codec implementation.
Definition: codec.h:203
ASS_DEFAULT_ITALIC
#define ASS_DEFAULT_ITALIC
Definition: ass.h:40
ASS_DEFAULT_COLOR
#define ASS_DEFAULT_COLOR
Definition: ass.h:37
profile
int profile
Definition: mxfenc.c:2005
av_rescale
int64_t av_rescale(int64_t a, int64_t b, int64_t c)
Rescale a 64-bit integer with rounding to nearest.
Definition: mathematics.c:129
avcodec.h
ret
ret
Definition: filter_design.txt:187
AVClass::class_name
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
Definition: log.h:71
av_bprintf
void av_bprintf(AVBPrint *buf, const char *fmt,...)
Definition: bprint.c:94
libaribb24_close
static int libaribb24_close(AVCodecContext *avctx)
Definition: libaribb24.c:193
Libaribb24Context::aribb24_skip_ruby
unsigned int aribb24_skip_ruby
Definition: libaribb24.c:42
AVCodecContext
main external API structure.
Definition: avcodec.h:389
AVRational::den
int den
Denominator.
Definition: rational.h:60
AVCodecContext::profile
int profile
profile
Definition: avcodec.h:1547
FF_CODEC_DECODE_SUB_CB
#define FF_CODEC_DECODE_SUB_CB(func)
Definition: codec_internal.h:257
libaribb24_log
static void libaribb24_log(void *p, const char *msg)
Definition: libaribb24.c:57
Libaribb24Context::read_order
int read_order
Definition: libaribb24.c:39
AV_CODEC_FLAG_BITEXACT
#define AV_CODEC_FLAG_BITEXACT
Use only bitexact stuff (except (I)DCT).
Definition: avcodec.h:278
av_free
#define av_free(p)
Definition: tableprint_vlc.h:33
AVPacket
This structure stores compressed data.
Definition: packet.h:351
AVCodecContext::priv_data
void * priv_data
Definition: avcodec.h:416
AV_OPT_TYPE_BOOL
@ AV_OPT_TYPE_BOOL
Definition: opt.h:244
libaribb24_decode
static int libaribb24_decode(AVCodecContext *avctx, AVSubtitle *sub, int *got_sub_ptr, const AVPacket *pkt)
Definition: libaribb24.c:286
aribb24_class
static const AVClass aribb24_class
Definition: libaribb24.c:377
av_log
#define av_log(a,...)
Definition: tableprint_vlc.h:27
AVERROR_INVALIDDATA
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
Definition: error.h:61
AV_OPT_TYPE_STRING
@ AV_OPT_TYPE_STRING
Definition: opt.h:229
AV_CODEC_FLAG2_RO_FLUSH_NOOP
#define AV_CODEC_FLAG2_RO_FLUSH_NOOP
Do not reset ASS ReadOrder field on flush (subtitles decoding)
Definition: avcodec.h:333
libaribb24_init
static int libaribb24_init(AVCodecContext *avctx)
Definition: libaribb24.c:133