You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
lavfi/mp=decimate: fix off-by-one logic in diff_C() x loop
Set x offset values in the range 0-7, rather than in the range 8-1. The y loop is changed accordingly, to avoid confusion. This also fixes output difference with the new pending native decimate filter.
This commit is contained in:
@@ -82,8 +82,8 @@ static int diff_MMX(unsigned char *old, unsigned char *new, int os, int ns)
|
|||||||
static int diff_C(unsigned char *old, unsigned char *new, int os, int ns)
|
static int diff_C(unsigned char *old, unsigned char *new, int os, int ns)
|
||||||
{
|
{
|
||||||
int x, y, d=0;
|
int x, y, d=0;
|
||||||
for (y = 8; y; y--) {
|
for (y = 0; y < 8; y++) {
|
||||||
for (x = 8; x; x--) {
|
for (x = 0; x < 8; x++) {
|
||||||
d += abs(new[x] - old[x]);
|
d += abs(new[x] - old[x]);
|
||||||
}
|
}
|
||||||
new += ns;
|
new += ns;
|
||||||
|
Reference in New Issue
Block a user