diff --git a/gst/compositor/compositor.c b/gst/compositor/compositor.c index e2b212f821..f6a7f47654 100644 --- a/gst/compositor/compositor.c +++ b/gst/compositor/compositor.c @@ -265,6 +265,9 @@ _mixer_pad_get_output_size (GstCompositorPad * comp_pad, gint out_par_n, pad_height, dar_n, dar_d, GST_VIDEO_INFO_PAR_N (&vagg_pad->info), GST_VIDEO_INFO_PAR_D (&vagg_pad->info), out_par_n, out_par_d); + /* Pick either height or width, whichever is an integer multiple of the + * display aspect ratio. However, prefer preserving the height to account + * for interlaced video. */ if (pad_height % dar_n == 0) { pad_width = gst_util_uint64_scale_int (pad_height, dar_n, dar_d); } else if (pad_width % dar_d == 0) { @@ -368,8 +371,6 @@ gst_compositor_pad_prepare_frame (GstVideoAggregatorPad * pad, /* We don't need to clamp the coords of the second rectangle */ frame2_rect.x = cpad2->xpos; frame2_rect.y = cpad2->ypos; - /* This is effectively what set_info and the above conversion - * code do to calculate the desired width/height */ frame2_rect.w = pad2_width; frame2_rect.h = pad2_height; diff --git a/gst/compositor/compositor.h b/gst/compositor/compositor.h index 5e8d90c82e..0c2c0a3ff1 100644 --- a/gst/compositor/compositor.h +++ b/gst/compositor/compositor.h @@ -104,6 +104,9 @@ struct _GstCompositor GstVideoAggregator videoaggregator; GstCompositorBackground background; + /* The 'blend' compositing function does not preserve the alpha value of the + * background, while 'overlay' does; i.e., COMPOSITOR_OPERATOR_ADD is the + * same as COMPOSITOR_OPERATOR_OVER when using the 'blend' BlendFunction. */ BlendFunction blend, overlay; FillCheckerFunction fill_checker; FillColorFunction fill_color;