33 for (y = 0; y < 8; y += 2 << ss_v, dst += 16 * ls, lvl += 16 << ss_v) {
34 uint8_t *ptr = dst, *l = lvl, *hmask1 =
mask[y], *hmask2 =
mask[y + 1 + ss_v];
35 unsigned hm1 = hmask1[0] | hmask1[1] | hmask1[2], hm13 = hmask1[3];
36 unsigned hm2 = hmask2[1] | hmask2[2], hm23 = hmask2[3];
37 unsigned hm = hm1 | hm2 | hm13 | hm23;
39 for (x = 1; hm & ~(x - 1); x <<= 1, ptr += 8 * bytesperpixel >> ss_h) {
42 int L = *l,
H = L >> 4;
59 [0](ptr, ls,
E, I,
H);
62 [0](ptr, ls, E, I, H);
65 int L = l[8 << ss_v],
H = L >> 4;
69 [0](ptr + 8 * ls, ls, E, I, H);
77 int L = *l,
H = L >> 4;
89 }
else if (hm23 & x) {
90 int L = l[8 << ss_v],
H = L >> 4;
110 for (y = 0; y < 8; y++, dst += 8 * ls >> ss_v) {
112 unsigned vm = vmask[0] | vmask[1] | vmask[2], vm3 = vmask[3];
114 for (x = 1; vm & ~(x - 1); x <<= (2 << ss_h), ptr += 16 * bytesperpixel, l += 2 << ss_h) {
117 int L = *l,
H = L >> 4;
121 if (vmask[0] & (x << (1 + ss_h))) {
127 }
else if (vm & (x << (1 + ss_h))) {
133 [!!(vmask[1] & (x << (1 + ss_h)))]
134 [1](ptr, ls,
E, I,
H);
137 [1](ptr, ls, E, I, H);
139 }
else if (vm & (x << (1 + ss_h))) {
140 int L = l[1 + ss_h],
H = L >> 4;
144 [1](ptr + 8 * bytesperpixel, ls, E, I, H);
149 int L = *l,
H = L >> 4;
152 if (vm3 & (x << (1 + ss_h))) {
161 }
else if (vm3 & (x << (1 + ss_h))) {
162 int L = l[1 + ss_h],
H = L >> 4;
179 int row,
int col, ptrdiff_t yoff, ptrdiff_t uvoff)
197 for (p = 0; p < 2; p++) {
198 dst = f->
data[1 + p] + uvoff;
This structure describes decoded (raw) audio or video data.
#define av_assert2(cond)
assert() equivalent, that does lie in speed critical code.
void ff_vp9_loopfilter_sb(AVCodecContext *avctx, VP9Filter *lflvl, int row, int col, ptrdiff_t yoff, ptrdiff_t uvoff)
static const uint16_t mask[17]
void(* loop_filter_16[2])(uint8_t *dst, ptrdiff_t stride, int mb_lim, int lim, int hev_thr)
static av_always_inline void filter_plane_cols(VP9Context *s, int col, int ss_h, int ss_v, uint8_t *lvl, uint8_t(*mask)[4], uint8_t *dst, ptrdiff_t ls)
static av_always_inline void filter_plane_rows(VP9Context *s, int row, int ss_h, int ss_v, uint8_t *lvl, uint8_t(*mask)[4], uint8_t *dst, ptrdiff_t ls)
void(* loop_filter_mix2[2][2][2])(uint8_t *dst, ptrdiff_t stride, int mb_lim, int lim, int hev_thr)
void(* loop_filter_8[3][2])(uint8_t *dst, ptrdiff_t stride, int mb_lim, int lim, int hev_thr)
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
main external API structure.
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
struct VP9Context::@153 filter_lut