From 803c6b9e95cb9b9925e6a1d7b8b5baca645ed693 Mon Sep 17 00:00:00 2001 From: Dan Dennedy Date: Sun, 5 Feb 2012 01:30:54 -0800 Subject: [PATCH] fix color problem with libav (3483629) --- src/modules/avformat/consumer_avformat.c | 2 +- src/modules/avformat/filter_avcolour_space.c | 2 +- src/modules/avformat/producer_avformat.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/avformat/consumer_avformat.c b/src/modules/avformat/consumer_avformat.c index 85d62d5e..9b70cebe 100644 --- a/src/modules/avformat/consumer_avformat.c +++ b/src/modules/avformat/consumer_avformat.c @@ -1701,7 +1701,7 @@ static void *consumer_thread( void *arg ) // Do the colour space conversion #ifdef SWSCALE - int flags = SWS_BILINEAR; + int flags = SWS_BICUBIC; #ifdef USE_MMX flags |= SWS_CPU_CAPS_MMX; #endif diff --git a/src/modules/avformat/filter_avcolour_space.c b/src/modules/avformat/filter_avcolour_space.c index 6396f887..f812146a 100644 --- a/src/modules/avformat/filter_avcolour_space.c +++ b/src/modules/avformat/filter_avcolour_space.c @@ -117,7 +117,7 @@ static void av_convert_image( uint8_t *out, uint8_t *in, int out_fmt, int in_fmt AVPicture input; AVPicture output; #ifdef SWSCALE - int flags = SWS_BILINEAR | SWS_ACCURATE_RND; + int flags = SWS_BICUBIC | SWS_ACCURATE_RND; if ( out_fmt == PIX_FMT_YUYV422 ) flags |= SWS_FULL_CHR_H_INP; diff --git a/src/modules/avformat/producer_avformat.c b/src/modules/avformat/producer_avformat.c index 103fcae5..87b87afa 100644 --- a/src/modules/avformat/producer_avformat.c +++ b/src/modules/avformat/producer_avformat.c @@ -1247,7 +1247,7 @@ static void convert_image( AVFrame *frame, uint8_t *buffer, int pix_fmt, { #ifdef SWSCALE int full_range = -1; - int flags = SWS_BILINEAR | SWS_ACCURATE_RND; + int flags = SWS_BICUBIC | SWS_ACCURATE_RND; #ifdef USE_MMX flags |= SWS_CPU_CAPS_MMX; -- 2.39.2