[FFmpeg-devel] [HACK] fix H.264 interlaced cropping
Reimar Döffinger
Reimar.Doeffinger
Wed Nov 3 21:53:48 CET 2010
On Mon, Nov 01, 2010 at 02:23:05PM +0100, Michael Niedermayer wrote:
> On Sat, Oct 09, 2010 at 06:41:57PM +0200, Reimar D?ffinger wrote:
> > 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
And I fogot to say: It does work, tested with both ffmpeg and mplayer.
More information about the ffmpeg-devel
mailing list