• 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:rects

302                 if (sub_header->rects != NULL) {
304 av_freep(&sub_header->rects[i]->pict.data[0]);
305 av_freep(&sub_header->rects[i]->pict.data[1]);
306 av_freep(&sub_header->rects[i]);
308 av_freep(&sub_header->rects);
313 sub_header->rects = av_mallocz(sizeof(*sub_header->rects));
314 sub_header->rects[0] = av_mallocz(sizeof(AVSubtitleRect));
316 sub_header->rects[0]->pict.data[0] = bitmap;
321 sub_header->rects[0]->pict.data[1] = av_mallocz(AVPALETTE_SIZE);
325 sub_header->rects[0]->nb_colors = 256;
326 yuv_a_to_rgba(yuv_palette, alpha, (uint32_t*)sub_header->rects[0]->pict.data[1], 256);
328 sub_header->rects[0]->nb_colors = 4;
329 guess_palette((uint32_t*)sub_header->rects[0]->pict.data[1],
332 sub_header->rects[0]->x = x1;
333 sub_header->rects[0]->y = y1;
334 sub_header->rects[0]->w = w;
335 sub_header->rects[0]->h = h;
336 sub_header->rects[0]->type = SUBTITLE_BITMAP;
337 sub_header->rects[0]->pict.linesize[0] = w;
347 if (sub_header->rects != NULL) {
349 av_freep(&sub_header->rects[i]->pict.data[0]);
350 av_freep(&sub_header->rects[i]->pict.data[1]);
351 av_freep(&sub_header->rects[i]);
353 av_freep(&sub_header->rects);
378 if (s->num_rects == 0 || s->rects == NULL || s->rects[0]->w <= 0 || s->rects[0]->h <= 0)
382 for(i = 0; i < s->rects[0]->nb_colors; i++) {
383 if ((((uint32_t*)s->rects[0]->pict.data[1])[i] >> 24) == 0)
387 while (y1 < s->rects[0]->h && is_transp(s->rects[0]->pict.data[0] + y1 * s->rects[0]->pict.linesize[0],
388 1, s->rects[0]->w, transp_color))
390 if (y1 == s->rects[0]->h) {
391 av_freep(&s->rects[0]->pict.data[0]);
392 s->rects[0]->w = s->rects[0]->h = 0;
396 y2 = s->rects[0]->h - 1;
397 while (y2 > 0 && is_transp(s->rects[0]->pict.data[0] + y2 * s->rects[0]->pict.linesize[0], 1,
398 s->rects[0]->w, transp_color))
401 while (x1 < (s->rects[0]->w - 1) && is_transp(s->rects[0]->pict.data[0] + x1, s->rects[0]->pict.linesize[0],
402 s->rects[0]->h, transp_color))
404 x2 = s->rects[0]->w - 1;
405 while (x2 > 0 && is_transp(s->rects[0]->pict.data[0] + x2, s->rects[0]->pict.linesize[0], s->rects[0]->h,
414 memcpy(bitmap + w * y, s->rects[0]->pict.data[0] + x1 + (y1 + y) * s->rects[0]->pict.linesize[0], w);
416 av_freep(&s->rects[0]->pict.data[0]);
417 s->rects[0]->pict.data[0] = bitmap;
418 s->rects[0]->pict.linesize[0] = w;
419 s->rects[0]->w = w;
420 s->rects[0]->h = h;
421 s->rects[0]->x += x1;
422 s->rects[0]->y += y1;
481 ppm_save("/tmp/a.ppm", sub->rects[0]->pict.data[0],
482 sub->rects[0]->w, sub->rects[0]->h, sub->rects[0]->pict.data[1]);