video-scaler: remove color range argument
authorWim Taymans <wtaymans@redhat.com>
Wed, 29 Oct 2014 16:38:33 +0000 (17:38 +0100)
committerWim Taymans <wtaymans@redhat.com>
Wed, 29 Oct 2014 16:38:33 +0000 (17:38 +0100)
We just need to clip to the format limits, if there is extra headroom in
the range we can use that without problems.

gst-libs/gst/video/video-converter.c
gst-libs/gst/video/video-scaler.c
gst-libs/gst/video/video-scaler.h

index b0a3360..4eb72d9 100644 (file)
@@ -1154,7 +1154,7 @@ do_hscale_lines (GstLineCache * cache, gint line, GstVideoConverter * convert)
 
   GST_DEBUG ("hresample line %d", line);
   gst_video_scaler_horizontal (convert->h_scaler, GST_VIDEO_FORMAT_AYUV,
-      GST_VIDEO_COLOR_RANGE_0_255, lines[0], destline, 0, convert->out_width);
+      lines[0], destline, 0, convert->out_width);
 
   gst_line_cache_add_line (cache, line, destline);
 
@@ -1174,8 +1174,7 @@ do_vscale_lines (GstLineCache * cache, gint line, GstVideoConverter * convert)
 
   GST_DEBUG ("vresample line %d %d-%d", line, sline, sline + n_lines - 1);
   gst_video_scaler_vertical (convert->v_scaler, GST_VIDEO_FORMAT_AYUV,
-      GST_VIDEO_COLOR_RANGE_0_255, lines, destline, line,
-      convert->v_scale_width);
+      lines, destline, line, convert->v_scale_width);
 
   gst_line_cache_add_line (cache, line, destline);
 
index e599f43..fcfdba4 100644 (file)
@@ -494,8 +494,7 @@ video_scale_v_ntap_8888 (GstVideoScaler * scale,
  */
 void
 gst_video_scaler_horizontal (GstVideoScaler * scale, GstVideoFormat format,
-    GstVideoColorRange range, gpointer src, gpointer dest, guint dest_offset,
-    guint width)
+    gpointer src, gpointer dest, guint dest_offset, guint width)
 {
   GstVideoScalerHFunc func;
 
@@ -534,8 +533,7 @@ gst_video_scaler_horizontal (GstVideoScaler * scale, GstVideoFormat format,
  */
 void
 gst_video_scaler_vertical (GstVideoScaler * scale, GstVideoFormat format,
-    GstVideoColorRange range, gpointer srcs[], gpointer dest, guint dest_offset,
-    guint width)
+    gpointer srcs[], gpointer dest, guint dest_offset, guint width)
 {
   GstVideoScalerVFunc func;
 
index ae6b1c1..595a9a1 100644 (file)
@@ -64,12 +64,10 @@ const gdouble *       gst_video_scaler_get_coeff      (GstVideoScaler *scale,
 
 void                  gst_video_scaler_horizontal     (GstVideoScaler *scale,
                                                        GstVideoFormat format,
-                                                       GstVideoColorRange range,
                                                        gpointer src, gpointer dest,
                                                        guint dest_offset, guint width);
 void                  gst_video_scaler_vertical       (GstVideoScaler *scale,
                                                        GstVideoFormat format,
-                                                       GstVideoColorRange range,
                                                        gpointer src_lines[], gpointer dest,
                                                        guint out_offset, guint width);