Go to the documentation of this file.
30 #define CLIP_MIN (1 << 2)
31 #define CLIP_MAX_10 (1 << 10) - CLIP_MIN - 1
32 #define CLIP_MAX_12 (1 << 12) - CLIP_MIN - 1
34 #define CLIP_10(x) (av_clip((x), CLIP_MIN, CLIP_MAX_10))
35 #define CLIP_12(x) (av_clip((x), CLIP_MIN, CLIP_MAX_12))
41 static inline void put_pixel(uint16_t *dst, ptrdiff_t linesize,
const int16_t *in,
int bits_per_raw_sample) {
42 int x, y, src_offset, dst_offset;
44 for (y = 0, dst_offset = 0; y < 8; y++, dst_offset += linesize) {
45 for (x = 0; x < 8; x++) {
46 src_offset = (y << 3) + x;
48 if (bits_per_raw_sample == 10) {
49 dst[dst_offset + x] =
CLIP_10(in[src_offset]);
51 dst[dst_offset + x] =
CLIP_12(in[src_offset]);
57 static void put_pixels_10(uint16_t *dst, ptrdiff_t linesize,
const int16_t *in)
62 static void put_pixels_12(uint16_t *dst, ptrdiff_t linesize,
const int16_t *in)
av_cold int ff_proresdsp_init(ProresDSPContext *dsp, AVCodecContext *avctx)
int idct_permutation_type
static void put_pixel(uint16_t *dst, ptrdiff_t linesize, const int16_t *in, int bits_per_raw_sample)
Add bias value, clamp and output pixels of a slice.
static void put_pixels_12(uint16_t *dst, ptrdiff_t linesize, const int16_t *in)
int bits_per_raw_sample
Bits per sample/pixel of internal libavcodec pixel/sample format.
uint8_t idct_permutation[64]
main external API structure.
void ff_prores_idct_12(int16_t *block, const int16_t *qmat)
static void put_pixels_10(uint16_t *dst, ptrdiff_t linesize, const int16_t *in)
void ff_prores_idct_10(int16_t *block, const int16_t *qmat)
Special version of ff_simple_idct_int16_10bit() which does dequantization and scales by a factor of 2...
static void prores_idct_put_10_c(uint16_t *out, ptrdiff_t linesize, int16_t *block, const int16_t *qmat)
av_cold void ff_init_scantable_permutation(uint8_t *idct_permutation, enum idct_permutation_type perm_type)
void ff_proresdsp_init_x86(ProresDSPContext *dsp, AVCodecContext *avctx)
#define AVERROR_BUG
Internal bug, also see AVERROR_BUG2.
The exact code depends on how similar the blocks are and how related they are to the block
void(* idct_put)(uint16_t *out, ptrdiff_t linesize, int16_t *block, const int16_t *qmat)
static void prores_idct_put_12_c(uint16_t *out, ptrdiff_t linesize, int16_t *block, const int16_t *qmat)