summaryrefslogtreecommitdiffstats
path: root/libhb/encavcodec.c
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2019-03-15 17:35:12 -0600
committerJohn Stebbins <[email protected]>2019-04-08 07:44:09 -0600
commit219b2540dc3ae2bb80f634b7df25f228f3a679ed (patch)
treebd06a7b6945343399c08c35f1539538eb1c2f5e1 /libhb/encavcodec.c
parentbe581837296bc947df6ffe83dbabde137e92e039 (diff)
libhb: change preset key to VideoColorMatrixCodeOverride
Reserve VideoColorMatrixCode for doing color conversion. VideoColorMatrixCodeOverride sets color flags without transforming video frame colors.
Diffstat (limited to 'libhb/encavcodec.c')
-rw-r--r--libhb/encavcodec.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/libhb/encavcodec.c b/libhb/encavcodec.c
index d0bafe610..4c723c9c9 100644
--- a/libhb/encavcodec.c
+++ b/libhb/encavcodec.c
@@ -419,9 +419,9 @@ int encavcodecInit( hb_work_object_t * w, hb_job_t * job )
job->par.num, job->par.den );
// set colorimetry
- context->color_primaries = job->color_prim;
- context->color_trc = job->color_transfer;
- context->colorspace = job->color_matrix;
+ context->color_primaries = hb_output_color_prim(job);
+ context->color_trc = hb_output_color_transfer(job);
+ context->colorspace = hb_output_color_matrix(job);
if (!job->inline_parameter_sets)
{
@@ -626,6 +626,14 @@ int encavcodecInit( hb_work_object_t * w, hb_job_t * job )
goto done;
}
+ /*
+ * Reload colorimetry settings in case custom
+ * values were set in the encoder_options string.
+ */
+ job->color_prim_override = context->color_primaries;
+ job->color_transfer_override = context->color_trc;
+ job->color_matrix_override = context->colorspace;
+
if (job->pass_id == HB_PASS_ENCODE_1ST &&
context->stats_out != NULL)
{