123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219 |
- #ifndef _OSDCONFIG_H
- #define _OSDCONFIG_H
- #define HV_PROJECT_CONFIG_OSD_SCALER HV_CONFIG_OFF
- #define HV_PROJECT_CONFIG_OSD_GRAPHIC HV_CONFIG_OFF
- #define HV_PROJECT_CONFIG_OSD_DDRPATH HV_CONFIG_OFF
- #define HV_PROJECT_CONFIG_OSD_ROTATION HV_CONFIG_ON
- #define HV_PROJECT_CONFIG_OSD_LOGO_ROTATION HV_CONFIG_OFF
- #define HV_PROJECT_CONFIG_OSD_KEY_ROTATION HV_CONFIG_OFF
- #define HV_PROJECT_CONFIG_OSD_FORCE_REDRAW_ALL HV_CONFIG_OFF
- #define HV_PROJECT_CONFIG_OSD_FORCE_MULTIFRAME_DRAW HV_CONFIG_OFF
- #define HV_PROJECT_CONFIG_OSD_ANIMITION_SUPPORT HV_CONFIG_OFF
- #define HV_PROJECT_CONFIG_OSD_LOGO_INCODE HV_CONFIG_OFF
- #define HV_PROJECT_CONFIG_OSD_LOGO_EFFECT HV_CONFIG_ON
- #define HV_PROJECT_CONFIG_OSD_LOGO_USE_SCENE HV_CONFIG_OFF
- #define HV_PROJECT_CONFIG_OSD_CUSTOM_GROUP_SUPPORT HV_CONFIG_OFF
- #define HV_PROJECT_CONFIG_OSD_CPU_CANVAS_SUPPORT HV_CONFIG_ON
- #define HV_PROJECT_CONFIG_OSD_BIGFONT_SUPPORT HV_CONFIG_ON
- #if (HV_PROJECT_CONFIG_OSD_CPU_CANVAS_SUPPORT == HV_CONFIG_ON)
- #define OSD_CANVAS_WAVE_POINT_CNT (110)
- #define OSD_CANVAS_WAVE_FRAMERATE_MIN (30)
- #define OSD_CANVAS_WAVE_FRAMERATE_MAX (180)
- #endif
- /* Rotate type define */
- #define OSD_ROTATE_FOLLOW_SCREEN (0)
- #define OSD_ROTATE_MENU_IN_PLACE (1)
- #define OSD_ROTATE_IN_PLACE_ALL (2)
- #define HV_PROJECT_CONFIG_OSD_ROTATION_TYPE OSD_ROTATE_FOLLOW_SCREEN
- /* Enable wrap text */
- #define HV_PROJECT_CONFIG_OSD_TEXT_WRAPPING HV_CONFIG_OFF
- #if (HV_PROJECT_CONFIG_OSD_TEXT_WRAPPING == HV_CONFIG_ON)
- #define HV_OSD_CONFIG_WRAP_SPLIT_WORD HV_CONFIG_OFF
- #endif
- /* Enable of marquee */
- #define HV_PROJECT_CONFIG_OSD_MARQUEE HV_CONFIG_OFF
- #if (HV_PROJECT_CONFIG_OSD_MARQUEE == HV_CONFIG_ON)
- /* determine whether marquee excessed component by default */
- #define HV_OSD_CONFIG_MARQUEE_AUTO_CHECK_EXCESS HV_CONFIG_OFF
- /* 1: Cyclying left 2: Cyclying right 3: Scrolling left 4: Scrolling right 5: sliding left 6: sliding right 7: sliding next */
- #define HV_OSD_CONFIG_DEFAULT_MARQUEE_TYPE (5)
- /* gap between head & tail */
- #define HV_OSD_CONFIG_MARQUEE_GAP 6
- #define HV_OSD_CONFIG_MARQUEE_STEP 1
- #undef HV_PROJECT_CONFIG_OSD_ANIMITION_SUPPORT
- #define HV_PROJECT_CONFIG_OSD_ANIMITION_SUPPORT HV_CONFIG_ON
- #endif
- #if ((HV_PROJECT_CONFIG_OSD_ROTATION == HV_CONFIG_ON) || (HV_PROJECT_CONFIG_OSD_FORCE_MULTIFRAME_DRAW == HV_CONFIG_ON))
- #undef HV_PROJECT_CONFIG_OSD_DDRPATH
- #define HV_PROJECT_CONFIG_OSD_DDRPATH HV_CONFIG_ON
- #endif
- #if (HV_PROJECT_CONFIG_OSD_LOGO_ROTATION == HV_CONFIG_ON)
- #undef HV_PROJECT_CONFIG_OSD_LOGO_EFFECT
- #define HV_PROJECT_CONFIG_OSD_LOGO_EFFECT HV_CONFIG_OFF
- #endif
- #ifdef CONFIG_USER_TJPG_ON
- #undef HV_PROJECT_CONFIG_OSD_GRAPHIC
- #define HV_PROJECT_CONFIG_OSD_GRAPHIC HV_CONFIG_ON
- #endif
- #ifdef CONFIG_USER_PANEL_RESOLUTION_TYPE_UHD
- #if (HV_PROJECT_CONFIG_OSD_DDRPATH == HV_CONFIG_ON)
- /* 由于OSD DDR画布大小限制(最大支持2560*1440),所以UHD下OSD过DDR绘制,则必须开启OSD SCALER */
- #undef HV_PROJECT_CONFIG_OSD_SCALER
- #define HV_PROJECT_CONFIG_OSD_SCALER HV_CONFIG_ON
- #endif
- #endif
- #define OSD_DEBUG_PRINT_NAME
- /* 定义该宏表示:允许item禁用时自动隐藏,且item list自动对齐,注意:需要将item的disable hide检查放在
- Hv_App_Cb_ItemCheckDisableHide接口中,且此item之后(Next)的所有的item(同一个item list内)
- 都需在OSD Tool侧打开 DYN_POS 开关 */
- #define OSD_CHECK_DISABLE_HIDE_AND_ITEMLIST_AUTO_ALIGN
- /* 定义该宏表示:显示item时将自动进行disable检查,已经显示的item需调用Refresh相关接口进行刷新
- 关闭该宏则需每次操作后调用Hv_App_CheckItemDisableState更新界面 */
- #define OSD_CHECK_DISABLE_BY_EACH_ITEM
- #ifndef OSD_CHECK_DISABLE_BY_EACH_ITEM
- /* Item最大禁用个数 */
- #define OSD_DISABLE_ITEM_NUM_MAX (64)
- #endif
- /* 通过OSDdesign工具完成item与userdata的绑定 */
- #define OSD_ITEM_BIND_USERDATA_BY_TOOL
- /* OSD界面单个window的最大行数(Y) */
- #define OSD_FONT_Y_NUM_MAX (48)
- /* AsciiString组件的字符串最大长度 */
- #define OSD_ASCII_STRING_LENGTH_MAX (48)
- /* 同一级菜单所显示的最大item数量 */
- #define OSD_MENU_SHOW_ITEM_NUM_MAX (8)
- /* LOGO显示时间 */
- #define HV_PROJECT_CONFIG_OSD_LOGO_SHOW_TIME (3)
- /* 弹窗提示显示时间 */
- #define HV_PROJECT_CONFIG_OSD_DIALOG_SHOW_TIME (3)
- /* 自动刷新默认频率 */
- #define HV_PROJECT_CONFIG_OSD_DEFAULT_REFRESH_PERIOD_MS (250)
- #if (HV_PROJECT_CONFIG_OSD_DDRPATH == HV_CONFIG_ON)
- #define HV_OSD_CONFIG_DDR_TOP_MARGIN (30)
- /* 画到DDR中的像素格式
- * FORMAT Bytes
- * 0: RGBA8888 4
- * 1: RGBA4444 2
- * 2: RGB565 2
- * 5: RGB888 3
- */
- #define HV_OSD_CONFIG_DDR_FORMAT 2
- #if (HV_OSD_CONFIG_DDR_FORMAT == 0)
- #define HV_OSD_CONFIG_DDR_PIXEL_BYTES 4
- #elif (HV_OSD_CONFIG_DDR_FORMAT == 1)
- #define HV_OSD_CONFIG_DDR_PIXEL_BYTES 2
- #elif (HV_OSD_CONFIG_DDR_FORMAT == 2)
- #define HV_OSD_CONFIG_DDR_PIXEL_BYTES 2
- #elif (HV_OSD_CONFIG_DDR_FORMAT == 5)
- #define HV_OSD_CONFIG_DDR_PIXEL_BYTES 3
- #else
- #error "OSD DDR format not supported"
- #endif
- #define HV_OSD_CONFIG_FRAMERATE_MIN 60
- #define HV_OSD_CONFIG_REAL_DDR_CANVAS (HV_CONFIG_OFF)
- #if (HV_OSD_CONFIG_REAL_DDR_CANVAS == HV_CONFIG_ON)
- #define HV_OSD_CONFIG_EXTRA_DDR_BUFFER (HV_CONFIG_ON)
- #else
- #define HV_OSD_CONFIG_EXTRA_DDR_BUFFER (HV_CONFIG_OFF)
- #endif
- #if (HV_OSD_CONFIG_EXTRA_DDR_BUFFER == HV_CONFIG_ON)
- #define HV_OSD_CONFIG_EXTRA_BUFFER_HACTIVE (2560)
- #define HV_OSD_CONFIG_EXTRA_BUFFER_VACTIVE (1440)
- #endif
- #endif
- /* graphic中存储的像素格式
- * FORMAT Bytes
- * 0: RGBA8888 4
- * 1: RGBA4444 2
- * 2: RGB565 2
- * 5: RGB888 3
- */
- #define HV_OSD_CONFIG_GRAPHIC_FORMAT 2
- #define HV_OSD_CONFIG_FONT_AS_BACKGROUND HV_CONFIG_ON
- /* dynamic load resource */
- #define HV_OSD_CONFIG_DYNAMIC_BANK_COUNT 15
- /* column最小宽度 */
- #define HV_OSD_CONFIG_COLUMN_MINWIDTH 5
- #define HV_OSD_CONFIG_RESERVE_SLOTS_BYROW (HV_CONFIG_OFF)
- #if (HV_OSD_CONFIG_RESERVE_SLOTS_BYROW == HV_CONFIG_OFF)
- /* update区域不够的时候,一次扩充增加的格子个数 */
- #define HV_OSD_CONFIG_SLOTS_EXPAND (32)
- /* update区域不够的时候,一次扩充增加的最大字节数*/
- #define HV_OSD_CONFIG_EXPAND_REGION_MAX (3 * 1024)
- #else
- #define HV_OSD_CONFIG_ROW_RESOURCE_THRESHOLD 0.5
- /* 每行资源占用的格子数 / 每行index格子数的占比 */
- #define HV_OSD_CONFIG_ROW_RESOURCE_COUNT_RATIO 1
- #endif
- #define HV_OSD_CONFIG_BLANK_COLUMN_MARGIN 4
- /*
- * 绘制字符的最大的行数
- *
- * osd driver记录每一行绘制的component信息
- * 在OsdRowInfo结构体中,osd初始化的时候会
- * 静态分配OSD_MAX_ROW_COUNT个OsdRowInfo
- * 结构体,可以调整这个宏的值来减少内存占用
- */
- #define OSD_MAX_ROW_COUNT 128
- /*
- * 每行row最大可能画的component个数
- *
- * 在OsdRowInfo结构体中存放component*的数组,
- * 数组长度为OSD_ROW_MAX_COMPONENTS,可以调整
- * 这个宏的值来减少内存占用
- */
- #define OSD_ROW_MAX_COMPONENTS 16
- /* colorkey */
- #define HV_OSD_CONFIG_COLORKEY HV_CONFIG_ON
- #if (HV_OSD_CONFIG_COLORKEY == HV_CONFIG_ON)
- #define HV_OSD_CONFIG_COLORKEY_VALUE 0xabcdef
- #endif /* HV_OSD_CONFIG_COLORKEY */
- /* keep OFF, this is only for debug */
- #define HV_OSD_CONFIG_TRANSFER_USING_MEMCPY HV_CONFIG_OFF
- #define HV_OSD_CONFIG_DOUBLE_BUFFER_USING_MEMCPY HV_CONFIG_OFF
- #define HV_OSD_CONFIG_AUTO_TEST HV_CONFIG_OFF
- #endif
|