summaryrefslogtreecommitdiff
path: root/vp9
diff options
context:
space:
mode:
Diffstat (limited to 'vp9')
-rw-r--r--vp9/common/vp9_alloccommon.c27
-rw-r--r--vp9/common/vp9_alloccommon.h1
-rw-r--r--vp9/common/vp9_debugmodes.c137
-rw-r--r--vp9/common/vp9_onyxc_int.h3
-rw-r--r--vp9/decoder/vp9_decodframe.c1
-rw-r--r--vp9/encoder/vp9_onyx_if.c7
-rw-r--r--vp9/vp9_common.mk1
7 files changed, 140 insertions, 37 deletions
diff --git a/vp9/common/vp9_alloccommon.c b/vp9/common/vp9_alloccommon.c
index 13a1c7d7f..2660344d5 100644
--- a/vp9/common/vp9_alloccommon.c
+++ b/vp9/common/vp9_alloccommon.c
@@ -173,31 +173,6 @@ int vp9_alloc_frame_buffers(VP9_COMMON *oci, int width, int height) {
return 1;
}
-void vp9_setup_version(VP9_COMMON *cm) {
- if (cm->version & 0x4) {
- if (!CONFIG_EXPERIMENTAL)
- vpx_internal_error(&cm->error, VPX_CODEC_UNSUP_BITSTREAM,
- "Bitstream was created by an experimental "
- "encoder");
- cm->experimental = 1;
- }
-
- switch (cm->version & 0x3) {
- case 0:
- cm->no_lpf = 0;
- cm->use_bilinear_mc_filter = 0;
- break;
- case 1:
- cm->no_lpf = 0;
- cm->use_bilinear_mc_filter = 1;
- break;
- case 2:
- case 3:
- cm->no_lpf = 1;
- cm->use_bilinear_mc_filter = 1;
- break;
- }
-}
void vp9_create_common(VP9_COMMON *oci) {
vp9_machine_specific_config(oci);
@@ -205,8 +180,6 @@ void vp9_create_common(VP9_COMMON *oci) {
oci->txfm_mode = ONLY_4X4;
oci->comp_pred_mode = HYBRID_PREDICTION;
- oci->no_lpf = 0;
- oci->use_bilinear_mc_filter = 0;
oci->clr_type = REG_YUV;
// Initialize reference frame sign bias structure to defaults
diff --git a/vp9/common/vp9_alloccommon.h b/vp9/common/vp9_alloccommon.h
index fc79f6377..8bf5ed160 100644
--- a/vp9/common/vp9_alloccommon.h
+++ b/vp9/common/vp9_alloccommon.h
@@ -25,7 +25,6 @@ void vp9_remove_common(VP9_COMMON *oci);
int vp9_alloc_frame_buffers(VP9_COMMON *oci, int width, int height);
void vp9_free_frame_buffers(VP9_COMMON *oci);
-void vp9_setup_version(VP9_COMMON *oci);
void vp9_update_frame_size(VP9_COMMON *cm);
diff --git a/vp9/common/vp9_debugmodes.c b/vp9/common/vp9_debugmodes.c
new file mode 100644
index 000000000..5841f8091
--- /dev/null
+++ b/vp9/common/vp9_debugmodes.c
@@ -0,0 +1,137 @@
+/*
+ * Copyright (c) 2010 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.
+ */
+
+#include <stdio.h>
+
+#include "vp9/common/vp9_blockd.h"
+
+void vp9_print_modes_and_motion_vectors(MODE_INFO *mi, int rows, int cols,
+ int frame, char *file) {
+ int mi_row;
+ int mi_col;
+ int mi_index = 0;
+ FILE *mvs = fopen(file, "a");
+
+ // Print out the macroblock Y modes
+ fprintf(mvs, "SB Types for Frame %d\n", frame);
+
+ for (mi_row = 0; mi_row < rows; mi_row++) {
+ for (mi_col = 0; mi_col < cols; mi_col++) {
+ fprintf(mvs, "%2d ", mi[mi_index].mbmi.sb_type);
+
+ mi_index++;
+ }
+
+ fprintf(mvs, "\n");
+ mi_index += 8;
+ }
+
+ // Print out the macroblock Y modes
+ fprintf(mvs, "Mb Modes for Frame %d\n", frame);
+ mi_index = 0;
+ for (mi_row = 0; mi_row < rows; mi_row++) {
+ for (mi_col = 0; mi_col < cols; mi_col++) {
+ fprintf(mvs, "%2d ", mi[mi_index].mbmi.mode);
+
+ mi_index++;
+ }
+
+ fprintf(mvs, "\n");
+ mi_index += 8;
+ }
+
+ fprintf(mvs, "\n");
+
+ mi_index = 0;
+ fprintf(mvs, "Mb mv ref for Frame %d\n", frame);
+
+ for (mi_row = 0; mi_row < rows; mi_row++) {
+ for (mi_col = 0; mi_col < cols; mi_col++) {
+ fprintf(mvs, "%2d ", mi[mi_index].mbmi.ref_frame[0]);
+
+ mi_index++;
+ }
+
+ fprintf(mvs, "\n");
+ mi_index += 8;
+ }
+ fprintf(mvs, "\n");
+
+ mi_index = 0;
+ fprintf(mvs, "Mb mv ref for Frame %d\n", frame);
+
+ for (mi_row = 0; mi_row < rows; mi_row++) {
+ for (mi_col = 0; mi_col < cols; mi_col++) {
+ fprintf(mvs, "%4d:%4d ", mi[mi_index].mbmi.mv[0].as_mv.row,
+ mi[mi_index].mbmi.mv[0].as_mv.col);
+
+ mi_index++;
+ }
+
+ fprintf(mvs, "\n");
+ mi_index += 8;
+ }
+
+ fprintf(mvs, "\n");
+
+ /* print out the macroblock txform sizes */
+ mi_index = 0;
+ fprintf(mvs, "TXFM size for Frame %d\n", frame);
+
+ for (mi_row = 0; mi_row < rows; mi_row++) {
+ for (mi_col = 0; mi_col < cols; mi_col++) {
+ fprintf(mvs, "%2d ", mi[mi_index].mbmi.txfm_size);
+
+ mi_index++;
+ }
+
+ mi_index += 8;
+ fprintf(mvs, "\n");
+ }
+
+ fprintf(mvs, "\n");
+
+ /* print out the macroblock UV modes */
+ mi_index = 0;
+ fprintf(mvs, "UV Modes for Frame %d\n", frame);
+
+ for (mi_row = 0; mi_row < rows; mi_row++) {
+ for (mi_col = 0; mi_col < cols; mi_col++) {
+ fprintf(mvs, "%2d ", mi[mi_index].mbmi.uv_mode);
+
+ mi_index++;
+ }
+
+ mi_index += 8;
+ fprintf(mvs, "\n");
+ }
+
+ fprintf(mvs, "\n");
+
+ /* print out the macroblock mvs */
+ mi_index = 0;
+ fprintf(mvs, "MVs for Frame %d\n", frame);
+
+ for (mi_row = 0; mi_row < rows; mi_row++) {
+ for (mi_col = 0; mi_col < cols; mi_col++) {
+ fprintf(mvs, "%5d:%-5d", mi[mi_index].mbmi.mv[0].as_mv.row / 2,
+ mi[mi_index].mbmi.mv[0].as_mv.col / 2);
+
+ mi_index++;
+ }
+
+ mi_index += 8;
+ fprintf(mvs, "\n");
+ }
+
+ fprintf(mvs, "\n");
+
+ fclose(mvs);
+}
diff --git a/vp9/common/vp9_onyxc_int.h b/vp9/common/vp9_onyxc_int.h
index 12161ca27..121995093 100644
--- a/vp9/common/vp9_onyxc_int.h
+++ b/vp9/common/vp9_onyxc_int.h
@@ -187,10 +187,7 @@ typedef struct VP9Common {
int mode_info_stride;
/* profile settings */
- int experimental;
TXFM_MODE txfm_mode;
- int no_lpf;
- int use_bilinear_mc_filter;
int base_qindex;
int last_kf_gf_q; /* Q used on the last GF or KF */
diff --git a/vp9/decoder/vp9_decodframe.c b/vp9/decoder/vp9_decodframe.c
index 7ef429587..c9d24466e 100644
--- a/vp9/decoder/vp9_decodframe.c
+++ b/vp9/decoder/vp9_decodframe.c
@@ -1143,7 +1143,6 @@ int vp9_decode_frame(VP9D_COMP *pbi, const uint8_t **p_data_end) {
if (!pbi->decoded_key_frame && !keyframe)
return -1;
- vp9_setup_version(pc);
if (!read_is_valid(data, first_partition_size, data_end))
vpx_internal_error(&pc->error, VPX_CODEC_CORRUPT_FRAME,
"Truncated packet or corrupt partition 0 length");
diff --git a/vp9/encoder/vp9_onyx_if.c b/vp9/encoder/vp9_onyx_if.c
index bcd61778e..92927370a 100644
--- a/vp9/encoder/vp9_onyx_if.c
+++ b/vp9/encoder/vp9_onyx_if.c
@@ -955,7 +955,6 @@ static void init_config(VP9_PTR ptr, VP9_CONFIG *oxcf) {
cpi->goldfreq = 7;
cm->version = oxcf->version;
- vp9_setup_version(cm);
cm->width = oxcf->width;
cm->height = oxcf->height;
@@ -1006,7 +1005,6 @@ void vp9_change_config(VP9_PTR ptr, VP9_CONFIG *oxcf) {
if (cm->version != oxcf->version) {
cm->version = oxcf->version;
- vp9_setup_version(cm);
}
cpi->oxcf = *oxcf;
@@ -1114,8 +1112,7 @@ void vp9_change_config(VP9_PTR ptr, VP9_CONFIG *oxcf) {
cpi->cq_target_quality = cpi->oxcf.cq_level;
- cm->mcomp_filter_type = cm->use_bilinear_mc_filter ? BILINEAR
- : DEFAULT_INTERP_FILTER;
+ cm->mcomp_filter_type = DEFAULT_INTERP_FILTER;
cpi->target_bandwidth = cpi->oxcf.target_bandwidth;
@@ -2233,7 +2230,7 @@ static void update_reference_frames(VP9_COMP * const cpi) {
}
static void loopfilter_frame(VP9_COMP *cpi, VP9_COMMON *cm) {
- if (cm->no_lpf || cpi->mb.e_mbd.lossless) {
+ if (cpi->mb.e_mbd.lossless) {
cm->filter_level = 0;
} else {
struct vpx_usec_timer timer;
diff --git a/vp9/vp9_common.mk b/vp9/vp9_common.mk
index 29e832384..732891449 100644
--- a/vp9/vp9_common.mk
+++ b/vp9/vp9_common.mk
@@ -18,6 +18,7 @@ VP9_COMMON_SRCS-yes += common/vp9_asm_com_offsets.c
VP9_COMMON_SRCS-yes += common/vp9_coefupdateprobs.h
VP9_COMMON_SRCS-yes += common/vp9_convolve.c
VP9_COMMON_SRCS-yes += common/vp9_convolve.h
+VP9_COMMON_SRCS-yes += common/vp9_debugmodes.c
VP9_COMMON_SRCS-yes += common/vp9_default_coef_probs.h
VP9_COMMON_SRCS-yes += common/vp9_entropy.c
VP9_COMMON_SRCS-yes += common/vp9_entropymode.c