summaryrefslogtreecommitdiffstats
path: root/libhb/downmix.h
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2010-04-02 15:10:48 +0000
committerjstebbins <[email protected]>2010-04-02 15:10:48 +0000
commiteb4ffde8a29cf9b77a84440fa6c404e94eb9b6a6 (patch)
treeea5149118b167b07f4a33f4f0cf9f1a8ea7ee61f /libhb/downmix.h
parent13eb2d6d5e7ad894d0dfe808dc3cb26a062d48b7 (diff)
downmix support for ffmpeg audio sources
now we can eat our own dogfood. i.e. aac 6ch discrete input now works, along with any other multi-channel audio ffmpeg can toss at us. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3182 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/downmix.h')
-rw-r--r--libhb/downmix.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/libhb/downmix.h b/libhb/downmix.h
new file mode 100644
index 000000000..f9710488b
--- /dev/null
+++ b/libhb/downmix.h
@@ -0,0 +1,41 @@
+/* $Id: downmix.h,v 1.51 2005/11/04 13:09:40 stebbins Exp $
+
+ This file is part of the HandBrake source code.
+ Homepage: <http://handbrake.fr/>.
+ It may be used under the terms of the GNU General Public License. */
+
+#ifndef DOWNMIX_H
+#define DOWNMIX_H
+
+typedef float hb_sample_t;
+
+typedef struct
+{
+ int mode_in;
+ int mode_out;
+ int nchans_in;
+ int nchans_out;
+ hb_sample_t matrix[8][8];
+ hb_sample_t clev;
+ hb_sample_t slev;
+ hb_sample_t level;
+ hb_sample_t bias;
+} hb_downmix_t;
+
+// For convenience, a map to convert smpte channel layout
+// to QuickTime channel layout.
+// Map Indicies are mode, lfe, channel respectively
+extern int hb_smpte_chan_map[10][2][8];
+extern int hb_ac3_chan_map[10][2][8];
+
+hb_downmix_t * hb_downmix_init(int layout, int mixdown);
+void hb_downmix_close( hb_downmix_t **downmix );
+int hb_downmix_set_mode( hb_downmix_t * downmix, int layout, int mixdown );
+void hb_downmix_set_level( hb_downmix_t * downmix, hb_sample_t clev, hb_sample_t slev, hb_sample_t level );
+void hb_downmix_adjust_level( hb_downmix_t * downmix );
+void hb_downmix_set_bias( hb_downmix_t * downmix, hb_sample_t bias );
+void hb_downmix( hb_downmix_t * downmix, hb_sample_t * dst, hb_sample_t * src, int nsamples);
+void hb_layout_remap( int (*layouts)[2][8], hb_sample_t * samples, int layout, int nsamples );
+int hb_need_downmix( int layout, int mixdown );
+
+#endif /* DOWNMIX_H */