aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-05-06 21:15:47 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-05-06 21:23:29 +0200
commit050b48f39783d7af05fc805fc4278a97941e7436 (patch)
tree9c4e8488954ed5e7b31b7477c68adfd71f4d3c53
parenta06f0cef5bd4bef57338e3396ea903a3d887a0e4 (diff)
parent6c5eac9a603a91a707d030d96ba97e2ef6b3ce50 (diff)
downloadffmpeg-050b48f39783d7af05fc805fc4278a97941e7436.tar.gz
Merge commit '6c5eac9a603a91a707d030d96ba97e2ef6b3ce50'
* commit '6c5eac9a603a91a707d030d96ba97e2ef6b3ce50': swscale: Remove unnecessary backslashes jpeg2000: Fix uninitialized data errors pointed out by valgrind/memcheck Conflicts: libavcodec/jpeg2000dec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/jpeg2000dec.c14
-rw-r--r--libswscale/yuv2rgb.c16
2 files changed, 15 insertions, 15 deletions
diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
index ac801edba8..ac69d7eb7a 100644
--- a/libavcodec/jpeg2000dec.c
+++ b/libavcodec/jpeg2000dec.c
@@ -635,13 +635,13 @@ static int jpeg2000_decode_packet(Jpeg2000DecoderContext *s,
Jpeg2000Cblk *cblk = prec->cblk + cblkno;
if (s->buf_end - s->buf < cblk->lengthinc)
return AVERROR(EINVAL);
- /* A code-block data can be empty. In that case initialize data
- * with 0xffff. */
- if (cblk->lengthinc > 0)
+ /* Code-block data can be empty. In that case initialize data
+ * with 0xFFFF. */
+ if (cblk->lengthinc > 0) {
bytestream_get_buffer(&s->buf, cblk->data, cblk->lengthinc);
- else {
- cblk->data[0] = 0xff;
- cblk->data[1] = 0xff;
+ } else {
+ cblk->data[0] = 0xFF;
+ cblk->data[1] = 0xFF;
}
cblk->length += cblk->lengthinc;
cblk->lengthinc = 0;
@@ -864,7 +864,7 @@ static int decode_cblk(Jpeg2000DecoderContext *s, Jpeg2000CodingStyle *codsty,
memset(t1->data[y], 0, width * sizeof(width));
/* If code-block contains no compressed data: nothing to do. */
- if (cblk->length == 0)
+ if (!cblk->length)
return 0;
for (y = 0; y < height + 2; y++)
memset(t1->flags[y], 0, (width + 2) * sizeof(width));
diff --git a/libswscale/yuv2rgb.c b/libswscale/yuv2rgb.c
index d12abda9a8..93800d2b74 100644
--- a/libswscale/yuv2rgb.c
+++ b/libswscale/yuv2rgb.c
@@ -276,8 +276,8 @@ YUV2RGBFUNC(yuva2rgba_c, uint32_t, 1)
LOADCHROMA(3);
PUTRGBA(dst_2, py_2, pa_1, 3, 24);
PUTRGBA(dst_1, py_1, pa_2, 3, 24);
- pa_1 += 8; \
- pa_2 += 8; \
+ pa_1 += 8;
+ pa_2 += 8;
ENDYUV2RGBLINE(8, 0)
LOADCHROMA(0);
PUTRGBA(dst_1, py_1, pa_1, 0, 24);
@@ -286,8 +286,8 @@ ENDYUV2RGBLINE(8, 0)
LOADCHROMA(1);
PUTRGBA(dst_2, py_2, pa_1, 1, 24);
PUTRGBA(dst_1, py_1, pa_2, 1, 24);
- pa_1 += 4; \
- pa_2 += 4; \
+ pa_1 += 4;
+ pa_2 += 4;
ENDYUV2RGBLINE(8, 1)
LOADCHROMA(0);
PUTRGBA(dst_1, py_1, pa_1, 0, 24);
@@ -310,8 +310,8 @@ YUV2RGBFUNC(yuva2argb_c, uint32_t, 1)
LOADCHROMA(3);
PUTRGBA(dst_2, py_2, pa_2, 3, 0);
PUTRGBA(dst_1, py_1, pa_1, 3, 0);
- pa_1 += 8; \
- pa_2 += 8; \
+ pa_1 += 8;
+ pa_2 += 8;
ENDYUV2RGBLINE(8, 0)
LOADCHROMA(0);
PUTRGBA(dst_1, py_1, pa_1, 0, 0);
@@ -320,8 +320,8 @@ ENDYUV2RGBLINE(8, 0)
LOADCHROMA(1);
PUTRGBA(dst_2, py_2, pa_2, 1, 0);
PUTRGBA(dst_1, py_1, pa_1, 1, 0);
- pa_1 += 4; \
- pa_2 += 4; \
+ pa_1 += 4;
+ pa_2 += 4;
ENDYUV2RGBLINE(8, 1)
LOADCHROMA(0);
PUTRGBA(dst_1, py_1, pa_1, 0, 0);