MC3302_SDK_V1.1.9_202507281.../media/sample/system/ipon/common.h
2025-11-11 12:08:31 +08:00

86 lines
2.3 KiB
C
Executable File

#ifndef __IPO_TEST_COMMON_H__
#define __IPO_TEST_COMMON_H__
/*================================================================================*/
/* defines */
#ifndef __maybe_unused
#define __maybe_unused __attribute__((unused))
#endif
#ifndef __always_unused
#define __always_unused __attribute__((unused))
#endif
#define ALIGNTO(x, iAlign) ( (((unsigned int)(x)) + (iAlign) - 1) & (~((iAlign) - 1)) )
/*================================================================================*/
/* debug macro */
#define IPO_DEBUG
#ifdef IPO_DEBUG
#define IPO_LOG_PRT(msg, ...) \
do {\
printf("[%s:%d]: " msg "\n", __func__, __LINE__, ##__VA_ARGS__); \
}while(0)
#else
#define IPO_LOG_PRT(msg, ...) do{}while(0)
#endif
#define IPO_LOG_CHECK(cond, msg, ...) \
if(cond) { \
printf("[%s:%d]: " msg "\n", __func__, __LINE__, ##__VA_ARGS__); \
} \
#define IPO_LOG_CHECK_GOTO(cond, label, msg, ...) \
if(cond) { \
printf("[%s:%d]: " msg "\n", __func__, __LINE__, ##__VA_ARGS__); \
goto label; \
} \
/*================================================================================*/
/* functions */
/* common */
MEM_DESC* ipo_alloc_buffer(int size, int align, const char* name);
int ipo_free_all_buffer();
/* vpu */
int vpu_group_init_by_config(const char* node);
int vpu_test_init();
int vpu_test_exit();
int vpu_test_case(int test_case);
int vpu_update_gosd(int grpid, int chn, int index);
void vpu_send_offline_pic(void* param);
int vpu_test_case_format();
void vpu_test_channels(void *param);
/* vou */
typedef enum sample_vo_mode_e
{
VO_MODE_1MUX = 0,
VO_MODE_4MUX = 1,
VO_MODE_9MUX = 2,
VO_MODE_16MUX = 3,
VO_MODE_1B_5S = 4,
VO_MODE_1B_7S = 5,
VO_MODE_1L_1R = 6,
VO_MODE_25MUX = 7,
VO_MODE_36MUX = 8,
VO_MODE_4T_4B = 9,
VO_MODE_49MUX = 10,
VO_MODE_64MUX = 11,
VO_MODE_BUTT
}SAMPLE_VO_MODE_E;
FH_SINT32 vo_test_init(int bIsHD, /* VO_INTF_SYNC_E */ int enIntf);
FH_SINT32 vo_test_exit(FH_BOOL bIsHD);
int vo_test_startlayer(int layer, int enMode);
//jpeg
int jpege_test(int tcase);
#endif// __IPO_TEST_COMMON_H__