]> git.sesse.net Git - mlt/blobdiff - src/modules/motion_est/filter_crop_detect.c
Massive refactoring of image conversion.
[mlt] / src / modules / motion_est / filter_crop_detect.c
index 8165141a380ae20b2f29989096d06dbdb29936e9..c1f91071e0fac7c16313d52d31581d3c34970840 100644 (file)
@@ -87,17 +87,9 @@ static int filter_get_image( mlt_frame this, uint8_t **image, mlt_image_format *
        // There is no way to detect a crop for sure, so make up an arbitrary one
        int thresh = mlt_properties_get_int( properties, "thresh" );
 
-       int xstride, ystride;
-
-       switch( *format ) {
-               case mlt_image_yuv422:
-                       xstride = 2;
-                       ystride = 2 * *width;
-                       break;
-               default:
-                       fprintf(stderr, "image format not supported by filter_crop_detect\n");
-                       return -1;
-       }
+       *format = mlt_image_yuv422;
+       int xstride = 2;
+       int ystride = 2 * *width;
 
        int x, y, average_brightness, deviation; // Scratch variables
        uint8_t *q;