Browse Source

avcodec/clearvideo: fix mixed code and declarations

Signed-off-by: James Almer <jamrial@gmail.com>
tags/n4.0
James Almer 8 years ago
parent
commit
fefe47b701
1 changed files with 5 additions and 4 deletions
  1. +5
    -4
      libavcodec/clearvideo.c

+ 5
- 4
libavcodec/clearvideo.c View File

@@ -296,6 +296,7 @@ static int copyadd_block(AVCodecContext *avctx, AVFrame *dst, AVFrame *src,
static MV mvi_predict(MVInfo *mvi, int mb_x, int mb_y, MV diff)
{
MV res, pred_mv;
int left_mv, right_mv, top_mv, bot_mv;

if (mvi->top) {
if (mb_x > 0) {
@@ -315,16 +316,16 @@ static MV mvi_predict(MVInfo *mvi, int mb_x, int mb_y, MV diff)

res = pred_mv;

int left_mv = -((mb_x * mvi->mb_size));
int right_mv = ((mvi->mb_w - mb_x - 1) * mvi->mb_size);
left_mv = -((mb_x * mvi->mb_size));
right_mv = ((mvi->mb_w - mb_x - 1) * mvi->mb_size);
if (res.x < left_mv) {
res.x = left_mv;
}
if (res.x > right_mv) {
res.x = right_mv;
}
int top_mv = -((mb_y * mvi->mb_size));
int bot_mv = ((mvi->mb_h - mb_y - 1) * mvi->mb_size);
top_mv = -((mb_y * mvi->mb_size));
bot_mv = ((mvi->mb_h - mb_y - 1) * mvi->mb_size);
if (res.y < top_mv) {
res.y = top_mv;
}


Loading…
Cancel
Save