1 /*
2 * This file is part of FFmpeg.
3 *
4 * FFmpeg is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * FFmpeg is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with FFmpeg; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18
19 #ifndef AVCODEC_IDCTDSP_H
20 #define AVCODEC_IDCTDSP_H
21
22 #include <stdint.h>
23
24 #include "config.h"
25
27
35 };
36
38 const uint8_t permutation[64]);
43
45 /* pixel ops : interface with DCT */
47 uint8_t *av_restrict pixels /* align 8 */,
48 ptrdiff_t line_size);
50 uint8_t *av_restrict pixels /* align 8 */,
51 ptrdiff_t line_size);
53 uint8_t *av_restrict pixels /* align 8 */,
54 ptrdiff_t line_size);
55
57
58 /**
59 * block -> idct -> clip to unsigned 8 bit -> dest.
60 * (-1392, 0, 0, ...) -> idct -> (-174, -174, ...) -> put -> (0, 0, ...)
61 * @param line_size size in bytes of a horizontal line of dest
62 */
64 ptrdiff_t line_size, int16_t *
block /* align 16 */);
65
66 /**
67 * block -> idct -> add dest -> clip to unsigned 8 bit -> dest.
68 * @param line_size size in bytes of a horizontal line of dest
69 */
71 ptrdiff_t line_size, int16_t *
block /* align 16 */);
72
73 /**
74 * IDCT input permutation.
75 * Several optimized IDCTs need a permutated input (relative to the
76 * normal order of the reference IDCT).
77 * This permutation must be performed before the idct_put/add.
78 * Note, normally this can be merged with the zigzag/alternate scan<br>
79 * An example to avoid confusion:
80 * - (->decode coeffs -> zigzag reorder -> dequant -> reference IDCT -> ...)
81 * - (x -> reference DCT -> reference IDCT -> x)
82 * - (x -> reference DCT -> simple_mmx_perm = idct_permutation
83 * -> simple_idct_mmx -> x)
84 * - (-> decode coeffs -> zigzag reorder -> simple_mmx_perm -> dequant
85 * -> simple_idct_mmx -> ...)
86 */
89
92
94 ptrdiff_t line_size);
96 ptrdiff_t line_size);
97
99
101 unsigned high_bit_depth);
103 unsigned high_bit_depth);
105 unsigned high_bit_depth);
107 unsigned high_bit_depth);
109 unsigned high_bit_depth);
111 unsigned high_bit_depth);
113 unsigned high_bit_depth);
115 unsigned high_bit_depth);
116
117 #endif /* AVCODEC_IDCTDSP_H */