Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-05-07 04:38:13 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2016-05-07 05:42:52 +0300
commitcbe265ccd714d4be7aee8d48afe0716ddfb0b50d (patch)
tree220c97f99ca2fa07049f344812fbe12782b78fa4 /libavcodec/m101.c
parent03fceb771cee27765f6356650f3e7cb9ce170e5f (diff)
avcodec/m101: Simplify if() condition
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/m101.c')
-rw-r--r--libavcodec/m101.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/m101.c b/libavcodec/m101.c
index 93b241731a..2b9b8b89d3 100644
--- a/libavcodec/m101.c
+++ b/libavcodec/m101.c
@@ -88,12 +88,12 @@ static int m101_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
const uint8_t *buf_src = buf + src_y*stride + 40*block;
for (x = 0; x < 16 && x + 16*block < avctx->width; x++) {
int xd = x + 16*block;
- if (!(x&1)) {
+ if (x&1) {
+ luma [xd] = (4*buf_src[2*x + 0]) + ((buf_src[32 + (x>>1)]>>4)&3);
+ } else {
luma [xd] = (4*buf_src[2*x + 0]) + (buf_src[32 + (x>>1)] &3);
cb[xd>>1] = (4*buf_src[2*x + 1]) + ((buf_src[32 + (x>>1)]>>2)&3);
cr[xd>>1] = (4*buf_src[2*x + 3]) + (buf_src[32 + (x>>1)]>>6);
- } else {
- luma [xd] = (4*buf_src[2*x + 0]) + ((buf_src[32 + (x>>1)]>>4)&3);
}
}
}