Port renaming changes from AOMedia

Cherry-Picked the following commits:
0defd8f Changed "WebM" to "AOMedia" & "webm" to "aomedia"
54e6676 Replace "VPx" by "AVx"
5082a36 Change "Vpx" to "Avx"
7df44f1 Replace "Vp9" w/ "Av1"
967f722 Remove kVp9CodecId
828f30c Change "Vp8" to "AOM"
030b5ff AUTHORS regenerated
2524cae Add ref-mv experimental flag
016762b Change copyright notice to AOMedia form
81e5526 Replace vp9 w/ av1
9b94565 Add missing files
fa8ca9f Change "vp9" to "av1"
ec838b7  Convert "vp8" to "aom"
80edfa0 Change "VP9" to "AV1"
d1a11fb Change "vp8" to "aom"
7b58251 Point to WebM test data
dd1a5c8 Replace "VP8" with "AOM"
ff00fc0 Change "VPX" to "AOM"
01dee0b Change "vp10" to "av1" in source code
cebe6f0 Convert "vpx" to "aom"
17b0567 rename vp10*.mk to av1_*.mk
fe5f8a8 rename files vp10_* to av1_*

Change-Id: I6fc3d18eb11fc171e46140c836ad5339cf6c9419
This commit is contained in:
Yaowu Xu
2016-08-30 14:01:10 -07:00
parent c27fc14b02
commit f883b42cab
685 changed files with 27424 additions and 28385 deletions

View File

@@ -10,7 +10,7 @@
#include <limits.h>
#include "aom_mem/vpx_mem.h"
#include "aom_mem/aom_mem.h"
#include "av1/common/pred_common.h"
#include "av1/common/tile_common.h"
@@ -19,38 +19,38 @@
#include "av1/encoder/segmentation.h"
#include "av1/encoder/subexp.h"
void vp10_enable_segmentation(struct segmentation *seg) {
void av1_enable_segmentation(struct segmentation *seg) {
seg->enabled = 1;
seg->update_map = 1;
seg->update_data = 1;
}
void vp10_disable_segmentation(struct segmentation *seg) {
void av1_disable_segmentation(struct segmentation *seg) {
seg->enabled = 0;
seg->update_map = 0;
seg->update_data = 0;
}
void vp10_set_segment_data(struct segmentation *seg, signed char *feature_data,
unsigned char abs_delta) {
void av1_set_segment_data(struct segmentation *seg, signed char *feature_data,
unsigned char abs_delta) {
seg->abs_delta = abs_delta;
memcpy(seg->feature_data, feature_data, sizeof(seg->feature_data));
}
void vp10_disable_segfeature(struct segmentation *seg, int segment_id,
SEG_LVL_FEATURES feature_id) {
void av1_disable_segfeature(struct segmentation *seg, int segment_id,
SEG_LVL_FEATURES feature_id) {
seg->feature_mask[segment_id] &= ~(1 << feature_id);
}
void vp10_clear_segdata(struct segmentation *seg, int segment_id,
SEG_LVL_FEATURES feature_id) {
void av1_clear_segdata(struct segmentation *seg, int segment_id,
SEG_LVL_FEATURES feature_id) {
seg->feature_data[segment_id][feature_id] = 0;
}
// Based on set of segment counts calculate a probability tree
static void calc_segtree_probs(unsigned *segcounts,
vpx_prob *segment_tree_probs,
const vpx_prob *cur_tree_probs) {
aom_prob *segment_tree_probs,
const aom_prob *cur_tree_probs) {
// Work out probabilities of each segment
const unsigned cc[4] = { segcounts[0] + segcounts[1],
segcounts[2] + segcounts[3],
@@ -70,13 +70,13 @@ static void calc_segtree_probs(unsigned *segcounts,
for (i = 0; i < 7; i++) {
const unsigned *ct =
i == 0 ? ccc : i < 3 ? cc + (i & 2) : segcounts + (i - 3) * 2;
vp10_prob_diff_update_savings_search(
av1_prob_diff_update_savings_search(
ct, cur_tree_probs[i], &segment_tree_probs[i], DIFF_UPDATE_PROB);
}
}
// Based on set of segment counts and probabilities calculate a cost estimate
static int cost_segmap(unsigned *segcounts, vpx_prob *probs) {
static int cost_segmap(unsigned *segcounts, aom_prob *probs) {
const int c01 = segcounts[0] + segcounts[1];
const int c23 = segcounts[2] + segcounts[3];
const int c45 = segcounts[4] + segcounts[5];
@@ -85,35 +85,35 @@ static int cost_segmap(unsigned *segcounts, vpx_prob *probs) {
const int c4567 = c45 + c67;
// Cost the top node of the tree
int cost = c0123 * vp10_cost_zero(probs[0]) + c4567 * vp10_cost_one(probs[0]);
int cost = c0123 * av1_cost_zero(probs[0]) + c4567 * av1_cost_one(probs[0]);
// Cost subsequent levels
if (c0123 > 0) {
cost += c01 * vp10_cost_zero(probs[1]) + c23 * vp10_cost_one(probs[1]);
cost += c01 * av1_cost_zero(probs[1]) + c23 * av1_cost_one(probs[1]);
if (c01 > 0)
cost += segcounts[0] * vp10_cost_zero(probs[3]) +
segcounts[1] * vp10_cost_one(probs[3]);
cost += segcounts[0] * av1_cost_zero(probs[3]) +
segcounts[1] * av1_cost_one(probs[3]);
if (c23 > 0)
cost += segcounts[2] * vp10_cost_zero(probs[4]) +
segcounts[3] * vp10_cost_one(probs[4]);
cost += segcounts[2] * av1_cost_zero(probs[4]) +
segcounts[3] * av1_cost_one(probs[4]);
}
if (c4567 > 0) {
cost += c45 * vp10_cost_zero(probs[2]) + c67 * vp10_cost_one(probs[2]);
cost += c45 * av1_cost_zero(probs[2]) + c67 * av1_cost_one(probs[2]);
if (c45 > 0)
cost += segcounts[4] * vp10_cost_zero(probs[5]) +
segcounts[5] * vp10_cost_one(probs[5]);
cost += segcounts[4] * av1_cost_zero(probs[5]) +
segcounts[5] * av1_cost_one(probs[5]);
if (c67 > 0)
cost += segcounts[6] * vp10_cost_zero(probs[6]) +
segcounts[7] * vp10_cost_one(probs[6]);
cost += segcounts[6] * av1_cost_zero(probs[6]) +
segcounts[7] * av1_cost_one(probs[6]);
}
return cost;
}
static void count_segs(const VP10_COMMON *cm, MACROBLOCKD *xd,
static void count_segs(const AV1_COMMON *cm, MACROBLOCKD *xd,
const TileInfo *tile, MODE_INFO **mi,
unsigned *no_pred_segcounts,
unsigned (*temporal_predictor_count)[2],
@@ -138,7 +138,7 @@ static void count_segs(const VP10_COMMON *cm, MACROBLOCKD *xd,
const int pred_segment_id =
get_segment_id(cm, cm->last_frame_seg_map, bsize, mi_row, mi_col);
const int pred_flag = pred_segment_id == segment_id;
const int pred_context = vp10_get_pred_context_seg_id(xd);
const int pred_context = av1_get_pred_context_seg_id(xd);
// Store the prediction status for this mb and update counts
// as appropriate
@@ -150,7 +150,7 @@ static void count_segs(const VP10_COMMON *cm, MACROBLOCKD *xd,
}
}
static void count_segs_sb(const VP10_COMMON *cm, MACROBLOCKD *xd,
static void count_segs_sb(const AV1_COMMON *cm, MACROBLOCKD *xd,
const TileInfo *tile, MODE_INFO **mi,
unsigned *no_pred_segcounts,
unsigned (*temporal_predictor_count)[2],
@@ -285,7 +285,7 @@ static void count_segs_sb(const VP10_COMMON *cm, MACROBLOCKD *xd,
#endif // CONFIG_EXT_PARTITION_TYPES
}
void vp10_choose_segmap_coding_method(VP10_COMMON *cm, MACROBLOCKD *xd) {
void av1_choose_segmap_coding_method(AV1_COMMON *cm, MACROBLOCKD *xd) {
struct segmentation *seg = &cm->seg;
struct segmentation_probs *segp = &cm->fc->seg;
@@ -298,23 +298,23 @@ void vp10_choose_segmap_coding_method(VP10_COMMON *cm, MACROBLOCKD *xd) {
unsigned *no_pred_segcounts = cm->counts.seg.tree_total;
unsigned *t_unpred_seg_counts = cm->counts.seg.tree_mispred;
vpx_prob no_pred_tree[SEG_TREE_PROBS];
vpx_prob t_pred_tree[SEG_TREE_PROBS];
vpx_prob t_nopred_prob[PREDICTION_PROBS];
aom_prob no_pred_tree[SEG_TREE_PROBS];
aom_prob t_pred_tree[SEG_TREE_PROBS];
aom_prob t_nopred_prob[PREDICTION_PROBS];
(void)xd;
// We are about to recompute all the segment counts, so zero the accumulators.
vp10_zero(cm->counts.seg);
av1_zero(cm->counts.seg);
// First of all generate stats regarding how well the last segment map
// predicts this one
for (tile_row = 0; tile_row < cm->tile_rows; tile_row++) {
TileInfo tile_info;
vp10_tile_set_row(&tile_info, cm, tile_row);
av1_tile_set_row(&tile_info, cm, tile_row);
for (tile_col = 0; tile_col < cm->tile_cols; tile_col++) {
MODE_INFO **mi_ptr;
vp10_tile_set_col(&tile_info, cm, tile_col);
av1_tile_set_col(&tile_info, cm, tile_col);
mi_ptr = cm->mi_grid_visible + tile_info.mi_row_start * cm->mi_stride +
tile_info.mi_col_start;
for (mi_row = tile_info.mi_row_start; mi_row < tile_info.mi_row_end;
@@ -348,13 +348,13 @@ void vp10_choose_segmap_coding_method(VP10_COMMON *cm, MACROBLOCKD *xd) {
const int count1 = temporal_predictor_count[i][1];
t_nopred_prob[i] = get_binary_prob(count0, count1);
vp10_prob_diff_update_savings_search(temporal_predictor_count[i],
segp->pred_probs[i],
&t_nopred_prob[i], DIFF_UPDATE_PROB);
av1_prob_diff_update_savings_search(temporal_predictor_count[i],
segp->pred_probs[i],
&t_nopred_prob[i], DIFF_UPDATE_PROB);
// Add in the predictor signaling cost
t_pred_cost += count0 * vp10_cost_zero(t_nopred_prob[i]) +
count1 * vp10_cost_one(t_nopred_prob[i]);
t_pred_cost += count0 * av1_cost_zero(t_nopred_prob[i]) +
count1 * av1_cost_one(t_nopred_prob[i]);
}
}
@@ -367,12 +367,12 @@ void vp10_choose_segmap_coding_method(VP10_COMMON *cm, MACROBLOCKD *xd) {
}
}
void vp10_reset_segment_features(VP10_COMMON *cm) {
void av1_reset_segment_features(AV1_COMMON *cm) {
struct segmentation *seg = &cm->seg;
// Set up default state for MB feature flags
seg->enabled = 0;
seg->update_map = 0;
seg->update_data = 0;
vp10_clearall_segfeatures(seg);
av1_clearall_segfeatures(seg);
}