mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 06:46:38 +00:00
camerabin: small speedup in software zoom
Force crop on even pixel position to avoid slowpath in crop & scale.
This commit is contained in:
parent
b3753116d2
commit
43657ef1f3
1 changed files with 4 additions and 0 deletions
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue