On Wed, Apr 13, 2011 at 1:46 PM, Michael Niedermayer <[email protected]>wrote:
> > i dont see a specific question in your mail, my suggestion is just to > implement the missing feature. > If you have specific questions ill try my best to help > Hi Michael, The following is the patch for selective arithmetic coding bypass cblk_csty: 595c595 < static void decode_sigpass(J2kT1Context *t1, int width, int height, int bpno, int bandno) --- > static void decode_sigpass(J2kT1Context *t1, int width, int height, int bpno, int bandno, int bpass_csty_symbol) 606,607c606,609 < < t1->data[y][x] = (ff_mqc_decode(&t1->mqc, t1->mqc.cx_states + ctxno) ^ xorbit) ? -mask : mask; --- > if (bpass_csty_symbol) > t1->data[y][x] = ff_mqc_decode(&t1->mqc, t1->mqc.cx_states + ctxno) ? -mask : mask; > else > t1->data[y][x] = (ff_mqc_decode(&t1->mqc, t1->mqc.cx_states + ctxno) ^ xorbit) ? -mask : mask; 688c690 < int passno = cblk->npasses, pass_t = 2, bpno = cblk->nonzerobits - 1, y; --- > int passno = cblk->npasses, pass_t = 2, bpno = cblk->nonzerobits - 1, y, clnpass_cnt = 0; 699a702,704 > bpass_csty_symbols = J2K_CBLK_BYPASS & codsty->cblk_style; > > 702c707 < case 0: decode_sigpass(t1, width, height, bpno+1, bandpos); --- > case 0: decode_sigpass(t1, width, height, bpno+1, bandpos, bpass_csty_symbols & (clnpass_cnt > 4)); 704c709,712 < case 1: decode_refpass(t1, width, height, bpno+1); --- > case 1: > if (clnpass_cnt > 4) > ff_mqc_initdec(&t1->mqc, cblk->data); > decode_refpass(t1, width, height, bpno+1); 706c714,717 < case 2: decode_clnpass(s, t1, width, height, bpno+1, bandpos, --- > case 2: > if (clnpass_cnt > 4) > ff_mqc_initdec(&t1->mqc, cblk->data); > decode_clnpass(s, t1, width, height, bpno+1, bandpos, 707a719 > clnpass_cnt = clnpass_cnt + 1; Pages 115 -117 from the spec have illustrated this implementation. Please let me know if you have any suggestion. Thanks -- Rukhsana Ruby Phd Student Department of Electrical & Computer Engineering The University of British Columbia ============================
_______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
