]> granicus.if.org Git - libvpx/commitdiff
Merge remote branch 'internal/upstream' into HEAD
authorJohn Koleszar <jkoleszar@google.com>
Mon, 14 Mar 2011 12:52:54 +0000 (08:52 -0400)
committerJohn Koleszar <jkoleszar@google.com>
Mon, 14 Mar 2011 12:53:02 +0000 (08:53 -0400)
Conflicts:
vp8/encoder/onyx_if.c

Change-Id: Ieef9a58a2effdc68cf52bc5f14d90c31a1dbc13a

1  2 
vp8/common/generic/systemdependent.c
vp8/decoder/decodframe.c
vp8/encoder/encodeframe.c
vp8/encoder/ethreading.c
vp8/encoder/firstpass.c
vp8/encoder/generic/csystemdependent.c
vp8/encoder/onyx_if.c
vp8/encoder/onyx_int.h
vp8/encoder/ratectrl.c
vp8/encoder/rdopt.c

Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index bd8f9782d19018e44fbda08c2af11dd85582f835,8965634fe7daa30efcf3c01f1771a20661d45a38..ac226f57077cafb5e688cd2e598f507babbffccb
@@@ -5209,26 -5159,36 +5250,44 @@@ int vp8_get_compressed_data(VP8_PTR ptr
  
                      vp8_deblock(cm->frame_to_show, &cm->post_proc_buffer, cm->filter_level * 10 / 6, 1, 0, IF_RTCD(&cm->rtcd.postproc));
                      vp8_clear_system_state();
-                     frame_psnr2 = vp8_calc_psnr(cpi->Source, &cm->post_proc_buffer, &y2, &u2, &v2, &sq_error);
-                     frame_ssim2 = vp8_calc_ssim(cpi->Source, &cm->post_proc_buffer, 1, &weight);
  
-                     cpi->summed_quality += frame_ssim2 * weight;
-                     cpi->summed_weights += weight;
+                     ye = calc_plane_error(orig->y_buffer, orig->y_stride,
+                       pp->y_buffer, pp->y_stride, orig->y_width, orig->y_height,
+                       IF_RTCD(&cpi->rtcd.variance));
  
-                     cpi->totalp_y += y2;
-                     cpi->totalp_u += u2;
-                     cpi->totalp_v += v2;
-                     cpi->totalp  += frame_psnr2;
+                     ue = calc_plane_error(orig->u_buffer, orig->uv_stride,
+                       pp->u_buffer, pp->uv_stride, orig->uv_width, orig->uv_height,
+                       IF_RTCD(&cpi->rtcd.variance));
+                     ve = calc_plane_error(orig->v_buffer, orig->uv_stride,
+                       pp->v_buffer, pp->uv_stride, orig->uv_width, orig->uv_height,
+                       IF_RTCD(&cpi->rtcd.variance));
+                     sq_error = ye + ue + ve;
+                     frame_psnr2 = vp8_mse2psnr(t_samples, 255.0, sq_error);
+                     cpi->totalp_y += vp8_mse2psnr(y_samples, 255.0, ye);
+                     cpi->totalp_u += vp8_mse2psnr(uv_samples, 255.0, ue);
+                     cpi->totalp_v += vp8_mse2psnr(uv_samples, 255.0, ve);
                      cpi->total_sq_error2 += sq_error;
 -
+                     cpi->totalp  += frame_psnr2;
+                     frame_ssim2 = vp8_calc_ssim(cpi->Source,
+                       &cm->post_proc_buffer, 1, &weight,
+                       IF_RTCD(&cpi->rtcd.variance));
+                     cpi->summed_quality += frame_ssim2 * weight;
+                     cpi->summed_weights += weight;
 +#if 0
 +                    {
 +                        FILE *f = fopen("q_used.stt", "a");
 +                        fprintf(f, "%5d : Y%f7.3:U%f7.3:V%f7.3:F%f7.3:S%7.3f\n",
 +                            cpi->common.current_video_frame,y2, u2, v2,
 +                            frame_psnr2, frame_ssim2);
 +                        fclose(f);
 +                    }
 +#endif
                  }
              }
  
Simple merge
Simple merge
Simple merge