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

2018-04-28 Thread Rostislav Pehlivanov
On 28 April 2018 at 12:34, Carl Eugen Hoyos wrote: > 2018-04-28 13:11 GMT+02:00, Rostislav Pehlivanov : > > > I'd say just remove it, it'll bitrot otherwise since no one will use it. > > Not all mpeg decoders are bit-exact and the date of the functions > indicate they are used for such decoders.

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

2018-04-28 Thread Carl Eugen Hoyos
2018-04-28 13:11 GMT+02:00, Rostislav Pehlivanov : > I'd say just remove it, it'll bitrot otherwise since no one will use it. Not all mpeg decoders are bit-exact and the date of the functions indicate they are used for such decoders. Carl Eugen ___ ffm

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

2018-04-28 Thread Rostislav Pehlivanov
On 28 April 2018 at 10:42, Hendrik Leppkes wrote: > On Sat, Apr 28, 2018 at 10:44 AM, 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 o

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

2018-04-28 Thread Hendrik Leppkes
On Sat, Apr 28, 2018 at 10:44 AM, 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

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

2018-04-28 Thread Michael Niedermayer
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 erro

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

2018-04-28 Thread Jerome Borsboom
> 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

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

2018-04-27 Thread Michael Niedermayer
On Fri, Apr 27, 2018 at 04:47:13PM +0200, Jerome Borsboom wrote: > The assembly optimized half pel interpolation in some cases rounds the > interpolated value when no rounding is requested. The result is a off by one > error when one of the pixel values is zero. > > Signed-off-by: Jerome Borsboom

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

2018-04-27 Thread Henrik Gramner
On Fri, Apr 27, 2018 at 4:47 PM, Jerome Borsboom wrote: > In the put_no_rnd_pixels functions, the psubusb instruction subtracts one > from each > unsigned byte to correct for the rouding that the PAVGB instruction performs. > The psubusb > instruction, however, uses saturation when the value doe

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

2018-04-27 Thread Carl Eugen Hoyos
2018-04-27 16:47 GMT+02:00, Jerome Borsboom : > The assembly optimized half pel interpolation in some cases rounds the > interpolated value when no rounding is requested. The result is a off by one > error when one of the pixel values is zero. See also: http://git.videolan.org/?p=ffmpeg.git;a=comm

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

2018-04-27 Thread Jerome Borsboom
The assembly optimized half pel interpolation in some cases rounds the interpolated value when no rounding is requested. The result is a off by one error when one of the pixel values is zero. Signed-off-by: Jerome Borsboom --- In the put_no_rnd_pixels functions, the psubusb instruction subtracts