Commit b77e26b2 authored by Wan-Teh Chang's avatar Wan-Teh Chang Committed by Michael Niedermayer

avcodec/hevcdec: hevc_await_progress: declare |y| only if used.

hevc_await_progress() uses the variable |y| only inside the "if" block.
So |y| only needs to be declared and initialized in that block.
Signed-off-by: 's avatarWan-Teh Chang <wtc@google.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent ea1ca17b
...@@ -1684,10 +1684,11 @@ static void chroma_mc_bi(HEVCContext *s, uint8_t *dst0, ptrdiff_t dststride, AVF ...@@ -1684,10 +1684,11 @@ static void chroma_mc_bi(HEVCContext *s, uint8_t *dst0, ptrdiff_t dststride, AVF
static void hevc_await_progress(HEVCContext *s, HEVCFrame *ref, static void hevc_await_progress(HEVCContext *s, HEVCFrame *ref,
const Mv *mv, int y0, int height) const Mv *mv, int y0, int height)
{ {
int y = FFMAX(0, (mv->y >> 2) + y0 + height + 9); if (s->threads_type == FF_THREAD_FRAME ) {
int y = FFMAX(0, (mv->y >> 2) + y0 + height + 9);
if (s->threads_type == FF_THREAD_FRAME )
ff_thread_await_progress(&ref->tf, y, 0); ff_thread_await_progress(&ref->tf, y, 0);
}
} }
static void hevc_luma_mv_mvp_mode(HEVCContext *s, int x0, int y0, int nPbW, static void hevc_luma_mv_mvp_mode(HEVCContext *s, int x0, int y0, int nPbW,
......
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