/*==============================================================================

FICHIER     : [const.h]

DATE        : 2006/01/0005 20:58:44

CREATEUR    : [Linux!jef]

COMMENTAIRE :

================================================================================

==============================================================================*/

#ifndef __CONST_H__
#define __CONST_H__

#define MNG_BADSECTORS		0 /* For debug purpose only */

#define SECTOR_SIZE		2048

#define MAX_AUDIO_TRACK		8
#define MAX_SUB_TRACK		32

/* From Wikipedia */
/* DVD5  4.7 -> 4.37Gigas = 4.37 * 1024 * 1024 * 1024 */
/* 1.3p1 #define DVD5_WANTED_BYTES_LL		((long long) 4600000000LL) */

#define ISO_OVERHEAD	((long)(long)(2 * 1024 * 1024 ))

#define _SZ_SECTOR	2048LL
/* #define DVD47SECTORS	2298496LL DVD-R size */
#define DVD47SECTORS	2295104LL /* DVD+R size smallest */
#define DVD85SECTORS	4171712LL

#define DVD5_WANTED_BYTES_LL	((long long)((DVD47SECTORS * _SZ_SECTOR) - ISO_OVERHEAD))
/* #define MAX_DVD5_BYTES		((long long)4707319808LL) DVD-R */
#define MAX_DVD5_BYTES		((long long)4700372992LL)

/* DVD5  8.5 ->  7.74Gigas */
#define DVD9_WANTED_BYTES_LL		((long long)((DVD85SECTORS * _SZ_SECTOR) - ISO_OVERHEAD))
#define MAX_DVD9_BYTES			((long long)8543666176LL)

#define MAX_VTS		100

#define MAX_VOB_SIZE		(1024*1024*1024)

/* Quand enclencher l'analyse dymique */
#define DYNQUAL_PCT		0.01 //	0.10
/* Pourcentage du dvd a lire pour estimer la qualite */
#define EVAL_QUALITY_PCT	0.25 /* 20% */

#define MyMin(a,b)		((a)>(b) ? (b) : (a))
#define MyMax(a,b)		((a)<(b) ? (b) : (a))
#define MyAbs(a)		(((a) > 0) ? (a) : -(a))

#endif	/* __CONST_H__ */

