Commit 77853e56 authored by Urvang Joshi's avatar Urvang Joshi
Browse files

Remove some useless casts

Cherry-picked from aomedia/master: 6796e7f1

Change-Id: I8af087d97cadb0c2a9e37a4e4723246cdd397995
parent d71a231c
......@@ -828,7 +828,7 @@ static aom_codec_err_t ctrl_set_reference(aom_codec_alg_priv_t *ctx,
static aom_codec_err_t ctrl_copy_reference(aom_codec_alg_priv_t *ctx,
va_list args) {
aom_ref_frame_t *data = va_arg(args, aom_ref_frame_t *);
const aom_ref_frame_t *const frame = va_arg(args, aom_ref_frame_t *);
// Only support this function in serial decode.
if (ctx->frame_parallel_decode) {
......@@ -836,8 +836,7 @@ static aom_codec_err_t ctrl_copy_reference(aom_codec_alg_priv_t *ctx,
return AOM_CODEC_INCAPABLE;
}
if (data) {
aom_ref_frame_t *frame = (aom_ref_frame_t *)data;
if (frame) {
YV12_BUFFER_CONFIG sd;
AVxWorker *const worker = ctx->frame_workers;
FrameWorkerData *const frame_worker_data = (FrameWorkerData *)worker->data1;
......
......@@ -101,8 +101,7 @@ static uint32_t variance_ref(const uint8_t *src, const uint8_t *ref, int l2w,
}
RoundHighBitDepth(bit_depth, &se, &sse);
*sse_ptr = static_cast<uint32_t>(sse);
return static_cast<uint32_t>(
sse - ((static_cast<int64_t>(se) * se) >> (l2w + l2h)));
return static_cast<uint32_t>(sse - ((se * se) >> (l2w + l2h)));
}
/* The subpel reference functions differ from the codec version in one aspect:
......@@ -157,8 +156,7 @@ static uint32_t subpel_variance_ref(const uint8_t *ref, const uint8_t *src,
}
RoundHighBitDepth(bit_depth, &se, &sse);
*sse_ptr = static_cast<uint32_t>(sse);
return static_cast<uint32_t>(
sse - ((static_cast<int64_t>(se) * se) >> (l2w + l2h)));
return static_cast<uint32_t>(sse - ((se * se) >> (l2w + l2h)));
}
static uint32_t subpel_avg_variance_ref(const uint8_t *ref, const uint8_t *src,
......@@ -211,8 +209,7 @@ static uint32_t subpel_avg_variance_ref(const uint8_t *ref, const uint8_t *src,
}
RoundHighBitDepth(bit_depth, &se, &sse);
*sse_ptr = static_cast<uint32_t>(sse);
return static_cast<uint32_t>(
sse - ((static_cast<int64_t>(se) * se) >> (l2w + l2h)));
return static_cast<uint32_t>(sse - ((se * se) >> (l2w + l2h)));
}
////////////////////////////////////////////////////////////////////////////////
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment