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.

DM8107 RDK Interlaced NTSC Field at a time scale issue

I am experiencing an issue with field at a time capture of NTSC video being passed through the scaler on the RDK.  The scaler seems to distort the 720x240 fields even though it is set up to scale 720x240->720x240.  I also have the scaling coefficients set to 1/1.

Here is the VLC output with the scaler in the path:

Here is the vlc output with the scaler removed:

This is the a frame from the captureLink:

This is a frame from after the passing through the scaler:

As you can see the scaler is really distorting the image even though no scaling is being done.  Is this do to the 720x240 frame size?  Should I be setting  up custom scaler coefficents to accomplish this?

  • I guess this issue have nothing to do with frame size. You should try set custom scaler coefficients.

  • Are you using scaler link or DEI link with DEI in bypass mode. What is the scaler id used. Does it quality look good if you use scaler link but set pChObj->scCfg.bypass = TRUE;

     

  • I am using the scaler link with the pathId = SCLR_LINK_SC5 (VPS_M2M_INST_SEC0_SC5_WB2).  Setting pChObj->scCfg.bypass = TRUE in SclrLink_drvCreateChObj() did not fix the issue, which really me since removing the scaler link fixes the issue.  I have found changing out the preset scaling Coeffs can make things slightly better or slightly worse.

  • If you set bypass to TRUE scaler link is essentially doing memcpy so modifying coefficients will  have no effect.

    Pls check the following.

    1. Confirm you are using DVRRDK 4.01 version

    2. Apply attached patch and check

    diff --git a/mcfw/src_bios6/links_m3vpss/sclr/sclrLink_drv.c b/mcfw/src_bios6/links_m3vpss/sclr/sclrLink_drv.c
    index e2bcf1f..7861fe8 100755
    --- a/mcfw/src_bios6/links_m3vpss/sclr/sclrLink_drv.c
    +++ b/mcfw/src_bios6/links_m3vpss/sclr/sclrLink_drv.c
    @@ -322,6 +322,7 @@ Int32 SclrLink_drvCreateOutObj(SclrLink_Obj * pObj)
         pFormat->pitch[0]       = pChInfo->pitch[0];
         pFormat->pitch[1]       = pChInfo->pitch[1];
         pFormat->pitch[2]       = pChInfo->pitch[2];
    +    pFormat->scanFormat     = pChInfo->scanFormat;
         pFormat->bpp            = FVID2_BPP_BITS16;
         pFormat->reserved       = NULL;
     
    @@ -374,7 +375,6 @@ Int32 SclrLink_drvCreateOutObj(SclrLink_Obj * pObj)
             pOutChInfo = &pObj->info.queInfo[0].chInfo[chId];
     
             pFormat = &pObj->outObj.outFormat;
    -        pFormat->scanFormat     = pInChInfo->scanFormat;
             if (pObj->createArgs.tilerEnable)
             {
                 pOutChInfo->memType = VPS_VPDMA_MT_TILEDMEM;
    

    3. Share the console logs from start of application after applying patch

    4. Confirm you have set sclrCreatePrms. enableLineSkipSc = FALSE

    5. Confirm you are not invoking linkAPI SCLR_LINK_CMD_SKIP_FID_TYPE cmd

    6. Attach the encoded h264 bitstream along with the console logs.

  • Thank you for your reply Badri.

    I am currently on DVRRDK 4.00.  Was there a change in the HDVPSS that would allow better NTSC performance?

    We have modified 4.00 to dynamically set the correct output resolution/Scanformat when interlaced video is detected in the capture.  Our usecase starts out with a 1080p60 input and then switches to an NTSC input which is when this issue occurs.  Is there something to needs to be set in the scaler when switching between HD and SD resolutions?

    We already have the changes from the patch in our code.  enableLineSkipSc == FALSE and the SCLR_LINE_CMD_SKIP_FID_TYPE is not called in our code.  I should also mention we have tried setting lazyloading and that does not appear to have an effect either.

    I'm not certain our logs will show much since the code is fairly different from stock RDK, but I have attached them and a sample of the offending bitstream.

    2185.bad_sclr.ts.gz

     [c6xdsp ] Remote Debug Shared Memory @ 0xbff00000
     [m3video] Remote Debug Shared Memory @ 0xbff05020
     [m3vpss ] Remote Debug Shared Memory @ 0xbff0a040
     [m3vpss ] 	ISS Freq  : 500 MHz
     [m3vpss ] ***** VPSS Firmware build time 10:51:31 Jan 23 2014  EDG gcc 3.0 mode
     [m3vpss ] ***** SYSTEM  : Frequency <ORG> - 200000000, <NEW> - 250000000
     [m3vpss ] notify_attach  rtnVal  0
     [m3vpss ] initProxyServer  rtnVal  0
     [m3vpss ]  
     [m3vpss ]  *** UTILS: CPU KHz = 500000 Khz ***
     [m3vpss ]  
     [m3vpss ]  42: SYSTEM  : System Common Init in progress !!!
     [m3vpss ]  42: SYSTEM: IPC init in progress !!!
     [m3vpss ]  42: SYSTEM: Attaching to [HOST] ... 
     [m3vpss ]  45: SYSTEM: Attaching to [HOST] ... SUCCESS !!!
     [m3video] 	ISS Freq  : 500 MHz
     [m3vpss ]  236: SYSTEM: Attaching to [VIDEO-M3] ... SUCCESS !!!
     [m3video] ***** VIDEO Firmware build time 10:51:37 Jan 23 2014  EDG gcc 3.0 mode
     [m3vpss ]  236: SYSTEM: Creating MsgQ Heap [IPC_MSGQ_MSG_HEAP_2] ...
     [m3video] ***** SYSTEM  : Frequency <ORG> - 200000000, <NEW> - 250000000
     [m3vpss ]  237: SYSTEM: Creating MsgQ [VPSS-M3_MSGQ] ...
     [m3video]  
     [m3vpss ]  237: SYSTEM: Creating MsgQ [VPSS-M3_ACK_MSGQ] ...
     [m3video]  *** UTILS: CPU KHz = 500000 Khz ***
     [m3vpss ]  239: SYSTEM: Notify register to [HOST] line 0, event 15 ... 
     [m3video]  
     [m3vpss ]  239: SYSTEM: Notify register to [VIDEO-M3] line 0, event 15 ... 
     [m3video]  230: SYSTEM  : System Common Init in progress !!!
     [m3vpss ]  239: SYSTEM: IPC init DONE !!!
     [m3video]  230: SYSTEM: IPC init in progress !!!
     [m3video]  230: SYSTEM: Attaching to [HOST] ... 
     [m3video]  233: SYSTEM: Attaching to [HOST] ... SUCCESS !!!
     [m3video]  236: SYSTEM: Attaching to [VPSS-M3] ... SUCCESS !!!
     [m3video]  236: SYSTEM: Creating MsgQ Heap [IPC_MSGQ_MSG_HEAP_1] ...
     [m3video]  237: SYSTEM: Creating MsgQ [VIDEO-M3_MSGQ] ...
     [m3video]  237: SYSTEM: Creating MsgQ [VIDEO-M3_ACK_MSGQ] ...
     [m3video]  239: SYSTEM: Notify register to [HOST] line 0, event 15 ... 
     [m3video]  239: SYSTEM: Notify register to [VPSS-M3] line 0, event 15 ... 
     [m3video]  239: SYSTEM: IPC init DONE !!!
     [m3video]  246: MEM: Shared Region 2: Base = 0xae000000, Length = 0x0fec0000 (254 MB) 
     [m3vpss ]  245: MEM: Shared Region 2: Base = 0xae000000, Length = 0x0fec0000 (254 MB) 
     [m3video]  247: MEM: Shared Region 1: Base = 0x90000000, Length = 0x0d200000 (210 MB) 
     [m3vpss ]  246: MEM: Shared Region 1: Base = 0x90000000, Length = 0x0d200000 (210 MB) 
     [m3video]  249: SYSTEM  : System Common Init Done !!!
     [m3vpss ]  248: SYSTEM  : System Common Init Done !!!
     [m3video]  249: SYSTEM  : System Video Init in progress !!!
     [m3vpss ]  248: SYSTEM  : System VPSS Init in progress !!!
     [m3video]  249: SYSTEM  : System Video Init Done !!!
     [m3vpss ]  248: SYSTEM  : Power optimizations enabled:OSC1 Disabled
     [m3video]  250: SYSTEM: Creating ListMP [VIDEO-M3_IPC_OUT_0] in region 0 ...
     [m3video]  250: SYSTEM: Creating ListMP [VIDEO-M3_IPC_IN_0] in region 0 ...
     [m3video]  250: SYSTEM: ListElem Shared Addr = 0xbdfb4680
     [m3video]  253: SYSTEM: Creating ListMP [VIDEO-M3_IPC_OUT_1] in region 0 ...
     [m3video]  253: SYSTEM: Creating ListMP [VIDEO-M3_IPC_IN_1] in region 0 ...
     [m3video]  253: SYSTEM: ListElem Shared Addr = 0xbdfb7b80
     [m3video]  260: SYSTEM: Creating ListMP [VIDEO-M3_IPC_OUT_19] in region 0 ...
     [m3video]  260: SYSTEM: Creating ListMP [VIDEO-M3_IPC_IN_19] in region 0 ...
     [m3video]  261: SYSTEM: ListElem Shared Addr = 0xbdfbb080
     [m3video]  263: SYSTEM: Creating ListMP [VIDEO-M3_IPC_OUT_20] in region 0 ...
     [m3video]  264: SYSTEM: Creating ListMP [VIDEO-M3_IPC_IN_20] in region 0 ...
     [m3video]  264: SYSTEM: ListElem Shared Addr = 0xbdfe0880
     [m3video]  267: SYSTEM: Creating ListMP [VIDEO-M3_IPC_OUT_21] in region 0 ...
     [m3vpss ] === I2C0/2 Clk is active ===
     [m3video]  267: SYSTEM: Creating ListMP [VIDEO-M3_IPC_IN_21] in region 0 ...
     [m3vpss ]  271: SYSTEM: Creating ListMP [VPSS-M3_IPC_OUT_0] in region 0 ...
     [m3video]  267: SYSTEM: ListElem Shared Addr = 0xbe006080
     [m3vpss ]  271: SYSTEM: Creating ListMP [VPSS-M3_IPC_IN_0] in region 0 ...
     [m3vpss ]  271: SYSTEM: ListElem Shared Addr = 0xbe02b880
     [m3vpss ]  274: SYSTEM: Creating ListMP [VPSS-M3_IPC_OUT_1] in region 0 ...
     [m3vpss ]  274: SYSTEM: Creating ListMP [VPSS-M3_IPC_IN_1] in region 0 ...
     [m3vpss ]  274: SYSTEM: ListElem Shared Addr = 0xbe02ed80
     [m3video]  284: SYSTEM: Creating ListMP [VIDEO-M3_IPC_OUT_24] in region 0 ...
     [m3video]  285: SYSTEM: Creating ListMP [VIDEO-M3_IPC_IN_24] in region 0 ...
     [m3video]  285: SYSTEM: ListElem Shared Addr = 0xbe032280
     [m3video]  287: SYSTEM: Creating ListMP [VIDEO-M3_IPC_OUT_25] in region 0 ...
     [m3vpss ]  292: SYSTEM: Creating ListMP [VPSS-M3_IPC_OUT_19] in region 0 ...
     [m3video]  288: SYSTEM: Creating ListMP [VIDEO-M3_IPC_IN_25] in region 0 ...
     [m3vpss ]  293: SYSTEM: Creating ListMP [VPSS-M3_IPC_IN_19] in region 0 ...
     [m3video]  288: SYSTEM: ListElem Shared Addr = 0xbe05d800
     [m3vpss ]  293: SYSTEM: ListElem Shared Addr = 0xbe088d80
     [m3video]  290: HDVICP: Doing PRCM for IVAHD[0] ... 
     [m3video]  290: HDVICP: PRCM for IVAHD[0] ... DONE.
     [m3vpss ]  296: SYSTEM: Creating ListMP [VPSS-M3_IPC_OUT_20] in region 0 ...
     [m3video]  291: UTILS: DMA: HWI Create for INT62 !!!
     [m3video]  292: SYSTEM  : ISS Init in progress !!!
     [m3video]  292: SYSTEM  : ISS Power-ON in progress !!!
     [m3video]  302: SYSTEM  : ISS Power-ON in progress DONE !!!
     [m3vpss ]  296: SYSTEM: Creating ListMP [VPSS-M3_IPC_IN_20] in region 0 ...
     [m3video]  302: SYSTEM  : ISS Init in progress DONE !!!
     [m3vpss ]  296: SYSTEM: ListElem Shared Addr = 0xbe0ae580
     [m3video]  302: VCOP BOOST BIT is Set
     [m3vpss ]  299: SYSTEM: Creating ListMP [VPSS-M3_IPC_OUT_21] in region 0 ...
     [m3video]  302: SYSTEM  : VCOP Init in progress !!!
     [m3vpss ]  299: SYSTEM: Creating ListMP [VPSS-M3_IPC_IN_21] in region 0 ...
     [m3video]  302: SYSTEM  : VCOP needs 172 B of memory !!!
     [m3vpss ]  300: SYSTEM: ListElem Shared Addr = 0xbe0d3d80
     [m3video]  304: SYSTEM  : VCOP Init in progress DONE !!!
     [m3vpss ]  301: SYSTEM : HDVPSS Drivers Version: HDVPSS_01_00_01_37
     [m3video]  304: SYSTEM  : Initializing Links !!! 
     [m3vpss ]  302: SYSTEM  : FVID2 Init in progress !!!
     [m3video]  304: SYSTEM  : FREE SPACE : System Heap      = 6264504 B, Mbx = 10240 msgs) 
     [m3video]  304: SYSTEM  : FREE SPACE : SR0 Heap         = 24932480 B (23 MB) 
     [m3vpss ] TILER_STATS: CNT :8BIT
     [m3video]  304: SYSTEM  : FREE SPACE : Frame Buffer     = 267124608 B (254 MB) 
     [m3vpss ] TILER_STATS: CNT RESOLUTION:    16384 x 8576
     [m3video]  305: SYSTEM  : FREE SPACE : Bitstream Buffer = 220200832 B (209 MB) 
     [m3vpss ] TILER_STATS: BUCKET RESOLUTION: 16384 x 8572
     [m3video]  305: SYSTEM: Opening MsgQ [VPSS-M3_MSGQ] ...
     [m3video]  307: SYSTEM  : FREE SPACE : Tiler 8-bit      = 140443648 B (133 MB)  - TILER ON 
     [m3vpss ] TILER_STATS: NUM FREE BUCKETS:  1
     [m3video]  307: SYSTEM  : FREE SPACE : Tiler 16-bit     = 94371840 B (90 MB)  - TILER ON 
     [m3vpss ] TILER_STATS: NUM USED BUCKETS:  0
     [m3vpss ] TILER_STATS: TOTAL FREE AREA:   140443648 (99 %)
     [m3vpss ] TILER_STATS: TOTAL USED AREA:   0 (0 %)
     [m3video]  374: SYSTEM  : Initializing Links ... DONE !!! 
     [m3vpss ] TILER_STATS: CNT :16BIT
     [m3vpss ] TILER_STATS: CNT RESOLUTION:    32768 x 2880
     [m3vpss ] TILER_STATS: BUCKET RESOLUTION: 32768 x 2880
     [m3vpss ] TILER_STATS: NUM FREE BUCKETS:  1
     [m3vpss ] TILER_STATS: NUM USED BUCKETS:  0
     [m3vpss ] TILER_STATS: TOTAL FREE AREA:   94371840 (100 %)
     [m3vpss ] TILER_STATS: TOTAL USED AREA:   0 (0 %)
     [m3vpss ] *** VPDMA Firmware Loading... ***
     [m3vpss ] VPDMA Firmware Address = 0x9ed12b40
     [m3vpss ] VPDMA Load Address     = 0x4810d004
     [m3vpss ] VPDMA Firmware Version = 0x4d0001b7
     [m3vpss ] VPDMA List Busy Status = 0x00000000
     [m3vpss ] *** VPDMA Firmware Load Success ***
     [m3vpss ] Dc_init: Creating Configuration Overlay
     [m3vpss ] Dc_init: Create and Initialize VPS Node Table
     [m3vpss ] JTW: Print DcNode table
     [m3vpss ] =======================
     [m3vpss ] Node Number = 0
     [m3vpss ] Input Nodes    = 30 
     [m3vpss ] Enabled Inputs = 30 
     [m3vpss ] Output Nodes    = 14 
     [m3vpss ] Enabled Output  = 
     [m3vpss ] Node Number = 1
     [m3vpss ] Input Nodes    = 04 05 06 
     [m3vpss ] Enabled Inputs = 
     [m3vpss ] Output Nodes    = 14 
     [m3vpss ] Enabled Output  = 
     [m3vpss ] Node Number = 2
     [m3vpss ] Input Nodes    = 04 05 06 
     [m3vpss ] Enabled Inputs = 
     [m3vpss ] Output Nodes    = 16 
     [m3vpss ] Enabled Output  = 
     [m3vpss ] Node Number = 3
     [m3vpss ] Input Nodes    = 04 05 06 10 
     [m3vpss ] Enabled Inputs = 
     [m3vpss ] Output Nodes    = 25 
     [m3vpss ] Enabled Output  = 
     [m3vpss ] Node Number = 4
     [m3vpss ] Input Nodes    = 07 
     [m3vpss ] Enabled Inputs = 07 
     [m3vpss ] Output Nodes    = 01 02 03 
     [m3vpss ] Enabled Output  = 
     [m3vpss ] Node Number = 5
     [m3vpss ] Input Nodes    = 08 
     [m3vpss ] Enabled Inputs = 08 
     [m3vpss ] Output Nodes    = 01 02 03 
     [m3vpss ] Enabled Output  = 
     [m3vpss ] Node Number = 6
     [m3vpss ] Input Nodes    = 09 
     [m3vpss ] Enabled Inputs = 09 
     [m3vpss ] Output Nodes    = 01 02 03 
     [m3vpss ] Enabled Output  = 
     [m3vpss ] Node Number = 7
     [m3vpss ] Input Nodes    = 
     [m3vpss ] Enabled Inputs = 
     [m3vpss ] Output Nodes    = 04 
     [m3vpss ] Enabled Output  = 04 
     [m3vpss ] Node Number = 8
     [m3vpss ] Input Nodes    = 
     [m3vpss ] Enabled Inputs = 
     [m3vpss ] Output Nodes    = 05 
     [m3vpss ] Enabled Output  = 05 
     [m3vpss ] Node Number = 9
     [m3vpss ] Input Nodes    = 
     [m3vpss ] Enabled Inputs = 
     [m3vpss ] Output Nodes    = 06 
     [m3vpss ] Enabled Output  = 06 
     [m3vpss ] Node Number = 10
     [m3vpss ] Input Nodes    = 
     [m3vpss ] Enabled Inputs = 
     [m3vpss ] Output Nodes    = 03 
     [m3vpss ] Enabled Output  = 
     [m3vpss ] Node Number = 11
     [m3vpss ] Input Nodes    = 
     [m3vpss ] Enabled Inputs = 
     [m3vpss ] Output Nodes    = 19 
     [m3vpss ] Enabled Output  = 19 
     [m3vpss ] Node Number = 12
     [m3vpss ] Input Nodes    = 
     [m3vpss ] Enabled Inputs = 
     [m3vpss ] Output Nodes    = 20 
     [m3vpss ] Enabled Output  = 20 
     [m3vpss ] Node Number = 13
     [m3vpss ] Input Nodes    = 
     [m3vpss ] Enabled Inputs = 
     [m3vpss ] Output Nodes    = 21 
     [m3vpss ] Enabled Output  = 21 
     [m3vpss ] Node Number = 14
     [m3vpss ] Input Nodes    = 00 01 
     [m3vpss ] Enabled Inputs = 
     [m3vpss ] Output Nodes    = 15 
     [m3vpss ] Enabled Output  = 15 
     [m3vpss ] Node Number = 15
     [m3vpss ] Input Nodes    = 14 
     [m3vpss ] Enabled Inputs = 14 
     [m3vpss ] Output Nodes    = 17 24 
     [m3vpss ] Enabled Output  = 17 
     [m3vpss ] Node Number = 16
     [m3vpss ] Input Nodes    = 02 
     [m3vpss ] Enabled Inputs = 
     [m3vpss ] Output Nodes    = 18 
     [m3vpss ] Enabled Output  = 18 
     [m3vpss ] Node Number = 17
     [m3vpss ] Input Nodes    = 15 
     [m3vpss ] Enabled Inputs = 15 
     [m3vpss ] Output Nodes    = 22 23 
     [m3vpss ] Enabled Output  = 
     [m3vpss ] Node Number = 18
     [m3vpss ] Input Nodes    = 16 
     [m3vpss ] Enabled Inputs = 16 
     [m3vpss ] Output Nodes    = 22 24 23 
     [m3vpss ] Enabled Output  = 
     [m3vpss ] Node Number = 19
     [m3vpss ] Input Nodes    = 11 
     [m3vpss ] Enabled Inputs = 11 
     [m3vpss ] Output Nodes    = 22 24 25 23 
     [m3vpss ] Enabled Output  = 
     [m3vpss ] Node Number = 20
     [m3vpss ] Input Nodes    = 12 
     [m3vpss ] Enabled Inputs = 12 
     [m3vpss ] Output Nodes    = 22 24 25 23 
     [m3vpss ] Enabled Output  = 
     [m3vpss ] Node Number = 21
     [m3vpss ] Input Nodes    = 13 
     [m3vpss ] Enabled Inputs = 13 
     [m3vpss ] Output Nodes    = 22 24 25 23 
     [m3vpss ] Enabled Output  = 
     [m3vpss ] Node Number = 22
     [m3vpss ] Input Nodes    = 17 18 19 20 21 
     [m3vpss ] Enabled Inputs = 
     [m3vpss ] Output Nodes    = 26 
     [m3vpss ] Enabled Output  = 
     [m3vpss ] Node Number = 23
     [m3vpss ] Input Nodes    = 17 18 19 20 21 
     [m3vpss ] Enabled Inputs = 
     [m3vpss ] Output Nodes    = 27 
     [m3vpss ] Enabled Output  = 
     [m3vpss ] Node Number = 24
     [m3vpss ] Input Nodes    = 15 18 19 20 21 
     [m3vpss ] Enabled Inputs = 
     [m3vpss ] Output Nodes    = 28 
     [m3vpss ] Enabled Output  = 
     [m3vpss ] Node Number = 25
     [m3vpss ] Input Nodes    = 03 19 20 21 
     [m3vpss ] Enabled Inputs = 
     [m3vpss ] Output Nodes    = 29 
     [m3vpss ] Enabled Output  = 
     [m3vpss ] Node Number = 26
     [m3vpss ] Input Nodes    = 22 
     [m3vpss ] Enabled Inputs = 
     [m3vpss ] Output Nodes    = 
     [m3vpss ] Enabled Output  = 
     [m3vpss ] Node Number = 27
     [m3vpss ] Input Nodes    = 23 
     [m3vpss ] Enabled Inputs = 
     [m3vpss ] Output Nodes    = 
     [m3vpss ] Enabled Output  = 
     [m3vpss ] Node Number = 28
     [m3vpss ] Input Nodes    = 24 
     [m3vpss ] Enabled Inputs = 
     [m3vpss ] Output Nodes    = 
     [m3vpss ] Enabled Output  = 
     [m3vpss ] Node Number = 29
     [m3vpss ] Input Nodes    = 25 
     [m3vpss ] Enabled Inputs = 
     [m3vpss ] Output Nodes    = 
     [m3vpss ] Enabled Output  = 
     [m3vpss ] Node Number = 30
     [m3vpss ] Input Nodes    = 
     [m3vpss ] Enabled Inputs = 
     [m3vpss ] Output Nodes    = 00 
     [m3vpss ] Enabled Output  = 00 
     [m3vpss ] Dc_init: Enabling clock for COMP
     [m3vpss ] Dc_init: Registering to FVID2
     [m3vpss ]  391: SYSTEM  : FVID2 Init in progress DONE !!!
     [m3vpss ]  391: SYSTEM  : Device Init in progress !!!
     [m3vpss ]  479: SYSTEM  : Device Init in progress DONE !!!
     [m3vpss ] 	HDVPSS Freq  : 240 MHz
     [m3vpss ]  523: SYSTEM  : System VPSS Init Done !!!
     [m3vpss ]  524: UTILS: DMA: HWI Create for INT63 !!!
     [m3vpss ]  525: SYSTEM  : Initializing Links !!! 
     [m3vpss ]  525: SYSTEM  : FREE SPACE : System Heap      = 251488 B, Mbx = 10240 msgs) 
     [m3vpss ]  525: SYSTEM  : FREE SPACE : SR0 Heap         = 24932480 B (23 MB) 
     [m3vpss ]  525: SYSTEM  : FREE SPACE : Frame Buffer     = 262814592 B (250 MB) 
     [m3vpss ]  525: SYSTEM  : FREE SPACE : Bitstream Buffer = 220200832 B (209 MB) 
     [m3vpss ] TILER_STATS: CNT :8BIT
     [m3vpss ] TILER_STATS: CNT RESOLUTION:    16384 x 8576
     [m3vpss ] TILER_STATS: BUCKET RESOLUTION: 16384 x 8572
     [m3vpss ] TILER_STATS: NUM FREE BUCKETS:  1
     [m3vpss ] TILER_STATS: NUM USED BUCKETS:  0
     [m3vpss ] TILER_STATS: TOTAL FREE AREA:   140443648 (99 %)
     [m3vpss ] TILER_STATS: TOTAL USED AREA:   0 (0 %)
     [m3vpss ] TILER_STATS: CNT :16BIT
     [m3vpss ] TILER_STATS: CNT RESOLUTION:    32768 x 2880
     [m3vpss ] TILER_STATS: BUCKET RESOLUTION: 32768 x 2880
     [m3vpss ] TILER_STATS: NUM FREE BUCKETS:  1
     [m3vpss ] TILER_STATS: NUM USED BUCKETS:  0
     [m3vpss ] TILER_STATS: TOTAL FREE AREA:   94371840 (100 %)
     [m3vpss ] TILER_STATS: TOTAL USED AREA:   0 (0 %)
     [m3vpss ]  527: SYSTEM  : FREE SPACE : Tiler 8-bit      = 140443648 B (133 MB)  - TILER ON 
     [m3vpss ]  527: SYSTEM  : FREE SPACE : Tiler 16-bit     = 94371840 B (90 MB)  - TILER ON 
     [m3vpss ]  683: SYSTEM  : Initializing Links ... DONE !!! 
     [m3vpss ]  683: SYSTEM  : Set Static L3 pressure for HDVPSS as High
     [m3vpss ] dcConfigHal : HQ Resource is allocated
     [m3vpss ] dcConfigHal : Configuring EDE
     [m3vpss ] dcConfigVencMode: current retVal 0
     [m3vpss ] dcConfigVencMode: current retVal 0
     [m3vpss ]  3990: Starting DisplayCtrlInit: configExtVideoEncoder is 0 and resolution is hdmi:0xd,dvo2:0xd,sd:0x0 and tiedDevices is x5
     [m3vpss ] JTW: Use ConfigDvo2
     [m3vpss ] JTW: Venc index 0 id=1 standard=xe
     [m3vpss ] JTW: Venc index 1 id=4 standard=xe
     [m3vpss ] JTW: Venc index 2 id=8 standard=x0
     [m3vpss ] JTW: Venc index 3 id=0 standard=x0
     [m3vpss ] JTW: vencType:0 resolution:13 clock:148500 dvoFmt:2
     [m3vpss ] JTW: vencType:2 resolution:13 clock:148500 dvoFmt:1
     [m3vpss ] JTW: DVO2 output enabled
     [m3vpss ] JTW: HDMI output enabled
     [m3vpss ] JTW: SD output enabled
     [m3vpss ] selecting clock source
     [m3vpss ] Setting Config
     [m3vpss ] dcCtrlNodeInput: Enabling input 5 on Node 2
     [m3vpss ] dcCtrlNodeInput: Enabling input 2 on Node 16
     [m3vpss ] dcCtrlNodeInput: Enabling input 18 on Node 22
     [m3vpss ] dcCtrlNodeInput: Enabling input 18 on Node 24
     [m3vpss ] dcCtrlNodeInput: Enabling input 10 on Node 3
     [m3vpss ] dcCtrlNodeInput: Enabling input 3 on Node 25
     [m3vpss ] dcCtrlNodeInput: Enabling input 19 on Node 22
     [m3vpss ] dcCtrlNodeInput: Enabling input 19 on Node 24
     [m3vpss ] dcCtrlNodeInput: Enabling input 21 on Node 25
     [m3vpss ] JTW: venc index 0: vencId:1 mode:0x0 standard:0xe (0x0)
     [m3vpss ] JTW: venc index 1: vencId:4 mode:0x0 standard:0xe (0x0)
     [m3vpss ] JTW: venc index 2: vencId:8 mode:0x0 standard:0x0 (0x0)
     [m3vpss ] JTW: vencs mask 0xd
     [m3vpss ] dcConfigVencMode: current retVal 0
     [m3vpss ] dcConfigVencMode: tiedVencs set to x5
     [m3vpss ] done with display ctrl init
     [m3vpss ]  4053: CAPTURE: Create in progress !!!
     [m3vpss ]  1920x1080 detected
     [m3vpss ]  4064: CAPTURE: VIP0 PortA capture mode is [16-bit, Non-mux Embedded Sync] scanFormat 1 !!! 
     [m3vpss ]  4064: CAPTURE: VIP0 PortA capture mode is [16-bit, Non-mux Embedded Sync] !!! 
     [m3vpss ] capture handle create handle != NULL is 1, createStatus is 0
     [m3vpss ]  1920x1080 detected
     [m3vpss ]  4193: CAPTURE: VIP1 PortA capture mode is [16-bit, Non-mux Embedded Sync] scanFormat 1 !!! 
     [m3vpss ]  4193: CAPTURE: VIP1 PortA capture mode is [16-bit, Non-mux Embedded Sync] !!! 
     [m3vpss ] capture handle create handle != NULL is 1, createStatus is 0
     [m3vpss ]  UTILS: DMA: Allocated CH (TCC) = 58 (58)
     [m3vpss ]  UTILS: DMA: 0 of 4: Allocated PaRAM = 58 (0x49004740)
     [m3vpss ]  UTILS: DMA: 1 of 4: Allocated PaRAM = 64 (0x49004800)
     [m3vpss ]  UTILS: DMA: 2 of 4: Allocated PaRAM = 65 (0x49004820)
     [m3vpss ]  UTILS: DMA: 3 of 4: Allocated PaRAM = 66 (0x49004840)
     [m3vpss ] CAPTURE::HEAPID:0	USED:520
     [m3vpss ] CAPTURE::HEAPID:4	USED:49766400
     [m3vpss ]  4323: CAPTURE: Create Done !!!
     [m3vpss ]  4324: SCLR: Create in progress !!!
     [m3vpss ]  4389: SCLR:  0: 0xb1392480, 1920 x 1080, 003f4800 B
     [m3vpss ]  4389: SCLR:  1: 0xb1786c80, 1920 x 1080, 003f4800 B
     [m3vpss ]  4389: SCLR:  2: 0xb1b7b480, 1920 x 1080, 003f4800 B
     [m3vpss ]  4390: SCLR    : Loading Up-scaling Co-effs ... 
     [m3vpss ]  4390: SCLR    : Co-effs Loading ... DONE !!!
     [m3vpss ] SCLR:HEAPID:0	USED:64
     [m3vpss ] SCLR:HEAPID:1	USED:5952
     [m3vpss ] SCLR:HEAPID:4	USED:12441600
     [m3vpss ]  4390: SCLR: Create Done !!!
     [m3vpss ]  4390: SCLR: Create in progress !!!
     [m3vpss ]  4455: SCLR:  0: 0xb1f6fc80, 1920 x 1080, 003f4800 B
     [m3vpss ]  4455: SCLR:  1: 0xb2364480, 1920 x 1080, 003f4800 B
     [m3vpss ]  4456: SCLR:  2: 0xb2758c80, 1920 x 1080, 003f4800 B
     [m3vpss ]  4456: SCLR    : Loading Up-scaling Co-effs ... 
     [m3vpss ]  4456: SCLR    : Co-effs Loading ... DONE !!!
     [m3vpss ] SCLR:HEAPID:0	USED:64
     [m3vpss ] SCLR:HEAPID:1	USED:2432
     [m3vpss ] SCLR:HEAPID:4	USED:12441600
     [m3vpss ]  4457: SCLR: Create Done !!!
     [m3vpss ]  4458: MERGE   : Create Done !!!
     [m3vpss ]  4458: NSF: Create in progress !!!
     [m3vpss ] NSF: bufs per chn is 6
     [m3vpss ] NSF: bufs per chn is 6
     [m3video]  4656: IPC_IN_M3   : Create in progress !!!
     [m3vpss ] nsf handle create handle != NULL is 1
     [m3video]  4656: SYSTEM: Opening ListMP [VPSS-M3_IPC_OUT_0] ...
     [m3video]  4656: SYSTEM: Opening ListMP [VPSS-M3_IPC_IN_0] ...
     [m3vpss ] NSF::HEAPID:0	USED:128
     [m3vpss ] NSF::HEAPID:1	USED:6336
     [m3vpss ] NSF::HEAPID:4	USED:37601280
     [m3vpss ]  4654: NSF: Create Done !!!
     [m3vpss ]  4654: IPC_OUT_M3   : Create in progress !!!
     [m3vpss ]  4655: IPC_OUT_M3   : Create Done !!!
     [m3video]  4659: IPC_IN_M3   : Create Done !!!
     [m3video]  4660: ENCODE: Create in progress ... !!!
     [m3video]  4729: ENCODE: Creating CH0 of 1920 x 1080, pitch = (1920, 1920) [PROGRESSIVE] [NON-TILED  ], bitrate = 2000 Kbps ... 
     [m3video]  	4730: ENCODE: Creating ChObj
     [m3video]  	4730: ENCODE: Creating EncObj
     [m3video] input content type detected is 0
     [m3video] H.264 level 40 mbPerFrame 8160 mbPerSecond 244800 currDPB 3060.000000
     [m3video] setting videoMaxDelayMs to 2000
     [m3video] creating h264 alg
     [m3video] setting static HRDBufferSize to 4000000 using maxdelay of 2000
     [m3video] calling enc_link_h264_create for TI encoder
     [m3video] calling ForceDisableTileAlloc
     [m3video] ENCLINK_H264:HEAPID:0	USED:13808
     [m3video] ENCLINK_H264:HEAPID:3	USED:7176192
     [m3video] done creating h264 alg
     [m3video]  	4769: ENCODE: on to next channel
     [m3video]  4769: ENCODE: Creating CH1 of 1920 x 1080, pitch = (1920, 1920) [PROGRESSIVE] [NON-TILED  ], bitrate = 2000 Kbps ... 
     [m3video]  	4769: ENCODE: Creating ChObj
     [m3video]  	4769: ENCODE: Creating EncObj
     [m3video] input content type detected is 0
     [m3video] H.264 level 40 mbPerFrame 8160 mbPerSecond 244800 currDPB 3060.000000
     [m3video] setting videoMaxDelayMs to 2000
     [m3video] creating h264 alg
     [m3video] setting static HRDBufferSize to 4000000 using maxdelay of 2000
     [m3video] calling enc_link_h264_create for TI encoder
     [m3video] calling ForceDisableTileAlloc
     [m3vpss ] SCLR: output res change for channel 0
     [m3video] ENCLINK_H264:HEAPID:0	USED:11912
     [m3vpss ] SCLR: set output res on ch 0 to 1920x1080
     [m3video] ENCLINK_H264:HEAPID:3	USED:7176192
     [m3vpss ] SCLR: output res change for channel 0
     [m3video] done creating h264 alg
     [m3vpss ] SCLR: set output res on ch 0 to 1920x1080
     [m3video]  	4808: ENCODE: on to next channel
     [m3video]  4808: ENCODE: All CH Create ... DONE !!!
     [m3vpss ]  4826: CAPTURE: Start in progress !!!
     [m3video] ENCLINK:HEAPID:0	USED:25760
     [m3video] ENCLINK:HEAPID:2	USED:12533760
     [m3video] ENCLINK:HEAPID:3	USED:14352384
     [m3video]  4808: ENCODE: Create ... DONE !!!
     [m3video]  4809: IPC_BITS_OUT   : Create in progress !!!
     [m3video]  4811: IPC_BITS_OUT   : Create Done !!!
     [m3vpss ]  4926: CAPTURE: Enabled Time Stamping !!!
     [m3vpss ]  4927: CAPTURE: Enabled Time Stamping !!!
     [m3vpss ]  4928: CAPTURE: Start Done !!!
     [m3vpss ] stoping vip inst 0
     [m3vpss ] deleteing vip inst 0
     [m3vpss ] creating vip inst 0
     [m3vpss ]  1920x1080 detected
     [m3vpss ]  11454: CAPTURE: VIP0 PortA capture mode is [ 8-bit, Non-mux Embedded Sync] scanFormat 1 !!! 
     [m3vpss ]  11454: CAPTURE: VIP0 PortA capture mode is [ 8-bit, Non-mux Embedded Sync] !!! 
     [m3vpss ] capture handle create handle != NULL is 1, createStatus is 0
     [m3vpss ] starting vip inst 0
     [m3vpss ]  11591: CAPTURE: Enabled Time Stamping !!!
     [m3vpss ]  11634: SCLR    : Loading 1 to 1-scaling Co-effs ... 
     [m3vpss ]  11634: SCLR    : Co-effs Loading ... DONE !!!
     [m3video]  Channel:0 inputframerate:30 targetfps:30
     [m3video] ENCLINK: rejecting frame expected fid 0 fid 1
     [m3video] ENCLINK: rejecting frame expected fid 0 fid 1
     [m3vpss ] Capt ch:0 720x240 (3840) 0
     [m3vpss ] SCLR: new height 1080 -> 240
     [m3vpss ] SCLR: new width 1920 -> 720
     [m3vpss ] SCLR: ch:0 new scan format detected! 0
     [m3vpss ] SCLR: progressive->interlaced new out height 540
     [m3vpss ] SCLR: INTERLACED format detected!
     [m3vpss ]  11703: SCLR    : Loading Up-scaling Co-effs ... 
     [m3vpss ]  11703: SCLR    : Co-effs Loading ... DONE !!!
     [m3vpss ] NSF: new height of 540 detected!
     [m3vpss ] NSF: ch:0 INTERLACED format detected!
     [m3video] ENCLINK: rejecting frame expected fid 0 fid 1
     [m3video] ENCLINK: rejecting frame expected fid 0 fid 1
     [m3video] ENCLINK: rejecting frame expected fid 0 fid 1
     [m3video] ENCLINK: rejecting frame expected fid 0 fid 1
     [m3video] ENCLINK: rejecting frame expected fid 0 fid 1
     [m3video] ENCLINK: rejecting frame expected fid 0 fid 1
     [m3video] ENCLINK: rejecting frame expected fid 0 fid 1
     [m3video] ENCLINK: rejecting frame expected fid 0 fid 1
     [m3video] ENCLINK: rejecting frame expected fid 0 fid 1
     [m3video] ENCLINK: rejecting frame expected fid 0 fid 1
     [m3video] ENCLINK: rejecting frame expected fid 0 fid 1
     [m3video] ENCLINK: rejecting frame expected fid 0 fid 1
     [m3video] ENCLINK: rejecting frame expected fid 0 fid 1
     [m3video] ENCLINK: rejecting frame expected fid 0 fid 1
     [m3video] ENCLINK: rejecting frame expected fid 0 fid 1
     [m3video] ENCLINK: rejecting frame expected fid 0 fid 1
     [m3video] ENCLINK: rejecting frame expected fid 0 fid 1
     [m3video] ENCLINK: rejecting frame expected fid 0 fid 1
     [m3video] ENCLINK: rejecting frame expected fid 0 fid 1
     [m3video] ENCLINK: rejecting frame expected fid 0 fid 1
     [m3video] ENCLINK: rejecting frame expected fid 0 fid 1
     [m3video] ENCLINK: rejecting frame expected fid 0 fid 1
     [m3video] ENCLINK: rejecting frame expected fid 0 fid 1
     [m3video] ENCLINK: rejecting frame expected fid 0 fid 1
     [m3video] ENCLINK: rejecting frame expected fid 0 fid 1
     [m3video] ENCLINK: rejecting frame expected fid 0 fid 1
     [m3video] ENCLINK: rejecting frame expected fid 0 fid 1
     [m3video] ENCLINK: rejecting frame expected fid 0 fid 1
     [m3video] ENCLINK: rejecting frame expected fid 0 fid 1
     [m3video] ENCLINK: rejecting frame expected fid 0 fid 1
     [m3video] ENCLINK: rejecting frame expected fid 0 fid 1
     [m3video] ENCLINK: rejecting frame expected fid 0 fid 1
     [m3video]  *** EncLink_codecSetIntraRefresh method:0 rate:0
     [m3vpss ] SCLR: output res change for channel 0
     [m3vpss ] SCLR: set output res on ch 0 to 720x240
     [m3vpss ] Set ExpectedIncrement for chId 0 queId 0 to 450000
     [m3video]  Channel:0 inputframerate:30 targetfps:30
     [m3video] ENCLINK: rejecting frame expected fid 0 fid 1
     [m3vpss ] Get ExpectedIncrement for chId 0 queId 0
     [m3vpss ] CAPTURE skip fields queId 0 chId 0 ratio 1/1
     [m3vpss ] CAPTURE Setting frameSkipMask to fffffffc bit len 2 for ch 0
     [m3vpss ]  12786: SCLR    : Loading 1 to 1-scaling Co-effs ... 
     [m3vpss ]  12786: SCLR    : Co-effs Loading ... DONE !!!
     [m3video]  Channel:0 inputframerate:30 targetfps:30
     [m3video] ENC: Setting rtChInfoUpdate since one was missed
     [m3vpss ] NSF: new height of 240 detected!
     [m3video] ENC: new height 240
     [m3vpss ] NSF: ch:0 INTERLACED format detected!
     [m3video] ENC: new scan format 0
     [m3video] ENC interlaced detected
     [m3video] ENC: new numUnitsInTick 0 -> 1000
     [m3video] rtUpdate new create setting needed for 720x240 on channel 0 restarting alg...
     [m3video] MemoryLeak:STAGE:0	HEAPNUM:0	ALLOC=13808	FREED=11912
     [m3video] setting static HRDBufferSize to 16000000 using maxdelay of 2000
     [m3video] calling enc_link_h264_create for TI encoder
     [m3video] calling ForceDisableTileAlloc
     [m3video] ENCLINK_H264:HEAPID:0	USED:11912
     [m3video] ENCLINK_H264:HEAPID:3	USED:7569408
     [m3video] Enc: 720x240 (736)
     [m3video] batch new static settings needed restarting alg for channel 0...
     [m3video] setting static HRDBufferSize to 16000000 using maxdelay of 2000
     [m3video] calling enc_link_h264_create for TI encoder
     [m3video] calling ForceDisableTileAlloc
     [m3video] ENCLINK_H264:HEAPID:0	USED:11912
     [m3video] ENCLINK_H264:HEAPID:3	USED:7569408
     [m3video] ENCLINK: rejecting frame expected fid 0 fid 1
     [m3video] Skipping field fid:0 expected fid:1 3e1604a8
     [m3video] Freeing frames from skipped ReqObj 3e1604a8
     [m3vpss ] Capt ch:0 720x240 (3840) 0
     [m3vpss ] SCLR: INTERLACED format detected!
     [m3video] **** JTW GDR disabled ****
     [m3video] ENC interlaced detected
     [m3vpss ] CAPT: Div 1000 -> Div 1001 detected queId 0 chId 0
     [m3video] ENC: new numUnitsInTick 1000 -> 1001
     [m3vpss ] SCLR: INTERLACED format detected!
     [m3video] rtUpdate new create setting needed for 720x240 on channel 0 restarting alg...
     [m3vpss ]  29470: SCLR    : Loading 1 to 1-scaling Co-effs ... 
     [m3vpss ]  29470: SCLR    : Co-effs Loading ... DONE !!!
     [m3vpss ] NSF: ch:0 INTERLACED format detected!
     [m3video] freeChInProcessFrame frame 3f694368
     [m3video] freeChInProcessFrame frame 3f6943a4
     [m3video] freeChInProcessFrame frame 3f69441c
     [m3video] freeChInProcessFrame frame 3f694458
     [m3video] setting static HRDBufferSize to 16000000 using maxdelay of 2000
     [m3video] calling enc_link_h264_create for TI encoder
     [m3video] calling ForceDisableTileAlloc
     [m3video] ENCLINK_H264:HEAPID:0	USED:11912
     [m3video] ENCLINK_H264:HEAPID:3	USED:7569408
     [m3video] Enc: 720x240 (736)
     [m3video] ENCLINK: rejecting frame expected fid 0 fid 1
     [m3video] Skipping field fid:0 expected fid:1 3e168220
     [m3video] Freeing frames from skipped ReqObj 3e168220
    

  • Can you try replacing Scaler link by DEI_HQ link and set deiForceBypass = TRUE and interlacedBypass = TRUE and set pChObj->scCfg[outId].bypass = TRUE in deiLink_drv.c and check if you still see the issue

  • Hi Badri,

          Have you found why the Scaler cause the distortion? I have the same problem but while passing 1080i through the Scaler,

    -David

  • We have confirmed the scaler register settings match the functional spec for interlaced in -> interlaced out scaling.

    We are presently looking at the scaler coefficients to check if they are correct for interlaced scaling.

    Note that the issue reported in the original thread seems to be some other issue related to customization done to base DVRRDK.

    We DONT SEE ANY ISSUE is scaler is set to bypass which is different from what is observed here.

  • Pls check if attached patch resolves the interlaced scaling artifacts issue.

    HDVPSS driver patch

    diff --git a/packages/ti/psp/vps/hal/src/vpshal_sc.c b/packages/ti/psp/vps/hal/src/vpshal_sc.c
    index ed01aaf..7317ff3 100755
    --- a/packages/ti/psp/vps/hal/src/vpshal_sc.c
    +++ b/packages/ti/psp/vps/hal/src/vpshal_sc.c
    @@ -41,7 +41,9 @@
      */
     #define SC_MIN_REQ_WIDTH            (34u)
     #define SC_MIN_REQ_HEIGHT           (8u)
    -
    +/* progressive mode only used for interlaced case also. So macro 
    +   SC_INTERLACE_MODE is always disabled  */
    +/*#define SC_INTERLACE_MODE*/
     /**
      *  \brief Maximum Values for Luma and Chroma Threshold
      */
    @@ -688,19 +690,23 @@ Int VpsHal_scSetConfig(VpsHal_Handle handle,
             value &= (~CSL_VPS_SC_H_CFG_SC0_CFG_SC_BYPASS_MASK);
             /* Set the input and output frame format in the scalar config0
              * register */
    +#ifdef SC_INTERLACE_MODE	 
             if (VPS_SF_INTERLACED == config->inFrameMode)
             {
                 value |= CSL_VPS_SC_H_CFG_SC0_CFG_INTERLACE_I_MASK;
             }
             else /* Progressive input frame */
    +#endif
             {
                 value &= (~CSL_VPS_SC_H_CFG_SC0_CFG_INTERLACE_I_MASK);
             }
    +#ifdef SC_INTERLACE_MODE
             if (VPS_SF_INTERLACED == config->outFrameMode)
             {
                 value |= CSL_VPS_SC_H_CFG_SC0_CFG_INTERLACE_O_MASK;
             }
             else /* Progressive output frame */
    +#endif		
             {
                 value &= (~CSL_VPS_SC_H_CFG_SC0_CFG_INTERLACE_O_MASK);
             }
    @@ -2569,6 +2575,7 @@ static inline Void scCalVertPolyphaseParams(const VpsHal_ScConfig *config,
         else
         {
             *offsetA = 0u; /* TODO: How to calculate offsetA */
    +#ifdef SC_INTERLACE_MODE
             if (VPS_SF_INTERLACED == config->inFrameMode)
             {
                 if (VPS_SF_INTERLACED == config->outFrameMode)
    @@ -2590,7 +2597,9 @@ static inline Void scCalVertPolyphaseParams(const VpsHal_ScConfig *config,
                 }
             }
             else /* Progressive input frame */
    +#endif
             {
    +#ifdef SC_INTERLACE_MODE
                 if (VPS_SF_INTERLACED == config->outFrameMode)
                 {
                         *rowAccInc = ((config->cropHeight - 1u) <<
    @@ -2601,6 +2610,7 @@ static inline Void scCalVertPolyphaseParams(const VpsHal_ScConfig *config,
                                       (config->tarHeight - 1u);
                 }
                 else /* Progressive output frame */
    +#endif
                 {
                         *rowAccInc = ((config->cropHeight - 1u) <<
                                       SC_ROW_ACC_INC_SHIFT) /
    

    You also need a DEILink patch to select correct coefficients based on input:output resolution.

    Patch can be found here: http://e2e.ti.com/cfs-file.ashx/__key/communityserver-discussions-components-files/717/7444.dvr_5F00_rdk_5F00_deiscalercoefficients.patch.txt

    If applying the DEI link patch comment out call to DeiLink_drvSetScCoeffcs() routine which is redundant now.