Mercurial > hg > easaier-soundaccess
changeset 169:269562a2b89c
- be sure we create a picture multiple of 4 when resizing,
- change interpolation from BI_CUBIC to FAST_BILINEAR to imporove speed.
author | lbarthelemy |
---|---|
date | Mon, 19 Nov 2007 16:11:02 +0000 |
parents | 00ab90498dcc |
children | caaddda5477c |
files | sv/videoio/SDL_ffmpeg.cpp |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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);