aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mpegvideo.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2002-09-23 14:56:11 +0000
committerMichael Niedermayer <michaelni@gmx.at>2002-09-23 14:56:11 +0000
commitc5d309f2d5f6b04ff68e121302a9913b70dac9c1 (patch)
tree3e5c3f12afceb3ca7445d0d3d54a5b34de9177dc /libavcodec/mpegvideo.h
parentd46aba2642a075635d521628be7ea16ceaa1c95d (diff)
downloadffmpeg-c5d309f2d5f6b04ff68e121302a9913b70dac9c1.tar.gz
adaptive quantization (lumi/temporal & spatial complexity masking)
Originally committed as revision 964 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegvideo.h')
-rw-r--r--libavcodec/mpegvideo.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h
index b46e8e3553..2ce290525e 100644
--- a/libavcodec/mpegvideo.h
+++ b/libavcodec/mpegvideo.h
@@ -53,7 +53,7 @@ typedef struct Predictor{
typedef struct RateControlEntry{
int pict_type;
- int qscale;
+ float qscale;
int mv_bits;
int i_tex_bits;
int p_tex_bits;
@@ -188,6 +188,9 @@ typedef struct MpegEncContext {
int input_pict_type; /* pict_type prior to reordering of frames */
int force_type; /* 0= no force, otherwise I_TYPE, P_TYPE, ... */
int qscale; /* QP */
+ float frame_qscale; /* qscale from the frame level rc */
+ int adaptive_quant; /* use adaptive quantization */
+ int dquant; /* qscale difference to prev qscale */
int pict_type; /* I_TYPE, P_TYPE, B_TYPE, ... */
int last_pict_type;
int last_non_b_pict_type; /* used for mpeg4 gmc b-frames & ratecontrol */
@@ -241,13 +244,14 @@ typedef struct MpegEncContext {
int hurry_up; /* when set to 1 during decoding, b frames will be skiped
when set to 2 idct/dequant will be skipped too */
-
+
/* macroblock layer */
int mb_x, mb_y;
int mb_incr;
int mb_intra;
UINT16 *mb_var; /* Table for MB variances */
UINT16 *mc_mb_var; /* Table for motion compensated MB variances */
+ UINT8 *mb_mean; /* Table for MB luminance */
UINT8 *mb_type; /* Table for MB type */
#define MB_TYPE_INTRA 0x01
#define MB_TYPE_INTER 0x02
@@ -582,6 +586,7 @@ void ff_mpeg4_stuffing(PutBitContext * pbc);
void ff_mpeg4_init_partitions(MpegEncContext *s);
void ff_mpeg4_merge_partitions(MpegEncContext *s);
extern inline int ff_mpeg4_pred_dc(MpegEncContext * s, int n, UINT16 **dc_val_ptr, int *dir_ptr);
+void ff_clean_mpeg4_qscales(MpegEncContext *s);
/* rv10.c */
void rv10_encode_picture_header(MpegEncContext *s, int picture_number);
@@ -611,8 +616,7 @@ void mjpeg_picture_trailer(MpegEncContext *s);
/* rate control */
int ff_rate_control_init(MpegEncContext *s);
-int ff_rate_estimate_qscale(MpegEncContext *s);
-int ff_rate_estimate_qscale_pass2(MpegEncContext *s);
+float ff_rate_estimate_qscale(MpegEncContext *s);
void ff_write_pass1_stats(MpegEncContext *s);
void ff_rate_control_uninit(MpegEncContext *s);
double ff_eval(char *s, double *const_value, char **const_name,