Lines Matching defs:weight
35 #define UPDATE_WEIGHT(weight, delta, source, result) \
38 weight = ((delta) ^ s) + ((weight) - s); \
41 #define APPLY_WEIGHT_F(weight, sample) ((((((sample) & 0xffff) * (weight)) >> 9) + \
42 ((((sample) & ~0xffff) >> 9) * (weight)) + 1) >> 1)
44 #define APPLY_WEIGHT_I(weight, sample) (((weight) * (sample) + 512) >> 10)
46 #define APPLY_WEIGHT(weight, sample) ((sample) != (short) (sample) ? \
47 APPLY_WEIGHT_F(weight, sample) : APPLY_WEIGHT_I (weight, sample))
524 static int8_t store_weight(int weight)
526 weight = av_clip(weight, -1024, 1024);
527 if (weight > 0)
528 weight -= (weight + 64) >> 7;
530 return (weight + 4) >> 3;
533 static int restore_weight(int8_t weight)
535 int result = 8 * weight;
2340 #define update_weight_d2(weight, delta, source, result) \
2342 weight -= (((source ^ result) >> 29) & 4) - 2;
2344 #define update_weight_clip_d2(weight, delta, source, result) \
2347 if ((weight = (weight ^ s) + (2 - s)) > 1024) weight = 1024; \
2348 weight = (weight ^ s) - s; \