Commit 510bd619 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/gdv: Optimize 2x scaling loop a little in gdv_decode_frame()

Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 6a4788e7
......@@ -481,8 +481,12 @@ static int gdv_decode_frame(AVCodecContext *avctx, void *data,
if (!gdv->scale_v) {
memcpy(dst + didx, gdv->frame + sidx, avctx->width);
} else {
for (x = 0; x < avctx->width; x++) {
dst[didx + x] = gdv->frame[sidx + x/2];
for (x = 0; x < avctx->width - 1; x+=2) {
dst[didx + x ] =
dst[didx + x + 1] = gdv->frame[sidx + (x>>1)];
}
for (; x < avctx->width; x++) {
dst[didx + x] = gdv->frame[sidx + (x>>1)];
}
}
if (!gdv->scale_h || ((y & 1) == 1)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment