Skip to content

Remove hard-coded H264 capture buffer size (AEGHB-1259) #42

@try-except

Description

@try-except

Checklist

  • Checked the issue tracker for similar issues to ensure this is not a duplicate.
  • Described the feature in detail and justified the reason for the request.
  • Provided specific use cases and examples.

Feature description

Currently, the h264_video_set_format function sets the size of all capture buffers to width * height * 8 / 2, which corresponds to a worst case scenario of 32 bpp. This code ignores the sizeimage field when requesting buffers and results in low capture buffer count.

Use cases

This would be very useful for 1080p@30fps live encoding on the P4 SoC, since currently this chips include at most 32 MB of PSRAM, which fills quickly when using it for MIPI CSI and H264 capture buffers. Being able to allocate more than 2 buffers for the encoder would ease this process a lot.

Alternatives

One alternative is to allocate the buffers myself and use MEMORY_USER_PTR for the codec, but this means that I myself have to manage the ownership of the buffers.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions