|
Instrument Neutral Distributed Interface INDI 2.2.5
|
#include <stddef.h>#include <stdio.h>#include <inttypes.h>Go to the source code of this file.
Macros | |
| #define | Y4M_ILACE_NONE 0 /** non-interlaced, progressive frame */ |
| #define | Y4M_ILACE_TOP_FIRST 1 /** interlaced, top-field first */ |
| #define | Y4M_ILACE_BOTTOM_FIRST 2 /** interlaced, bottom-field first */ |
| #define | Y4M_ILACE_MIXED 3 /** mixed, "refer to frame header" */ |
| #define | Y4M_CHROMA_420JPEG 0 /** 4:2:0, H/V centered, for JPEG/MPEG-1 */ |
| #define | Y4M_CHROMA_420MPEG2 1 /** 4:2:0, H cosited, for MPEG-2 */ |
| #define | Y4M_CHROMA_420PALDV 2 /** 4:2:0, alternating Cb/Cr, for PAL-DV */ |
| #define | Y4M_CHROMA_444 3 /** 4:4:4, no subsampling, phew. */ |
| #define | Y4M_CHROMA_422 4 /** 4:2:2, H cosited */ |
| #define | Y4M_CHROMA_411 5 /** 4:1:1, H cosited */ |
| #define | Y4M_CHROMA_MONO 6 /** luma plane only */ |
| #define | Y4M_CHROMA_444ALPHA 7 /** 4:4:4 with an alpha channel */ |
Functions | |
| int | decode_jpeg_raw (unsigned char *jpeg_data, int len, int itype, int ctype, unsigned int width, unsigned int height, unsigned char *raw0, unsigned char *raw1, unsigned char *raw2) |
| decode JPEG buffer | |
| int | decode_jpeg_rgb (unsigned char *inBuffer, unsigned long inSize, uint8_t **memptr, size_t *memsize, int *naxis, int *w, int *h) |
| decode_jpeg_rgb Read jpeg in memory buffer and produce RGB image | |
| int | decode_jpeg_gray_raw (unsigned char *jpeg_data, int len, int itype, int ctype, unsigned int width, unsigned int height, unsigned char *raw0, unsigned char *raw1, unsigned char *raw2) |
| decode JPEG raw gray buffer | |
| int | encode_jpeg_raw (unsigned char *jpeg_data, int len, int quality, int itype, int ctype, unsigned int width, unsigned int height, unsigned char *raw0, unsigned char *raw1, unsigned char *raw2) |
| encode raw JPEG buffer | |
| #define Y4M_CHROMA_411 5 /** 4:1:1, H cosited */ |
Definition at line 46 of file jpegutils.h.
| #define Y4M_CHROMA_420JPEG 0 /** 4:2:0, H/V centered, for JPEG/MPEG-1 */ |
Definition at line 41 of file jpegutils.h.
| #define Y4M_CHROMA_420MPEG2 1 /** 4:2:0, H cosited, for MPEG-2 */ |
Definition at line 42 of file jpegutils.h.
| #define Y4M_CHROMA_420PALDV 2 /** 4:2:0, alternating Cb/Cr, for PAL-DV */ |
Definition at line 43 of file jpegutils.h.
| #define Y4M_CHROMA_422 4 /** 4:2:2, H cosited */ |
Definition at line 45 of file jpegutils.h.
| #define Y4M_CHROMA_444 3 /** 4:4:4, no subsampling, phew. */ |
Definition at line 44 of file jpegutils.h.
| #define Y4M_CHROMA_444ALPHA 7 /** 4:4:4 with an alpha channel */ |
Definition at line 48 of file jpegutils.h.
| #define Y4M_CHROMA_MONO 6 /** luma plane only */ |
Definition at line 47 of file jpegutils.h.
| #define Y4M_ILACE_BOTTOM_FIRST 2 /** interlaced, bottom-field first */ |
Definition at line 38 of file jpegutils.h.
| #define Y4M_ILACE_MIXED 3 /** mixed, "refer to frame header" */ |
Definition at line 39 of file jpegutils.h.
| #define Y4M_ILACE_NONE 0 /** non-interlaced, progressive frame */ |
Definition at line 36 of file jpegutils.h.
| #define Y4M_ILACE_TOP_FIRST 1 /** interlaced, top-field first */ |
Definition at line 37 of file jpegutils.h.
| int decode_jpeg_gray_raw | ( | unsigned char * | jpeg_data, |
| int | len, | ||
| int | itype, | ||
| int | ctype, | ||
| unsigned int | width, | ||
| unsigned int | height, | ||
| unsigned char * | raw0, | ||
| unsigned char * | raw1, | ||
| unsigned char * | raw2 | ||
| ) |
decode JPEG raw gray buffer
Definition at line 837 of file jpegutils.c.
| int decode_jpeg_raw | ( | unsigned char * | jpeg_data, |
| int | len, | ||
| int | itype, | ||
| int | ctype, | ||
| unsigned int | width, | ||
| unsigned int | height, | ||
| unsigned char * | raw0, | ||
| unsigned char * | raw1, | ||
| unsigned char * | raw2 | ||
| ) |
decode JPEG buffer
Definition at line 461 of file jpegutils.c.
| int decode_jpeg_rgb | ( | unsigned char * | inBuffer, |
| unsigned long | inSize, | ||
| uint8_t ** | memptr, | ||
| size_t * | memsize, | ||
| int * | naxis, | ||
| int * | w, | ||
| int * | h | ||
| ) |
decode_jpeg_rgb Read jpeg in memory buffer and produce RGB image
| inBuffer | pointer to jpeg file in memory |
| inSize | file of jpeg file in bytes |
| memptr | pointer to store RGB data. To enhance performance, the memory must be allocated at least byte. memptr = malloc(1) since subsequent calls will use realloc to allocate memory. The caller is responsible for free(*memptr) eventually. |
| memsize | size of RGB data as determined after jpeg decompression |
| naxis | 1 for mono, 3 for color |
| w | width of image in pixels |
| h | height image in pixels |
Definition at line 1309 of file jpegutils.c.
| int encode_jpeg_raw | ( | unsigned char * | jpeg_data, |
| int | len, | ||
| int | quality, | ||
| int | itype, | ||
| int | ctype, | ||
| unsigned int | width, | ||
| unsigned int | height, | ||
| unsigned char * | raw0, | ||
| unsigned char * | raw1, | ||
| unsigned char * | raw2 | ||
| ) |
encode raw JPEG buffer
Definition at line 1156 of file jpegutils.c.