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");
92 for (i = 0; i < 8; i++) {
93 pixels[0] = av_clip_uint8(block[0]);
94 pixels[1] = av_clip_uint8(block[1]);
95 pixels[2] = av_clip_uint8(block[2]);
96 pixels[3] = av_clip_uint8(block[3]);
97 pixels[4] = av_clip_uint8(block[4]);
98 pixels[5] = av_clip_uint8(block[5]);
99 pixels[6] = av_clip_uint8(block[6]);
100 pixels[7] = av_clip_uint8(block[7]);
114 pixels[0] = av_clip_uint8(block[0]);
115 pixels[1] = av_clip_uint8(block[1]);
116 pixels[2] = av_clip_uint8(block[2]);
117 pixels[3] = av_clip_uint8(block[3]);
131 pixels[0] = av_clip_uint8(block[0]);
132 pixels[1] = av_clip_uint8(block[1]);
145 for (i = 0; i < 8; i++) {
146 for (j = 0; j < 8; j++) {
149 else if (*block > 127)
152 *pixels = (
uint8_t) (*block + 128);
156 pixels += (line_size - 8);
166 for (i = 0; i < 8; i++) {
167 pixels[0] = av_clip_uint8(pixels[0] + block[0]);
168 pixels[1] = av_clip_uint8(pixels[1] + block[1]);
169 pixels[2] = av_clip_uint8(pixels[2] + block[2]);
170 pixels[3] = av_clip_uint8(pixels[3] + block[3]);
171 pixels[4] = av_clip_uint8(pixels[4] + block[4]);
172 pixels[5] = av_clip_uint8(pixels[5] + block[5]);
173 pixels[6] = av_clip_uint8(pixels[6] + block[6]);
174 pixels[7] = av_clip_uint8(pixels[7] + block[7]);
187 pixels[0] = av_clip_uint8(pixels[0] + block[0]);
188 pixels[1] = av_clip_uint8(pixels[1] + block[1]);
189 pixels[2] = av_clip_uint8(pixels[2] + block[2]);
190 pixels[3] = av_clip_uint8(pixels[3] + block[3]);
203 pixels[0] = av_clip_uint8(pixels[0] + block[0]);
204 pixels[1] = av_clip_uint8(pixels[1] + block[1]);
234 dest[0] = av_clip_uint8((block[0] + 4)>>3);
238 dest[0] = av_clip_uint8(dest[0] + ((block[0] + 4)>>3));
250 }
else if (avctx->
lowres==2) {
255 }
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)
void(* put_signed_pixels_clamped)(const int16_t *block, uint8_t *pixels, ptrdiff_t line_size)
void(* ff_put_pixels_clamped)(const int16_t *block, uint8_t *pixels, ptrdiff_t line_size)
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_10(uint8_t *dest, int line_size, int16_t *block)
int bits_per_raw_sample
Bits per sample/pixel of internal libavcodec pixel/sample format.
void ff_simple_idct_add_12(uint8_t *dest, int line_size, int16_t *block)
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(* ff_add_pixels_clamped)(const int16_t *block, uint8_t *pixels, ptrdiff_t line_size)
static av_cold int end(AVCodecContext *avctx)
void(* put_pixels_clamped)(const int16_t *block, uint8_t *pixels, ptrdiff_t line_size)
static void put_signed_pixels_clamped_c(const int16_t *block, uint8_t *av_restrict pixels, ptrdiff_t line_size)
const uint8_t * scantable
void ff_simple_idct_put_10(uint8_t *dest, int line_size, int16_t *block)
int lowres
low resolution decoding, 1-> 1/2 size, 2->1/4 size
av_cold void ff_xvid_idct_init(IDCTDSPContext *c, AVCodecContext *avctx)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static void ff_jref_idct4_add(uint8_t *dest, int line_size, int16_t *block)
static void ff_jref_idct4_put(uint8_t *dest, int line_size, int16_t *block)
void ff_jref_idct_add(uint8_t *dest, int line_size, int16_t *block)
void ff_idctdsp_init_mips(IDCTDSPContext *c, AVCodecContext *avctx, unsigned high_bit_depth)
void ff_faanidct_put(uint8_t *dest, int line_size, int16_t block[64])
void(* add_pixels_clamped)(const int16_t *block, uint8_t *pixels, ptrdiff_t line_size)
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.
typedef void(APIENTRY *FF_PFNGLACTIVETEXTUREPROC)(GLenum texture)
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)
static void ff_jref_idct1_add(uint8_t *dest, int line_size, int16_t *block)
void(* idct_add)(uint8_t *dest, int line_size, int16_t *block)
block -> idct -> add dest -> clip to unsigned 8 bit -> dest.
void ff_simple_idct_10(int16_t *block)
static void ff_jref_idct1_put(uint8_t *dest, int line_size, int16_t *block)
void ff_j_rev_dct1(int16_t *data)
void(* idct_put)(uint8_t *dest, int line_size, int16_t *block)
block -> idct -> clip to unsigned 8 bit -> dest.
void ff_j_rev_dct(int16_t *data)
static void add_pixels_clamped_c(const int16_t *block, uint8_t *av_restrict pixels, ptrdiff_t line_size)
Libavcodec external API header.
void ff_jref_idct_put(uint8_t *dest, int line_size, int16_t *block)
void ff_simple_idct_put_12(uint8_t *dest, int line_size, int16_t *block)
main external API structure.
void ff_simple_idct_12(int16_t *block)
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)
static void ff_jref_idct2_add(uint8_t *dest, int line_size, int16_t *block)
void ff_j_rev_dct2(int16_t *data)
void ff_simple_idct_add_8(uint8_t *dest, int line_size, int16_t *block)
common internal and external API header
void ff_simple_idct_put_8(uint8_t *dest, int 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_faanidct_add(uint8_t *dest, int line_size, int16_t block[64])
static void ff_jref_idct2_put(uint8_t *dest, int line_size, int16_t *block)
static void put_pixels_clamped_c(const int16_t *block, uint8_t *av_restrict pixels, ptrdiff_t line_size)
void ff_simple_idct_8(int16_t *block)
enum idct_permutation_type perm_type
void(* idct)(int16_t *block)