2 * Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
16 void vp8_predict_dc(short *lastdc, short *thisdc, short quant, short *cons)
20 int last_dc = *lastdc;
21 int this_dc = *thisdc;
23 if (*cons > DCPREDCNTTHRESH)
28 diff = abs(last_dc - this_dc);
29 sign = (last_dc >> 31) ^(this_dc >> 31);
30 sign |= (!last_dc | !this_dc);
38 if (diff <= DCPREDSIMTHRESH * quant)