[FFmpeg-devel] [HACK] fix H.264 interlaced cropping

Michael Niedermayer michaelni
Mon Nov 1 14:23:05 CET 2010


On Sat, Oct 09, 2010 at 06:41:57PM +0200, Reimar D?ffinger wrote:
> Hello,
> currently for interlaced FFmpeg calls anything with more than 14 pixels
> vertical cropping "brainfart", however that is wrong since cropping up
> to 28 pixels is necessary to be able to encode "any" resolution for
> interlaced (since coded height to my knowledge is a multiple of 32 -
> well, at least or PAFF).
> Attached patch works for me, however at least the mpegvideo part is quite
> hacky (it's a bit silly, the H.264 decoder sets the mb_width and mb_height
> values, but MPV_common_init overwrites them later and in the case of
> interlacing and mb_height with the wrong one).
> Sample is here: http://samples.mplayerhq.hu/V-codecs/h264/interlaced_crop.mp4

>  h264.c      |    2 +-
>  h264_ps.c   |    2 +-
>  mpegvideo.c |    2 +-
>  utils.c     |    2 +-
>  4 files changed, 4 insertions(+), 4 deletions(-)
> 6294dd348b8d60ab211382c4732689b8be63be19  crop.diff

if it works ok

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The greatest way to live with honor in this world is to be what we pretend
to be. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101101/499c72d8/attachment.pgp>



More information about the ffmpeg-devel mailing list