[FFmpeg-soc] [soc]: r3920 - in dirac/libavcodec: dirac_arith.c dirac_arith.h diracdec.c diracenc.c

conrad subversion at mplayerhq.hu
Thu Jan 1 21:31:51 CET 2009


Author: conrad
Date: Thu Jan  1 21:31:51 2009
New Revision: 3920

Log:
Rename dirac arith coder functions to mirror cabac/rangecoder

Modified:
   dirac/libavcodec/dirac_arith.c
   dirac/libavcodec/dirac_arith.h
   dirac/libavcodec/diracdec.c
   dirac/libavcodec/diracenc.c

Modified: dirac/libavcodec/dirac_arith.c
==============================================================================
--- dirac/libavcodec/dirac_arith.c	Thu Jan  1 21:31:48 2009	(r3919)
+++ dirac/libavcodec/dirac_arith.c	Thu Jan  1 21:31:51 2009	(r3920)
@@ -213,7 +213,7 @@ static void dirac_arith_init_common(dira
  * @param gb GetBitContext to read from
  * @param length amount of bytes to decode
  */
-void dirac_arith_init(dirac_arith_state arith,
+void dirac_init_arith_decoder(dirac_arith_state arith,
                       GetBitContext *gb, int length)
 {
     align_get_bits(gb);
@@ -225,7 +225,7 @@ void dirac_arith_init(dirac_arith_state 
     dirac_arith_init_common(arith);
 }
 
-void dirac_arith_coder_init(dirac_arith_state arith, PutBitContext *pb)
+void dirac_init_arith_encoder(dirac_arith_state arith, PutBitContext *pb)
 {
     arith->pb        = pb;
     arith->carry     = 0;
@@ -241,7 +241,7 @@ void dirac_arith_coder_init(dirac_arith_
  * @param context the context of the bit to read
  * @return the bit read
  */
-int dirac_arith_get_bit(dirac_arith_state arith, int context)
+int dirac_get_arith_bit(dirac_arith_state arith, int context)
 {
     GetBitContext *gb = arith->gb;
     unsigned int prob_zero = arith->contexts[context];
@@ -297,7 +297,7 @@ int dirac_arith_get_bit(dirac_arith_stat
  * @param context the context of the bit to write
  * @param bit the bit to write
  */
-void dirac_arith_put_bit(dirac_arith_state arith, int context, int bit)
+void dirac_put_arith_bit(dirac_arith_state arith, int context, int bit)
 {
     PutBitContext *pb = arith->pb;
     unsigned int prob_zero = arith->contexts[context];
@@ -346,15 +346,15 @@ unsigned int follow_context(int index,
  * @param context_set the collection of contexts to read the unsigned int
  * @return value read by arithmetic decoder
  */
-unsigned int dirac_arith_read_uint(dirac_arith_state arith,
+unsigned int dirac_get_arith_uint(dirac_arith_state arith,
                                    struct dirac_arith_context_set *context_set)
 {
     int ret = 1;
     int index = 0;
 
-    while (dirac_arith_get_bit (arith, follow_context(index, context_set)) == 0) {
+    while (dirac_get_arith_bit (arith, follow_context(index, context_set)) == 0) {
         ret <<= 1;
-        if (dirac_arith_get_bit (arith, context_set->data))
+        if (dirac_get_arith_bit (arith, context_set->data))
             ret++;
         index++;
     }
@@ -369,7 +369,7 @@ unsigned int dirac_arith_read_uint(dirac
  * @param context_set  the collection of contexts used to write the unsigned int
  * @param i            value to write
  */
-void dirac_arith_write_uint(dirac_arith_state arith,
+void dirac_put_arith_uint(dirac_arith_state arith,
                             struct dirac_arith_context_set *context_set,
                             unsigned int i)
 {
@@ -377,10 +377,10 @@ void dirac_arith_write_uint(dirac_arith_
     int index = 0;
     while(log) {
         log--;
-        dirac_arith_put_bit(arith, follow_context(index++, context_set), 0);
-        dirac_arith_put_bit(arith, context_set->data, (i >> log)&1);
+        dirac_put_arith_bit(arith, follow_context(index++, context_set), 0);
+        dirac_put_arith_bit(arith, context_set->data, (i >> log)&1);
     }
-    dirac_arith_put_bit(arith, follow_context(index, context_set), 1);
+    dirac_put_arith_bit(arith, follow_context(index, context_set), 1);
 }
 
 /**
@@ -389,11 +389,11 @@ void dirac_arith_write_uint(dirac_arith_
  * @param context_set the collection of contexts to read the signed int
  * @return value read by arithmetic decoder
  */
-int dirac_arith_read_int(dirac_arith_state arith,
+int dirac_get_arith_int(dirac_arith_state arith,
                          struct dirac_arith_context_set *context_set)
 {
-    int ret = dirac_arith_read_uint(arith, context_set);
-    if (ret != 0 && dirac_arith_get_bit(arith, context_set->sign))
+    int ret = dirac_get_arith_uint(arith, context_set);
+    if (ret != 0 && dirac_get_arith_bit(arith, context_set->sign))
         ret = -ret;
     return ret;
 }
@@ -405,13 +405,13 @@ int dirac_arith_read_int(dirac_arith_sta
  * @param context_set  the collection of contexts used to write the signed int
  * @param i            value to write
  */
-void dirac_arith_write_int(dirac_arith_state arith,
+void dirac_put_arith_int(dirac_arith_state arith,
                            struct dirac_arith_context_set *context_set,
                            int i)
 {
-    dirac_arith_write_uint(arith, context_set, FFABS(i));
+    dirac_put_arith_uint(arith, context_set, FFABS(i));
     if (i)
-        dirac_arith_put_bit(arith, context_set->sign, i < 0);
+        dirac_put_arith_bit(arith, context_set->sign, i < 0);
 }
 
 
@@ -419,7 +419,7 @@ void dirac_arith_write_int(dirac_arith_s
  * Flush the arithmetic decoder, consume all bytes up to the
  * initialized length.
  */
-void dirac_arith_flush(dirac_arith_state arith)
+void dirac_get_arith_terminate(dirac_arith_state arith)
 {
     assert(!arith->pb);
     skip_bits_long(arith->gb, arith->bits_left);
@@ -430,7 +430,7 @@ void dirac_arith_flush(dirac_arith_state
 /**
  * Flush the arithmetic coder.
  */
-void dirac_arith_coder_flush(dirac_arith_state arith)
+void dirac_put_arith_terminate(dirac_arith_state arith)
 {
     int i;
     int rem;
@@ -491,37 +491,37 @@ void dirac_arith_test(void) {
 
     /* Code the string. */
     init_put_bits(&pb, buf, sizeof(buf)*8);
-    dirac_arith_coder_init(&arith, &pb);
+    dirac_init_arith_encoder(&arith, &pb);
     for (c = 0; c < sizeof(in); c++) {
         for (i = 0; i < 8; i++) {
             int bit = (in[c] >> (7 - i)) & 1;
-            dirac_arith_put_bit(&arith, i, bit);
+            dirac_put_arith_bit(&arith, i, bit);
         }
     }
 
-    dirac_arith_write_uint(&arith, &context, 50);
-    dirac_arith_write_uint(&arith, &context, 100000);
-    dirac_arith_write_uint(&arith, &context, 0);
-    dirac_arith_write_uint(&arith, &context, 123);
-    dirac_arith_write_uint(&arith, &context, 4321);
+    dirac_put_arith_uint(&arith, &context, 50);
+    dirac_put_arith_uint(&arith, &context, 100000);
+    dirac_put_arith_uint(&arith, &context, 0);
+    dirac_put_arith_uint(&arith, &context, 123);
+    dirac_put_arith_uint(&arith, &context, 4321);
 
-    dirac_arith_write_int(&arith, &context, -100);
-    dirac_arith_write_int(&arith, &context, -12345);
-    dirac_arith_write_int(&arith, &context, 0);
-    dirac_arith_write_int(&arith, &context, 1234);
-    dirac_arith_write_int(&arith, &context, -1);
+    dirac_put_arith_int(&arith, &context, -100);
+    dirac_put_arith_int(&arith, &context, -12345);
+    dirac_put_arith_int(&arith, &context, 0);
+    dirac_put_arith_int(&arith, &context, 1234);
+    dirac_put_arith_int(&arith, &context, -1);
 
-    dirac_arith_coder_flush(&arith);
+    dirac_put_arith_terminate(&arith);
     flush_put_bits(&pb);
     length = put_bits_count(&pb);
 
     /* Now decode the string. */
     init_get_bits(&gb, buf, sizeof(buf)*8);
-    dirac_arith_init(&arith, &gb, length);
+    dirac_init_arith_decoder(&arith, &gb, length);
     for(c = 0; 1; c++) {
         out[c] = 0;
         for (i = 0; i < 8; i++) {
-            int bit = dirac_arith_get_bit(&arith, i);
+            int bit = dirac_get_arith_bit(&arith, i);
             out[c] = (out[c] << 1) | bit;
         }
         if (out[c] == 0)
@@ -529,11 +529,11 @@ void dirac_arith_test(void) {
     }
 
     for (i = 0; i < 5; i++)
-        dprintf(0, "UINT: %d\n", dirac_arith_read_uint(&arith, &context));
+        dprintf(0, "UINT: %d\n", dirac_get_arith_uint(&arith, &context));
     for (i = 0; i < 5; i++)
-        dprintf(0, "INT: %d\n", dirac_arith_read_int(&arith, &context));
+        dprintf(0, "INT: %d\n", dirac_get_arith_int(&arith, &context));
 
-    dirac_arith_flush(&arith);
+    dirac_get_arith_terminate(&arith);
 
     dprintf(0, "Encoder input : `%s'\n", in);
     dprintf(0, "Decoder output: `%s'\n", out);

Modified: dirac/libavcodec/dirac_arith.h
==============================================================================
--- dirac/libavcodec/dirac_arith.h	Thu Jan  1 21:31:48 2009	(r3919)
+++ dirac/libavcodec/dirac_arith.h	Thu Jan  1 21:31:51 2009	(r3920)
@@ -101,32 +101,32 @@ extern struct dirac_arith_context_set ff
 extern struct dirac_arith_context_set ff_dirac_context_set_quant;
 extern struct dirac_arith_context_set ff_dirac_context_sets_waveletcoeff[];
 
-void dirac_arith_init(dirac_arith_state arith,
+void dirac_init_arith_decoder(dirac_arith_state arith,
                       GetBitContext *gb, int length);
 
-int dirac_arith_get_bit(dirac_arith_state arith, int context);
+int dirac_get_arith_bit(dirac_arith_state arith, int context);
 
-unsigned int dirac_arith_read_uint(dirac_arith_state arith,
+unsigned int dirac_get_arith_uint(dirac_arith_state arith,
                                    struct dirac_arith_context_set *context_set);
 
-int dirac_arith_read_int(dirac_arith_state arith,
+int dirac_get_arith_int(dirac_arith_state arith,
                          struct dirac_arith_context_set *context_set);
 
-void dirac_arith_flush(dirac_arith_state arith);
+void dirac_get_arith_terminate(dirac_arith_state arith);
 
 
-void dirac_arith_coder_init(dirac_arith_state arith, PutBitContext *pb);
+void dirac_init_arith_encoder(dirac_arith_state arith, PutBitContext *pb);
 
-void dirac_arith_put_bit(dirac_arith_state arith, int bit, int context);
+void dirac_put_arith_bit(dirac_arith_state arith, int bit, int context);
 
-void dirac_arith_write_uint(dirac_arith_state arith,
+void dirac_put_arith_uint(dirac_arith_state arith,
                             struct dirac_arith_context_set *context_set,
                             unsigned int i);
 
-void dirac_arith_write_int(dirac_arith_state arith,
+void dirac_put_arith_int(dirac_arith_state arith,
                            struct dirac_arith_context_set *context_set,
                            int i);
 
-void dirac_arith_coder_flush(dirac_arith_state arith);
+void dirac_put_arith_terminate(dirac_arith_state arith);
 
 #endif /* AVCODEC_DIRAC_ARITH_H */

Modified: dirac/libavcodec/diracdec.c
==============================================================================
--- dirac/libavcodec/diracdec.c	Thu Jan  1 21:31:48 2009	(r3919)
+++ dirac/libavcodec/diracdec.c	Thu Jan  1 21:31:51 2009	(r3920)
@@ -157,12 +157,12 @@ static inline void coeff_unpack_arith(Di
 
     context = &ff_dirac_context_sets_waveletcoeff[idx];
 
-    coeff = dirac_arith_read_uint(&s->arith, context);
+    coeff = dirac_get_arith_uint(&s->arith, context);
 
     read_sign = coeff;
     coeff = coeff_dequant(coeff, qoffset, qfactor);
     if (read_sign) {
-        if (dirac_arith_get_bit(&s->arith, context->sign))
+        if (dirac_get_arith_bit(&s->arith, context->sign))
             coeff = -coeff;
     }
 
@@ -204,7 +204,7 @@ static inline void codeblock(DiracContex
         int zero_block;
         /* Determine if this codeblock is a zero block. */
         if (is_arith)
-            zero_block = dirac_arith_get_bit(&s->arith, ARITH_CONTEXT_ZERO_BLOCK);
+            zero_block = dirac_get_arith_bit(&s->arith, ARITH_CONTEXT_ZERO_BLOCK);
         else
             zero_block = get_bits1(&s->gb);
 
@@ -212,7 +212,7 @@ static inline void codeblock(DiracContex
             return;
 
         if (s->codeblock_mode && is_arith)
-            *quant += dirac_arith_read_int(&s->arith, &ff_dirac_context_set_quant);
+            *quant += dirac_get_arith_int(&s->arith, &ff_dirac_context_set_quant);
         else if (s->codeblock_mode)
             *quant += dirac_get_se_golomb(&s->gb);
     }
@@ -276,7 +276,7 @@ static av_always_inline void decode_subb
     align_get_bits(gb);
 
     if (is_arith)
-        dirac_arith_init(&s->arith, gb, length);
+        dirac_init_arith_decoder(&s->arith, gb, length);
 
     top = 0;
     for (cb_y = 0; cb_y < cb_numy; cb_y++) {
@@ -291,7 +291,7 @@ static av_always_inline void decode_subb
     }
 
     if (is_arith)
-        dirac_arith_flush(&s->arith);
+        dirac_get_arith_terminate(&s->arith);
 
     if (b->orientation == subband_ll && s->refs == 0)
         intra_dc_prediction(b);
@@ -489,12 +489,12 @@ static int dirac_unpack_prediction_param
  */
 static void blockmode_prediction(DiracContext *s, int x, int y)
 {
-    int res = dirac_arith_get_bit(&s->arith, ARITH_CONTEXT_PMODE_REF1);
+    int res = dirac_get_arith_bit(&s->arith, ARITH_CONTEXT_PMODE_REF1);
 
     res ^= mode_prediction(s, x, y, DIRAC_REF_MASK_REF1, 0);
     s->blmotion[y * s->blwidth + x].use_ref |= res;
     if (s->refs == 2) {
-        res = dirac_arith_get_bit(&s->arith, ARITH_CONTEXT_PMODE_REF2);
+        res = dirac_get_arith_bit(&s->arith, ARITH_CONTEXT_PMODE_REF2);
         res ^= mode_prediction(s, x, y, DIRAC_REF_MASK_REF2, 1);
         s->blmotion[y * s->blwidth + x].use_ref |= res << 1;
     }
@@ -514,7 +514,7 @@ static void blockglob_prediction(DiracCo
 
     /* Global motion compensation is not used for this block. */
     if (s->blmotion[y * s->blwidth + x].use_ref & 3) {
-        int res = dirac_arith_get_bit(&s->arith, ARITH_CONTEXT_GLOBAL_BLOCK);
+        int res = dirac_get_arith_bit(&s->arith, ARITH_CONTEXT_GLOBAL_BLOCK);
         res ^= mode_prediction(s, x, y, DIRAC_REF_MASK_GLOBAL, 2);
         s->blmotion[y * s->blwidth + x].use_ref |= res << 2;
     }
@@ -547,7 +547,7 @@ static void unpack_block_dc(DiracContext
         return;
     }
 
-    res = dirac_arith_read_int(&s->arith, &ff_dirac_context_set_dc);
+    res = dirac_get_arith_int(&s->arith, &ff_dirac_context_set_dc);
     res += block_dc_prediction(s, x, y, comp);
 
     s->blmotion[y * s->blwidth + x].dc[comp] = res;
@@ -570,7 +570,7 @@ static void dirac_unpack_motion_vector(D
     if ((s->blmotion[y * s->blwidth + x].use_ref & refmask) != ref + 1)
         return;
 
-    res = dirac_arith_read_int(&s->arith, &ff_dirac_context_set_mv);
+    res = dirac_get_arith_int(&s->arith, &ff_dirac_context_set_mv);
     res += motion_vector_prediction(s, x, y, ref, dir);
     s->blmotion[y * s->blwidth + x].vect[ref][dir] = res;
 }
@@ -588,7 +588,7 @@ static void dirac_unpack_motion_vectors(
     int x, y;
 
     length = svq3_get_ue_golomb(gb);
-    dirac_arith_init(&s->arith, gb, length);
+    dirac_init_arith_decoder(&s->arith, gb, length);
     for (y = 0; y < s->sbheight; y++)
         for (x = 0; x < s->sbwidth; x++) {
                         int q, p;
@@ -605,7 +605,7 @@ static void dirac_unpack_motion_vectors(
                                          4 * y + q * step);
                 }
         }
-    dirac_arith_flush(&s->arith);
+    dirac_get_arith_terminate(&s->arith);
 }
 
 /**
@@ -641,18 +641,18 @@ static int dirac_unpack_block_motion_dat
 
     /* Superblock splitmodes. */
     length = svq3_get_ue_golomb(gb);
-    dirac_arith_init(&s->arith, gb, length);
+    dirac_init_arith_decoder(&s->arith, gb, length);
     for (y = 0; y < s->sbheight; y++)
         for (x = 0; x < s->sbwidth; x++) {
-            int res = dirac_arith_read_uint(&s->arith, &ff_dirac_context_set_split);
+            int res = dirac_get_arith_uint(&s->arith, &ff_dirac_context_set_split);
             s->sbsplit[y * s->sbwidth + x] = res + split_prediction(s, x, y);
             s->sbsplit[y * s->sbwidth + x] %= 3;
         }
-    dirac_arith_flush(&s->arith);
+    dirac_get_arith_terminate(&s->arith);
 
     /* Prediction modes. */
     length = svq3_get_ue_golomb(gb);
-    dirac_arith_init(&s->arith, gb, length);
+    dirac_init_arith_decoder(&s->arith, gb, length);
     for (y = 0; y < s->sbheight; y++)
         for (x = 0; x < s->sbwidth; x++) {
             int q, p;
@@ -668,7 +668,7 @@ static int dirac_unpack_block_motion_dat
                     propagate_block_data(s, step, xblk, yblk);
                 }
         }
-    dirac_arith_flush(&s->arith);
+    dirac_get_arith_terminate(&s->arith);
 
     /* Unpack the motion vectors. */
     for (i = 0; i < s->refs; i++) {
@@ -680,7 +680,7 @@ static int dirac_unpack_block_motion_dat
     for (comp = 0; comp < 3; comp++) {
         /* Unpack the DC values. */
         length = svq3_get_ue_golomb(gb);
-        dirac_arith_init(&s->arith, gb, length);
+        dirac_init_arith_decoder(&s->arith, gb, length);
         for (y = 0; y < s->sbheight; y++)
             for (x = 0; x < s->sbwidth; x++) {
                 int q, p;
@@ -695,7 +695,7 @@ static int dirac_unpack_block_motion_dat
                         propagate_block_data(s, step, xblk, yblk);
                     }
             }
-        dirac_arith_flush(&s->arith);
+        dirac_get_arith_terminate(&s->arith);
     }
 
     return 0;

Modified: dirac/libavcodec/diracenc.c
==============================================================================
--- dirac/libavcodec/diracenc.c	Thu Jan  1 21:31:48 2009	(r3919)
+++ dirac/libavcodec/diracenc.c	Thu Jan  1 21:31:51 2009	(r3920)
@@ -327,7 +327,7 @@ static void encode_coeff(DiracContext *s
     /* XXX: Quantization. */
 
     /* Write out the coefficient. */
-    dirac_arith_write_int(&s->arith, context, coeff);
+    dirac_put_arith_int(&s->arith, context, coeff);
 }
 
 static void encode_codeblock(DiracContext *s, int16_t *coeffs, int level,
@@ -357,7 +357,7 @@ static void encode_codeblock(DiracContex
             }
         }
 
-        dirac_arith_put_bit(&s->arith, ARITH_CONTEXT_ZERO_BLOCK, zero);
+        dirac_put_arith_bit(&s->arith, ARITH_CONTEXT_ZERO_BLOCK, zero);
 
         if (zero)
             return;
@@ -389,7 +389,7 @@ static inline
 void dirac_arithblk_writelen(DiracContext *s,  PutBitContext *pb)
 {
     int length ;
-    dirac_arith_coder_flush(&s->arith);
+    dirac_put_arith_terminate(&s->arith);
     flush_put_bits(pb);
     length = put_bits_count(pb) / 8;
     dirac_set_ue_golomb(&s->pb, length);
@@ -420,7 +420,7 @@ static int encode_subband(DiracContext *
     /* Encode the data. */
 
     init_put_bits(&pb, s->encodebuf, (1 << 20) * 8);
-    dirac_arith_coder_init(&s->arith, &pb);
+    dirac_init_arith_encoder(&s->arith, &pb);
 
     if (level == 0 && s->refs == 0)
         intra_dc_coding(s, coeffs);
@@ -533,13 +533,13 @@ static void blockmode_encode(DiracContex
 {
     int res = s->blmotion[y * s->blwidth + x].use_ref & DIRAC_REF_MASK_REF1;
     res ^= mode_prediction(s, x, y, DIRAC_REF_MASK_REF1, 0);
-    dirac_arith_put_bit(&s->arith, ARITH_CONTEXT_PMODE_REF2, res);
+    dirac_put_arith_bit(&s->arith, ARITH_CONTEXT_PMODE_REF2, res);
 
     if (s->refs == 2) {
         res = (s->blmotion[y * s->blwidth + x].use_ref
                & DIRAC_REF_MASK_REF2) >> 1;
         res ^= mode_prediction(s, x, y, DIRAC_REF_MASK_REF2, 1);
-        dirac_arith_put_bit(&s->arith, ARITH_CONTEXT_PMODE_REF2, res);
+        dirac_put_arith_bit(&s->arith, ARITH_CONTEXT_PMODE_REF2, res);
     }
 }
 
@@ -554,7 +554,7 @@ static void blockglob_encode(DiracContex
         int res = (s->blmotion[y * s->blwidth + x].use_ref
                    & DIRAC_REF_MASK_GLOBAL) >> 2;
         res ^= mode_prediction(s, x, y, DIRAC_REF_MASK_GLOBAL, 2);
-        dirac_arith_put_bit(&s->arith, ARITH_CONTEXT_GLOBAL_BLOCK, res);
+        dirac_put_arith_bit(&s->arith, ARITH_CONTEXT_GLOBAL_BLOCK, res);
     }
 }
 
@@ -571,7 +571,7 @@ static void dirac_pack_motion_vector(Dir
 
     res = s->blmotion[y * s->blwidth + x].vect[ref][dir];
     res -= motion_vector_prediction(s, x, y, ref, dir);
-    dirac_arith_write_int(&s->arith, &dirac_context_set_mv, res);
+    dirac_put_arith_int(&s->arith, &dirac_context_set_mv, res);
 }
 
 static void dirac_pack_motion_vectors(DiracContext *s, int ref, int dir)
@@ -580,7 +580,7 @@ static void dirac_pack_motion_vectors(Di
     int x, y;
 
     init_put_bits(&pb, s->encodebuf, (1 << 20) * 8);
-    dirac_arith_coder_init(&s->arith, &pb);
+    dirac_init_arith_encoder(&s->arith, &pb);
     for (y = 0; y < s->sbheight; y++)
         for (x = 0; x < s->sbwidth; x++) {
                         int q, p;
@@ -608,7 +608,7 @@ static void pack_block_dc(DiracContext *
 
     res = s->blmotion[y * s->blwidth + x].dc[comp];
     res -= block_dc_prediction(s, x, y, comp);
-    dirac_arith_write_int(&s->arith, &dirac_context_set_dc, res);
+    dirac_put_arith_int(&s->arith, &dirac_context_set_dc, res);
 }
 
 static int dirac_encode_blockdata(DiracContext *s)
@@ -668,7 +668,7 @@ static int dirac_encode_blockdata(DiracC
     /* Superblock splitmodes.  XXX: Just (for now) encode "2", so that
        blocks are not split at all. */
     init_put_bits(&pb, s->encodebuf, (1 << 20) * 8);
-    dirac_arith_coder_init(&s->arith, &pb);
+    dirac_init_arith_encoder(&s->arith, &pb);
     for (y = 0; y < s->sbheight; y++)
         for (x = 0; x < s->sbwidth; x++) {
             int res;
@@ -680,14 +680,14 @@ static int dirac_encode_blockdata(DiracC
             if (res < 0)
                 res += 3;
 
-            dirac_arith_write_uint(&s->arith, &dirac_context_set_split, res);
+            dirac_put_arith_uint(&s->arith, &dirac_context_set_split, res);
         }
     dirac_arithblk_writelen(s, &pb);
     dirac_arithblk_writedata(s, &pb);
 
     /* Prediction modes. */
     init_put_bits(&pb, s->encodebuf, (1 << 20) * 8);
-    dirac_arith_coder_init(&s->arith, &pb);
+    dirac_init_arith_encoder(&s->arith, &pb);
     for (y = 0; y < s->sbheight; y++)
         for (x = 0; x < s->sbwidth; x++) {
             int q, p;
@@ -717,7 +717,7 @@ static int dirac_encode_blockdata(DiracC
     for (comp = 0; comp < 3; comp++) {
         /* Unpack the DC values. */
         init_put_bits(&pb, s->encodebuf, (1 << 20) * 8);
-        dirac_arith_coder_init(&s->arith, &pb);
+        dirac_init_arith_encoder(&s->arith, &pb);
         for (y = 0; y < s->sbheight; y++)
             for (x = 0; x < s->sbwidth; x++) {
                 int q, p;



More information about the FFmpeg-soc mailing list