2001-08-06 03:44:48 +03:00
|
|
|
/*
|
|
|
|
* MJPEG encoder and decoder
|
2009-01-19 17:46:40 +02:00
|
|
|
* Copyright (c) 2000, 2001 Fabrice Bellard
|
2004-08-21 22:18:45 +03:00
|
|
|
* Copyright (c) 2003 Alex Beregszaszi
|
|
|
|
* Copyright (c) 2003-2004 Michael Niedermayer
|
2001-08-06 03:44:48 +03:00
|
|
|
*
|
2007-07-05 13:37:29 +03:00
|
|
|
* Support for external huffman table, various fixes (AVID workaround),
|
|
|
|
* aspecting, new decode_frame mechanism and apple mjpeg-b support
|
|
|
|
* by Alex Beregszaszi
|
|
|
|
*
|
2006-10-07 18:30:46 +03:00
|
|
|
* This file is part of FFmpeg.
|
|
|
|
*
|
|
|
|
* FFmpeg is free software; you can redistribute it and/or
|
2002-05-26 01:39:29 +03:00
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
2006-10-07 18:30:46 +03:00
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
2001-08-06 03:44:48 +03:00
|
|
|
*
|
2006-10-07 18:30:46 +03:00
|
|
|
* FFmpeg is distributed in the hope that it will be useful,
|
2001-08-06 03:44:48 +03:00
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2002-05-26 01:39:29 +03:00
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
2001-08-06 03:44:48 +03:00
|
|
|
*
|
2002-05-26 01:39:29 +03:00
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
2006-10-07 18:30:46 +03:00
|
|
|
* License along with FFmpeg; if not, write to the Free Software
|
2006-01-13 00:43:26 +02:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
2001-08-06 03:44:48 +03:00
|
|
|
*/
|
2003-03-06 13:32:04 +02:00
|
|
|
|
|
|
|
/**
|
2010-04-20 17:45:34 +03:00
|
|
|
* @file
|
2003-03-06 13:32:04 +02:00
|
|
|
* MJPEG encoder and decoder.
|
|
|
|
*/
|
2005-12-17 20:14:38 +02:00
|
|
|
|
2021-02-10 02:19:44 +02:00
|
|
|
#include "jpegtabs.h"
|
2001-08-06 03:44:48 +03:00
|
|
|
|
|
|
|
#if 0
|
|
|
|
/* These are the sample quantization tables given in JPEG spec section K.1.
|
|
|
|
* The spec says that the values given produce "good" quality, and
|
|
|
|
* when divided by 2, "very good" quality.
|
|
|
|
*/
|
2013-08-03 00:11:58 +03:00
|
|
|
static const unsigned char std_luminance_quant_tbl[64] = {
|
2001-08-06 03:44:48 +03:00
|
|
|
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
|
|
|
|
};
|
2013-08-03 00:11:58 +03:00
|
|
|
static const unsigned char std_chrominance_quant_tbl[64] = {
|
2001-08-06 03:44:48 +03:00
|
|
|
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
|
|
|
|
};
|
|
|
|
#endif
|