[MPlayer-dev-eng] possible bugs in vf_decimate filter

Loren Merritt lorenm at u.washington.edu
Sun Oct 15 22:51:00 CEST 2006


On Sun, 15 Oct 2006, Rich Felker wrote:

> I'm the author so I'll comment.
>
> On Sat, Oct 14, 2006 at 07:09:32AM -0700, Trent Piepho wrote:
>> The decimate filter calculates 8x8 SADs over the image.  The loop that
>> calls the SAD function increments x and y by 4 each time, rather than 8.
>> This means all the pixels, except for the outer four, are included in four
>> SAD calculations instead of one.
>
> This is intentional. Ideally it would increment by 1 each time, but
> that would be much slower and not much more accurate. The idea is to
> look for maximal change over _any_ 8x8 block, not just
> aligned-to-8-pixels 8x8 blocks.

OK, but it would be faster to calculate non-overlapping 4x4 blocks, and 
then add 4 adjacent block sums.

--Loren Merritt



More information about the MPlayer-dev-eng mailing list