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.

TDA4AEN-Q1: egl support yuv422 output

Part Number: TDA4AEN-Q1
Other Parts Discussed in Thread: TDA4VH

Tool/software:

Hi. 

  How does tda4AEN SDK9.2 support EGL mosaic  output  uyvy (yuv422)?

Regards,

gj

  • Hello,

    TDA4AEN uses the same GPU (and GPU driver) as our TDA4VE and TDA4VH, which do support output of UYVY using EGL External Image textures. This is how we usually operate in our Vision Apps Demos that involve the GPU.

    Are you seeing any issues with this feature?

    Regards,

    Erick

  • Hello Erick

    I need the RTOS SDK 9.2 tivxOpenglMosaicNode node to support uyvy (yuv422) output.

    The current output of the tivxOpenglMosaicNode node is RGBA.
    How to make the tivxOpenglMosaicNode node output UYVY?
    I need an example of tivxOpenglMosaicNode node outputting UYVY.

    Regards,

    gj

  • Hello gj,

    I've put together a working example of using the GPU driver features to output in UYVY. Please see the attached project: working-example-nv12-input-uyvy-output.tar.gz

    You will see all of the code in the main.c. The important section is the output rendering texture description that is passed:

        // Create Texture for rendering
        int32_t attrIdx = 0;
        EGLImageKHR render_image;
        EGLint attr[32];
        PFNEGLCREATEIMAGEKHRPROC eglCreateImageKHR;
    
        attr[attrIdx++] = EGL_LINUX_DRM_FOURCC_EXT;
        attr[attrIdx++] = FOURCC_STR("UYVY");
    
        attr[attrIdx++] = EGL_WIDTH;
        attr[attrIdx++] = OUTPUT_TEX_WIDTH;
    
        attr[attrIdx++] = EGL_HEIGHT;
        attr[attrIdx++] = OUTPUT_TEX_HEIGHT;
    
        attr[attrIdx++] = EGL_DMA_BUF_PLANE0_PITCH_EXT;
        attr[attrIdx++] = OUTPUT_TEX_WIDTH * 2;
    
        attr[attrIdx++] = EGL_DMA_BUF_PLANE0_OFFSET_EXT;
        attr[attrIdx++] = 0;
        
        attr[attrIdx++] = EGL_DMA_BUF_PLANE0_FD_EXT;
        attr[attrIdx++] = output_dma_buf_fd;
    
        attr[attrIdx++] = EGL_NONE;

    This creates the output texture to be UYVY. You can modify the application you are looking at to use this instead. Please see the defines at the top of the main.c, they are setting the output texture BPP and OUTPUT_WIDTH and OUTPUT_HEIGHT.

    Regards,

    Erick

  • Hell Erick

    How to add it to the egl Mosaic node?

    ti-processor-sdk-rtos-j722s-evm-09_02_00_05/vision_apps/apps/basic_demos/app_linux_arm_opengl_mosai

    How can app_linux_arm_opengl_mosai output UYVY?

    Regards,

    gj

  • Hello,

    You will need to modify the " attr[attrIdx++]" for the render texture similarly in the mosaic app. But, because you are changing the color format of the texture, the buffer is actually going to get bigger as it is 16bpp instead of 12bpp in NV12.

    I see the function is already taking care of these changes:

    390 static EGLImageKHR appEglWindowCreateIMG(app_egl_obj_t *obj,
    391         app_egl_tex_prop_t *prop)
    392 {
    393     int32_t attrIdx = 0;
    394     EGLImageKHR image;
    395     EGLint attr[32];
    396     PFNEGLCREATEIMAGEKHRPROC eglCreateImageKHR;
    397 
    398     uint32_t num_planes = 1;
    399 
    400     if(prop->dataFormat==APP_EGL_DF_NV12)
    401     {
    402         num_planes = 2;
    403     }
    404 
    405     attr[attrIdx++] = EGL_LINUX_DRM_FOURCC_EXT;
    406     if (prop->dataFormat == APP_EGL_DF_NV12)
    407         attr[attrIdx++] = FOURCC_STR("NV12");
    408     else if (prop->dataFormat == APP_EGL_DF_YUYV)
    409         attr[attrIdx++] = FOURCC_STR("YUYV");
    410     else if (prop->dataFormat == APP_EGL_DF_UYVY)
    411         attr[attrIdx++] = FOURCC_STR("UYVY");
    412     else
    413         attr[attrIdx++] = FOURCC_STR("AB24");
    

    So you should be able to just change the dataFormat from APP_EGL_DF_NV12 to APP_EGL_DF_UYVY. Are you seeing any issues with that?

    Please make sure to keep this E2E up to date with all of the details so we can keep track of them in one place.

    Regards,

    Erick

  • Hello

        egl mosaic node The input is NV12. The current output is RGBX

    Do we need to change the input NV12 to UYVY?

    Modify egl Mosaic node in rtosssdk?

     ti-processor-sdk-rtos-j722s-evm-09_02_00_05/vision_apps/apps/basic_demos/app_linux_arm_opengl_mosai

    This app is only an openvx link.

    The rendering of EGL is done in the SDK node.

    Is there any reason why the current egl Mosaic node can only output RGBX and restrict output in other formats?

    vision_apps/kernels/sample/a72/vx_opengl_mosaic_target.c

    static vx_status VX_CALLBACK tivxOpenglMosaicProcess(
    tivx_target_kernel_instance kernel,
    tivx_obj_desc_t *obj_desc[],
    uint16_t num_params, void *priv_arg)
    ....
    if (VX_SUCCESS == status)
    {
    status = tivxGetTargetKernelInstanceContext(kernel,
    (void *)&mosaicParams,
    &size);
    input_desc = (tivx_obj_desc_object_array_t *)obj_desc[TIVX_KERNEL_OPENGL_MOSAIC_INPUT_IDX];
    output_desc = (tivx_obj_desc_image_t *)obj_desc[TIVX_KERNEL_OPENGL_MOSAIC_OUTPUT_IDX];
    if (VX_DF_IMAGE_RGBX != output_desc->format)
    {
    status = VX_FAILURE;
    }
    }
    I have made the following modifications:
    vision_apps/apps/basic_demos/app_linux_arm_opengl_mosaic:
    --- app_linux_arm_opengl_mosaic/main_linux_arm.c (版本 196)
    +++ app_linux_arm_opengl_mosaic/main_linux_arm.c (工作副本)
    @@ -348,7 +348,7 @@
    }
    if(status == VX_SUCCESS)
    {
    - output = vxCreateImage(context, outputWidth, outputHeight, VX_DF_IMAGE_RGBX);
    + output = vxCreateImage(context, outputWidth, outputHeight, VX_DF_IMAGE_UYVY);
    status = vxGetStatus((vx_reference) output);
    }
    if(status == VX_SUCCESS)
     
    Index: vision_apps/kernels/sample/a72/vx_opengl_mosaic_target.c
    ===================================================================
    --- vision_apps/kernels/sample/a72/vx_opengl_mosaic_target.c 
    +++ vision_apps/kernels/sample/a72/vx_opengl_mosaic_target.c 
    @@ -154,7 +154,7 @@

    if (VX_DF_IMAGE_RGBX != output_desc->format)
    {
    - status = VX_FAILURE;
    + // status = VX_FAILURE;
    }
    }

    @@ -263,7 +263,7 @@
    texProp[0].height = intermediate_dim.dim_y;
    texProp[0].pitch[0] = intermediate_dim.stride_y;
    texProp[0].pitch[1] = intermediate_dim.stride_y;
    - texProp[0].dataFormat = APP_EGL_DF_RGB;
    + texProp[0].dataFormat = APP_EGL_DF_UYVY;//APP_EGL_DF_RGB;
    #endif

    for (i = 0; i < MAX_TILES; i++)
    @@ -292,7 +292,7 @@
    renderTexProp.height = output_desc->imagepatch_addr[0].dim_y;
    renderTexProp.pitch[0] = output_desc->imagepatch_addr[0].stride_y;
    renderTexProp.pitch[1] = output_desc->imagepatch_addr[0].stride_y;
    - renderTexProp.dataFormat = APP_EGL_DF_RGBX;
    +renderTexProp.dataFormat = APP_EGL_DF_UYVY;//APP_EGL_DF_RGBX;

    renderTexProp.dmaBufFd[0] = output_desc->mem_ptr[0].dma_buf_fd;
    renderTexProp.dmaBufFdOffset[0] = output_desc->mem_ptr[0].dma_buf_fd_offset;
    @@ -446,7 +446,7 @@

    if (VX_DF_IMAGE_RGBX != output_desc->format)
    {
    - status = VX_FAILURE;
    + // status = VX_FAILURE;
    }

    if (VX_SUCCESS == status)
    Index: vision_apps/kernels/sample/host/vx_opengl_mosaic_host.c
    ===================================================================
    --- vision_apps/kernels/sample/host/vx_opengl_mosaic_host.c 
    +++ vision_apps/kernels/sample/host/vx_opengl_mosaic_host.c 
    @@ -160,7 +160,11 @@

    if (VX_SUCCESS == status)
    {
    - if (VX_DF_IMAGE_RGBX != output_fmt)
    + if ((VX_DF_IMAGE_RGBX == output_fmt)||(VX_DF_IMAGE_UYVY == output_fmt))
    + {
    +
    + }
    + else
    {
    status = VX_ERROR_INVALID_PARAMETERS;
    VX_PRINT(VX_ZONE_ERROR, "'output' should be an image of type:\n VX_DF_IMAGE_RGBX \n");
    The following is the error log of running/vx-app-arm-opengl_msaic.out after my modifications, Run normally before modification.
    root@j722s-evm:/opt/vision_apps# ./vx_app_arm_opengl_mosaic.out 
    APP: Init ... !!!
    MEM: Init ... !!!
    MEM: Initialized DMA HEAP (fd=5) !!!
    MEM: Init ... Done !!!
    IPC: Init ... !!!
    IPC: Init ... Done !!!
    REMOTE_SERVICE: Init ... !!!
    REMOTE_SERVICE: Init ... Done !!!
        47.420026 s: GTC Frequency = 200 MHz
    APP: Init ... Done !!!
        47.424048 s:  VX_ZONE_INIT:Enabled
        47.424095 s:  VX_ZONE_ERROR:Enabled
        47.424104 s:  VX_ZONE_WARNING:Enabled
        47.426207 s:  VX_ZONE_INIT:[tivxPlatformCreateTargetId:116] Added target MPU-0 
        47.426364 s:  VX_ZONE_INIT:[tivxPlatformCreateTargetId:116] Added target MPU-1 
        47.426475 s:  VX_ZONE_INIT:[tivxPlatformCreateTargetId:116] Added target MPU-2 
        47.426621 s:  VX_ZONE_INIT:[tivxPlatformCreateTargetId:116] Added target MPU-3 
        47.426637 s:  VX_ZONE_INIT:[tivxInitLocal:136] Initialization Done !!!
        47.429486 s:  VX_ZONE_INIT:[tivxHostInitLocal:101] Initialization Done for HOST !!!
    [   39.615726] PVR_K:  1092: RGX Firmware image 'rgx.fw.36.53.104.796' loaded
    [   39.630147] PVR_K:  1092: Shader binary image 'rgx.sh.36.53.104.796' loaded
    EGL: version 1.5
    EGL: GL Version = (null)
    EGL: GL Vendor = (null)
    EGL: GL Renderer = (null)
    EGL: GL Extensions = (null)
    [   39.813380] PVR_K:  235: ------------[ PVR DBG: START (High) ]------------
    app_linux_arm_opengl_mosaic: writing to file [/opt/vision_apps/t[   39.820332] PVR_K:  235: OS kernel info: Linux 6.1.80-ti-g2e423244f8c0 #1 SMP PREEMPT Wed Mar 20 14:43:33 UTC 2024 aarch64
    est_data/output/mosaic_output_file.bin] image of size 1920 x 108[   39.836977] PVR_K:  235: DDK info: Rogue_DDK_Linux_WS rogueddk 23.3@6512818 (release) j722s_linux
    0
    [   39.851372] PVR_K:  235: Time now: 39851368us
    [   39.855969] PVR_K:  235: Services State: OK
    [   39.860168] PVR_K:  235: Server Errors: 0
    [   39.864195] PVR_K:  235: Connections Device ID:0(128) P1086-V1086-T1092-vx_app_arm_open
    [   39.872206] PVR_K:  235: ------[ Driver Info ]------
    [   39.877185] PVR_K:  235: Comparison of UM/KM components: MATCHING
    [   39.883287] PVR_K:  235: KM Arch: 64 Bit
    [   39.887220] PVR_K:  235: Driver Mode: Native
    [   39.891500] PVR_K:  235: UM Connected Clients: 64 Bit
    [   39.896564] PVR_K:  235: UM info: 23.3 @  6512818 (release) build options: 0x80000810
    [   39.904402] PVR_K:  235: KM info: 23.3 @  6512818 (release) build options: 0x00000810
    [   39.912250] PVR_K:  235: Window system: lws-generic
    [   39.917147] PVR_K:  235: ------[ Server Thread Summary ]------
    [   39.922990] PVR_K:  235:   pvr_defer_free : Running
    [   39.927882] PVR_K:  235:     Number of deferred cleanup items: QUEUED: 00000  CONNECTION : 00000 MMU : 00000 OSMEM : 00000 PMR : 00000
    [   39.939966] PVR_K:  235:     Number of deferred cleanup items dropped after retry limit reached : 0
    [   39.949020] PVR_K:  235:   pvr_device_wdg : Running
    [   39.953907] PVR_K:  235: Active Threads (UM/KM): 0 / 2
    [   39.959055] PVR_K:  235: Suspended Threads: 0
    [   39.963427] PVR_K:  235: ------[ RGX Device ID:0 Start ]------
    [   39.969279] PVR_K:  235: ------[ RGX Info ]------
    [   39.973999] PVR_K:  235: Device Node (Info): 00000000ffc38fdf (00000000f18d6d2a)
    [   39.981407] PVR_K:  235:     DevmemHistoryRecordStats - None
    [   39.987075] PVR_K:  235: RGX BVNC: 36.53.104.796 (rogue)
    [   39.992398] PVR_K:  235: RGX Device State: ACTIVE
    [   39.997115] PVR_K:  235: RGX Power State: OFF
    [   40.001485] PVR_K:  235: RGX Health Status: OK, Reason: NONE
    [   40.007156] PVR_K:  235: FW info: 23.3 @  6512818 (release) build options: 0x80000810
    [   40.014992] PVR_K:  235: TRP: HW support - Yes; SW disabled
    [   40.020575] PVR_K:  235: WGP: HW support - Yes; SW disabled
    [   40.026158] PVR_K:  235: RGX HWR State 0x00000001: HWR OK;
    [   40.031658] PVR_K:  235: RGX FW Power State: RGXFWIF_POW_OFF (APM enabled: 1 ok, 0 denied, 0 non-idle, 0 retry, 0 other, 1 total. Latency: 100 ms)
    [   40.044810] PVR_K:  235: RGX DVFS: 0 frequency changes. Current frequency: 800.008 MHz (sampled at 39813305040 ns). FW frequency: 800.000 MHz.
    [   40.057606] PVR_K:  235: RGX FW OS 0 - State: active; Freelists: Ok; Priority: 0; Isolation group: 0;  Time Slice*: 0% (0ms); MTS off;
    [   40.069737] PVR_K:  235: Number of HWR: GP(0/0+0), 2D(0/0+0), GEOM(0/0+0), 3D(1/1+0), CDM(0/0+0), RAY(0/0+0), GEOM2(0/0+0), FALSE(0,0,0,0,0,0,0)
    [   40.082704] PVR_K:  235: DM 0 (GP)
    [   40.086141] PVR_K:  235: DM 1 (HWRflags 0x00000000: working;)
    [   40.091904] PVR_K:  235: DM 2 (HWRflags 0x00000000: working;)
    [   40.097667] PVR_K:  235: DM 3 (HWRflags 0x00000000: working;)
    [   40.103430] PVR_K:  235:   Recovery 1: Core = 0, PID = 1086 / vx_app_arm_open, frame = 0, HWRTData = 0x60046740, EventStatus = 0x00000010, Guilty Lockup
    [   40.117080] PVR_K:  235:               CRTimer = 0x000000090867, OSTimer = 39.813229335, CyclesElapsed = 48122880
    [   40.127351] PVR_K:  235:               PreResetTimeInCycles = 23296, HWResetTimeInCycles = 29184, FreelistReconTimeInCycles = 244480, TotalRecoveryTimeInCycles = 296960
    [   40.142393] PVR_K:  235: DM 4 (HWRflags 0x00000000: working;)
    [   40.148172] PVR_K:  235: DM 5 (HWRflags 0x00000000: working;)
    app_linux_arm_opengl_mosaic: writing to file [/opt/vision_apps/t[   40.153939] PVR_K:  235: DM 6 (HWRflags 0x00000000: working;)
    est_data/output/mosaic_output_file.bin] image of size 1920 x 108[   40.165251] PVR_K:  235: RGX Kernel CCB WO:0x6 RO:0x6
    0 ... Done !!!
    [   40.175829] PVR_K:  235: RGX Firmware CCB WO:0x3 RO:0x3
    [   40.182417] PVR_K:  235: RGX Kernel CCB commands executed = 6
    [   40.188159] PVR_K:  235: RGX SLR: Forced UFO updates requested = 0
    [   40.194333] PVR_K:  235: RGX Errors: WGP:0, TRP:0
    [   40.199036] PVR_K:  235: Thread0: FW IRQ count = 6
    [   40.203832] PVR_K:  235: Last sampled IRQ count in LISR = 6
    [   40.209404] PVR_K:  235: FW System config flags = 0x00020000 (Ctx switch options: Medium CSW profile;)
    [   40.218702] PVR_K:  235: FW OS config flags = 0x0000000F (Ctx switch: TDM; GEOM; 3D; CDM;)
    [   40.226956] PVR_K:  235:  (!) RGX power is down. No registers dumped
    [   40.233301] PVR_K:  235: ------[ RGX FW Trace Info ]------
    [   40.238779] PVR_K:  235: Debug log type: none
    [   40.243131] PVR_K:  235: RGX FW thread 0: Trace buffer not yet allocated
    [   40.249823] PVR_K:  235: ------[ Full CCB Status ]------
    [   40.255134] PVR_K:  235: ------[ RGX Device ID:0 End ]------
    [   40.260794] PVR_K:  235: ------[ Device ID: 128 - Phys Heaps ]------
    [   40.267172] PVR_K:  235: 0x00000000a91201ab -> PdMs: SYSMEM, Type: UMA, default, Usage Flags: 0x00000004 (GPU_LOCAL), Refs: 11, Free Size: 6427906048B, Total Size: 6814416896B
    [   40.282818] PVR_K:  235: PMR Zombie Count: 0, PMR Zombie Count In Cleanup: 0
    [   40.289871] PVR_K:  235: PMR Live Count: 27
    [   40.294054] PVR_K:  235: ------[ System Summary Device ID:0 ]------
    [   40.300323] PVR_K:  235: Device System Power State: ON
    [   40.305460] PVR_K:  235: MaxHWTOut: 500000us, WtTryCt: 10000, WDGTOut(on,off): (10000ms,3600000ms)
    [   40.314411] PVR_K:  235: ------[ AppHint Settings ]------
    [   40.319812] PVR_K:  235:   Build Vars
    [   40.323477] PVR_K:  235:     EnableTrustedDeviceAceConfig: N
    [   40.329131] PVR_K:  235:     CleanupThreadPriority: 0x00000005
    [   40.334965] PVR_K:  235:     WatchdogThreadPriority: 0x00000000
    [   40.340884] PVR_K:  235:     HWPerfClientBufferSize: 0x000c0000
    [   40.346799] PVR_K:  235:     DevmemHistoryBufSizeLog2: 0x0000000b
    [   40.352887] PVR_K:  235:     DevmemHistoryMaxEntries: 0x00002710
    [   40.358886] PVR_K:  235:   Module Params
    [   40.362813] PVR_K:  235:     none
    [   40.366125] PVR_K:  235:   Debug Info Params
    [   40.370391] PVR_K:  235:     none
    [   40.373696] PVR_K:  235:   Debug Info Params Device ID: 0
    [   40.379094] PVR_K:  235:     none
    [   40.382409] PVR_K:  235: ------[ Active Sync Checkpoints ]------
    [   40.388408] PVR_K:  235: (SyncCP Counts: InUse:1 Max:3)
    [   40.393628] sw: RM_SWTimeline-vx_app_arm_opengl @0 cur=0
    [   40.398934] ------[ Native Fence Sync: timelines ]------
    [   40.404240] foreign_sync: @0 ctx=1 refs=1
    [   40.408251] rogue-ta3d: @1 ctx=3 refs=1
    [   40.412080]  @0: (++) refs=5 fwaddr=0xd0044001 enqueue=1 status=Signalled 0-update fence
    [   40.420160] V3-aic.out-vx_app_arm_open-1086: @1 ctx=4 refs=0
    [   40.425821] P3-aic.out-vx_app_arm_open-1086: @1 ctx=5 refs=0
    [   40.431489] PVR_K:  235: ------------[ PVR DBG: END ]------------
    [   40.437685] ------------[ cut here ]------------
        48.377960 s:  VX_ZONE_INIT:[tivxHostDeInitLocal:115] De-Init[   40.442310] WARNING: CPU: 1 PID: 235 at /scratch/edgeai/yocto/arago-tmp-default-glibc/work/j722s_evm-oe-linux/ti-img-rogue-driver/23.3.6512818-r0b/git/binary_j722s_linux_lws-generic_release/target_aarch64/kbuild/services/server/common/pvr_notifier.c:644 PVRSRVDebugRequest+0x514/0x6b0 [pvrsrvkm]
    ialization Done for HOST !!!
    [   40.473889] Modules linked in: overlay xhci_plat_hcd rpmsg_ctrl cdns3 dwc3 cdns_usb_common rpmsg_char cfg80211 bluetooth ecdh_generic ecc rfkill crct10dif_ce pci_j721e_host pci_j721e pcie_cadence_host pcie_cadence pvrsrvkm(O) display_connector cdns3_ti e5010_jpeg_enc dwc3_am62 k3_j72xx_bandgap rtc_ti_k3 rti_wdt sii902x wave5 drm_kms_helper videobuf2_dma_contig syscopyarea videobuf2_memops sysfillrect sysimgblt v4l2_mem2mem ti_k3_r5_remoteproc ti_k3_dsp_remoteproc videobuf2_v4l2 virtio_rpmsg_bus rpmsg_ns fb_sys_fops videobuf2_common videodev ti_k3_common mc sa2ul cryptodev(O) fuse drm drm_panel_orientation_quirks ipv6
        48.386909 s:  VX_ZONE_INIT:[tivxDeInitLocal:204] De-Initiali[   40.531016] CPU: 1 PID: 235 Comm: pvr_device_wdg Tainted: G           O       6.1.80-ti-g2e423244f8c0 #1
    zation Done !!!
    APP: Deinit ... !!!
    REMOTE_SERVICE: Deinit ...[   40.546022] Hardware name: Texas Instruments J722S EVM (DT)
     !!!
    REMOTE_SERVICE: Deinit ... Done !!![   40.557121] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
    
    IPC: Deinit ... !!!
    [   40.567613] pc : PVRSRVDebugRequest+0x514/0x6b0 [pvrsrvkm]
    IPC: DeInit ... Done !!!
    [   40.575080] lr : PVRSRVDebugRequest+0x514/0x6b0 [pvrsrvkm]
    MEM: Deinit ... !!!
    DDR_SHARED_MEM: Alloc's: 7 alloc's of 59904[   40.582851] sp : ffff800009fdbca0
    [   40.591693] x29: ffff800009fdbca0 x28: 0000000000000000 x27: ffff0008266417a0
    [   40.598826] x26: ffff000823399608 x25: ffff0008230f5408 x24: ffff0008230f5520
    52 bytes 
    [   40.605951] x23: ffff000823399720 x22: ffff0008230f5520 x21: 0000000000000002
    
    DDR_SHARED_MEM: Open's : 0 allocs  of 0 bytes 
    MEM: Deinit ...[   40.618611] x20: 0000000000000000 x19: 0000000000000000 x18: ffffffffffffffff
     Done !!!
    APP: Deinit ... Done !!!
    [   40.631276] x17: 2d302064656c6c61 x16: 6e6769533d737574 x15: ffff800089fdb847
    [   40.641601] x14: 0000000000000000 x13: ffff800009161440 x12: 00000000000006f3
    [   40.648725] x11: 0000000000000251 x10: ffff8000091b9440 x9 : 000000000000003e
    root@j722s-evm:/opt/vision_apps# [   40.655848] x8 : 0000000000000000 x7 : 0000000000000140 x6 : 00000000000105fe
    [   40.665831] x5 : 0000000000000050 x4 : 0000000000014dfe x3 : ffff00097f1177a8
    [   40.672954] x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff000821b563c0
    [   40.680078] Call trace:
    [   40.682515]  PVRSRVDebugRequest+0x514/0x6b0 [pvrsrvkm]
    [   40.687849]  DevicesWatchdogThread_ForEachVaCb+0x108/0x170 [pvrsrvkm]
    [   40.694418]  List_PVRSRV_DEVICE_NODE_ForEach_va+0x78/0xbc [pvrsrvkm]
    [   40.700899]  DevicesWatchdogThread+0xa0/0x210 [pvrsrvkm]
    [   40.706340]  OSThreadRun+0x24/0x60 [pvrsrvkm]
    [   40.710826]  kthread+0x10c/0x110
    [   40.714051]  ret_from_fork+0x10/0x20
    [   40.717621] ---[ end trace 0000000000000000 ]---
    

    Regards,

    gj

  • gj,

    Is there any reason why the current egl Mosaic node can only output RGBX and restrict output in other formats?

    Before SDK 8.x, it was only capable of outputting RGBX. Now, in SDK 9.x, we are able to output in YUV formats as well.

    Can you share your complete changes as a patch file?

    The following is the error log of running/vx-app-arm-opengl_msaic.out after my modifications, Run normally before modification.

    I see that the GPU experienced a hardware recovery. This is not expected given that there should not be an error in the driver. I assume you don't see this usually when running the application.

    Regards,

    Erick

  • Hello Erick

    Patch modified by EGL:

    egl.zip

    Can you use run SDK 9.2 vx-app-arm-opengl_mosaic.out to output UYVY on the EVM board?

    Regards,

    gj

  • gj,

    Thanks for the patch. I need to check with my OpenVX experts on the buffer assumptions and if there are any other changes we might need. I assume so since it is not working.

    A good test is to run the application and step through the code when it is setting up the render buffer to ensure we are creating the buffers correctly. And also check that the OpenVX buffers are also correctly sized.

    I'll need a few iterations to get this working with our Vision Apps team, I'll keep you updated on our progress.

    Thanks,

    Erick

  • HI.Erick

        Why does the output of this demo display a significantly different UYVY image (output. nv12) from the input image (yuv image/Gradient_1080p_YUV. nv12)?

    Regards,

    gj

  • gj,

    The demo renders the texture in the center of the screen, so the green area around the texture is on purpose.

    I will need to check, however, the rendered texture in the center. It does look quite different than the rendered texture. It should be simple to investigate if I switch the color to something easier, like all green texture.

    Regards,

    Erick

  • Hi gj,

    The changes done to the tivxOpenglMosaicNode() seems to be correct at the host side and target side.

    May I know what is the error that you are seeing with these changes? Is it TIOVX based or errors from the EGL?

    Regards,

    Nikhil

  • HI Nikhil

      My changes were uploaded a few days ago, please see above
     Patch modified by EGL:

     TDA4entry SDK9.2

    Can you use run SDK 9.2 vx-app-arm-opengl_mosaic.out to output UYVY on the EVM board?

    Regards,
    gj
  • Hi,

    Sure, Let me try this at my end and get back to you by thursday.

    Regards,

    Nikhil

  • Hi, Nikhil

       Can you update today?

    Regards,
    gj
  • Hi gj

    Sorry for the delay in response.

    I tried the below changes to output the opegl node with YUV422 output.

    I didn't see any error in this case.

    Please try the below changes at your end

    /cfs-file/__key/communityserver-discussions-components-files/791/opengl_5F00_yuv422_5F00_output.patch

    Regards,

    Nikhil

  • Hi Nikhil

        TDA4entry  ti-processor-sdk-rtos-j722s-evm-09_02_00_05.   

         I used your patch and ran the log as follows:
    The first run will report PVR information, and the second run will not report an error. I have checked the image and it is not correct.

    The PVR report information was also reported in the patch I previously submitted.

         run  app log:

    root@j722s-evm:/opt/vision_apps# ./vx_app_arm_opengl_mosaic.out 
    APP: Init ... !!!
    MEM: Init ... !!!
    MEM: Initialized DMA HEAP (fd=5) !!!
    MEM: Init ... Done !!!
    IPC: Init ... !!!
    IPC: Init ... Done !!!
    REMOTE_SERVICE: Init ... !!!
    REMOTE_SERVICE: Init ... Done !!!
        41.268101 s: GTC Frequency = 200 MHz
    APP: Init ... Done !!!
        41.272387 s:  VX_ZONE_INIT:Enabled
        41.272433 s:  VX_ZONE_ERROR:Enabled
        41.272443 s:  VX_ZONE_WARNING:Enabled
        41.274598 s:  VX_ZONE_INIT:[tivxPlatformCreateTargetId:116] Added target MPU-0 
        41.274763 s:  VX_ZONE_INIT:[tivxPlatformCreateTargetId:116] Added target MPU-1 
        41.274887 s:  VX_ZONE_INIT:[tivxPlatformCreateTargetId:116] Added target MPU-2 
        41.275060 s:  VX_ZONE_INIT:[tivxPlatformCreateTargetId:116] Added target MPU-3 
        41.275080 s:  VX_ZONE_INIT:[tivxInitLocal:136] Initialization Done !!!
        41.278490 s:  VX_ZONE_INIT:[tivxHostInitLocal:101] Initialization Done for HOST !!!
    [   33.453104] PVR_K:  1104: RGX Firmware image 'rgx.fw.36.53.104.796' loaded
    [   33.468263] PVR_K:  1104: Shader binary image 'rgx.sh.36.53.104.796' loaded
    EGL: version 1.5
    EGL: GL Version = (null)
    EGL: GL Vendor = (null)
    EGL: GL Renderer = (null)
    EGL: GL Extensions = (null)
    [   33.663071] PVR_K:  244: ------------[ PVR DBG: START (High) ]------------
    [   33.670017] PVR_K:  244: OS kernel info: Linux 6.1.80-ti-g2e423244f8c0 #1 SMP PREEMPT Wed Mar 20 14:43:33 UTC 2024 aarch64
    [   33.681090] PVR_K:  244: DDK info: Rogue_DDK_Linux_WS rogueddk 23.3@6512818 (release) j722s_linux
    [   33.689974] PVR_K:  244: Time now: 33689965us
    [   33.694365] PVR_K:  244: Services State: OK
    [   33.698566] PVR_K:  244: Server Errors: 0
    [   33.702607] PVR_K:  244: Connections Device ID:0(128) P1098-V1098-T1104-vx_app_arm_open
    [   33.710628] PVR_K:  244: ------[ Driver Info ]------
    [   33.715603] PVR_K:  244: Comparison of UM/KM components: MATCHING
    [   33.721710] PVR_K:  244: KM Arch: 64 Bit
        41.692756 s:  VX_ZONE_INIT:[tivxHostDeInitLocal:115] De-Init[   33.725663] PVR_K:  244: Driver Mode: Native
    ialization Done for HOST !!!
    [   33.735469] PVR_K:  244: UM Connected Clients: 64 Bit
        41.699511 s:  VX_ZONE_INIT:[tivxDeInitLocal:204] De-Initiali[   33.743106] PVR_K:  244: UM info: 23.3 @  6512818 (release) build options: 0x80000810
    zation Done !!!
    [   33.756460] PVR_K:  244: KM info: 23.3 @  6512818 (release) build options: 0x00000810
    [   33.765747] PVR_K:  244: Window system: lws-generic
    APP: Deinit ... !!!
    REMOTE_SERVICE: Deinit ... !!!
    REMOTE_SERV[   33.770633] PVR_K:  244: ------[ Server Thread Summary ]------
    [   33.782011] PVR_K:  244:   pvr_defer_free : Running
    ICE: Deinit ... Done !!!
    [   33.786906] PVR_K:  244:     Number of deferred cleanup items: QUEUED: 00000  CONNECTION : 00000 MMU : 00000 OSMEM : 00000 PMR : 00000
    [   33.801207] PVR_K:  244:     Number of deferred cleanup items dropped after retry limit reached : 0
    IPC: Deinit ... !!![   33.810245] PVR_K:  244:   pvr_device_wdg : Running
    [   33.816758] PVR_K:  244: Active Threads (UM/KM): 0 / 2
    
    [   33.821893] PVR_K:  244: Suspended Threads: 0
    [   33.826433] PVR_K:  244: ------[ RGX Device ID:0 Start ]------
    [   33.832267] PVR_K:  244: ------[ RGX Info ]------
    IPC: DeInit ... Done !!![   33.836977] PVR_K:  244: Device Node (Info): 00000000b3a028d6 (00000000a9cfeb3b)
    
    [   33.846444] PVR_K:  244:     DevmemHistoryRecordStats - None
    MEM: Deinit ... !!![   33.852257] PVR_K:  244: RGX BVNC: 36.53.104.796 (rogue)
    
    [   33.859207] PVR_K:  244: RGX Device State: ACTIVE
    DDR_SHARED_MEM: Alloc's: 7 alloc's of 5990452 bytes [   33.864077] PVR_K:  244: RGX Power State: OFF
    
    [   33.872945] PVR_K:  244: RGX Health Status: OK, Reason: NONE
    DDR_SHARED_MEM: Free's : 7 free's  of 5990452 bytes 
    [   33.878765] PVR_K:  244: FW info: 23.3 @  6512818 (release) build options: 0x80000810
    [   33.891252] PVR_K:  244: TRP: HW support - Yes; SW disabled
    DDR_SHARED_MEM: Open's : 0 allocs  of 0 bytes [   33.896821] PVR_K:  244: WGP: HW support - Yes; SW disabled
    
    [   33.906384] PVR_K:  244: RGX HWR State 0x00000001: HWR OK;
    MEM: Deinit ... Done !!![   33.912026] PVR_K:  244: RGX FW Power State: RGXFWIF_POW_OFF (APM enabled: 1 ok, 0 denied, 0 non-idle, 0 retry, 0 other, 1 total. Latency: 100 ms)
    
    [   33.927212] PVR_K:  244: RGX DVFS: 0 frequency changes. Current frequency: 800.015 MHz (sampled at 33663005990 ns). FW frequency: 800.000 MHz.
    APP: Deinit ... Done !!!
    [   33.940170] PVR_K:  244: RGX FW OS 0 - State: active; Freelists: Ok; Priority: 0; Isolation group: 0;  Time Slice*: 0% (0ms); MTS off;
    [   33.954482] PVR_K:  244: Number of HWR: GP(0/0+0), 2D(0/0+0), GEOM(0/0+0), 3D(1/1+0), CDM(0/0+0), RAY(0/0+0), GEOM2(0/0+0), FALSE(0,0,0,0,0,0,0)
    [   33.967427] PVR_K:  244: DM 0 (GP)
    root@j722s-evm:/opt/vision_apps# [   33.970837] PVR_K:  244: DM 1 (HWRflags 0x00000000: working;)
    [   33.979420] PVR_K:  244: DM 2 (HWRflags 0x00000000: working;)
    [   33.985163] PVR_K:  244: DM 3 (HWRflags 0x00000000: working;)
    [   33.990910] PVR_K:  244:   Recovery 1: Core = 0, PID = 1098 / vx_app_arm_open, frame = 0, HWRTData = 0x60046740, EventStatus = 0x00000010, Guilty Lockup
    [   34.004567] PVR_K:  244:               CRTimer = 0x000000099F53, OSTimer = 33.662933650, CyclesElapsed = 48092672
    [   34.014833] PVR_K:  244:               PreResetTimeInCycles = 23040, HWResetTimeInCycles = 28928, FreelistReconTimeInCycles = 248320, TotalRecoveryTimeInCycles = 300288
    [   34.029863] PVR_K:  244: DM 4 (HWRflags 0x00000000: working;)
    [   34.035610] PVR_K:  244: DM 5 (HWRflags 0x00000000: working;)
    [   34.041355] PVR_K:  244: DM 6 (HWRflags 0x00000000: working;)
    [   34.047098] PVR_K:  244: RGX Kernel CCB WO:0x23 RO:0x23
    [   34.052316] PVR_K:  244: RGX Firmware CCB WO:0x3 RO:0x3
    [   34.057536] PVR_K:  244: RGX Kernel CCB commands executed = 35
    [   34.063361] PVR_K:  244: RGX SLR: Forced UFO updates requested = 0
    [   34.069535] PVR_K:  244: RGX Errors: WGP:0, TRP:0
    [   34.074232] PVR_K:  244: Thread0: FW IRQ count = 27
    [   34.079104] PVR_K:  244: Last sampled IRQ count in LISR = 27
    [   34.084760] PVR_K:  244: FW System config flags = 0x00020000 (Ctx switch options: Medium CSW profile;)
    [   34.094054] PVR_K:  244: FW OS config flags = 0x0000000F (Ctx switch: TDM; GEOM; 3D; CDM;)
    [   34.102306] PVR_K:  244:  (!) RGX power is down. No registers dumped
    [   34.108655] PVR_K:  244: ------[ RGX FW Trace Info ]------
    [   34.114136] PVR_K:  244: Debug log type: none
    [   34.118489] PVR_K:  244: RGX FW thread 0: Trace buffer not yet allocated
    [   34.125183] PVR_K:  244: ------[ Full CCB Status ]------
    [   34.130504] PVR_K:  244: ------[ RGX Device ID:0 End ]------
    [   34.136167] PVR_K:  244: ------[ Device ID: 128 - Phys Heaps ]------
    [   34.142534] PVR_K:  244: 0x00000000991c4a47 -> PdMs: SYSMEM, Type: UMA, default, Usage Flags: 0x00000004 (GPU_LOCAL), Refs: 11, Free Size: 6427500544B, Total Size: 6814416896B
    [   34.158157] PVR_K:  244: PMR Zombie Count: 0, PMR Zombie Count In Cleanup: 0
    [   34.165196] PVR_K:  244: PMR Live Count: 21
    [   34.169375] PVR_K:  244: ------[ System Summary Device ID:0 ]------
    [   34.175633] PVR_K:  244: Device System Power State: ON
    [   34.180767] PVR_K:  244: MaxHWTOut: 500000us, WtTryCt: 10000, WDGTOut(on,off): (10000ms,3600000ms)
    [   34.189713] PVR_K:  244: ------[ AppHint Settings ]------
    [   34.195105] PVR_K:  244:   Build Vars
    [   34.198766] PVR_K:  244:     EnableTrustedDeviceAceConfig: N
    [   34.204418] PVR_K:  244:     CleanupThreadPriority: 0x00000005
    [   34.210244] PVR_K:  244:     WatchdogThreadPriority: 0x00000000
    [   34.216156] PVR_K:  244:     HWPerfClientBufferSize: 0x000c0000
    [   34.222068] PVR_K:  244:     DevmemHistoryBufSizeLog2: 0x0000000b
    [   34.228153] PVR_K:  244:     DevmemHistoryMaxEntries: 0x00002710
    [   34.234151] PVR_K:  244:   Module Params
    [   34.238082] PVR_K:  244:     none
    [   34.241386] PVR_K:  244:   Debug Info Params
    [   34.245655] PVR_K:  244:     none
    [   34.248967] PVR_K:  244:   Debug Info Params Device ID: 0
    [   34.254372] PVR_K:  244:     none
    [   34.257680] PVR_K:  244: ------[ Active Sync Checkpoints ]------
    [   34.263681] PVR_K:  244: (SyncCP Counts: InUse:0 Max:3)
    [   34.268899] ------[ Native Fence Sync: timelines ]------
    [   34.274203] foreign_sync: @0 ctx=1 refs=1
    [   34.278210] PVR_K:  244: ------------[ PVR DBG: END ]------------
    [   34.284361] ------------[ cut here ]------------
    [   34.288968] WARNING: CPU: 2 PID: 244 at /scratch/edgeai/yocto/arago-tmp-default-glibc/work/j722s_evm-oe-linux/ti-img-rogue-driver/23.3.6512818-r0b/git/binary_j722s_linux_lws-generic_release/target_aarch64/kbuild/services/server/common/pvr_notifier.c:644 PVRSRVDebugRequest+0x514/0x6b0 [pvrsrvkm]
    [   34.315209] Modules linked in: overlay cfg80211 rpmsg_ctrl xhci_plat_hcd bluetooth ecdh_generic cdns3 ecc rfkill cdns_usb_common rpmsg_char dwc3 crct10dif_ce pci_j721e_host pci_j721e pcie_cadence_host pcie_cadence e5010_jpeg_enc cdns3_ti pvrsrvkm(O) display_connector dwc3_am62 rti_wdt wave5 videobuf2_dma_contig videobuf2_memops sii902x v4l2_mem2mem rtc_ti_k3 drm_kms_helper k3_j72xx_bandgap videobuf2_v4l2 ti_k3_dsp_remoteproc videobuf2_common ti_k3_common syscopyarea sysfillrect ti_k3_r5_remoteproc sysimgblt fb_sys_fops virtio_rpmsg_bus rpmsg_ns videodev sa2ul mc cryptodev(O) fuse drm drm_panel_orientation_quirks ipv6
    [   34.369882] CPU: 2 PID: 244 Comm: pvr_device_wdg Tainted: G           O       6.1.80-ti-g2e423244f8c0 #1
    [   34.379344] Hardware name: Texas Instruments J722S EVM (DT)
    [   34.384902] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
    [   34.391850] pc : PVRSRVDebugRequest+0x514/0x6b0 [pvrsrvkm]
    [   34.397473] lr : PVRSRVDebugRequest+0x514/0x6b0 [pvrsrvkm]
    [   34.403087] sp : ffff80000a033ca0
    [   34.406390] x29: ffff80000a033ca0 x28: 0000000000000000 x27: ffff000827c941a0
    [   34.413514] x26: ffff000824191e08 x25: ffff0008214ac408 x24: ffff0008214ac520
    [   34.420638] x23: ffff000824191f20 x22: ffff0008214ac520 x21: 0000000000000002
    [   34.427763] x20: 0000000000000000 x19: 0000000000000000 x18: ffffffffffffffff
    [   34.434887] x17: 66666f2c6e6f2874 x16: 754f54474457202c x15: ffff80008a033847
    [   34.442011] x14: 0000000000000000 x13: ffff800009161440 x12: 00000000000006f9
    [   34.449135] x11: 0000000000000253 x10: ffff8000091b9440 x9 : ffff800009161440
    [   34.456259] x8 : 00000000ffffefff x7 : ffff8000091b9440 x6 : 0000000000000000
    [   34.463382] x5 : ffff00097f123b60 x4 : ffff00097f123b60 x3 : 0000000000000000
    [   34.470506] x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff000821adc740
    [   34.477630] Call trace:
    [   34.480067]  PVRSRVDebugRequest+0x514/0x6b0 [pvrsrvkm]
    [   34.485353]  DevicesWatchdogThread_ForEachVaCb+0x108/0x170 [pvrsrvkm]
    [   34.491922]  List_PVRSRV_DEVICE_NODE_ForEach_va+0x78/0xbc [pvrsrvkm]
    [   34.498404]  DevicesWatchdogThread+0xa0/0x210 [pvrsrvkm]
    [   34.503845]  OSThreadRun+0x24/0x60 [pvrsrvkm]
    [   34.508331]  kthread+0x10c/0x110
    [   34.511558]  ret_from_fork+0x10/0x20
    [   34.515128] ---[ end trace 0000000000000000 ]---
    
    root@j722s-evm:/opt/vision_apps# 
    root@j722s-evm:/opt/vision_apps# ./vx_app_arm_opengl_mosaic.out 
    APP: Init ... !!!
    MEM: Init ... !!!
    MEM: Initialized DMA HEAP (fd=5) !!!
    MEM: Init ... Done !!!
    IPC: Init ... !!!
    IPC: Init ... Done !!!
    REMOTE_SERVICE: Init ... !!!
    REMOTE_SERVICE: Init ... Done !!!
       246.635832 s: GTC Frequency = 200 MHz
    APP: Init ... Done !!!
       246.636007 s:  VX_ZONE_INIT:Enabled
       246.636028 s:  VX_ZONE_ERROR:Enabled
       246.636038 s:  VX_ZONE_WARNING:Enabled
       246.637162 s:  VX_ZONE_INIT:[tivxPlatformCreateTargetId:116] Added target MPU-0 
       246.637505 s:  VX_ZONE_INIT:[tivxPlatformCreateTargetId:116] Added target MPU-1 
       246.637785 s:  VX_ZONE_INIT:[tivxPlatformCreateTargetId:116] Added target MPU-2 
       246.638058 s:  VX_ZONE_INIT:[tivxPlatformCreateTargetId:116] Added target MPU-3 
       246.638091 s:  VX_ZONE_INIT:[tivxInitLocal:136] Initialization Done !!!
       246.639275 s:  VX_ZONE_INIT:[tivxHostInitLocal:101] Initialization Done for HOST !!!
    EGL: version 1.5
    EGL: GL Version = (null)
    EGL: GL Vendor = (null)
    EGL: GL Renderer = (null)
    EGL: GL Extensions = (null)
       246.831713 s:  VX_ZONE_INIT:[tivxHostDeInitLocal:115] De-Initialization Done for HOST !!!
       246.836425 s:  VX_ZONE_INIT:[tivxDeInitLocal:204] De-Initialization Done !!!
    APP: Deinit ... !!!
    REMOTE_SERVICE: Deinit ... !!!
    REMOTE_SERVICE: Deinit ... Done !!!
    IPC: Deinit ... !!!
    IPC: DeInit ... Done !!!
    MEM: Deinit ... !!!
    DDR_SHARED_MEM: Alloc's: 7 alloc's of 5990452 bytes 
    DDR_SHARED_MEM: Free's : 7 free's  of 5990452 bytes 
    DDR_SHARED_MEM: Open's : 0 allocs  of 0 bytes 
    MEM: Deinit ... Done !!!
    APP: Deinit ... Done !!!
    

  • Hi,

    Could you please let me know what is the input image that you are providing here? Can you share the same?

    I ran this multiple times at my end but cannot see the PVR related errors at my end. Could you please ensure that you do not have any other changes in RTOS or Linux side?

    Regards,

    Nikhil

  • HI

    Which EVM board did you run on? Are you running the test on j722s evm?

    The SDK mainly adds sensor drivers and Linux DTB modifications.

     input image:

      input_file.tar.gz

    Before adding a patch, generate an image using vx_ app arm opengl mosaic.out:

    output1.tar.gz


    After adding or not patching, generate images for vx-app-arm_opengl_mosaic.out:

    output2.tar.gz

  • Hi,

    Yes. I'm running on J722s EVM on the downloaded SDK 9.2 (no changes)

    Your input image is of size 4147200 Bytes (which looks like a 1920 x 1080 UYVY image) (i.e. 1920 x 1080 x 2 = 4147200) 

    Could you please confirm the resolution of your input image? If yes, then can you try giving a NV12 as input?

    Regards,

    Nikhil

  • HI.
    The input file input1_file. bin is located under ti processor sdk rtos j722s evm-09-02-005-prebuilt.tar.gz. I

    t is in NV12 format, with input1_file. bin width of 640


    I am currently using the TI EVM board without reporting any errors, but its output file is not correct.Not UYVY output。


    If the input uses a 1920x1080 nv12 image, then the output image is also incorrect.

    Regards,

    gj

  • HI Nikhil

       Can you check if the generated output image is correct?

    Regards,

    gj

  • HI Nikhil

        Can this issue still be resolved?

    Regards,

    gj

  • Hi gj,

    Can you please save output from GPU and confirm that it is in YUV422 format? I can help from DSS/CSITX/OpenVX perspective, so lets first check if the output is in correct format. 

    Not sure if it is already checked out. If possible, please share the output from GPU.

    Regards,

    Brijesh 

  • HI, Brijesh

    I used the app( working-example-nv12-input-uyvy-output.tar.gz) provided by Erick above to convert NV12 images to yuv422. The format is correct, but there is a noticeable color difference. After modification, the color has significantly improved.

    Can this prove that GPU can output YUV422?

    The image saved by running vx_app_arm_opengl_mosaic.out  with the Egl Mosaic node patch provided by Nikhil is not in YUV422 format,

    My request is to convert the output of EGL mosaic nodes to YUv422 for CSITX output
    For example convert the output of vx_app_arm_opengl_masaic to YUV422,
    in my application used the egl mosaic node

    Regards,

    gj

  • Hi gj,

    I used the app( working-example-nv12-input-uyvy-output.tar.gz) provided by Erick above to convert NV12 images to yuv422. The format is correct, but there is a noticeable color difference. After modification, the color has significantly improved.

    Can this prove that GPU can output YUV422?

    I can't say, because not sure what is expected output image. If it matches with your expected output, then yes, it could be correct. 

    Once you have correct output from GPU, it can be directly fed to the CSITX node for YUV422 format output from CSITX. 

    Regards,

    Brijesh

  • HI,Brijesh

          Can I test using your method to output UYVY to CSITX?

          working-example-nv12-input-uyvy-output.tar.gz  

    The input and output images of this program are as follows:

    The input image is:

    input_nv12_image.tar.gz

    The outpu image is:

    output_yuv422.tar.gz

    this is input image:

     

    this is outpu image:

  • Hi gj,

    Not sure which is correct, but UYVY format looks more closure to the input, is this what you are expecting?

    Regards,

    Brijesh

  • HI,

        This is the output after I modified the EGL script. He is closer to input. I think the format is correct. 

        This is a GPU output saved image with minimal color difference, which can be improved in the future. Because it is currently unable to display the output of CSIXT's GPU. How to use CSITX to display GPU output more urgently?

    Tip: The UYVY output by this app does not use Egl Mosaic nodes, while my app actually uses Egl Mosaic nodes.

    I believe you understand my requirement

    Regards,

    gj

  • HI  Erick

    Why is there color difference?

    Regards,
    gj
  • gj,

    Perhaps the color space is too small. There are two color spaces supported, can you please add this to your attributes?

    attr[attrIdx++] = EGL_SAMPLE_RANGE_HINT_EXT;
    attr[attrIdx++] = EGL_YUV_FULL_RANGE_EXT:;

    You can add these for both the input and output texture. The default is "EGL_YUV_NARROW_RANGE_EXT" which is a more limited colorspace. Then try generating the output again.

    Regards,

    Erick

  • Hi Erick

    There are still some differences after adding:

    input :

    output:

    Is this normal? Can you give it a try?

    Regards,
    gj
  • Hi Brijesh

       I want to try your method, can you provide it to me? I need to display it.

    Regards,
    gj
  • Hi gj,

    Which method do you mean ? Can you please elaborate? 

    Regards,

    Brijesh

  • Also can you please check that there is no issue in the byte order, like YUYV vs UYVY? 

  • Hi,Brijesh

    I have checked this and it is UYVY.

    I need a method to convert the output of the EGL mosaic node to YUV422, and then the output format from CSITX is YUV422.

    Regards,
    gj
  • Hi gj,

    UYVY format is already YUV422, you can just directly output it via CSITX. 

    Regards,

    Brijesh

  • Hi Brijesh
       No, the egl mosaic node can only output RGBA and cannot output YUV422. This is the topic discussed in the ticket.

       Can you test vx_app_arm_opengl_mosaic? As discussed above, the UYVY image generated by vx_app_arm_opengl_masaic.out is incorrect.

    Regards,
    gj
  • HI ,Brijesh 

         No, the egl mosaic node cannot output YUV422, it can only output RGBA. Can you test it with vx_app_arm_opengl_massaic.out? This is the topic that this ticket has been discussing. 

       

    Regards,
    gj
    Hi gang:
    Below patch we has tested at EVM board. it can meet GPU transfer color space request.
    Best Regards!
    Han Tao
    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/correct_5F00_output.patch