27 const uint8_t no_p,
const uint8_t no_q)
29 for (
int d = 0;
d < 4;
d++) {
39 P0 = p0 +
av_clip(((p2 + 2 * p1 + 2 * p0 + 2 *
q0 +
q1 + 4) >> 3) - p0, -tc3, tc3);
40 P1 = p1 +
av_clip(((p2 + p1 + p0 +
q0 + 2) >> 2) - p1, -tc2, tc2);
41 P2 = p2 +
av_clip(((2 * p3 + 3 * p2 + p1 + p0 +
q0 + 4) >> 3) - p2, -tc, tc);
44 Q0 =
q0 +
av_clip(((p1 + 2 * p0 + 2 *
q0 + 2 *
q1 + q2 + 4) >> 3) -
q0, -tc3, tc3);
46 Q2 = q2 +
av_clip(((2 * q3 + 3 * q2 +
q1 +
q0 + p0 + 4) >> 3) - q2, -tc, tc);
53 const int32_t tc,
const int32_t beta,
const uint8_t no_p,
const uint8_t no_q,
const int nd_p,
const int nd_q)
55 const int tc_2 = tc >> 1;
56 for (
int d = 0;
d < 4;
d++) {
63 int delta0 = (9 * (
q0 - p0) - 3 * (
q1 - p1) + 8) >> 4;
64 if (
abs(delta0) < 10 * tc) {
65 delta0 =
av_clip(delta0, -tc, tc);
70 if (!no_p && nd_p > 1) {
71 const int deltap1 =
av_clip((((p2 + p0 + 1) >> 1) - p1 + delta0) >> 1, -tc_2, tc_2);
74 if (!no_q && nd_q > 1) {
75 const int deltaq1 =
av_clip((((q2 +
q0 + 1) >> 1) -
q1 - delta0) >> 1, -tc_2, tc_2);
84 const int size,
const int32_t tc,
const uint8_t no_p,
const uint8_t no_q)
86 for (
int d = 0;
d <
size;
d++) {
92 delta0 =
av_clip((((
q0 - p0) * 4) + p1 -
q1 + 4) >> 3, -tc, tc);