Mercurial > libavcodec.hg
comparison qtrle.c @ 1881:39ad6cd5d4a6 libavcodec
remove numerous definitions of BE_*/LE_* macros; convert FOURCC_TAG ->
MKTAG/MKBETAG
author | melanson |
---|---|
date | Sun, 14 Mar 2004 04:04:08 +0000 |
parents | 9d860b33fd54 |
children | 19c713e14316 |
comparison
equal
deleted
inserted
replaced
1880:56ccec0d08bd | 1881:39ad6cd5d4a6 |
---|---|
24 * For more information about the QT RLE format, visit: | 24 * For more information about the QT RLE format, visit: |
25 * http://www.pcisys.net/~melanson/codecs/ | 25 * http://www.pcisys.net/~melanson/codecs/ |
26 * | 26 * |
27 * The QT RLE decoder has seven modes of operation: | 27 * The QT RLE decoder has seven modes of operation: |
28 * 1, 2, 4, 8, 16, 24, and 32 bits per pixel. For modes 1, 2, 4, and 8 | 28 * 1, 2, 4, 8, 16, 24, and 32 bits per pixel. For modes 1, 2, 4, and 8 |
29 * the decoder outputs PAL8 colorspace data. 16-bit data yields RGB24 | 29 * the decoder outputs PAL8 colorspace data. 16-bit data yields RGB555 |
30 * data. 24-bit data is RGB888 and 32-bit data is RGBA32. | 30 * data. 24-bit data is RGB24 and 32-bit data is RGBA32. |
31 */ | 31 */ |
32 | 32 |
33 #include <stdio.h> | 33 #include <stdio.h> |
34 #include <stdlib.h> | 34 #include <stdlib.h> |
35 #include <string.h> | 35 #include <string.h> |
47 | 47 |
48 unsigned char *buf; | 48 unsigned char *buf; |
49 int size; | 49 int size; |
50 | 50 |
51 } QtrleContext; | 51 } QtrleContext; |
52 | |
53 #define BE_16(x) ((((uint8_t*)(x))[0] << 8) | ((uint8_t*)(x))[1]) | |
54 | 52 |
55 #define CHECK_STREAM_PTR(n) \ | 53 #define CHECK_STREAM_PTR(n) \ |
56 if ((stream_ptr + n) > s->size) { \ | 54 if ((stream_ptr + n) > s->size) { \ |
57 av_log (s->avctx, AV_LOG_INFO, "Problem: stream_ptr out of bounds (%d >= %d)\n", \ | 55 av_log (s->avctx, AV_LOG_INFO, "Problem: stream_ptr out of bounds (%d >= %d)\n", \ |
58 stream_ptr + n, s->size); \ | 56 stream_ptr + n, s->size); \ |