Merge "Moving frame_frags field from VP9Common to VP9_COMP."

This commit is contained in:
Dmitry Kovalev 2014-04-15 10:39:31 -07:00 коммит произвёл Gerrit Code Review
Родитель e58ea39fd0 1d5ed021fb
Коммит 55977e4a4f
5 изменённых файлов: 14 добавлений и 13 удалений

Просмотреть файл

@ -120,7 +120,6 @@ typedef struct VP9Common {
// frame header, 3 reset all contexts. // frame header, 3 reset all contexts.
int reset_frame_context; int reset_frame_context;
int frame_flags;
// MBs, mb_rows/cols is in 16-pixel units; mi_rows/cols is in // MBs, mb_rows/cols is in 16-pixel units; mi_rows/cols is in
// MODE_INFO (8-pixel) units. // MODE_INFO (8-pixel) units.
int MBs; int MBs;

Просмотреть файл

@ -2180,7 +2180,7 @@ void vp9_rc_get_first_pass_params(VP9_COMP *cpi) {
VP9_COMMON *const cm = &cpi->common; VP9_COMMON *const cm = &cpi->common;
if (!cpi->refresh_alt_ref_frame && if (!cpi->refresh_alt_ref_frame &&
(cm->current_video_frame == 0 || (cm->current_video_frame == 0 ||
(cm->frame_flags & FRAMEFLAGS_KEY))) { (cpi->frame_flags & FRAMEFLAGS_KEY))) {
cm->frame_type = KEY_FRAME; cm->frame_type = KEY_FRAME;
} else { } else {
cm->frame_type = INTER_FRAME; cm->frame_type = INTER_FRAME;
@ -2250,7 +2250,7 @@ void vp9_rc_get_second_pass_params(VP9_COMP *cpi) {
// Keyframe and section processing. // Keyframe and section processing.
if (rc->frames_to_key == 0 || 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. // Define next KF group and assign bits to it.
this_frame_copy = this_frame; this_frame_copy = this_frame;
find_next_key_frame(cpi, &this_frame_copy); find_next_key_frame(cpi, &this_frame_copy);

Просмотреть файл

@ -2599,14 +2599,14 @@ static void encode_frame_to_data_rate(VP9_COMP *cpi,
output_frame_level_debug_stats(cpi); output_frame_level_debug_stats(cpi);
#endif #endif
if (cpi->refresh_golden_frame == 1) if (cpi->refresh_golden_frame == 1)
cm->frame_flags |= FRAMEFLAGS_GOLDEN; cpi->frame_flags |= FRAMEFLAGS_GOLDEN;
else else
cm->frame_flags &= ~FRAMEFLAGS_GOLDEN; cpi->frame_flags &= ~FRAMEFLAGS_GOLDEN;
if (cpi->refresh_alt_ref_frame == 1) if (cpi->refresh_alt_ref_frame == 1)
cm->frame_flags |= FRAMEFLAGS_ALTREF; cpi->frame_flags |= FRAMEFLAGS_ALTREF;
else else
cm->frame_flags &= ~FRAMEFLAGS_ALTREF; cpi->frame_flags &= ~FRAMEFLAGS_ALTREF;
get_ref_frame_flags(cpi); 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) { if (cm->frame_type == KEY_FRAME) {
// Tell the caller that the frame was coded as a 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 #if CONFIG_MULTIPLE_ARF
// Reset the sequence number. // Reset the sequence number.
@ -2626,7 +2626,7 @@ static void encode_frame_to_data_rate(VP9_COMP *cpi,
} }
#endif #endif
} else { } else {
*frame_flags = cm->frame_flags&~FRAMEFLAGS_KEY; *frame_flags = cpi->frame_flags & ~FRAMEFLAGS_KEY;
#if CONFIG_MULTIPLE_ARF #if CONFIG_MULTIPLE_ARF
/* Increment position in the coded frame sequence. */ /* Increment position in the coded frame sequence. */
@ -2995,7 +2995,7 @@ int vp9_get_compressed_data(VP9_COMP *cpi, unsigned int *frame_flags,
} }
#endif #endif
cm->frame_flags = *frame_flags; cpi->frame_flags = *frame_flags;
if (cpi->pass == 2 && if (cpi->pass == 2 &&
cm->current_video_frame == 0 && cm->current_video_frame == 0 &&

Просмотреть файл

@ -508,6 +508,8 @@ typedef struct VP9_COMP {
int use_large_partition_rate; int use_large_partition_rate;
int frame_flags;
#if CONFIG_MULTIPLE_ARF #if CONFIG_MULTIPLE_ARF
// ARF tracking variables. // ARF tracking variables.
int multi_arf_enabled; int multi_arf_enabled;

Просмотреть файл

@ -1226,7 +1226,7 @@ void vp9_rc_get_one_pass_vbr_params(VP9_COMP *cpi) {
int target; int target;
if (!cpi->refresh_alt_ref_frame && if (!cpi->refresh_alt_ref_frame &&
(cm->current_video_frame == 0 || (cm->current_video_frame == 0 ||
(cm->frame_flags & FRAMEFLAGS_KEY) || (cpi->frame_flags & FRAMEFLAGS_KEY) ||
rc->frames_to_key == 0 || rc->frames_to_key == 0 ||
(cpi->oxcf.auto_key && test_for_kf_one_pass(cpi)))) { (cpi->oxcf.auto_key && test_for_kf_one_pass(cpi)))) {
cm->frame_type = KEY_FRAME; cm->frame_type = KEY_FRAME;
@ -1318,7 +1318,7 @@ void vp9_rc_get_svc_params(VP9_COMP *cpi) {
RATE_CONTROL *const rc = &cpi->rc; RATE_CONTROL *const rc = &cpi->rc;
int target = rc->av_per_frame_bandwidth; int target = rc->av_per_frame_bandwidth;
if ((cm->current_video_frame == 0) || 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->oxcf.auto_key && (rc->frames_since_key %
cpi->key_frame_frequency == 0))) { cpi->key_frame_frequency == 0))) {
cm->frame_type = KEY_FRAME; 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; RATE_CONTROL *const rc = &cpi->rc;
int target; int target;
if ((cm->current_video_frame == 0 || if ((cm->current_video_frame == 0 ||
(cm->frame_flags & FRAMEFLAGS_KEY) || (cpi->frame_flags & FRAMEFLAGS_KEY) ||
rc->frames_to_key == 0 || rc->frames_to_key == 0 ||
(cpi->oxcf.auto_key && test_for_kf_one_pass(cpi)))) { (cpi->oxcf.auto_key && test_for_kf_one_pass(cpi)))) {
cm->frame_type = KEY_FRAME; cm->frame_type = KEY_FRAME;