avcodec/gdv: Simplify first inner loop in rescale()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
pull/299/head
Michael Niedermayer 7 years ago
parent 6228ce0a33
commit d021729efc
  1. 3
      libavcodec/gdv.c

@ -85,8 +85,7 @@ static void rescale(GDVContext *gdv, uint8_t *dst, int w, int h, int scale_v, in
int y = h - j - 1;
uint8_t *dst1 = dst + PREAMBLE_SIZE + y * w;
uint8_t *src1 = dst + PREAMBLE_SIZE + (y>>!!gdv->scale_h) * (w>>1);
for (i = 0; i < w; i++) {
int x = w - i - 1;
for (x = w - 1; x >= 0; x--) {
dst1[x] = src1[(x>>1)];
}
}

Loading…
Cancel
Save