~ubuntu-branches/ubuntu/hardy/avidemux/hardy

« back to all changes in this revision

Viewing changes to avidemux/ADM_libraries/ADM_libtwolame/encode.h

  • Committer: Bazaar Package Importer
  • Author(s): Matvey Kozhev
  • Date: 2007-12-18 13:53:04 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20071218135304-cdqec2lg2bglyz15
Tags: 1:2.4~preview3-0.0ubuntu1
* Upload to Ubuntu. (LP: #163287, LP: #126572)
* debian/changelog: re-added Ubuntu releases.
* debian/control:
  - Require debhelper >= 5.0.51 (for dh_icons) and imagemagick.
  - Build-depend on libsdl1.2-dev instead of libsdl-dev.
  - Build against newer libx264-dev. (LP: #138854)
  - Removed libamrnb-dev, not in Ubuntu yet.
* debian/rules:
  - Install all icon sizes, using convert (upstream installs none).
  - Added missing calls to dh_installmenu, dh_installman, dh_icons and
    dh_desktop.
* debian/menu, debian/avidemux-qt.menu:
  - Corrected package and executable names.
* debian/avidemux-common.install: Install icons.
* debian/avidemux.common.manpages: Install man/avidemux.1.
* debian/links, debian/avidemux-cli.links, debian/avidemux-gtk.links:
  - Link manpages to avidemux.1.gz.
* debian/install, debian/avidemux-qt.install, debian/avidemux-gtk.desktop,
  debian/avidemux-qt.desktop: Install desktop files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *  TwoLAME: an optimized MPEG Audio Layer Two encoder
 
3
 *
 
4
 *  Copyright (C) 2001-2004 Michael Cheng
 
5
 *  Copyright (C) 2004-2005 The TwoLAME Project
 
6
 *
 
7
 *  This library is free software; you can redistribute it and/or
 
8
 *  modify it under the terms of the GNU Lesser General Public
 
9
 *  License as published by the Free Software Foundation; either
 
10
 *  version 2.1 of the License, or (at your option) any later version.
 
11
 *
 
12
 *  This library is distributed in the hope that it will be useful,
 
13
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
15
 *  Lesser General Public License for more details.
 
16
 *
 
17
 *  You should have received a copy of the GNU Lesser General Public
 
18
 *  License along with this library; if not, write to the Free Software
 
19
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
20
 *  
 
21
 */
 
22
 
 
23
 
 
24
#ifndef _ENCODE_H_
 
25
#define _ENCODE_H_
 
26
 
 
27
void encode_init(twolame_options *glopts);
 
28
 
 
29
int get_js_bound(int m_ext);
 
30
 
 
31
int get_alloc_table_bits (int tablenum, int sb, int ba);
 
32
 
 
33
void scalefactor_calc (FLOAT sb_sample[][3][SCALE_BLOCK][SBLIMIT],
 
34
                           unsigned int scalar[][3][SBLIMIT], int nch,
 
35
                           int sblimit);
 
36
 
 
37
void combine_lr (FLOAT sb_sample[2][3][SCALE_BLOCK][SBLIMIT],
 
38
                     FLOAT joint_sample[3][SCALE_BLOCK][SBLIMIT], int sblimit);
 
39
 
 
40
void find_sf_max (twolame_options *glopts,
 
41
              unsigned int sf_index[2][3][SBLIMIT],
 
42
              FLOAT sf_max[2][SBLIMIT]);
 
43
 
 
44
void sf_transmission_pattern (twolame_options *glopts,
 
45
              unsigned int sf_index[2][3][SBLIMIT],
 
46
                          unsigned int sf_selectinfo[2][SBLIMIT]);
 
47
 
 
48
void write_header (twolame_options *glopts, bit_stream * bs);
 
49
 
 
50
int write_bit_alloc (twolame_options *glopts, 
 
51
              unsigned int bit_alloc[2][SBLIMIT],
 
52
              bit_stream * bs);
 
53
 
 
54
int write_scalefactors (twolame_options *glopts, 
 
55
             unsigned int bit_alloc[2][SBLIMIT],
 
56
                         unsigned int sf_selectinfo[2][SBLIMIT],
 
57
                         unsigned int scalar[2][3][SBLIMIT],
 
58
                         bit_stream * bs);
 
59
 
 
60
void subband_quantization (twolame_options *glopts,
 
61
              unsigned int sf_index[2][3][SBLIMIT],
 
62
                      FLOAT sb_samples[2][3][SCALE_BLOCK][SBLIMIT],
 
63
                      unsigned int j_scale[3][SBLIMIT],
 
64
                      FLOAT j_samps[3][SCALE_BLOCK][SBLIMIT],
 
65
                      unsigned int bit_alloc[2][SBLIMIT],
 
66
                      unsigned int sbband[2][3][SCALE_BLOCK][SBLIMIT]);
 
67
 
 
68
void write_samples (twolame_options *glopts,
 
69
              unsigned int sbband[2][3][SCALE_BLOCK][SBLIMIT],
 
70
                      unsigned int bit_alloc[2][SBLIMIT], bit_stream * bs);
 
71
 
 
72
 
 
73
/*******************************************************
 
74
   Bit Allocation Stuff 
 
75
******************************************************/
 
76
 
 
77
int bits_for_nonoise (twolame_options * glopts, FLOAT SMR[2][SBLIMIT],
 
78
                          unsigned int scfsi[2][SBLIMIT], FLOAT min_mnr,
 
79
                          unsigned int bit_alloc[2][SBLIMIT]);
 
80
 
 
81
int init_bit_allocation( twolame_options * glopts );
 
82
 
 
83
void main_bit_allocation (twolame_options * glopts, FLOAT SMR[2][SBLIMIT],
 
84
                          unsigned int scfsi[2][SBLIMIT],
 
85
                          unsigned int bit_alloc[2][SBLIMIT], int *adb );
 
86
 
 
87
int vbr_bit_allocation (twolame_options * glopts, FLOAT SMR[2][SBLIMIT],
 
88
                    unsigned int scfsi[2][SBLIMIT],
 
89
                    unsigned int bit_alloc[2][SBLIMIT], int *adb);
 
90
 
 
91
int a_bit_allocation (twolame_options * glopts, FLOAT SMR[2][SBLIMIT],
 
92
                      unsigned int scfsi[2][SBLIMIT],
 
93
                      unsigned int bit_alloc[2][SBLIMIT], int *adb );
 
94
 
 
95
#endif
 
96
 
 
97