[PATCH v3 1/2] media: verisilicon: Simplify motion vectors and rfc buffers allocation

Benjamin Gaignard benjamin.gaignard at collabora.com
Thu Apr 30 01:20:06 PDT 2026


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:
>>> Until now we reserve the space needed for motion vectors and reference
>>> 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.
>> Can you try split to more small and straight forward patches, for example
>>
>> for example create patch just move hantro_h264_mv_size() to header file,
> Marking this has Change Requested, as I completely agree with Frank that a split
> 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.c
>>> @@ -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;
>> Move this code style change to new patches.
>>
>> Frank



More information about the Linux-rockchip mailing list