Commit d7759ec3 authored by norvell's avatar norvell
Browse files

Add debugging fixes in lib_dec/ACcontextMapping_dec.c to resolve build warning

parent 18f6fe3a
Loading
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -348,9 +348,11 @@ int16_t RCcontextMapping_decode2_no_mem_s17_LCS(
    int16_t lastnz, n;
    uint16_t r;
    int16_t resQBits;
#ifdef DEBUGGING
    int16_t nbbits_m2;
    int16_t rest_bits;
#endif
    int16_t nt_half;
    int16_t nbbits_m2;
    int16_t bits_tups; /* No. of bits for coding the no. of tuples */

    set_s( x, 0, nt );
@@ -424,8 +426,10 @@ int16_t RCcontextMapping_decode2_no_mem_s17_LCS(
        /* Initialize range decoder */
        rc_uni_dec_init( &rc_st_dec, &st->bit_stream[st->next_bit_pos], nbbits ); /* (nbbits + 30) entries are read by the decoder */

#ifdef DEBUGGING
        nbbits_m2 = nbbits;
        rest_bits = -nbbits_m2;
#endif

        /* Main Loop through the 2-tuples */
        for ( k = 0; k < lastnz; k += 2 )
@@ -484,11 +488,13 @@ int16_t RCcontextMapping_decode2_no_mem_s17_LCS(
            a += a1 << lev;
            b += b1 << lev;

#ifdef DEBUGGING
            /* Add 2 LSB bits per bit-plane */
            rest_bits += 2 * lev;
            /* Sign bits */
            rest_bits += min( a, 1 );
            rest_bits += min( b, 1 );
#endif

            /* Update bitstream pointer */
            st->next_bit_pos = start_bit_pos + bits_tups + rc_uni_dec_virtual_finish( &rc_st_dec );
@@ -570,8 +576,10 @@ int16_t RCcontextMapping_decode2_no_mem_s17_LCS(
        /* Initialize range decoder */
        rc_uni_dec_init( &rc_st_dec, &st->bit_stream[st->next_bit_pos], nbbits ); /* (nbbits + 30) entries are read by the decoder */

#ifdef DEBUGGING
        nbbits_m2 = nbbits;
        rest_bits = -nbbits_m2;
#endif

        t = 0;
        s = 0;
@@ -624,11 +632,13 @@ int16_t RCcontextMapping_decode2_no_mem_s17_LCS(
            a += a1 << lev;
            b += b1 << lev;

#ifdef DEBUGGING
            /* Add 2 LSB bits per bit-plane */
            rest_bits += 2 * lev;
            /* Sign bits */
            rest_bits += min( a, 1 );
            rest_bits += min( b, 1 );
#endif

            /* Update bitstream pointer */
            st->next_bit_pos = start_bit_pos + bits_tups + rc_uni_dec_virtual_finish( &rc_st_dec );