Go to the documentation of this file.
24 #define CHROMA_EXTRA_BEFORE 1
25 #define CHROMA_EXTRA 3
26 #define LUMA_EXTRA_BEFORE 3
30 const uint8_t *
_src,
const ptrdiff_t _src_stride,
34 const ptrdiff_t src_stride = _src_stride /
sizeof(
pixel);
36 for (
int y = 0; y <
height; y++) {
37 for (
int x = 0; x <
width; x++)
45 const uint8_t *
_src,
const ptrdiff_t _src_stride,
const int height,
46 const int8_t *
hf,
const int8_t *
vf,
const int width)
50 const ptrdiff_t src_stride = _src_stride /
sizeof(
pixel);
51 const ptrdiff_t dst_stride = _dst_stride /
sizeof(
pixel);
53 for (
int y = 0; y <
height; y++) {
61 const uint8_t *
_src,
const ptrdiff_t _src_stride,
const int height,
62 const int denom,
const int wx,
const int _ox,
const int8_t *
hf,
const int8_t *
vf,
67 const ptrdiff_t src_stride = _src_stride /
sizeof(
pixel);
68 const ptrdiff_t dst_stride = _dst_stride /
sizeof(
pixel);
75 const int ox = _ox * (1 << (
BIT_DEPTH - 8));
77 for (
int y = 0; y <
height; y++) {
78 for (
int x = 0; x <
width; x++) {
87 #define LUMA_FILTER(src, stride) \
88 (filter[0] * src[x - 3 * stride] + \
89 filter[1] * src[x - 2 * stride] + \
90 filter[2] * src[x - stride] + \
91 filter[3] * src[x ] + \
92 filter[4] * src[x + stride] + \
93 filter[5] * src[x + 2 * stride] + \
94 filter[6] * src[x + 3 * stride] + \
95 filter[7] * src[x + 4 * stride])
101 const ptrdiff_t src_stride = _src_stride /
sizeof(
pixel);
104 for (
int y = 0; y <
height; y++) {
105 for (
int x = 0; x <
width; x++)
116 const ptrdiff_t src_stride = _src_stride /
sizeof(
pixel);
119 for (
int y = 0; y <
height; y++) {
120 for (
int x = 0; x <
width; x++)
131 int16_t *
tmp = tmp_array;
133 const ptrdiff_t src_stride = _src_stride /
sizeof(
pixel);
138 for (
int x = 0; x <
width; x++)
146 for (
int y = 0; y <
height; y++) {
147 for (
int x = 0; x <
width; x++)
155 const uint8_t *
_src,
const ptrdiff_t _src_stride,
160 const ptrdiff_t src_stride = _src_stride /
sizeof(
pixel);
161 const ptrdiff_t dst_stride = _dst_stride /
sizeof(
pixel);
170 for (
int y = 0; y <
height; y++) {
171 for (
int x = 0; x <
width; x++) {
181 const uint8_t *
_src,
const ptrdiff_t _src_stride,
187 const ptrdiff_t src_stride = _src_stride /
sizeof(
pixel);
188 const ptrdiff_t dst_stride = _dst_stride /
sizeof(
pixel);
197 for (
int y = 0; y <
height; y++) {
198 for (
int x = 0; x <
width; x++) {
208 const uint8_t *
_src,
const ptrdiff_t _src_stride,
212 int16_t *
tmp = tmp_array;
215 const ptrdiff_t dst_stride = _dst_stride /
sizeof(
pixel);
216 const ptrdiff_t src_stride = _src_stride /
sizeof(
pixel);
227 for (
int x = 0; x <
width; x++)
236 for (
int y = 0; y <
height; y++) {
237 for (
int x = 0; x <
width; x++) {
248 const uint8_t *
_src,
const ptrdiff_t _src_stride,
int height,
249 const int denom,
const int wx,
const int _ox,
const int8_t *
hf,
const int8_t *
vf,
254 const ptrdiff_t src_stride = _src_stride /
sizeof(
pixel);
255 const ptrdiff_t dst_stride = _dst_stride /
sizeof(
pixel);
257 const int ox = _ox * (1 << (
BIT_DEPTH - 8));
265 for (
int y = 0; y <
height; y++) {
266 for (
int x = 0; x <
width; x++)
274 const uint8_t *
_src,
const ptrdiff_t _src_stride,
const int height,
275 const int denom,
const int wx,
const int _ox,
const int8_t *
hf,
const int8_t *
vf,
280 const ptrdiff_t src_stride = _src_stride /
sizeof(
pixel);
281 const ptrdiff_t dst_stride = _dst_stride /
sizeof(
pixel);
283 const int ox = _ox * (1 << (
BIT_DEPTH - 8));
291 for (
int y = 0; y <
height; y++) {
292 for (
int x = 0; x <
width; x++)
300 const uint8_t *
_src,
const ptrdiff_t _src_stride,
const int height,
const int denom,
301 const int wx,
const int _ox,
const int8_t *
hf,
const int8_t *
vf,
const int width)
304 int16_t *
tmp = tmp_array;
307 const ptrdiff_t src_stride = _src_stride /
sizeof(
pixel);
308 const ptrdiff_t dst_stride = _dst_stride /
sizeof(
pixel);
310 const int ox = _ox * (1 << (
BIT_DEPTH - 8));
320 for (
int x = 0; x <
width; x++)
328 for (
int y = 0; y <
height; y++) {
329 for (
int x = 0; x <
width; x++)
336 #define CHROMA_FILTER(src, stride) \
337 (filter[0] * src[x - stride] + \
338 filter[1] * src[x] + \
339 filter[2] * src[x + stride] + \
340 filter[3] * src[x + 2 * stride])
346 const ptrdiff_t src_stride = _src_stride /
sizeof(
pixel);
349 for (
int y = 0; y <
height; y++) {
350 for (
int x = 0; x <
width; x++)
361 const ptrdiff_t src_stride = _src_stride /
sizeof(
pixel);
364 for (
int y = 0; y <
height; y++) {
365 for (
int x = 0; x <
width; x++)
376 int16_t *
tmp = tmp_array;
378 const ptrdiff_t src_stride = _src_stride /
sizeof(
pixel);
384 for (
int x = 0; x <
width; x++)
393 for (
int y = 0; y <
height; y++) {
394 for (
int x = 0; x <
width; x++)
402 const uint8_t *
_src,
const ptrdiff_t _src_stride,
407 const ptrdiff_t src_stride = _src_stride /
sizeof(
pixel);
408 const ptrdiff_t dst_stride = _dst_stride /
sizeof(
pixel);
417 for (
int y = 0; y <
height; y++) {
418 for (
int x = 0; x <
width; x++)
426 const uint8_t *
_src,
const ptrdiff_t _src_stride,
431 const ptrdiff_t src_stride = _src_stride /
sizeof(
pixel);
432 const ptrdiff_t dst_stride = _dst_stride /
sizeof(
pixel);
441 for (
int y = 0; y <
height; y++) {
442 for (
int x = 0; x <
width; x++)
450 const uint8_t *
_src,
const ptrdiff_t _src_stride,
454 int16_t *
tmp = tmp_array;
457 const ptrdiff_t src_stride = _src_stride /
sizeof(
pixel);
458 const ptrdiff_t dst_stride = _dst_stride /
sizeof(
pixel);
470 for (
int x = 0; x <
width; x++)
479 for (
int y = 0; y <
height; y++) {
480 for (
int x = 0; x <
width; x++)
488 const uint8_t *
_src, ptrdiff_t _src_stride,
int height,
int denom,
int wx,
int ox,
489 const int8_t *
hf,
const int8_t *
vf,
int width)
493 const ptrdiff_t src_stride = _src_stride /
sizeof(
pixel);
494 const ptrdiff_t dst_stride = _dst_stride /
sizeof(
pixel);
504 for (
int y = 0; y <
height; y++) {
505 for (
int x = 0; x <
width; x++) {
514 const uint8_t *
_src,
const ptrdiff_t _src_stride,
const int height,
515 const int denom,
const int wx,
const int _ox,
const int8_t *
hf,
const int8_t *
vf,
520 const ptrdiff_t src_stride = _src_stride /
sizeof(
pixel);
521 const ptrdiff_t dst_stride = _dst_stride /
sizeof(
pixel);
524 const int ox = _ox * (1 << (
BIT_DEPTH - 8));
531 for (
int y = 0; y <
height; y++) {
532 for (
int x = 0; x <
width; x++) {
541 const uint8_t *
_src, ptrdiff_t _src_stride,
int height,
int denom,
int wx,
int ox,
542 const int8_t *
hf,
const int8_t *
vf,
int width)
545 int16_t *
tmp = tmp_array;
548 const ptrdiff_t src_stride = _src_stride /
sizeof(
pixel);
549 const ptrdiff_t dst_stride = _dst_stride /
sizeof(
pixel);
561 for (
int x = 0; x <
width; x++)
571 for (
int y = 0; y <
height; y++) {
572 for (
int x = 0; x <
width; x++)
static void FUNC() put_uni_luma_w_v(uint8_t *_dst, const ptrdiff_t _dst_stride, const uint8_t *_src, const ptrdiff_t _src_stride, const int height, const int denom, const int wx, const int _ox, const int8_t *hf, const int8_t *vf, const int width)
static void FUNC() put_luma_h(int16_t *dst, const uint8_t *_src, const ptrdiff_t _src_stride, const int height, const int8_t *hf, const int8_t *vf, const int width)
#define CHROMA_FILTER(src, stride)
static void FUNC() put_uni_w_pixels(uint8_t *_dst, const ptrdiff_t _dst_stride, const uint8_t *_src, const ptrdiff_t _src_stride, const int height, const int denom, const int wx, const int _ox, const int8_t *hf, const int8_t *vf, const int width)
#define CHROMA_EXTRA_BEFORE
static void FUNC() put_uni_chroma_w_h(uint8_t *_dst, ptrdiff_t _dst_stride, const uint8_t *_src, ptrdiff_t _src_stride, int height, int denom, int wx, int ox, const int8_t *hf, const int8_t *vf, int width)
static void FUNC() put_uni_chroma_w_v(uint8_t *_dst, const ptrdiff_t _dst_stride, const uint8_t *_src, const ptrdiff_t _src_stride, const int height, const int denom, const int wx, const int _ox, const int8_t *hf, const int8_t *vf, const int width)
void(* filter)(uint8_t *src, int stride, int qscale)
uint8_t ptrdiff_t const uint8_t * _src
static void FUNC() put_uni_luma_w_h(uint8_t *_dst, const ptrdiff_t _dst_stride, const uint8_t *_src, const ptrdiff_t _src_stride, int height, const int denom, const int wx, const int _ox, const int8_t *hf, const int8_t *vf, const int width)
static void FUNC() put_uni_luma_v(uint8_t *_dst, const ptrdiff_t _dst_stride, const uint8_t *_src, const ptrdiff_t _src_stride, const int height, const int8_t *hf, const int8_t *vf, const int width)
static double val(void *priv, double ch)
static void FUNC() put_uni_chroma_v(uint8_t *_dst, const ptrdiff_t _dst_stride, const uint8_t *_src, const ptrdiff_t _src_stride, const int height, const int8_t *hf, const int8_t *vf, const int width)
static void FUNC() put_uni_luma_hv(uint8_t *_dst, const ptrdiff_t _dst_stride, const uint8_t *_src, const ptrdiff_t _src_stride, const int height, const int8_t *hf, const int8_t *vf, const int width)
static void FUNC() put_chroma_v(int16_t *dst, const uint8_t *_src, const ptrdiff_t _src_stride, const int height, const int8_t *hf, const int8_t *vf, const int width)
static void FUNC() put_uni_chroma_h(uint8_t *_dst, const ptrdiff_t _dst_stride, const uint8_t *_src, const ptrdiff_t _src_stride, const int height, const int8_t *hf, const int8_t *vf, const int width)
static void FUNC() put_uni_chroma_w_hv(uint8_t *_dst, ptrdiff_t _dst_stride, const uint8_t *_src, ptrdiff_t _src_stride, int height, int denom, int wx, int ox, const int8_t *hf, const int8_t *vf, int width)
static void FUNC() put_luma_v(int16_t *dst, const uint8_t *_src, const ptrdiff_t _src_stride, const int height, const int8_t *hf, const int8_t *vf, const int width)
#define LUMA_EXTRA_BEFORE
static int shift(int a, int b)
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
static void FUNC() put_uni_luma_h(uint8_t *_dst, const ptrdiff_t _dst_stride, const uint8_t *_src, const ptrdiff_t _src_stride, const int height, const int8_t *hf, const int8_t *vf, const int width)
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf offset
static void FUNC() put_uni_chroma_hv(uint8_t *_dst, const ptrdiff_t _dst_stride, const uint8_t *_src, const ptrdiff_t _src_stride, const int height, const int8_t *hf, const int8_t *vf, const int width)
static void FUNC() put_pixels(int16_t *dst, const uint8_t *_src, const ptrdiff_t _src_stride, const int height, const int8_t *hf, const int8_t *vf, const int width)
uint8_t ptrdiff_t const uint8_t ptrdiff_t int const int8_t * hf
static void FUNC() put_uni_pixels(uint8_t *_dst, const ptrdiff_t _dst_stride, const uint8_t *_src, const ptrdiff_t _src_stride, const int height, const int8_t *hf, const int8_t *vf, const int width)
static void FUNC() put_luma_hv(int16_t *dst, const uint8_t *_src, const ptrdiff_t _src_stride, const int height, const int8_t *hf, const int8_t *vf, const int width)
static void FUNC() put_chroma_h(int16_t *dst, const uint8_t *_src, const ptrdiff_t _src_stride, const int height, const int8_t *hf, const int8_t *vf, const int width)
static void FUNC() put_chroma_hv(int16_t *dst, const uint8_t *_src, const ptrdiff_t _src_stride, const int height, const int8_t *hf, const int8_t *vf, const int width)
static void FUNC() put_uni_luma_w_hv(uint8_t *_dst, const ptrdiff_t _dst_stride, const uint8_t *_src, const ptrdiff_t _src_stride, const int height, const int denom, const int wx, const int _ox, const int8_t *hf, const int8_t *vf, const int width)
uint8_t ptrdiff_t const uint8_t ptrdiff_t int const int8_t const int8_t * vf
#define LUMA_FILTER(src, stride)