[Ffmpeg-devel] [PATCH] fix error croping

Limin Wang lance.lmwang
Tue Apr 3 13:39:03 CEST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

> > 
> >> I think the correct solution is to implement support for the desired 
> >> pixel format in av_picture_crop().
> > 
> > So the next picture pading should use enc->pix_fmt instead of dec->pix_fmt?
> 
> Check input picture and his pixel format, and it's right atm.

The input video is from v4l2 capture device and its format is PIX_FMT_YUV420P
from the ffmpeg output result. My question is padding process should be use
dec->pix_fmt instead of enc->pix_fmt also?

> 
> > For padding is OK and I check it uses enc->pix_fmt, based on this I try with
> > enc->pix_fmt for crop, and the fact is the crop test result is OK. 
> 
> crop test cannot be ok, if you supply packed input you'll get this:
> "error cropping picture"

yes, it reports error cropping picture, after change to enc->pix_fmt, it's ok
without problem. 


> > So maybe other place has bug, by my understanding after decode, the pix_fmt
> > should be yuv420 instead of yuv422 packed format still. My input is yuv422
> > packed format and output is h264.
> 
> pix_fmt after decode is dependent of the compressed pixel format.
> What is your source ?
> Are you sure it is 422 'packed' ? and not 'yuv422p' which means instead
> means 4:2:2 planar.

Yes, it's packed 422. If it's 422 planar, then crop should be ok.


Thanks,
Limin
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iQEVAwUBRhI810ztbf7dKiuoAQKOPwf8Dr6Gc4uYRLFVjPUF78Vpae8rlgtKFD9w
q6MKPRls4RZOJ6i4NKjIAUnDMhEceBmhOT5Shaa7LjDAZhe7FZSldQza1NeejZhB
mKDRo4IVO2GBcFUUtYXIN/wzHgtAQ5QwhYbCAHC5ZoANzU6eY0E4RvveWAd5iZ2g
yV4KFmh587gd9JlcH4TCC2eeDK8e31yOqOvB5VCKx185jMbpEN+3Mf6C8aACZaK8
I4iuBvJovWxGBiHL7JTrg4BctUyNzZi7N0Nvl1LTZLX35VjipYj7moRDIzdqvfg3
OK76wwhlV3o/WHigIsR1tR3/EEaVzlqHzSlDy2Jxju64BXbE+LrKRQ==
=Mn8R
-----END PGP SIGNATURE-----




More information about the ffmpeg-devel mailing list