Mercurial > libavcodec.hg
comparison iff.c @ 11124:85a1b00a2413 libavcodec
Use int8_t instead of char, the signedness of char can differ between systems.
| author | reimar |
|---|---|
| date | Fri, 12 Feb 2010 18:18:35 +0000 |
| parents | 9fe3b0dcd33d |
| children | 30856cadb01b |
comparison
equal
deleted
inserted
replaced
| 11123:d59349627f52 | 11124:85a1b00a2413 |
|---|---|
| 147 uint8_t *row = &frame->data[0][ y*frame->linesize[0] ]; | 147 uint8_t *row = &frame->data[0][ y*frame->linesize[0] ]; |
| 148 if (avctx->codec_tag == MKTAG('I','L','B','M')) { //interleaved | 148 if (avctx->codec_tag == MKTAG('I','L','B','M')) { //interleaved |
| 149 memset(row, 0, avctx->width); | 149 memset(row, 0, avctx->width); |
| 150 for (plane = 0; plane < avctx->bits_per_coded_sample; plane++) { | 150 for (plane = 0; plane < avctx->bits_per_coded_sample; plane++) { |
| 151 for(x = 0; x < planewidth && buf < buf_end; ) { | 151 for(x = 0; x < planewidth && buf < buf_end; ) { |
| 152 char value = *buf++; | 152 int8_t value = *buf++; |
| 153 int length; | 153 int length; |
| 154 if (value >= 0) { | 154 if (value >= 0) { |
| 155 length = value + 1; | 155 length = value + 1; |
| 156 imemcpy(row, buf, x, avctx->bits_per_coded_sample, plane, FFMIN3(length, buf_end - buf, planewidth - x)); | 156 imemcpy(row, buf, x, avctx->bits_per_coded_sample, plane, FFMIN3(length, buf_end - buf, planewidth - x)); |
| 157 buf += length; | 157 buf += length; |
| 164 x += length; | 164 x += length; |
| 165 } | 165 } |
| 166 } | 166 } |
| 167 } else { | 167 } else { |
| 168 for(x = 0; x < avctx->width && buf < buf_end; ) { | 168 for(x = 0; x < avctx->width && buf < buf_end; ) { |
| 169 char value = *buf++; | 169 int8_t value = *buf++; |
| 170 int length; | 170 int length; |
| 171 if (value >= 0) { | 171 if (value >= 0) { |
| 172 length = value + 1; | 172 length = value + 1; |
| 173 memcpy(row + x, buf, FFMIN3(length, buf_end - buf, avctx->width - x)); | 173 memcpy(row + x, buf, FFMIN3(length, buf_end - buf, avctx->width - x)); |
| 174 buf += length; | 174 buf += length; |
