aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWan-Teh Chang <wtc@google.com>2023-11-09 10:19:47 -0800
committerWan-Teh Chang <wtc@google.com>2023-11-09 12:38:05 -0800
commit4e05c38c85fd3f72e167bbf8bb82816bc45393a6 (patch)
tree38d3d3ecc24a9d740bfaee67a7e2798442427901
parent8a35c7e585ec0ae45aa68fb4806f99e2dbfef80a (diff)
downloadlibvpx-4e05c38c85fd3f72e167bbf8bb82816bc45393a6.tar.gz
Document the units of VP8 target_bandwidth/bitrate
Change-Id: I6298a0acb4ef546ae198bb1f16dea50ed34b2dae
-rw-r--r--vp8/common/onyx.h10
-rw-r--r--vp8/encoder/onyx_int.h4
2 files changed, 11 insertions, 3 deletions
diff --git a/vp8/common/onyx.h b/vp8/common/onyx.h
index 7f7f567c6..96cd2fe59 100644
--- a/vp8/common/onyx.h
+++ b/vp8/common/onyx.h
@@ -83,7 +83,14 @@ typedef struct {
int Width;
int Height;
struct vpx_rational timebase;
- unsigned int target_bandwidth; /* kilobits per second */
+ /* In either kilobits per second or bits per second, depending on which
+ * copy of oxcf this is in.
+ * - ctx->oxcf.target_bandwidth is in kilobits per second. See
+ * set_vp8e_config().
+ * - ctx->cpi->oxcf.target_bandwidth in is bits per second. See
+ * vp8_change_config().
+ */
+ unsigned int target_bandwidth;
/* Parameter used for applying denoiser.
* For temporal denoiser: noise_sensitivity = 0 means off,
@@ -214,6 +221,7 @@ typedef struct {
/* Temporal scaling parameters */
unsigned int number_of_layers;
+ /* kilobits per second */
unsigned int target_bitrate[VPX_TS_MAX_PERIODICITY];
unsigned int rate_decimator[VPX_TS_MAX_PERIODICITY];
unsigned int periodicity;
diff --git a/vp8/encoder/onyx_int.h b/vp8/encoder/onyx_int.h
index 2f06702a1..cdf94f4f2 100644
--- a/vp8/encoder/onyx_int.h
+++ b/vp8/encoder/onyx_int.h
@@ -215,7 +215,7 @@ enum {
typedef struct {
/* Layer configuration */
double framerate;
- int target_bandwidth;
+ int target_bandwidth; /* bits per second */
/* Layer specific coding parameters */
int64_t starting_buffer_level;
@@ -438,7 +438,7 @@ typedef struct VP8_COMP {
int kf_boost;
int last_boost;
- int target_bandwidth;
+ int target_bandwidth; /* bits per second */
struct vpx_codec_pkt_list *output_pkt_list;
#if 0