OLD | NEW |
1 /* | 1 /* |
2 * Electronic Arts Madcow Video Decoder | 2 * Electronic Arts Madcow Video Decoder |
3 * Copyright (c) 2007-2009 Peter Ross | 3 * Copyright (c) 2007-2009 Peter Ross |
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 28 matching lines...) Expand all Loading... |
39 #define MADk_TAG MKTAG('M', 'A', 'D', 'k') /* MAD i-frame */ | 39 #define MADk_TAG MKTAG('M', 'A', 'D', 'k') /* MAD i-frame */ |
40 #define MADm_TAG MKTAG('M', 'A', 'D', 'm') /* MAD p-frame */ | 40 #define MADm_TAG MKTAG('M', 'A', 'D', 'm') /* MAD p-frame */ |
41 #define MADe_TAG MKTAG('M', 'A', 'D', 'e') /* MAD lqp-frame */ | 41 #define MADe_TAG MKTAG('M', 'A', 'D', 'e') /* MAD lqp-frame */ |
42 | 42 |
43 typedef struct MadContext { | 43 typedef struct MadContext { |
44 MpegEncContext s; | 44 MpegEncContext s; |
45 AVFrame frame; | 45 AVFrame frame; |
46 AVFrame last_frame; | 46 AVFrame last_frame; |
47 void *bitstream_buf; | 47 void *bitstream_buf; |
48 unsigned int bitstream_buf_size; | 48 unsigned int bitstream_buf_size; |
49 DECLARE_ALIGNED_16(DCTELEM, block)[64]; | 49 DECLARE_ALIGNED(16, DCTELEM, block)[64]; |
50 } MadContext; | 50 } MadContext; |
51 | 51 |
52 static void bswap16_buf(uint16_t *dst, const uint16_t *src, int count) | 52 static void bswap16_buf(uint16_t *dst, const uint16_t *src, int count) |
53 { | 53 { |
54 int i; | 54 int i; |
55 for (i=0; i<count; i++) | 55 for (i=0; i<count; i++) |
56 dst[i] = bswap_16(src[i]); | 56 dst[i] = bswap_16(src[i]); |
57 } | 57 } |
58 | 58 |
59 static av_cold int decode_init(AVCodecContext *avctx) | 59 static av_cold int decode_init(AVCodecContext *avctx) |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 CODEC_TYPE_VIDEO, | 310 CODEC_TYPE_VIDEO, |
311 CODEC_ID_MAD, | 311 CODEC_ID_MAD, |
312 sizeof(MadContext), | 312 sizeof(MadContext), |
313 decode_init, | 313 decode_init, |
314 NULL, | 314 NULL, |
315 decode_end, | 315 decode_end, |
316 decode_frame, | 316 decode_frame, |
317 CODEC_CAP_DR1, | 317 CODEC_CAP_DR1, |
318 .long_name = NULL_IF_CONFIG_SMALL("Electronic Arts Madcow Video") | 318 .long_name = NULL_IF_CONFIG_SMALL("Electronic Arts Madcow Video") |
319 }; | 319 }; |
OLD | NEW |