Mercurial > libavcodec.hg
comparison faxcompr.c @ 8483:c8113e1e91c0 libavcodec
Move sync line pointers code to the end of the loop, it is simpler that way.
| author | michael |
|---|---|
| date | Fri, 26 Dec 2008 17:04:31 +0000 |
| parents | ff23c1a249b2 |
| children | 6fdb5b053d4b |
comparison
equal
deleted
inserted
replaced
| 8482:ff23c1a249b2 | 8483:c8113e1e91c0 |
|---|---|
| 167 while(offs < width){ | 167 while(offs < width){ |
| 168 int cmode = get_vlc2(gb, ccitt_group3_2d_vlc.table, 9, 1); | 168 int cmode = get_vlc2(gb, ccitt_group3_2d_vlc.table, 9, 1); |
| 169 if(cmode == -1){ | 169 if(cmode == -1){ |
| 170 av_log(avctx, AV_LOG_ERROR, "Incorrect mode VLC\n"); | 170 av_log(avctx, AV_LOG_ERROR, "Incorrect mode VLC\n"); |
| 171 return -1; | 171 return -1; |
| 172 } | |
| 173 //sync line pointers | |
| 174 if(runs != run_start)while(run_off <= offs){ | |
| 175 run_off += *ref++; | |
| 176 run_off += *ref++; | |
| 177 } | 172 } |
| 178 if(!cmode){//pass mode | 173 if(!cmode){//pass mode |
| 179 run_off += *ref++; | 174 run_off += *ref++; |
| 180 run = run_off - offs; | 175 run = run_off - offs; |
| 181 run_off += *ref++; | 176 run_off += *ref++; |
| 232 return -1; | 227 return -1; |
| 233 } | 228 } |
| 234 saved_run = 0; | 229 saved_run = 0; |
| 235 mode = !mode; | 230 mode = !mode; |
| 236 } | 231 } |
| 232 //sync line pointers | |
| 233 while(run_off <= offs){ | |
| 234 run_off += *ref++; | |
| 235 run_off += *ref++; | |
| 236 } | |
| 237 } | 237 } |
| 238 *runs++ = saved_run; | 238 *runs++ = saved_run; |
| 239 *runs++ = 0; | 239 *runs++ = 0; |
| 240 return 0; | 240 return 0; |
| 241 } | 241 } |
