Changes

Jump to navigation Jump to search
1,985 bytes added ,  17:41, 11 June 2021
Add details about new 12.0.0 opus funcs
Line 739: Line 739:  
|}
 
|}
   −
Official sw can use either software libopus, or hwopus via "nn::codec::HardwareOpus*" (separate from the former).
+
Official sw can use either software libopus, or hwopus (libopus running on the ADSP) via "nn::codec::HardwareOpus*" (separate from the former).
    
== OpenHardwareOpusDecoder ==
 
== OpenHardwareOpusDecoder ==
Line 750: Line 750:  
Takes a type-0x19 input buffer, an u32 '''WorkBufferSize''' and a TransferMemory handle for '''WorkBuffer'''. Returns an [[#IHardwareOpusDecoder]] object. The TransferMemory is created by the user-process with permissions=0.
 
Takes a type-0x19 input buffer, an u32 '''WorkBufferSize''' and a TransferMemory handle for '''WorkBuffer'''. Returns an [[#IHardwareOpusDecoder]] object. The TransferMemory is created by the user-process with permissions=0.
   −
The input buffer is a [[#MultiStreamParameters]] struct. The user-process initializes this struct the same way as [[#GetWorkBufferSizeForMultiStream]], except that an u8-array specified by the user is copied to +0x10 with size '''ChannelCount''', when '''ChannelCount''' above 0.
+
The input buffer is a [[#OpusMultiStreamParameters]] struct. The user-process initializes this struct the same way as [[#GetWorkBufferSizeForMultiStream]], except that an u8-array specified by the user is copied to +0x10 with size '''ChannelCount''', when '''ChannelCount''' above 0.
    
== GetWorkBufferSizeForMultiStream ==
 
== GetWorkBufferSizeForMultiStream ==
 
Takes a type-0x19 input buffer. Returns the u32 required size for the decoder's work buffer. Official user-processes align the output size to page-alignment.
 
Takes a type-0x19 input buffer. Returns the u32 required size for the decoder's work buffer. Official user-processes align the output size to page-alignment.
   −
The input buffer is a [[#MultiStreamParameters]] struct.
+
The input buffer is a [[#OpusMultiStreamParameters]] struct.
 +
 
 +
== OpenHardwareOpusDecoderEx ==
 +
Takes a type-0x19 input buffer, an u32 '''WorkBufferSize''' and a TransferMemory handle for '''WorkBuffer'''. Returns an [[#IHardwareOpusDecoder]] object. The TransferMemory is created by the user-process with permissions=0.
 +
 
 +
The input buffer is a [[#OpusParametersEx]] struct. When ''UseLargeFrameSize'' is 1 a larger output buffer that can store 120ms opus frames is used vs the default of 40ms.
 +
 
 +
== GetWorkBufferSizeEx ==
 +
Takes a type-0x19 input buffer. Returns the u32 required size for the decoder's work buffer. Official user-processes align the output size to page-alignment.
 +
 
 +
The input buffer is a [[#OpusParametersEx]] struct.
 +
 
 +
== OpenHardwareOpusDecoderForMultiStreamEx ==
 +
Takes a type-0x19 input buffer, an u32 '''WorkBufferSize''' and a TransferMemory handle for '''WorkBuffer'''. Returns an [[#IHardwareOpusDecoder]] object. The TransferMemory is created by the user-process with permissions=0.
 +
 
 +
The input buffer is a [[#OpusMultiStreamParametersEx]] struct. When ''UseLargeFrameSize'' is 1 a larger output buffer that can store 120ms opus frames is used vs the default of 40ms.
 +
 
 +
== GetWorkBufferSizeForMultiStreamEx ==
 +
Takes a type-0x19 input buffer. Returns the u32 required size for the decoder's work buffer. Official user-processes align the output size to page-alignment.
 +
 
 +
The input buffer is a [[#OpusMultiStreamParametersEx]] struct.
    
== IHardwareOpusDecoder ==
 
== IHardwareOpusDecoder ==
Line 1,225: Line 1,245:  
|}
 
|}
   −
= MultiStreamParameters =
+
= OpusParametersEx =
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0
 +
| 0x4
 +
| SampleRate
 +
|-
 +
| 0x4
 +
| 0x4
 +
| ChannelCount
 +
|-
 +
| 0x8
 +
| 0x4
 +
| UseLargeFrameSize
 +
|-
 +
| 0xC
 +
| 0x4
 +
| Padding
 +
|}
 +
 
 +
= OpusMultiStreamParameters =
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0
 +
| 0x4
 +
| SampleRate
 +
|-
 +
| 0x4
 +
| 0x4
 +
| ChannelCount
 +
|-
 +
| 0x8
 +
| 0x4
 +
| Number of streams
 +
|-
 +
| 0xC
 +
| 0x4
 +
| Number of stereo streams
 +
|-
 +
| 0x10
 +
| 0x100
 +
| u8 array of channel mappings
 +
|}
 +
 
 +
= OpusMultiStreamParametersEx =
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 1,249: Line 1,321:  
|-
 
|-
 
| 0x10
 
| 0x10
 +
| 0x4
 +
| UseLargeFrameSize
 +
|-
 +
| 0x14
 +
| 0x4
 +
| Padding
 +
|-
 +
| 0x18
 
| 0x100
 
| 0x100
 
| u8 array of channel mappings
 
| u8 array of channel mappings
13

edits

Navigation menu