summaryrefslogtreecommitdiff
path: root/vp9/encoder
diff options
context:
space:
mode:
Diffstat (limited to 'vp9/encoder')
-rw-r--r--vp9/encoder/vp9_encodeframe.c10
-rw-r--r--vp9/encoder/vp9_onyx_if.c35
-rw-r--r--vp9/encoder/vp9_onyx_int.h2
-rw-r--r--vp9/encoder/vp9_rdopt.c32
4 files changed, 33 insertions, 46 deletions
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c
index 89e2558a8..d4b603921 100644
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -2412,10 +2412,7 @@ static void encode_superblock32(VP9_COMP *cpi, TOKENEXTRA **t,
&xd->scale_factor[1], &xd->scale_factor_uv[1]);
}
- vp9_build_inter32x32_predictors_sb(xd, xd->dst.y_buffer,
- xd->dst.u_buffer, xd->dst.v_buffer,
- xd->dst.y_stride, xd->dst.uv_stride,
- mb_row, mb_col);
+ vp9_build_inter32x32_predictors_sb(xd, mb_row, mb_col);
}
if (!x->skip) {
@@ -2632,10 +2629,7 @@ static void encode_superblock64(VP9_COMP *cpi, TOKENEXTRA **t,
&xd->scale_factor[1], &xd->scale_factor_uv[1]);
}
- vp9_build_inter64x64_predictors_sb(xd, xd->dst.y_buffer,
- xd->dst.u_buffer, xd->dst.v_buffer,
- xd->dst.y_stride, xd->dst.uv_stride,
- mb_row, mb_col);
+ vp9_build_inter64x64_predictors_sb(xd, mb_row, mb_col);
}
if (!x->skip) {
diff --git a/vp9/encoder/vp9_onyx_if.c b/vp9/encoder/vp9_onyx_if.c
index ce492e182..67bd64a61 100644
--- a/vp9/encoder/vp9_onyx_if.c
+++ b/vp9/encoder/vp9_onyx_if.c
@@ -1513,6 +1513,8 @@ VP9_PTR vp9_create_compressor(VP9_CONFIG *oxcf) {
cpi->tot_recode_hits = 0;
cpi->summed_quality = 0;
cpi->summed_weights = 0;
+ cpi->summedp_quality = 0;
+ cpi->summedp_weights = 0;
}
if (cpi->b_calculate_ssimg) {
@@ -1708,18 +1710,25 @@ void vp9_remove_compressor(VP9_PTR *ptr) {
if (cpi->b_calculate_psnr) {
YV12_BUFFER_CONFIG *lst_yv12 =
&cpi->common.yv12_fb[cpi->common.ref_frame_map[cpi->lst_fb_idx]];
- double samples = 3.0 / 2 * cpi->count * lst_yv12->y_width * lst_yv12->y_height;
+ double samples = 3.0 / 2 * cpi->count *
+ lst_yv12->y_width * lst_yv12->y_height;
double total_psnr = vp9_mse2psnr(samples, 255.0, cpi->total_sq_error);
double total_psnr2 = vp9_mse2psnr(samples, 255.0, cpi->total_sq_error2);
- double total_ssim = 100 * pow(cpi->summed_quality / cpi->summed_weights, 8.0);
-
- fprintf(f, "Bitrate\tAVGPsnr\tGLBPsnr\tAVPsnrP\tGLPsnrP\tVPXSSIM\t Time(ms)\n");
- fprintf(f, "%7.2f\t%7.3f\t%7.3f\t%7.3f\t%7.3f\t%7.3f\t%8.0f\n",
- dr, cpi->total / cpi->count, total_psnr, cpi->totalp / cpi->count, total_psnr2, total_ssim,
+ double total_ssim = 100 * pow(cpi->summed_quality /
+ cpi->summed_weights, 8.0);
+ double total_ssimp = 100 * pow(cpi->summedp_quality /
+ cpi->summedp_weights, 8.0);
+
+ fprintf(f, "Bitrate\tAVGPsnr\tGLBPsnr\tAVPsnrP\tGLPsnrP\t"
+ "VPXSSIM\tVPSSIMP\t Time(ms)\n");
+ fprintf(f, "%7.2f\t%7.3f\t%7.3f\t%7.3f\t%7.3f\t%7.3f\t%7.3f\t%8.0f\n",
+ dr, cpi->total / cpi->count, total_psnr,
+ cpi->totalp / cpi->count, total_psnr2, total_ssim, total_ssimp,
total_encode_time);
-// fprintf(f, "%7.3f\t%7.3f\t%7.3f\t%7.3f\t%7.3f\t%7.3f\t%8.0f %10ld\n",
-// dr, cpi->total / cpi->count, total_psnr, cpi->totalp / cpi->count, total_psnr2, total_ssim,
-// total_encode_time, cpi->tot_recode_hits);
+// fprintf(f, "%7.3f\t%7.3f\t%7.3f\t%7.3f\t%7.3f\t%7.3f\t%8.0f %10ld\n",
+// dr, cpi->total / cpi->count, total_psnr,
+// cpi->totalp / cpi->count, total_psnr2, total_ssim,
+// total_encode_time, cpi->tot_recode_hits);
}
if (cpi->b_calculate_ssimg) {
@@ -3949,10 +3958,16 @@ int vp9_get_compressed_data(VP9_PTR ptr, unsigned int *frame_flags,
cpi->totalp += frame_psnr2;
frame_ssim2 = vp9_calc_ssim(cpi->Source,
- &cm->post_proc_buffer, 1, &weight);
+ recon, 1, &weight);
cpi->summed_quality += frame_ssim2 * weight;
cpi->summed_weights += weight;
+
+ frame_ssim2 = vp9_calc_ssim(cpi->Source,
+ &cm->post_proc_buffer, 1, &weight);
+
+ cpi->summedp_quality += frame_ssim2 * weight;
+ cpi->summedp_weights += weight;
#if 0
{
FILE *f = fopen("q_used.stt", "a");
diff --git a/vp9/encoder/vp9_onyx_int.h b/vp9/encoder/vp9_onyx_int.h
index 891cc3f52..9f9cb0e1c 100644
--- a/vp9/encoder/vp9_onyx_int.h
+++ b/vp9/encoder/vp9_onyx_int.h
@@ -640,6 +640,8 @@ typedef struct VP9_COMP {
int bytes;
double summed_quality;
double summed_weights;
+ double summedp_quality;
+ double summedp_weights;
unsigned int tot_recode_hits;
diff --git a/vp9/encoder/vp9_rdopt.c b/vp9/encoder/vp9_rdopt.c
index 71dd6b80b..e66f6a2f5 100644
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -3723,13 +3723,7 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
unsigned int sse, var;
int tmp_rate_y, tmp_rate_u, tmp_rate_v;
int tmp_dist_y, tmp_dist_u, tmp_dist_v;
- vp9_build_inter64x64_predictors_sb(xd,
- xd->dst.y_buffer,
- xd->dst.u_buffer,
- xd->dst.v_buffer,
- xd->dst.y_stride,
- xd->dst.uv_stride,
- mb_row, mb_col);
+ vp9_build_inter64x64_predictors_sb(xd, mb_row, mb_col);
var = vp9_variance64x64(*(b->base_src), b->src_stride,
xd->dst.y_buffer, xd->dst.y_stride, &sse);
// Note our transform coeffs are 8 times an orthogonal transform.
@@ -3808,13 +3802,7 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
unsigned int sse, var;
int tmp_rate_y, tmp_rate_u, tmp_rate_v;
int tmp_dist_y, tmp_dist_u, tmp_dist_v;
- vp9_build_inter32x32_predictors_sb(xd,
- xd->dst.y_buffer,
- xd->dst.u_buffer,
- xd->dst.v_buffer,
- xd->dst.y_stride,
- xd->dst.uv_stride,
- mb_row, mb_col);
+ vp9_build_inter32x32_predictors_sb(xd, mb_row, mb_col);
var = vp9_variance32x32(*(b->base_src), b->src_stride,
xd->dst.y_buffer, xd->dst.y_stride, &sse);
// Note our transform coeffs are 8 times an orthogonal transform.
@@ -3981,21 +3969,9 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
// Handles the special case when a filter that is not in the
// switchable list (ex. bilinear, 6-tap) is indicated at the frame level
if (block_size == BLOCK_64X64) {
- vp9_build_inter64x64_predictors_sb(xd,
- xd->dst.y_buffer,
- xd->dst.u_buffer,
- xd->dst.v_buffer,
- xd->dst.y_stride,
- xd->dst.uv_stride,
- mb_row, mb_col);
+ vp9_build_inter64x64_predictors_sb(xd, mb_row, mb_col);
} else if (block_size == BLOCK_32X32) {
- vp9_build_inter32x32_predictors_sb(xd,
- xd->dst.y_buffer,
- xd->dst.u_buffer,
- xd->dst.v_buffer,
- xd->dst.y_stride,
- xd->dst.uv_stride,
- mb_row, mb_col);
+ vp9_build_inter32x32_predictors_sb(xd, mb_row, mb_col);
} else {
vp9_build_inter16x16_predictors_mb(xd, xd->predictor,
xd->predictor + 256,