Rate control for video encoders. More...
#include "libavutil/intmath.h"
#include "avcodec.h"
#include "dsputil.h"
#include "ratecontrol.h"
#include "mpegvideo.h"
#include "libavutil/eval.h"
#include <assert.h>
Go to the source code of this file.
Defines | |
#define | M_E 2.718281828 |
Functions | |
static int | init_pass2 (MpegEncContext *s) |
static double | get_qscale (MpegEncContext *s, RateControlEntry *rce, double rate_factor, int frame_num) |
Modify the bitrate curve from pass1 for one frame. | |
void | ff_write_pass1_stats (MpegEncContext *s) |
static double | qp2bits (RateControlEntry *rce, double qp) |
static double | bits2qp (RateControlEntry *rce, double bits) |
int | ff_rate_control_init (MpegEncContext *s) |
void | ff_rate_control_uninit (MpegEncContext *s) |
int | ff_vbv_update (MpegEncContext *s, int frame_size) |
static double | get_diff_limited_q (MpegEncContext *s, RateControlEntry *rce, double q) |
static void | get_qminmax (int *qmin_ret, int *qmax_ret, MpegEncContext *s, int pict_type) |
Get the qmin & qmax for pict_type. | |
static double | modify_qscale (MpegEncContext *s, RateControlEntry *rce, double q, int frame_num) |
static double | predict_size (Predictor *p, double q, double var) |
static void | update_predictor (Predictor *p, double q, double var, double size) |
static void | adaptive_quantization (MpegEncContext *s, double q) |
void | ff_get_2pass_fcode (MpegEncContext *s) |
float | ff_rate_estimate_qscale (MpegEncContext *s, int dry_run) |
Rate control for video encoders.
Definition in file ratecontrol.c.
#define M_E 2.718281828 |
Definition at line 39 of file ratecontrol.c.
Referenced by config(), get_qscale(), and put_image().
static void adaptive_quantization | ( | MpegEncContext * | s, |
double | q | ||
) | [static] |
Definition at line 532 of file ratecontrol.c.
Referenced by ff_rate_estimate_qscale().
static double bits2qp | ( | RateControlEntry * | rce, |
double | bits | ||
) | [inline, static] |
Definition at line 59 of file ratecontrol.c.
Referenced by ff_rate_control_init(), get_qscale(), and modify_qscale().
void ff_get_2pass_fcode | ( | MpegEncContext * | s | ) |
Definition at line 649 of file ratecontrol.c.
Referenced by encode_picture().
int ff_rate_control_init | ( | MpegEncContext * | s | ) |
Definition at line 66 of file ratecontrol.c.
Referenced by MPV_encode_init().
Definition at line 254 of file ratecontrol.c.
Referenced by MPV_encode_end().
float ff_rate_estimate_qscale | ( | MpegEncContext * | s, |
int | dry_run | ||
) |
Definition at line 661 of file ratecontrol.c.
Referenced by estimate_qp().
int ff_vbv_update | ( | MpegEncContext * | s, |
int | frame_size | ||
) |
Definition at line 268 of file ratecontrol.c.
Referenced by init_pass2(), MPV_encode_picture(), and select_input_picture().
Definition at line 45 of file ratecontrol.c.
Referenced by MPV_encode_picture().
static double get_diff_limited_q | ( | MpegEncContext * | s, |
RateControlEntry * | rce, | ||
double | q | ||
) | [static] |
Definition at line 378 of file ratecontrol.c.
Referenced by ff_rate_estimate_qscale(), and init_pass2().
static void get_qminmax | ( | int * | qmin_ret, |
int * | qmax_ret, | ||
MpegEncContext * | s, | ||
int | pict_type | ||
) | [static] |
Get the qmin & qmax for pict_type.
Definition at line 411 of file ratecontrol.c.
Referenced by ff_rate_estimate_qscale(), and modify_qscale().
static double get_qscale | ( | MpegEncContext * | s, |
RateControlEntry * | rce, | ||
double | rate_factor, | ||
int | frame_num | ||
) | [static] |
Modify the bitrate curve from pass1 for one frame.
Definition at line 307 of file ratecontrol.c.
Referenced by ff_rate_control_init(), ff_rate_estimate_qscale(), and init_pass2().
static int init_pass2 | ( | MpegEncContext * | s | ) | [static] |
Definition at line 820 of file ratecontrol.c.
Referenced by ff_rate_control_init().
static double modify_qscale | ( | MpegEncContext * | s, |
RateControlEntry * | rce, | ||
double | q, | ||
int | frame_num | ||
) | [static] |
Definition at line 434 of file ratecontrol.c.
Referenced by ff_rate_estimate_qscale(), and init_pass2().
static double predict_size | ( | Predictor * | p, |
double | q, | ||
double | var | ||
) | [static] |
Definition at line 508 of file ratecontrol.c.
Referenced by ff_rate_estimate_qscale().
static double qp2bits | ( | RateControlEntry * | rce, |
double | qp | ||
) | [inline, static] |
Definition at line 52 of file ratecontrol.c.
Referenced by ff_rate_control_init(), get_qscale(), and init_pass2().
static void update_predictor | ( | Predictor * | p, |
double | q, | ||
double | var, | ||
double | size | ||
) | [static] |
Definition at line 521 of file ratecontrol.c.
Referenced by ff_rate_estimate_qscale().