27 0, 1, 1, 2, 2, 3, 3, 4, 4, 4, 5, 5, 6, 6, 7, 7,
28 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 11, 11, 11, 12, 12, 12
36 for (y = 0; y < 8; y++) {
38 int p0 = src[y * stride - 2];
39 int p1 = src[y * stride - 1];
40 int p2 = src[y * stride + 0];
41 int p3 = src[y * stride + 1];
42 int d = (p0 - p3 + 4 * (p2 - p1)) / 8;
44 if (d < -2 * strength)
46 else if (d < -strength)
47 d1 = -2 * strength - d;
48 else if (d < strength)
50 else if (d < 2 * strength)
51 d1 = 2 * strength - d;
62 src[y * stride - 1] = p1;
63 src[y * stride + 0] = p2;
67 d2 = av_clip((p0 - p3) / 4, -ad1, ad1);
69 src[y * stride - 2] = p0 - d2;
70 src[y * stride + 1] = p3 + d2;
79 for (x = 0; x < 8; x++) {
81 int p0 = src[x - 2 *
stride];
82 int p1 = src[x - 1 *
stride];
83 int p2 = src[x + 0 *
stride];
84 int p3 = src[x + 1 *
stride];
85 int d = (p0 - p3 + 4 * (p2 - p1)) / 8;
87 if (d < -2 * strength)
89 else if (d < -strength)
90 d1 = -2 * strength - d;
91 else if (d < strength)
93 else if (d < 2 * strength)
94 d1 = 2 * strength - d;
108 ad1 =
FFABS(d1) >> 1;
110 d2 = av_clip((p0 - p3) / 4, -ad1, ad1);
112 src[x - 2 *
stride] = p0 - d2;
113 src[x +
stride] = p3 + d2;
void(* h263_v_loop_filter)(uint8_t *src, int stride, int qscale)
av_cold void ff_h263dsp_init(H263DSPContext *ctx)
static void h263_v_loop_filter_c(uint8_t *src, int stride, int qscale)
Macro definitions for various function/variable attributes.
void ff_h263dsp_init_x86(H263DSPContext *ctx)
static void h263_h_loop_filter_c(uint8_t *src, int stride, int qscale)
#define FFABS(a)
Absolute value, Note, INT_MIN / INT64_MIN result in undefined behavior as they are not representable ...
common internal and external API header
const uint8_t ff_h263_loop_filter_strength[32]
void ff_h263dsp_init_mips(H263DSPContext *ctx)
void(* h263_h_loop_filter)(uint8_t *src, int stride, int qscale)