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

staging: bcm2835-codec: remove unnecessary padding on encoder input #3179

Merged
merged 1 commit into from
Aug 27, 2019

Conversation

tmm1
Copy link

@tmm1 tmm1 commented Aug 23, 2019

The ISP and ENCODE roles have the same underlying hardware. Neither requires vertical alignment.

Originally pointed out by @6by9 in tmm1/FFmpeg@55380ac#r34807642

Actually the encoder has to internally format convert the buffer for the hardware, so I'm not sure that there actually is a height alignment requirement. There isn't for the ISP role, and the format convert is being done by the same hardware.

See https://github.com/raspberrypi/linux/blob/rpi-4.19.y/drivers/staging/vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c#L1052. I'm suspecting that things should still be happy with if (ctx->dev->role == DECODE)

I tested this and it works as expected.

The ISP and ENCODE roles have the same underlying hardware. Neither requires vertical alignment.

Signed-off-by: Aman Gupta <[email protected]>
@6by9
Copy link
Contributor

6by9 commented Aug 24, 2019

I've not confirmed it for myself, but this was what I was expecting was the case.

Could you just confirm that your tests were with resolutions that were not naturally a multiple of 16 high?

@tmm1
Copy link
Author

tmm1 commented Aug 24, 2019

Yes my tests were with height=1080 and I confirmed that before this change I needed to realign my input to generate correct encoded output.

IIUC, without this change you can't take the output from ISP and feed it directly to ENCODE

@tmm1
Copy link
Author

tmm1 commented Aug 24, 2019

IIUC, without this change you can't take the output from ISP and feed it directly to ENCODE

Well, only if the ISP was generating video sizes that were not multiples of 16

Just to be sure I tried another simple test without ISP, encoding 1920x1080 frames directly and confirmed they work with this change.

@tmm1
Copy link
Author

tmm1 commented Aug 26, 2019

cc @popcornmix and @pelwell for review as well

Copy link
Contributor

@6by9 6by9 left a comment

Choose a reason for hiding this comment

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

On the basis of your testing, approved.

@popcornmix popcornmix merged commit 7241f53 into raspberrypi:rpi-4.19.y Aug 27, 2019
popcornmix added a commit to raspberrypi/firmware that referenced this pull request Aug 28, 2019
kernel: watchdog: bcm2835_wdt: Fix module autoload
See: raspberrypi/linux#3187

kernel: staging: bcm2835-codec: remove unnecessary padding on encoder input
See: raspberrypi/linux#3179

kernel: staging: bcm2835-codec: add support for V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME
See: raspberrypi/linux#3175

firmware: AWB: Fix for manual WB settings in capture
See: #1215
popcornmix added a commit to Hexxeh/rpi-firmware that referenced this pull request Aug 28, 2019
kernel: watchdog: bcm2835_wdt: Fix module autoload
See: raspberrypi/linux#3187

kernel: staging: bcm2835-codec: remove unnecessary padding on encoder input
See: raspberrypi/linux#3179

kernel: staging: bcm2835-codec: add support for V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME
See: raspberrypi/linux#3175

firmware: AWB: Fix for manual WB settings in capture
See: raspberrypi/firmware#1215
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants