diff options
author | Marco <marpan@chromium.org> | 2015-07-06 15:55:57 -0700 |
---|---|---|
committer | Marco <marpan@chromium.org> | 2015-08-18 15:36:59 -0700 |
commit | 42b67917749de9e93b4d3fbfe585353e5d2e7a31 (patch) | |
tree | dea4e7f607bf17a21791ab9621c5d37328486dcd /vp9/encoder/vp9_ratectrl.h | |
parent | 0092960d2746fa25a41235532df9c68fe2fe093a (diff) | |
download | libvpx-42b67917749de9e93b4d3fbfe585353e5d2e7a31.tar libvpx-42b67917749de9e93b4d3fbfe585353e5d2e7a31.tar.gz libvpx-42b67917749de9e93b4d3fbfe585353e5d2e7a31.tar.bz2 libvpx-42b67917749de9e93b4d3fbfe585353e5d2e7a31.zip |
Allow for re-encoding frame if high overshoot.
For 1 pass CBR mode under screen content mode:
if pre-analysis (source temporal-sad) indicates significant
change in content, then check the projected frame size after
encode_frame(), and if size is above threshold, force re-encode
of that frame at max QP.
Change-Id: I91e66d9f3167aff2ffcc6f16f47f19f1c21dc688
Diffstat (limited to 'vp9/encoder/vp9_ratectrl.h')
-rw-r--r-- | vp9/encoder/vp9_ratectrl.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/vp9/encoder/vp9_ratectrl.h b/vp9/encoder/vp9_ratectrl.h index f9b0488bb..11dfa35c3 100644 --- a/vp9/encoder/vp9_ratectrl.h +++ b/vp9/encoder/vp9_ratectrl.h @@ -142,6 +142,9 @@ typedef struct { int frame_width[FRAME_SCALE_STEPS]; int frame_height[FRAME_SCALE_STEPS]; int rf_level_maxq[RATE_FACTOR_LEVELS]; + + uint64_t avg_source_sad; + int high_source_sad; } RATE_CONTROL; struct VP9_COMP; @@ -256,6 +259,10 @@ void vp9_set_target_rate(struct VP9_COMP *cpi); int vp9_resize_one_pass_cbr(struct VP9_COMP *cpi); +void vp9_avg_source_sad(struct VP9_COMP *cpi); + +int vp9_encodedframe_overshoot(struct VP9_COMP *cpi, int frame_size, int *q); + #ifdef __cplusplus } // extern "C" #endif |