search for: scanlinescale2_u8

Displaying 3 results from an estimated 3 matches for "scanlinescale2_u8".

2007 Feb 10
0
2 commits - libswfdec/jpeg
...00 Change chroma upscaling from nearest neighbor to bilinear interpolation. diff --git a/libswfdec/jpeg/jpeg_rgb_decoder.c b/libswfdec/jpeg/jpeg_rgb_decoder.c index e3b42c7..5240b08 100644 --- a/libswfdec/jpeg/jpeg_rgb_decoder.c +++ b/libswfdec/jpeg/jpeg_rgb_decoder.c @@ -229,7 +229,17 @@ scanlinescale2_u8 (unsigned char *dest, { int i; - for (i = 0; i < len; i++) { - dest[i] = src[i / 2]; + for (i = 0; i < len - 3; i += 2){ + dest[i] = src[i/2]; + dest[i+1] = (src[i/2] + src[i/2+1] + 1)/2; } + if (len & 1) { + dest[i] = src[i/2]; + dest[i+1] = (src[i/2] + src[i/...
2007 Feb 13
0
libswfdec/jpeg libswfdec/swfdec_image.c
...st, int d_rowstride, unsigned char *src, int src_rowstride, int width, int height); static void imagescale2v_u8 (unsigned char *dest, int d_rowstride, @@ -17,56 +45,231 @@ static void imagescale2h2v_u8 (unsigned unsigned char *src, int src_rowstride, int width, int height); static void scanlinescale2_u8 (unsigned char *dest, unsigned char *src, int len); +#endif -JpegRGBDecoder * -jpeg_rgb_decoder_new (void) +unsigned char * +jpeg_decoder_get_argb_image (JpegDecoder *dec) { - JpegRGBDecoder *rgbdec; - rgbdec = g_new0 (JpegRGBDecoder, 1); + if (dec->n_components == 3) { + if (d...
2007 Apr 17
0
8 commits - configure.ac doc/Makefile.am libswfdec/jpeg libswfdec/swfdec_debug.h libswfdec/swfdec_image.c
...ax(x,y) ((x)>(y)?(x):(y)) +#define oil_min(x,y) ((x)<(y)?(x):(y)) +#define oil_clamp_255(x) oil_max(0,oil_min((x),255)) -#define CLAMP(x,a,b) ((x)<(a) ? (a) : ((x)>(b) ? (b) : (x))) static int16_t jfif_matrix[24] = { 0, 0, -8192, -8192, @@ -48,6 +47,25 @@ static void scanlinescale2_u8 (unsigned #endif +int jpeg_decode_argb (uint8_t *data, int length, uint32_t **image, + int *width, int *height) +{ + JpegDecoder *dec; + int ret; + + dec = jpeg_decoder_new(); + + jpeg_decoder_addbits (dec, data, length); + ret = jpeg_decoder_decode(dec); + + if (!ret) return FALSE;...