Lines Matching defs:avctx

118 static void count_colors(AVCodecContext *avctx, unsigned hits[33],
121 DVDSubtitleContext *dvdc = avctx->priv_data;
155 static void select_palette(AVCodecContext *avctx, int out_palette[4],
158 DVDSubtitleContext *dvdc = avctx->priv_data;
213 static void build_color_map(AVCodecContext *avctx, int cmap[],
217 DVDSubtitleContext *dvdc = avctx->priv_data;
252 static int encode_dvd_subtitles(AVCodecContext *avctx,
256 DVDSubtitleContext *dvdc = avctx->priv_data;
273 av_log(avctx, AV_LOG_ERROR, "Bitmap subtitle required\n");
302 if ((ret = av_image_check_size(vrect.w, vrect.h, 0, avctx)) < 0)
312 count_colors(avctx, global_palette_hits, h->rects[i]);
313 select_palette(avctx, out_palette, out_alpha, global_palette_hits);
321 build_color_map(avctx, cmap, (uint32_t *)h->rects[i]->data[1],
328 build_color_map(avctx, cmap, (uint32_t *)h->rects[0]->data[1],
332 av_log(avctx, AV_LOG_DEBUG, "Selected palette:");
334 av_log(avctx, AV_LOG_DEBUG, " 0x%06"PRIx32"@@%02x (0x%x,0x%x)",
337 av_log(avctx, AV_LOG_DEBUG, "\n");
379 if (x2 > avctx->width || y2 > avctx->height) {
380 av_log(avctx, AV_LOG_ERROR, "canvas_size(%d:%d) is too small(%d:%d) for render\n",
381 avctx->width, avctx->height, x2, y2);
420 static int bprint_to_extradata(AVCodecContext *avctx, struct AVBPrint *buf)
433 avctx->extradata = str;
439 avctx->extradata_size = buf->len;
443 static int dvdsub_init(AVCodecContext *avctx)
445 DVDSubtitleContext *dvdc = avctx->priv_data;
463 if (avctx->width && avctx->height)
464 av_bprintf(&extradata, "size: %dx%d\n", avctx->width, avctx->height);
470 ret = bprint_to_extradata(avctx, &extradata);
477 static int dvdsub_encode(AVCodecContext *avctx,
481 //DVDSubtitleContext *s = avctx->priv_data;
484 ret = encode_dvd_subtitles(avctx, buf, buf_size, sub);