[Ffmpeg-devel] [PATCH] fix error croping
Luca Abeni
lucabe72
Tue Apr 3 11:56:56 CEST 2007
Hi Limin,
Limin Wang wrote:
> Hi,
>
>>> $subj, please review it. If your input yuv is 422 packet format, then
>>> you'll failed to crop.
[...]
> Index: ffmpeg.c
> ===================================================================
> --- ffmpeg.c (revision 8565)
> +++ ffmpeg.c (working copy)
> @@ -715,7 +715,7 @@
> return;
>
> if (ost->video_crop) {
> - if (av_picture_crop((AVPicture *)&picture_crop_temp, (AVPicture *)in_picture, dec->pix_fmt, ost->topBand, ost->leftBand) < 0) {
> + if (av_picture_crop((AVPicture *)&picture_crop_temp, (AVPicture *)in_picture, enc->pix_fmt, ost->topBand, ost->leftBand) < 0) {
I do not think this is ok... At this point, the image is still in the
decoder pixel format. Telling av_picture_crop() that it is in a
different format might lead to a wrong result.
I think the correct solution is to implement support for the desired
pixel format in av_picture_crop().
Luca
More information about the ffmpeg-devel
mailing list