Merge "Adding DEFAULT_PRED_PROB_{0, 1, 2} constants." into experimental
This commit is contained in:
Коммит
8726752cb6
|
@ -85,7 +85,7 @@ int vp9_alloc_frame_buffers(VP9_COMMON *oci, int width, int height) {
|
||||||
oci->new_fb_idx = NUM_YV12_BUFFERS - 1;
|
oci->new_fb_idx = NUM_YV12_BUFFERS - 1;
|
||||||
oci->fb_idx_ref_cnt[oci->new_fb_idx] = 1;
|
oci->fb_idx_ref_cnt[oci->new_fb_idx] = 1;
|
||||||
|
|
||||||
for (i = 0; i < 3; i++)
|
for (i = 0; i < ALLOWED_REFS_PER_FRAME; i++)
|
||||||
oci->active_ref_idx[i] = i;
|
oci->active_ref_idx[i] = i;
|
||||||
|
|
||||||
for (i = 0; i < NUM_REF_FRAMES; i++) {
|
for (i = 0; i < NUM_REF_FRAMES; i++) {
|
||||||
|
|
|
@ -26,6 +26,10 @@
|
||||||
#define MB_FEATURE_TREE_PROBS 3
|
#define MB_FEATURE_TREE_PROBS 3
|
||||||
#define PREDICTION_PROBS 3
|
#define PREDICTION_PROBS 3
|
||||||
|
|
||||||
|
#define DEFAULT_PRED_PROB_0 120
|
||||||
|
#define DEFAULT_PRED_PROB_1 80
|
||||||
|
#define DEFAULT_PRED_PROB_2 40
|
||||||
|
|
||||||
#define MBSKIP_CONTEXTS 3
|
#define MBSKIP_CONTEXTS 3
|
||||||
|
|
||||||
#define MAX_MB_SEGMENTS 4
|
#define MAX_MB_SEGMENTS 4
|
||||||
|
|
|
@ -364,9 +364,9 @@ void vp9_init_mbmode_probs(VP9_COMMON *x) {
|
||||||
#if CONFIG_COMP_INTERINTRA_PRED
|
#if CONFIG_COMP_INTERINTRA_PRED
|
||||||
x->fc.interintra_prob = VP9_DEF_INTERINTRA_PROB;
|
x->fc.interintra_prob = VP9_DEF_INTERINTRA_PROB;
|
||||||
#endif
|
#endif
|
||||||
x->ref_pred_probs[0] = 120;
|
x->ref_pred_probs[0] = DEFAULT_PRED_PROB_0;
|
||||||
x->ref_pred_probs[1] = 80;
|
x->ref_pred_probs[1] = DEFAULT_PRED_PROB_1;
|
||||||
x->ref_pred_probs[2] = 40;
|
x->ref_pred_probs[2] = DEFAULT_PRED_PROB_2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1213,9 +1213,9 @@ static void setup_pred_probs(VP9_COMMON *pc, vp9_reader *r) {
|
||||||
// reference frame
|
// reference frame
|
||||||
if (pc->frame_type == KEY_FRAME) {
|
if (pc->frame_type == KEY_FRAME) {
|
||||||
// Set the prediction probabilities to defaults
|
// Set the prediction probabilities to defaults
|
||||||
pc->ref_pred_probs[0] = 120;
|
pc->ref_pred_probs[0] = DEFAULT_PRED_PROB_0;
|
||||||
pc->ref_pred_probs[1] = 80;
|
pc->ref_pred_probs[1] = DEFAULT_PRED_PROB_1;
|
||||||
pc->ref_pred_probs[2] = 40;
|
pc->ref_pred_probs[2] = DEFAULT_PRED_PROB_2;
|
||||||
} else {
|
} else {
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < PREDICTION_PROBS; ++i)
|
for (i = 0; i < PREDICTION_PROBS; ++i)
|
||||||
|
|
|
@ -3974,13 +3974,13 @@ int vp9_get_compressed_data(VP9_PTR ptr, unsigned int *frame_flags,
|
||||||
cm->frame_type = INTER_FRAME;
|
cm->frame_type = INTER_FRAME;
|
||||||
cm->frame_flags = *frame_flags;
|
cm->frame_flags = *frame_flags;
|
||||||
|
|
||||||
/* Reset the frame pointers to the current frame size */
|
// Reset the frame pointers to the current frame size
|
||||||
vp8_yv12_realloc_frame_buffer(&cm->yv12_fb[cm->new_fb_idx],
|
vp8_yv12_realloc_frame_buffer(&cm->yv12_fb[cm->new_fb_idx],
|
||||||
cm->width, cm->height,
|
cm->width, cm->height,
|
||||||
VP9BORDERINPIXELS);
|
VP9BORDERINPIXELS);
|
||||||
|
|
||||||
/* Calculate scaling factors for each of the 3 available references */
|
// Calculate scaling factors for each of the 3 available references
|
||||||
for (i = 0; i < 3; ++i) {
|
for (i = 0; i < ALLOWED_REFS_PER_FRAME; ++i) {
|
||||||
if (cm->active_ref_idx[i] >= NUM_YV12_BUFFERS) {
|
if (cm->active_ref_idx[i] >= NUM_YV12_BUFFERS) {
|
||||||
memset(&cm->active_ref_scale[i], 0, sizeof(cm->active_ref_scale[i]));
|
memset(&cm->active_ref_scale[i], 0, sizeof(cm->active_ref_scale[i]));
|
||||||
continue;
|
continue;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче