diff options
author | Scott LaVarnway <slavarnway@google.com> | 2012-11-05 17:30:49 -0800 |
---|---|---|
committer | Scott LaVarnway <slavarnway@google.com> | 2012-11-06 09:21:54 -0800 |
commit | ee28bb87b47094abb9cb7549d5a14f3cdf0955d3 (patch) | |
tree | e41f5d6990b83c39d044a7ae2bbce5d00067bf32 /vp8/encoder/onyx_if.c | |
parent | 01824d1848c1feeb727ea7dfd6522f8966133953 (diff) | |
download | libvpx-ee28bb87b47094abb9cb7549d5a14f3cdf0955d3.tar libvpx-ee28bb87b47094abb9cb7549d5a14f3cdf0955d3.tar.gz libvpx-ee28bb87b47094abb9cb7549d5a14f3cdf0955d3.tar.bz2 libvpx-ee28bb87b47094abb9cb7549d5a14f3cdf0955d3.zip |
Moving _error counts to macroblock struct
Change-Id: I28ac1519d1594801fef9a623cb64598d3d751eb0
Diffstat (limited to 'vp8/encoder/onyx_if.c')
-rw-r--r-- | vp8/encoder/onyx_if.c | 37 |
1 files changed, 8 insertions, 29 deletions
diff --git a/vp8/encoder/onyx_if.c b/vp8/encoder/onyx_if.c index 4235662f1..4e2cd0ff7 100644 --- a/vp8/encoder/onyx_if.c +++ b/vp8/encoder/onyx_if.c @@ -2864,38 +2864,17 @@ static int decide_key_frame(VP8_COMP *cpi) if ((cpi->compressor_speed == 2) && (cpi->Speed >= 5) && (cpi->sf.RD == 0)) { - double change = 1.0 * abs((int)(cpi->intra_error - cpi->last_intra_error)) / (1 + cpi->last_intra_error); - double change2 = 1.0 * abs((int)(cpi->prediction_error - cpi->last_prediction_error)) / (1 + cpi->last_prediction_error); + double change = 1.0 * abs((int)(cpi->mb.intra_error - + cpi->last_intra_error)) / (1 + cpi->last_intra_error); + double change2 = 1.0 * abs((int)(cpi->mb.prediction_error - + cpi->last_prediction_error)) / (1 + cpi->last_prediction_error); double minerror = cm->MBs * 256; -#if 0 - - if (10 * cpi->intra_error / (1 + cpi->prediction_error) < 15 - && cpi->prediction_error > minerror - && (change > .25 || change2 > .25)) - { - FILE *f = fopen("intra_inter.stt", "a"); - - if (cpi->prediction_error <= 0) - cpi->prediction_error = 1; - - fprintf(f, "%d %d %d %d %14.4f\n", - cm->current_video_frame, - (int) cpi->prediction_error, - (int) cpi->intra_error, - (int)((10 * cpi->intra_error) / cpi->prediction_error), - change); - - fclose(f); - } - -#endif - - cpi->last_intra_error = cpi->intra_error; - cpi->last_prediction_error = cpi->prediction_error; + cpi->last_intra_error = cpi->mb.intra_error; + cpi->last_prediction_error = cpi->mb.prediction_error; - if (10 * cpi->intra_error / (1 + cpi->prediction_error) < 15 - && cpi->prediction_error > minerror + if (10 * cpi->mb.intra_error / (1 + cpi->mb.prediction_error) < 15 + && cpi->mb.prediction_error > minerror && (change > .25 || change2 > .25)) { /*(change > 1.4 || change < .75)&& cpi->this_frame_percent_intra > cpi->last_frame_percent_intra + 3*/ |