1/* 2 * MJPEG encoder and decoder 3 * Copyright (c) 2000, 2001 Fabrice Bellard 4 * Copyright (c) 2003 Alex Beregszaszi 5 * Copyright (c) 2003-2004 Michael Niedermayer 6 * 7 * Support for external huffman table, various fixes (AVID workaround), 8 * aspecting, new decode_frame mechanism and apple mjpeg-b support 9 * by Alex Beregszaszi 10 * 11 * This file is part of FFmpeg. 12 * 13 * FFmpeg is free software; you can redistribute it and/or 14 * modify it under the terms of the GNU Lesser General Public 15 * License as published by the Free Software Foundation; either 16 * version 2.1 of the License, or (at your option) any later version. 17 * 18 * FFmpeg is distributed in the hope that it will be useful, 19 * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 21 * Lesser General Public License for more details. 22 * 23 * You should have received a copy of the GNU Lesser General Public 24 * License along with FFmpeg; if not, write to the Free Software 25 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 26 */ 27 28/** 29 * @file 30 * MJPEG encoder and decoder. 31 */ 32 33#include "jpegtabs.h" 34 35#if 0 36/* These are the sample quantization tables given in JPEG spec section K.1. 37 * The spec says that the values given produce "good" quality, and 38 * when divided by 2, "very good" quality. 39 */ 40static const unsigned char std_luminance_quant_tbl[64] = { 41 16, 11, 10, 16, 24, 40, 51, 61, 42 12, 12, 14, 19, 26, 58, 60, 55, 43 14, 13, 16, 24, 40, 57, 69, 56, 44 14, 17, 22, 29, 51, 87, 80, 62, 45 18, 22, 37, 56, 68, 109, 103, 77, 46 24, 35, 55, 64, 81, 104, 113, 92, 47 49, 64, 78, 87, 103, 121, 120, 101, 48 72, 92, 95, 98, 112, 100, 103, 99 49}; 50static const unsigned char std_chrominance_quant_tbl[64] = { 51 17, 18, 24, 47, 99, 99, 99, 99, 52 18, 21, 26, 66, 99, 99, 99, 99, 53 24, 26, 56, 99, 99, 99, 99, 99, 54 47, 66, 99, 99, 99, 99, 99, 99, 55 99, 99, 99, 99, 99, 99, 99, 99, 56 99, 99, 99, 99, 99, 99, 99, 99, 57 99, 99, 99, 99, 99, 99, 99, 99, 58 99, 99, 99, 99, 99, 99, 99, 99 59}; 60#endif 61