// Get the new image and frame number
+ *format = mlt_image_yuv422;
int error = mlt_frame_get_image( frame, image, format, width, height, 1 );
#ifdef BENCHMARK
c->former_vectors_valid = 0;
memset( c->former_vectors, 0, c->mv_size );
- // Calculate the size of our steps (the number of bytes that seperate adjacent pixels in X and Y direction)
- switch( *format ) {
- case mlt_image_yuv422:
- c->xstride = 2;
- c->ystride = c->xstride * *width;
- break;
- default:
- // I don't know
- fprintf(stderr, "\"I am unfamiliar with your new fangled pixel format!\" -filter_motion_est\n");
- return -1;
- }
+ c->xstride = 2;
+ c->ystride = c->xstride * *width;
// Allocate a cache for the previous frame's image
c->former_image = mlt_pool_alloc( *width * *height * 2 );