• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/ap/gpl/minidlna/ffmpeg-0.5.1/libavcodec/

Lines Matching refs:rects

176     sub_header->rects = NULL;
321 if (sub_header->rects != NULL) {
323 av_freep(&sub_header->rects[i]->pict.data[0]);
324 av_freep(&sub_header->rects[i]->pict.data[1]);
325 av_freep(&sub_header->rects[i]);
327 av_freep(&sub_header->rects);
332 sub_header->rects = av_mallocz(sizeof(*sub_header->rects));
333 sub_header->rects[0] = av_mallocz(sizeof(AVSubtitleRect));
335 sub_header->rects[0]->pict.data[0] = bitmap;
343 sub_header->rects[0]->pict.data[1] = av_malloc(256 * 4);
344 sub_header->rects[0]->nb_colors = 256;
345 yuv_a_to_rgba(yuv_palette, alpha, (uint32_t*)sub_header->rects[0]->pict.data[1], 256);
347 sub_header->rects[0]->pict.data[1] = av_malloc(4 * 4);
348 sub_header->rects[0]->nb_colors = 4;
349 guess_palette((uint32_t*)sub_header->rects[0]->pict.data[1],
352 sub_header->rects[0]->x = x1;
353 sub_header->rects[0]->y = y1;
354 sub_header->rects[0]->w = w;
355 sub_header->rects[0]->h = h;
356 sub_header->rects[0]->pict.linesize[0] = w;
366 if (sub_header->rects != NULL) {
368 av_freep(&sub_header->rects[i]->pict.data[0]);
369 av_freep(&sub_header->rects[i]->pict.data[1]);
370 av_freep(&sub_header->rects[i]);
372 av_freep(&sub_header->rects);
397 if (s->num_rects == 0 || s->rects == NULL || s->rects[0]->w <= 0 || s->rects[0]->h <= 0)
401 for(i = 0; i < s->rects[0]->nb_colors; i++) {
402 if ((((uint32_t*)s->rects[0]->pict.data[1])[i] >> 24) == 0)
406 while (y1 < s->rects[0]->h && is_transp(s->rects[0]->pict.data[0] + y1 * s->rects[0]->pict.linesize[0],
407 1, s->rects[0]->w, transp_color))
409 if (y1 == s->rects[0]->h) {
410 av_freep(&s->rects[0]->pict.data[0]);
411 s->rects[0]->w = s->rects[0]->h = 0;
415 y2 = s->rects[0]->h - 1;
416 while (y2 > 0 && is_transp(s->rects[0]->pict.data[0] + y2 * s->rects[0]->pict.linesize[0], 1,
417 s->rects[0]->w, transp_color))
420 while (x1 < (s->rects[0]->w - 1) && is_transp(s->rects[0]->pict.data[0] + x1, s->rects[0]->pict.linesize[0],
421 s->rects[0]->h, transp_color))
423 x2 = s->rects[0]->w - 1;
424 while (x2 > 0 && is_transp(s->rects[0]->pict.data[0] + x2, s->rects[0]->pict.linesize[0], s->rects[0]->h,
433 memcpy(bitmap + w * y, s->rects[0]->pict.data[0] + x1 + (y1 + y) * s->rects[0]->pict.linesize[0], w);
435 av_freep(&s->rects[0]->pict.data[0]);
436 s->rects[0]->pict.data[0] = bitmap;
437 s->rects[0]->pict.linesize[0] = w;
438 s->rects[0]->w = w;
439 s->rects[0]->h = h;
440 s->rects[0]->x += x1;
441 s->rects[0]->y += y1;
498 ppm_save("/tmp/a.ppm", sub->rects[0]->pict.data[0],
499 sub->rects[0]->w, sub->rects[0]->h, sub->rects[0]->pict.data[1]);