2007-11-09 23:37:48 +02:00
|
|
|
/*
|
2011-03-18 19:35:10 +02:00
|
|
|
* This file is part of Libav.
|
2007-11-09 23:37:48 +02:00
|
|
|
*
|
2011-03-18 19:35:10 +02:00
|
|
|
* Libav is free software; you can redistribute it and/or
|
2007-11-09 23:37:48 +02:00
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
2011-03-18 19:35:10 +02:00
|
|
|
* Libav is distributed in the hope that it will be useful,
|
2007-11-09 23:37:48 +02:00
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
2011-03-18 19:35:10 +02:00
|
|
|
* License along with Libav; if not, write to the Free Software
|
2007-11-09 23:37:48 +02:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*/
|
|
|
|
|
2008-08-31 10:39:47 +03:00
|
|
|
#ifndef AVCODEC_INTRAX8_H
|
|
|
|
#define AVCODEC_INTRAX8_H
|
2007-11-10 01:12:31 +02:00
|
|
|
|
2009-04-13 19:20:26 +03:00
|
|
|
#include "get_bits.h"
|
2007-11-24 12:08:02 +02:00
|
|
|
#include "mpegvideo.h"
|
2012-08-25 16:35:52 +03:00
|
|
|
#include "intrax8dsp.h"
|
2007-11-24 12:08:02 +02:00
|
|
|
|
2012-09-27 11:19:53 +03:00
|
|
|
typedef struct IntraX8Context {
|
2016-02-25 00:45:11 +02:00
|
|
|
VLC *j_ac_vlc[4]; // they point to the static j_mb_vlc
|
|
|
|
VLC *j_orient_vlc;
|
|
|
|
VLC *j_dc_vlc[3];
|
2007-11-09 23:37:48 +02:00
|
|
|
|
|
|
|
int use_quant_matrix;
|
2016-02-25 00:45:11 +02:00
|
|
|
|
|
|
|
// set by ff_intrax8_common_init
|
|
|
|
uint8_t *prediction_table; // 2 * (mb_w * 2)
|
2007-11-09 23:37:48 +02:00
|
|
|
ScanTable scantable[3];
|
2016-02-25 00:45:11 +02:00
|
|
|
|
|
|
|
// set by the caller codec
|
|
|
|
MpegEncContext *s;
|
2012-08-25 16:35:52 +03:00
|
|
|
IntraX8DSPContext dsp;
|
2007-11-09 23:37:48 +02:00
|
|
|
int quant;
|
|
|
|
int dquant;
|
|
|
|
int qsum;
|
2016-02-25 00:45:11 +02:00
|
|
|
|
|
|
|
// calculated per frame
|
2007-11-09 23:37:48 +02:00
|
|
|
int quant_dc_chroma;
|
|
|
|
int divide_quant_dc_luma;
|
|
|
|
int divide_quant_dc_chroma;
|
2016-02-25 00:45:11 +02:00
|
|
|
|
|
|
|
// changed per block
|
2007-11-09 23:37:48 +02:00
|
|
|
int edges;
|
|
|
|
int flat_dc;
|
|
|
|
int predicted_dc;
|
|
|
|
int raw_orient;
|
|
|
|
int chroma_orient;
|
|
|
|
int orient;
|
|
|
|
int est_run;
|
|
|
|
} IntraX8Context;
|
|
|
|
|
2016-02-25 00:45:11 +02:00
|
|
|
void ff_intrax8_common_init(IntraX8Context *w, MpegEncContext *const s);
|
|
|
|
void ff_intrax8_common_end(IntraX8Context *w);
|
|
|
|
int ff_intrax8_decode_picture(IntraX8Context *w, int quant, int halfpq);
|
2007-11-10 01:12:31 +02:00
|
|
|
|
2008-08-31 10:39:47 +03:00
|
|
|
#endif /* AVCODEC_INTRAX8_H */
|