Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void FUNC(transform_8x8_dc_add)(
- uint8_t *_dst, int16_t *coeffs, ptrdiff_t _stride) {
- int i, j;
- pixel *dst = (pixel *)_dst;
- int stride = _stride/sizeof(pixel);
- int shift = 14 - 8;
- int add = 1 << (shift - 1);
- int coeff = (((coeffs[0] + 1) >> 1) + add) >> shift;
- for (j = 0; j < 8; j++) {
- for (i = 0; i < 8; i++) {
- dst[i+j*stride] = av_clip_pixel(dst[i+j*stride] + coeff);
- }
- }
- }
- cglobal hevc_put_transform8x8_dc_add_8, 3, 4, 3, dst, coeffs, stride, temp
- xor tempq, tempq
- mov tempw, [coeffsq]
- add tempd, 1
- shr tempd, 1
- add tempd, 32
- shr tempd, 6
- movd m0, tempd
- punpcklwd m0, m0
- pshufd m0, m0, 0
- pxor m1, m1
- xor tempq, tempq
- mov tempd, 8
- .loop
- movq m2, [dstq] ; load data from source
- punpcklbw m2, m1
- paddw m2, m0
- packuswb m2, m2
- movq [dstq], m2
- lea dstq, [dstq+strideq] ; dst += dststride
- dec tempd
- jnz .loop ; height loop
- RET
Advertisement
Add Comment
Please, Sign In to add comment