- int x;
- for (x = 0; x >> 3 < avctx->width * avctx->height; x += 8) {
- v = AV_RB64(&dst[x]);
- AV_WB64(&dst[x], v << 16 | v >> 48);
+ int x, y;
+ for (y = 0; y < avctx->height; y++) {
+ for (x = 0; x >> 3 < avctx->width; x += 8) {
+ v = AV_RB64(&dst[x]);
+ AV_WB64(&dst[x], v << 16 | v >> 48);
+ }
+ dst += frame->linesize[0];