Home | History | Annotate | Download | only in dsp

Lines Matching defs:DST

62   dst[x + y * BPS] = clip_8b(dst[x + y * BPS] + ((v) >> 3))
68 static void TransformOne(const int16_t* in, uint8_t* dst) {
87 // an input in [-2048, 2047] interval. We then need to add a dst value
103 dst += BPS;
108 static void TransformTwo(const int16_t* in, uint8_t* dst, int do_two) {
109 TransformOne(in, dst);
111 TransformOne(in + 16, dst + 4);
115 static void TransformUV(const int16_t* in, uint8_t* dst) {
116 VP8Transform(in + 0 * 16, dst, 1);
117 VP8Transform(in + 2 * 16, dst + 4 * BPS, 1);
120 static void TransformDC(const int16_t *in, uint8_t* dst) {
130 static void TransformDCUV(const int16_t* in, uint8_t* dst) {
131 if (in[0 * 16]) TransformDC(in + 0 * 16, dst);
132 if (in[1 * 16]) TransformDC(in + 1 * 16, dst + 4);
133 if (in[2 * 16]) TransformDC(in + 2 * 16, dst + 4 * BPS);
134 if (in[3 * 16]) TransformDC(in + 3 * 16, dst + 4 * BPS + 4);
174 #define DST(x, y) dst[(x) + (y) * BPS]
176 static WEBP_INLINE void TrueMotion(uint8_t *dst, int size) {
177 const uint8_t* top = dst - BPS;
181 const uint8_t* const clip = clip0 + dst[-1];
184 dst[x] = clip[top[x]];
186 dst += BPS;
189 static void TM4(uint8_t *dst) { TrueMotion(dst, 4); }
190 static void TM8uv(uint8_t *dst) { TrueMotion(dst, 8); }
191 static void TM16(uint8_t *dst) { TrueMotion(dst, 16); }
196 static void VE16(uint8_t *dst) { // vertical
199 memcpy(dst + j * BPS, dst - BPS, 16);
203 static void HE16(uint8_t *dst) { // horizontal
206 memset(dst, dst[-1], 16);
207 dst += BPS;
211 static WEBP_INLINE void Put16(int v, uint8_t* dst) {
214 memset(dst + j * BPS, v, 16);
218 static void DC16(uint8_t *dst) { // DC
222 DC += dst[-1 + j * BPS] + dst[j - BPS];
224 Put16(DC >> 5, dst);
227 static void DC16NoTop(uint8_t *dst) { // DC with top samples not available
231 DC += dst[-1 + j * BPS];
233 Put16(DC >> 4, dst);
236 static void DC16NoLeft(uint8_t *dst) { // DC with left samples not available
240 DC += dst[i - BPS];
242 Put16(DC >> 4, dst);
245 static void DC16NoTopLeft(uint8_t *dst) { // DC with no top and left samples
246 Put16(0x80, dst);
255 static void VE4(uint8_t *dst) { // vertical
256 const uint8_t* top = dst - BPS;
265 memcpy(dst + i * BPS, vals, sizeof(vals));
269 static void HE4(uint8_t *dst) { // horizontal
270 const int A = dst[-1 - BPS];
271 const int B = dst[-1];
272 const int C = dst[-1 + BPS];
273 const int D = dst[-1 + 2 * BPS];
274 const int E = dst[-1 + 3 * BPS];
275 *(uint32_t*)(dst + 0 * BPS) = 0x01010101U * AVG3(A, B, C);
276 *(uint32_t*)(dst + 1 * BPS) = 0x01010101U * AVG3(B, C, D);
277 *(uint32_t*)(dst + 2 * BPS) = 0x01010101U * AVG3(C, D, E);
278 *(uint32_t*)(dst + 3 * BPS) = 0x01010101U * AVG3(D, E, E);
281 static void DC4(uint8_t *dst) { // DC
284 for (i = 0; i < 4; ++i) dc += dst[i - BPS] + dst[-1 + i * BPS];
286 for (i = 0; i < 4; ++i) memset(dst + i * BPS, dc, 4);
289 static void RD4(uint8_t *dst) { // Down-right
290 const int I = dst[-1 + 0 * BPS];
291 const int J = dst[-1 + 1 * BPS];
292 const int K = dst[-1 + 2 * BPS];
293 const int L = dst[-1 + 3 * BPS];
294 const int X = dst[-1 - BPS];
295 const int A = dst[0 - BPS];
296 const int B = dst[1 - BPS];
297 const int C = dst[2 - BPS];
298 const int D = dst[3 - BPS];
299 DST(0, 3) = AVG3(J, K, L);
300 DST(0, 2) = DST(1, 3) = AVG3(I, J, K);
301 DST(0, 1) = DST(1, 2) = DST(2, 3) = AVG3(X, I, J);
302 DST(0, 0) = DST(1, 1) = DST(2, 2) = DST(3, 3) = AVG3(A, X, I);
303 DST(1, 0) = DST(2, 1) = DST(3, 2) = AVG3(B, A, X);
304 DST(2, 0) = DST(3, 1) = AVG3(C, B, A);
305 DST(3, 0) = AVG3(D, C, B);
308 static void LD4(uint8_t *dst) { // Down-Left
309 const int A = dst[0 - BPS];
310 const int B = dst[1 - BPS];
311 const int C = dst[2 - BPS];
312 const int D = dst[3 - BPS];
313 const int E = dst[4 - BPS];
314 const int F = dst[5 - BPS];
315 const int G = dst[6 - BPS];
316 const int H = dst[7 - BPS];
317 DST(0, 0) = AVG3(A, B, C);
318 DST(1, 0) = DST(0, 1) = AVG3(B, C, D);
319 DST(2, 0) = DST(1, 1) = DST(0, 2) = AVG3(C, D, E);
320 DST(3, 0) = DST(2, 1) = DST(1, 2) = DST(0, 3) = AVG3(D, E, F);
321 DST(3, 1) = DST(2, 2) = DST(1, 3) = AVG3(E, F, G);
322 DST(3, 2) = DST(2, 3) = AVG3(F, G, H);
323 DST(3, 3) = AVG3(G, H, H);
326 static void VR4(uint8_t *dst) { // Vertical-Right
327 const int I = dst[-1 + 0 * BPS];
328 const int J = dst[-1 + 1 * BPS];
329 const int K = dst[-1 + 2 * BPS];
330 const int X = dst[-1 - BPS];
331 const int A = dst[0 - BPS];
332 const int B = dst[1 - BPS];
333 const int C = dst[2 - BPS];
334 const int D = dst[3 - BPS];
335 DST(0, 0) = DST(1, 2) = AVG2(X, A);
336 DST(1, 0) = DST(2, 2) = AVG2(A, B);
337 DST(2, 0) = DST(3, 2) = AVG2(B, C);
338 DST(3, 0) = AVG2(C, D);
340 DST(0, 3) = AVG3(K, J, I);
341 DST(0, 2) = AVG3(J, I, X);
342 DST(0, 1) = DST(1, 3) = AVG3(I, X, A);
343 DST(1, 1) = DST(2, 3) = AVG3(X, A, B);
344 DST(2, 1) = DST(3, 3) = AVG3(A, B, C);
345 DST(3, 1) = AVG3(B, C, D);
348 static void VL4(uint8_t *dst) { // Vertical-Left
349 const int A = dst[0 - BPS];
350 const int B = dst[1 - BPS];
351 const int C = dst[2 - BPS];
352 const int D = dst[3 - BPS];
353 const int E = dst[4 - BPS];
354 const int F = dst[5 - BPS];
355 const int G = dst[6 - BPS];
356 const int H = dst[7 - BPS];
357 DST(0, 0) = AVG2(A, B);
358 DST(1, 0) = DST(0, 2) = AVG2(B, C);
359 DST(2, 0) = DST(1, 2) = AVG2(C, D);
360 DST(3, 0) = DST(2, 2) = AVG2(D, E);
362 DST(0, 1) = AVG3(A, B, C);
363 DST(1, 1) = DST(0, 3) = AVG3(B, C, D);
364 DST(2, 1) = DST(1, 3) = AVG3(C, D, E);
365 DST(3, 1) = DST(2, 3) = AVG3(D, E, F);
366 DST(3, 2) = AVG3(E, F, G);
367 DST(3, 3) = AVG3(F, G, H);
370 static void HU4(uint8_t *dst) { // Horizontal-Up
371 const int I = dst[-1 + 0 * BPS];
372 const int J = dst[-1 + 1 * BPS];
373 const int K = dst[-1 + 2 * BPS];
374 const int L = dst[-1 + 3 * BPS];
375 DST(0, 0) = AVG2(I, J);
376 DST(2, 0) = DST(0, 1) = AVG2(J, K);
377 DST(2, 1) = DST(0, 2) = AVG2(K, L);
378 DST(1, 0) = AVG3(I, J, K);
379 DST(3, 0) = DST(1, 1) = AVG3(J, K, L);
380 DST(3, 1) = DST(1, 2) = AVG3(K, L, L);
381 DST(3, 2) = DST(2, 2) =
382 DST(0, 3) = DST(1, 3) = DST(2, 3) = DST(3, 3) = L;
385 static void HD4(uint8_t *dst) { // Horizontal-Down
386 const int I = dst[-1 + 0 * BPS];
387 const int J = dst[-1 + 1 * BPS];
388 const int K = dst[-1 + 2 * BPS];
389 const int L = dst[-1 + 3 * BPS];
390 const int X = dst[-1 - BPS];
391 const int A = dst[0 - BPS];
392 const int B = dst[1 - BPS];
393 const int C = dst[2 - BPS];
395 DST(0, 0) = DST(2, 1) = AVG2(I, X);
396 DST(0, 1) = DST(2, 2) = AVG2(J, I);
397 DST(0, 2) = DST(2, 3) = AVG2(K, J);
398 DST(0, 3) = AVG2(L, K);
400 DST(3, 0) = AVG3(A, B, C);
401 DST(2, 0) = AVG3(X, A, B);
402 DST(1, 0) = DST(3, 1) = AVG3(I, X, A);
403 DST(1, 1) = DST(3, 2) = AVG3(J, I, X);
404 DST(1, 2) = DST(3, 3) = AVG3(K, J, I);
405 DST(1, 3) = AVG3(L, K, J);
408 #undef DST
415 static void VE8uv(uint8_t *dst) { // vertical
418 memcpy(dst + j * BPS, dst - BPS, 8);
422 static void HE8uv(uint8_t *dst) { // horizontal
425 memset(dst, dst[-1], 8);
426 dst += BPS;
431 static WEBP_INLINE void Put8x8uv(uint8_t value, uint8_t* dst) {
436 *(uint64_t*)(dst + j * BPS) = v;
439 for (j = 0; j < 8; ++j) memset(dst + j * BPS, value, 8);
443 static void DC8uv(uint8_t *dst) { // DC
447 dc0 += dst[i - BPS] + dst[-1 + i * BPS];
449 Put8x8uv(dc0 >> 4, dst);
452 static void DC8uvNoLeft(uint8_t *dst) { // DC with no left samples
456 dc0 += dst[i - BPS];
458 Put8x8uv(dc0 >> 3, dst);
461 static void DC8uvNoTop(uint8_t *dst) { // DC with no top samples
465 dc0 += dst[-1 + i * BPS];
467 Put8x8uv(dc0 >> 3, dst);
470 static void DC8uvNoTopLeft(uint8_t *dst) { // DC with nothing
471 Put8x8uv(0x80, dst);