summaryrefslogtreecommitdiff
path: root/libavcodec/faxcompr.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2008-12-26 13:50:00 +0000
committerMichael Niedermayer <michaelni@gmx.at>2008-12-26 13:50:00 +0000
commitbc0f7a9c75dc03f679849abe9254f133c9e4719f (patch)
tree20ce68603c2e8e852e3b54cd6aa4b612af4c56ed /libavcodec/faxcompr.c
parent4e60b64324c807eb7333f6586f4c2b38b83be835 (diff)
Avoid negation in put_line().
Originally committed as revision 16327 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/faxcompr.c')
-rw-r--r--libavcodec/faxcompr.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/faxcompr.c b/libavcodec/faxcompr.c
index 417e0b6cb9..f53c64b47b 100644
--- a/libavcodec/faxcompr.c
+++ b/libavcodec/faxcompr.c
@@ -232,19 +232,19 @@ static int decode_group3_2d_line(AVCodecContext *avctx, GetBitContext *gb,
static void put_line(uint8_t *dst, int size, int width, const int *runs)
{
PutBitContext pb;
- int run, mode = 1, pix_left = width, run_idx = 0;
+ int run, mode = ~0, pix_left = width, run_idx = 0;
init_put_bits(&pb, dst, size*8);
while(pix_left > 0){
run = runs[run_idx++];
- mode = !mode;
+ mode = ~mode;
if(!run){
continue;
}
pix_left -= run;
for(; run > 16; run -= 16)
- put_sbits(&pb, 16, -mode);
- put_sbits(&pb, run, -mode);
+ put_sbits(&pb, 16, mode);
+ put_sbits(&pb, run, mode);
}
}