mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-16 04:04:06 +00:00
Media:wave5: Fix stride mismatching of decoding frame buffers
When bitstream format bitdepth > 8, stride of compressed frame map buffers shoule be recalculated. Signed-off-by: Som Qin <som.qin@starfivetech.com>
This commit is contained in:
parent
8c7f588b6f
commit
1466d94316
1 changed files with 8 additions and 1 deletions
|
@ -958,7 +958,14 @@ static int wave5_vpu_dec_queue_setup(struct vb2_queue *q, unsigned int *num_buff
|
|||
struct frame_buffer *frame = &inst->frame_buf[i];
|
||||
struct vpu_buf *vframe = &inst->frame_vbuf[i];
|
||||
|
||||
fb_stride = inst->dst_fmt.width;
|
||||
if (inst->codec_info->dec_info.initial_info.luma_bitdepth > 8 ||
|
||||
inst->codec_info->dec_info.initial_info.chroma_bitdepth > 8) {
|
||||
fb_stride = ALIGN(ALIGN(inst->dst_fmt.width, 16) * 5, 32) / 4;
|
||||
fb_stride = ALIGN(fb_stride, 32);
|
||||
} else {
|
||||
fb_stride = inst->dst_fmt.width;
|
||||
}
|
||||
|
||||
fb_height = ALIGN(inst->dst_fmt.height, 32);
|
||||
luma_size = fb_stride * fb_height;
|
||||
chroma_size = ALIGN(fb_stride / 2, 16) * fb_height;
|
||||
|
|
Loading…
Add table
Reference in a new issue