Go to the documentation of this file.
20 #include "config_components.h"
31 const uint8_t *src_scantable)
37 for (
i = 0;
i < 64;
i++) {
38 int j = src_scantable[
i];
43 for (
i = 0;
i < 64;
i++) {
64 for (
i = 0;
i < 64;
i++)
65 idct_permutation[
i] =
i;
68 for (
i = 0;
i < 64;
i++)
69 idct_permutation[
i] = (
i & 0x38) | ((
i & 6) >> 1) | ((
i & 1) << 2);
72 for (
i = 0;
i < 64;
i++)
73 idct_permutation[
i] = ((
i & 7) << 3) | (
i >> 3);
76 for (
i = 0;
i < 64;
i++)
77 idct_permutation[
i] = (
i & 0x24) | ((
i & 3) << 3) | ((
i >> 3) & 3);
81 "Internal error, IDCT permutation not set\n");
91 for (
i = 0;
i < 8;
i++) {
139 uint8_t *av_restrict pixels,
144 for (
i = 0;
i < 8;
i++) {
145 for (j = 0; j < 8; j++) {
148 else if (*
block > 127)
151 *pixels = (uint8_t) (*
block + 128);
155 pixels += (line_size - 8);
165 for (
i = 0;
i < 8;
i++) {
249 }
else if (avctx->
lowres==2) {
254 }
else if (avctx->
lowres==3) {
263 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)
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)
const uint8_t * scantable
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_j_rev_dct2(int16_t *data)
void ff_simple_idct_int16_8bit(int16_t *block)
#define i(width, name, range_min, range_max)
av_cold void ff_init_scantable(const uint8_t *permutation, ScanTable *st, const uint8_t *src_scantable)
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)