[svn] / branches / dev-api-4 / xvidcore / src / image / postprocessing.h Repository:
ViewVC logotype

View of /branches/dev-api-4/xvidcore/src/image/postprocessing.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1381 - (download) (annotate)
Thu Mar 18 16:11:28 2004 UTC (14 years, 10 months ago) by Isibaar
File size: 2176 byte(s)
abs_tbl must be _unsigned_
/*****************************************************************************
 *
 *  XVID MPEG-4 VIDEO CODEC
 *  - Postprocessing header  -
 *
 *  Copyright(C) 2003 Michael Militzer <isibaar@xvid.org>
 *
 *  This program is free software ; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation ; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  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, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 *
 * $Id: postprocessing.h,v 1.1.4.6 2004-03-18 16:11:28 Isibaar Exp $
 *
 ****************************************************************************/

#ifndef _POSTPROCESSING_H_
#define _POSTPROCESSING_H_

#include <stdlib.h>
#include "../portab.h"

/* Filtering thresholds */

#define THR1 2
#define THR2 6

#define MAX_NOISE 4096
#define MAX_SHIFT 1024
#define MAX_RES (MAX_NOISE - MAX_SHIFT)

typedef struct {
	int8_t  xvid_thresh_tbl[511];
	uint8_t xvid_abs_tbl[511];
	int8_t  xvid_noise1[MAX_NOISE * sizeof(int8_t)];
	int8_t  xvid_noise2[MAX_NOISE * sizeof(int8_t)];
	int8_t  *xvid_prev_shift[MAX_RES][6];
	int prev_quant;
} XVID_POSTPROC;

void
image_postproc(XVID_POSTPROC *tbls, IMAGE * img, int edged_width,
				const MACROBLOCK * mbs, int mb_width, int mb_height, int mb_stride,
				int flags, int frame_num, int bvop);

void deblock8x8_h(XVID_POSTPROC *tbls, uint8_t *img, int stride, int quant);
void deblock8x8_v(XVID_POSTPROC *tbls, uint8_t *img, int stride, int quant);

void init_postproc(XVID_POSTPROC *tbls);
void init_noise(XVID_POSTPROC *tbls);
void init_deblock(XVID_POSTPROC *tbls);

void add_noise(XVID_POSTPROC * tbls, uint8_t *dst, uint8_t *src, int stride, int width, int height, int shiftptr, int quant);

#endif

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4