Lines Matching defs:coeff
122 Input: coeff=> DCT coefficient
154 Int tmp, coeff, q_value;
164 Int ac_clip; /* quantized coeff bound */
192 coeff = rcoeff[i];
193 if (coeff == 0x7fff) /* all zero column */
201 if (coeff >= -QPx2plus && coeff < QPx2plus) /* quantize to zero */
206 coeff = rcoeff[i];
207 if (coeff > -QPx2plus && coeff < QPx2plus) /* quantize to zero */
210 coeff = rcoeff[i];
224 coeff = aan_scale(q_value, coeff, round, QPdiv2);
225 q_value = coeff_quant(coeff, q_scale, shift);
231 //coeff = PV_MIN(ac_clip,PV_MAX(-ac_clip-1, q_value));
236 //coeff = PV_MIN(2047,PV_MAX(-2048, q_value));
238 coeff = coeff_dequant(q_value, QPx2, Addition, tmp);
239 rcoeff[i-64] = coeff;
246 coeff = rcoeff[i];
274 Int tmp, coeff, q_value;
282 Int ac_clip; /* quantized coeff bound */
301 coeff = *rcoeff;
303 if (coeff == 0x7fff && !shortHeader) /* all zero column */
310 if (coeff == 0x7fff) /* shortHeader on */
312 coeff = 1; /* can't be zero */
313 qcoeff[0] = coeff;
314 coeff = coeff * dc_scaler;
315 coeff = PV_MAX(-2048, PV_MIN(2047, coeff));
316 rcoeff[-64] = coeff;
326 q_value = round + (coeff << 12);
327 coeff = q_value >> 16;
328 if (coeff >= 0) coeff += (dc_scaler >> 1) ;
329 else coeff -= (dc_scaler >> 1) ;
331 coeff = coeff * q_value;
332 coeff >>= (15 + (dc_scaler >> 4));
333 coeff += ((UInt)coeff >> 31);
336 coeff = PV_MAX(1, PV_MIN(254, coeff));
338 if (coeff)
340 qcoeff[0] = coeff;
341 coeff = coeff * dc_scaler;
342 coeff = PV_MAX(-2048, PV_MIN(2047, coeff));
343 rcoeff[-64] = coeff;
352 coeff = rcoeff[i];
353 if (coeff == 0x7fff) /* all zero row */
361 if (coeff >= -QPx2plus && coeff < QPx2plus) /* quantize to zero */
366 coeff = rcoeff[i];
367 if (coeff > -QPx2plus && coeff < QPx2plus) /* quantize to zero */
370 coeff = rcoeff[i];
383 q_value = smlabb(q_value, coeff, round);
384 coeff = q_value >> 16;
386 q_value = smulbb(q_scale, coeff); /*mov q_value, coeff, lsl #14 */
387 /*smull tmp, coeff, q_value, q_scale*/
393 //coeff = PV_MIN(ac_clip,PV_MAX(-ac_clip-1, q_value));
398 //coeff = PV_MIN(2047,PV_MAX(-2048, q_value));
400 coeff = coeff_dequant(q_value, QPx2, Addition, tmp);
401 rcoeff[i-64] = coeff;
406 coeff = rcoeff[i];
444 Int coeff, scale_q;
450 Int ac_clip; /* quantized coeff bound */
460 coeff = rcoeff[0];
462 if (coeff >= -QPx2plus && coeff < QPx2plus)
471 coeff = aan_dc_scale(coeff, QP);
473 scale_q = coeff_quant(coeff, scale_q, shift);
475 //coeff
481 //coeff = PV_MIN(2047,PV_MAX(-2048, tmp));
483 coeff = coeff_dequant(scale_q, QP, Addition, tmp);
485 rcoeff[0] = coeff;
498 Int tmp, coeff;
503 coeff = rcoeff[0];
505 if (coeff >= 0) coeff += (dc_scaler >> 1) ;
506 else coeff -= (dc_scaler >> 1) ;
508 tmp = coeff * tmp;
518 coeff = tmp * dc_scaler;
519 coeff = PV_MAX(-2048, PV_MIN(2047, coeff));
520 rcoeff[0] = coeff;
533 Input: coeff=> DCT coefficient
549 Int tmp, coeff, q_value = 0;
573 coeff = rcoeff[i];
574 if (coeff == 0x7fff) /* all zero column */
583 q_value = smlabb(q_value, coeff, round);
585 coeff = q_value >> 16;
588 // if(coeff>0) coeff = (16*coeff + (stepsize/2)) / stepsize;
589 // else coeff = (16*coeff - (stepsize/2)) / stepsize;
590 coeff <<= 4;
591 if (coeff >= 0) coeff += (stepsize >> 1) ;
592 else coeff -= (stepsize >> 1) ;
595 coeff = smulbb(coeff, q_value);
597 coeff >>= (15 + (stepsize >> 4));
598 coeff += ((UInt)coeff >> 31);
601 if (coeff >= -QPx2 && coeff < QPx2) /* quantized to zero*/
607 // q_value = coeff/(QPx2);
608 q_value = coeff_quant(coeff, q_scale, shift);
621 //q_value=(((coeff*2)+SIGN0(coeff))*stepsize*QP)/16;
634 coeff = rcoeff[i];
659 coeff = *rcoeff;
660 coeff ^= 0x1;
661 *rcoeff = coeff;
662 if (coeff)
678 Int tmp, coeff, q_value = 0;
699 coeff = *rcoeff;
701 if (coeff == 0x7fff) /* all zero column */
708 q_value = round + (coeff << 12);
709 coeff = q_value >> 16;
710 /*if (coeff >= 0) coeff = (coeff + (dc_scaler/2)) / dc_scaler;
711 else coeff = (coeff - (dc_scaler/2)) / dc_scaler;*/
712 if (coeff >= 0) coeff += (dc_scaler >> 1) ;
713 else coeff -= (dc_scaler >> 1) ;
717 coeff = smulbb(coeff, q_value);
719 coeff >>= (15 + (dc_scaler >> 4));
720 coeff += ((UInt)coeff >> 31);
722 if (coeff)
724 coeff = PV_MAX(1, PV_MIN(254, coeff));
725 qcoeff[0] = coeff;
727 coeff = smulbb(coeff, dc_scaler);
729 q_value = clip_2047(coeff, 2047);
742 coeff = rcoeff[i];
743 if (coeff == 0x7fff) /* all zero row */
754 /* q_value = coeff*q_value + round */
755 q_value = smlabb(coeff, q_value, round);
756 coeff = q_value >> 16;
759 /*if(coeff>0) coeff = (16*coeff + (stepsize/2)) / stepsize;
760 else coeff = (16*coeff - (stepsize/2)) / stepsize;*/
761 coeff <<= 4;
762 if (coeff >= 0) coeff += (stepsize >> 1) ;
763 else coeff -= (stepsize >> 1) ;
767 coeff = smulbb(coeff, q_value);
769 coeff >>= (15 + (stepsize >> 4));
770 coeff += ((UInt)coeff >> 31);
772 if (coeff >= -QPx2plus && coeff < QPx2plus)
778 //q_value = ( coeff + SIGN0(coeff)*((3*QP+2)/4))/(2*QP);
779 if (coeff > 0) coeff += round2;
780 else if (coeff < 0) coeff -= round2;
782 q_value = smulbb(coeff, q_scale);
797 //q_value = (coeff*stepsize*QP*2)/16;
806 coeff = rcoeff[i];
832 coeff = *rcoeff;
833 coeff ^= 0x1;
834 *rcoeff = coeff;
835 if (coeff)
855 Int q_value, coeff, stepsize;
866 coeff = rcoeff[0];
869 /*if(coeff>0) coeff = (16*coeff + (stepsize/2)) / stepsize;
870 else coeff = (16*coeff - (stepsize/2)) / stepsize;*/
871 coeff <<= 4;
872 if (coeff >= 0) coeff += (stepsize >> 1) ;
873 else coeff -= (stepsize >> 1) ;
876 coeff = smulbb(coeff, q_value);
878 coeff >>= (15 + (stepsize >> 4));
879 coeff += ((UInt)coeff >> 31);
881 if (coeff >= -QPx2 && coeff < QPx2)
888 // q_value = coeff/(QPx2);
889 q_value = coeff_quant(coeff, q_scale, shift);
898 //q_value=(((coeff*2)+SIGN0(coeff))*stepsize*QP)/16;
923 Int tmp, coeff, q_value;
931 coeff = rcoeff[0];
933 /*if (coeff >= 0) tmp = (coeff + dc_scaler/2) / dc_scaler;
934 else tmp = (coeff - dc_scaler/2) / dc_scaler;*/
935 if (coeff >= 0) coeff += (dc_scaler >> 1) ;
936 else coeff -= (dc_scaler >> 1) ;
939 tmp = smulbb(tmp, coeff);
945 coeff = PV_MAX(1, PV_MIN(254, tmp));
946 qcoeff[0] = coeff;
948 q_value = smulbb(coeff, dc_scaler);