video: driver: fix roi metadata size calculation
lcu_size shouldn't be changed by shift op, it is still needed in alignment calculation. Change-Id: I3c0ebfaee84389926ba3e191d901006065598182 Signed-off-by: Jiajia Cong <quic_jcong@quicinc.com>
Este commit está contenido en:
cometido por
Gerrit - the friendly Code Review server
padre
c43d43d95e
commit
d9fe02d49a
@@ -892,10 +892,11 @@ _yuv_bufcount_min, is_opb, num_vpp_pipes) \
|
||||
#define SIZE_ROI_METADATA_ENC(size_roi, frame_width, frame_height, lcu_size)\
|
||||
do { \
|
||||
HFI_U32 width_in_lcus = 0, height_in_lcus = 0, n_shift = 0; \
|
||||
while (lcu_size && !(lcu_size & 0x1)) { \
|
||||
HFI_U32 n_lcu_size = lcu_size; \
|
||||
while (n_lcu_size && !(n_lcu_size & 0x1)) { \
|
||||
n_shift++; \
|
||||
lcu_size = lcu_size >> 1; \
|
||||
} \
|
||||
n_lcu_size = n_lcu_size >> 1; \
|
||||
} \
|
||||
width_in_lcus = (frame_width + (lcu_size - 1)) >> n_shift; \
|
||||
height_in_lcus = (frame_height + (lcu_size - 1)) >> n_shift; \
|
||||
size_roi = (((width_in_lcus + 7) >> 3) << 3) * \
|
||||
|
@@ -1222,10 +1222,11 @@ _yuv_bufcount_min, is_opb, num_vpp_pipes) \
|
||||
#define SIZE_ROI_METADATA_ENC(size_roi, frame_width, frame_height, lcu_size)\
|
||||
do { \
|
||||
HFI_U32 width_in_lcus = 0, height_in_lcus = 0, n_shift = 0; \
|
||||
while (lcu_size && !(lcu_size & 0x1)) { \
|
||||
HFI_U32 n_lcu_size = lcu_size; \
|
||||
while (n_lcu_size && !(n_lcu_size & 0x1)) { \
|
||||
n_shift++; \
|
||||
lcu_size = lcu_size >> 1; \
|
||||
} \
|
||||
n_lcu_size = n_lcu_size >> 1; \
|
||||
} \
|
||||
width_in_lcus = (frame_width + (lcu_size - 1)) >> n_shift; \
|
||||
height_in_lcus = (frame_height + (lcu_size - 1)) >> n_shift; \
|
||||
size_roi = (((width_in_lcus + 7) >> 3) << 3) * \
|
||||
|
@@ -1222,10 +1222,11 @@ _yuv_bufcount_min, is_opb, num_vpp_pipes) \
|
||||
#define SIZE_ROI_METADATA_ENC(size_roi, frame_width, frame_height, lcu_size)\
|
||||
do { \
|
||||
HFI_U32 width_in_lcus = 0, height_in_lcus = 0, n_shift = 0; \
|
||||
while (lcu_size && !(lcu_size & 0x1)) { \
|
||||
HFI_U32 n_lcu_size = lcu_size; \
|
||||
while (n_lcu_size && !(n_lcu_size & 0x1)) { \
|
||||
n_shift++; \
|
||||
lcu_size = lcu_size >> 1; \
|
||||
} \
|
||||
n_lcu_size = n_lcu_size >> 1; \
|
||||
} \
|
||||
width_in_lcus = (frame_width + (lcu_size - 1)) >> n_shift; \
|
||||
height_in_lcus = (frame_height + (lcu_size - 1)) >> n_shift; \
|
||||
size_roi = (((width_in_lcus + 7) >> 3) << 3) * \
|
||||
|
Referencia en una nueva incidencia
Block a user