videoeditorengine/mp3aacManipLib/AACGain/src/dec_huftables.cpp
author Mikael Laine <mikael.laine@ixonos.com>
Fri, 29 Jan 2010 14:08:33 +0200
changeset 0 951a5db380a0
permissions -rw-r--r--
Committing the Video Editor package under the Eclipse Public License
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
     1
/*
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
     2
* Copyright (c) 2010 Ixonos Plc.
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
     3
* All rights reserved.
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
     4
* This component and the accompanying materials are made available
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
     5
* under the terms of the "Eclipse Public License v1.0"
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
     6
* which accompanies this distribution, and is available
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
     8
*
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
     9
* Initial Contributors:
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    10
* Nokia Corporation - Initial contribution
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    11
*
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    12
* Contributors:
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    13
* Ixonos Plc
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    14
*
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    15
* Description:
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    16
*
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    17
*/
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    18
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    19
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    20
/**************************************************************************
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    21
  dec_huftables.cpp - Huffman tables for AAC decoder.
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    22
 
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    23
  Author(s): Juha Ojanpera
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    24
  Copyright (c) 2000-2004 by Nokia Research Center, Speech and Audio Systems.
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    25
  *************************************************************************/
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    26
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    27
/*-- Project Headers. --*/
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    28
#include "dec_huf.h"
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    29
#include "defines.h"
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    30
#include "dec_const.h"
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    31
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    32
/**************************************************************************
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    33
   Internal Objects
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    34
  *************************************************************************/
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    35
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    36
/*
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    37
   Purpose:      Number of Huffman items within each codebook.
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    38
   Explanation:  - */
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    39
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    40
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    41
/*
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    42
 * Deletes resources allocated to the Huffman codebooks.
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    43
 */
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    44
void
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    45
CloseHuffmanDecTables(Huffman_DecInfo **huf)
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    46
{
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    47
  if(huf)
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    48
  {
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    49
    int16 i;
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    50
    
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    51
    for(i = 0; i < MAX_AAC_QHUFTABLES; i++)
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    52
    {
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    53
      if(huf[i] != 0)
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    54
        delete huf[i];
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    55
      huf[i] = NULL;
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    56
    }
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    57
    
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    58
    delete[] huf;
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    59
    huf = NULL;
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    60
  }
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    61
}
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    62
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    63
/**************************************************************************
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    64
  Title:      LoadHuffmanDecTablesL
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    65
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    66
  Purpose:    Loads Huffman spectral codebooks for AAC decoder.
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    67
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    68
  Usage:      y = LoadHuffmanDecTablesL()
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    69
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    70
  Output:     y - spectral codebooks
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    71
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    72
  Author(s):  Juha Ojanpera
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    73
  *************************************************************************/
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    74
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    75
Huffman_DecInfo **
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    76
LoadHuffmanDecTablesL(void)
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    77
{
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    78
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    79
    /*
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    80
  Purpose:      Array holding the AAC Huffman decoding codebooks.
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    81
  Explanation:  - */
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    82
const Huffman_DecCode *dec_huffman_tables[] = {
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    83
  dec_hftable1, dec_hftable2, dec_hftable3, dec_hftable4, dec_hftable5, 
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    84
  dec_hftable6, dec_hftable7, dec_hftable8, dec_hftable9, dec_hftable10, 
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    85
  dec_hftable11
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    86
};
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    87
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    88
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    89
  int16 i;
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    90
  Huffman_DecInfo **huf;
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    91
  const Huffman_DecCode **hf_code;
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    92
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    93
  huf = (Huffman_DecInfo **) new (ELeave) Huffman_DecInfo*[MAX_AAC_QHUFTABLES];
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    94
  CleanupStack::PushL(huf);
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    95
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    96
  ZERO_MEMORY(huf, MAX_AAC_QHUFTABLES * sizeof(Huffman_DecInfo *));
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    97
  
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    98
  hf_code = dec_huffman_tables;
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
    99
  for(i = 0; i < MAX_AAC_QHUFTABLES; i++)
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
   100
  {
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
   101
    huf[i] = (Huffman_DecInfo *) new (ELeave) Huffman_DecInfo[1];
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
   102
    CleanupStack::PushL(huf[i]);
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
   103
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
   104
    ZERO_MEMORY(huf[i], sizeof(Huffman_DecInfo));
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
   105
    
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
   106
    huf[i]->huf = hf_code[i];
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
   107
    
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
   108
    huf[i]->cb_len = cb_len[i];
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
   109
  }
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
   110
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
   111
  CleanupStack::Pop(MAX_AAC_QHUFTABLES + 1);
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
   112
  
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
   113
  return (huf);
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
   114
}
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
   115
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
   116
/*
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
   117
 * Deletes resources allocated to the Huffman scalefactor codebook.
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
   118
 */
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
   119
void
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
   120
CloseSfHuffmanTable(Huffman_DecSfInfo *sfHuf)
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
   121
{
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
   122
  if(sfHuf)
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
   123
  {
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
   124
    delete sfHuf;
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
   125
    sfHuf = NULL;
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
   126
  }
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
   127
}
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
   128
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
   129
/**************************************************************************
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
   130
  Title:      LoadSfHuffmanTableL
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
   131
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
   132
  Purpose:    Loads Huffman scalefactor codebook for AAC decoder.
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
   133
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
   134
  Usage:      y = LoadSfHuffmanTableL()
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
   135
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
   136
  Output:     y - scalefactor codebook
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
   137
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
   138
  Author(s):  Juha Ojanpera
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
   139
  *************************************************************************/
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
   140
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
   141
Huffman_DecSfInfo *
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
   142
LoadSfHuffmanTableL(void)
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
   143
{
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
   144
  Huffman_DecSfInfo *huf;
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
   145
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
   146
  huf = (Huffman_DecSfInfo *) new (ELeave) Huffman_DecSfInfo[1];
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
   147
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
   148
  ZERO_MEMORY(huf, sizeof(Huffman_DecSfInfo));
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
   149
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
   150
  huf->cb_len = cb_len[11];
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
   151
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
   152
  huf->sf_param = dec_hftable12;
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
   153
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
   154
  return (huf);
951a5db380a0 Committing the Video Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff changeset
   155
}