Lines Matching refs:common
33 static void dualBitAllocation(OI_CODEC_SBC_COMMON_CONTEXT *common)
42 bitcountL = computeBitneed(common, bitneedsL.uint8, 0, &bitpoolPreferenceL);
43 bitcountR = computeBitneed(common, bitneedsR.uint8, 1, &bitpoolPreferenceR);
45 oneChannelBitAllocation(common, &bitneedsL, 0, bitcountL);
46 oneChannelBitAllocation(common, &bitneedsR, 1, bitcountR);
49 static void stereoBitAllocation(OI_CODEC_SBC_COMMON_CONTEXT *common)
51 const OI_UINT nrof_subbands = common->frameInfo.nrof_subbands;
60 bitcount = computeBitneed(common, &bitneeds.uint8[0], 0, &bitpoolPreference);
61 bitcount += computeBitneed(common, &bitneeds.uint8[nrof_subbands], 1, &bitpoolPreference);
65 bitadjust = adjustToFitBitpool(common->frameInfo.bitpool, bitneeds.uint32, 2 * nrof_subbands, bitcount, &ex);
72 excess = allocAdjustedBits(&common->bits.uint8[sbL], bitneeds.uint8[sbL] + bitadjust, excess);
74 excess = allocAdjustedBits(&common->bits.uint8[sbR], bitneeds.uint8[sbR] + bitadjust, excess);
80 excess = allocExcessBits(&common->bits.uint8[sbL], excess);
85 excess = allocExcessBits(&common->bits.uint8[sbR], excess);
99 PRIVATE void OI_SBC_ComputeBitAllocation(OI_CODEC_SBC_COMMON_CONTEXT *common)
101 OI_ASSERT(common->frameInfo.bitpool <= OI_SBC_MaxBitpool(&common->frameInfo));
102 OI_ASSERT(common->frameInfo.mode < OI_ARRAYSIZE(balloc));
108 balloc[common->frameInfo.mode](common);
119 OI_UINT8 OI_CODEC_SBC_GetMaxBitneed(OI_CODEC_SBC_COMMON_CONTEXT *common)
121 OI_UINT8 max = common->maxBitneed;
123 common->maxBitneed = 0;
154 OI_UINT16 OI_CODEC_SBC_CalculatePcmBytes(OI_CODEC_SBC_COMMON_CONTEXT *common)
156 return sizeof(OI_INT16) * common->pcmStride * common->frameInfo.nrof_subbands * common->frameInfo.nrof_blocks;