--- trunk/vfw/src/codec.h 2002/03/16 11:50:20 32 +++ trunk/vfw/src/codec.h 2002/04/06 06:21:29 105 @@ -8,8 +8,7 @@ #define DEBUG(X) // OutputDebugString(X) -#define DEBUG1(X,A) -// { char tmp[120]; wsprintf(tmp, "%s %i", (X), (A)); OutputDebugString(tmp); } +#define DEBUG1(X,A) { char tmp[120]; wsprintf(tmp, "%s %i", (X), (A)); OutputDebugString(tmp); } #define DEBUG2(X,A,B) // { char tmp[120]; wsprintf(tmp, "%s %i %i", (X), (A), (B)); OutputDebugString(tmp); } #define DEBUG3(X,A,B,C) @@ -20,6 +19,7 @@ // { char tmp[120]; wsprintf(tmp, "%s %i %i %i %i %i", (X), (A), (B), (C), (D), (E)); OutputDebugString(tmp); } #define DEBUGFOURCC(X,Y) // { char tmp[120]; wsprintf(tmp, "%s %c %c %c %c", (X), (Y)&0xff, ((Y)>>8)&0xff, ((Y)>>16)&0xff, ((Y)>>24)&0xff); OutputDebugString(tmp); } +#define DEBUGERR(X) OutputDebugString(X) #define DEBUG2P(X) OutputDebugString(X) #define DEBUG1ST(A,B,C,D,E,F,G) { char tmp[120]; wsprintf(tmp, "1st-pass: size:%d total-kbytes:%d %s quant:%d %s kblocks:%d mblocks:%d", (A), (B), (C) ? "intra" : "inter", (D), (E), (F), (G)); OutputDebugString(tmp); } #define DEBUG2ND(A,B,C,D,E,F,G,H) { char tmp[120]; wsprintf(tmp, "2nd-pass: quant:%d %s %s stats1:%d scaled:%d actual:%d overflow:%d %s", (A), (B), (C) ? "intra" : "inter", (D), (E), (F), (G), (H) ? "credits" : "movie"); OutputDebugString(tmp); } @@ -91,20 +91,31 @@ typedef struct { + HANDLE hints; HANDLE stats1; HANDLE stats2; + void * hintstream; + int bytes1; int bytes2; int desired_bytes2; - float movie_curve; - float credits_start_curve; - float credits_end_curve; + double movie_curve; + double credits_start_curve; + double credits_end_curve; double average_frame; double curve_comp_scale; + double curve_bias_bonus; + double alt_curve_low; + double alt_curve_high; + double alt_curve_low_diff; + double alt_curve_high_diff; + double alt_curve_mid_qual; + double alt_curve_qual_dev; int overflow; + int quant_count[32]; NNSTATS nns1; NNSTATS nns2; @@ -148,10 +159,7 @@ LRESULT decompress_end(CODEC *); LRESULT decompress(CODEC *, ICDECOMPRESS *); -int codec_2pass_init(CODEC *); int codec_get_quant(CODEC *, XVID_ENC_FRAME *); -int codec_2pass_get_quant(CODEC *, XVID_ENC_FRAME *); -int codec_2pass_update(CODEC *, XVID_ENC_FRAME *, XVID_ENC_STATS *); int codec_is_in_credits(CONFIG *, int); int codec_get_vbr_quant(CONFIG *, int);