summaryrefslogtreecommitdiffstats
path: root/libhb/hb_json.c
diff options
context:
space:
mode:
authorDamiano Galassi <[email protected]>2018-08-24 10:47:02 +0200
committerDamiano Galassi <[email protected]>2018-08-28 08:43:22 +0200
commit5c9ddef6b4b174fe452e8099b6c0ffb3c35c4036 (patch)
tree489ec68da720d3f366231142dc6900b16994ef7e /libhb/hb_json.c
parentd3a3ac2bbad637fc462e5ce37bc72537f0441ea5 (diff)
Refactor the color tag code, and pass it to the FFmpeg encoders.
Diffstat (limited to 'libhb/hb_json.c')
-rw-r--r--libhb/hb_json.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/libhb/hb_json.c b/libhb/hb_json.c
index 3ba9de13d..c74d85cd7 100644
--- a/libhb/hb_json.c
+++ b/libhb/hb_json.c
@@ -645,11 +645,13 @@ hb_dict_t* hb_job_to_dict( const hb_job_t * job )
hb_dict_set(source_dict, "Range", range_dict);
hb_dict_t *video_dict = hb_dict_get(dict, "Video");
- if (job->color_matrix_code > 0)
- {
- hb_dict_set(video_dict, "ColorMatrixCode",
- hb_value_int(job->color_matrix_code));
- }
+ hb_dict_set(video_dict, "ColorPrimaries",
+ hb_value_int(job->color_prim));
+ hb_dict_set(video_dict, "ColorTransfer",
+ hb_value_int(job->color_transfer));
+ hb_dict_set(video_dict, "ColorMatrix",
+ hb_value_int(job->color_matrix));
+
if (job->vquality > HB_INVALID_VIDEO_QUALITY)
{
hb_dict_set(video_dict, "Quality", hb_value_double(job->vquality));
@@ -994,10 +996,10 @@ hb_job_t* hb_dict_to_job( hb_handle_t * h, hb_dict_t *dict )
// PAR {Num, Den}
"s?{s:i, s:i},"
// Video {Codec, Quality, Bitrate, Preset, Tune, Profile, Level, Options
- // TwoPass, Turbo, ColorMatrixCode,
+ // TwoPass, Turbo, ColorPrimaries, ColorTransfer, ColorMatrix,
// QSV {Decode, AsyncDepth}}
"s:{s:o, s?f, s?i, s?s, s?s, s?s, s?s, s?s,"
- " s?b, s?b, s?i,"
+ " s?b, s?b, s?i, s?i, s?i,"
" s?{s?b, s?i}},"
// Audio {CopyMask, FallbackEncoder, AudioList}
"s?{s?o, s?o, s?o},"
@@ -1041,7 +1043,9 @@ hb_job_t* hb_dict_to_job( hb_handle_t * h, hb_dict_t *dict )
"Options", unpack_s(&video_options),
"TwoPass", unpack_b(&job->twopass),
"Turbo", unpack_b(&job->fastfirstpass),
- "ColorMatrixCode", unpack_i(&job->color_matrix_code),
+ "ColorPrimaries", unpack_i(&job->color_prim),
+ "ColorTransfer", unpack_i(&job->color_transfer),
+ "ColorMatrix", unpack_i(&job->color_matrix),
"QSV",
"Decode", unpack_b(&job->qsv.decode),
"AsyncDepth", unpack_i(&job->qsv.async_depth),