From 0860745385f730be8615373ed834a652154e2516 Mon Sep 17 00:00:00 2001 From: lucabe Date: Thu, 20 Jul 2006 12:13:57 +0000 Subject: Use libavutil in libswscale, and allow it to be built out of the mplayer tree git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19148 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libswscale/yuv2rgb.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'libswscale/yuv2rgb.c') diff --git a/libswscale/yuv2rgb.c b/libswscale/yuv2rgb.c index 63e465fb84..041e456639 100644 --- a/libswscale/yuv2rgb.c +++ b/libswscale/yuv2rgb.c @@ -36,12 +36,10 @@ #include #include "config.h" -//#include "video_out.h" #include "rgb2rgb.h" #include "swscale.h" #include "swscale_internal.h" -#include "mangle.h" -#include "libvo/img_format.h" //FIXME try to reduce dependency of such stuff +#include "img_format.h" //FIXME try to reduce dependency of such stuff #ifdef HAVE_MLIB #include "yuv2rgb_mlib.c" @@ -692,7 +690,7 @@ int yuv2rgb_c_init_tables (SwsContext *c, const int inv_table[4], int fullRange, switch (bpp) { case 32: - table_start= table_32 = malloc ((197 + 2*682 + 256 + 132) * sizeof (uint32_t)); + table_start= table_32 = av_malloc ((197 + 2*682 + 256 + 132) * sizeof (uint32_t)); entry_size = sizeof (uint32_t); table_r = table_32 + 197; @@ -708,7 +706,7 @@ int yuv2rgb_c_init_tables (SwsContext *c, const int inv_table[4], int fullRange, break; case 24: - table_start= table_8 = malloc ((256 + 2*232) * sizeof (uint8_t)); + table_start= table_8 = av_malloc ((256 + 2*232) * sizeof (uint8_t)); entry_size = sizeof (uint8_t); table_r = table_g = table_b = table_8 + 232; @@ -719,7 +717,7 @@ int yuv2rgb_c_init_tables (SwsContext *c, const int inv_table[4], int fullRange, case 15: case 16: - table_start= table_16 = malloc ((197 + 2*682 + 256 + 132) * sizeof (uint16_t)); + table_start= table_16 = av_malloc ((197 + 2*682 + 256 + 132) * sizeof (uint16_t)); entry_size = sizeof (uint16_t); table_r = table_16 + 197; @@ -750,7 +748,7 @@ int yuv2rgb_c_init_tables (SwsContext *c, const int inv_table[4], int fullRange, break; case 8: - table_start= table_332 = malloc ((197 + 2*682 + 256 + 132) * sizeof (uint8_t)); + table_start= table_332 = av_malloc ((197 + 2*682 + 256 + 132) * sizeof (uint8_t)); entry_size = sizeof (uint8_t); table_r = table_332 + 197; @@ -784,7 +782,7 @@ int yuv2rgb_c_init_tables (SwsContext *c, const int inv_table[4], int fullRange, break; case 4: case 4|128: - table_start= table_121 = malloc ((197 + 2*682 + 256 + 132) * sizeof (uint8_t)); + table_start= table_121 = av_malloc ((197 + 2*682 + 256 + 132) * sizeof (uint8_t)); entry_size = sizeof (uint8_t); table_r = table_121 + 197; @@ -815,7 +813,7 @@ int yuv2rgb_c_init_tables (SwsContext *c, const int inv_table[4], int fullRange, break; case 1: - table_start= table_1 = malloc (256*2 * sizeof (uint8_t)); + table_start= table_1 = av_malloc (256*2 * sizeof (uint8_t)); entry_size = sizeof (uint8_t); table_g = table_1; @@ -842,7 +840,7 @@ int yuv2rgb_c_init_tables (SwsContext *c, const int inv_table[4], int fullRange, c->table_bU[i] = table_b + entry_size * div_round (cbu * (i-128), 76309); } - if(c->yuvTable) free(c->yuvTable); + av_free(c->yuvTable); c->yuvTable= table_start; return 0; } -- cgit v1.2.3