FFmpeg
|
pgssubdec.c
Go to the documentation of this file.
69 uint32_t clut[256];
159 av_dlog(avctx, "Pixel Count = %d, Area = %d\n", pixel_count, sub->rects[rect]->w * sub->rects[rect]->h);
193 /* Read the Sequence Description to determine if start of RLE data or appended to previous RLE */
233 av_fast_malloc(&ctx->pictures[picture_id].rle, &ctx->pictures[picture_id].rle_buffer_size, rle_bitmap_len);
340 ctx->presentation.objects = av_malloc(sizeof(PGSSubPictureReference) * ctx->presentation.object_count);
359 av_dlog(avctx, "Subtitle Placement ID=%d, x=%d, y=%d\n", reference->picture_id, reference->x, reference->y);
362 av_log(avctx, AV_LOG_ERROR, "Subtitle out of video bounds. x = %d, y = %d, video width = %d, video height = %d.\n",
431 if (decode_rle(avctx, sub, rect, ctx->pictures[picture_id].rle, ctx->pictures[picture_id].rle_data_len) < 0)
440 sub->rects[rect]->flags = (ctx->presentation.objects[rect].composition & 0x40) != 0 ? AV_SUBTITLE_FLAG_FORCED : 0;
443 memcpy(sub->rects[rect]->pict.data[1], ctx->clut, sub->rects[rect]->nb_colors * sizeof(uint32_t));
528 {"forced_subs_only", "Only show forced subtitles", OFFSET(forced_subs_only), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, SD},
void * av_mallocz(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
Definition: mem.c:205
Definition: pgssubdec.c:41
misc image utilities
Definition: opt.h:222
void avcodec_set_dimensions(AVCodecContext *s, int width, int height)
Definition: libavcodec/utils.c:177
int nb_colors
number of colors in pict, undefined when pict is not set
Definition: libavcodec/avcodec.h:3081
Various defines for YUV<->RGB conversion.
av_dlog(ac->avr,"%d samples - audio_convert: %s to %s (%s)\n", len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt), use_generic?ac->func_descr_generic:ac->func_descr)
static void parse_presentation_segment(AVCodecContext *avctx, const uint8_t *buf, int buf_size, int64_t pts)
Parse the presentation segment packet.
Definition: pgssubdec.c:297
void av_freep(void *arg)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc() and set the pointer ...
Definition: mem.c:198
static int decode_rle(AVCodecContext *avctx, AVSubtitle *sub, int rect, const uint8_t *buf, unsigned int buf_size)
Decode the RLE data.
Definition: pgssubdec.c:108
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:55
void av_fast_malloc(void *ptr, unsigned int *size, size_t min_size)
Allocate a buffer, reusing the given one if large enough.
Definition: libavcodec/utils.c:96
AVOptions.
Definition: pgssubdec.c:40
Definition: pgssubdec.c:66
static int decode(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
Definition: pgssubdec.c:449
struct PGSSubPresentation PGSSubPresentation
Definition: libavcodec/avcodec.h:3102
static int parse_picture_segment(AVCodecContext *avctx, const uint8_t *buf, int buf_size)
Parse the picture segment packet.
Definition: pgssubdec.c:175
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: libavutil/internal.h:123
external API header
int av_image_check_size(unsigned int w, unsigned int h, int log_offset, void *log_ctx)
Check if the given dimension of an image is valid, meaning that all bytes of the image can be address...
Definition: imgutils.c:231
struct PGSSubPictureReference PGSSubPictureReference
struct PGSSubContext PGSSubContext
static int display_end_segment(AVCodecContext *avctx, void *data, const uint8_t *buf, int buf_size)
Parse the display segment packet.
Definition: pgssubdec.c:385
Definition: pgssubdec.c:37
void * av_malloc(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
Definition: mem.c:73
Definition: f_ebur128.c:90
Definition: pgssubdec.c:58
struct PGSSubPicture PGSSubPicture
Definition: pgssubdec.c:44
static void parse_palette_segment(AVCodecContext *avctx, const uint8_t *buf, int buf_size)
Parse the palette segment packet.
Definition: pgssubdec.c:255
DSP utils.
Definition: pgssubdec.c:39
Definition: pgssubdec.c:38
Definition: pgssubdec.c:51
Definition: avutil.h:146
Generated on Mon Nov 18 2024 06:51:59 for FFmpeg by 1.8.11