[FFmpeg-cvslog] lavfi/gradfun: do not increment DC pointer for odd values.

Clément Bœsch git at videolan.org
Wed Dec 19 03:18:22 CET 2012


ffmpeg | branch: master | Clément Bœsch <ubitux at gmail.com> | Wed Dec  5 04:58:03 2012 +0100| [dd8a76ab080d6862ec8e182e805794ebb27be8b0] | committer: Clément Bœsch

lavfi/gradfun: do not increment DC pointer for odd values.

First DC is only used once otherwise. This also makes the code
consistent with ASM versions.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=dd8a76ab080d6862ec8e182e805794ebb27be8b0
---

 libavfilter/vf_gradfun.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/vf_gradfun.c b/libavfilter/vf_gradfun.c
index a9eeca5..9255f61 100644
--- a/libavfilter/vf_gradfun.c
+++ b/libavfilter/vf_gradfun.c
@@ -56,7 +56,7 @@ DECLARE_ALIGNED(16, static const uint16_t, dither)[8][8] = {
 void ff_gradfun_filter_line_c(uint8_t *dst, const uint8_t *src, const uint16_t *dc, int width, int thresh, const uint16_t *dithers)
 {
     int x;
-    for (x = 0; x < width; x++, dc += x & 1) {
+    for (x = 0; x < width; dc += x & 1, x++) {
         int pix = src[x] << 7;
         int delta = dc[0] - pix;
         int m = abs(delta) * thresh >> 16;



More information about the ffmpeg-cvslog mailing list