| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Microsoft RLE decoder | 2 * Microsoft RLE decoder |
| 3 * Copyright (C) 2008 Konstantin Shishkov | 3 * Copyright (C) 2008 Konstantin Shishkov |
| 4 * | 4 * |
| 5 * This file is part of FFmpeg. | 5 * This file is part of FFmpeg. |
| 6 * | 6 * |
| 7 * FFmpeg is free software; you can redistribute it and/or | 7 * FFmpeg is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Lesser General Public | 8 * modify it under the terms of the GNU Lesser General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2.1 of the License, or (at your option) any later version. | 10 * version 2.1 of the License, or (at your option) any later version. |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 | 21 |
| 22 /** | 22 /** |
| 23 * @file libavcodec/msrledec.c | 23 * @file libavcodec/msrledec.c |
| 24 * MS RLE decoder based on decoder by Mike Melanson and my own for TSCC | 24 * MS RLE decoder based on decoder by Mike Melanson and my own for TSCC |
| 25 * For more information about the MS RLE format, visit: | 25 * For more information about the MS RLE format, visit: |
| 26 * http://www.multimedia.cx/msrle.txt | 26 * http://www.multimedia.cx/msrle.txt |
| 27 */ | 27 */ |
| 28 | 28 |
| 29 #include "libavutil/intreadwrite.h" | 29 #include "libavutil/intreadwrite.h" |
| 30 #include "avcodec.h" | 30 #include "avcodec.h" |
| 31 #include "msrledec.h" |
| 31 | 32 |
| 32 #define FETCH_NEXT_STREAM_BYTE() \ | 33 #define FETCH_NEXT_STREAM_BYTE() \ |
| 33 if (stream_ptr >= data_size) \ | 34 if (stream_ptr >= data_size) \ |
| 34 { \ | 35 { \ |
| 35 av_log(avctx, AV_LOG_ERROR, " MS RLE: stream ptr just went out of bounds (
1)\n"); \ | 36 av_log(avctx, AV_LOG_ERROR, " MS RLE: stream ptr just went out of bounds (
1)\n"); \ |
| 36 return -1; \ | 37 return -1; \ |
| 37 } \ | 38 } \ |
| 38 stream_byte = data[stream_ptr++]; | 39 stream_byte = data[stream_ptr++]; |
| 39 | 40 |
| 40 static int msrle_decode_pal4(AVCodecContext *avctx, AVPicture *pic, | 41 static int msrle_decode_pal4(AVCodecContext *avctx, AVPicture *pic, |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 case 16: | 251 case 16: |
| 251 case 24: | 252 case 24: |
| 252 case 32: | 253 case 32: |
| 253 return msrle_decode_8_16_24_32(avctx, pic, depth, data, data_size); | 254 return msrle_decode_8_16_24_32(avctx, pic, depth, data, data_size); |
| 254 default: | 255 default: |
| 255 av_log(avctx, AV_LOG_ERROR, "Unknown depth %d\n", depth); | 256 av_log(avctx, AV_LOG_ERROR, "Unknown depth %d\n", depth); |
| 256 return -1; | 257 return -1; |
| 257 } | 258 } |
| 258 } | 259 } |
| 259 | 260 |
| OLD | NEW |