diff options
Diffstat (limited to 'contrib/ffmpeg/libavcodec/qtrle.c')
-rw-r--r-- | contrib/ffmpeg/libavcodec/qtrle.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/contrib/ffmpeg/libavcodec/qtrle.c b/contrib/ffmpeg/libavcodec/qtrle.c index d4b314d03..415f08098 100644 --- a/contrib/ffmpeg/libavcodec/qtrle.c +++ b/contrib/ffmpeg/libavcodec/qtrle.c @@ -29,7 +29,7 @@ * The QT RLE decoder has seven modes of operation: * 1, 2, 4, 8, 16, 24, and 32 bits per pixel. For modes 1, 2, 4, and 8 * the decoder outputs PAL8 colorspace data. 16-bit data yields RGB555 - * data. 24-bit data is RGB24 and 32-bit data is RGBA32. + * data. 24-bit data is RGB24 and 32-bit data is RGB32. */ #include <stdio.h> @@ -96,15 +96,15 @@ static void qtrle_decode_4bpp(QtrleContext *s) /* fetch the header */ CHECK_STREAM_PTR(2); - header = BE_16(&s->buf[stream_ptr]); + header = AV_RB16(&s->buf[stream_ptr]); stream_ptr += 2; /* if a header is present, fetch additional decoding parameters */ if (header & 0x0008) { CHECK_STREAM_PTR(8); - start_line = BE_16(&s->buf[stream_ptr]); + start_line = AV_RB16(&s->buf[stream_ptr]); stream_ptr += 4; - lines_to_change = BE_16(&s->buf[stream_ptr]); + lines_to_change = AV_RB16(&s->buf[stream_ptr]); stream_ptr += 4; } else { start_line = 0; @@ -187,15 +187,15 @@ static void qtrle_decode_8bpp(QtrleContext *s) /* fetch the header */ CHECK_STREAM_PTR(2); - header = BE_16(&s->buf[stream_ptr]); + header = AV_RB16(&s->buf[stream_ptr]); stream_ptr += 2; /* if a header is present, fetch additional decoding parameters */ if (header & 0x0008) { CHECK_STREAM_PTR(8); - start_line = BE_16(&s->buf[stream_ptr]); + start_line = AV_RB16(&s->buf[stream_ptr]); stream_ptr += 4; - lines_to_change = BE_16(&s->buf[stream_ptr]); + lines_to_change = AV_RB16(&s->buf[stream_ptr]); stream_ptr += 4; } else { start_line = 0; @@ -269,15 +269,15 @@ static void qtrle_decode_16bpp(QtrleContext *s) /* fetch the header */ CHECK_STREAM_PTR(2); - header = BE_16(&s->buf[stream_ptr]); + header = AV_RB16(&s->buf[stream_ptr]); stream_ptr += 2; /* if a header is present, fetch additional decoding parameters */ if (header & 0x0008) { CHECK_STREAM_PTR(8); - start_line = BE_16(&s->buf[stream_ptr]); + start_line = AV_RB16(&s->buf[stream_ptr]); stream_ptr += 4; - lines_to_change = BE_16(&s->buf[stream_ptr]); + lines_to_change = AV_RB16(&s->buf[stream_ptr]); stream_ptr += 4; } else { start_line = 0; @@ -299,7 +299,7 @@ static void qtrle_decode_16bpp(QtrleContext *s) /* decode the run length code */ rle_code = -rle_code; CHECK_STREAM_PTR(2); - rgb16 = BE_16(&s->buf[stream_ptr]); + rgb16 = AV_RB16(&s->buf[stream_ptr]); stream_ptr += 2; CHECK_PIXEL_PTR(rle_code * 2); @@ -314,7 +314,7 @@ static void qtrle_decode_16bpp(QtrleContext *s) /* copy pixels directly to output */ while (rle_code--) { - rgb16 = BE_16(&s->buf[stream_ptr]); + rgb16 = AV_RB16(&s->buf[stream_ptr]); stream_ptr += 2; *(unsigned short *)(&rgb[pixel_ptr]) = rgb16; pixel_ptr += 2; @@ -347,15 +347,15 @@ static void qtrle_decode_24bpp(QtrleContext *s) /* fetch the header */ CHECK_STREAM_PTR(2); - header = BE_16(&s->buf[stream_ptr]); + header = AV_RB16(&s->buf[stream_ptr]); stream_ptr += 2; /* if a header is present, fetch additional decoding parameters */ if (header & 0x0008) { CHECK_STREAM_PTR(8); - start_line = BE_16(&s->buf[stream_ptr]); + start_line = AV_RB16(&s->buf[stream_ptr]); stream_ptr += 4; - lines_to_change = BE_16(&s->buf[stream_ptr]); + lines_to_change = AV_RB16(&s->buf[stream_ptr]); stream_ptr += 4; } else { start_line = 0; @@ -427,15 +427,15 @@ static void qtrle_decode_32bpp(QtrleContext *s) /* fetch the header */ CHECK_STREAM_PTR(2); - header = BE_16(&s->buf[stream_ptr]); + header = AV_RB16(&s->buf[stream_ptr]); stream_ptr += 2; /* if a header is present, fetch additional decoding parameters */ if (header & 0x0008) { CHECK_STREAM_PTR(8); - start_line = BE_16(&s->buf[stream_ptr]); + start_line = AV_RB16(&s->buf[stream_ptr]); stream_ptr += 4; - lines_to_change = BE_16(&s->buf[stream_ptr]); + lines_to_change = AV_RB16(&s->buf[stream_ptr]); stream_ptr += 4; } else { start_line = 0; @@ -515,7 +515,7 @@ static int qtrle_decode_init(AVCodecContext *avctx) break; case 32: - avctx->pix_fmt = PIX_FMT_RGBA32; + avctx->pix_fmt = PIX_FMT_RGB32; break; default: |