OSDN Git Service

WinGui:
[handbrake-jp/handbrake-jp-git.git] / libhb / common.h
index e70550e..b59cba5 100644 (file)
@@ -48,6 +48,7 @@
 #define EVEN( a )        ( (a) + ( (a) & 1 ) )
 #define MULTIPLE_16( a ) ( 16 * ( ( (a) + 8 ) / 16 ) )
 #define MULTIPLE_MOD( a, b ) ((b==1)?a:( b * ( ( (a) + (b / 2) - 1) / b ) ))
+#define MULTIPLE_MOD_DOWN( a, b ) ((b==1)?a:( b * ( (a) / b ) ))
 
 #define HB_DVD_READ_BUFFER_SIZE 2048
 
@@ -396,6 +397,7 @@ struct hb_audio_config_s
     {
         int track;                /* Input track number */
         PRIVATE uint32_t codec;   /* Input audio codec */
+        PRIVATE uint32_t stream_type; /* stream type from source stream */
         PRIVATE uint32_t codec_param; /* per-codec config info */
         PRIVATE uint32_t version; /* Bitsream version */
         PRIVATE uint32_t mode;    /* Bitstream mode, codec dependent encoding */
@@ -451,9 +453,9 @@ struct hb_chapter_s
     int      pgn;
     int      cell_start;
     int      cell_end;
-    int      block_start;
-    int      block_end;
-    int      block_count;
+    uint64_t block_start;
+    uint64_t block_end;
+    uint64_t block_count;
 
     /* Visual-friendly duration */
     int      hours;
@@ -504,7 +506,7 @@ struct hb_subtitle_s
     hb_subtitle_config_t config;
 
     enum subtype { PICTURESUB, TEXTSUB } format;
-    enum subsource { VOBSUB, SRTSUB, CC608SUB, /*unused*/CC708SUB, UTF8SUB, TX3GSUB } source;
+    enum subsource { VOBSUB, SRTSUB, CC608SUB, /*unused*/CC708SUB, UTF8SUB, TX3GSUB, SSASUB } source;
     char lang[1024];
     char iso639_2[4];
     uint8_t type; /* Closed Caption, Childrens, Directors etc */
@@ -512,6 +514,8 @@ struct hb_subtitle_s
     // Color lookup table for VOB subtitle tracks. Each entry is in YCbCr format.
     // Must be filled out by the demuxer for VOB subtitle tracks.
     uint32_t    palette[16];
+    int         width;
+    int         height;
 
     int hits;     /* How many hits/occurrences of this subtitle */
     int forced_hits; /* How many forced hits in this subtitle */
@@ -541,7 +545,8 @@ struct hb_metadata_s
 
 struct hb_title_s
 {
-    enum { HB_DVD_TYPE, HB_STREAM_TYPE } type;
+    enum { HB_DVD_TYPE, HB_BD_TYPE, HB_STREAM_TYPE } type;
+    uint32_t    reg_desc;
     char        path[1024];
     char        name[1024];
     int         index;
@@ -549,9 +554,9 @@ struct hb_title_s
     int         ttn;
     int         cell_start;
     int         cell_end;
-    int         block_start;
-    int         block_end;
-    int         block_count;
+    uint64_t    block_start;
+    uint64_t    block_end;
+    uint64_t    block_count;
     int         angle_count;
 
     /* Visual-friendly duration */
@@ -573,8 +578,10 @@ struct hb_title_s
     int         crop[4];
     enum { HB_MPEG2_PS_DEMUXER = 0, HB_MPEG2_TS_DEMUXER, HB_NULL_DEMUXER } demuxer;
     int         detected_interlacing;
+    int         pcr_pid;                /* PCR PID for TS streams */
     int         video_id;               /* demuxer stream id for video */
     int         video_codec;            /* worker object id of video codec */
+    uint32_t    video_stream_type;      /* stream type from source stream */
     int         video_codec_param;      /* codec specific config */
     const char  *video_codec_name;
     int         video_bitrate;
@@ -728,6 +735,7 @@ extern hb_work_object_t hb_deccc608;
 extern hb_work_object_t hb_decsrtsub;
 extern hb_work_object_t hb_decutf8sub;
 extern hb_work_object_t hb_dectx3gsub;
+extern hb_work_object_t hb_decssasub;
 extern hb_work_object_t hb_render;
 extern hb_work_object_t hb_encavcodec;
 extern hb_work_object_t hb_encx264;
@@ -769,6 +777,13 @@ struct hb_filter_object_s
 #endif
 };
 
+#define HB_FILTER_DETELECINE    1
+#define HB_FILTER_DEINTERLACE   2
+#define HB_FILTER_DEBLOCK       3
+#define HB_FILTER_DENOISE       4
+#define HB_FILTER_DECOMB        5
+#define HB_FILTER_ROTATE        6
+
 extern hb_filter_object_t hb_filter_detelecine;
 extern hb_filter_object_t hb_filter_deinterlace;
 extern hb_filter_object_t hb_filter_deblock;