• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/minidlna/ffmpeg-2.3.4/libavcodec/

Lines Matching refs:rects

198     if (sub_header->rects != NULL) {
200 av_freep(&sub_header->rects[i]->pict.data[0]);
201 av_freep(&sub_header->rects[i]->pict.data[1]);
202 av_freep(&sub_header->rects[i]);
204 av_freep(&sub_header->rects);
355 sub_header->rects = av_mallocz(sizeof(*sub_header->rects));
356 sub_header->rects[0] = av_mallocz(sizeof(AVSubtitleRect));
358 sub_header->rects[0]->pict.data[0] = bitmap;
363 sub_header->rects[0]->pict.data[1] = av_mallocz(AVPALETTE_SIZE);
367 sub_header->rects[0]->nb_colors = 256;
368 yuv_a_to_rgba(yuv_palette, alpha, (uint32_t*)sub_header->rects[0]->pict.data[1], 256);
370 sub_header->rects[0]->nb_colors = 4;
371 guess_palette(ctx, (uint32_t*)sub_header->rects[0]->pict.data[1],
374 sub_header->rects[0]->x = x1;
375 sub_header->rects[0]->y = y1;
376 sub_header->rects[0]->w = w;
377 sub_header->rects[0]->h = h;
378 sub_header->rects[0]->type = SUBTITLE_BITMAP;
379 sub_header->rects[0]->pict.linesize[0] = w;
380 sub_header->rects[0]->flags = is_menu ? AV_SUBTITLE_FLAG_FORCED : 0;
417 if (s->num_rects == 0 || s->rects == NULL || s->rects[0]->w <= 0 || s->rects[0]->h <= 0)
420 for(i = 0; i < s->rects[0]->nb_colors; i++) {
421 if ((((uint32_t*)s->rects[0]->pict.data[1])[i] >> 24) == 0)
425 while (y1 < s->rects[0]->h && is_transp(s->rects[0]->pict.data[0] + y1 * s->rects[0]->pict.linesize[0],
426 1, s->rects[0]->w, transp_color))
428 if (y1 == s->rects[0]->h) {
429 av_freep(&s->rects[0]->pict.data[0]);
430 s->rects[0]->w = s->rects[0]->h = 0;
434 y2 = s->rects[0]->h - 1;
435 while (y2 > 0 && is_transp(s->rects[0]->pict.data[0] + y2 * s->rects[0]->pict.linesize[0], 1,
436 s->rects[0]->w, transp_color))
439 while (x1 < (s->rects[0]->w - 1) && is_transp(s->rects[0]->pict.data[0] + x1, s->rects[0]->pict.linesize[0],
440 s->rects[0]->h, transp_color))
442 x2 = s->rects[0]->w - 1;
443 while (x2 > 0 && is_transp(s->rects[0]->pict.data[0] + x2, s->rects[0]->pict.linesize[0], s->rects[0]->h,
452 memcpy(bitmap + w * y, s->rects[0]->pict.data[0] + x1 + (y1 + y) * s->rects[0]->pict.linesize[0], w);
454 av_freep(&s->rects[0]->pict.data[0]);
455 s->rects[0]->pict.data[0] = bitmap;
456 s->rects[0]->pict.linesize[0] = w;
457 s->rects[0]->w = w;
458 s->rects[0]->h = h;
459 s->rects[0]->x += x1;
460 s->rects[0]->y += y1;
558 ppm_save(ppm_name, sub->rects[0]->pict.data[0],
559 sub->rects[0]->w, sub->rects[0]->h, (uint32_t*) sub->rects[0]->pict.data[1]);