Lines Matching defs:bpno

599 static int getnmsedec_sig(int x, int bpno)
601 if (bpno > NMSEDEC_FRACBITS)
602 return lut_nmsedec_sig[(x >> (bpno - NMSEDEC_FRACBITS)) & ((1 << NMSEDEC_BITS) - 1)];
606 static int getnmsedec_ref(int x, int bpno)
608 if (bpno > NMSEDEC_FRACBITS)
609 return lut_nmsedec_ref[(x >> (bpno - NMSEDEC_FRACBITS)) & ((1 << NMSEDEC_BITS) - 1)];
613 static void encode_sigpass(Jpeg2000T1Context *t1, int width, int height, int bandno, int *nmsedec, int bpno)
615 int y0, x, y, mask = 1 << (bpno + NMSEDEC_FRACBITS);
627 *nmsedec += getnmsedec_sig(t1->data[(y) * t1->stride + x], bpno + NMSEDEC_FRACBITS);
635 static void encode_refpass(Jpeg2000T1Context *t1, int width, int height, int *nmsedec, int bpno)
637 int y0, x, y, mask = 1 << (bpno + NMSEDEC_FRACBITS);
643 *nmsedec += getnmsedec_ref(t1->data[(y) * t1->stride + x], bpno + NMSEDEC_FRACBITS);
649 static void encode_clnpass(Jpeg2000T1Context *t1, int width, int height, int bandno, int *nmsedec, int bpno)
651 int y0, x, y, mask = 1 << (bpno + NMSEDEC_FRACBITS);
678 *nmsedec += getnmsedec_sig(t1->data[(y) * t1->stride + x], bpno + NMSEDEC_FRACBITS);
693 *nmsedec += getnmsedec_sig(t1->data[(y) * t1->stride + x], bpno + NMSEDEC_FRACBITS);
707 int pass_t = 2, passno, x, y, max=0, nmsedec, bpno;
727 bpno = cblk->nonzerobits - 1;
732 for (passno = 0; bpno >= 0; passno++){
736 case 0: encode_sigpass(t1, width, height, bandpos, &nmsedec, bpno);
738 case 1: encode_refpass(t1, width, height, &nmsedec, bpno);
740 case 2: encode_clnpass(t1, width, height, bandpos, &nmsedec, bpno);
747 wmsedec += (int64_t)nmsedec << (2*bpno);
752 bpno--;