diff --git a/libavfilter/vf_stereo3d.c b/libavfilter/vf_stereo3d.c index 3222d8ec20..de884a8696 100644 --- a/libavfilter/vf_stereo3d.c +++ b/libavfilter/vf_stereo3d.c @@ -899,37 +899,37 @@ copy: switch (s->pixstep[i]) { case 1: - for (x = 0, b = 0, p = 0; x < s->linesize[i] * 2; x+=2, p++, b++) { + for (x = 0, b = 0, p = 0; x < s->linesize[i] * 2; x+=2, p++, b+=2) { dst[x ] = b&1 ? left[p] : right[p]; dst[x+1] = !(b&1) ? left[p] : right[p]; } break; case 2: - for (x = 0, b = 0, p = 0; x < s->linesize[i] * 2; x+=4, p+=2, b++) { + for (x = 0, b = 0, p = 0; x < s->linesize[i] * 2; x+=4, p+=2, b+=2) { AV_WN16(&dst[x ], b&1 ? AV_RN16(&left[p]) : AV_RN16(&right[p])); AV_WN16(&dst[x+2], !(b&1) ? AV_RN16(&left[p]) : AV_RN16(&right[p])); } break; case 3: - for (x = 0, b = 0, p = 0; x < s->linesize[i] * 2; x+=6, p+=3, b++) { + for (x = 0, b = 0, p = 0; x < s->linesize[i] * 2; x+=6, p+=3, b+=2) { AV_WB24(&dst[x ], b&1 ? AV_RB24(&left[p]) : AV_RB24(&right[p])); AV_WB24(&dst[x+3], !(b&1) ? AV_RB24(&left[p]) : AV_RB24(&right[p])); } break; case 4: - for (x = 0, b = 0, p = 0; x < s->linesize[i] * 2; x+=8, p+=4, b++) { + for (x = 0, b = 0, p = 0; x < s->linesize[i] * 2; x+=8, p+=4, b+=2) { AV_WN32(&dst[x ], b&1 ? AV_RN32(&left[p]) : AV_RN32(&right[p])); AV_WN32(&dst[x+4], !(b&1) ? AV_RN32(&left[p]) : AV_RN32(&right[p])); } break; case 6: - for (x = 0, b = 0, p = 0; x < s->linesize[i] * 2; x+=12, p+=6, b++) { + for (x = 0, b = 0, p = 0; x < s->linesize[i] * 2; x+=12, p+=6, b+=2) { AV_WB48(&dst[x ], b&1 ? AV_RB48(&left[p]) : AV_RB48(&right[p])); AV_WB48(&dst[x+6], !(b&1) ? AV_RB48(&left[p]) : AV_RB48(&right[p])); } break; case 8: - for (x = 0, b = 0, p = 0; x < s->linesize[i] * 2; x+=16, p+=8, b++) { + for (x = 0, b = 0, p = 0; x < s->linesize[i] * 2; x+=16, p+=8, b+=2) { AV_WN64(&dst[x ], b&1 ? AV_RN64(&left[p]) : AV_RN64(&right[p])); AV_WN64(&dst[x+8], !(b&1) ? AV_RN64(&left[p]) : AV_RN64(&right[p])); }