Commit f66320ab authored by Dmitry Kovalev's avatar Dmitry Kovalev
Browse files

Removing LOOPFILTER_TYPE and corresponding bit in bitstream.

We don't have two loopfilter types anymore.

Change-Id: I53c0137361342c7d00887ad03be3490f0dfa3532
parent 267e9331
...@@ -177,18 +177,15 @@ void vp9_setup_version(VP9_COMMON *cm) { ...@@ -177,18 +177,15 @@ void vp9_setup_version(VP9_COMMON *cm) {
switch (cm->version & 0x3) { switch (cm->version & 0x3) {
case 0: case 0:
cm->no_lpf = 0; cm->no_lpf = 0;
cm->filter_type = NORMAL_LOOPFILTER;
cm->use_bilinear_mc_filter = 0; cm->use_bilinear_mc_filter = 0;
break; break;
case 1: case 1:
cm->no_lpf = 0; cm->no_lpf = 0;
cm->filter_type = SIMPLE_LOOPFILTER;
cm->use_bilinear_mc_filter = 1; cm->use_bilinear_mc_filter = 1;
break; break;
case 2: case 2:
case 3: case 3:
cm->no_lpf = 1; cm->no_lpf = 1;
cm->filter_type = NORMAL_LOOPFILTER;
cm->use_bilinear_mc_filter = 1; cm->use_bilinear_mc_filter = 1;
break; break;
} }
...@@ -203,7 +200,6 @@ void vp9_create_common(VP9_COMMON *oci) { ...@@ -203,7 +200,6 @@ void vp9_create_common(VP9_COMMON *oci) {
oci->txfm_mode = ONLY_4X4; oci->txfm_mode = ONLY_4X4;
oci->comp_pred_mode = HYBRID_PREDICTION; oci->comp_pred_mode = HYBRID_PREDICTION;
oci->no_lpf = 0; oci->no_lpf = 0;
oci->filter_type = NORMAL_LOOPFILTER;
oci->use_bilinear_mc_filter = 0; oci->use_bilinear_mc_filter = 0;
oci->clr_type = REG_YUV; oci->clr_type = REG_YUV;
oci->clamp_type = RECON_CLAMP_REQUIRED; oci->clamp_type = RECON_CLAMP_REQUIRED;
......
...@@ -199,7 +199,6 @@ static void lpf_mb(VP9_COMMON *cm, const MODE_INFO *mi, ...@@ -199,7 +199,6 @@ static void lpf_mb(VP9_COMMON *cm, const MODE_INFO *mi,
if (filter_level) { if (filter_level) {
const int skip_lf = mb_lf_skip(&mi->mbmi); const int skip_lf = mb_lf_skip(&mi->mbmi);
const int tx_size = mi->mbmi.txfm_size; const int tx_size = mi->mbmi.txfm_size;
if (cm->filter_type == NORMAL_LOOPFILTER) {
const int hev_index = filter_level >> 4; const int hev_index = filter_level >> 4;
lfi.mblim = lfi_n->mblim[filter_level]; lfi.mblim = lfi_n->mblim[filter_level];
lfi.blim = lfi_n->blim[filter_level]; lfi.blim = lfi_n->blim[filter_level];
...@@ -219,8 +218,7 @@ static void lpf_mb(VP9_COMMON *cm, const MODE_INFO *mi, ...@@ -219,8 +218,7 @@ static void lpf_mb(VP9_COMMON *cm, const MODE_INFO *mi,
if (!skip_lf) { if (!skip_lf) {
if (tx_size >= TX_8X8) { if (tx_size >= TX_8X8) {
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, vp9_loop_filter_bh8x8(y_ptr, u_ptr, v_ptr,
y_stride, uv_stride, &lfi); y_stride, uv_stride, &lfi);
else else
...@@ -245,7 +243,7 @@ static void lpf_mb(VP9_COMMON *cm, const MODE_INFO *mi, ...@@ -245,7 +243,7 @@ static void lpf_mb(VP9_COMMON *cm, const MODE_INFO *mi,
if (!skip_lf) { if (!skip_lf) {
if (tx_size >= TX_8X8) { if (tx_size >= TX_8X8) {
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, vp9_loop_filter_bv8x8(y_ptr, u_ptr, v_ptr,
y_stride, uv_stride, &lfi); y_stride, uv_stride, &lfi);
else else
...@@ -271,9 +269,6 @@ static void lpf_mb(VP9_COMMON *cm, const MODE_INFO *mi, ...@@ -271,9 +269,6 @@ static void lpf_mb(VP9_COMMON *cm, const MODE_INFO *mi,
} }
#endif #endif
} }
} else {
// TODO(yaowu): simple loop filter
}
} }
} }
......
...@@ -16,12 +16,6 @@ ...@@ -16,12 +16,6 @@
#include "vp9/common/vp9_blockd.h" #include "vp9/common/vp9_blockd.h"
#define MAX_LOOP_FILTER 63 #define MAX_LOOP_FILTER 63
typedef enum {
NORMAL_LOOPFILTER = 0,
SIMPLE_LOOPFILTER = 1
} LOOPFILTER_TYPE;
#define SIMD_WIDTH 16 #define SIMD_WIDTH 16
/* Need to align this structure so when it is declared and /* Need to align this structure so when it is declared and
......
...@@ -198,7 +198,6 @@ typedef struct VP9Common { ...@@ -198,7 +198,6 @@ typedef struct VP9Common {
unsigned char *last_frame_seg_map; unsigned char *last_frame_seg_map;
INTERPOLATIONFILTERTYPE mcomp_filter_type; INTERPOLATIONFILTERTYPE mcomp_filter_type;
LOOPFILTER_TYPE filter_type;
loop_filter_info_n lf_info; loop_filter_info_n lf_info;
......
...@@ -656,7 +656,6 @@ static void setup_pred_probs(VP9_COMMON *pc, vp9_reader *r) { ...@@ -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) { 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->filter_level = vp9_read_literal(r, 6);
pc->sharpness_level = vp9_read_literal(r, 3); 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) { ...@@ -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); vp9_write_bit(&header_bc, cpi->mb.e_mbd.lossless);
// Encode the loop filter level and type // 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->filter_level, 6);
vp9_write_literal(&header_bc, pc->sharpness_level, 3); vp9_write_literal(&header_bc, pc->sharpness_level, 3);
#if CONFIG_LOOP_DERING #if CONFIG_LOOP_DERING
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment