]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/ac3enc.h
mpeg12: propagate more real return values through chunk decode error return and fix...
[ffmpeg] / libavcodec / ac3enc.h
index a4a8fd432590acaae0672a4bda7bdff0a6f3858f..65e88c9e0141a6dd4da69516843cf362d25fd253 100644 (file)
@@ -65,6 +65,23 @@ typedef int32_t CoefType;
 typedef int64_t CoefSumType;
 #endif
 
+/* common option values */
+#define AC3ENC_OPT_NONE            -1
+#define AC3ENC_OPT_AUTO            -1
+#define AC3ENC_OPT_OFF              0
+#define AC3ENC_OPT_ON               1
+#define AC3ENC_OPT_NOT_INDICATED    0
+#define AC3ENC_OPT_MODE_ON          1
+#define AC3ENC_OPT_MODE_OFF         2
+
+/* specific option values */
+#define AC3ENC_OPT_LARGE_ROOM       1
+#define AC3ENC_OPT_SMALL_ROOM       2
+#define AC3ENC_OPT_DOWNMIX_LTRT     1
+#define AC3ENC_OPT_DOWNMIX_LORO     2
+#define AC3ENC_OPT_ADCONV_STANDARD  0
+#define AC3ENC_OPT_ADCONV_HDCD      1
+
 
 /**
  * Encoding Options used by AVOption.
@@ -91,6 +108,8 @@ typedef struct AC3EncOptions {
     int dolby_surround_ex_mode;
     int dolby_headphone_mode;
     int ad_converter_type;
+    int eac3_mixing_metadata;
+    int eac3_info_metadata;
 
     /* other encoding options */
     int allow_per_frame_metadata;
@@ -121,7 +140,7 @@ typedef struct AC3Block {
     int      cpl_in_use;                        ///< coupling in use for this block     (cplinu)
     uint8_t  channel_in_cpl[AC3_MAX_CHANNELS];  ///< channel in coupling                (chincpl)
     int      num_cpl_channels;                  ///< number of channels in coupling
-    uint8_t  new_cpl_coords;                    ///< send new coupling coordinates      (cplcoe)
+    uint8_t  new_cpl_coords[AC3_MAX_CHANNELS];  ///< send new coupling coordinates      (cplcoe)
     uint8_t  cpl_master_exp[AC3_MAX_CHANNELS];  ///< coupling coord master exponents    (mstrcplco)
     int      new_snr_offsets;                   ///< send new SNR offsets
     int      new_cpl_leak;                      ///< send new coupling leak info
@@ -151,6 +170,8 @@ typedef struct AC3EncodeContext {
     int bit_rate;                           ///< target bit rate, in bits-per-second
     int sample_rate;                        ///< sampling frequency, in Hz
 
+    int num_blks_code;                      ///< number of blocks code                  (numblkscod)
+    int num_blocks;                         ///< number of blocks per frame
     int frame_size_min;                     ///< minimum frame size in case rounding is necessary
     int frame_size;                         ///< current frame size in bytes
     int frame_size_code;                    ///< frame size code                        (frmsizecod)
@@ -253,6 +274,8 @@ void ff_ac3_process_exponents(AC3EncodeContext *s);
 
 int ff_ac3_compute_bit_allocation(AC3EncodeContext *s);
 
+void ff_ac3_group_exponents(AC3EncodeContext *s);
+
 void ff_ac3_quantize_mantissas(AC3EncodeContext *s);
 
 void ff_ac3_output_frame(AC3EncodeContext *s, unsigned char *frame);