diff options
author | H. Peter Anvin <hpa@zytor.com> | 2009-08-05 11:55:26 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2009-08-05 11:55:26 -0700 |
commit | d97602903c76f7f65b78d8536e8b6732a2da877e (patch) | |
tree | 53850c654aa78375501c1efce2b0002e8714df2b /com32/lib/jpeg/tinyjpeg-internal.h | |
parent | 288ce63dee16f80dac282c020b3ed7f4470e9265 (diff) | |
download | syslinux-d97602903c76f7f65b78d8536e8b6732a2da877e.tar.gz |
tinyjpeg: modify to handle partial image blocks
A lot of common resolutions, e.g. 800x600, include partial blocks at
the side of the image. Implement that properly.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'com32/lib/jpeg/tinyjpeg-internal.h')
-rw-r--r-- | com32/lib/jpeg/tinyjpeg-internal.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/com32/lib/jpeg/tinyjpeg-internal.h b/com32/lib/jpeg/tinyjpeg-internal.h index bd0e58da..bb5c6707 100644 --- a/com32/lib/jpeg/tinyjpeg-internal.h +++ b/com32/lib/jpeg/tinyjpeg-internal.h @@ -80,7 +80,7 @@ struct component typedef void (*decode_MCU_fct) (struct jdec_private *priv); -typedef void (*convert_colorspace_fct) (struct jdec_private *priv); +typedef void (*convert_colorspace_fct) (struct jdec_private *priv, int, int); struct jdec_private { @@ -167,6 +167,16 @@ enum std_markers { #define trace(fmt, args...) do { } while (0) #endif +#ifndef __likely +# define __likely(x) (!!(x)) +#endif +#ifndef __unlikely +# define __unlikely(x) (!!(x)) +#endif + +#define min(x, y) ((x) < (y) ? (x) : (y)) +#define max(x, y) ((x) > (y) ? (x) : (y)) + #if 0 static char *print_bits(unsigned int value, char *bitstr) { |