mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2025-12-06 16:56:55 +08:00
Fix -Wshadow.
Bug: libyuv:910 Change-Id: I3b74cef99823ffc5e67a77dc223d560d5fdfd8b2 Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/3310893 Reviewed-by: Frank Barchard <fbarchard@chromium.org> Commit-Queue: Mirko Bonadei <mbonadei@chromium.org>
This commit is contained in:
parent
63ce1d0585
commit
c5d48a11f9
@ -248,13 +248,13 @@ bool UpdateMetrics(uint8_t* ch_org,
|
|||||||
int number_of_frames,
|
int number_of_frames,
|
||||||
metric* cur_distortion_psnr,
|
metric* cur_distortion_psnr,
|
||||||
metric* distorted_frame,
|
metric* distorted_frame,
|
||||||
bool do_psnr) {
|
bool compute_psnr) {
|
||||||
const int uv_offset = (do_swap_uv ? uv_size : 0);
|
const int uv_offset = (do_swap_uv ? uv_size : 0);
|
||||||
const uint8_t* const u_org = ch_org + y_size + uv_offset;
|
const uint8_t* const u_org = ch_org + y_size + uv_offset;
|
||||||
const uint8_t* const u_rec = ch_rec + y_size;
|
const uint8_t* const u_rec = ch_rec + y_size;
|
||||||
const uint8_t* const v_org = ch_org + y_size + (uv_size - uv_offset);
|
const uint8_t* const v_org = ch_org + y_size + (uv_size - uv_offset);
|
||||||
const uint8_t* const v_rec = ch_rec + y_size + uv_size;
|
const uint8_t* const v_rec = ch_rec + y_size + uv_size;
|
||||||
if (do_psnr) {
|
if (compute_psnr) {
|
||||||
#ifdef HAVE_JPEG
|
#ifdef HAVE_JPEG
|
||||||
double y_err = static_cast<double>(
|
double y_err = static_cast<double>(
|
||||||
libyuv::ComputeSumSquareError(ch_org, ch_rec, y_size));
|
libyuv::ComputeSumSquareError(ch_org, ch_rec, y_size));
|
||||||
|
|||||||
@ -165,23 +165,23 @@ static int TileARGBScale(const uint8_t* src_argb,
|
|||||||
int src_height,
|
int src_height,
|
||||||
uint8_t* dst_argb,
|
uint8_t* dst_argb,
|
||||||
int dst_stride_argb,
|
int dst_stride_argb,
|
||||||
int dst_width,
|
int destination_width,
|
||||||
int dst_height,
|
int destination_height,
|
||||||
libyuv::FilterMode filtering) {
|
libyuv::FilterMode filtering) {
|
||||||
for (int y = 0; y < dst_height; y += kTileY) {
|
for (int y = 0; y < destination_height; y += kTileY) {
|
||||||
for (int x = 0; x < dst_width; x += kTileX) {
|
for (int x = 0; x < destination_width; x += kTileX) {
|
||||||
int clip_width = kTileX;
|
int clip_width = kTileX;
|
||||||
if (x + clip_width > dst_width) {
|
if (x + clip_width > destination_width) {
|
||||||
clip_width = dst_width - x;
|
clip_width = destination_width - x;
|
||||||
}
|
}
|
||||||
int clip_height = kTileY;
|
int clip_height = kTileY;
|
||||||
if (y + clip_height > dst_height) {
|
if (y + clip_height > destination_height) {
|
||||||
clip_height = dst_height - y;
|
clip_height = destination_height - y;
|
||||||
}
|
}
|
||||||
int r = libyuv::ARGBScaleClip(src_argb, src_stride_argb, src_width,
|
int r = libyuv::ARGBScaleClip(src_argb, src_stride_argb, src_width,
|
||||||
src_height, dst_argb, dst_stride_argb,
|
src_height, dst_argb, dst_stride_argb,
|
||||||
dst_width, dst_height, x, y, clip_width,
|
destination_width, destination_height, x, y,
|
||||||
clip_height, filtering);
|
clip_width, clip_height, filtering);
|
||||||
if (r) {
|
if (r) {
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user