Re: [PATCH v3 1/2] media: verisilicon: Simplify motion vectors and rfc buffers allocation
From: Benjamin Gaignard
Date: Thu Apr 30 2026 - 04:20:30 EST
Le 29/04/2026 à 20:11, Nicolas Dufresne a écrit :
Hi Benjamin,
Le vendredi 17 avril 2026 à 06:54 -0400, Frank Li a écrit :
On Wed, Apr 15, 2026 at 04:04:19PM +0200, Benjamin Gaignard wrote:Marking this has Change Requested, as I completely agree with Frank that a split
Until now we reserve the space needed for motion vectors and referenceCan you try split to more small and straight forward patches, for example
frame compression at the end of the frame buffer.
Disentanglement mv and rfc from frame buffers by allocating
distinct buffers for each purpose.
That simplify the code by removing lot of offset computation.
for example create patch just move hantro_h264_mv_size() to header file,
of this giant will help proper review.
I will cut the series in two: one clean up series (which will come after av1 lib series been merged)
and buffer simplification patch after that.
Benjamin
Nicolas
...
+++ b/drivers/media/platform/verisilicon/hantro_hevc.cMove this code style change to new patches.
@@ -44,30 +44,49 @@ dma_addr_t hantro_hevc_get_ref_buf(struct hantro_ctx *ctx,
int i;
/* Find the reference buffer in already known ones */
- for (i = 0; i < NUM_REF_PICTURES; i++) {
+ for (i = 0; i < NUM_REF_PICTURES; i++) {
if (hevc_dec->ref_bufs_poc[i] == poc) {
hevc_dec->ref_bufs_used |= 1 << i;
return hevc_dec->ref_bufs[i].dma;
}
}
-
return 0;
Frank