Loren Merritt
2004-09-16 08:13:05 UTC
Currently, the decision about whether to encode huffyuv as interlaced
is based on a hardcoded threshold (height > 288).
This patch changes it to an option (-ilme).
Since the hard threshold was also in the decoder, the resulting files
are backwards compatible if and only if you use the same interlacing
option as would've happened before.
The interlacing flag should be compatible with Huffyuv 2.2.0, but
I haven't tested that.
benchmarks (where -ilme has the same results as before the patch):
$> ffmpeg -vcodec huffyuv -pred 2 -ilme -i in.avi hfyu2i.avi
frame= 1430 q=0.0 Lsize= 285460kB time=59.6 bitrate=39208.1kbits/s
$> ffmpeg -vcodec huffyuv -pred 2 -i in.avi hfyu2p.avi
frame= 1430 q=0.0 Lsize= 273500kB time=59.6 bitrate=37565.3kbits/s
$> ffmpeg -vcodec huffyuv -pred 2 -ilme -pass 1 -i in.avi -y hfyu2i.p2.avi
$> ffmpeg -vcodec huffyuv -pred 2 -ilme -pass 2 -i in.avi -y hfyu2i.p2.avi
frame= 1430 q=0.0 Lsize= 187563kB time=59.6 bitrate=25762.0kbits/s
$> ffmpeg -vcodec huffyuv -pred 2 -pass 1 -i in.avi -y hfyu2p.p2.avi
$> ffmpeg -vcodec huffyuv -pred 2 -pass 2 -i in.avi -y hfyu2p.p2.avi
frame= 1430 q=0.0 Lsize= 163403kB time=59.6 bitrate=22443.5kbits/s
--Loren Merritt
is based on a hardcoded threshold (height > 288).
This patch changes it to an option (-ilme).
Since the hard threshold was also in the decoder, the resulting files
are backwards compatible if and only if you use the same interlacing
option as would've happened before.
The interlacing flag should be compatible with Huffyuv 2.2.0, but
I haven't tested that.
benchmarks (where -ilme has the same results as before the patch):
$> ffmpeg -vcodec huffyuv -pred 2 -ilme -i in.avi hfyu2i.avi
frame= 1430 q=0.0 Lsize= 285460kB time=59.6 bitrate=39208.1kbits/s
$> ffmpeg -vcodec huffyuv -pred 2 -i in.avi hfyu2p.avi
frame= 1430 q=0.0 Lsize= 273500kB time=59.6 bitrate=37565.3kbits/s
$> ffmpeg -vcodec huffyuv -pred 2 -ilme -pass 1 -i in.avi -y hfyu2i.p2.avi
$> ffmpeg -vcodec huffyuv -pred 2 -ilme -pass 2 -i in.avi -y hfyu2i.p2.avi
frame= 1430 q=0.0 Lsize= 187563kB time=59.6 bitrate=25762.0kbits/s
$> ffmpeg -vcodec huffyuv -pred 2 -pass 1 -i in.avi -y hfyu2p.p2.avi
$> ffmpeg -vcodec huffyuv -pred 2 -pass 2 -i in.avi -y hfyu2p.p2.avi
frame= 1430 q=0.0 Lsize= 163403kB time=59.6 bitrate=22443.5kbits/s
--Loren Merritt