Rename cdf variables from clpf to dering.
authorNathan E. Egge <negge@dgql.org>
Sat, 26 Mar 2016 16:10:19 +0000 (12:10 -0400)
committerNathan E. Egge <negge@dgql.org>
Sun, 27 Mar 2016 06:49:09 +0000 (02:49 -0400)
src/decode.c
src/encode.c
src/state.c
src/state.h

index da83437..d817655 100644 (file)
@@ -1047,8 +1047,8 @@ static void od_decode_coefficients(od_dec_ctx *dec, od_mb_dec_ctx *mbctx) {
           c = up + left;
         }
         else c = 0;
-        level = od_decode_cdf_adapt(&dec->ec, state->adapt.clpf_cdf[c],
-         OD_DERING_LEVELS, state->adapt.clpf_increment, "clp");
+        level = od_decode_cdf_adapt(&dec->ec, state->adapt.dering_cdf[c],
+         OD_DERING_LEVELS, state->adapt.dering_increment, "dering");
         state->dering_level[sby*nhdr + sbx] = level;
         if (level) {
           for (pli = 0; pli < nplanes; pli++) {
index b48f7ac..b9f0e18 100644 (file)
@@ -2789,7 +2789,7 @@ static void od_encode_coefficients(daala_enc_ctx *enc, od_mb_enc_ctx *mbctx,
           }
           dist = od_compute_dist(enc, orig, out, n, 3, pli);
           best_dist = dist
-           + lambda*od_encode_cdf_cost(0, state->adapt.clpf_cdf[c],
+           + lambda*od_encode_cdf_cost(0, state->adapt.dering_cdf[c],
            OD_DERING_LEVELS);
           for (gi = 1; gi < OD_DERING_LEVELS; gi++) {
             threshold = (int)(OD_DERING_GAIN_TABLE[gi]*base_threshold);
@@ -2808,7 +2808,7 @@ static void od_encode_coefficients(daala_enc_ctx *enc, od_mb_enc_ctx *mbctx,
                 }
               }
               dist = od_compute_dist(enc, orig, buf32, n, 3, pli)
-               + lambda*od_encode_cdf_cost(gi, state->adapt.clpf_cdf[c],
+               + lambda*od_encode_cdf_cost(gi, state->adapt.dering_cdf[c],
                OD_DERING_LEVELS);
             }
             if (dist < best_dist) {
@@ -2818,8 +2818,8 @@ static void od_encode_coefficients(daala_enc_ctx *enc, od_mb_enc_ctx *mbctx,
           }
         }
         state->dering_level[sby*nhdr + sbx] = best_gi;
-        od_encode_cdf_adapt(&enc->ec, best_gi, state->adapt.clpf_cdf[c],
-         OD_DERING_LEVELS, state->adapt.clpf_increment);
+        od_encode_cdf_adapt(&enc->ec, best_gi, state->adapt.dering_cdf[c],
+         OD_DERING_LEVELS, state->adapt.dering_increment);
         if (best_gi) {
           for (pli = 0; pli < nplanes; pli++) {
             int threshold;
index 8d2f301..9d75761 100644 (file)
@@ -568,8 +568,8 @@ void od_adapt_ctx_reset(od_adapt_ctx *state, int is_keyframe) {
       }
     }
   }
-  state->clpf_increment = 128;
-  OD_CDFS_INIT(state->clpf_cdf, state->clpf_increment >> 2);
+  state->dering_increment = 128;
+  OD_CDFS_INIT(state->dering_cdf, state->dering_increment >> 2);
   state->q_increment = 128;
   OD_CDFS_INIT(state->q_cdf, state->q_increment >> 2);
 }
index 7f38323..2a5aa56 100644 (file)
@@ -161,8 +161,8 @@ struct od_adapt_ctx {
   int haar_split_increment;
   uint16_t haar_bits_cdf[3][16];
   int haar_bits_increment;
-  uint16_t clpf_cdf[2*OD_DERING_LEVELS - 1][OD_DERING_LEVELS];
-  int clpf_increment;
+  uint16_t dering_cdf[2*OD_DERING_LEVELS - 1][OD_DERING_LEVELS];
+  int dering_increment;
   /* 4 possible values for the sblock above (or skip), 4 for the sblock to the
      left (or skip). */
   uint16_t q_cdf[4*4][4];