目录

GetFormatFromSub

Function Description

Obtains the actual format based on the input primary format and sub-format.

The actual format is 4-byte long. The higher 4 bits of the first byte are reserved, and the lower 4 bits are c0 format. The second and third bytes describe the sub-format, and the fourth byte describes the primary format, as shown in the following:

/*

* ---------------------------------------------------

* | 4 bits | 4bits | 2 bytes | 1 byte |

* |------------|-------------|----------------|--------|

* | reserved | c0 -format | sub-format | format |

* ---------------------------------------------------

*/

Function Prototype

inline int32_t GetFormatFromSub(int32_t primary_format, int32_t sub_format)

Parameters

Parameter Input/Output Description
primary_format Input Primary format information. Must be within 0xffU.
sub_format Input Sub-format information. Must be within 0xffffU.

Return Value

Actual format corresponding to the specified primary format and sub format.

Exception Handling

None

Restrictions

None