LCOV - code coverage report
Current view: top level - lib_lc3plus - com_entropy.c (source / functions) Hit Total Coverage
Test: Coverage on main -- conformance test test_26252.py @ a21f94bc6bac334fe001a5bad2f7b32b79038097 Lines: 4 5 80.0 %
Date: 2025-11-02 06:22:56 Functions: 1 1 100.0 %

          Line data    Source code
       1             : /******************************************************************************
       2             : *                        ETSI TS 103 634 V1.6.1                               *
       3             : *              Low Complexity Communication Codec Plus (LC3plus)              *
       4             : *                                                                             *
       5             : * Copyright licence is solely granted through ETSI Intellectual Property      *
       6             : * Rights Policy, 3rd April 2019. No patent licence is granted by implication, *
       7             : * estoppel or otherwise.                                                      *
       8             : ******************************************************************************/
       9             : 
      10             : #include "options.h"
      11             : #include "wmc_auto.h"
      12             : #include "functions.h"
      13             : 
      14     1941994 : LC3_INT16 getLastNzBits (LC3_INT16 N)
      15             : {
      16             :     LC3_INT16 minBits;
      17             : 
      18     1941994 :     minBits = ceil(LC3_LOGTWO(N >> 1));
      19             : #ifdef CR9_C_ADD_1p25MS
      20             :     /* minimum of 2 spare bits */
      21     1941994 :     if (((1 << minBits) - (N >> 1)) < 2) 
      22             :     {
      23           0 :         minBits++;
      24             :     }
      25             : #endif
      26             : 
      27     1941994 :     return minBits;
      28             : }
      29             : 

Generated by: LCOV version 1.14