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.

Dual stream(H264 +MJPEG) alignement trap if width more than 2048

Hi all,

   We are working on DM368IPNC for an IP camera

We are  trying to stream dual streams (H.264 + MJPEG) and we are struck with an Alignment Trap in av_server.out.

The arguments for the exe are  ./av_server.out DM368 NTSC APPRO2A AEWB GE_4MP H264 1500000 VBR AUTO MJPEG 75 MENUOFF.

The problem seems to occur when the width of H.264 stream is more than 2048.  The width is not a concern if we are configuring for H264 alone , but when configured to stream both H264 and MJPEG we are facing the problem when the H264 stream width  is more than 2048. We already upgraded to 256M memory and I don’t think we are having any memory issues for this problem.

I got the Backtrace from GDB after the crash and copying that here.

Program received signal SIGBUS, Bus error.

[Switching to Thread 762.820]

0x000ad964 in ALG_activate ()

(gdb) bt

#0  0x000ad964 in ALG_activate ()

#1  0x000ad164 in Algorithm_activate ()

#2  0x000ab138 in VISA_enter ()

#3  0x000a6c7c in IMGENC1_process ()

#4  0x000694f0 in ALG_jpgEncRun (hndl=0x4c9ac8, prm=0x4557b470, runStatus=0x4557b4b4) at alg_jpgEnc.c:174

#5  0x00061cbc in ALG_vidEncRun (hndl=0x4c9888, prm=0x4557bc8c, runStatus=0x4557bc7c) at alg_vidEnc.c:702

#6  0x00036af4 in VIDEO_encodeTskRun (streamId=1) at videoEncodeThr.c:280

#7  0x00036fec in VIDEO_encodeTskMain (pTsk=0x3db330, pMsg=0x4f52e8, curState=0) at videoEncodeThr.c:385

#8  0x000975f4 in OSA_tskThrMain (pPrm=0x3db330) at osa_tsk.c:17

#9  0x4002a8f8 in ?? ()

Cannot access memory at address 0x1

#10 0x4002a8f8 in ?? ()

Cannot access memory at address 0x1

 

The trap message on the console is

Alignment trap: av_server.out (814) PC=0x000ad964 Instr=0xe5933004 Address=0x95949497 FSR 0x001

From the backtrace it looks like the problem is with JPEGEncRun, but this dissapears if I reduce the size of H264 from 2056x2056 to 2048x2056 and I could stream out both the stream

The MJpeg dimesnions are 528x480.

Is there any restriction at the codec level we should be aware of. Would apprectiate any thoughts.

Regards,

Vamsi

  • hi Vamsi,

    Can you please tell us whether you areusing latest codec for H264 and MJPEg used in V3.0 IPNC RDK.

    Those codecs support Megapixel mode more than 2048 width.

    Howver, in general can you check how you have writter the driver for 4MP mode.

    Please refer to 5MP mode driver in the IPNC RDK and check whether you are using two pass resize operation for width more then 2048.

    Resizer has restriction of width 2048 for single pass resizing.

    Regards,

    Raghu



  • Hi Raghu,

       Thanks for the reply. It gave me some insights of where the problem can be.

    We ae using Version2.6 IPNC in our code.  Are you suggesting that using V3.0 might clear this problem?

    I believe we a re using two pass as I can stream the 2056x2056 rezsized output when I am configuring it for a  single stream.

    I am not sure how to check whether it is configured for the twopass or single pass method. I compared with 5MP implementation and it is quite identical.

    Could you please let me know if there is any particular variable  to check whether the camera is set to two pass or single pass.

    PS: 2056x2056 MJPEG + 640 x480 MJPEG is working fine only 2056x2056 H264 + 640x480 MJPEG is failing.

    Thanks again for the reply

    Regards,

    Vamsi

  • From the resolution it looks the width and height are not multiple of 16, can you make that and check this

    Also, can you please share the complete log?

    Regards,

    Raghu

  • Hi Raghu,

       I tried with 2064x2064 resolution and I am still getting the same alignment trap. Please find attached the log  I got from my console. Please let me know if you are looking for some other log and the steps to produce that. Thanks for you help .

    Regards,

    Vamsi

    DM36x initialization passed!
    TI UBL Base Version: 1.50
    Boot Loader BootMode = NAND
    Starting NAND Copy...
    Valid magicnum 0xA1ACED66, found in block 0x00000008
    entryPoint:0x81080000
    numPage   :0x00000050
    block     :0x00000009
    page      :0x00000000
    ldAddress :0x81080000
    Boot Mode Task Completed
    
    IPNC UBL Version: 1.1.3
    Platform: DM368
    
    Jumping to entry point at 0x81080000
    
    U-Boot 1.3.4 (Feb  7 2012 - 14:06:00) DM368-IPNC-1.0.2
    
    I2C:   ready
    DRAM:  256 MB
    NAND:  NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung NAND 128MiB 3,3V 8-bit)
    Bad block table found at page 65472, version 0x01
    Bad block table found at page 65408, version 0x01
    128 MiB
    In:    serial
    Out:   serial
    Err:   serial
    ARM Clock :- 432MHz
    DDR Clock :- 340MHz
    Ethernet PHY: GENERIC @ 0x01
    Hit any key to stop autoboot:  0
    
    Loading from NAND 128MiB 3,3V 8-bit, offset 0x500000
       Image Name:   Linux-2.6.18_pro500-davinci_IPNC
       Image Type:   ARM Linux Kernel Image (uncompressed)
       Data Size:    1825924 Bytes =  1.7 MB
       Load Address: 80008000
       Entry Point:  80008000
    ## Booting kernel from Legacy Image at 80700000 ...
       Image Name:   Linux-2.6.18_pro500-davinci_IPNC
       Image Type:   ARM Linux Kernel Image (uncompressed)
       Data Size:    1825924 Bytes =  1.7 MB
       Load Address: 80008000
       Entry Point:  80008000
       Verifying Checksum ... OK
       Loading Kernel Image ... OK
    OK
    
    Starting kernel ...
    
    Linux version 2.6.18_pro500-davinci_IPNC_DM368_2.6.0-gc2a0433d-dirty (marks@curium) (gcc version 4.2.0 (MontaVista 4.2.0-16.0.32.0801914 2008-08-30)) #1 PREEMPT Thu Jan 26 08:36:55 GMT 2012
    CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
    Machine: DaVinci DM368 IPNC
    Memory policy: ECC disabled, Data cache writeback
    DaVinci DM0365 variant 0x8
    PLL0: fixedrate: 24000000, commonrate: 170000000, vpssrate: 340000000
    PLL0: vencrate_sd: 75555555, ddrrate: 340000000 mmcsdrate: 48571428
    PLL1: armrate: 432000000, voicerate: 20571428, vencrate_hd: 27000000
    CPU0: D VIVT write-back cache
    CPU0: I cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
    CPU0: D cache: 8192 bytes, associativity 4, 32 byte lines, 64 sets
    Built 1 zonelists.  Total pages: 12288
    Kernel command line: eth=00:11:35:01:00:47 console=ttyS1,115200n8 noinitrd rw eth=00:11:35:01:00:47 ip=dhcp root=/dev/nfs nfsroot=192.168.0.105:/home/vamsiy/alta/Alta-head/ipnc/target/filesys, nolock mem=48M
    TI DaVinci EMAC: kernel boot params Ethernet address: 00:11:35:01:00:47
    TI DaVinci EMAC: kernel boot params Ethernet address: 00:11:35:01:00:47
    PID hash table entries: 256 (order: 8, 1024 bytes)
    Clock event device timer0_0 configured with caps set: 07
    Console: colour dummy device 80x30
    Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
    Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
    Memory: 48MB = 48MB total
    Memory: 44672KB available (3129K code, 645K data, 176K init)
    Security Framework v1.0.0 initialized
    Capability LSM initialized
    Mount-cache hash table entries: 512
    CPU: Testing write buffer coherency: ok
    NET: Registered protocol family 16
    DaVinci: 104 gpio irqs
    MUX: initialized GPIO20
    MUX: initialized I2C_SCL
    Generic PHY: Registered new driver
    ch0 default output "COMPOSITE", mode "NTSC"
    VPBE Encoder Initialized
    SCSI subsystem initialized
    NET: Registered protocol family 2
    IP route cache hash table entries: 512 (order: -1, 2048 bytes)
    TCP established hash table entries: 2048 (order: 1, 8192 bytes)
    TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
    TCP: Hash tables configured (established 2048 bind 1024)
    TCP reno registered
    VFS: Disk quotas dquot_6.5.1
    Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
    squashfs: version 3.1 (2006/08/19) Phillip Lougher
    JFFS2 version 2.2. (NAND) (C) 2001-2006 Red Hat, Inc.
    yaffs Jan 26 2012 08:35:09 Installing.
    SGI XFS with no debug enabled
    Initializing Cryptographic API
    io scheduler noop registered
    io scheduler anticipatory registered (default)
    LTT : ltt-facilities init
    LTT : ltt-facility-core init in kernel
    DAVINCI-WDT: DaVinci Watchdog Timer: heartbeat 60 sec
    Serial: 8250/16550 driver $Revision: 1.90 $ 2 ports, IRQ sharing disabled
    serial8250.0: ttyS0 at MMIO map 0x1c20000 mem 0xfbc20000 (irq = 40) is a 16550A
    serial8250.0: ttyS1 at MMIO map 0x1d06000 mem 0xfbd06000 (irq = 41) is a 16550A
    RAMDISK driver initialized: 1 RAM disks of 32768K size 1024 blocksize
    Davinci EMAC MII Bus: probed
    MAC address is 00:11:35:01:00:47
    TI DaVinci EMAC Linux version updated 4.0
    Linux video capture interface: v2.00
    Trying to register davinci display video device.
    layer=c0545800,layer->video_dev=c0545960
    Trying to register davinci display video device.
    layer=c0545600,layer->video_dev=c0545760
    davinci_init:DaVinci V4L2 Display Driver V1.0 loaded
    i2c /dev entries driver
    nand_davinci nand_davinci.0: Using 4-bit hardware ECC
    NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung NAND 128MiB 3,3V 8-bit)
    Creating 6 MTD partitions on "nand_davinci.0":
    0x00000000-0x00300000 : "bootloader"
    0x00300000-0x00500000 : "params"
    0x00500000-0x00700000 : "kernel"
    0x00700000-0x01f00000 : "filesystem"
    0x01f00000-0x02100000 : "data1"
    0x02100000-0x08000000 : "data2"
    nand_davinci nand_davinci.0: hardware revision: 2.3
    rtc_davinci_dm365 rtc_davinci_dm365.0: rtc intf: proc
    rtc_davinci_dm365 rtc_davinci_dm365.0: rtc intf: dev (254:0)
    rtc_davinci_dm365 rtc_davinci_dm365.0: rtc core: registered rtc_davinci_dm365 as rtc0
    Advanced Linux Sound Architecture Driver Version 1.0.12rc1 (Thu Jun 22 13:55:50 2006 UTC).
    ASoC version 0.13.1
    CQ0093 Voice Codec 0.1
    asoc: cq93vc <-> davinci-vcif mapping ok
    ALSA device list:
      #0: On-chip voice codec (cq93vc)
    IPv4 over IPv4 tunneling driver
    TCP bic registered
    NET: Registered protocol family 1
    NET: Registered protocol family 17
    rtc_davinci_dm365 rtc_davinci_dm365.0: setting the system clock to 2000-01-08 19:49:11 (947360951)
    Time: timer0_1 clocksource has been installed.
    Clock event device timer0_0 configured with caps set: 08
    Switched to high resolution mode on CPU 0
    Sending DHCP requests .., OK
    IP-Config: Got DHCP answer from 0.0.0.0, my address is 192.168.0.36
    IP-Config: Complete:
          device=eth0, addr=192.168.0.36, mask=255.255.255.0, gw=192.168.0.105,
         host=192.168.0.36, domain=grandeye.com, nis-domain=(none),
         bootserver=0.0.0.0, rootserver=192.168.0.105, rootpath=
    Looking up port of RPC 100003/2 on 192.168.0.105
    Looking up port of RPC 100005/1 on 192.168.0.105
    VFS: Mounted root (nfs filesystem).
    Freeing init memory: 176K
    INIT: version 2.86 booting
    wd_identify: No such file or directory
    wd_identify: No such file or directory
    0
    mkdir: Cannot create directory `/dev/.test': Read-only file system
    wd_identify: No such file or directory
    Starting the hotplug events dispatcher: udevd.
    Synthesizing the initial hotplug events...done.
    Waiting for /dev to be fully populated...done.
    0
    CSL: Module install successful, device major num = 253
    CSL: Module version 0.10.00, built on Mar  5 2012 17:16:23
    I2C: Module install successful, device major num = 252
    DMA: Module install successful, device major num = 251
    DRV: Module install successful
    DRV: Module built on Mar  5 2012 17:16:24
    DRV: EDMACC.QUEPRI  = 00000777
    DRV: SYSTEM.MSTPRI0 = 00440022
    DRV: SYSTEM.MSTPRI1 = 00000244
    DRV: ISP.BCR        = 00000002
    DRV: SYSTEM.MISC    = 00000399
    CMEMK module: built on Mar  1 2012 at 12:13:04
      Reference Linux version 2.6.18
      File /home/vamsiy/alta/Alta-head/dvsdk_2_10_01_18/linuxutils_2_24_03/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c
    allocated heap buffer 0xc4000000 of size 0xd000000
    CMEM Range Overlaps Kernel Physical - allowing overlap
    CMEM phys_start (0x1000) overlaps kernel (0x80000000 -> 0x83000000)
    cmemk initialized
    EDMAK module: built on Mar  1 2012 at 12:13:05
      Reference Linux version 2.6.18
      File /home/vamsiy/alta/Alta-head/dvsdk_2_10_01_18/linuxutils_2_24_03/packages/ti/sdo/linuxutils/edma/src/module/edmak.c
    IRQK module: built on Mar  1 2012 at 12:13:06
      Reference Linux version 2.6.18
      File /home/vamsiy/alta/Alta-head/dvsdk_2_10_01_18/linuxutils_2_24_03/packages/ti/sdo/linuxutils/irq/src/module/irqk.c
    irqk initialized
    + set -e
    + test ! -r /etc/default/dropbear
    + test 0 = 0
    + test -x /usr/sbin/dropbear
    + DROPBEAR_RSAKEY_DEFAULT=/mnt/nand/dropbear_rsa_host_key
    + DROPBEAR_DSSKEY_DEFAULT=/mnt/nand/dropbear_dss_host_key
    + test -z
    + test -n
    + DROPBEAR_RSAKEY=/mnt/nand/dropbear_rsa_host_key
    + test -n
    + DROPBEAR_DSSKEY=/mnt/nand/dropbear_dss_host_key
    + test -n
    + DROPBEAR_KEYTYPES=rsa
    + echo -n Starting Dropbear SSH server:
    Starting Dropbear SSH server: + gen_keys
    + test -f /mnt/nand/dropbear_rsa_host_key
    + KEY_ARGS=
    + test -f /mnt/nand/dropbear_dss_host_key
    + test -f /mnt/nand/dropbear_rsa_host_key
    + KEY_ARGS= -r /mnt/nand/dropbear_rsa_host_key
    + start-stop-daemon -S -x /usr/sbin/dropbear -- -r /mnt/nand/dropbear_rsa_host_key -p 22
    + echo dropbear.
    dropbear.
    + exit 0
    Starting mounting local filesystems: mount none on /dev/shm type tmpfs (rw,size=5M)
    none on /var/run type tmpfs (rw)
    none on /tmp type tmpfs (rw,sync)
    Setting up networking ...rm: unable to remove `/etc/network/run': Read-only file system
    Starting hotplug subsystem:
       pci
       pci      [success]
       usb
       usb      [success]
       isapnp
       isapnp   [success]
       ide
       ide      [success]
       input
       input    [success]
       scsi
       scsi     [success]
    done.
    Starting portmap daemon: portmap.
    Starting internet superserver: inetd.
    io scheduler deadline registered
    io scheduler cfq registered
    i2c_emac: exports duplicate symbol davinci_get_macaddr (owned by kernel)
    insmod: cannot insert `/opt/ipnc/modules/i2c-emac.ko': Invalid module format (-1): Exec format error
     sbulla: unknown partition table
    Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
    loop: loaded (max 8 devices)
    tun: Universal TUN/TAP device driver, 1.6
    tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
    CSLIP: code copyright 1989 Regents of the University of California
    netconsole: not configured, aborting
    PPP generic driver version 2.4.2
    PPP Deflate Compression module registered
    kobject_add failed for emac_davinci with -EEXIST, don't try to register things with the same name in the same directory.
    insmod: cannot insert `/opt/ipnc/modules/davinci_emac.ko': File exists (-1): File exists
    davinci-mmc davinci-mmc.0: Supporting 4-bit mode
    davinci-mmc davinci-mmc.0: Using DMA mode
    usbcore: registered new driver usbfs
    usbcore: registered new driver hub
    musb_hdrc: version 6.0, cppi-dma, peripheral, debug=0
    musb_hdrc musb_hdrc: No DMA interrupt line
    musb_hdrc: USB Peripheral mode controller at c38f2000 using DMA, IRQ 12
    Loading iSCSI transport class v1.1-646.<5>iscsi: registered transport (tcp)
     sbulla: unknown partition table
    mkdosfs 3.0.6 (04 Oct 2009)
    unable to get drive geometry, using default 255/63
    /dev/sbulla has 255 heads and 63 sectors per track,
    logical sector size is 512,
    using 0xf8 media descriptor, with 1024 sectors;
    file system has 2 12-bit FATs and 4 sectors per cluster.
    FAT size is 1 sector, and provides 247 clusters.
    Root directory contains 512 slots.
    Volume ID is 4c7406eb, no volume label.
    Create queue id:0
    queue id:0
    TimeOut occure in boot_proc.
    Program exit.
    queue id:0
    FileMngThread created
    Create queue id:32769
    queue id:32769
    AlramThread created
    Share memory init success
    IPNC_DM368_2.6.0-gc2a0433d-dirty (marks@curium) (gcc version 4.
    Create queue id:65538
    queue id:65538
    Create queue id:98307
    queue id:98307
    queue id:65538
    queue id:32769
    
    CPU is DM368
    ./av_server.out DM368 NTSC GE_4MP H264 1500000 VBR AUTO MJPEG 75 MENUOFF &
    Check_device_version : DEVICE VER = 1 !!
    
    AVSERVER UI: Initializing.
     AVSERVER API: Creating TSKs.
    ApproDrvInit: 7
    Create queue id:131076
    queue id:131076
    
     CLK Hz,
     ARM   Hz =  432000000
     DDR   Hz =  340000000
     VPSS  Hz =  340000000
     IMCOP Hz =  340000000
    
     [OSA_FILE ] Reading file [/mnt/nand/IMG_Paramset.bin] ... ERROR
    IMAGE TUNE: Paramset File is not available..... Setting DEFAULT parameter
     AVSERVER API: Creating TSKs...DONE
    
    CONFIGURING AVSERVER FOR DM368 .....
    queue id:65538
     AVSERVER API: Sending START.
     AVSERVER MAIN: Recevied CMD = 0x0400, state = 0x0000
     AVSERVER MAIN: AVSERVER_tskConnectInit() ...
     *** WARNING  FD: exceeded max input size for FD, disabling FD (current input 640x480)!!!
     AVSERVER MAIN: Create captureTsk ...
    SENSOR FPS VALUE = 10
     AVSERVER MAIN: Create encodeTsk ...
    DavinciDisplay DavinciDisplay.1: Before finishing with S_FMT:
    layer.pix_fmt.bytesperline = 640,
     layer.pix_fmt.width = 640,
     layer.pix_fmt.height = 480,
     layer.pix_fmt.sizeimage =460800
     AVSERVER MAIN: DavinciDisplay DavinciDisplay.1: pixfmt->width = 640,
     layer->layer_info.config.line_length= 640
    Create streamTsk ...
    
    mem_layout         = 9
    mem_size[0]       =0x0
    mem_blk_size[0]   =0xC800
    cache_size[0]     =0x0
    cache_blk_size[0] =0xC800
    mem_size[1]       =0xA00000
    mem_blk_size[1]   =0xC800
    cache_size[1]     =0xA00000
    cache_blk_size[1] =0xC800
    mem_size[2]       =0x0
    mem_blk_size[2]   =0x19000
    cache_size[2]     =0x0
    cache_blk_size[2] =0x19000
    mem_size[3]       =0x300000
    mem_blk_size[3]   =0xC800
    cache_size[3]     =0x300000
    cache_blk_size[3] =0xC800
    mem_size[4]       =0x80000
    mem_blk_size[4]   =0x400
    cache_size[4]     =0x80000
    cache_blk_size[4] =0x400
    totalsize          =0x1B00200
    TOTAL_MEM_SIZE     =0x15A0200
    queue id:131076
    Stream Debug:  Init_Msg_Func
     AVSERVER MAIN: Create fdTsk ...
    
     FR : 0 users registered from exsiting face album
     AVSERVER MAIN: Create displayTsk ...
     AVSERVER MAIN: Create aewbTsk ...
    IPNC_DM368_2.6.0-gc2a0433d-dirty (marks@curium) (gcc version 4.
    IPNC AUTO_IRIS = 0
     AVSERVER MAIN: Create audioPlayTsk ...
    Stream Debug: MSG_CMD_GET_MEM case
     AVSERVER MAIN: Create motionTsk ...
     AVSERVER MAIN: Create swosdTsk ...
    Demo composite written.
     AVSERVER MAIN: Allocing Buffers ...
     AVSERVER MAIN: Allocating buffers ...
     AVSERVER MAIN: Stream 0: Allocating LDC buffers: 0 of size 6489728 bytes
     AVSERVER MAIN: Stream 0: Allocating VNF buffers: 0 of size 6489728 bytes
     AVSERVER MAIN: Stream 0: Allocating Encode IN buffers: 3 of size 6489728 bytes
     AVSERVER MAIN: Stream 0: Assigning Resize IN buffers: 0 of size 6489728 bytes
     AVSERVER MAIN: Stream 0: Getting Capture OUT buffers
     AVSERVER MAIN: Stream 0: Capture OUT buffers 0
     AVSERVER MAIN: Stream 0: Capture OUT buffers 1
     AVSERVER MAIN: Stream 0: Capture OUT buffers 2
     AVSERVER MAIN: Stream 1: Allocating LDC buffers: 0 of size 460928 bytes
     AVSERVER MAIN: Stream 1: Allocating VNF buffers: 0 of size 460928 bytes
     AVSERVER MAIN: Stream 1: Allocating Encode IN buffers: 3 of size 460928 bytes
     AVSERVER MAIN: Stream 1: Assigning Resize IN buffers: 0 of size 460928 bytes
     AVSERVER MAIN: Stream 1: Getting Capture OUT buffers
     AVSERVER MAIN: Stream 1: Capture OUT buffers 0
     AVSERVER MAIN: Stream 1: Capture OUT buffers 1
     AVSERVER MAIN: Stream 1: Capture OUT buffers 2
     AVSERVER MAIN: Allocating FD buffers: 3 of size 307328 bytes
     AVSERVER MAIN: Assigning Display buffers: 3 of size 307328 bytes
     AVSERVER MAIN: Stream 0: Allocating Encrypt buffers: 0 of size 2130944 bytes
     AVSERVER MAIN: Stream 0: Allocating Stream buffers: 3 of size 2130944 bytes
     AVSERVER MAIN: Stream 1: Allocating Encrypt buffers: 0 of size 308224 bytes
     AVSERVER MAIN: Stream 1: Allocating Stream buffers: 3 of size 308224 bytes
     AVSERVER MAIN: Allocating MotionDetect buffers: 3 of size 0 bytes
     AVSERVER MAIN: Allocating buffers ...DONE
     AVSERVER MAIN: Start aewbTsk ...
     AVSERVER MAIN: Start captureTsk ...
    queue id:0
     AVSERVER MAIN: Start audioPlayTsk ...
     AVSERVER MAIN: Start DONE
     AVSERVER API: Sending START...DONE
    Alignment trap: av_server.out (772) PC=0x000b9834 Instr=0xe592e340 Address=0x4a4a4d8a FSR 0x001
    TimeOut occure in boot_proc.
    Program exit.
    ApproDrvInit: 3
    queue id:131076
    INIT: Entering runlevel: 3
    Starting internet superserver: inetd
    MontaVista(R) Linux(R) Professional Edition 5.0.0 (0702774)
    

  • Hi,

    Can you check with only 2056x2056 h264 encoder only without mjpeg and check if this issue exists

    Also, you check to set hdvicpreset flag in codec params always for this mode

    Regards,

    Raghu

  • Hi Raghu,

         I Checked with 2056x2056 H264 encoder alone and Its working perfectly fine. I also checked the IH264VENC_DynamicParams::resetHDVICPeveryFrame param and its being set to 2 in the dual stream case (H264 + MJPEG) and set to 0 for single stream (i.e H264 alone).

    I also tried to get the CE_DEBUG log for the above dual stream run case and am attaching that log . Could you please got hrough taht and let me know if you could find anything suspicious.

    Regards,

    Vamsi

    5430.CEDebug.Dualstream.AlignmentTrap.txt

  • Hi Vamsi,

    Can you please try below things in H264 encoder:

    1] Set EnableDDR = 1

    2] set resetHDVICPeveryframe = 1

    3] use codec debug library and send the logs.[take the back of h264venc_ti_arm926.a and rename h264venc_ti_arm926_debug.a to h264venc_ti_arm926.a]

    Thanks,

    Veeranna

  • Hi Veeranna,

      Thank a lot for the tip . In fact setting the EnableDDR to one did the trick and the alignment trap message is no longer coming up.

    I can stream out 4M H264  and an MJPEG , But still got some issues.

    When I increase the width of the picture beyond 2048 I can see that there is some corruption going on in the H264 encoded output.

    from 2048 < Width <=  2112 , this corruption is limited to certain region.

    for Width > 2112 , The whole picture is garabage , The scene is live as I can see my movements in the output but it looks like it has alignment problems somewhere.

    I am attaching the snapshots I took at different resolutions while streaming the H264. For all these case the MJPEG output is absolutely fine.

    Can you please give me inputs on where this might be going wrong.

    We are actually interested in 2144x1944 size H264. Can you see any restrictions whcih will not allow us to have another MJPEG (VGA )stream with the above high res H264.

    Thanks again for the suggestion.

    Do you still want me to send the Debug. 

  • Hi Vamsi,

    With EnableDDR = 1, you should not get any corruption. Can you try same thing on stand-alone testapp provided with Release package?. And which version of encoder you are using? If you are not using latest one(02.30.00.04), please upgrade to this.

    Currently we don't have ready setup with us(for H264 for HIMP + MJPEG), once we get this, we will give more info. If you find more information please provide us. And have you tried enableDDR=0 and resetHDVICP = 1?

    Thanks,

    Veeranna

  • Hi Veeranna,

    Thanks for your reply.  I am really sorry that I couldnt reply sooon as I am off for few weeks. To anwser your queries 

    The encoder version we are using is H264ENC.version.02.20.00.01.wizardversion.0.5.2.  Also we are using the Code drop from Appro Version 2.6.0. I will try to upgrade to the latest encoder and see if the problem still exit.

    I tried enableDDR=0 and resetHDVICP=1 and the alignement trap came back. I think enableDDR sorted out the problem of alignment trap, but the corruption might be due to somethign else.

    I will try to work on a standalone app and let you know if I find any details. Did you try to run at your end, if its working.

    Do you suspect the corruption we are observing in the last snapshot I sent is due to any

    Please let me know.

    Regards,

    Vamsi

  • Hi

    Please migrate to latest version 02.30.00.04. you can get the codec from http://software-dl.ti.com/dsps/dsps_public_sw/codecs/DM36x/index_FDS.html

    Yes we had standalone testcases and we didnt see any corruption. And enableDDR = 1may not be final solution as it reduces performance. It will help us figure out the issue.

  • Hi Veeranna,

    Thanks for the reply. Is there any chance you could send the standalone testcase code so that I can compare the initialization params with my application.

    I will try to migrate to the new encoder.

    Vamsi

  • Hi,

    Standalone testapp present in release packagein the path  \dm365_h264enc_02_x0_00_0x_production\packages\ti\sdo\codecs\h264enc\apps. Just you need to change  max height and width.

    Thanks,

    Veeranna

  • Hi Veeranna and Raghu,

       I found the issue related to this. I upgraded to the new codec version from TI. I still got the same problems I had with earlier versions.
    After carefully comparing the params of Standalone app and my encoder params, I found that the encoding preset is being set to XDM_HIGH_SPEED for my use case (i.e two streams). I beleive this mode supports resolutions upto 2048 x 2048. When I  forced it to use XDM_HIGH_QUALITY, it worked like a charm for the high reslotuions. I need not enable DDR which you mentioned might  reduce the performance.

    Thanks for your suggestions earlier and pointing me in the right direction.

  • Thanks for sharing the result Vamsi !!!

    Yes High speed mode supports only upto 2048 x 2048. We missed this check inside codec. We will add it , codec creation will fail if you set more than 2kx2k. We have check other encoder mode(encQuality=0/1). For this mode creation will fail when we set res more than 2k.

    Regards,

    Veeranna