OSDN Git Service

= Adds an hb_detect_comb() function that indicates whether or not a frame shows inter...
[handbrake-jp/handbrake-jp-git.git] / libhb / common.h
index 1255887..4758d9c 100644 (file)
@@ -27,6 +27,7 @@
 
 #define EVEN( a )        ( (a) + ( (a) & 1 ) )
 #define MULTIPLE_16( a ) ( 16 * ( ( (a) + 8 ) / 16 ) )
+#define MULTIPLE_MOD( a, b ) ( b * ( ( (a) + (b / 2) ) / b ) )
 
 #define HB_DVD_READ_BUFFER_SIZE 2048
 
@@ -104,14 +105,12 @@ const char * hb_mixdown_get_short_name_from_mixdown( int amixdown );
  *****************************************************************************/
 struct hb_job_s
 {
-#if JOB_GROUPS
-    /* ID assigned by UI so it can lump jobs together */
+    /* ID assigned by UI so it can groups job passes together */
     int             sequence_id;
-#endif
-       
+
     /* Pointer to the title to be ripped */
     hb_title_t    * title;
-    
+
     /* Chapter selection */
     int             chapter_start;
     int             chapter_end;
@@ -124,7 +123,7 @@ struct hb_job_s
          deinterlace:         0 or 1
          width:               must be a multiple of 16
          height:              must be a multiple of 16
-         keep_ratio:          used by UIs 
+         keep_ratio:          used by UIs
          pixel_ratio:         store pixel aspect ratio in the video
          pixel_aspect_width:  numerator for pixel aspect ratio
          pixel_aspect_height: denominator for pixel aspect ratio
@@ -141,6 +140,7 @@ struct hb_job_s
     int             pixel_ratio;
     int             pixel_aspect_width;
     int             pixel_aspect_height;
+    int             modulus;
        int                             maxWidth;
        int                             maxHeight;
 
@@ -154,12 +154,13 @@ struct hb_job_s
          vrate, vrate_base: output framerate is vrate / vrate_base
          h264_level:        boolean for whether or not we're encoding for iPod
          crf:               boolean for whether to use constant rate factor with x264
-         x264opts:          string of extra x264 options 
+         x264opts:          string of extra x264 options
          areBframes:        boolean to note if b-frames are included in x264opts */
 #define HB_VCODEC_MASK   0x0000FF
 #define HB_VCODEC_FFMPEG 0x000001
 #define HB_VCODEC_XVID   0x000002
 #define HB_VCODEC_X264   0x000004
+#define HB_VCODEC_THEORA 0x000008
 
     int             vcodec;
     float           vquality;
@@ -172,7 +173,8 @@ struct hb_job_s
     int             crf;
     char            *x264opts;
     int             areBframes;
-    
+    int             vfr;
+
     /* Audio tracks:
          audios:          Indexes in hb_title_t's audios list, starting from 0.
                           -1 indicates the end of the list
@@ -210,6 +212,13 @@ struct hb_job_s
 // A52_FORMAT of A52_3F2R | A52_LFE        = 23   = 0x17
 // discrete channel count of 6
 
+#define HB_AMIXDOWN_AC3                         0x20000000
+
+#define HB_AMIXDOWN_DOLBYPLII_AC3               0x404094A2
+// DCA_FORMAT of DCA_3F2R | DCA_OUT_DPLII  = 1033 = 0x409
+// A52_FORMAT of A52_DOLBY | A52_USE_DPLII = 74   = 0x4A
+// discrete channel count of 2
+
 /* define some macros to extract the various information from the HB_AMIXDOWN_XXXX values */
 #define HB_AMIXDOWN_GET_DCA_FORMAT( a ) ( ( a & HB_AMIXDOWN_DCA_FORMAT_MASK ) >> 12 )
 #define HB_AMIXDOWN_GET_A52_FORMAT( a ) ( ( a & HB_AMIXDOWN_A52_FORMAT_MASK ) >> 4 )
@@ -235,6 +244,7 @@ struct hb_job_s
     int             acodec;
     int             abitrate;
     int             arate;
+    float           dynamic_range_compression;
 
     /* Subtitle settings:
          subtitle: index in hb_title_t's subtitles list, starting
@@ -252,15 +262,16 @@ struct hb_job_s
 #define HB_MUX_OGM  0x080000
 #define HB_MUX_IPOD 0x100000
 #define HB_MUX_MKV  0x200000
-       
+
     int             mux;
     const char          * file;
 
     /* Allow MP4 files > 4 gigs */
     int             largeFileSize;
-    
+    int             mp4_optimize;
+    int             ipod_atom;
 
-    int subtitle_scan;
+    int indepth_scan;
     hb_subtitle_t ** select_subtitle;
     int subtitle_force;
     char * native_language;
@@ -298,7 +309,7 @@ struct hb_audio_s
     int  codec;
     int  rate;
     int  bitrate;
-    
+
     /* ac3flags is only set when the source audio format is HB_ACODEC_AC3 */
     int ac3flags;
 
@@ -349,9 +360,6 @@ struct hb_audio_s
 
        /* amixdown is the mixdown format to be used for this audio track */
        int amixdown;
-
-       /* Source PID is only valid for MPEG Transport Streams */
-       int source_pid;
 #endif
 };
 
@@ -371,7 +379,7 @@ struct hb_chapter_s
 
     /* Exact duration (in 1/90000s) */
     uint64_t duration;
-    
+
     /* Optional chapter title */
     char     title[1024];
 };
@@ -419,6 +427,7 @@ struct hb_title_s
     int         rate;
     int         rate_base;
     int         crop[4];
+    int         detected_interlacing;
 
     uint32_t    palette[16];
 
@@ -462,6 +471,7 @@ struct hb_state_s
             int   hours;
             int   minutes;
             int   seconds;
+            int   sequence_id;
         } working;
 
         struct
@@ -518,6 +528,7 @@ extern hb_work_object_t hb_render;
 extern hb_work_object_t hb_encavcodec;
 extern hb_work_object_t hb_encxvid;
 extern hb_work_object_t hb_encx264;
+extern hb_work_object_t hb_enctheora;
 extern hb_work_object_t hb_deca52;
 extern hb_work_object_t hb_decdca;
 extern hb_work_object_t hb_decavcodec;
@@ -539,12 +550,12 @@ struct hb_filter_object_s
 
 #ifdef __LIBHB__
     hb_filter_private_t* (* init)  ( int, int, int, char * );
-    
+
     int                  (* work)  ( const hb_buffer_t *, hb_buffer_t **,
                                      int, int, int, hb_filter_private_t * );
-    
+
     void                 (* close) ( hb_filter_private_t * );
-    
+
     hb_filter_private_t   * private_data;
     //hb_buffer_t           * buffer;
 #endif