var_based_part.h
/*
* Copyright (c) 2016, Alliance for Open Media. All rights reserved.
*
* This source code is subject to the terms of the BSD 2 Clause License and
* the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
* was not distributed with this source code in the LICENSE file, you can
* obtain it at www.aomedia.org/license/software. If the Alliance for Open
* Media Patent License 1.0 was not distributed with this source code in the
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
#ifndef AOM_AV1_ENCODER_VAR_BASED_PART_H_
#define AOM_AV1_ENCODER_VAR_BASED_PART_H_
#include <stdio.h>
#include "config/aom_config.h"
#include "config/aom_dsp_rtcd.h"
#include "config/av1_rtcd.h"
#include "av1/encoder/encoder.h"
// Calculate block index x and y from split level and index
#define GET_BLK_IDX_X(idx, level) (((idx) & (0x01)) << (level))
#define GET_BLK_IDX_Y(idx, level) (((idx) >> (0x01)) << (level))
#ifdef __cplusplus
extern "C" {
#endif
#define QINDEX_LARGE_BLOCK_THR \
100 // Use increased thresholds for midres for speed 9 when qindex is above
// this threshold
#define CALC_CHROMA_THRESH_FOR_ZEROMV_SKIP(thresh_exit_part) \
((3 * (thresh_exit_part)) >> 2)
void av1_set_variance_partition_thresholds(AV1_COMP *cpi, int q,
int content_lowsumdiff);
int av1_choose_var_based_partitioning(AV1_COMP *cpi, const TileInfo *const tile,
ThreadData *td, MACROBLOCK *x, int mi_row,
int mi_col);
// Read out the block's temporal variance for 64x64 SB case.
int av1_get_force_skip_low_temp_var_small_sb(const uint8_t *variance_low,
int mi_row, int mi_col,
BLOCK_SIZE bsize);
// Read out the block's temporal variance for 128x128 SB case.
int av1_get_force_skip_low_temp_var(const uint8_t *variance_low, int mi_row,
int mi_col, BLOCK_SIZE bsize);
#ifdef __cplusplus
} // extern "C"
#endif
#endif // AOM_AV1_ENCODER_VAR_BASED_PART_H_
MACROBLOCK
struct macroblock MACROBLOCK
Encoder's parameters related to the current coding block.
encoder.h
Declares top-level encoder structures and functions.
av1_set_variance_partition_thresholds
void av1_set_variance_partition_thresholds(AV1_COMP *cpi, int q, int content_lowsumdiff)
Set the thresholds for variance based partition.
av1_choose_var_based_partitioning
int av1_choose_var_based_partitioning(AV1_COMP *cpi, const TileInfo *const tile, ThreadData *td, MACROBLOCK *x, int mi_row, int mi_col)
Variance based partition selection.
AV1_COMP
Top level encoder structure.
Definition encoder.h:2897