On Mon, Oct 30, 2023 at 02:11:27PM +0100, Andreas Rheinhardt wrote: > Section 7.4.4 of the MPEG-2 specifications requires that the > last bit of the last coefficient be toggled so that the sum > of all coefficients is odd; both our decoder and encoder > did this only if the bitexact flag has been set (although > stuff like this should be behind AV_CODEC_FLAG2_FAST). > This patch changes this by removing the spec-incompliant > functions. This commit message should include benchamarks documenting the speed loss (of the unquantize, the IDCT and overall) It is expected that the speed of some IDCTs will be impacted negativly as the non zero terms will prevent the skiping of some significant code as well as information about how much PSNR improves (to the encoder input) Also the change is a +-1 in one spot before the IDCT, the IDCT is not bitexactly specified in MPEG-2 so one could think of this as a correct implementation followed by a IDCT that was sometimes +-1 off instead of spec non compliance Only after the benchmarks and PSNR is presented should we decide if this is a change we want thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB No great genius has ever existed without some touch of madness. -- Aristotle