diff options
author | John Stebbins <[email protected]> | 2019-03-15 15:27:01 -0600 |
---|---|---|
committer | John Stebbins <[email protected]> | 2019-04-08 07:44:09 -0600 |
commit | 3712b297c3487780d31151362b85c49ca27ff8ad (patch) | |
tree | 71f449d83c224bc2ff5cad824560c2730759540e /libhb/decomb.c | |
parent | 248c880fc86ee07d23d62135e002940f16364eb6 (diff) |
libhb: propagate color matrix info through the pipeline
Propagates pix_fmt, range, primaries, transfer, and matrix everywhere.
Everything that passes or creates video frames tags the frames with
their color matrix info.
All filters know the expected color matrix info of input frames.
Diffstat (limited to 'libhb/decomb.c')
-rw-r--r-- | libhb/decomb.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libhb/decomb.c b/libhb/decomb.c index 6f1cf62a1..d6589c3ad 100644 --- a/libhb/decomb.c +++ b/libhb/decomb.c @@ -150,6 +150,9 @@ struct hb_filter_private_s taskset_t eedi2_taskset; // Threads for eedi2 - one per plane hb_buffer_list_t out_list; + + hb_filter_init_t input; + hb_filter_init_t output; }; typedef struct @@ -935,6 +938,7 @@ static int hb_decomb_init( hb_filter_object_t * filter, { filter->private_data = calloc( 1, sizeof(struct hb_filter_private_s) ); hb_filter_private_t * pv = filter->private_data; + pv->input = *init; hb_buffer_list_clear(&pv->out_list); pv->deinterlaced = 0; @@ -1118,6 +1122,7 @@ static int hb_decomb_init( hb_filter_object_t * filter, } } + pv->output = *init; init->job->use_decomb = 1; return 0; @@ -1249,6 +1254,10 @@ static void process_frame( hb_filter_private_t * pv ) buf = hb_frame_buffer_init(pv->ref[1]->f.fmt, pv->ref[1]->f.width, pv->ref[1]->f.height); + buf->f.color_prim = pv->output.color_prim; + buf->f.color_transfer = pv->output.color_transfer; + buf->f.color_matrix = pv->output.color_matrix; + buf->f.color_range = pv->output.color_range ; yadif_filter(pv, buf, parity, tff); /* Copy buffered settings to output buffer settings */ |