30 #define BIAS (1 << (PRORES_BITS_PER_SAMPLE - 1))
31 #define CLIP_MIN (1 << (PRORES_BITS_PER_SAMPLE - 8))
32 #define CLIP_MAX (1 << PRORES_BITS_PER_SAMPLE) - CLIP_MIN - 1
34 #define CLIP_AND_BIAS(x) (av_clip((x) + BIAS, CLIP_MIN, CLIP_MAX))
36 #if CONFIG_PRORES_DECODER | CONFIG_PRORES_LGPL_DECODER
40 static void put_pixels(uint16_t *dst,
int stride,
const int16_t *
in)
42 int x,
y, src_offset, dst_offset;
44 for (y = 0, dst_offset = 0; y < 8; y++, dst_offset +=
stride) {
45 for (x = 0; x < 8; x++) {
46 src_offset = (y << 3) + x;
53 static void prores_idct_put_c(uint16_t *
out,
int linesize, int16_t *
block,
const int16_t *qmat)
56 put_pixels(out, linesize >> 1, block);
60 #if CONFIG_PRORES_KS_ENCODER
61 static void prores_fdct_c(
const uint16_t *
src,
int linesize, int16_t *
block)
64 const uint16_t *tsrc =
src;
66 for (y = 0; y < 8; y++) {
67 for (x = 0; x < 8; x++)
68 block[y * 8 + x] = tsrc[x];
69 tsrc += linesize >> 1;
77 #if CONFIG_PRORES_DECODER | CONFIG_PRORES_LGPL_DECODER
86 #if CONFIG_PRORES_KS_ENCODER
87 dsp->
fdct = prores_fdct_c;