• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/iserver/libav-0.8.8/libavcodec/

Lines Matching refs:sub

87  * @param sub pointer to the processed subtitle data
91 static int decode_rle(AVCodecContext *avctx, AVSubtitle *sub,
99 sub->rects[0]->pict.data[0] = av_malloc(sub->rects[0]->w * sub->rects[0]->h);
101 if (!sub->rects[0]->pict.data[0])
107 while (buf < rle_bitmap_end && line_count < sub->rects[0]->h) {
122 if (run > 0 && pixel_count + run <= sub->rects[0]->w * sub->rects[0]->h) {
123 memset(sub->rects[0]->pict.data[0] + pixel_count, color, run);
130 if (pixel_count % sub->rects[0]->w > 0)
132 pixel_count % sub->rects[0]->w, sub->rects[0]->w);
137 if (pixel_count < sub->rects[0]->w * sub->rects[0]->h) {
142 av_dlog(avctx, "Pixel Count = %d, Area = %d\n", pixel_count, sub->rects[0]->w * sub->rects[0]->h);
349 AVSubtitle *sub = data;
358 memset(sub, 0, sizeof(*sub));
363 sub->start_display_time = 0;
364 sub->end_display_time = 20000;
365 sub->format = 0;
367 sub->rects = av_mallocz(sizeof(*sub->rects));
368 sub->rects[0] = av_mallocz(sizeof(*sub->rects[0]));
369 sub->num_rects = 1;
371 sub->rects[0]->x = ctx->presentation.x;
372 sub->rects[0]->y = ctx->presentation.y;
373 sub->rects[0]->w = ctx->picture.w;
374 sub->rects[0]->h = ctx->picture.h;
375 sub->rects[0]->type = SUBTITLE_BITMAP;
378 sub->rects[0]->pict.linesize[0] = ctx->picture.w;
384 if(decode_rle(avctx, sub, ctx->picture.rle, ctx->picture.rle_data_len) < 0)
388 sub->rects[0]->nb_colors = 256;
389 sub->rects[0]->pict.data[1] = av_mallocz(AVPALETTE_SIZE);
391 memcpy(sub->rects[0]->pict.data[1], ctx->clut, sub->rects[0]->nb_colors * sizeof(uint32_t));
407 av_dlog(avctx, "PGS sub packet:\n");