This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Preview setting in DM365

Dear all,

i try to test IPIPE Block(preview + resize) in DM365.

The IPIPE Block in DM365 has a  many fucion about image processing.

some of them, i only applied to CFA->RGB2RGB->RGB2YUV->422 Conversion function by \PSP_02_10_00_14\examples\dm365\previewer_resizer\do_preview_resize example source.

and image data output format is YUV422(UYUV). Is it  right?

when it stored buffer,  data packing is Y1 Cr0 Y0 Cb0. is it right?

pls, give me response...

  • Hi,

    seol hee park said:

    some of them, i only applied to CFA->RGB2RGB->RGB2YUV->422 Conversion function by \PSP_02_10_00_14\examples\dm365\previewer_resizer\do_preview_resize example source.

    and image data output format is YUV422(UYUV). Is it  right?

    The output format from the previewer+resizer can be either YUV422 format data or YUV420SP format data. You can select the output format using the configuration parameter "rsz_ss_config.output1.pix_fmt" in previewer-resizer example.

    seol hee park said:
    when it stored buffer,  data packing is Y1 Cr0 Y0 Cb0. is it right?

    seol hee park said:

    when it stored buffer,  data packing is Y1 Cr0 Y0 Cb0. is it right

    If you have selected YUV422 mode for output format, generally the format is U Y V Y.

     

    BTW, can you share the YUV data that is generated in your data flow, which you think is not correct?

    Regards,

    Anshuman

    PS: Please mark this post as verified, if you think it has answered your question. Thanks.

  • dear sir,

    i attached image file .

    first image is bayer raw data by mt9p031 and second image is YUV(422) by do_preview_resize example source.

    bayer raw data is stored buffer by V4L2_PIX_FMT_SBGGR8. so,even if mt9p031 is 12bit data format but actually it's 8bit data.

    <figure1>0707.raw

    <figure2>0707.yuv422

    as you see, YUV422 image is strange..almost white color...

    refer to the below about do_preview_resize source setting.

    [NetCAM ~]# ./do_preview_resize
    input file name :0707.raw
    output file name :0707.yuv422
    input file format: 0 - Bayer - 16, 1 - Bayer A-law, 2 - Bayer - DPCM :1
    input width :1280
    input height:720
    resize (y/n) :n
    output1_size = 1843200
    Add pixel defects (y/n):n
    correct pixel defects (y/n):n
    Apply Noise filter 1 (y/n):n
    Apply Noise filter 2 (y/n):n
    Apply Green Imbalance Correction (y/n):n
    Apply White Balance (y/n):n
    Apply CFA Algs(y/n):y
    Apply RGB2RGB - 1(y/n):y
    Apply RGB2RGB - 2(y/n):n
    Apply GAMMA(y/n):n
    Apply 3D LUT(y/n):n
    Apply RGB2YUV conversion params(y/n):y
    Apply GBCE params(y/n):n
    Apply yuv422 conv params(y/n):y
    Apply Luminance Adj params(y/n):n
    Apply Edge Enhancment params(y/n):n
    Apply Chroma Artifact Reduction (CAR) (y/n):n
    Apply Chroma Gain Suppression (CGS) (y/n):n
    doing preview on in_file = xx.davinci_previewer davinci_previewer.2: ipipe_set_preview_config
    raw and writing configure_previewer_in_ss_mode():preview input is SDRAM_RAW
    out to out_file [shpark dbg]Writing 0x2405 to IPIPEIF_GFG1...
    = xx.yuv422
    stadavinci_previewer davinci_previewer.2: ipipe_set_preview_config
    rting
    Enable a_configure_previewer_in_ss_mode():preview input is SDRAM_RAW
    alaw decompressi[shpark dbg]Writing 0x2605 to IPIPEIF_GFG1...
    on, 1 byte per pixel
    Operating mode changed successfully to single shot in previewerSetting default configuration in previewer
    default configuration setting in previewer successfull
    Default values set for LUT Defect Correction
    Default values set for OTF Defect Pixel Correction
    Default values set for 2-D Noise filter - 1
    Default values set for 2-D Noise filter - 2
    Default values set for Green Imbalance Correction
    Default values set for White balance
    Default values set for CFA Interpolation
    cfa_params.alg = 1
    cfa_params.hpf_thr_2dir = 1024
    cfa_params.hpf_slp_2dir = 0
    cfa_params.hp_mix_thr_2dir = 30
    cfa_params.hp_mix_slope_2dir = 10
    cfa_params.dir_thr_2dir = 4
    cfa_params.dir_slope_2dir = 10
    cfa_params.nd_wt_2dir = 16
    cfa_params.hue_fract_daa = 24
    cfa_params.edge_thr_daa = 25
    cfa_params.thr_min_daa = 27
    cfa_params.thr_slope_daa = 20
    cfa_params.slope_min_daa = 50
    cfa_params.slope_slope_daa = 40
    cfa_params.lp_wt_daa = 16
    Success in setting CFA params
    Default values set for RGB-RGB Conversion - 1
    rgb2rgb_1_params.coef_rr = {2, 0}
    rgb2rgb_1_params.coef_gr = {1, 0}
    rgb2rgb_1_params.coef_br = {1, 0}
    rgb2rgb_1_params.coef_rg = {1, 0}
    rgb2rgb_1_params.coef_gg = {2, 0}
    rgb2rgb_1_params.coef_bg = {1, 0}
    rgb2rgb_1_params.coef_rb = {1, 0}
    rgb2rgb_1_params.coef_gb = {1, 0}
    rgb2rgb_1_params.coef_bb = {2, 0}
    rgb2rgb_1_params.out_ofst_r= 0
    rgb2rgb_1_params.out_ofst_g= 0
    rgb2rgb_1_params.out_ofst_b= 0
    Success in setting RGB2RGB-1 params
    Default values set for Gamma Correction
    Default values set for RGB-RGB Conversion - 2
    Default values set for 3D LUT
    Default values set for RGB-YCbCr conversion
    Enabled RGB2YUV params setting
    rgb2yuv_params.coef_ry = {0x0, 0x4d}
    rgb2yuv_params.coef_gy = {0x0, 0x96}
    rgb2yuv_params.coef_by = {0x0, 0x1d}
    rgb2yuv_params.coef_rcb = {0xf, 0xd5}
    rgb2yuv_params.coef_gcb = {0xf, 0xab}
    rgb2yuv_params.coef_bcb = {0x0, 0x80}
    rgb2yuv_params.coef_rcr = {0x0, 0x80}
    rgb2yuv_params.coef_gcr = {0xf, 0x95}
    rgb2yuv_params.coef_bcr = {0xf, 0xeb}
    rgb2yuv_params.out_ofst_y = 0
    rgb2yuv_params.out_ofst_cb = 80
    rgb2yuv_params.out_ofst_cr = 80
    Success in setting RGB2YUV params
    Default values set for Global Brightness,Contrast Control
    Default values set for YUV 422 conversion
    Enabled YUV422 conversion params
    yuv422_params.en_chrom_lpf =  1
    yuv422_params.chrom_pos =  0
    Success in setting YUV 422 conv params
    Default values set for Luminance Adjustment
    Default values set for Edge Enhancer
    Default values set for Chromatic Artifact Reduction
    Default values set for Chromatic Gain Suppression
    PREV_QUERYBUF successful for IMP_BUF_IN
    PREV_QUERYBUF successful for IMP_BUF_OUT1
    output offset = 82200000
    output1 width = 1280, height = 720, image size = 1843200
    previewer closed successfully

    i suspect YUV conversion in do_preview_resize example.

    how can i get the normal YUV422 image?

    and. i wana attached binary file but i can't find attached file menu..it possible only image file.

  • Hi,

    I have few questions which might help us debug this issue further:

    1. Did you try raw data that did not have A-law format data? I mean a normal 12 bit data?

    2. Could you dump all the registers for IPIPEIF, IPIPE and RSZ?

    3. could you also provide the input physical address where raw data is placed?

    4. Although i believe you would have taken care, can you please ensure that you are saving the output data in the file from the correct output offset location?

    5. Can you write your output buffer with some know pattern say 0xABCDEF12 and then run the previewer? This way we can atleast confirm if the output is coming or not from previewer/resizer

    Regards.

    Anshuman