diff options
author | Wim Taymans <wtaymans@redhat.com> | 2014-10-17 10:49:35 +0200 |
---|---|---|
committer | Wim Taymans <wtaymans@redhat.com> | 2014-10-24 11:28:00 +0200 |
commit | 98002b39a3a64773cdfc6a23c8671e7ef6790bdf (patch) | |
tree | ed9997f15ceed87a990355a144ce7fef08d9a1cd | |
parent | a64e2a5912420e0839c2dc47be9a907ccafe4ccd (diff) |
video-converter: add interlaced flag to chroma resampler
-rw-r--r-- | gst-libs/gst/video/video-converter.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gst-libs/gst/video/video-converter.c b/gst-libs/gst/video/video-converter.c index df3c35e5d..dad7e8bc5 100644 --- a/gst-libs/gst/video/video-converter.c +++ b/gst-libs/gst/video/video-converter.c @@ -963,13 +963,15 @@ video_converter_compute_resample (GstVideoConverter * convert) if (sfinfo->w_sub[2] != dfinfo->w_sub[2] || sfinfo->h_sub[2] != dfinfo->h_sub[2] || in_info->chroma_site != out_info->chroma_site) { + GstVideoChromaFlags flags = (GST_VIDEO_INFO_IS_INTERLACED (in_info) ? + GST_VIDEO_CHROMA_FLAG_INTERLACED : 0); + convert->upsample = gst_video_chroma_resample_new (0, - in_info->chroma_site, 0, sfinfo->unpack_format, sfinfo->w_sub[2], + in_info->chroma_site, flags, sfinfo->unpack_format, sfinfo->w_sub[2], sfinfo->h_sub[2]); - convert->downsample = gst_video_chroma_resample_new (0, - out_info->chroma_site, 0, dfinfo->unpack_format, -dfinfo->w_sub[2], + out_info->chroma_site, flags, dfinfo->unpack_format, -dfinfo->w_sub[2], -dfinfo->h_sub[2]); } else { |