[FFmpeg-devel] [PATCH] avcodec/x86/hpeldsp: fix half pel interpolation

Michael Niedermayer michael at niedermayer.cc
Sat Apr 28 12:41:59 EEST 2018

On Sat, Apr 28, 2018 at 10:44:54AM +0200, Jerome Borsboom wrote:
> > This patch is not correct.
> > 
> > this code is not used if AV_CODEC_FLAG_BITEXACT is set, because it is
> > not bit exact ...
> > 
> > Also the case where the off by 1 error occurs is a rare corner case,
> > Compared to the errors introduced by the IDCT this is not significant
> > 
> > If you want to optimize the bit exact version, feel free to do so.
> > It may be faster to use xor -1 before and after avg for this though
> Thank you for the review. VC-1 spec is defined bit exact, including the
> inverse transform. This code is used by the VC-1 decoder and as I was under
> the impression that the VC-1 decoder ought to be bit exact without any additional
> command line options, I tried to resolve the issue.

yes, thats a bug, this should not be used if the whole decoder is bitexactly defined

> As this code is guarded by AV_CODEC_FLAG_BITEXACT, i agree that the
> proposed solution is not appropriate. The underlying question remains though. Should
> the VC-1 decoder fully conform to spec or do we allow small deviations?

i think it should fully conform, this needs to be fixed
can you fix it so the decoder uses only bitexact functions ?
(i guess this should be easy by passing the appropriate flag to the init code,
 but didnt look if the API passes it as seperate argument of passes a context,
 with a context it may be cleanest to change the internal API ...)



Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

While the State exists there can be no freedom; when there is freedom there
will be no State. -- Vladimir Lenin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20180428/d3c8305d/attachment.sig>

More information about the ffmpeg-devel mailing list