ref: 84f5b14b0ed878739533dabe63498311582da4b1
parent: be15a099806347111cf461371f4fef0e783fd548
parent: d1c0ba8f7ac88336ce7bbfa7dadd5c7319953fd4
author: John Koleszar <jkoleszar@google.com>
date: Mon Jun 6 11:51:23 EDT 2011
Merge remote branch 'internal/upstream' into HEAD
--- a/vp8/decoder/decodemv.c
+++ b/vp8/decoder/decodemv.c
@@ -472,7 +472,7 @@
/* Clip "next_nearest" so that it does not extend to far out of image */
vp8_clamp_mv(mv, mb_to_left_edge, mb_to_right_edge,
mb_to_top_edge, mb_to_bottom_edge);
- goto propagate_mv;
+ break;
case NEARESTMV:
mv->as_int = nearest.as_int;
@@ -479,11 +479,11 @@
/* Clip "next_nearest" so that it does not extend to far out of image */
vp8_clamp_mv(mv, mb_to_left_edge, mb_to_right_edge,
mb_to_top_edge, mb_to_bottom_edge);
- goto propagate_mv;
+ break;
case ZEROMV:
mv->as_int = 0;
- goto propagate_mv;
+ break;
case NEWMV:
read_mv(bc, &mv->as_mv, (const MV_CONTEXT *) mvc);
@@ -500,27 +500,8 @@
mb_to_right_edge,
mb_to_top_edge,
mb_to_bottom_edge);
-
- propagate_mv: /* same MV throughout */
- {
- mi->bmi[ 0].mv.as_int =
- mi->bmi[ 1].mv.as_int =
- mi->bmi[ 2].mv.as_int =
- mi->bmi[ 3].mv.as_int =
- mi->bmi[ 4].mv.as_int =
- mi->bmi[ 5].mv.as_int =
- mi->bmi[ 6].mv.as_int =
- mi->bmi[ 7].mv.as_int =
- mi->bmi[ 8].mv.as_int =
- mi->bmi[ 9].mv.as_int =
- mi->bmi[10].mv.as_int =
- mi->bmi[11].mv.as_int =
- mi->bmi[12].mv.as_int =
- mi->bmi[13].mv.as_int =
- mi->bmi[14].mv.as_int =
- mi->bmi[15].mv.as_int = mv->as_int;
- }
break;
+
default:;
#if CONFIG_DEBUG
assert(0);
--- a/vp8/encoder/firstpass.c
+++ b/vp8/encoder/firstpass.c
@@ -1558,6 +1558,24 @@
cpi->gfu_boost = (int)(boost_score * 100.0) >> 4;
+ // Dont allow conventional gf too near the next kf
+ if ((cpi->twopass.frames_to_key - i) < MIN_GF_INTERVAL)
+ {
+ while (i < cpi->twopass.frames_to_key)
+ {
+ i++;
+
+ if (EOF == input_stats(cpi, this_frame))
+ break;
+
+ if (i < cpi->twopass.frames_to_key)
+ {
+ mod_frame_err = calculate_modified_err(cpi, this_frame);
+ gf_group_err += mod_frame_err;
+ }
+ }
+ }
+
// Should we use the alternate refernce frame
if (allow_alt_ref &&
(i >= MIN_GF_INTERVAL) &&
@@ -1678,25 +1696,6 @@
{
cpi->source_alt_ref_pending = FALSE;
cpi->baseline_gf_interval = i;
- }
-
- // Conventional GF
- if (!cpi->source_alt_ref_pending)
- {
- // Dont allow conventional gf too near the next kf
- if ((cpi->twopass.frames_to_key - cpi->baseline_gf_interval) < MIN_GF_INTERVAL)
- {
- while (cpi->baseline_gf_interval < cpi->twopass.frames_to_key)
- {
- if (EOF == input_stats(cpi, this_frame))
- break;
-
- cpi->baseline_gf_interval++;
-
- if (cpi->baseline_gf_interval < cpi->twopass.frames_to_key)
- gf_group_err += calculate_modified_err(cpi, this_frame);
- }
- }
}
// Now decide how many bits should be allocated to the GF group as a proportion of those remaining in the kf group.
--
⑨