[hal_vepu_v2]: Fix vepu hor_stride setup

vepu h264 input stride must be aligned to 8 for vepu limitation.
If it is not 8 aligned some buffer conversion preprocess should be done
before the buffer is sent encoder.

1. The hor_stride in vepu hardware is in pixel unit not byte unit.
2. The hor_stride in vepu must be 8 pixels aligned.
3. The YUV420P should be 16 pixels aligned for chroma.
4. Fix log print when hor_stride != width 8align

Change-Id: If30136a4673399c3be40a41a055e832db4c321d5
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
This commit is contained in:
sayon.chen
2020-08-26 15:17:24 +08:00
committed by Herman Chen
parent a4cbfd54fa
commit c0fef41211
9 changed files with 59 additions and 30 deletions

View File

@@ -527,7 +527,7 @@ MPP_RET fill_image(RK_U8 *buf, RK_U32 width, RK_U32 height,
p[x + 0] = i + y + frame_count * 3;
p[x + 1] = 128 + i + frame_count * 2;
p[x + 2] = 64 + i + frame_count * 5;
p[x + 3] = 0;
p[x + 3] = i + y / 2 + frame_count * 3;
}
}
} break;