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.

The Problem of using x264 encode 720P video!

when I use x264 encode 720P video, It have much error as follows:

x264 [info]: using SAR=1/1

x264 [info]: using cpu capabilities: none!

x264 [info]: profile High, level 3.2

x264 invoked oom-killer: gfp_mask=0x200da, order=0, oom_adj=0

Backtrace: 

[<c0035390>] (dump_backtrace+0x0/0x110) from [<c02d8fe4>] (dump_stack+0x18/0x1c)

 r7:0000073d r6:00000000 r5:c732cc00 r4:000200da

[<c02d8fcc>] (dump_stack+0x0/0x1c) from [<c0081828>] (dump_header+0x44/0x110)

[<c00817e4>] (dump_header+0x0/0x110) from [<c0081938>] (oom_kill_process+0x44/0xdc)

 r5:c732cc00 r4:000200da

[<c00818f4>] (oom_kill_process+0x0/0xdc) from [<c0081e24>] (__out_of_memory+0x170/0x194)

 r7:c6642000 r6:0000073d r5:c732cc00 r4:c03cd750

[<c0081cb4>] (__out_of_memory+0x0/0x194) from [<c0081edc>] (out_of_memory+0x94/0xcc)

[<c0081e48>] (out_of_memory+0x0/0xcc) from [<c0084b94>] (__alloc_pages_nodemask+0x418/0x50c)

 r5:c732cc00 r4:00000000

[<c008477c>] (__alloc_pages_nodemask+0x0/0x50c) from [<c0091500>] (handle_mm_fault+0x150/0xa20)

[<c00913b0>] (handle_mm_fault+0x0/0xa20) from [<c02dcd0c>] (do_page_fault+0x114/0x20c)

[<c02dcbf8>] (do_page_fault+0x0/0x20c) from [<c0031298>] (do_DataAbort+0x3c/0x9c)

[<c003125c>] (do_DataAbort+0x0/0x9c) from [<c02db264>] (ret_from_exception+0x0/0x10)

Exception stack(0xc6643fb0 to 0xc6643ff8)

3fa0:                                     46082f90 80818081 797a797a 78787978

3fc0: 40f231e0 00000200 00000200 00000000 000002a0 46083210 00000280 00000000

3fe0: 46082fd0 bec0d2b4 00030e74 4017abe0 20000010 ffffffff

 r8:000002a0 r7:00000000 r6:00000200 r5:00000200 r4:ffffffff

Mem-info:

Normal per-cpu:

CPU    0: hi:   42, btch:   7 usd:   6

active_anon:12890 inactive_anon:12890 isolated_anon:0

 active_file:2 inactive_file:135 isolated_file:0

 unevictable:0 dirty:0 writeback:1 unstable:0

 free:410 slab_reclaimable:172 slab_unreclaimable:583

 mapped:64 shmem:64 pagetables:117 bounce:0

Normal free:1640kB min:1640kB low:2048kB high:2460kB active_anon:51560kB inactive_anon:51560kB active_file:8kB inactive_file:540kB unevictable:0kB isolated(anon):0kB isolated(fs

lowmem_reserve[]: 0 0

Normal: 38*4kB 12*8kB 5*16kB 7*32kB 13*64kB 2*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 1640kB

206 total pagecache pages

42496 pages of RAM

494 free pages

14207 reserved pages

610 slab pages

193 pages shared

0 pages swap cached

Out of memory: kill process 1405 (x264) score 1853 or a child

Killed process 1405 (x264) vsz:118644kB, anon-rss:93672kB, file-rss:60kB

Killed

 

What's the reason?what should I do?

Thanks!

  • Puyol,

             This seems basic error message from linux, where linux side application could not allocate enough memory.

             This might be caused in your setup if bootargs (mem=128M) passed less memory or your application might need more memory.

             I think we need to ensure the bootargs (mem=) is configured correctly to satisfy the application requirement.

             Could you also let us know if the default or sample applications in SDK could be run without any issues.

    Best Regards

    Velan

  • yes, you are right! The other application is work well, for example, when it encode the YUV picture size is CIF, it work well,but if encode 720P, that is worst! what should I do, where to allocate the Memory!

    Thanks!

  • Puyol,

              As mentioned earlier you can increase the mem= boot args value. But ensure that the memory partition fine (FAQ documents this). Default 256M allocated to linux.

             I doubt x264 needs more than 256M, or you are passing less size in mem= bootargs.

             Could you let us know what is memory requirement by x264 application, so that we can check here if memory partition does not meet the memory requirement by x264.

    Best Regards

    Velan

  • Hi Velan,

                If I want to set bootargs mem=320M, what should I do. Because I set other parameters for the bootargs in U-BOOT, but the problem also thesame!

    Thanks!

  • Anyone can help me!

  • Puyol,

         Have you identified how much is the exact memory requirement of the x264 application.

         If 256M is not sufficient then how do we know that 320M is sufficient.

         In EZSDK (Refer document from the releasepackega) few memory sections are reserved, in EZSDK it is possible to allocate 320M to linux. If the memory is not consecutivem different procedure need to be followed to assign partitioned memories to Linux, refer to the section "Setting Memory Holes For System RAM" in document $(EZSDK_ROOT)\psp\docs\TI816x-PSP-04.00.00.10-UserGuide.pdf for this.

    Best Regards

    Velan