/******************************************************************************
*
* XviD VBR Library
*
* Copyright (C) 2002 Edouard Gomez <ed.gomez@wanadoo.fr>
*
* The curve treatment algorithm is based on work done by Foxer <email?> and
* Dirk Knop <dknop@gwdg.de> for the XviD vfw dynamic library.
*
* 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
*
*****************************************************************************/
/* Standard Headers */
#include <stdio.h>
#include <string.h>
#include <fcntl.h>
#include <stdlib.h>
#include <math.h>
/* Local headers */
#include "xvid_vbr.h"
/******************************************************************************
* Build time constants
*****************************************************************************/
/*
* Portability note
* Perhaps the msvc headers define Pi with another constant name
*/
#define DEG2RAD (M_PI / 180.0)
/* Defaults settings will be computed with the help of these constants */
#define DEFAULT_DESIRED_SIZE 700
#define DEFAULT_AUDIO_BITRATE 128
#define DEFAULT_MOVIE_LENGTH 2
#define DEFAULT_TWOPASS_BOOST 1000
#define DEFAULT_FPS 25.0f
#define DEFAULT_CREDITS_SIZE 0
#define DEFAULT_XVID_DBG_FILE "xvid.dbg"
#define DEFAULT_XVID_STATS_FILE "xvid.stats"
/******************************************************************************
* Local prototypes
*****************************************************************************/
/* Sub vbrInit cases functions */
static vbr_init_function vbr_init_dummy;
static vbr_init_function vbr_init_2pass1;
static vbr_init_function vbr_init_2pass2;
static vbr_init_function vbr_init_fixedquant;
/* Sub vbrGetQuant cases functions */
static vbr_get_quant_function vbr_getquant_1pass;
static vbr_get_quant_function vbr_getquant_2pass1;
static vbr_get_quant_function vbr_getquant_2pass2;
static vbr_get_quant_function vbr_getquant_fixedquant;
/* Sub vbrGetIntra cases functions */
static vbr_get_intra_function vbr_getintra_1pass;
static vbr_get_intra_function vbr_getintra_2pass1;
static vbr_get_intra_function vbr_getintra_2pass2;
static v
|