]> granicus.if.org Git - libvpx/commitdiff
Merge remote branch 'origin/master' into experimental
authorJohn Koleszar <jkoleszar@google.com>
Mon, 14 Mar 2011 12:48:32 +0000 (08:48 -0400)
committerJohn Koleszar <jkoleszar@google.com>
Mon, 14 Mar 2011 12:48:44 +0000 (08:48 -0400)
Conflicts:
vp8/encoder/onyx_if.c

Change-Id: I230b63cef209cd1ac98357729a91ec07597756bd

1  2 
vp8/common/generic/systemdependent.c
vp8/encoder/encodeframe.c
vp8/encoder/firstpass.c
vp8/encoder/generic/csystemdependent.c
vp8/encoder/onyx_if.c
vp8/encoder/ratectrl.c
vp8/encoder/rdopt.c

Simple merge
Simple merge
Simple merge
index 101c22296da0ef95bcfb7d3f190d5ec3e6fa2cd1,8965634fe7daa30efcf3c01f1771a20661d45a38..0ea6dca72aeeac72e7319a26e285607d4949bd97
@@@ -5210,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