shithub: opus

Download patch

ref: 6f2bfb730262b40e498702fa312e4bdf0ce54990
parent: 485d64dfdf4145bf45929c697cdb2b3eed9c91c1
author: Timothy B. Terriberry <[email protected]>
date: Mon Feb 14 08:24:07 EST 2011

Refactor SILK's use of ec_enc_patch_initial_bits().

The return code has been eliminated in favor of using the existing
 error flag in the ec_enc struct.

--- a/src_FIX/SKP_Silk_encode_frame_FIX.c
+++ b/src_FIX/SKP_Silk_encode_frame_FIX.c
@@ -226,8 +226,7 @@
             flags  = SKP_LSHIFT( flags, 1 );
         }
         flags |= psEnc->sCmn.LBRR_flag;
-        ret = ec_enc_patch_initial_bits( psRangeEnc, flags, psEnc->sCmn.nFramesPerPacket + 1 );
-        SKP_assert( ret == 0 );
+        ec_enc_patch_initial_bits( psRangeEnc, flags, psEnc->sCmn.nFramesPerPacket + 1 );
 
         /* Payload size */
         nBits = ec_tell( psRangeEnc );
--- a/src_FLP/SKP_Silk_encode_frame_FLP.c
+++ b/src_FLP/SKP_Silk_encode_frame_FLP.c
@@ -227,8 +227,7 @@
             flags  = SKP_LSHIFT( flags, 1 );
         }
         flags |= psEnc->sCmn.LBRR_flag;
-        ret = ec_enc_patch_initial_bits( psRangeEnc, flags, psEnc->sCmn.nFramesPerPacket + 1 );
-        SKP_assert( ret == 0 );
+        ec_enc_patch_initial_bits( psRangeEnc, flags, psEnc->sCmn.nFramesPerPacket + 1 );
 
         /* Payload size */
         nBits = ec_tell( psRangeEnc );