Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transmission of the actual image size #61

Draft
wants to merge 1 commit into
base: celadon/u/mr0/master
Choose a base branch
from

Conversation

weichenli-intel
Copy link

@weichenli-intel weichenli-intel commented Oct 17, 2024

Formats such as MJPEG, the data size does not necessarily match thei frame size.

This patch enhances the capability to transmit the actual size.

Tracked-On: OAM-126506

@sysopenci
Copy link

Improper Commit Message
Valid Commit Message
Improper Jira Status,
jira status not in ['In Progress','Implemented']

Formats such as MJPEG, the data size does not necessarily match thei
frame size.

This patch enhances the capability to transmit the actual size.

Tracked-On: OAM-126506
Signed-off-by: Chenli Wei <[email protected]>
@@ -157,6 +157,7 @@ static void virtio_camera_control_ack(struct virtqueue *vq)
vbuf->sequence = req->resp.u.buffer.sequence;
vbuf->vb2_buf.timestamp = req->resp.u.buffer.timestamp;
vbuf->planes[0].bytesused = req->resp.u.format.size.sizeimage;
req->vb->planes[0].bytesused = req->resp.u.format.size.sizeimage;
Copy link

@6ZhangWei 6ZhangWei Oct 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think line159 is enough to provide the bytesused for userspace.
Do you verify the android image released in this week or last week. It should work.

buffer info in this struct can be seen from userspace.
struct vb2_v4l2_buffer {
struct vb2_buffer vb2_buf;
__u32 flags;
__u32 field;
struct v4l2_timecode timecode;
__u32 sequence;
__s32 request_fd;
bool is_held;
struct vb2_plane planes[VB2_MAX_PLANES];
__u32 reserved;
ANDROID_KABI_RESERVE(1);
};

@weichenli-intel weichenli-intel marked this pull request as draft October 18, 2024 09:35
Copy link
Contributor

@xyzhao2018 xyzhao2018 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have sync with Chenli, he will double confirm whether the update is needed.
So, update the PR into draft firstly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Engineering Build Not Started Engineering Build Not Started Pending Developer Approval Pending Developer Approval Pending PR Review Pending PR Review Valid commit message
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants