diff options
author | Jerome Jiang <jianj@google.com> | 2017-03-16 16:43:41 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-03-16 16:43:42 +0000 |
commit | bf40776aa4e089caf286159ff376caa7efc01a59 (patch) | |
tree | 9d1c2d1cd4c8841e5bb976d4b0ad38b961e4f329 /vp9 | |
parent | ec73bf53a5d5d7d33ba74e7b799c1bd69c16ce9e (diff) | |
parent | b5f7f7737a016f793c8b558608d5eae4e46bccfb (diff) | |
download | libvpx-bf40776aa4e089caf286159ff376caa7efc01a59.tar libvpx-bf40776aa4e089caf286159ff376caa7efc01a59.tar.gz libvpx-bf40776aa4e089caf286159ff376caa7efc01a59.tar.bz2 libvpx-bf40776aa4e089caf286159ff376caa7efc01a59.zip |
Merge "Refactor: Change cpi->resize_state to enum values."
Diffstat (limited to 'vp9')
-rw-r--r-- | vp9/encoder/vp9_encoder.c | 6 | ||||
-rw-r--r-- | vp9/encoder/vp9_encoder.h | 2 | ||||
-rw-r--r-- | vp9/encoder/vp9_speed_features.c | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/vp9/encoder/vp9_encoder.c b/vp9/encoder/vp9_encoder.c index 5a7351a77..64d6985b5 100644 --- a/vp9/encoder/vp9_encoder.c +++ b/vp9/encoder/vp9_encoder.c @@ -1673,7 +1673,7 @@ VP9_COMP *vp9_create_compressor(VP9EncoderConfig *oxcf, (FRAME_CONTEXT *)vpx_calloc(FRAME_CONTEXTS, sizeof(*cm->frame_contexts))); cpi->use_svc = 0; - cpi->resize_state = 0; + cpi->resize_state = ORIG; cpi->external_resize = 0; cpi->resize_avg_qp = 0; cpi->resize_buffer_underflow = 0; @@ -3170,7 +3170,7 @@ static void encode_without_recode_loop(VP9_COMP *cpi, size_t *size, vp9_update_noise_estimate(cpi); if (cpi->oxcf.pass == 0 && cpi->oxcf.mode == REALTIME && - cpi->oxcf.speed >= 5 && cpi->resize_state == 0 && + cpi->oxcf.speed >= 5 && cpi->resize_state == ORIG && (cpi->oxcf.content == VP9E_CONTENT_SCREEN || cpi->oxcf.rc_mode == VPX_VBR || compute_source_sad) && cm->show_frame) @@ -3223,7 +3223,7 @@ static void encode_without_recode_loop(VP9_COMP *cpi, size_t *size, // Check if we should drop this frame because of high overshoot. // Only for frames where high temporal-source SAD is detected. if (cpi->oxcf.pass == 0 && cpi->oxcf.rc_mode == VPX_CBR && - cpi->resize_state == 0 && cm->frame_type != KEY_FRAME && + cpi->resize_state == ORIG && cm->frame_type != KEY_FRAME && cpi->oxcf.content == VP9E_CONTENT_SCREEN && cpi->rc.high_source_sad == 1) { int frame_size = 0; diff --git a/vp9/encoder/vp9_encoder.h b/vp9/encoder/vp9_encoder.h index 2d411329f..ba29cabb1 100644 --- a/vp9/encoder/vp9_encoder.h +++ b/vp9/encoder/vp9_encoder.h @@ -651,7 +651,7 @@ typedef struct VP9_COMP { #endif int resize_pending; - int resize_state; + RESIZE_STATE resize_state; int external_resize; int resize_scale_num; int resize_scale_den; diff --git a/vp9/encoder/vp9_speed_features.c b/vp9/encoder/vp9_speed_features.c index 905506f5c..ce5353539 100644 --- a/vp9/encoder/vp9_speed_features.c +++ b/vp9/encoder/vp9_speed_features.c @@ -525,7 +525,7 @@ static void set_rt_speed_feature_framesize_independent( if (speed >= 8) { sf->adaptive_rd_thresh = 4; // Enable partition copy - if (!cpi->use_svc && !cpi->resize_pending && !cpi->resize_state && + if (!cpi->use_svc && !cpi->resize_pending && cpi->resize_state != ORIG && !cpi->external_resize && cpi->oxcf.resize_mode == RESIZE_NONE) sf->copy_partition_flag = 1; |