Open momo621 opened 1 year ago
例如RGA的色域转换为rgb2yuv_709_full时,使用了源码自带的矩阵,数据赋值如下: if (color_space_mode >> 8) { memcpy(&msg->full_csc, &default_csc_table, sizeof(full_csc_t)); memcpy(&msg->full_csc_clip, clip_ptr, sizeof(full_csc_t)); msg->feature.full_csc_clip_en = true; } 用户层编译log为: render_mode = 0 rotate_mode = 0 in_fence_fd = 0 handle_flag = 0x1 src:[3,0,99cf0],x-y[0,0],w-h[700,900],vw-vh[700,900],f=0, rd_mode = 0 dst:[4,0,99cf0],x-y[0,0],w-h[700,900],vw-vh[700,900],f=10, rd_mode = 0 pat:[0,0,0],x-y[0,0],w-h[0,0],vw-vh[0,0],f=0, rd_mode = 0 ROP:[0,0,0],LUT[0] color:[0,0,0,0,0] MMU:[0,0,0] mode[0,0,0,0,0] Full CSC : EN[1] FACTOR[218, 731, 74, 0], [-117, -393, 512, 130944], [512, -463, -46, 130944] gr_color_x [0, 0, 0] gr_color_x [0, 0, 0] rga_cvtcolor_csc_demo running success! 可以看到设置了Full CSC,但是驱动层的log: [ +0.000097] rga2_reg: render_mode:bitblt,bitblit_mode=0,rotate_mode:0 [ +0.000009] rga2_reg: src: y=0 uv=99cf0 v=c042c aw=700 ah=900 vw=700 vh=900 [ +0.000005] rga2_reg: src: xoff=0 yoff=0 format=RGBA8888 [ +0.000005] rga2_reg: dst: y=0 uv=99cf0 v=c042c aw=700 ah=900 vw=700 vh=900 [ +0.000005] rga2_reg: dst: xoff=0 yoff=0 format=YCbCr420SP [ +0.000005] rga2_reg: mmu: src=01 src1=00 dst=01 els=00 [ +0.000004] rga2_reg: alpha: flag 0 mode0=0 mode1=0 [ +0.000004] rga2_reg: blend mode is no blend [ +0.000004] rga2_reg: yuv2rgb mode is 0 [ +0.000023] rga_job: job: reqeust_id = 2, priority = 0, core = 4 [ +0.001291] rga_job: request[2] finished 1 failed 0 显示的yuv2rgb mode是0,此时进行色域转换是没有效果的,是我的驱动(v1.2.25)不匹配还是硬件(3.2.63318)不支持,为什么出现这种情况?另外,我看到新增了rgb2yuv_709_limit,本质上还是设置了yuvToRgbMode,不确定设置的矩阵是否起到了作用。盼复!
例如RGA的色域转换为rgb2yuv_709_full时,使用了源码自带的矩阵,数据赋值如下: if (color_space_mode >> 8) { memcpy(&msg->full_csc, &default_csc_table, sizeof(full_csc_t)); memcpy(&msg->full_csc_clip, clip_ptr, sizeof(full_csc_t)); msg->feature.full_csc_clip_en = true; } 用户层编译log为: render_mode = 0 rotate_mode = 0 in_fence_fd = 0 handle_flag = 0x1 src:[3,0,99cf0],x-y[0,0],w-h[700,900],vw-vh[700,900],f=0, rd_mode = 0 dst:[4,0,99cf0],x-y[0,0],w-h[700,900],vw-vh[700,900],f=10, rd_mode = 0 pat:[0,0,0],x-y[0,0],w-h[0,0],vw-vh[0,0],f=0, rd_mode = 0 ROP:[0,0,0],LUT[0] color:[0,0,0,0,0] MMU:[0,0,0] mode[0,0,0,0,0] Full CSC : EN[1] FACTOR[218, 731, 74, 0], [-117, -393, 512, 130944], [512, -463, -46, 130944] gr_color_x [0, 0, 0] gr_color_x [0, 0, 0] rga_cvtcolor_csc_demo running success! 可以看到设置了Full CSC,但是驱动层的log: [ +0.000097] rga2_reg: render_mode:bitblt,bitblit_mode=0,rotate_mode:0 [ +0.000009] rga2_reg: src: y=0 uv=99cf0 v=c042c aw=700 ah=900 vw=700 vh=900 [ +0.000005] rga2_reg: src: xoff=0 yoff=0 format=RGBA8888 [ +0.000005] rga2_reg: dst: y=0 uv=99cf0 v=c042c aw=700 ah=900 vw=700 vh=900 [ +0.000005] rga2_reg: dst: xoff=0 yoff=0 format=YCbCr420SP [ +0.000005] rga2_reg: mmu: src=01 src1=00 dst=01 els=00 [ +0.000004] rga2_reg: alpha: flag 0 mode0=0 mode1=0 [ +0.000004] rga2_reg: blend mode is no blend [ +0.000004] rga2_reg: yuv2rgb mode is 0 [ +0.000023] rga_job: job: reqeust_id = 2, priority = 0, core = 4 [ +0.001291] rga_job: request[2] finished 1 failed 0 显示的yuv2rgb mode是0,此时进行色域转换是没有效果的,是我的驱动(v1.2.25)不匹配还是硬件(3.2.63318)不支持,为什么出现这种情况?另外,我看到新增了rgb2yuv_709_limit,本质上还是设置了yuvToRgbMode,不确定设置的矩阵是否起到了作用。盼复!