Home | History | Annotate | Download | only in dsp

Lines Matching refs:DST

30   dst[(x) + (y) * BPS] = clip_8b(dst[(x) + (y) * BPS] + ((v) >> 3))
44 static void TransformOne_C(const int16_t* in, uint8_t* dst) {
63 // an input in [-2048, 2047] interval. We then need to add a dst value
79 dst += BPS;
84 static void TransformAC3_C(const int16_t* in, uint8_t* dst) {
99 static void TransformTwo_C(const int16_t* in, uint8_t* dst, int do_two) {
100 TransformOne_C(in, dst);
102 TransformOne_C(in + 16, dst + 4);
107 static void TransformUV_C(const int16_t* in, uint8_t* dst) {
108 VP8Transform(in + 0 * 16, dst, 1);
109 VP8Transform(in + 2 * 16, dst + 4 * BPS, 1);
113 static void TransformDC_C(const int16_t* in, uint8_t* dst) {
124 static void TransformDCUV_C(const int16_t* in, uint8_t* dst) {
125 if (in[0 * 16]) VP8TransformDC(in + 0 * 16, dst);
126 if (in[1 * 16]) VP8TransformDC(in + 1 * 16, dst + 4);
127 if (in[2 * 16]) VP8TransformDC(in + 2 * 16, dst + 4 * BPS);
128 if (in[3 * 16]) VP8TransformDC(in + 3 * 16, dst + 4 * BPS + 4);
170 #define DST(x, y) dst[(x) + (y) * BPS]
173 static WEBP_INLINE void TrueMotion(uint8_t* dst, int size) {
174 const uint8_t* top = dst - BPS;
178 const uint8_t* const clip = clip0 + dst[-1];
181 dst[x] = clip[top[x]];
183 dst += BPS;
186 static void TM4_C(uint8_t* dst) { TrueMotion(dst, 4); }
187 static void TM8uv_C(uint8_t* dst) { TrueMotion(dst, 8); }
188 static void TM16_C(uint8_t* dst) { TrueMotion(dst, 16); }
193 static void VE16_C(uint8_t* dst) { // vertical
196 memcpy(dst + j * BPS, dst - BPS, 16);
200 static void HE16_C(uint8_t* dst) { // horizontal
203 memset(dst, dst[-1], 16);
204 dst += BPS;
208 static WEBP_INLINE void Put16(int v, uint8_t* dst) {
211 memset(dst + j * BPS, v, 16);
215 static void DC16_C(uint8_t* dst) { // DC
219 DC += dst[-1 + j * BPS] + dst[j - BPS];
221 Put16(DC >> 5, dst);
224 static void DC16NoTop_C(uint8_t* dst) { // DC with top samples not available
228 DC += dst[-1 + j * BPS];
230 Put16(DC >> 4, dst);
233 static void DC16NoLeft_C(uint8_t* dst) { // DC with left samples not available
237 DC += dst[i - BPS];
239 Put16(DC >> 4, dst);
242 static void DC16NoTopLeft_C(uint8_t* dst) { // DC with no top and left samples
243 Put16(0x80, dst);
256 static void VE4_C(uint8_t* dst) { // vertical
257 const uint8_t* top = dst - BPS;
266 memcpy(dst + i * BPS, vals, sizeof(vals));
271 static void HE4_C(uint8_t* dst) { // horizontal
272 const int A = dst[-1 - BPS];
273 const int B = dst[-1];
274 const int C = dst[-1 + BPS];
275 const int D = dst[-1 + 2 * BPS];
276 const int E = dst[-1 + 3 * BPS];
277 WebPUint32ToMem(dst + 0 * BPS, 0x01010101U * AVG3(A, B, C));
278 WebPUint32ToMem(dst + 1 * BPS, 0x01010101U * AVG3(B, C, D));
279 WebPUint32ToMem(dst + 2 * BPS, 0x01010101U * AVG3(C, D, E));
280 WebPUint32ToMem(dst + 3 * BPS, 0x01010101U * AVG3(D, E, E));
284 static void DC4_C(uint8_t* dst) { // DC
287 for (i = 0; i < 4; ++i) dc += dst[i - BPS] + dst[-1 + i * BPS];
289 for (i = 0; i < 4; ++i) memset(dst + i * BPS, dc, 4);
292 static void RD4_C(uint8_t* dst) { // Down-right
293 const int I = dst[-1 + 0 * BPS];
294 const int J = dst[-1 + 1 * BPS];
295 const int K = dst[-1 + 2 * BPS];
296 const int L = dst[-1 + 3 * BPS];
297 const int X = dst[-1 - BPS];
298 const int A = dst[0 - BPS];
299 const int B = dst[1 - BPS];
300 const int C = dst[2 - BPS];
301 const int D = dst[3 - BPS];
302 DST(0, 3) = AVG3(J, K, L);
303 DST(1, 3) = DST(0, 2) = AVG3(I, J, K);
304 DST(2, 3) = DST(1, 2) = DST(0, 1) = AVG3(X, I, J);
305 DST(3, 3) = DST(2, 2) = DST(1, 1) = DST(0, 0) = AVG3(A, X, I);
306 DST(3, 2) = DST(2, 1) = DST(1, 0) = AVG3(B, A, X);
307 DST(3, 1) = DST(2, 0) = AVG3(C, B, A);
308 DST(3, 0) = AVG3(D, C, B);
311 static void LD4_C(uint8_t* dst) { // Down-Left
312 const int A = dst[0 - BPS];
313 const int B = dst[1 - BPS];
314 const int C = dst[2 - BPS];
315 const int D = dst[3 - BPS];
316 const int E = dst[4 - BPS];
317 const int F = dst[5 - BPS];
318 const int G = dst[6 - BPS];
319 const int H = dst[7 - BPS];
320 DST(0, 0) = AVG3(A, B, C);
321 DST(1, 0) = DST(0, 1) = AVG3(B, C, D);
322 DST(2, 0) = DST(1, 1) = DST(0, 2) = AVG3(C, D, E);
323 DST(3, 0) = DST(2, 1) = DST(1, 2) = DST(0, 3) = AVG3(D, E, F);
324 DST(3, 1) = DST(2, 2) = DST(1, 3) = AVG3(E, F, G);
325 DST(3, 2) = DST(2, 3) = AVG3(F, G, H);
326 DST(3, 3) = AVG3(G, H, H);
330 static void VR4_C(uint8_t* dst) { // Vertical-Right
331 const int I = dst[-1 + 0 * BPS];
332 const int J = dst[-1 + 1 * BPS];
333 const int K = dst[-1 + 2 * BPS];
334 const int X = dst[-1 - BPS];
335 const int A = dst[0 - BPS];
336 const int B = dst[1 - BPS];
337 const int C = dst[2 - BPS];
338 const int D = dst[3 - BPS];
339 DST(0, 0) = DST(1, 2) = AVG2(X, A);
340 DST(1, 0) = DST(2, 2) = AVG2(A, B);
341 DST(2, 0) = DST(3, 2) = AVG2(B, C);
342 DST(3, 0) = AVG2(C, D);
344 DST(0, 3) = AVG3(K, J, I);
345 DST(0, 2) = AVG3(J, I, X);
346 DST(0, 1) = DST(1, 3) = AVG3(I, X, A);
347 DST(1, 1) = DST(2, 3) = AVG3(X, A, B);
348 DST(2, 1) = DST(3, 3) = AVG3(A, B, C);
349 DST(3, 1) = AVG3(B, C, D);
352 static void VL4_C(uint8_t* dst) { // Vertical-Left
353 const int A = dst[0 - BPS];
354 const int B = dst[1 - BPS];
355 const int C = dst[2 - BPS];
356 const int D = dst[3 - BPS];
357 const int E = dst[4 - BPS];
358 const int F = dst[5 - BPS];
359 const int G = dst[6 - BPS];
360 const int H = dst[7 - BPS];
361 DST(0, 0) = AVG2(A, B);
362 DST(1, 0) = DST(0, 2) = AVG2(B, C);
363 DST(2, 0) = DST(1, 2) = AVG2(C, D);
364 DST(3, 0) = DST(2, 2) = AVG2(D, E);
366 DST(0, 1) = AVG3(A, B, C);
367 DST(1, 1) = DST(0, 3) = AVG3(B, C, D);
368 DST(2, 1) = DST(1, 3) = AVG3(C, D, E);
369 DST(3, 1) = DST(2, 3) = AVG3(D, E, F);
370 DST(3, 2) = AVG3(E, F, G);
371 DST(3, 3) = AVG3(F, G, H);
374 static void HU4_C(uint8_t* dst) { // Horizontal-Up
375 const int I = dst[-1 + 0 * BPS];
376 const int J = dst[-1 + 1 * BPS];
377 const int K = dst[-1 + 2 * BPS];
378 const int L = dst[-1 + 3 * BPS];
379 DST(0, 0) = AVG2(I, J);
380 DST(2, 0) = DST(0, 1) = AVG2(J, K);
381 DST(2, 1) = DST(0, 2) = AVG2(K, L);
382 DST(1, 0) = AVG3(I, J, K);
383 DST(3, 0) = DST(1, 1) = AVG3(J, K, L);
384 DST(3, 1) = DST(1, 2) = AVG3(K, L, L);
385 DST(3, 2) = DST(2, 2) =
386 DST(0, 3) = DST(1, 3) = DST(2, 3) = DST(3, 3) = L;
389 static void HD4_C(uint8_t* dst) { // Horizontal-Down
390 const int I = dst[-1 + 0 * BPS];
391 const int J = dst[-1 + 1 * BPS];
392 const int K = dst[-1 + 2 * BPS];
393 const int L = dst[-1 + 3 * BPS];
394 const int X = dst[-1 - BPS];
395 const int A = dst[0 - BPS];
396 const int B = dst[1 - BPS];
397 const int C = dst[2 - BPS];
399 DST(0, 0) = DST(2, 1) = AVG2(I, X);
400 DST(0, 1) = DST(2, 2) = AVG2(J, I);
401 DST(0, 2) = DST(2, 3) = AVG2(K, J);
402 DST(0, 3) = AVG2(L, K);
404 DST(3, 0) = AVG3(A, B, C);
405 DST(2, 0) = AVG3(X, A, B);
406 DST(1, 0) = DST(3, 1) = AVG3(I, X, A);
407 DST(1, 1) = DST(3, 2) = AVG3(J, I, X);
408 DST(1, 2) = DST(3, 3) = AVG3(K, J, I);
409 DST(1, 3) = AVG3(L, K, J);
412 #undef DST
422 static void VE8uv_C(uint8_t* dst) { // vertical
425 memcpy(dst + j * BPS, dst - BPS, 8);
429 static void HE8uv_C(uint8_t* dst) { // horizontal
432 memset(dst, dst[-1], 8);
433 dst += BPS;
438 static WEBP_INLINE void Put8x8uv(uint8_t value, uint8_t* dst) {
441 memset(dst + j * BPS, value, 8);
445 static void DC8uv_C(uint8_t* dst) { // DC
449 dc0 += dst[i - BPS] + dst[-1 + i * BPS];
451 Put8x8uv(dc0 >> 4, dst);
454 static void DC8uvNoLeft_C(uint8_t* dst) { // DC with no left samples
458 dc0 += dst[i - BPS];
460 Put8x8uv(dc0 >> 3, dst);
463 static void DC8uvNoTop_C(uint8_t* dst) { // DC with no top samples
467 dc0 += dst[-1 + i * BPS];
469 Put8x8uv(dc0 >> 3, dst);
472 static void DC8uvNoTopLeft_C(uint8_t* dst) { // DC with nothing
473 Put8x8uv(0x80, dst);
698 static void DitherCombine8x8_C(const uint8_t* dither, uint8_t* dst,
706 dst[i] = clip_8b((int)dst[i] + delta1);
708 dst += dst_stride;
734 void (*VP8DitherCombine8x8)(const uint8_t* dither, uint8_t* dst,