videoscale: fix adding borders when NV12 is used

When the frame buffer is NV12 the borders are not added at all, fix that
and fill them to black.

https://bugzilla.gnome.org/show_bug.cgi?id=711003
This commit is contained in:
Antonio Ospite 2013-10-28 12:36:04 +01:00 committed by Sebastian Dröge
parent 22f411378e
commit fdfc6baf14

View file

@ -1378,6 +1378,10 @@ do_scale (GstVideoFilter * filter, VSImage dest[4], VSImage src[4])
} }
break; break;
case GST_VIDEO_FORMAT_NV12: case GST_VIDEO_FORMAT_NV12:
if (add_borders) {
vs_fill_borders_Y (&dest[0], black);
vs_fill_borders_Y16 (&dest[1], (black[1] << 8) | black[2]);
}
switch (method) { switch (method) {
case GST_VIDEO_SCALE_NEAREST: case GST_VIDEO_SCALE_NEAREST:
vs_image_scale_nearest_Y (&dest[0], &src[0], videoscale->tmp_buf); vs_image_scale_nearest_Y (&dest[0], &src[0], videoscale->tmp_buf);