# HG changeset patch # User lbarthelemy # Date 1195488662 0 # Node ID 269562a2b89c8c5416bb4e09352515932ec5a501 # Parent 00ab90498dcc9137457c19eeec09e9ce3c4d6b13 - be sure we create a picture multiple of 4 when resizing, - change interpolation from BI_CUBIC to FAST_BILINEAR to imporove speed. diff -r 00ab90498dcc -r 269562a2b89c sv/videoio/SDL_ffmpeg.cpp --- a/sv/videoio/SDL_ffmpeg.cpp Fri Nov 16 16:47:00 2007 +0000 +++ b/sv/videoio/SDL_ffmpeg.cpp Mon Nov 19 16:11:02 2007 +0000 @@ -611,17 +611,20 @@ // { int w=(int)(zoomFivan*320+0.5); int h=(int)(zoomFivan*240+0.5); - if ((w>file->vs[file->videoStream]->width)||(h>file->vs[file->videoStream]->height)){ w=file->vs[file->videoStream]->width; h=file->vs[file->videoStream]->height; } + // Be sure we have a multiple of 4 + w &= 0xFFFFFFFC; + h &= 0xFFFFFFFC; if (img_convert_ctx == NULL) { + img_convert_ctx = sws_getContext(file->vs[file->videoStream]->width, file->vs[file->videoStream]->height, ((AVCodecContext*)file->vs[file->videoStream]->_ffmpeg)->pix_fmt, w,h, file->vs[file->videoStream]->pixFmt, - sws_flags, NULL, NULL, NULL); + SWS_FAST_BILINEAR, NULL, NULL, NULL); if (img_convert_ctx == NULL) { fprintf(stderr, "Cannot initialize the conversion context\n"); exit(1);