26 unsigned long pw_lsb = (mask >> 1) * 0x0001000100010001ULL;
27 unsigned long pw_msb = pw_lsb + 0x0001000100010001ULL;
28 for (i = 0; i <= w - (int)
sizeof(
long)/2; i +=
sizeof(long)/2) {
29 long a = *(
long*)(src+i);
30 long b = *(
long*)(dst+i);
31 *(
long*)(dst+i) = ((a&pw_lsb) + (b&pw_lsb)) ^ ((a^b)&pw_msb);
34 dst[i] = (dst[i] + src[i]) &
mask;
39 #if !HAVE_FAST_UNALIGNED
40 if((
long)src2 & (
sizeof(
long)-1)){
41 for(i=0; i+3<w; i+=4){
42 dst[i+0] = (src1[i+0]-src2[i+0]) & mask;
43 dst[i+1] = (src1[i+1]-src2[i+1]) & mask;
44 dst[i+2] = (src1[i+2]-src2[i+2]) & mask;
45 dst[i+3] = (src1[i+3]-src2[i+3]) & mask;
50 unsigned long pw_lsb = (mask >> 1) * 0x0001000100010001ULL;
51 unsigned long pw_msb = pw_lsb + 0x0001000100010001ULL;
53 for (i = 0; i <= w - (int)
sizeof(
long)/2; i +=
sizeof(long)/2) {
54 long a = *(
long*)(src1+i);
55 long b = *(
long*)(src2+i);
56 *(
long*)(dst+i) = ((a|pw_msb) - (b&pw_lsb)) ^ ((a^b^pw_msb)&pw_msb);
60 dst[i] = (src1[i] - src2[i]) &
mask;
71 l = (
mid_pred(l, src[i], (l + src[i] - lt) & mask) + diff[i]) & mask;
88 const int pred =
mid_pred(l, src1[i], (l + src1[i] - lt) & mask);
91 dst[i] = (l -
pred) & mask;
101 for(i=0; i<w-1; i++){
static void add_int16_c(uint16_t *dst, const uint16_t *src, unsigned mask, int w)
void(* diff_int16)(uint16_t *dst, const uint16_t *src1, const uint16_t *src2, unsigned mask, int w)
int(* add_hfyu_left_pred_int16)(uint16_t *dst, const uint16_t *src, unsigned mask, int w, unsigned left)
static const uint16_t mask[17]
Libavcodec external API header.
void ff_llviddsp_init(LLVidDSPContext *c, AVCodecContext *avctx)
void ff_llviddsp_init_x86(LLVidDSPContext *llviddsp, AVCodecContext *avctx)
void(* add_int16)(uint16_t *dst, const uint16_t *src, unsigned mask, int w)
static const float pred[4]
main external API structure.
static void sub_hfyu_median_pred_int16_c(uint16_t *dst, const uint16_t *src1, const uint16_t *src2, unsigned mask, int w, int *left, int *left_top)
void(* add_hfyu_median_pred_int16)(uint16_t *dst, const uint16_t *top, const uint16_t *diff, unsigned mask, int w, int *left, int *left_top)
static av_always_inline int diff(const uint32_t a, const uint32_t b)
static int add_hfyu_left_pred_int16_c(uint16_t *dst, const uint16_t *src, unsigned mask, int w, unsigned acc)
static void add_hfyu_median_pred_int16_c(uint16_t *dst, const uint16_t *src, const uint16_t *diff, unsigned mask, int w, int *left, int *left_top)
void(* sub_hfyu_median_pred_int16)(uint16_t *dst, const uint16_t *src1, const uint16_t *src2, unsigned mask, int w, int *left, int *left_top)
static void diff_int16_c(uint16_t *dst, const uint16_t *src1, const uint16_t *src2, unsigned mask, int w)