Tool/software: Linux
i'm trying to get the encode and decode example together. i start my work based on encode example.(D-M-3-6-8.) and i can run these examples seperately.
i think there are many things i hava to do.
first of all ,the encode example :codec.c and encode.cfg engine do not have decoder ,so i have to add it.
second,i have to add the decode process .
but in the first step.
codec.c
static Codec videoDecoders[] = {
{
"mpeg4dec",
"MPEG4 SP Video",
mpeg4Extensions,
NULL,
NULL
},
{
"h264dec",
"H.264 HP Video",
h264Extensions,
&H264_PARAMS,
NULL
},
{
"mpeg2dec",
"MPEG2 Video",
mpeg2Extensions,
NULL,
NULL
},
{ NULL }
};
/* NULL terminated list of video encoders in the engine to use in the demo */
static Codec videoEncoders[] = {
{
"mpeg4enc",
"MPEG4 Video",
mpeg4Extensions,
NULL,
NULL
},
{
"h264enc",
"H.264 HP",
h264Extensions,
NULL,
NULL
},
{
"mpeg2enc",
"MPEG2",
mpeg2Extensions,
NULL,
NULL
},
{ NULL }
};
/* Declaration of the production engine and encoders shipped with the DVSDK */
static Engine encodeEngine = {
"encode", /* Engine string name used by CE to find the engine */
NULL, /* NULL terminated list of speech decoders in engine */
NULL, /* NULL terminated list of audio decoders in engine */
videoDecoders, /* NULL terminated list of video decoders in engine */
speechEncoders, /* NULL terminated list of speech encoders in engine */
audioEncoders, /* NULL terminated list of audio encoders in engine */
videoEncoders /* NULL terminated list of video encoders in engine */
};
/*
* This assignment selects which engine will be used by the demo. Note that
* this file can contain several engine declarations, but this declaration
* determines which one to use.
*/
Engine *engine = &encodeEngine;
//////////////////////////////////////////////////////////////////////////
encode.cfg
var myEngine = Engine.create("encode", [
{name: "mpeg4enc", mod: MPEG4ENC, local: true, groupId: 1},
{name: "h264enc", mod: H264ENC, local: true, groupId: 1},
{name: "mpeg2enc", mod: MPEG2ENC, local: true, groupId: 1},
{name: "g711enc", mod: G711ENC, local: true},
{name: "aacenc", mod: AACENC, local: true},
{name: "mpeg4dec", mod: MPEG4DEC, local: true, groupId: 1},
{name: "h264dec", mod: H264DEC, local: true, groupId: 1},
{name: "mpeg2dec", mod: MPEG2DEC, local: true, groupId: 1},
{name: "g711dec", mod: G711DEC, local: true},
{name: "aacdec", mod: AACDEC, local: true},
]);
////////////////////////////////////
when i create myEngine,only the h264dec can't be added.when it was added .the encode example have problems and can run correctly.
the message is as follows:
Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = c2e68000
[00000000] *pgd=82e66031, *pte=00000000, *ppte=00000000
Internal error: Oops: 817 [#1] PREEMPT
last sysfs file: /sys/devices/virtual/davinci_display/ch0/mode
Modules linked in: dm365mmap edmak irqk cmemk
CPU: 0 Not tainted (2.6.32.17-davinci1 #252)
PC is at davinci_spi_rx_buf_u16+0x10/0x1c
LR is at davinci_spi_irq+0x2c/0x54
pc : [<c01e66ac>] lr : [<c01e67ec>] psr: 00000093
sp : c2e39de0 ip : c2e39df0 fp : c2e39dec
r10: bed96e84 r9 : c2e38000 r8 : 00000000
r7 : 00000011 r6 : 00000000 r5 : 00000000 r4 : c23e2cb8
r3 : 00000000 r2 : c2e38000 r1 : c23e2cb8 r0 : 00ff0000
Flags: nzcv IRQs off FIQs on Mode SVC_32 ISA ARM Segment user
Control: 0005317f Table: 82e68000 DAC: 00000015
Process sh (pid: 1058, stack limit = 0xc2e38270)
Stack: (0xc2e39de0 to 0xc2e3a000)
9de0: c2e39e04 c2e39df0 c01e67ec c01e66ac c23e00c0 00000000 c2e39e24 c2e39e08
9e00: c006e124 c01e67d0 c2e38000 c0432870 00000011 c23e00c0 c2e39e44 c2e39e28
9e20: c00700c8 c006e0f0 00000011 00000000 c2e39fb0 00000001 c2e39e5c c2e39e48
9e40: c002b070 c006ff90 ffffffff fec48000 c2e39edc c2e39e60 c002bb4c c002b010
9e60: 0010f064 80000005 c2e39fb0 c2e38000 c042c86c c20592c0 c2e39fb0 c0028900
9e80: 0010f064 000000eb bed96e84 c2e39edc c2e39ea8 c2e39ea8 00000000 c003165c
9ea0: 00000013 ffffffff 0000000d 00000000 00000000 c042c86c bed96eb4 c2e39fb0
9ec0: 80000005 0010f064 000000eb bed96e84 c2e39efc c2e39ee0 c00318c8 c0031644
9ee0: c042c86c bed96eb4 00000005 c2e39fb0 c2e39fac c2e39f00 c002b274 c00318b4
9f00: 58a2c939 24c60060 0000a8ff 00000000 c2e38000 bed96880 c2e39f40 00000000
9f20: 000000c3 c002c0c4 c2e38000 bed96e84 c2e39fa4 c2e39f40 c00a0888 c00a0320
9f40: 0000a8ff 00000000 0000000d bed941ed 00000002 00000000 00000000 00000000
9f60: 00001000 00000000 58a2c939 25b6fbc8 58a2c939 24c60060 58a2c939 24c60060
9f80: 00001000 c2e39f90 00000008 ffffffff bed96eb4 00000000 00000000 0003687c
9fa0: 00000000 c2e39fb0 c002bec4 c002b248 bed96fed 00000000 00000000 00000000
9fc0: bed96fed bed96eb4 00000000 00000000 0003687c 000000eb bed96e84 00000003
9fe0: cf5810ff bed966e8 001166e4 0010f064 60000010 ffffffff c7fdd1a8 bfb7949e
Backtrace:
[<c01e669c>] (davinci_spi_rx_buf_u16+0x0/0x1c) from [<c01e67ec>] (davinci_spi_ir q+0x2c/0x54)
[<c01e67c0>] (davinci_spi_irq+0x0/0x54) from [<c006e124>] (handle_IRQ_event+0x44 /0x114)
r5:00000000 r4:c23e00c0
[<c006e0e0>] (handle_IRQ_event+0x0/0x114) from [<c00700c8>] (handle_edge_irq+0x1 48/0x1b4)
r7:c23e00c0 r6:00000011 r5:c0432870 r4:c2e38000
[<c006ff80>] (handle_edge_irq+0x0/0x1b4) from [<c002b070>] (asm_do_IRQ+0x70/0x8c )
r7:00000001 r6:c2e39fb0 r5:00000000 r4:00000011
[<c002b000>] (asm_do_IRQ+0x0/0x8c) from [<c002bb4c>] (__irq_svc+0x4c/0x90)
Exception stack(0xc2e39e60 to 0xc2e39ea8)
9e60: 0010f064 80000005 c2e39fb0 c2e38000 c042c86c c20592c0 c2e39fb0 c0028900
9e80: 0010f064 000000eb bed96e84 c2e39edc c2e39ea8 c2e39ea8 00000000 c003165c
9ea0: 00000013 ffffffff
r5:fec48000 r4:ffffffff
[<c0031634>] (do_page_fault+0x0/0x1e8) from [<c00318c8>] (do_translation_fault+0 x24/0xa4)
[<c00318a4>] (do_translation_fault+0x0/0xa4) from [<c002b274>] (do_PrefetchAbort +0x3c/0x9c)
r7:c2e39fb0 r6:00000005 r5:bed96eb4 r4:c042c86c
[<c002b238>] (do_PrefetchAbort+0x0/0x9c) from [<c002bec4>] (ret_from_exception+0 x0/0x10)
Exception stack(0xc2e39fb0 to 0xc2e39ff8)
9fa0: bed96fed 00000000 00000000 00000000
9fc0: bed96fed bed96eb4 00000000 00000000 0003687c 000000eb bed96e84 00000003
9fe0: cf5810ff bed966e8 001166e4 0010f064 60000010 ffffffff
r8:0003687c r7:00000000 r6:00000000 r5:bed96eb4 r4:ffffffff
Code: e1a0c00d e92dd800 e24cb004 e5913068 (e0c300b2)
---[ end trace 41af8b2aeebc5dde ]---
Kernel panic - not syncing: Fatal exception in interrupt
Backtrace:
[<c002f5f4>] (dump_backtrace+0x0/0x114) from [<c032e1e0>] (dump_stack+0x18/0x1c)
r7:c03c4ffc r6:c2e39d98 r5:c2e38000 r4:c04552b0
[<c032e1c8>] (dump_stack+0x0/0x1c) from [<c032e238>] (panic+0x54/0x12c)
[<c032e1e4>] (panic+0x0/0x12c) from [<c002fb10>] (die+0x18c/0x1b8)
r3:00010000 r2:c2e39c78 r1:c2e39bb8 r0:c03c49d4
rsz_set_output_address 0
[<c002f984>] (die+0x0/0x1b8) from [<c0031624>] (__do_kernel_fault+0x6c/0x7c)
[<c00315b8>] (__do_kernel_fault+0x0/0x7c) from [<c0031804>] (do_page_fault+0x1d0 /0x1e8)
r7:c0028900 r6:00000000 r5:c20592c0 r4:c042c68c
[<c0031634>] (do_page_fault+0x0/0x1e8) from [<c002b310>] (do_DataAbort+0x3c/0x9c )
[<c002b2d4>] (do_DataAbort+0x0/0x9c) from [<c002baec>] (__dabt_svc+0x4c/0x60)
Exception stack(0xc2e39d98 to 0xc2e39de0)
9d80: 00ff0000 c23e2cb8
9da0: c2e38000 00000000 c23e2cb8 00000000 00000000 00000011 00000000 c2e38000
9dc0: bed96e84 c2e39dec c2e39df0 c2e39de0 c01e67ec c01e66ac 00000093 ffffffff
r8:00000000 r7:00000011 r6:00000000 r5:c2e39dcc r4:ffffffff
[<c01e669c>] (davinci_spi_rx_buf_u16+0x0/0x1c) from [<c01e67ec>] (davinci_spi_ir q+0x2c/0x54)
[<c01e67c0>] (davinci_spi_irq+0x0/0x54) from [<c006e124>] (handle_IRQ_event+0x44 /0x114)
r5:00000000 r4:c23e00c0
[<c006e0e0>] (handle_IRQ_event+0x0/0x114) from [<c00700c8>] (handle_edge_irq+0x1 48/0x1b4)
r7:c23e00c0 r6:00000011 r5:c0432870 r4:c2e38000
[<c006ff80>] (handle_edge_irq+0x0/0x1b4) from [<c002b070>] (asm_do_IRQ+0x70/0x8c )
r7:00000001 r6:c2e39fb0 r5:00000000 r4:00000011
[<c002b000>] (asm_do_IRQ+0x0/0x8c) from [<c002bb4c>] (__irq_svc+0x4c/0x90)
Exception stack(0xc2e39e60 to 0xc2e39ea8)
9e60: 0010f064 80000005 c2e39fb0 c2e38000 c042c86c c20592c0 c2e39fb0 c0028900
9e80: 0010f064 000000eb bed96e84 c2e39edc c2e39ea8 c2e39ea8 00000000 c003165c
9ea0: 00000013 ffffffff
r5:fec48000 r4:ffffffff
[<c0031634>] (do_page_fault+0x0/0x1e8) from [<c00318c8>] (do_translation_fault+0 x24/0xa4)
[<c00318a4>] (do_translation_fault+0x0/0xa4) from [<c002b274>] (do_PrefetchAbort +0x3c/0x9c)
r7:c2e39fb0 r6:00000005 r5:bed96eb4 r4:c042c86c
[<c002b238>] (do_PrefetchAbort+0x0/0x9c) from [<c002bec4>] (ret_from_exception+0 x0/0x10)
Exception stack(0xc2e39fb0 to 0xc2e39ff8)
9fa0: bed96fed 00000000 00000000 00000000
9fc0: bed96fed bed96eb4 00000000 00000000 0003687c 000000eb bed96e84 00000003
9fe0: cf5810ff bed966e8 001166e4 0010f064 60000010 ffffffff
r8:0003687c r7:00000000 r6:00000000 r5:bed96eb4 r4:ffffffff
//////////////////////
and the loadmodule are:
# 0x00001000 32K ARM TCM memory
# 0x80000000 54 MB Linux
# 0x83000000 6 MB Video driver memory (Linux)
# 0x83C00000 //30MB CMEM 68 MB CMEM
# 0x85A00000 38 MB ROOTFS
# 0x88000000 BOTTOM ADDRESS
load () {
insmod cmemk.ko phys_start=0x83C00000 phys_end=0x88000000 allowOverlap=1 phys_start_1=0x00001000 phys_end_1=0x00008000 pools_1=1x28672 useHeapIfPoolUnavailable=1
i need help very much. i consider memory if not enough,but other decoders and encoders all can be added except the h264dec.do anyone have any sugesstions for me ? thank you verymuch.