[FFmpeg-cvslog] avcodec/dca: add generic defines
foo86
git at videolan.org
Sun Jan 31 17:14:14 CET 2016
ffmpeg | branch: master | foo86 <foobaz86 at gmail.com> | Sat Jan 16 11:56:26 2016 +0300| [0930b2dd1f01213ca1f08aff3a9b8b0d5515cede] | committer: Hendrik Leppkes
avcodec/dca: add generic defines
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0930b2dd1f01213ca1f08aff3a9b8b0d5515cede
---
libavcodec/dca.h | 94 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 94 insertions(+)
diff --git a/libavcodec/dca.h b/libavcodec/dca.h
index ea3f9c5..ccb02af 100644
--- a/libavcodec/dca.h
+++ b/libavcodec/dca.h
@@ -4,6 +4,7 @@
* Copyright (C) 2004 Benjamin Zores
* Copyright (C) 2006 Benjamin Larsson
* Copyright (C) 2007 Konstantin Shishkov
+ * Copyright (C) 2016 foo86
*
* This file is part of FFmpeg.
*
@@ -30,6 +31,99 @@
#include "libavutil/internal.h"
#include "libavutil/intreadwrite.h"
+enum DCASpeaker {
+ DCA_SPEAKER_C, DCA_SPEAKER_L, DCA_SPEAKER_R, DCA_SPEAKER_Ls,
+ DCA_SPEAKER_Rs, DCA_SPEAKER_LFE1, DCA_SPEAKER_Cs, DCA_SPEAKER_Lsr,
+ DCA_SPEAKER_Rsr, DCA_SPEAKER_Lss, DCA_SPEAKER_Rss, DCA_SPEAKER_Lc,
+ DCA_SPEAKER_Rc, DCA_SPEAKER_Lh, DCA_SPEAKER_Ch, DCA_SPEAKER_Rh,
+ DCA_SPEAKER_LFE2, DCA_SPEAKER_Lw, DCA_SPEAKER_Rw, DCA_SPEAKER_Oh,
+ DCA_SPEAKER_Lhs, DCA_SPEAKER_Rhs, DCA_SPEAKER_Chr, DCA_SPEAKER_Lhr,
+ DCA_SPEAKER_Rhr, DCA_SPEAKER_Cl, DCA_SPEAKER_Ll, DCA_SPEAKER_Rl,
+ DCA_SPEAKER_RSV1, DCA_SPEAKER_RSV2, DCA_SPEAKER_RSV3, DCA_SPEAKER_RSV4,
+
+ DCA_SPEAKER_COUNT
+};
+
+enum DCASpeakerMask {
+ DCA_SPEAKER_MASK_C = 0x00000001,
+ DCA_SPEAKER_MASK_L = 0x00000002,
+ DCA_SPEAKER_MASK_R = 0x00000004,
+ DCA_SPEAKER_MASK_Ls = 0x00000008,
+ DCA_SPEAKER_MASK_Rs = 0x00000010,
+ DCA_SPEAKER_MASK_LFE1 = 0x00000020,
+ DCA_SPEAKER_MASK_Cs = 0x00000040,
+ DCA_SPEAKER_MASK_Lsr = 0x00000080,
+ DCA_SPEAKER_MASK_Rsr = 0x00000100,
+ DCA_SPEAKER_MASK_Lss = 0x00000200,
+ DCA_SPEAKER_MASK_Rss = 0x00000400,
+ DCA_SPEAKER_MASK_Lc = 0x00000800,
+ DCA_SPEAKER_MASK_Rc = 0x00001000,
+ DCA_SPEAKER_MASK_Lh = 0x00002000,
+ DCA_SPEAKER_MASK_Ch = 0x00004000,
+ DCA_SPEAKER_MASK_Rh = 0x00008000,
+ DCA_SPEAKER_MASK_LFE2 = 0x00010000,
+ DCA_SPEAKER_MASK_Lw = 0x00020000,
+ DCA_SPEAKER_MASK_Rw = 0x00040000,
+ DCA_SPEAKER_MASK_Oh = 0x00080000,
+ DCA_SPEAKER_MASK_Lhs = 0x00100000,
+ DCA_SPEAKER_MASK_Rhs = 0x00200000,
+ DCA_SPEAKER_MASK_Chr = 0x00400000,
+ DCA_SPEAKER_MASK_Lhr = 0x00800000,
+ DCA_SPEAKER_MASK_Rhr = 0x01000000,
+ DCA_SPEAKER_MASK_Cl = 0x02000000,
+ DCA_SPEAKER_MASK_Ll = 0x04000000,
+ DCA_SPEAKER_MASK_Rl = 0x08000000,
+};
+
+#define DCA_SPEAKER_LAYOUT_MONO (DCA_SPEAKER_MASK_C)
+#define DCA_SPEAKER_LAYOUT_STEREO (DCA_SPEAKER_MASK_L | DCA_SPEAKER_MASK_R)
+#define DCA_SPEAKER_LAYOUT_2POINT1 (DCA_SPEAKER_LAYOUT_STEREO | DCA_SPEAKER_MASK_LFE1)
+#define DCA_SPEAKER_LAYOUT_3_0 (DCA_SPEAKER_LAYOUT_STEREO | DCA_SPEAKER_MASK_C)
+#define DCA_SPEAKER_LAYOUT_2_1 (DCA_SPEAKER_LAYOUT_STEREO | DCA_SPEAKER_MASK_Cs)
+#define DCA_SPEAKER_LAYOUT_3_1 (DCA_SPEAKER_LAYOUT_3_0 | DCA_SPEAKER_MASK_Cs)
+#define DCA_SPEAKER_LAYOUT_2_2 (DCA_SPEAKER_LAYOUT_STEREO | DCA_SPEAKER_MASK_Ls | DCA_SPEAKER_MASK_Rs)
+#define DCA_SPEAKER_LAYOUT_5POINT0 (DCA_SPEAKER_LAYOUT_3_0 | DCA_SPEAKER_MASK_Ls | DCA_SPEAKER_MASK_Rs)
+#define DCA_SPEAKER_LAYOUT_5POINT1 (DCA_SPEAKER_LAYOUT_5POINT0 | DCA_SPEAKER_MASK_LFE1)
+#define DCA_SPEAKER_LAYOUT_7POINT0_WIDE (DCA_SPEAKER_LAYOUT_5POINT0 | DCA_SPEAKER_MASK_Lw | DCA_SPEAKER_MASK_Rw)
+#define DCA_SPEAKER_LAYOUT_7POINT1_WIDE (DCA_SPEAKER_LAYOUT_7POINT0_WIDE | DCA_SPEAKER_MASK_LFE1)
+
+#define DCA_HAS_STEREO(mask) \
+ ((mask & DCA_SPEAKER_LAYOUT_STEREO) == DCA_SPEAKER_LAYOUT_STEREO)
+
+enum DCARepresentationType {
+ DCA_REPR_TYPE_LtRt = 2,
+ DCA_REPR_TYPE_LhRh = 3
+};
+
+enum DCAExtensionMask {
+ DCA_CSS_CORE = 0x001,
+ DCA_CSS_XXCH = 0x002,
+ DCA_CSS_X96 = 0x004,
+ DCA_CSS_XCH = 0x008,
+ DCA_CSS_MASK = 0x00f,
+ DCA_EXSS_CORE = 0x010,
+ DCA_EXSS_XBR = 0x020,
+ DCA_EXSS_XXCH = 0x040,
+ DCA_EXSS_X96 = 0x080,
+ DCA_EXSS_LBR = 0x100,
+ DCA_EXSS_XLL = 0x200,
+ DCA_EXSS_RSV1 = 0x400,
+ DCA_EXSS_RSV2 = 0x800,
+ DCA_EXSS_MASK = 0xff0,
+};
+
+enum DCADownMixType {
+ DCA_DMIX_TYPE_1_0,
+ DCA_DMIX_TYPE_LoRo,
+ DCA_DMIX_TYPE_LtRt,
+ DCA_DMIX_TYPE_3_0,
+ DCA_DMIX_TYPE_2_1,
+ DCA_DMIX_TYPE_2_2,
+ DCA_DMIX_TYPE_3_1,
+
+ DCA_DMIX_TYPE_COUNT
+};
+
extern av_export const uint32_t avpriv_dca_sample_rates[16];
/**
More information about the ffmpeg-cvslog
mailing list