diff options
author | Luca Abeni <lucabe72@email.it> | 2006-07-20 12:13:57 +0000 |
---|---|---|
committer | Luca Abeni <lucabe72@email.it> | 2006-07-20 12:13:57 +0000 |
commit | 94c4def23c3b212dd0f8fde902cecf47e5bee1c2 (patch) | |
tree | ba231cc7583e8f1a7b695517df31aa686034ac6a /libswscale/yuv2rgb.c | |
parent | 918a45917c4cab7f830c05d728f257a7c0ce2f34 (diff) | |
download | ffmpeg-94c4def23c3b212dd0f8fde902cecf47e5bee1c2.tar.gz |
Use libavutil in libswscale, and allow it to be built out of the mplayer tree
Originally committed as revision 19148 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
Diffstat (limited to 'libswscale/yuv2rgb.c')
-rw-r--r-- | libswscale/yuv2rgb.c | 18 |
1 files changed, 8 insertions, 10 deletions
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 <assert.h> #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; } |