Go to the documentation of this file.
20 #include "config_components.h"
31 const uint8_t permutation[64])
33 for (
int i = 0;
i < 64;
i++) {
35 dst[
i] = permutation[j];
52 for (
i = 0;
i < 64;
i++)
53 idct_permutation[
i] =
i;
56 for (
i = 0;
i < 64;
i++)
57 idct_permutation[
i] = (
i & 0x38) | ((
i & 6) >> 1) | ((
i & 1) << 2);
60 for (
i = 0;
i < 64;
i++)
61 idct_permutation[
i] = ((
i & 7) << 3) | (
i >> 3);
64 for (
i = 0;
i < 64;
i++)
65 idct_permutation[
i] = (
i & 0x24) | ((
i & 3) << 3) | ((
i >> 3) & 3);
69 "Internal error, IDCT permutation not set\n");
79 for (
i = 0;
i < 8;
i++) {
127 uint8_t *av_restrict pixels,
132 for (
i = 0;
i < 8;
i++) {
133 for (j = 0; j < 8; j++) {
136 else if (*
block > 127)
139 *pixels = (uint8_t) (*
block + 128);
143 pixels += (line_size - 8);
153 for (
i = 0;
i < 8;
i++) {
237 }
else if (avctx->
lowres==2) {
242 }
else if (avctx->
lowres==3) {
251 if (
c->mpeg4_studio_profile) {
void ff_simple_idct_put_int16_10bit(uint8_t *dest, ptrdiff_t line_size, int16_t *block)
static void add_pixels_clamped2_c(const int16_t *block, uint8_t *av_restrict pixels, int line_size)
static void ff_jref_idct1_put(uint8_t *dest, ptrdiff_t line_size, int16_t *block)
av_cold void ff_xvid_idct_init(IDCTDSPContext *c, AVCodecContext *avctx)
static void put_pixels_clamped2_c(const int16_t *block, uint8_t *av_restrict pixels, int line_size)
int ff_init_scantable_permutation_x86(uint8_t *idct_permutation, enum idct_permutation_type perm_type)
av_cold void ff_idctdsp_init_arm(IDCTDSPContext *c, AVCodecContext *avctx, unsigned high_bit_depth)
static void ff_jref_idct2_add(uint8_t *dest, ptrdiff_t line_size, int16_t *block)
static void ff_jref_idct4_add(uint8_t *dest, ptrdiff_t line_size, int16_t *block)
void ff_put_pixels_clamped_c(const int16_t *block, uint8_t *av_restrict pixels, ptrdiff_t line_size)
void ff_idctdsp_init_x86(IDCTDSPContext *c, AVCodecContext *avctx, unsigned high_bit_depth)
void ff_simple_idct_add_int16_12bit(uint8_t *dest, ptrdiff_t line_size, int16_t *block)
av_cold void ff_idctdsp_init_aarch64(IDCTDSPContext *c, AVCodecContext *avctx, unsigned high_bit_depth)
av_cold void ff_idctdsp_init(IDCTDSPContext *c, AVCodecContext *avctx)
void ff_simple_idct_int16_10bit(int16_t *block)
av_cold void ff_permute_scantable(uint8_t dst[64], const uint8_t src[64], const uint8_t permutation[64])
static void ff_jref_idct2_put(uint8_t *dest, ptrdiff_t line_size, int16_t *block)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static void put_pixels_clamped4_c(const int16_t *block, uint8_t *av_restrict pixels, int line_size)
void ff_faanidct_add(uint8_t *dest, ptrdiff_t line_size, int16_t block[64])
void ff_faanidct(int16_t block[64])
int bits_per_raw_sample
Bits per sample/pixel of internal libavcodec pixel/sample format.
void ff_simple_idct_put_int16_8bit(uint8_t *dest, ptrdiff_t line_size, int16_t *block)
void ff_simple_idct_put_int16_12bit(uint8_t *dest, ptrdiff_t line_size, int16_t *block)
void ff_simple_idct_add_int16_8bit(uint8_t *dest, ptrdiff_t line_size, int16_t *block)
void ff_simple_idct_put_int32_10bit(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_jref_idct_put(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)
static void ff_jref_idct4_put(uint8_t *dest, ptrdiff_t line_size, int16_t *block)
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
void ff_faanidct_put(uint8_t *dest, ptrdiff_t line_size, int16_t block[64])
int lowres
low resolution decoding, 1-> 1/2 size, 2->1/4 size
void ff_j_rev_dct1(int16_t *data)
av_cold void ff_idctdsp_init_ppc(IDCTDSPContext *c, AVCodecContext *avctx, unsigned high_bit_depth)
static void ff_jref_idct1_add(uint8_t *dest, ptrdiff_t line_size, int16_t *block)
void ff_idctdsp_init_riscv(IDCTDSPContext *c, AVCodecContext *avctx, unsigned high_bit_depth)
void ff_j_rev_dct2(int16_t *data)
void ff_simple_idct_int16_8bit(int16_t *block)
#define i(width, name, range_min, range_max)
void ff_idctdsp_init_loongarch(IDCTDSPContext *c, AVCodecContext *avctx, unsigned high_bit_depth)
int idct_algo
IDCT algorithm, see FF_IDCT_* below.
void ff_j_rev_dct(int16_t *data)
void ff_jref_idct_add(uint8_t *dest, ptrdiff_t line_size, int16_t *block)
main external API structure.
void ff_add_pixels_clamped_c(const int16_t *block, uint8_t *av_restrict pixels, ptrdiff_t line_size)
void ff_simple_idct_int16_12bit(int16_t *block)
void ff_simple_idct_add_int16_10bit(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)
void ff_j_rev_dct4(int16_t *data)
The exact code depends on how similar the blocks are and how related they are to the block
static void add_pixels_clamped4_c(const int16_t *block, uint8_t *av_restrict pixels, int line_size)
av_cold void ff_idctdsp_init_alpha(IDCTDSPContext *c, AVCodecContext *avctx, unsigned high_bit_depth)