mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-03 05:10:03 +02:00
avcodec/gdv: Optimize 2x scaling loop a little in gdv_decode_frame()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
6a4788e7b3
commit
510bd61941
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user