当前位置: 首页>>代码示例>>C++>>正文


C++ DEBUGVAR函数代码示例

本文整理汇总了C++中DEBUGVAR函数的典型用法代码示例。如果您正苦于以下问题:C++ DEBUGVAR函数的具体用法?C++ DEBUGVAR怎么用?C++ DEBUGVAR使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了DEBUGVAR函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: rvlc_huffman_esc

static int8_t rvlc_huffman_esc(bitfile *ld,
                               int8_t direction)
{
    uint8_t i, j;
    uint32_t cw;
    rvlc_huff_table *h = book_escape;

    i = h->len;
    if (direction > 0)
        cw = faad_getbits(ld, i DEBUGVAR(1,0,""));
    else
        cw = faad_getbits_rev(ld, i DEBUGVAR(1,0,""));

    while ((cw != h->cw)
        && (i < 21))
    {
        h++;
        j = h->len-i;
        i += j;
        cw <<= j;
        if (direction > 0)
            cw |= faad_getbits(ld, j DEBUGVAR(1,0,""));
        else
            cw |= faad_getbits_rev(ld, j DEBUGVAR(1,0,""));
    }

    return h->index;
}
开发者ID:dps123,项目名称:nitrogenS100,代码行数:28,代码来源:rvlc.c

示例2: huffman_getescape

static INLINE int16_t huffman_getescape(bitfile *ld, int16_t sp)
{
    uint8_t neg, i;
    int16_t j;
	int16_t off;

    if (sp < 0)
    {
        if (sp != -16)
            return sp;
        neg = 1;
    } else {
        if (sp != 16)
            return sp;
        neg = 0;
    }

    for (i = 4; ; i++)
    {
        if (faad_get1bit(ld
            DEBUGVAR(1,6,"huffman_getescape(): escape size")) == 0)
        {
            break;
        }
    }

    off = (int16_t)faad_getbits(ld, i
        DEBUGVAR(1,9,"huffman_getescape(): escape"));

    j = off | (1<<i);
    if (neg)
        j = -j;

    return j;
}
开发者ID:hownam,项目名称:fennec,代码行数:35,代码来源:huffman.c

示例3: rvlc_decode_scale_factors

uint8_t rvlc_decode_scale_factors(ic_stream *ics, bitfile *ld)
{
    uint8_t result;
    uint8_t intensity_used = 0;
    uint8_t *rvlc_sf_buffer = NULL;
    uint8_t *rvlc_esc_buffer = NULL;
    bitfile ld_rvlc_sf, ld_rvlc_esc;
//    bitfile ld_rvlc_sf_rev, ld_rvlc_esc_rev;

    if (ics->length_of_rvlc_sf > 0)
    {
        /* We read length_of_rvlc_sf bits here to put it in a
           seperate bitfile.
        */
        rvlc_sf_buffer = faad_getbitbuffer(ld, ics->length_of_rvlc_sf
            DEBUGVAR(1,156,"rvlc_decode_scale_factors(): bitbuffer: length_of_rvlc_sf"));

        faad_initbits(&ld_rvlc_sf, (void*)rvlc_sf_buffer, bit2byte(ics->length_of_rvlc_sf));
//        faad_initbits_rev(&ld_rvlc_sf_rev, (void*)rvlc_sf_buffer,
//            ics->length_of_rvlc_sf);
    }

    if (ics->sf_escapes_present)
    {
        /* We read length_of_rvlc_escapes bits here to put it in a
           seperate bitfile.
        */
        rvlc_esc_buffer = faad_getbitbuffer(ld, ics->length_of_rvlc_escapes
            DEBUGVAR(1,157,"rvlc_decode_scale_factors(): bitbuffer: length_of_rvlc_escapes"));

        faad_initbits(&ld_rvlc_esc, (void*)rvlc_esc_buffer, bit2byte(ics->length_of_rvlc_escapes));
//        faad_initbits_rev(&ld_rvlc_esc_rev, (void*)rvlc_esc_buffer,
//            ics->length_of_rvlc_escapes);
    }

    /* decode the rvlc scale factors and escapes */
    result = rvlc_decode_sf_forward(ics, &ld_rvlc_sf,
        &ld_rvlc_esc, &intensity_used);
//    result = rvlc_decode_sf_reverse(ics, &ld_rvlc_sf_rev,
//        &ld_rvlc_esc_rev, intensity_used);


    if (rvlc_esc_buffer) faad_free(rvlc_esc_buffer);
    if (rvlc_sf_buffer) faad_free(rvlc_sf_buffer);

    if (ics->length_of_rvlc_sf > 0)
        faad_endbits(&ld_rvlc_sf);
    if (ics->sf_escapes_present)
        faad_endbits(&ld_rvlc_esc);

    return result;
}
开发者ID:dps123,项目名称:nitrogenS100,代码行数:52,代码来源:rvlc.c

示例4: rvlc_huffman_sf

static int8_t rvlc_huffman_sf(bitfile *ld_sf, bitfile *ld_esc,
                              int8_t direction)
{
    uint8_t i, j;
    int8_t index;
    uint32_t cw;
    rvlc_huff_table *h = book_rvlc;
    
    i = h->len;
    if (direction > 0)
        cw = faad_getbits(ld_sf, i DEBUGVAR(1,0,""));
    else
        cw = faad_getbits_rev(ld_sf, i DEBUGVAR(1,0,""));

    while ((cw != h->cw)
        && (i < 10))
    {
        h++;
        j = h->len-i;
        i += j;
        cw <<= j;
        if (direction > 0)
            cw |= faad_getbits(ld_sf, j DEBUGVAR(1,0,""));
        else
            cw |= faad_getbits_rev(ld_sf, j DEBUGVAR(1,0,""));
    }

    index = h->index;

    if (index == +ESC_VAL)
    {
        int8_t esc = rvlc_huffman_esc(ld_esc, direction);
        if (esc == 99)
            return 99;
        index += esc;
#ifdef PRINT_RVLC
        printf("esc: %d - ", esc);
#endif
    }
    if (index == -ESC_VAL)
    {
        int8_t esc = rvlc_huffman_esc(ld_esc, direction);
        if (esc == 99)
            return 99;
        index -= esc;
#ifdef PRINT_RVLC
        printf("esc: %d - ", esc);
#endif
    }

    return index;
}
开发者ID:dps123,项目名称:nitrogenS100,代码行数:52,代码来源:rvlc.c

示例5: huffman_binary_quad

static uint8_t huffman_binary_quad(uint8_t cb, bitfile *ld, int16_t *sp)
{
    uint16_t offset = 0;

    while (!hcb3[offset].is_leaf)
    {
        uint8_t b = faad_get1bit(ld
            DEBUGVAR(1,255,"huffman_spectral_data():3"));
        offset += hcb3[offset].data[b];
    }

    if (offset > hcb_bin_table_size[cb])
    {
        /* printf("ERROR: offset into hcb_bin_table = %d >%d!\n", offset,
           hcb_bin_table_size[cb]); */
        return 10;
    }

    sp[0] = hcb3[offset].data[0];
    sp[1] = hcb3[offset].data[1];
    sp[2] = hcb3[offset].data[2];
    sp[3] = hcb3[offset].data[3];

    return 0;
}
开发者ID:hownam,项目名称:fennec,代码行数:25,代码来源:huffman.c

示例6: sbr_extension

static uint16_t sbr_extension(bitfile *ld, sbr_info *sbr,
                              uint8_t bs_extension_id, uint16_t num_bits_left)
{
    switch (bs_extension_id)
    {
#ifdef PS_DEC
    case EXTENSION_ID_PS:
        sbr->ps_used = 1;
        if (!sbr->ps)
        {
            sbr->ps = ps_init(get_sr_index(sbr->sample_rate));
        }
        return ps_data(sbr->ps, ld);
#endif
#ifdef DRM_PS
    case DRM_PARAMETRIC_STEREO:
        sbr->ps_used = 1;
        if (!sbr->drm_ps)
        {
            sbr->drm_ps = drm_ps_init();
        }
        return drm_ps_data(sbr->drm_ps, ld);
#endif
    default:
        sbr->bs_extension_data = (uint8_t)faad_getbits(ld, 6
                                 DEBUGVAR(1,279,"sbr_single_channel_element(): bs_extension_data"));
        return 6;
    }
}
开发者ID:DmitrySigaev,项目名称:DSMedia,代码行数:29,代码来源:sbr_syntax.c

示例7: sbr_dtdf

/* table 8 */
static void sbr_dtdf(bitfile *ld, sbr_info *sbr, uint8_t ch)
{
    uint8_t i;

    for (i = 0; i < sbr->L_E[ch]; i++)
    {
        sbr->bs_df_env[ch][i] = faad_get1bit(ld
            DEBUGVAR(1,269,"sbr_dtdf(): bs_df_env"));
    }

    for (i = 0; i < sbr->L_Q[ch]; i++)
    {
        sbr->bs_df_noise[ch][i] = faad_get1bit(ld
            DEBUGVAR(1,270,"sbr_dtdf(): bs_df_noise"));
    }
}
开发者ID:TravisKraatz,项目名称:cinelerra,代码行数:17,代码来源:sbr_syntax.c

示例8: sinusoidal_coding

/* table 12 */
static void sinusoidal_coding(bitfile *ld, sbr_info *sbr, uint8_t ch)
{
    uint8_t n;

    for (n = 0; n < sbr->N_high; n++)
    {
        sbr->bs_add_harmonic[ch][n] = faad_get1bit(ld
            DEBUGVAR(1,278,"sinusoidal_coding(): bs_add_harmonic"));
    }
}
开发者ID:TravisKraatz,项目名称:cinelerra,代码行数:11,代码来源:sbr_syntax.c

示例9: sbr_noise

/* table 11 */
void sbr_noise(bitfile *ld, sbr_info *sbr, uint8_t ch)
{
    uint8_t noise, band;
    int8_t delta = 0;
    sbr_huff_tab t_huff, f_huff;

    if ((sbr->bs_coupling == 1) && (ch == 1))
    {
        delta = 1;
        t_huff = t_huffman_noise_bal_3_0dB;
        f_huff = f_huffman_env_bal_3_0dB;
    } else {
        delta = 0;
        t_huff = t_huffman_noise_3_0dB;
        f_huff = f_huffman_env_3_0dB;
    }

    for (noise = 0; noise < sbr->L_Q[ch]; noise++)
    {
        if(sbr->bs_df_noise[ch][noise] == 0)
        {
            if ((sbr->bs_coupling == 1) && (ch == 1))
            {
                sbr->Q[ch][0][noise] = (faad_getbits(ld, 5
                                                     DEBUGVAR(1,276,"sbr_noise(): bs_data_noise")) << delta);
            } else {
                sbr->Q[ch][0][noise] = (faad_getbits(ld, 5
                                                     DEBUGVAR(1,277,"sbr_noise(): bs_data_noise")) << delta);
            }
            for (band = 1; band < sbr->N_Q; band++)
            {
                sbr->Q[ch][band][noise] = (sbr_huff_dec(ld, f_huff) << delta);
            }
        } else {
            for (band = 0; band < sbr->N_Q; band++)
            {
                sbr->Q[ch][band][noise] = (sbr_huff_dec(ld, t_huff) << delta);
            }
        }
    }

    extract_noise_floor_data(sbr, ch);
}
开发者ID:h16o2u9u,项目名称:rtoss,代码行数:44,代码来源:sbr_huff.c

示例10: invf_mode

/* table 9 */
static void invf_mode(bitfile *ld, sbr_info *sbr, uint8_t ch)
{
    uint8_t n;

    for (n = 0; n < sbr->N_Q; n++)
    {
        sbr->bs_invf_mode[ch][n] = (uint8_t)faad_getbits(ld, 2
            DEBUGVAR(1,271,"invf_mode(): bs_invf_mode"));
    }
}
开发者ID:TravisKraatz,项目名称:cinelerra,代码行数:11,代码来源:sbr_syntax.c

示例11: ps_extension

static uint16_t ps_extension(ps_info *ps, bitfile *ld,
                             const uint8_t ps_extension_id,
                             const uint16_t num_bits_left)
{
    uint8_t n;
    uint16_t bits = (uint16_t)faad_get_processed_bits(ld);

    if (ps_extension_id == 0)
    {
        ps->enable_ipdopd = (uint8_t)faad_get1bit(ld
                            DEBUGVAR(1,1015,"ps_extension(): enable_ipdopd"));

        if (ps->enable_ipdopd)
        {
            for (n = 0; n < ps->num_env; n++)
            {
                ps->ipd_dt[n] = (uint8_t)faad_get1bit(ld
                                                      DEBUGVAR(1,1016,"ps_extension(): ipd_dt"));

                /* ipd_data */
                huff_data(ld, ps->ipd_dt[n], ps->nr_ipdopd_par, t_huff_ipd,
                          f_huff_ipd, ps->ipd_index[n]);

                ps->opd_dt[n] = (uint8_t)faad_get1bit(ld
                                                      DEBUGVAR(1,1017,"ps_extension(): opd_dt"));

                /* opd_data */
                huff_data(ld, ps->opd_dt[n], ps->nr_ipdopd_par, t_huff_opd,
                          f_huff_opd, ps->opd_index[n]);
            }
        }
        faad_get1bit(ld
                     DEBUGVAR(1,1018,"ps_extension(): reserved_ps"));
    }

    /* return number of bits read */
    bits = (uint16_t)faad_get_processed_bits(ld) - bits;

    return bits;
}
开发者ID:DmitrySigaev,项目名称:DSMedia,代码行数:40,代码来源:ps_syntax.c

示例12: sbr_extension

static uint16_t sbr_extension(bitfile *ld, sbr_info *sbr,
                              uint8_t bs_extension_id, uint16_t num_bits_left)
{
#ifdef PS_DEC
    uint8_t header;
    uint16_t ret;
#endif

    switch (bs_extension_id)
    {
#ifdef PS_DEC
    case EXTENSION_ID_PS:
        if (!sbr->ps)
        {
            sbr->ps = ps_init(get_sr_index(sbr->sample_rate));
        }
        if (sbr->psResetFlag)
        {
            sbr->ps->header_read = 0;
        }
        ret = ps_data(sbr->ps, ld, &header);

        /* enable PS if and only if: a header has been decoded */
        if (sbr->ps_used == 0 && header == 1)
        {
            sbr->ps_used = 1;
        }

        if (header == 1)
        {
            sbr->psResetFlag = 0;
        }

        return ret;
#endif
#ifdef DRM_PS
    case DRM_PARAMETRIC_STEREO:
        sbr->ps_used = 1;
        if (!sbr->drm_ps)
        {
            sbr->drm_ps = drm_ps_init();
        }
        return drm_ps_data(sbr->drm_ps, ld);
#endif
    default:
        sbr->bs_extension_data = (uint8_t)faad_getbits(ld, 6
            DEBUGVAR(1,279,"sbr_single_channel_element(): bs_extension_data"));
        return 6;
    }
}
开发者ID:Bobbin007,项目名称:xbmc,代码行数:50,代码来源:sbr_syntax.c

示例13: DEBUGVAR

uint8_t *faad_getbitbuffer(bitfile *ld, uint32_t bits
                           DEBUGDEC)
{
    uint16_t i;
    uint8_t temp;
    uint16_t bytes = (uint16_t)bits / 8;
    uint8_t remainder = (uint8_t)bits % 8;

    uint8_t *buffer = (uint8_t*)faad_malloc((bytes+1)*sizeof(uint8_t));

    for (i = 0; i < bytes; i++)
    {
        buffer[i] = (uint8_t)faad_getbits(ld, 8 DEBUGVAR(print,var,dbg));
    }

    if (remainder)
    {
        temp = (uint8_t)faad_getbits(ld, remainder DEBUGVAR(print,var,dbg)) << (8-remainder);

        buffer[bytes] = temp;
    }

    return buffer;
}
开发者ID:OpenSageTV,项目名称:mplayer-sage9orig,代码行数:24,代码来源:bits.c

示例14: DEBUGVAR

uint8_t *faad_getbitbuffer(bitfile *ld, uint32_t bits
                       DEBUGDEC)
{
    int i;
    unsigned int temp;
    int bytes = bits >> 3;
    int remainder = bits & 0x7;

    uint8_t *buffer = (uint8_t*)faad_malloc((bytes+1)*sizeof(uint8_t));

    for (i = 0; i < bytes; i++)
    {
        buffer[i] = (uint8_t)faad_getbits(ld, 8 DEBUGVAR(print,var,dbg));
    }

    if (remainder)
    {
        temp = faad_getbits(ld, remainder DEBUGVAR(print,var,dbg)) << (8-remainder);

        buffer[bytes] = (uint8_t)temp;
    }

    return buffer;
}
开发者ID:9060,项目名称:ac3filter.valib,代码行数:24,代码来源:bits.c

示例15: huffman_sign_bits

static INLINE void huffman_sign_bits(bitfile *ld, int16_t *sp, uint8_t len)
{
    uint8_t i;

    for (i = 0; i < len; i++)
    {
        if(sp[i])
        {
            if(faad_get1bit(ld
                DEBUGVAR(1,5,"huffman_sign_bits(): sign bit")) & 1)
            {
                sp[i] = -sp[i];
            }
        }
    }
}
开发者ID:hownam,项目名称:fennec,代码行数:16,代码来源:huffman.c


注:本文中的DEBUGVAR函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。