H.264 Codec for ESP32-S3
Loading...
Searching...
No Matches
Classes | Macros | Enumerations
esp_h264_types.h File Reference
#include <stdint.h>
#include <stdbool.h>
Include dependency graph for esp_h264_types.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  esp_h264_pkt_t
 H.264 Data packet. More...
 
struct  esp_h264_resolution_t
 Picture resolution In the case of a certain display resolution, the smaller the display, the clearer the picture On the contrary, when the display size is fixed, the higher the display resolution, the clearer the picture. More...
 
struct  esp_h264_enc_rc_t
 Rate control(RC) parameter The size of the output stream approaching the target stream is controlled by using the optimal quantization parameter for each macroblock. More...
 
struct  esp_h264_enc_cfg_t
 Encoder configure information. More...
 
struct  esp_h264_enc_out_frame_t
 Data stream information after encoding. More...
 
struct  esp_h264_enc_in_frame_t
 Data stream information before encoding. More...
 
struct  esp_h264_dec_out_frame_t
 Data stream information after encoding. More...
 
struct  esp_h264_dec_in_frame_t
 Data stream information before encoding. More...
 

Macros

#define ESP_H264_QP_MAX   (51) /*<! H264 support maximum quantization parameter (QP) */
 
#define ESP_H264_4CC(a, b, c, d)   ((uint32_t)(a) | ((uint32_t)(b) << 8) | ((uint32_t)(c) << 16) | ((uint32_t)(d) << 24))
 
#define ESP_H264_GET_BPP_BY_PIC_TYPE(pic_type)
 Get bytes per pixel (BPP) by picture type.
 
#define ESP_H264_HW_IS_SUPPORTED_PIC_TYPE(pic_type)    ((pic_type) == ESP_H264_RAW_FMT_O_UYY_E_VYY)
 Check if picture type is supported by hardware (HW Version 3)
 

Enumerations

enum  esp_h264_err_t {
  ESP_H264_ERR_OK = 0 , ESP_H264_ERR_FAIL = -1 , ESP_H264_ERR_ARG = -2 , ESP_H264_ERR_MEM = -3 ,
  ESP_H264_ERR_UNSUPPORTED = -5 , ESP_H264_ERR_TIMEOUT = -6 , ESP_H264_ERR_OVERFLOW = -7
}
 The given code snippet defines a structure called esp_h264_err_t It is an enumeration that represents different error codes for H.264 video encoding operations. More...
 
enum  esp_h264_raw_format_t {
  ESP_H264_RAW_FMT_BGR888 = ((uint32_t)( 'B' ) | ((uint32_t)( 'G' ) << 8) | ((uint32_t)( 'R' ) << 16) | ((uint32_t)( '3' ) << 24)) , ESP_H264_RAW_FMT_RGB565_LE = ((uint32_t)( 'R' ) | ((uint32_t)( 'G' ) << 8) | ((uint32_t)( 'B' ) << 16) | ((uint32_t)( 'L' ) << 24)) , ESP_H264_RAW_FMT_VUY = ((uint32_t)( 'Y' ) | ((uint32_t)( '3' ) << 8) | ((uint32_t)( '0' ) << 16) | ((uint32_t)( '8' ) << 24)) , ESP_H264_RAW_FMT_UYVY = ((uint32_t)( 'U' ) | ((uint32_t)( 'Y' ) << 8) | ((uint32_t)( 'V' ) << 16) | ((uint32_t)( 'Y' ) << 24)) ,
  ESP_H264_RAW_FMT_YUYV = ((uint32_t)( 'Y' ) | ((uint32_t)( 'U' ) << 8) | ((uint32_t)( 'Y' ) << 16) | ((uint32_t)( 'V' ) << 24)) , ESP_H264_RAW_FMT_I420 = ((uint32_t)( 'Y' ) | ((uint32_t)( 'U' ) << 8) | ((uint32_t)( '1' ) << 16) | ((uint32_t)( '2' ) << 24)) , ESP_H264_RAW_FMT_O_UYY_E_VYY = ((uint32_t)( 'O' ) | ((uint32_t)( 'U' ) << 8) | ((uint32_t)( 'E' ) << 16) | ((uint32_t)( 'V' ) << 24))
}
 This is an unencoded data format. More...
 
enum  esp_h264_frame_type_t { ESP_H264_FRAME_TYPE_INVALID = -1 , ESP_H264_FRAME_TYPE_IDR = 0 , ESP_H264_FRAME_TYPE_I = 1 , ESP_H264_FRAME_TYPE_P = 2 }
 Enumerate video frame type. More...
 

Macro Definition Documentation

◆ ESP_H264_4CC

#define ESP_H264_4CC (   a,
  b,
  c,
 
)    ((uint32_t)(a) | ((uint32_t)(b) << 8) | ((uint32_t)(c) << 16) | ((uint32_t)(d) << 24))

◆ ESP_H264_GET_BPP_BY_PIC_TYPE

#define ESP_H264_GET_BPP_BY_PIC_TYPE (   pic_type)
Value:
((pic_type) == ESP_H264_RAW_FMT_I420 || (pic_type) == ESP_H264_RAW_FMT_O_UYY_E_VYY ? 1.5f : \
(pic_type) == ESP_H264_RAW_FMT_RGB565_LE || (pic_type) == ESP_H264_RAW_FMT_UYVY || (pic_type) == ESP_H264_RAW_FMT_YUYV ? 2.0f : \
3.0f)
@ ESP_H264_RAW_FMT_I420
Definition: esp_h264_types.h:61
@ ESP_H264_RAW_FMT_O_UYY_E_VYY
Definition: esp_h264_types.h:62
@ ESP_H264_RAW_FMT_YUYV
Definition: esp_h264_types.h:60
@ ESP_H264_RAW_FMT_UYVY
Definition: esp_h264_types.h:59
@ ESP_H264_RAW_FMT_RGB565_LE
Definition: esp_h264_types.h:57

Get bytes per pixel (BPP) by picture type.

Parameters
pic_typePicture format type
Returns
Bytes per pixel value

◆ ESP_H264_HW_IS_SUPPORTED_PIC_TYPE

#define ESP_H264_HW_IS_SUPPORTED_PIC_TYPE (   pic_type)     ((pic_type) == ESP_H264_RAW_FMT_O_UYY_E_VYY)

Check if picture type is supported by hardware (HW Version 3)

Note
HW Version 3 only supports ESP_H264_RAW_FMT_O_UYY_E_VYY format
Parameters
pic_typePicture format type to check
Returns
true if supported, false otherwise

◆ ESP_H264_QP_MAX

#define ESP_H264_QP_MAX   (51) /*<! H264 support maximum quantization parameter (QP) */

Enumeration Type Documentation

◆ esp_h264_err_t

The given code snippet defines a structure called esp_h264_err_t It is an enumeration that represents different error codes for H.264 video encoding operations.

Enumerator
ESP_H264_ERR_OK 
ESP_H264_ERR_FAIL 
ESP_H264_ERR_ARG 
ESP_H264_ERR_MEM 
ESP_H264_ERR_UNSUPPORTED 
ESP_H264_ERR_TIMEOUT 
ESP_H264_ERR_OVERFLOW 

◆ esp_h264_frame_type_t

Enumerate video frame type.

Enumerator
ESP_H264_FRAME_TYPE_INVALID 
ESP_H264_FRAME_TYPE_IDR 
ESP_H264_FRAME_TYPE_I 
ESP_H264_FRAME_TYPE_P 

◆ esp_h264_raw_format_t

This is an unencoded data format.

Note
|----------------------------—|-----------—|-----------—|-----------—|
enum SW encoder HW encoder SW decoder
ESP_H264_RAW_FMT_BGR888 un-supported supported un-supported
----------------------------— -----------— -----------— -----------—
ESP_H264_RAW_FMT_RGB565_LE un-supported supported un-supported
----------------------------— -----------— -----------— -----------—
ESP_H264_RAW_FMT_VUY un-supported supported un-supported
----------------------------— -----------— -----------— -----------—
ESP_H264_RAW_FMT_UYVY un-supported supported un-supported
----------------------------— -----------— -----------— -----------—
ESP_H264_RAW_FMT_YUYV supported un-supported un-supported
----------------------------— -----------— -----------— -----------—
ESP_H264_RAW_FMT_I420 supported un-supported supported
----------------------------— -----------— -----------— -----------—
ESP_H264_RAW_FMT_O_UYY_E_VYY un-supported supported un-supported
----------------------------— -----------— -----------— -----------—
Enumerator
ESP_H264_RAW_FMT_BGR888 
ESP_H264_RAW_FMT_RGB565_LE 
ESP_H264_RAW_FMT_VUY 
ESP_H264_RAW_FMT_UYVY 
ESP_H264_RAW_FMT_YUYV 
ESP_H264_RAW_FMT_I420 
ESP_H264_RAW_FMT_O_UYY_E_VYY