aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/qtrleenc.c
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2011-06-08 16:38:37 +0200
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2011-06-08 16:38:37 +0200
commit9e4cb03a93593f8ddb8b4ea3c7ee3bf8acb7ea21 (patch)
tree49724543ae4ba41977c593bacb423618b743a01a /libavcodec/qtrleenc.c
parentd552f616a26623e5b593e4d3474c61563f3939fd (diff)
downloadffmpeg-9e4cb03a93593f8ddb8b4ea3c7ee3bf8acb7ea21.tar.gz
Fix "mixed declarations and code" warnings.
Diffstat (limited to 'libavcodec/qtrleenc.c')
-rw-r--r--libavcodec/qtrleenc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/qtrleenc.c b/libavcodec/qtrleenc.c
index d43ff7b06b..6258b143ad 100644
--- a/libavcodec/qtrleenc.c
+++ b/libavcodec/qtrleenc.c
@@ -231,10 +231,11 @@ static void qtrle_encode_line(QtrleEncContext *s, AVFrame *p, int line, uint8_t
else if (rlecode > 0) {
/* bulk copy */
if (s->avctx->pix_fmt == PIX_FMT_GRAY8) {
+ int j;
// QT grayscale colorspace has 0=white and 255=black, we will
// ignore the palette that is included in the AVFrame because
// PIX_FMT_GRAY8 has defined color mapping
- for (int j = 0; j < rlecode*s->pixel_size; ++j)
+ for (j = 0; j < rlecode*s->pixel_size; ++j)
bytestream_put_byte(buf, *(this_line + i*s->pixel_size + j) ^ 0xff);
} else {
bytestream_put_buffer(buf, this_line + i*s->pixel_size, rlecode*s->pixel_size);
@@ -244,8 +245,9 @@ static void qtrle_encode_line(QtrleEncContext *s, AVFrame *p, int line, uint8_t
else {
/* repeat the bits */
if (s->avctx->pix_fmt == PIX_FMT_GRAY8) {
+ int j;
// QT grayscale colorspace has 0=white and 255=black, ...
- for (int j = 0; j < s->pixel_size; ++j)
+ for (j = 0; j < s->pixel_size; ++j)
bytestream_put_byte(buf, *(this_line + i*s->pixel_size + j) ^ 0xff);
} else {
bytestream_put_buffer(buf, this_line + i*s->pixel_size, s->pixel_size);