summaryrefslogtreecommitdiffstats
path: root/libhb/common.h
diff options
context:
space:
mode:
authorRodeo <[email protected]>2012-03-28 23:22:17 +0000
committerRodeo <[email protected]>2012-03-28 23:22:17 +0000
commit39425d02862f054e3ef87ef45b789254c64511ad (patch)
tree30583795947cec54860e51a8b675bfd29f03a26a /libhb/common.h
parentcca9c898d2f57047ab2cdabee8c794ddf2775aa7 (diff)
libhb: use source colorimetry information when available.
When source colorimetry can't be determined, guess. Added code to guess PAL SD content and updated code to guess HD content. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4552 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/common.h')
-rw-r--r--libhb/common.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/libhb/common.h b/libhb/common.h
index e8ca7e1fd..57d44450b 100644
--- a/libhb/common.h
+++ b/libhb/common.h
@@ -298,10 +298,26 @@ struct hb_job_s
char *x264_tune;
char *h264_level;
int areBframes;
+
int color_matrix_code;
int color_prim;
int color_transfer;
int color_matrix;
+// see https://developer.apple.com/quicktime/icefloe/dispatch019.html#colr
+#define HB_COLR_PRI_BT709 1
+#define HB_COLR_PRI_UNDEF 2
+#define HB_COLR_PRI_EBUTECH 5 // use for bt470bg
+#define HB_COLR_PRI_SMPTEC 6 // smpte170m; also use for bt470m and smpte240m
+// 0, 3-4, 7-65535: reserved
+#define HB_COLR_TRA_BT709 1 // also use for bt470m, bt470bg and smpte170m
+#define HB_COLR_TRA_UNDEF 2
+#define HB_COLR_TRA_SMPTE240M 7
+// 0, 3-6, 8-65535: reserved
+#define HB_COLR_MAT_BT709 1
+#define HB_COLR_MAT_UNDEF 2
+#define HB_COLR_MAT_SMPTE170M 6 // also use for fcc and bt470bg
+#define HB_COLR_MAT_SMPTE240M 7
+// 0, 3-5, 8-65535: reserved
/* List of audio settings. */
hb_list_t * list_audio;
@@ -685,6 +701,9 @@ struct hb_title_s
int height;
int pixel_aspect_width;
int pixel_aspect_height;
+ int color_prim;
+ int color_transfer;
+ int color_matrix;
int rate;
int rate_base;
int crop[4];
@@ -785,6 +804,9 @@ typedef struct hb_work_info_s
int height;
int pixel_aspect_width;
int pixel_aspect_height;
+ int color_prim;
+ int color_transfer;
+ int color_matrix;
};
struct { // info only valid for audio decoders
int channel_layout;