[FFmpeg-devel] Broken DNxHD encoder and ASM optimizations activation

Matthieu Bouron matthieu.bouron at gmail.com
Thu Sep 20 18:42:17 CEST 2012


The DNxHD encoder is broken in its current state with 8bit profiles.
After some investigation, a regression was spotted at
d211547dddf9deeb34b7dda9cd80b86f3f5cd07a revision with asm optimizations
enabled or not.

This commit moves some code, which enables some optimisations, from
ff_MPV_commont_init_x86 to ff_MPV_encode_init_x86.
ff_MPV_common_init_x86 is used by ff_dct_common_init. So the encoders which
use ff_dct_common_init won't benefit anymore from the optimized
quantization functions.
It might be a good occasion to check if this kind of regression does not
affect other encoders.

Also, the C version of the quantization function ff_dct_quantize_c (which
is used for the DNxHD 8bit profiles) is broken and produces artefacts as in
the following sample:

This bug could be reproduced with every version of ffmpeg since n0.6 (i
wasn't able to compile 0.5) with --disable-asm and the following command
ffmpeg -i test.png -vcodec dnxhd -b 120M -pix_fmt yuv422p test.mov


More information about the ffmpeg-devel mailing list