29 #define BIAS (1 << (PRORES_BITS_PER_SAMPLE - 1))
30 #define CLIP_MIN (1 << (PRORES_BITS_PER_SAMPLE - 8))
31 #define CLIP_MAX (1 << PRORES_BITS_PER_SAMPLE) - CLIP_MIN - 1
33 #define CLIP_AND_BIAS(x) (av_clip((x) + BIAS, CLIP_MIN, CLIP_MAX))
35 #if CONFIG_PRORES_DECODER | CONFIG_PRORES_LGPL_DECODER
39 static void put_pixels(uint16_t *
dst,
int stride,
const int16_t *
in)
41 int x,
y, src_offset, dst_offset;
43 for (y = 0, dst_offset = 0; y < 8; y++, dst_offset +=
stride) {
44 for (x = 0; x < 8; x++) {
45 src_offset = (y << 3) + x;
52 static void prores_idct_put_c(uint16_t *
out,
int linesize, int16_t *
block,
const int16_t *qmat)
55 put_pixels(out, linesize >> 1, block);
59 #if CONFIG_PRORES_KOSTYA_ENCODER
60 static void prores_fdct_c(
const uint16_t *src,
int linesize, int16_t *
block)
63 const uint16_t *tsrc = src;
65 for (y = 0; y < 8; y++) {
66 for (x = 0; x < 8; x++)
67 block[y * 8 + x] = tsrc[x];
68 tsrc += linesize >> 1;
76 #if CONFIG_PRORES_DECODER | CONFIG_PRORES_LGPL_DECODER
85 #if CONFIG_PRORES_KOSTYA_ENCODER
86 dsp->
fdct = prores_fdct_c;