36 for (i = 0; i < 64; i++) {
37 int j = src_scantable[i];
42 for (i = 0; i < 64; i++) {
62 for (i = 0; i < 64; i++)
63 idct_permutation[i] = i;
66 for (i = 0; i < 64; i++)
67 idct_permutation[i] = (i & 0x38) | ((i & 6) >> 1) | ((i & 1) << 2);
70 for (i = 0; i < 64; i++)
71 idct_permutation[i] = ((i & 7) << 3) | (i >> 3);
74 for (i = 0; i < 64; i++)
75 idct_permutation[i] = (i & 0x24) | ((i & 3) << 3) | ((i >> 3) & 3);
79 "Internal error, IDCT permutation not set\n");
89 for (i = 0; i < 8; i++) {
90 pixels[0] = av_clip_uint8(block[0]);
91 pixels[1] = av_clip_uint8(block[1]);
92 pixels[2] = av_clip_uint8(block[2]);
93 pixels[3] = av_clip_uint8(block[3]);
94 pixels[4] = av_clip_uint8(block[4]);
95 pixels[5] = av_clip_uint8(block[5]);
96 pixels[6] = av_clip_uint8(block[6]);
97 pixels[7] = av_clip_uint8(block[7]);
111 pixels[0] = av_clip_uint8(block[0]);
112 pixels[1] = av_clip_uint8(block[1]);
113 pixels[2] = av_clip_uint8(block[2]);
114 pixels[3] = av_clip_uint8(block[3]);
128 pixels[0] = av_clip_uint8(block[0]);
129 pixels[1] = av_clip_uint8(block[1]);
142 for (i = 0; i < 8; i++) {
143 for (j = 0; j < 8; j++) {
146 else if (*block > 127)
149 *pixels = (
uint8_t) (*block + 128);
153 pixels += (line_size - 8);
163 for (i = 0; i < 8; i++) {
164 pixels[0] = av_clip_uint8(pixels[0] + block[0]);
165 pixels[1] = av_clip_uint8(pixels[1] + block[1]);
166 pixels[2] = av_clip_uint8(pixels[2] + block[2]);
167 pixels[3] = av_clip_uint8(pixels[3] + block[3]);
168 pixels[4] = av_clip_uint8(pixels[4] + block[4]);
169 pixels[5] = av_clip_uint8(pixels[5] + block[5]);
170 pixels[6] = av_clip_uint8(pixels[6] + block[6]);
171 pixels[7] = av_clip_uint8(pixels[7] + block[7]);
184 pixels[0] = av_clip_uint8(pixels[0] + block[0]);
185 pixels[1] = av_clip_uint8(pixels[1] + block[1]);
186 pixels[2] = av_clip_uint8(pixels[2] + block[2]);
187 pixels[3] = av_clip_uint8(pixels[3] + block[3]);
200 pixels[0] = av_clip_uint8(pixels[0] + block[0]);
201 pixels[1] = av_clip_uint8(pixels[1] + block[1]);
231 dest[0] = av_clip_uint8((block[0] + 4)>>3);
235 dest[0] = av_clip_uint8(dest[0] + ((block[0] + 4)>>3));
247 }
else if (avctx->
lowres==2) {
252 }
else if (avctx->
lowres==3) {
void ff_idctdsp_init_x86(IDCTDSPContext *c, AVCodecContext *avctx, unsigned high_bit_depth)
int ff_init_scantable_permutation_x86(uint8_t *idct_permutation, enum idct_permutation_type perm_type)
static void put_pixels_clamped4_c(const int16_t *block, uint8_t *av_restrict pixels, int line_size)
void ff_j_rev_dct4(int16_t *data)
void ff_simple_idct_add_12(uint8_t *dest, ptrdiff_t line_size, int16_t *block)
void ff_faanidct_put(uint8_t *dest, ptrdiff_t line_size, int16_t block[64])
int bits_per_raw_sample
Bits per sample/pixel of internal libavcodec pixel/sample format.
Macro definitions for various function/variable attributes.
static void add_pixels_clamped4_c(const int16_t *block, uint8_t *av_restrict pixels, int line_size)
av_cold void ff_idctdsp_init_ppc(IDCTDSPContext *c, AVCodecContext *avctx, unsigned high_bit_depth)
void ff_faanidct(int16_t block[64])
void(* add_pixels_clamped)(const int16_t *block, uint8_t *av_restrict pixels, ptrdiff_t line_size)
static av_cold int end(AVCodecContext *avctx)
static void ff_jref_idct2_add(uint8_t *dest, ptrdiff_t line_size, int16_t *block)
static void put_signed_pixels_clamped_c(const int16_t *block, uint8_t *av_restrict pixels, ptrdiff_t line_size)
const uint8_t * scantable
int lowres
low resolution decoding, 1-> 1/2 size, 2->1/4 size
void(* put_pixels_clamped)(const int16_t *block, uint8_t *av_restrict pixels, ptrdiff_t line_size)
void ff_jref_idct_put(uint8_t *dest, ptrdiff_t line_size, int16_t *block)
void ff_add_pixels_clamped_c(const int16_t *block, uint8_t *av_restrict pixels, ptrdiff_t line_size)
av_cold void ff_xvid_idct_init(IDCTDSPContext *c, AVCodecContext *avctx)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
void ff_simple_idct_put_12(uint8_t *dest, ptrdiff_t line_size, int16_t *block)
void ff_simple_idct_add_10(uint8_t *dest, ptrdiff_t line_size, int16_t *block)
void ff_jref_idct_add(uint8_t *dest, ptrdiff_t line_size, int16_t *block)
void ff_idctdsp_init_mips(IDCTDSPContext *c, AVCodecContext *avctx, unsigned high_bit_depth)
void ff_faanidct_add(uint8_t *dest, ptrdiff_t line_size, int16_t block[64])
static void ff_jref_idct1_add(uint8_t *dest, ptrdiff_t line_size, int16_t *block)
av_cold void ff_init_scantable_permutation(uint8_t *idct_permutation, enum idct_permutation_type perm_type)
av_cold void ff_idctdsp_init_alpha(IDCTDSPContext *c, AVCodecContext *avctx, unsigned high_bit_depth)
int idct_algo
IDCT algorithm, see FF_IDCT_* below.
uint8_t idct_permutation[64]
IDCT input permutation.
static void put_pixels_clamped2_c(const int16_t *block, uint8_t *av_restrict pixels, int line_size)
void ff_simple_idct_10(int16_t *block)
void ff_put_pixels_clamped_c(const int16_t *block, uint8_t *av_restrict pixels, ptrdiff_t line_size)
void ff_j_rev_dct1(int16_t *data)
void ff_j_rev_dct(int16_t *data)
Libavcodec external API header.
void ff_simple_idct_put_10(uint8_t *dest, ptrdiff_t line_size, int16_t *block)
main external API structure.
void ff_simple_idct_12(int16_t *block)
static void ff_jref_idct4_put(uint8_t *dest, ptrdiff_t line_size, int16_t *block)
void(* idct_add)(uint8_t *dest, ptrdiff_t line_size, int16_t *block)
block -> idct -> add dest -> clip to unsigned 8 bit -> dest.
av_cold void ff_idctdsp_init_arm(IDCTDSPContext *c, AVCodecContext *avctx, unsigned high_bit_depth)
static void add_pixels_clamped2_c(const int16_t *block, uint8_t *av_restrict pixels, int line_size)
av_cold void ff_idctdsp_init_aarch64(IDCTDSPContext *c, AVCodecContext *avctx, unsigned high_bit_depth)
void ff_j_rev_dct2(int16_t *data)
static void ff_jref_idct4_add(uint8_t *dest, ptrdiff_t line_size, int16_t *block)
common internal and external API header
void(* put_signed_pixels_clamped)(const int16_t *block, uint8_t *av_restrict pixels, ptrdiff_t line_size)
void(* idct_put)(uint8_t *dest, ptrdiff_t line_size, int16_t *block)
block -> idct -> clip to unsigned 8 bit -> dest.
void ff_simple_idct_add_8(uint8_t *dest, ptrdiff_t line_size, int16_t *block)
av_cold void ff_init_scantable(uint8_t *permutation, ScanTable *st, const uint8_t *src_scantable)
av_cold void ff_idctdsp_init(IDCTDSPContext *c, AVCodecContext *avctx)
void ff_simple_idct_put_8(uint8_t *dest, ptrdiff_t line_size, int16_t *block)
static void ff_jref_idct2_put(uint8_t *dest, ptrdiff_t line_size, int16_t *block)
static void ff_jref_idct1_put(uint8_t *dest, ptrdiff_t line_size, int16_t *block)
void ff_simple_idct_8(int16_t *block)
enum idct_permutation_type perm_type
void(* idct)(int16_t *block)