]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/dxtory.c
avfilter/vf_scale: store the offset in a local variable before adding it
[ffmpeg] / libavcodec / dxtory.c
index bc95e0e7e102a90ec7fffb1ea6423d677887a8f2..914131e74249d9d6936b3958b06b2446a64cdf8c 100644 (file)
@@ -264,8 +264,8 @@ static int dxtory_decode_v1_420(AVCodecContext *avctx, AVFrame *pic,
             V[huvborder] = src[3] + 0x80;
             src += 4;
         }
-        Y1 += pic->linesize[0] << 1;
-        Y2 += pic->linesize[0] << 1;
+        Y1 += pic->linesize[0] * 2;
+        Y2 += pic->linesize[0] * 2;
         U  += pic->linesize[1];
         V  += pic->linesize[2];
     }
@@ -717,7 +717,7 @@ static int dx2_decode_slice_420(GetBitContext *gb, AVFrame *frame,
             V[huvborder] = decode_sym(gb, lru[2]) ^ 0x80;
         }
 
-        Y += ystride << 1;
+        Y += ystride * 2;
         U += ustride;
         V += vstride;
     }
@@ -876,7 +876,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
     return avpkt->size;
 }
 
-AVCodec ff_dxtory_decoder = {
+const AVCodec ff_dxtory_decoder = {
     .name           = "dxtory",
     .long_name      = NULL_IF_CONFIG_SMALL("Dxtory"),
     .type           = AVMEDIA_TYPE_VIDEO,