mdoe
Posts: 8
Joined: Tue Sep 06, 2016 2:49 pm

OMX_VIDEO_PARAM_QUANTIZATIONTYPE

Thu Sep 22, 2016 6:07 pm

I was wondering if anyone is able to tell me if OMX_VIDEO_PARAM_QUANTIZATIONTYPE is available to use with AVC encoding? I gather from snippets on other forums that with rate control disabled, OMX_IndexParamVideoQuantization can be used for QpI and QpP , but before I went down that road, knowing that some options aren't available, I thought I'd ask as I can't find anything definitive.

Thanks!

M

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6424
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: OMX_VIDEO_PARAM_QUANTIZATIONTYPE

Thu Sep 22, 2016 8:21 pm

It looks like it is supported by video_encode.
Do note in the docs (raw, or pretty versions).
Query / set the quantization parameters for P and I frames. Only used if rate control has been disabled.
It will reject the parameter if nQpB is != 0.

Despite being called a param, OMX_IndexParamBrcmVideoEncodeQpP appears to be settable dynamically to vary QpP. Likewise OMX_IndexParamBrcmVideoInitialQuant for QpI.
They all affect the same internal structure, just that the those two will also poke the codec if it is opened.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

mdoe
Posts: 8
Joined: Tue Sep 06, 2016 2:49 pm

Re: OMX_VIDEO_PARAM_QUANTIZATIONTYPE

Fri Sep 23, 2016 7:53 am

Thanks 6by9 :D

Can I bounce an idea off you please? I've been playing with the quantization parameters in Intels Quicksync hardware encoder, I found that depending on source input you can more or less constrain the resulting bitrate of the output stream. That is, when you know what type of input (action/still) you have, you set the Q accordingly and you tend to get a consistent bit rate over the duration. Variable, but within a comfortable average range.

My thought was that I could tweak the quantization when encoding with the Rpi to better constrain output, as sometimes it runs away with the bitrate causing huge stream killing spikes, which I assume is down to some default Q setting in the variable bitrate.

Does that sound reasonable?

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6424
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: OMX_VIDEO_PARAM_QUANTIZATIONTYPE

Fri Sep 23, 2016 7:30 pm

It sounds possible, but not something I could say how well it would work.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

Return to “OpenMAX”