Commit 4d74fb4a authored by michael's avatar michael

Avoid negation in put_line().


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@16327 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 2b8988bf
......@@ -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);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment