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

changing h264 encoder level with openmax hangup #250

Closed
xlazom00 opened this issue Jan 26, 2014 · 10 comments
Closed

changing h264 encoder level with openmax hangup #250

xlazom00 opened this issue Jan 26, 2014 · 10 comments

Comments

@xlazom00
Copy link

Add this to encoder example
and if change to unsupported h264 level openmax api hang up.
And sometimes I can't init openmax again.

OMX_VIDEO_PARAM_PROFILELEVELTYPE profileLevelType;
memset(&profileLevelType, 0, sizeof(OMX_VIDEO_PARAM_PROFILELEVELTYPE));
profileLevelType.nSize = sizeof(OMX_VIDEO_PARAM_PROFILELEVELTYPE);
profileLevelType.nVersion.nVersion = OMX_VERSION;
profileLevelType.eProfile = OMX_VIDEO_AVCProfileMain;
profileLevelType.eLevel = OMX_VIDEO_AVCLevel2;
profileLevelType.nPortIndex = 201;
r = OMX_SetParameter(ILC_GET_HANDLE(video_encode),
OMX_IndexParamVideoProfileLevelCurrent, &profileLevelType);
if (r != OMX_ErrorNone) {
printf
("%s:%d: OMX_SetParameter() for bitrate for video_encode port 201 failed with %x!\n",
FUNCTION, LINE, r);
exit(1);
}

@popcornmix
Copy link
Contributor

Can you produce a modifiled hello_encode example that shows the lockup?

@xlazom00
Copy link
Author

http://pastebin.com/LFuBJjRS

just change eLevel couple times 4->3->2 ,...
profileLevelType.eLevel = OMX_VIDEO_AVCLevel2

btw
Broadcom provide peaty much same SOC in some android phones.
I don't understand why OpenMAX api don't work on 99.9%.
They use openmax for camera encoding right ?
Or Broadcom do source code branch for every soc they have.

@xlazom00
Copy link
Author

Are H264 levels really supported ?.

@xlazom00
Copy link
Author

another combination that hangup
http://pastebin.com/dVUDT88s

constant bitrate + high profile

@Ruffio
Copy link

Ruffio commented Jun 24, 2015

@xlazom00 is this still an issue?

@popcornmix
Copy link
Contributor

Pretty sure this is fixed. @xlazom00 can you reproduce?

@xlazom00
Copy link
Author

I just run both of my examples and no it isn't working

@6by9
Copy link

6by9 commented Jun 24, 2015

CBR and CABAC together are not supported, so that is why CBR and high profile will fail.
The GPU lockup should have been fixed a while back - where exactly does your test fail?

@6by9
Copy link

6by9 commented Jun 24, 2015

Ack that it shouldn't lock up (for some reason it is retrying over and over) - IL wasn't used for about the last 3 years on production devices in favour of MMAL.
The reason for the failure is that you've asked for Level 2 when you're encoding at 640x360@30. Level 2 maxes out at 352×288@30.0. Level 3 or above works fine.
As above, CBR and CABAC is not supported, and that will get stuck in the same loop.

I'm not going to investigate further for a fix, as it is only an issue if the client is being stupid. I believe all is good under MMAL and it will throw the correct error.

@Ruffio
Copy link

Ruffio commented Mar 24, 2016

@6by9, @popcornmix shouldn't this issue be closed?

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

No branches or pull requests

4 participants