summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfbarchard@google.com <fbarchard@google.com@16f28f9a-4ce2-e073-06de-1de4eb20be90>2014-06-26 22:47:01 +0000
committerfbarchard@google.com <fbarchard@google.com@16f28f9a-4ce2-e073-06de-1de4eb20be90>2014-06-26 22:47:01 +0000
commit40b21e20d16b331ed794b87e84882f0af895bef2 (patch)
treefb5442bd7dd0494f628e0b0a51db68487f8787c1
parentb7d674e305f53c83145405a9721a9e822afde004 (diff)
downloadlibyuv-40b21e20d16b331ed794b87e84882f0af895bef2.tar.gz
lint fixes for psnr
BUG=339 TESTED=lint R=harryjin@google.com Review URL: https://webrtc-codereview.appspot.com/14789004 git-svn-id: http://libyuv.googlecode.com/svn/trunk@1024 16f28f9a-4ce2-e073-06de-1de4eb20be90
-rw-r--r--README.chromium2
-rw-r--r--include/libyuv/version.h2
-rw-r--r--util/psnr_main.cc39
3 files changed, 28 insertions, 15 deletions
diff --git a/README.chromium b/README.chromium
index 581aa45..1be6b7f 100644
--- a/README.chromium
+++ b/README.chromium
@@ -1,6 +1,6 @@
Name: libyuv
URL: http://code.google.com/p/libyuv/
-Version: 1023
+Version: 1024
License: BSD
License File: LICENSE
diff --git a/include/libyuv/version.h b/include/libyuv/version.h
index 67b5fb3..0a31a45 100644
--- a/include/libyuv/version.h
+++ b/include/libyuv/version.h
@@ -11,6 +11,6 @@
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
#define INCLUDE_LIBYUV_VERSION_H_
-#define LIBYUV_VERSION 1023
+#define LIBYUV_VERSION 1024
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
diff --git a/util/psnr_main.cc b/util/psnr_main.cc
index c458e15..a26bc92 100644
--- a/util/psnr_main.cc
+++ b/util/psnr_main.cc
@@ -243,9 +243,12 @@ bool UpdateMetrics(uint8* ch_org, uint8* ch_rec,
const uint8* const v_rec = ch_rec + y_size + uv_size;
if (do_psnr) {
#ifdef HAVE_JPEG
- double y_err = (double)libyuv::ComputeSumSquareError(ch_org, ch_rec, y_size);
- double u_err = (double)libyuv::ComputeSumSquareError(u_org, u_rec, uv_size);
- double v_err = (double)libyuv::ComputeSumSquareError(v_org, v_rec, uv_size);
+ double y_err = static_cast<double>(
+ libyuv::ComputeSumSquareError(ch_org, ch_rec, y_size));
+ double u_err = static_cast<double>(
+ libyuv::ComputeSumSquareError(u_org, u_rec, uv_size));
+ double v_err = static_cast<double>(
+ libyuv::ComputeSumSquareError(v_org, v_rec, uv_size));
#else
double y_err = ComputeSumSquareError(ch_org, ch_rec, y_size);
double u_err = ComputeSumSquareError(u_org, u_rec, uv_size);
@@ -427,11 +430,16 @@ int main(int argc, const char* argv[]) {
memset(ch_org, 0, total_size);
if (0 != libyuv::MJPGToI420(ch_jpeg, bytes_org,
- ch_org, image_width,
- ch_org + y_size, (image_width + 1) / 2,
- ch_org + y_size + uv_size, (image_width + 1) / 2,
- image_width, image_height,
- image_width, image_height)) {
+ ch_org,
+ image_width,
+ ch_org + y_size,
+ (image_width + 1) / 2,
+ ch_org + y_size + uv_size,
+ (image_width + 1) / 2,
+ image_width,
+ image_height,
+ image_width,
+ image_height)) {
delete[] ch_jpeg;
break;
}
@@ -452,11 +460,16 @@ int main(int argc, const char* argv[]) {
memset(ch_rec, 0, total_size);
if (0 != libyuv::MJPGToI420(ch_jpeg, bytes_rec,
- ch_rec, image_width,
- ch_rec + y_size, (image_width + 1) / 2,
- ch_rec + y_size + uv_size, (image_width + 1) / 2,
- image_width, image_height,
- image_width, image_height)) {
+ ch_rec,
+ image_width,
+ ch_rec + y_size,
+ (image_width + 1) / 2,
+ ch_rec + y_size + uv_size,
+ (image_width + 1) / 2,
+ image_width,
+ image_height,
+ image_width,
+ image_height)) {
delete[] ch_jpeg;
break;
}