#include <sys/types.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include "rtjpeg_core.h"

Go to the source code of this file.
Defines | |
| #define | FIX_0_382683433 ((__s32) 98) |
| #define | FIX_0_541196100 ((__s32) 139) |
| #define | FIX_0_707106781 ((__s32) 181) |
| #define | FIX_1_306562965 ((__s32) 334) |
| #define | DESCALE10(x) (__s16)( ((x)+128) >> 8) |
| #define | DESCALE20(x) (__s16)(((x)+32768) >> 16) |
| #define | D_MULTIPLY(var, const) ((__s32) ((var) * (const))) |
| #define | FIX_1_082392200 ((__s32) 277) |
| #define | FIX_1_414213562 ((__s32) 362) |
| #define | FIX_1_847759065 ((__s32) 473) |
| #define | FIX_2_613125930 ((__s32) 669) |
| #define | DESCALE(x) (__s16)( ((x)+4) >> 3) |
| #define | RL(x) ((x)>235) ? 235 : (((x)<16) ? 16 : (x)) |
| #define | MULTIPLY(var, const) (((__s32) ((var) * (const)) + 128)>>8) |
| #define | KcrR 76284 |
| #define | KcrG 53281 |
| #define | KcbG 25625 |
| #define | KcbB 132252 |
| #define | Ky 76284 |
Functions | |
| either version of the | or (at your option) any later version.This program is distributed in the hope that it will be useful |
| int | RTjpeg_b2s (__s16 *data, __s8 *strm, __u8 bt8) |
| int | RTjpeg_s2b (__s16 *data, __s8 *strm, __u8 bt8, __u32 *qtbl) |
| void | RTjpeg_quant_init (void) |
| void | RTjpeg_quant (__s16 *block, __s32 *qtbl) |
| void | RTjpeg_dct_init (void) |
| void | RTjpeg_dctY (__u8 *idata, __s16 *odata, int rskip) |
| void | RTjpeg_idct_init (void) |
| void | RTjpeg_idct (__u8 *odata, __s16 *data, int rskip) |
| void | RTjpeg_init_data (void) |
| void | RTjpeg_init_Q (__u8 Q) |
| void | RTjpeg_init_compress (__u32 *buf, int width, int height, __u8 Q) |
| void | RTjpeg_init_decompress (__u32 *buf, int width, int height) |
| int | RTjpeg_compressYUV420 (__s8 *sp, unsigned char *bp) |
| int | RTjpeg_compressYUV422 (__s8 *sp, unsigned char *bp) |
| int | RTjpeg_compress8 (__s8 *sp, unsigned char *bp) |
| void | RTjpeg_decompressYUV422 (__s8 *sp, __u8 *bp) |
| void | RTjpeg_decompressYUV420 (__s8 *sp, __u8 *bp) |
| void | RTjpeg_decompress8 (__s8 *sp, __u8 *bp) |
| void | RTjpeg_init_mcompress (void) |
| int | RTjpeg_bcomp (__s16 *old, __u16 *mask) |
| void | RTjpeg_set_test (int i) |
| int | RTjpeg_mcompressYUV420 (__s8 *sp, unsigned char *bp, __u16 lmask, __u16 cmask) |
| int | RTjpeg_mcompressYUV422 (__s8 *sp, unsigned char *bp, __u16 lmask, __u16 cmask) |
| int | RTjpeg_mcompress8 (__s8 *sp, unsigned char *bp, __u16 lmask) |
| void | RTjpeg_color_init (void) |
| void | RTjpeg_yuv422rgb (__u8 *buf, __u8 *rgb, int stride) |
| void | RTjpeg_yuv420rgb (__u8 *buf, __u8 *rgb, int stride) |
| void | RTjpeg_yuvrgb32 (__u8 *buf, __u8 *rgb, int stride) |
| void | RTjpeg_yuvrgb24 (__u8 *buf, __u8 *rgb, int stride) |
| void | RTjpeg_yuvrgb16 (__u8 *buf, __u8 *rgb, int stride) |
| void | RTjpeg_yuvrgb8 (__u8 *buf, __u8 *rgb, int stride) |
Variables | |
| This program is free | software |
| you can rquantptr it and or modify it under the terms of the GNU General Public License as published by the Free Software | Foundation |
| either version of the | License |
| either version of the but WITHOUT ANY | WARRANTY |
| without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License for more details You should have received a copy of the GNU General Public License along with this | program |
| if | not |
| if write to the Free Software | Inc |
| if write to the Free Software Mass | Ave |
| if write to the Free Software Mass | Cambridge |
| if write to the Free Software Mass | MA |
| if write to the Free Software Mass USA This file is a modified version of | RTjpeg |
| if write to the Free Software Mass USA This file is a modified version of C Justin Schoeman *static const unsigned char | RTjpeg_ZZ [64] |
| static const __u64 | RTjpeg_aan_tab [64] |
| static const unsigned char | RTjpeg_lum_quant_tbl [64] |
| static const unsigned char | RTjpeg_chrom_quant_tbl [64] |
| #define D_MULTIPLY | ( | var, | |||
| const | ) | ((__s32) ((var) * (const))) |
| #define DESCALE | ( | x | ) | (__s16)( ((x)+4) >> 3) |
Definition at line 1181 of file rtjpeg_core.c.
| #define DESCALE10 | ( | x | ) | (__s16)( ((x)+128) >> 8) |
| #define DESCALE20 | ( | x | ) | (__s16)(((x)+32768) >> 16) |
| #define FIX_0_382683433 ((__s32) 98) |
Definition at line 250 of file rtjpeg_core.c.
| #define FIX_0_541196100 ((__s32) 139) |
Definition at line 251 of file rtjpeg_core.c.
| #define FIX_0_707106781 ((__s32) 181) |
Definition at line 252 of file rtjpeg_core.c.
| #define FIX_1_082392200 ((__s32) 277) |
Definition at line 1176 of file rtjpeg_core.c.
| #define FIX_1_306562965 ((__s32) 334) |
Definition at line 253 of file rtjpeg_core.c.
| #define FIX_1_414213562 ((__s32) 362) |
Definition at line 1177 of file rtjpeg_core.c.
| #define FIX_1_847759065 ((__s32) 473) |
Definition at line 1178 of file rtjpeg_core.c.
| #define FIX_2_613125930 ((__s32) 669) |
Definition at line 1179 of file rtjpeg_core.c.
| #define KcbB 132252 |
Definition at line 3053 of file rtjpeg_core.c.
Referenced by RTjpeg_yuv420rgb(), RTjpeg_yuv422rgb(), RTjpeg_yuvrgb16(), RTjpeg_yuvrgb24(), and RTjpeg_yuvrgb32().
| #define KcbG 25625 |
Definition at line 3052 of file rtjpeg_core.c.
Referenced by RTjpeg_yuv420rgb(), RTjpeg_yuv422rgb(), RTjpeg_yuvrgb16(), RTjpeg_yuvrgb24(), and RTjpeg_yuvrgb32().
| #define KcrG 53281 |
Definition at line 3051 of file rtjpeg_core.c.
Referenced by RTjpeg_yuv420rgb(), RTjpeg_yuv422rgb(), RTjpeg_yuvrgb16(), RTjpeg_yuvrgb24(), and RTjpeg_yuvrgb32().
| #define KcrR 76284 |
Definition at line 3050 of file rtjpeg_core.c.
Referenced by RTjpeg_yuv420rgb(), RTjpeg_yuv422rgb(), RTjpeg_yuvrgb16(), RTjpeg_yuvrgb24(), and RTjpeg_yuvrgb32().
| #define Ky 76284 |
Definition at line 3054 of file rtjpeg_core.c.
Referenced by RTjpeg_yuv420rgb(), RTjpeg_yuv422rgb(), RTjpeg_yuvrgb16(), RTjpeg_yuvrgb24(), and RTjpeg_yuvrgb32().
| #define MULTIPLY | ( | var, | |||
| const | ) | (((__s32) ((var) * (const)) + 128)>>8) |
Definition at line 1186 of file rtjpeg_core.c.
| #define RL | ( | x | ) | ((x)>235) ? 235 : (((x)<16) ? 16 : (x)) |
| either version of the or | ( | at your | option | ) |
Definition at line 92 of file rtjpeg_core.c.
References co(), and RTjpeg_ZZ.
Referenced by RTjpeg_compress8(), RTjpeg_compressYUV420(), RTjpeg_compressYUV422(), RTjpeg_mcompress8(), RTjpeg_mcompressYUV420(), and RTjpeg_mcompressYUV422().

Definition at line 2820 of file rtjpeg_core.c.
Referenced by RTjpeg_mcompress8(), RTjpeg_mcompressYUV420(), and RTjpeg_mcompressYUV422().
| void RTjpeg_color_init | ( | void | ) |
Definition at line 3046 of file rtjpeg_core.c.
| int RTjpeg_compress8 | ( | __s8 * | sp, | |
| unsigned char * | bp | |||
| ) |
Definition at line 2585 of file rtjpeg_core.c.
References emms, RTjpeg_b2s(), RTjpeg_dctY(), and RTjpeg_quant().

| int RTjpeg_compressYUV420 | ( | __s8 * | sp, | |
| unsigned char * | bp | |||
| ) |
Definition at line 2487 of file rtjpeg_core.c.
References emms, RTjpeg_b2s(), RTjpeg_dctY(), and RTjpeg_quant().

| int RTjpeg_compressYUV422 | ( | __s8 * | sp, | |
| unsigned char * | bp | |||
| ) |
Definition at line 2541 of file rtjpeg_core.c.
References emms, RTjpeg_b2s(), RTjpeg_dctY(), and RTjpeg_quant().

| void RTjpeg_dct_init | ( | void | ) |
Definition at line 260 of file rtjpeg_core.c.
References RTjpeg_aan_tab.
Referenced by RTjpeg_init_compress(), and RTjpeg_init_Q().
Definition at line 271 of file rtjpeg_core.c.
References D_MULTIPLY, DESCALE10, DESCALE20, FIX_0_382683433, FIX_0_541196100, FIX_0_707106781, FIX_1_306562965, movq_m2r, movq_r2m, movq_r2r, paddw_m2r, paddw_r2r, pmulhw_m2r, pmulhw_r2r, psllw_i2r, psubw_m2r, psubw_r2r, punpckhbw_r2r, punpckhdq_r2r, punpckhwd_m2r, punpckhwd_r2r, punpcklbw_r2r, punpckldq_r2r, punpcklwd_m2r, and punpcklwd_r2r.
Referenced by RTjpeg_compress8(), RTjpeg_compressYUV420(), RTjpeg_compressYUV422(), RTjpeg_mcompress8(), RTjpeg_mcompressYUV420(), and RTjpeg_mcompressYUV422().
Definition at line 2723 of file rtjpeg_core.c.
References emms, RTjpeg_idct(), and RTjpeg_s2b().

Definition at line 2661 of file rtjpeg_core.c.
References emms, RTjpeg_idct(), and RTjpeg_s2b().
Referenced by quicktime_decode_rtjpeg().

Definition at line 2613 of file rtjpeg_core.c.
References emms, RTjpeg_idct(), and RTjpeg_s2b().

Definition at line 1199 of file rtjpeg_core.c.
References DESCALE, FIX_1_082392200, FIX_1_414213562, FIX_1_847759065, FIX_2_613125930, LL, movq_m2r, movq_r2m, movq_r2r, MULTIPLY, packuswb_r2r, paddw_m2r, paddw_r2r, pmulhw_m2r, psllw_i2r, psraw_i2r, psubw_m2r, psubw_r2r, punpckhbw_r2r, punpckhdq_r2r, punpckhwd_r2r, punpcklbw_r2r, punpckldq_r2r, punpcklwd_r2r, and RL.
Referenced by RTjpeg_decompress8(), RTjpeg_decompressYUV420(), and RTjpeg_decompressYUV422().
| void RTjpeg_idct_init | ( | void | ) |
Definition at line 1188 of file rtjpeg_core.c.
References RTjpeg_aan_tab.
Referenced by RTjpeg_init_decompress(), and RTjpeg_init_Q().
Definition at line 2412 of file rtjpeg_core.c.
References RTjpeg_chrom_quant_tbl, RTjpeg_dct_init(), RTjpeg_init_data(), RTjpeg_lum_quant_tbl, RTjpeg_quant_init(), and RTjpeg_ZZ.
Referenced by quicktime_init_codec_rtjpeg().

| void RTjpeg_init_data | ( | void | ) |
Definition at line 2336 of file rtjpeg_core.c.
Referenced by RTjpeg_init_compress(), and RTjpeg_init_decompress().
| void RTjpeg_init_decompress | ( | __u32 * | buf, | |
| int | width, | |||
| int | height | |||
| ) |
Definition at line 2456 of file rtjpeg_core.c.
References RTjpeg_idct_init(), RTjpeg_init_data(), and RTjpeg_ZZ.
Referenced by quicktime_init_codec_rtjpeg().

| void RTjpeg_init_mcompress | ( | void | ) |
| void RTjpeg_init_Q | ( | __u8 | Q | ) |
Definition at line 2367 of file rtjpeg_core.c.
References RTjpeg_chrom_quant_tbl, RTjpeg_dct_init(), RTjpeg_idct_init(), RTjpeg_lum_quant_tbl, RTjpeg_quant_init(), and RTjpeg_ZZ.
Referenced by quicktime_decode_rtjpeg().

Definition at line 3008 of file rtjpeg_core.c.
References emms, RTjpeg_b2s(), RTjpeg_bcomp(), RTjpeg_dctY(), and RTjpeg_quant().

Definition at line 2840 of file rtjpeg_core.c.
References emms, RTjpeg_b2s(), RTjpeg_bcomp(), RTjpeg_dctY(), and RTjpeg_quant().

Definition at line 2932 of file rtjpeg_core.c.
References emms, RTjpeg_b2s(), RTjpeg_bcomp(), RTjpeg_dctY(), and RTjpeg_quant().

Definition at line 229 of file rtjpeg_core.c.
Referenced by RTjpeg_compress8(), RTjpeg_compressYUV420(), RTjpeg_compressYUV422(), RTjpeg_mcompress8(), RTjpeg_mcompressYUV420(), and RTjpeg_mcompressYUV422().
| void RTjpeg_quant_init | ( | void | ) |
Definition at line 225 of file rtjpeg_core.c.
Referenced by RTjpeg_init_compress(), and RTjpeg_init_Q().
Definition at line 141 of file rtjpeg_core.c.
References co(), and RTjpeg_ZZ.
Referenced by RTjpeg_decompress8(), RTjpeg_decompressYUV420(), and RTjpeg_decompressYUV422().

| void RTjpeg_set_test | ( | int | i | ) |
Definition at line 2835 of file rtjpeg_core.c.
Definition at line 3104 of file rtjpeg_core.c.
References KcbB, KcbG, KcrG, KcrR, and Ky.
Referenced by quicktime_decode_rtjpeg().
Definition at line 3424 of file rtjpeg_core.c.
| if write to the Free Software Mass Ave |
Definition at line 19 of file rtjpeg_core.c.
| if write to the Free Software Mass Cambridge |
Definition at line 19 of file rtjpeg_core.c.
| if write to the Free Software Foundation |
Definition at line 10 of file rtjpeg_core.c.
| if write to the Free Software Inc |
Definition at line 19 of file rtjpeg_core.c.
| either version of the License |
Definition at line 10 of file rtjpeg_core.c.
| if write to the Free Software Mass MA |
Definition at line 19 of file rtjpeg_core.c.
| if not |
Definition at line 19 of file rtjpeg_core.c.
Definition at line 19 of file rtjpeg_core.c.
const __u64 RTjpeg_aan_tab[64] [static] |
Initial value:
{
4294967296ULL, 5957222912ULL, 5611718144ULL, 5050464768ULL, 4294967296ULL, 3374581504ULL, 2324432128ULL, 1184891264ULL,
5957222912ULL, 8263040512ULL, 7783580160ULL, 7005009920ULL, 5957222912ULL, 4680582144ULL, 3224107520ULL, 1643641088ULL,
5611718144ULL, 7783580160ULL, 7331904512ULL, 6598688768ULL, 5611718144ULL, 4408998912ULL, 3036936960ULL, 1548224000ULL,
5050464768ULL, 7005009920ULL, 6598688768ULL, 5938608128ULL, 5050464768ULL, 3968072960ULL, 2733115392ULL, 1393296000ULL,
4294967296ULL, 5957222912ULL, 5611718144ULL, 5050464768ULL, 4294967296ULL, 3374581504ULL, 2324432128ULL, 1184891264ULL,
3374581504ULL, 4680582144ULL, 4408998912ULL, 3968072960ULL, 3374581504ULL, 2651326208ULL, 1826357504ULL, 931136000ULL,
2324432128ULL, 3224107520ULL, 3036936960ULL, 2733115392ULL, 2324432128ULL, 1826357504ULL, 1258030336ULL, 641204288ULL,
1184891264ULL, 1643641088ULL, 1548224000ULL, 1393296000ULL, 1184891264ULL, 931136000ULL, 641204288ULL, 326894240ULL,
}
Definition at line 59 of file rtjpeg_core.c.
Referenced by RTjpeg_dct_init(), and RTjpeg_idct_init().
const unsigned char RTjpeg_chrom_quant_tbl[64] [static] |
Initial value:
{
17, 18, 24, 47, 99, 99, 99, 99,
18, 21, 26, 66, 99, 99, 99, 99,
24, 26, 56, 99, 99, 99, 99, 99,
47, 66, 99, 99, 99, 99, 99, 99,
99, 99, 99, 99, 99, 99, 99, 99,
99, 99, 99, 99, 99, 99, 99, 99,
99, 99, 99, 99, 99, 99, 99, 99,
99, 99, 99, 99, 99, 99, 99, 99
}
Definition at line 81 of file rtjpeg_core.c.
Referenced by RTjpeg_init_compress(), and RTjpeg_init_Q().
const unsigned char RTjpeg_lum_quant_tbl[64] [static] |
Initial value:
{
16, 11, 10, 16, 24, 40, 51, 61,
12, 12, 14, 19, 26, 58, 60, 55,
14, 13, 16, 24, 40, 57, 69, 56,
14, 17, 22, 29, 51, 87, 80, 62,
18, 22, 37, 56, 68, 109, 103, 77,
24, 35, 55, 64, 81, 104, 113, 92,
49, 64, 78, 87, 103, 121, 120, 101,
72, 92, 95, 98, 112, 100, 103, 99
}
Definition at line 70 of file rtjpeg_core.c.
Referenced by RTjpeg_init_compress(), and RTjpeg_init_Q().
if write to the Free Software Mass USA This file is a modified version of C Justin Schoeman* static const unsigned char RTjpeg_ZZ[64] [static] |
Initial value:
{
0,
8, 1,
2, 9, 16,
24, 17, 10, 3,
4, 11, 18, 25, 32,
40, 33, 26, 19, 12, 5,
6, 13, 20, 27, 34, 41, 48,
56, 49, 42, 35, 28, 21, 14, 7,
15, 22, 29, 36, 43, 50, 57,
58, 51, 44, 37, 30, 23,
31, 38, 45, 52, 59,
60, 53, 46, 39,
47, 54, 61,
62, 55,
63 }
Definition at line 42 of file rtjpeg_core.c.
Referenced by RTjpeg_b2s(), RTjpeg_init_compress(), RTjpeg_init_decompress(), RTjpeg_init_Q(), and RTjpeg_s2b().
| either version of the but WITHOUT ANY WARRANTY |
Definition at line 14 of file rtjpeg_core.c.
1.5.5