~medibuntu-maintainers/mplayer/medibuntu.natty

« back to all changes in this revision

Viewing changes to libavcodec/mlp.h

  • Committer: Gauvain Pocentek
  • Date: 2010-09-25 09:39:02 UTC
  • mfrom: (66.1.6 maverick)
  • Revision ID: gauvain@images-20100925093902-9q2akz3ls3qzhaaw
* Merge from Ubuntu:
  - put back faac support
  - recommends apport-hooks-medibuntu
  - change Maintainer, Uploaders & Vcs-* fields.
* merge from debian, remaining changes:
  - build depend against, lame, x264, xvid
* debian/patches/60eval-api.patch, backport patch from upstream to
  unbreak compilation for eval.h move not yet in 0.6
* gmplayer is gone now, please see smplayer as alternative frontend.
  LP: #503537, #493088, #467534, #467524, #460326, #390399, #285570,
      #208680, #118709, #513065, #459595, #455913, #179918, #65165.
* enable the mencoder package
* sort build depends alphabetically
* enable dvdnav support, Closes: #582508, #488226, LP: #611749
* prepare new upload
* no longer build mplayer-gui, it doesn't build anymore with shared
  swscale
* merge from debian/experimental, remaining changes:
  - build depend against, lame, x264, xvid
  - enable mencoder and mplayer-gui
* ensure that quilt patches are actually applied
* New Upstream Version, LP: #539315
* Build (against) again the System FFmpeg 
* tighten dependency on FFmpeg 0.6
* remove patches merged upstream
* remove 22disable-xscreensaver.patch
* refresh patches
* readd x264, xvid and mp3lame support, LP: #606125
* remove old parallel building mechanism, fixes FTBFS
* New upstream version
* compile against internal ffmpeg for now, LP: #587203, #588097
* recompile for directfb transtion, LP: #587163
* remove patches that were merged upstream
* avoid removing DOCS/html directory. it is included in release
  tarball
* convert to source Format: 3.0 (quilt)
* refreshed patches
* remove files that are included in upstream tarball
* rework debian/rules file
  - support parallel building
  - merge build rules for mplayer and mencoder package
  - remove unreferenced COMMON_CONFIGURE_FLAGS macro
  - rename DEB_BUILD_CONFIGURE -> CONFIGURE_FLAGS
  - don't build documentation - release tarballs have them prebuilt
  - build HTML documentation only if not already avaiable in the build
    tree
  - remove remaining references to debian/strip.sh from debian/rules
* remove copied vdpau headers
* copy in mencoder.c from upstream
* enable mplayer-gui (Closes: #579925) and mencoder packages. 
  (Closes: #396954, #400940, #580168)
* Fix rtsp vulnerability. Patch applied by DSA. Closes: #581245
* Fix another integer overflow, Closes: #524805
* prepare new upload
* sync libao2/ao_pulse.c with svn r30062, Closes: #558196, #580113
* make configure use pkg-config for fribidi checks. Closes: #582784,
  LP: #556200
* document 23mplayer-debug-printf.patch
* avoid mentioning of GTK frontend in mplayer description
* improve package descriptions of mplayer-doc and mplayer-dbg
* medium urgency because of fixed security issue
* fix SVN_VERION regex in debian rules to unbreak get-orig-source
  target. Closes: #582369
* forcefully disable arts support. Closes: #581225
* Remove mencoder from Depends in mplayer-dbg package.
* new upstream snapshot from rc3 branch.
* remove patches applied upstream:
  
  - 24_enable_fontconfig_by_default.diff
  - 30_add_gmplayer_man_rules.diff
  - 40_improve_desktop_file.patch
  - 41_fix_forcedsubsonly.patch
  - 50_fix_crashes_with_invalid_SDPs.patch
  - 50_fix_initial_volume_setting_pulse_output.patch
  - 61-malloc-bsd.patch
  - 62-disable-vidix-on-kfreebsd-amd64.patch
  - 63-sys-kd-include.patch
* don't install apport hook
* gross hack to avoid building mplayer-nogui and mplayer-gui packages
* add md5sum to remove to avoid spurious conffile prompt, Closes: #568272
* Make mplayer build on kFreeBSD (backports from upstream), Closes: #578622
  - Revert obscure hack that disables the malloc.h check on certain BSD
    platforms. 
  - disable vidix on kFreeBSD-amd64
  - rename 'struct keypad' -> 'struct m_keypad' to avoid FTBFS on
    kFreeBSD/amd64
* enable fontconfig by default. (Closes: #573257)

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
 
27
27
#include "avcodec.h"
28
28
 
29
 
/** Maximum number of channels that can be decoded. */
30
 
#define MAX_CHANNELS        16
 
29
/** Last possible matrix channel for each codec */
 
30
#define MAX_MATRIX_CHANNEL_MLP      5
 
31
#define MAX_MATRIX_CHANNEL_TRUEHD   7
 
32
/** Maximum number of channels in a valid stream.
 
33
 *  MLP   : 5.1 + 2 noise channels -> 8 channels
 
34
 *  TrueHD: 7.1                    -> 8 channels
 
35
 */
 
36
#define MAX_CHANNELS                8
31
37
 
32
38
/** Maximum number of matrices used in decoding; most streams have one matrix
33
39
 *  per output channel, but some rematrix a channel (usually 0) more than once.
34
40
 */
35
 
#define MAX_MATRICES        15
 
41
#define MAX_MATRICES_MLP            6
 
42
#define MAX_MATRICES_TRUEHD         8
 
43
#define MAX_MATRICES                8
36
44
 
37
 
/** Maximum number of substreams that can be decoded. This could also be set
38
 
 *  higher, but I haven't seen any examples with more than two.
 
45
/** Maximum number of substreams that can be decoded.
 
46
 *  MLP's limit is 2. TrueHD supports at least up to 3.
39
47
 */
40
 
#define MAX_SUBSTREAMS      2
 
48
#define MAX_SUBSTREAMS      3
41
49
 
 
50
/** which multiple of 48000 the maximum sample rate is */
 
51
#define MAX_RATEFACTOR      4
42
52
/** maximum sample frequency seen in files */
43
 
#define MAX_SAMPLERATE      192000
 
53
#define MAX_SAMPLERATE      (MAX_RATEFACTOR * 48000)
44
54
 
45
55
/** maximum number of audio samples within one access unit */
46
 
#define MAX_BLOCKSIZE       (40 * (MAX_SAMPLERATE / 48000))
 
56
#define MAX_BLOCKSIZE       (40 * MAX_RATEFACTOR)
47
57
/** next power of two greater than MAX_BLOCKSIZE */
48
 
#define MAX_BLOCKSIZE_POW2  (64 * (MAX_SAMPLERATE / 48000))
 
58
#define MAX_BLOCKSIZE_POW2  (64 * MAX_RATEFACTOR)
49
59
 
50
60
/** number of allowed filters */
51
61
#define NUM_FILTERS         2
52
62
 
53
 
/** The maximum number of taps in either the IIR or FIR filter;
54
 
 *  I believe MLP actually specifies the maximum order for IIR filters as four,
55
 
 *  and that the sum of the orders of both filters must be <= 8.
56
 
*/
57
 
#define MAX_FILTER_ORDER    8
 
63
/** The maximum number of taps in IIR and FIR filters. */
 
64
#define MAX_FIR_ORDER       8
 
65
#define MAX_IIR_ORDER       4
58
66
 
59
67
/** Code that signals end of a stream. */
60
68
#define END_OF_STREAM       0xd234d234
67
75
    uint8_t     order; ///< number of taps in filter
68
76
    uint8_t     shift; ///< Right shift to apply to output of filter.
69
77
 
70
 
    int32_t     coeff[MAX_FILTER_ORDER];
71
 
    int32_t     state[MAX_FILTER_ORDER];
 
78
    int32_t     state[MAX_FIR_ORDER];
72
79
} FilterParams;
73
80
 
74
81
/** sample data coding information */
75
82
typedef struct {
76
83
    FilterParams filter_params[NUM_FILTERS];
 
84
    int32_t     coeff[NUM_FILTERS][MAX_FIR_ORDER];
77
85
 
78
86
    int16_t     huff_offset;      ///< Offset to apply to residual values.
79
87
    int32_t     sign_huff_offset; ///< sign/rounding-corrected version of huff_offset