[Ffmpeg-devel] Re: cropping/padding/rescaling patchset

Baptiste COUDURIER baptiste.coudurier
Mon Mar 20 17:17:22 CET 2006


Hi Luca,

Luca Abeni wrote:
> [...]
> -    if (ost->video_resample) {
> +    final_picture = formatted_picture;
> +    padding_src = formatted_picture;
> +    if (ost->video_pad) {
>          final_picture = &ost->pict_tmp;
> -        img_resample(ost->img_resample_ctx, (AVPicture*)final_picture, (AVPicture*)formatted_picture);
> +        if (img_crop((AVPicture *)&picture_pad_temp, (AVPicture *)final_picture, target_pixfmt, ost->padtop, ost->padleft) < 0) {
> +             av_log(NULL, AV_LOG_ERROR, "error padding picture\n");
> +             goto the_end;
> +        }

Explain me why you have to crop in order to pad the picture. I dont get
it. If you only pad, size is increased, you must not crop it by padding
sizes.

This is a bit confusing, final picture is FINAL, so it must be last
picture, feeded into av_encode.

Besides that Its a really good job. Thanks a lot Luca.

> [...]

-- 
Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
SMARTJOG S.A.                                    http://www.smartjog.com
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
Phone: +33 1 49966312





More information about the ffmpeg-devel mailing list