Removing LOOPFILTER_TYPE and corresponding bit in bitstream.

We don't have two loopfilter types anymore.

Change-Id: I53c0137361342c7d00887ad03be3490f0dfa3532
This commit is contained in:
Dmitry Kovalev 2013-05-08 16:39:43 -07:00
Родитель 267e9331e2
Коммит f66320abff
6 изменённых файлов: 60 добавлений и 78 удалений

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

@ -177,18 +177,15 @@ void vp9_setup_version(VP9_COMMON *cm) {
switch (cm->version & 0x3) {
case 0:
cm->no_lpf = 0;
cm->filter_type = NORMAL_LOOPFILTER;
cm->use_bilinear_mc_filter = 0;
break;
case 1:
cm->no_lpf = 0;
cm->filter_type = SIMPLE_LOOPFILTER;
cm->use_bilinear_mc_filter = 1;
break;
case 2:
case 3:
cm->no_lpf = 1;
cm->filter_type = NORMAL_LOOPFILTER;
cm->use_bilinear_mc_filter = 1;
break;
}
@ -203,7 +200,6 @@ void vp9_create_common(VP9_COMMON *oci) {
oci->txfm_mode = ONLY_4X4;
oci->comp_pred_mode = HYBRID_PREDICTION;
oci->no_lpf = 0;
oci->filter_type = NORMAL_LOOPFILTER;
oci->use_bilinear_mc_filter = 0;
oci->clr_type = REG_YUV;
oci->clamp_type = RECON_CLAMP_REQUIRED;

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

@ -199,7 +199,6 @@ static void lpf_mb(VP9_COMMON *cm, const MODE_INFO *mi,
if (filter_level) {
const int skip_lf = mb_lf_skip(&mi->mbmi);
const int tx_size = mi->mbmi.txfm_size;
if (cm->filter_type == NORMAL_LOOPFILTER) {
const int hev_index = filter_level >> 4;
lfi.mblim = lfi_n->mblim[filter_level];
lfi.blim = lfi_n->blim[filter_level];
@ -219,8 +218,7 @@ static void lpf_mb(VP9_COMMON *cm, const MODE_INFO *mi,
if (!skip_lf) {
if (tx_size >= TX_8X8) {
if (tx_size == TX_8X8 &&
(mi->mbmi.sb_type < BLOCK_SIZE_MB16X16)
)
mi->mbmi.sb_type < BLOCK_SIZE_MB16X16)
vp9_loop_filter_bh8x8(y_ptr, u_ptr, v_ptr,
y_stride, uv_stride, &lfi);
else
@ -245,7 +243,7 @@ static void lpf_mb(VP9_COMMON *cm, const MODE_INFO *mi,
if (!skip_lf) {
if (tx_size >= TX_8X8) {
if (tx_size == TX_8X8 &&
(mi->mbmi.sb_type < BLOCK_SIZE_MB16X16))
mi->mbmi.sb_type < BLOCK_SIZE_MB16X16)
vp9_loop_filter_bv8x8(y_ptr, u_ptr, v_ptr,
y_stride, uv_stride, &lfi);
else
@ -271,9 +269,6 @@ static void lpf_mb(VP9_COMMON *cm, const MODE_INFO *mi,
}
#endif
}
} else {
// TODO(yaowu): simple loop filter
}
}
}

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

@ -16,12 +16,6 @@
#include "vp9/common/vp9_blockd.h"
#define MAX_LOOP_FILTER 63
typedef enum {
NORMAL_LOOPFILTER = 0,
SIMPLE_LOOPFILTER = 1
} LOOPFILTER_TYPE;
#define SIMD_WIDTH 16
/* Need to align this structure so when it is declared and

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

@ -198,7 +198,6 @@ typedef struct VP9Common {
unsigned char *last_frame_seg_map;
INTERPOLATIONFILTERTYPE mcomp_filter_type;
LOOPFILTER_TYPE filter_type;
loop_filter_info_n lf_info;

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

@ -656,7 +656,6 @@ static void setup_pred_probs(VP9_COMMON *pc, vp9_reader *r) {
}
static void setup_loopfilter(VP9_COMMON *pc, MACROBLOCKD *xd, vp9_reader *r) {
pc->filter_type = (LOOPFILTER_TYPE) vp9_read_bit(r);
pc->filter_level = vp9_read_literal(r, 6);
pc->sharpness_level = vp9_read_literal(r, 3);

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

@ -1496,7 +1496,6 @@ void vp9_pack_bitstream(VP9_COMP *cpi, uint8_t *dest, unsigned long *size) {
vp9_write_bit(&header_bc, cpi->mb.e_mbd.lossless);
// Encode the loop filter level and type
vp9_write_bit(&header_bc, pc->filter_type);
vp9_write_literal(&header_bc, pc->filter_level, 6);
vp9_write_literal(&header_bc, pc->sharpness_level, 3);
#if CONFIG_LOOP_DERING