OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
561 | 561 |
562 | 562 |
563 | 563 |
564 /**************************************************************************** | 564 /**************************************************************************** |
565 * WebRtcIsacfix_DecoderInit(...) | 565 * WebRtcIsacfix_DecoderInit(...) |
566 * | 566 * |
567 * This function initializes a ISAC instance prior to the decoder calls. | 567 * This function initializes a ISAC instance prior to the decoder calls. |
568 * | 568 * |
569 * Input: | 569 * Input: |
570 * - ISAC_main_inst : ISAC instance. | 570 * - ISAC_main_inst : ISAC instance. |
571 * | |
572 * Return value | |
573 * : 0 - Ok | |
574 * -1 - Error | |
575 */ | 571 */ |
576 | 572 |
577 int16_t WebRtcIsacfix_DecoderInit(ISACFIX_MainStruct *ISAC_main_inst) | 573 void WebRtcIsacfix_DecoderInit(ISACFIX_MainStruct *ISAC_main_inst) |
578 { | 574 { |
579 ISACFIX_SubStruct *ISAC_inst; | 575 ISACFIX_SubStruct *ISAC_inst; |
580 | 576 |
581 InitFunctionPointers(); | 577 InitFunctionPointers(); |
582 | 578 |
583 /* typecast pointer to real structure */ | 579 /* typecast pointer to real structure */ |
584 ISAC_inst = (ISACFIX_SubStruct *)ISAC_main_inst; | 580 ISAC_inst = (ISACFIX_SubStruct *)ISAC_main_inst; |
585 | 581 |
586 /* flag decoder init */ | 582 /* flag decoder init */ |
587 ISAC_inst->initflag |= 1; | 583 ISAC_inst->initflag |= 1; |
588 | 584 |
589 WebRtcIsacfix_InitMaskingDec(&ISAC_inst->ISACdec_obj.maskfiltstr_obj); | 585 WebRtcIsacfix_InitMaskingDec(&ISAC_inst->ISACdec_obj.maskfiltstr_obj); |
590 WebRtcIsacfix_InitPostFilterbank(&ISAC_inst->ISACdec_obj.postfiltbankstr_obj); | 586 WebRtcIsacfix_InitPostFilterbank(&ISAC_inst->ISACdec_obj.postfiltbankstr_obj); |
591 WebRtcIsacfix_InitPitchFilter(&ISAC_inst->ISACdec_obj.pitchfiltstr_obj); | 587 WebRtcIsacfix_InitPitchFilter(&ISAC_inst->ISACdec_obj.pitchfiltstr_obj); |
592 | 588 |
593 /* TS */ | 589 /* TS */ |
594 WebRtcIsacfix_InitPlc( &ISAC_inst->ISACdec_obj.plcstr_obj ); | 590 WebRtcIsacfix_InitPlc( &ISAC_inst->ISACdec_obj.plcstr_obj ); |
595 | 591 |
596 | 592 |
597 #ifdef WEBRTC_ISAC_FIX_NB_CALLS_ENABLED | 593 #ifdef WEBRTC_ISAC_FIX_NB_CALLS_ENABLED |
598 WebRtcIsacfix_InitPreFilterbank(&ISAC_inst->ISACdec_obj.decimatorstr_obj); | 594 WebRtcIsacfix_InitPreFilterbank(&ISAC_inst->ISACdec_obj.decimatorstr_obj); |
599 #endif | 595 #endif |
600 | |
601 return 0; | |
602 } | 596 } |
603 | 597 |
604 | 598 |
605 /**************************************************************************** | 599 /**************************************************************************** |
606 * WebRtcIsacfix_UpdateBwEstimate1(...) | 600 * WebRtcIsacfix_UpdateBwEstimate1(...) |
607 * | 601 * |
608 * This function updates the estimate of the bandwidth. | 602 * This function updates the estimate of the bandwidth. |
609 * | 603 * |
610 * Input: | 604 * Input: |
611 * - ISAC_main_inst : ISAC instance. | 605 * - ISAC_main_inst : ISAC instance. |
(...skipping 940 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1552 assert(inst->initflag & 1); // Decoder initialized. | 1546 assert(inst->initflag & 1); // Decoder initialized. |
1553 WebRtcIsacfixBw_GetBandwidthInfo(&inst->bwestimator_obj, bwinfo); | 1547 WebRtcIsacfixBw_GetBandwidthInfo(&inst->bwestimator_obj, bwinfo); |
1554 } | 1548 } |
1555 | 1549 |
1556 void WebRtcIsacfix_SetBandwidthInfo(ISACFIX_MainStruct* ISAC_main_inst, | 1550 void WebRtcIsacfix_SetBandwidthInfo(ISACFIX_MainStruct* ISAC_main_inst, |
1557 const IsacBandwidthInfo* bwinfo) { | 1551 const IsacBandwidthInfo* bwinfo) { |
1558 ISACFIX_SubStruct* inst = (ISACFIX_SubStruct*)ISAC_main_inst; | 1552 ISACFIX_SubStruct* inst = (ISACFIX_SubStruct*)ISAC_main_inst; |
1559 assert(inst->initflag & 2); // Encoder initialized. | 1553 assert(inst->initflag & 2); // Encoder initialized. |
1560 WebRtcIsacfixBw_SetBandwidthInfo(&inst->bwestimator_obj, bwinfo); | 1554 WebRtcIsacfixBw_SetBandwidthInfo(&inst->bwestimator_obj, bwinfo); |
1561 } | 1555 } |
OLD | NEW |