欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  科技

高通ais cam.xml配置

程序员文章站 2022-03-02 11:36:24
高通ais cam.xml配置参数解析代码: else if ((!xmlStrcmp(cur->name, (const xmlChar *)"display_setting"))) { XML_GET_INT_ATTR(input->window_params.pipeline_id, cur, "pipeline", 1, int, -1); XML_GET_INT_ATTR(input->wind......

高通ais cam.xml配置


参数解析代码:
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)"display_setting")))
        {
            XML_GET_INT_ATTR(input->window_params.pipeline_id, cur, "pipeline", 1, int, -1);
            XML_GET_INT_ATTR(input->window_params.n_buffers_display, cur, "nbufs", 1, int, 3);
 
            XML_GET_STRING_ATTR(format, cur, "format", 1, "uyvy");
            input->window_params.format = translate_format_string(format);
 
 
这些参数定义在结构体 test_util_window_param_t 中
/// Parameters used to identify and define properties given to windows to be displayed.
typedef struct
{
    char debug_name[64];            ///< Debug name for window
    int display_id;                 ///< Specific display output ID
    int pipeline_id;                ///< Specific pipeline ID
    float window_size[2];           ///< Output window size [width, height]
    float window_pos[2];            ///< Output window position [x, y]
    float window_source_size[2];    ///< Source window size [width, height]
    float window_source_pos[2];     ///< Source window position [x, y]
    int zorder;                     ///< Window position in Z plane
    int visibility;                 ///< Window visibility (0 - not visible, else visible)
 
    int buffer_size[2];
 
    int is_displayable;             ///< Is window to be displayed
    test_util_color_fmt_t format;   ///< Displayable format if need to convert
    int n_buffers_display;          ///< Number of buffers if we need to convert to displayable format
} test_util_window_param_t;
 
 
pipeline_id 有解析,但是实际并没有用到
display_id  有解析,但是实际并没有用到,尴尬了,上面的多路配置还有多个屏的,实际高通并没有用过
 
 
n_buffers_display   
        XML_GET_INT_ATTR(input->window_params.n_buffers_display, attr, "nbufs", 1, int, 3);
        test应用中用了:
        input_ctxt->buffers_param[QCARCAM_TEST_BUFFERS_DISPLAY].n_buffers = p_xml_input->window_params.n_buffers_display;
 
 
n_buffers
        <display_setting display_id="0" nbufs="3"  ====》对应 n_buffers_display
        <output_setting width="1920" height="1024" nbufs="5" />   
        ====》对应 XML_GET_INT_ATTR(input->output_params.n_buffers, cur, "nbufs", 1, int, 3);
        test应用中用了:
        input_ctxt->buffers_param[QCARCAM_TEST_BUFFERS_OUTPUT].n_buffers = p_xml_input->output_params.n_buffers;
 
看来要看drm架构的屏相关的??
 
format
       xml默认设置成uyvy,这里设置成nv12
       看代码实际没有用这里的设置参数,test代码中固定使用了RGB888格式,xml里面的设置没用到
       input_ctxt->buffers_param[QCARCAM_TEST_BUFFERS_DISPLAY].format = QCARCAM_FMT_RGB_888;
 
 

本文地址:https://blog.csdn.net/xuecz1230/article/details/110138095