diff options
author | Stefan Kost <ensonic@users.sf.net> | 2009-07-21 17:48:33 +0300 |
---|---|---|
committer | Stefan Kost <ensonic@users.sf.net> | 2009-07-21 17:52:33 +0300 |
commit | 43657ef1f3aa85f7e5dbce57681181da4c049b96 (patch) | |
tree | 0689db03395bc75a128b91def04515ef8549336a | |
parent | b3753116d22f90a992f6ec8b4a876faca3a3ebfc (diff) | |
download | gst-plugins-bad-43657ef1f3aa85f7e5dbce57681181da4c049b96.tar.gz gst-plugins-bad-43657ef1f3aa85f7e5dbce57681181da4c049b96.tar.bz2 gst-plugins-bad-43657ef1f3aa85f7e5dbce57681181da4c049b96.zip |
camerabin: small speedup in software zoom
Force crop on even pixel position to avoid slowpath in crop & scale.
-rw-r--r-- | gst/camerabin/gstcamerabin.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gst/camerabin/gstcamerabin.c b/gst/camerabin/gstcamerabin.c index 50f863d3..22a33477 100644 --- a/gst/camerabin/gstcamerabin.c +++ b/gst/camerabin/gstcamerabin.c @@ -1031,6 +1031,10 @@ gst_camerabin_set_element_zoom (GstCameraBin * camera, gint zoom) if (zoom != ZOOM_1X) { w2_crop = (camera->width - (camera->width * ZOOM_1X / zoom)) / 2; h2_crop = (camera->height - (camera->height * ZOOM_1X / zoom)) / 2; + + /* force number of pixels cropped from left to be even, to avoid slow code + * path on videoscale */ + w2_crop &= 0xFFFE; } pad_zoom_sink = gst_element_get_static_pad (camera->src_zoom_crop, "sink"); |