]> granicus.if.org Git - openjpeg/commitdiff
[trunk] remove old v1 function t1_encode_blocks
authorMickael Savinaud <savmickael@users.noreply.github.com>
Thu, 27 Sep 2012 13:43:27 +0000 (13:43 +0000)
committerMickael Savinaud <savmickael@users.noreply.github.com>
Thu, 27 Sep 2012 13:43:27 +0000 (13:43 +0000)
libopenjpeg/t1.c
libopenjpeg/t1.h

index 42c0f63ae810bcbaf5523ca258756d4fb830ea09..1e61784167a8f6984266184c37199cae88373872 100644 (file)
@@ -988,104 +988,6 @@ static void t1_encode_cblk(
 
 /* ----------------------------------------------------------------------- */
 
-void t1_encode_cblks(
-               opj_t1_t *t1,
-               opj_tcd_tile_t *tile,
-               opj_tcp_t *tcp)
-{
-       int compno, resno, bandno, precno, cblkno;
-
-       tile->distotile = 0;            /* fixed_quality */
-
-       for (compno = 0; compno < tile->numcomps; ++compno) {
-               opj_tcd_tilecomp_t* tilec = &tile->comps[compno];
-               opj_tccp_t* tccp = &tcp->tccps[compno];
-               int tile_w = tilec->x1 - tilec->x0;
-
-               for (resno = 0; resno < tilec->numresolutions; ++resno) {
-                       opj_tcd_resolution_t *res = &tilec->resolutions[resno];
-
-                       for (bandno = 0; bandno < res->numbands; ++bandno) {
-                               opj_tcd_band_t* restrict band = &res->bands[bandno];
-        int bandconst = 8192 * 8192 / ((int) floor(band->stepsize * 8192));
-
-                               for (precno = 0; precno < res->pw * res->ph; ++precno) {
-                                       opj_tcd_precinct_t *prc = &band->precincts[precno];
-
-                                       for (cblkno = 0; cblkno < prc->cw * prc->ch; ++cblkno) {
-                                               opj_tcd_cblk_enc_t* cblk = &prc->cblks.enc[cblkno];
-                                               int* restrict datap;
-                                               int* restrict tiledp;
-                                               int cblk_w;
-                                               int cblk_h;
-                                               int i, j;
-
-                                               int x = cblk->x0 - band->x0;
-                                               int y = cblk->y0 - band->y0;
-                                               if (band->bandno & 1) {
-                                                       opj_tcd_resolution_t *pres = &tilec->resolutions[resno - 1];
-                                                       x += pres->x1 - pres->x0;
-                                               }
-                                               if (band->bandno & 2) {
-                                                       opj_tcd_resolution_t *pres = &tilec->resolutions[resno - 1];
-                                                       y += pres->y1 - pres->y0;
-                                               }
-
-                                               if(!opj_t1_allocate_buffers(
-                                                                       t1,
-                                                                       cblk->x1 - cblk->x0,
-                                                                       cblk->y1 - cblk->y0))
-                                               {
-                                                       return;
-                                               }
-
-                                               datap=t1->data;
-                                               cblk_w = t1->w;
-                                               cblk_h = t1->h;
-
-                                               tiledp=&tilec->data[(y * tile_w) + x];
-                                               if (tccp->qmfbid == 1) {
-                                                       for (j = 0; j < cblk_h; ++j) {
-                                                               for (i = 0; i < cblk_w; ++i) {
-                                                                       int tmp = tiledp[(j * tile_w) + i];
-                                                                       datap[(j * cblk_w) + i] = tmp << T1_NMSEDEC_FRACBITS;
-                                                               }
-                                                       }
-                                               } else {                /* if (tccp->qmfbid == 0) */
-                                                       for (j = 0; j < cblk_h; ++j) {
-                                                               for (i = 0; i < cblk_w; ++i) {
-                                                                       int tmp = tiledp[(j * tile_w) + i];
-                                                                       datap[(j * cblk_w) + i] =
-                                                                               fix_mul(
-                                                                               tmp,
-                                                                               bandconst) >> (11 - T1_NMSEDEC_FRACBITS);
-                                                               }
-                                                       }
-                                               }
-
-                                               t1_encode_cblk(
-                                                               t1,
-                                                               cblk,
-                                                               band->bandno,
-                                                               compno,
-                                                               tilec->numresolutions - 1 - resno,
-                                                               tccp->qmfbid,
-                                                               band->stepsize,
-                                                               tccp->cblksty,
-                                                               tile->numcomps,
-                                                               tcp->mct,
-                                                               tile);
-
-                                       } /* cblkno */
-                               } /* precno */
-                       } /* bandno */
-               } /* resno  */
-       } /* compno  */
-}
-
-
-
-
 /* ----------------------------------------------------------------------- */
 /**
  * Creates a new Tier 1 handle
index 62aa160843a53c6b2c892b08e8ff93faaa55f9bb..ab6c626dff1886c2afd28816b980537ee21d7639 100644 (file)
@@ -133,8 +133,8 @@ Decode the code-blocks of a tile
 @param tccp Tile coding parameters
 */
 opj_bool opj_t1_decode_cblks(   opj_t1_t* t1,
-                            opj_tcd_tilecomp_v2_t* tilec,
-                            opj_tccp_t* tccp);
+                                opj_tcd_tilecomp_v2_t* tilec,
+                                opj_tccp_t* tccp);