[CELT-dev] Modes?

Mike Hooper mihooper at bellsouth.net
Mon May 2 07:34:31 PDT 2011


I have been using CELT ver 8 for some time, but am now attempting to use the
latest git (ver 11+). However, I am having problems with modes. I don't
completely understand what is going on in the following code. Could you
provide some guidance on what parameters are now acceptable? I am trying to
create a stereo channel with Fs=48000 and 128 byte frames, but get NULL
returned from the celt_mode_create function. I am not defining
CUSTOM_MODES_ONLY (because I don't know what it means). On the last couple
of lines of code, there is no error (error=0), but it appears that you
always return NULL..?

 

CELTMode *celt_mode_create(celt_int32 Fs, int frame_size, int *error)

 

#ifndef CUSTOM_MODES_ONLY

   for (i=0;i<TOTAL_MODES;i++)

   {

      int j;

      for (j=0;j<4;j++)

      {

         if (Fs == static_mode_list[i]->Fs &&

               (frame_size<<j) ==
static_mode_list[i]->shortMdctSize*static_mode_list[i]->nbShortMdcts)

         {

            if (error)

               *error = CELT_OK;

            return (CELTMode*)static_mode_list[i];

         }

      }

   }

#endif /* CUSTOM_MODES_ONLY */

 

#ifndef CUSTOM_MODES

   if (error)

      *error = CELT_BAD_ARG;

   return NULL;

#else

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xiph.org/pipermail/opus/attachments/20110502/92d2c62b/attachment-0002.htm 


More information about the celt-dev mailing list