summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Kovalev <dkovalev@google.com>2014-04-15 10:39:31 -0700
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>2014-04-15 10:39:31 -0700
commit55977e4a4f46e6bab09c1832bd67698772020d48 (patch)
tree9cc77a821563d595d794c03ef1e0325c5df110a5
parente58ea39fd043cfaf0c0c7839aff1e7f589b9bf7d (diff)
parent1d5ed021fbbda4344983c5ca32897756de6af66d (diff)
downloadlibvpx-55977e4a4f46e6bab09c1832bd67698772020d48.tar
libvpx-55977e4a4f46e6bab09c1832bd67698772020d48.tar.gz
libvpx-55977e4a4f46e6bab09c1832bd67698772020d48.tar.bz2
libvpx-55977e4a4f46e6bab09c1832bd67698772020d48.zip
Merge "Moving frame_frags field from VP9Common to VP9_COMP."
-rw-r--r--vp9/common/vp9_onyxc_int.h1
-rw-r--r--vp9/encoder/vp9_firstpass.c4
-rw-r--r--vp9/encoder/vp9_onyx_if.c14
-rw-r--r--vp9/encoder/vp9_onyx_int.h2
-rw-r--r--vp9/encoder/vp9_ratectrl.c6
5 files changed, 14 insertions, 13 deletions
diff --git a/vp9/common/vp9_onyxc_int.h b/vp9/common/vp9_onyxc_int.h
index 77f563f2f..20de43414 100644
--- a/vp9/common/vp9_onyxc_int.h
+++ b/vp9/common/vp9_onyxc_int.h
@@ -120,7 +120,6 @@ typedef struct VP9Common {
// frame header, 3 reset all contexts.
int reset_frame_context;
- int frame_flags;
// MBs, mb_rows/cols is in 16-pixel units; mi_rows/cols is in
// MODE_INFO (8-pixel) units.
int MBs;
diff --git a/vp9/encoder/vp9_firstpass.c b/vp9/encoder/vp9_firstpass.c
index c0bce05c8..95779bcb5 100644
--- a/vp9/encoder/vp9_firstpass.c
+++ b/vp9/encoder/vp9_firstpass.c
@@ -2180,7 +2180,7 @@ void vp9_rc_get_first_pass_params(VP9_COMP *cpi) {
VP9_COMMON *const cm = &cpi->common;
if (!cpi->refresh_alt_ref_frame &&
(cm->current_video_frame == 0 ||
- (cm->frame_flags & FRAMEFLAGS_KEY))) {
+ (cpi->frame_flags & FRAMEFLAGS_KEY))) {
cm->frame_type = KEY_FRAME;
} else {
cm->frame_type = INTER_FRAME;
@@ -2250,7 +2250,7 @@ void vp9_rc_get_second_pass_params(VP9_COMP *cpi) {
// Keyframe and section processing.
if (rc->frames_to_key == 0 ||
- (cm->frame_flags & FRAMEFLAGS_KEY)) {
+ (cpi->frame_flags & FRAMEFLAGS_KEY)) {
// Define next KF group and assign bits to it.
this_frame_copy = this_frame;
find_next_key_frame(cpi, &this_frame_copy);
diff --git a/vp9/encoder/vp9_onyx_if.c b/vp9/encoder/vp9_onyx_if.c
index 4b2aa8735..03f3c87a2 100644
--- a/vp9/encoder/vp9_onyx_if.c
+++ b/vp9/encoder/vp9_onyx_if.c
@@ -2599,14 +2599,14 @@ static void encode_frame_to_data_rate(VP9_COMP *cpi,
output_frame_level_debug_stats(cpi);
#endif
if (cpi->refresh_golden_frame == 1)
- cm->frame_flags |= FRAMEFLAGS_GOLDEN;
+ cpi->frame_flags |= FRAMEFLAGS_GOLDEN;
else
- cm->frame_flags &= ~FRAMEFLAGS_GOLDEN;
+ cpi->frame_flags &= ~FRAMEFLAGS_GOLDEN;
if (cpi->refresh_alt_ref_frame == 1)
- cm->frame_flags |= FRAMEFLAGS_ALTREF;
+ cpi->frame_flags |= FRAMEFLAGS_ALTREF;
else
- cm->frame_flags &= ~FRAMEFLAGS_ALTREF;
+ cpi->frame_flags &= ~FRAMEFLAGS_ALTREF;
get_ref_frame_flags(cpi);
@@ -2615,7 +2615,7 @@ static void encode_frame_to_data_rate(VP9_COMP *cpi,
if (cm->frame_type == KEY_FRAME) {
// Tell the caller that the frame was coded as a key frame
- *frame_flags = cm->frame_flags | FRAMEFLAGS_KEY;
+ *frame_flags = cpi->frame_flags | FRAMEFLAGS_KEY;
#if CONFIG_MULTIPLE_ARF
// Reset the sequence number.
@@ -2626,7 +2626,7 @@ static void encode_frame_to_data_rate(VP9_COMP *cpi,
}
#endif
} else {
- *frame_flags = cm->frame_flags&~FRAMEFLAGS_KEY;
+ *frame_flags = cpi->frame_flags & ~FRAMEFLAGS_KEY;
#if CONFIG_MULTIPLE_ARF
/* Increment position in the coded frame sequence. */
@@ -2995,7 +2995,7 @@ int vp9_get_compressed_data(VP9_COMP *cpi, unsigned int *frame_flags,
}
#endif
- cm->frame_flags = *frame_flags;
+ cpi->frame_flags = *frame_flags;
if (cpi->pass == 2 &&
cm->current_video_frame == 0 &&
diff --git a/vp9/encoder/vp9_onyx_int.h b/vp9/encoder/vp9_onyx_int.h
index 446080ce2..7a110ac4c 100644
--- a/vp9/encoder/vp9_onyx_int.h
+++ b/vp9/encoder/vp9_onyx_int.h
@@ -508,6 +508,8 @@ typedef struct VP9_COMP {
int use_large_partition_rate;
+ int frame_flags;
+
#if CONFIG_MULTIPLE_ARF
// ARF tracking variables.
int multi_arf_enabled;
diff --git a/vp9/encoder/vp9_ratectrl.c b/vp9/encoder/vp9_ratectrl.c
index bd6a78c2d..76ec84b5f 100644
--- a/vp9/encoder/vp9_ratectrl.c
+++ b/vp9/encoder/vp9_ratectrl.c
@@ -1226,7 +1226,7 @@ void vp9_rc_get_one_pass_vbr_params(VP9_COMP *cpi) {
int target;
if (!cpi->refresh_alt_ref_frame &&
(cm->current_video_frame == 0 ||
- (cm->frame_flags & FRAMEFLAGS_KEY) ||
+ (cpi->frame_flags & FRAMEFLAGS_KEY) ||
rc->frames_to_key == 0 ||
(cpi->oxcf.auto_key && test_for_kf_one_pass(cpi)))) {
cm->frame_type = KEY_FRAME;
@@ -1318,7 +1318,7 @@ void vp9_rc_get_svc_params(VP9_COMP *cpi) {
RATE_CONTROL *const rc = &cpi->rc;
int target = rc->av_per_frame_bandwidth;
if ((cm->current_video_frame == 0) ||
- (cm->frame_flags & FRAMEFLAGS_KEY) ||
+ (cpi->frame_flags & FRAMEFLAGS_KEY) ||
(cpi->oxcf.auto_key && (rc->frames_since_key %
cpi->key_frame_frequency == 0))) {
cm->frame_type = KEY_FRAME;
@@ -1342,7 +1342,7 @@ void vp9_rc_get_one_pass_cbr_params(VP9_COMP *cpi) {
RATE_CONTROL *const rc = &cpi->rc;
int target;
if ((cm->current_video_frame == 0 ||
- (cm->frame_flags & FRAMEFLAGS_KEY) ||
+ (cpi->frame_flags & FRAMEFLAGS_KEY) ||
rc->frames_to_key == 0 ||
(cpi->oxcf.auto_key && test_for_kf_one_pass(cpi)))) {
cm->frame_type = KEY_FRAME;