diff options
author | Brad Midgley <bmidgley@xmission.com> | 2007-11-30 15:53:04 +0000 |
---|---|---|
committer | Brad Midgley <bmidgley@xmission.com> | 2007-11-30 15:53:04 +0000 |
commit | 87f83cd60537de472248311f48b6eb4cde6801d4 (patch) | |
tree | e8eed936ba5f41d80fe21988ece5c2619b4958d2 /sbc | |
parent | 76e595a98b7b73ee54ae17e6162f05ad81c9b654 (diff) |
combine two conditionals in bit packing
Diffstat (limited to 'sbc')
-rw-r--r-- | sbc/sbc.c | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -1153,15 +1153,11 @@ static int sbc_pack_frame(uint8_t *data, struct sbc_frame *frame, size_t len) for (blk = 0; blk < frame->blocks; blk++) { for (ch = 0; ch < frame->channels; ch++) { for (sb = 0; sb < frame->subbands; sb++) { - if (levels[ch][sb] > 0) + if (levels[ch][sb] > 0) { audio_sample = (uint16_t) ((((frame->sb_sample_f[blk][ch][sb]*levels[ch][sb]) >> (frame->scale_factor[ch][sb] + 1)) + levels[ch][sb]) >> 1); - else - audio_sample = 0; - - if (bits[ch][sb] != 0) { audio_sample <<= 16 - bits[ch][sb]; for (bit = 0; bit < bits[ch][sb]; bit++) { data[produced >> 3] <<= 1; |