Files
vpx/av1/encoder/context_tree.h
Yaowu Xu f883b42cab 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
2016-08-31 18:19:03 -07:00

104 lines
2.7 KiB
C

/*
* Copyright (c) 2014 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef AV1_ENCODER_CONTEXT_TREE_H_
#define AV1_ENCODER_CONTEXT_TREE_H_
#include "av1/common/blockd.h"
#include "av1/encoder/block.h"
#ifdef __cplusplus
extern "C" {
#endif
struct AV1_COMP;
struct AV1Common;
struct ThreadData;
// Structure to hold snapshot of coding context during the mode picking process
typedef struct {
MODE_INFO mic;
MB_MODE_INFO_EXT mbmi_ext;
uint8_t *color_index_map[2];
#if CONFIG_VAR_TX
uint8_t *blk_skip[MAX_MB_PLANE];
#endif
// dual buffer pointers, 0: in use, 1: best in store
tran_low_t *coeff[MAX_MB_PLANE][3];
tran_low_t *qcoeff[MAX_MB_PLANE][3];
tran_low_t *dqcoeff[MAX_MB_PLANE][3];
uint16_t *eobs[MAX_MB_PLANE][3];
int is_coded;
int num_4x4_blk;
int skip;
int pred_pixel_ready;
// For current partition, only if all Y, U, and V transform blocks'
// coefficients are quantized to 0, skippable is set to 0.
int skippable;
int best_mode_index;
int hybrid_pred_diff;
int comp_pred_diff;
int single_pred_diff;
// TODO(jingning) Use RD_COST struct here instead. This involves a boarder
// scope of refactoring.
int rate;
int64_t dist;
// motion vector cache for adaptive motion search control in partition
// search loop
MV pred_mv[TOTAL_REFS_PER_FRAME];
INTERP_FILTER pred_interp_filter;
#if CONFIG_EXT_PARTITION_TYPES
PARTITION_TYPE partition;
#endif
} PICK_MODE_CONTEXT;
typedef struct PC_TREE {
int index;
PARTITION_TYPE partitioning;
BLOCK_SIZE block_size;
PICK_MODE_CONTEXT none;
PICK_MODE_CONTEXT horizontal[2];
PICK_MODE_CONTEXT vertical[2];
#if CONFIG_EXT_PARTITION_TYPES
PICK_MODE_CONTEXT horizontala[3];
PICK_MODE_CONTEXT horizontalb[3];
PICK_MODE_CONTEXT verticala[3];
PICK_MODE_CONTEXT verticalb[3];
#endif
union {
struct PC_TREE *split[4];
PICK_MODE_CONTEXT *leaf_split[4];
};
#ifdef CONFIG_SUPERTX
PICK_MODE_CONTEXT horizontal_supertx;
PICK_MODE_CONTEXT vertical_supertx;
PICK_MODE_CONTEXT split_supertx;
#if CONFIG_EXT_PARTITION_TYPES
PICK_MODE_CONTEXT horizontala_supertx;
PICK_MODE_CONTEXT horizontalb_supertx;
PICK_MODE_CONTEXT verticala_supertx;
PICK_MODE_CONTEXT verticalb_supertx;
#endif
#endif
} PC_TREE;
void av1_setup_pc_tree(struct AV1Common *cm, struct ThreadData *td);
void av1_free_pc_tree(struct ThreadData *td);
#ifdef __cplusplus
} // extern "C"
#endif
#endif /* AV1_ENCODER_CONTEXT_TREE_H_ */