| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Sony PlayStation MDEC (Motion DECoder) | 2 * Sony PlayStation MDEC (Motion DECoder) |
| 3 * Copyright (c) 2003 Michael Niedermayer | 3 * Copyright (c) 2003 Michael Niedermayer |
| 4 * | 4 * |
| 5 * based upon code from Sebastian Jedruszkiewicz <elf@frogger.rules.pl> | 5 * based upon code from Sebastian Jedruszkiewicz <elf@frogger.rules.pl> |
| 6 * | 6 * |
| 7 * This file is part of FFmpeg. | 7 * This file is part of FFmpeg. |
| 8 * | 8 * |
| 9 * FFmpeg is free software; you can redistribute it and/or | 9 * FFmpeg is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Lesser General Public | 10 * modify it under the terms of the GNU Lesser General Public |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 DSPContext dsp; | 38 DSPContext dsp; |
| 39 AVFrame picture; | 39 AVFrame picture; |
| 40 GetBitContext gb; | 40 GetBitContext gb; |
| 41 ScanTable scantable; | 41 ScanTable scantable; |
| 42 int version; | 42 int version; |
| 43 int qscale; | 43 int qscale; |
| 44 int last_dc[3]; | 44 int last_dc[3]; |
| 45 int mb_width; | 45 int mb_width; |
| 46 int mb_height; | 46 int mb_height; |
| 47 int mb_x, mb_y; | 47 int mb_x, mb_y; |
| 48 DECLARE_ALIGNED_16(DCTELEM, block)[6][64]; | 48 DECLARE_ALIGNED(16, DCTELEM, block)[6][64]; |
| 49 uint8_t *bitstream_buffer; | 49 uint8_t *bitstream_buffer; |
| 50 unsigned int bitstream_buffer_size; | 50 unsigned int bitstream_buffer_size; |
| 51 int block_last_index[6]; | 51 int block_last_index[6]; |
| 52 } MDECContext; | 52 } MDECContext; |
| 53 | 53 |
| 54 //very similar to MPEG-1 | 54 //very similar to MPEG-1 |
| 55 static inline int mdec_decode_block_intra(MDECContext *a, DCTELEM *block, int n) | 55 static inline int mdec_decode_block_intra(MDECContext *a, DCTELEM *block, int n) |
| 56 { | 56 { |
| 57 int level, diff, i, j, run; | 57 int level, diff, i, j, run; |
| 58 int component; | 58 int component; |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 sizeof(MDECContext), | 268 sizeof(MDECContext), |
| 269 decode_init, | 269 decode_init, |
| 270 NULL, | 270 NULL, |
| 271 decode_end, | 271 decode_end, |
| 272 decode_frame, | 272 decode_frame, |
| 273 CODEC_CAP_DR1 | CODEC_CAP_FRAME_THREADS, | 273 CODEC_CAP_DR1 | CODEC_CAP_FRAME_THREADS, |
| 274 .long_name= NULL_IF_CONFIG_SMALL("Sony PlayStation MDEC (Motion DECoder)"), | 274 .long_name= NULL_IF_CONFIG_SMALL("Sony PlayStation MDEC (Motion DECoder)"), |
| 275 .init_thread_copy= ONLY_IF_THREADS_ENABLED(decode_init_thread_copy) | 275 .init_thread_copy= ONLY_IF_THREADS_ENABLED(decode_init_thread_copy) |
| 276 }; | 276 }; |
| 277 | 277 |
| OLD | NEW |