framing.c (b0920f25512200cd1f47374647b9697aae5e350f) | framing.c (c1ab6cc1beb14b16b46e74a3723644016d8c3cc7) |
---|---|
1/****************************************************************************** 2 * 3 * Copyright (C) 2014 The Android Open Source Project 4 * Copyright 2003 - 2004 Open Interface North America, Inc. All rights reserved. 5 * 6 * Licensed under the Apache License, Version 2.0 (the "License"); 7 * you may not use this file except in compliance with the License. 8 * You may obtain a copy of the License at: --- 191 unchanged lines hidden (view full) --- 200 /* Count is the number of whole bytes subject to CRC. Actually, it's one 201 * more than this number, because data[3] is the CRC field itself, which is 202 * explicitly skipped. Since crc_iterate (should be) inlined, it's cheaper 203 * spacewise to include the check in the loop. This shouldn't be much of a 204 * bottleneck routine in the first place. */ 205 206 OI_UINT count = (frame->nrof_subbands * frame->nrof_channels / 2u) + 4; 207 | 1/****************************************************************************** 2 * 3 * Copyright (C) 2014 The Android Open Source Project 4 * Copyright 2003 - 2004 Open Interface North America, Inc. All rights reserved. 5 * 6 * Licensed under the Apache License, Version 2.0 (the "License"); 7 * you may not use this file except in compliance with the License. 8 * You may obtain a copy of the License at: --- 191 unchanged lines hidden (view full) --- 200 /* Count is the number of whole bytes subject to CRC. Actually, it's one 201 * more than this number, because data[3] is the CRC field itself, which is 202 * explicitly skipped. Since crc_iterate (should be) inlined, it's cheaper 203 * spacewise to include the check in the loop. This shouldn't be much of a 204 * bottleneck routine in the first place. */ 205 206 OI_UINT count = (frame->nrof_subbands * frame->nrof_channels / 2u) + 4; 207 |
208 if (frame->mode == SBC_JOINT_STEREO && frame->nrof_subbands == 8) { | 208 if ((frame->mode == SBC_JOINT_STEREO) && (frame->nrof_subbands == 8)) { |
209 count++; 210 } 211 212 for (i = 1; i < count; i++) { 213 if (i != 3) { 214 crc = crc_iterate(crc,data[i]); 215 } 216 } 217 | 209 count++; 210 } 211 212 for (i = 1; i < count; i++) { 213 if (i != 3) { 214 crc = crc_iterate(crc,data[i]); 215 } 216 } 217 |
218 if (frame->mode == SBC_JOINT_STEREO && frame->nrof_subbands == 4) { | 218 if ((frame->mode == SBC_JOINT_STEREO) && (frame->nrof_subbands == 4)) { |
219 crc = crc_iterate_top4(crc, data[i]); 220 } 221 222 return crc; 223} 224 225void OI_SBC_ExpandFrameFields(OI_CODEC_SBC_FRAME_INFO *frame) 226{ --- 52 unchanged lines hidden --- | 219 crc = crc_iterate_top4(crc, data[i]); 220 } 221 222 return crc; 223} 224 225void OI_SBC_ExpandFrameFields(OI_CODEC_SBC_FRAME_INFO *frame) 226{ --- 52 unchanged lines hidden --- |