A general observation, since I don't know about the implementation...
You "memset(&video_params, 0, sizeof (IVIDENC1_Params))" and then explicitly
set some of them to real values, but what about the other possible members of
IVIDENC1_Params, which remain as 0?
Usually one would do something like:
video_params = <default params>;
video_params.encodingPreset = XDM_DEFAULT;
...
When you pass NULL (and it works), some default set gets used. You need to
find the identifier for this default set and use it where I put <default
params> above.
Regards,
- Rob
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]
> ] On Behalf Of Ottavio Campana
> Sent: Monday, June 22, 2009 1:36 AM
> To: [email protected]
> Subject: looking for h264 encoder examples
>
> Hi,
>
> I'm having some problems with the h264 encoder on a dm6446.
>
> If I call
>
> video_enc = VIDENC1_create (ce, "h264enc", NULL);
>
> it creates the encoder, but if I call
>
> memset (&video_params, 0, sizeof (IVIDENC1_Params));
>
>
>
> video_params.size = sizeof(IVIDENC1_Params);
>
> video_params.encodingPreset = XDM_DEFAULT;
>
> video_params.rateControlPreset = IVIDEO_LOW_DELAY;
>
> video_params.dataEndianness = XDM_BYTE;
>
> video_params.maxInterFrameInterval = 1;
>
> video_params.inputContentType = IVIDEO_PROGRESSIVE;
>
> video_params.reconChromaFormat = XDM_YUV_422ILE;
>
>
>
> video_enc = VIDENC1_create (ce, "h264enc", &video_params);
>
> I get the following error and I think it should be a
> configuration error, but I cannot understand what it is.
>
> So I am looking for some examples to use as trace to
> implement my h264 encoder. Where can I find them?
>
> Ottavio.
>
> @0,542,540us: [+0 T:0x4001eb80] CE - Engine_fwriteTrace>
> returning count [7152]
> @0,542,713us: [+0 T:0x4001eb80] CE - Engine_open> return(322888)
> @0,542,965us: [+0 T:0x4001eb80] ti.sdo.ce.video1.VIDENC1 -
> VIDENC1_create> Enter (engine=0x4ed48, name='h264enc', params=0x43574)
> @0,543,202us: [+0 T:0x4001eb80] CV - VISA_create(0x4ed48,
> 'h264enc', 0x43574, 0x2496, 'ti.sdo.ce.video1.IVIDENC1')
> @0,543,371us: [+0 T:0x4001eb80] CV - VISA_create2(0x4ed48,
> 'h264enc', 0x43574, 0x30, 0x2496, 'ti.sdo.ce.video1.IVIDENC1')
> @0,543,553us: [+0 T:0x4001eb80] CE -
> Engine_createNode(0x4ed48, 'h264enc', 2496, 0x43574, 0x30, 0xbedc5adc)
> @0,543,716us: [+0 T:0x4001eb80] CE - Engine> allocNode
> Enter(engine=0x4ed48, impId='h264enc')
> @0,543,894us: [+0 T:0x4001eb80] CE - Engine> allocNode().
> Calling Comm_create(gppfromnode_1738_1, 0x4c588, NULL)
> @0,547,482us: [+6 T:0x4001eb80] CE - Engine_createNode>
> Remote node creation FAILED (0x80008008).
> [DSP] @0,110,429tk: [+0 T:0x8fa424cc] OM - Memory_alloc>
> Enter(size=0x18) [DSP] @0,110,477tk: [+0 T:0x8fa424cc] OM -
> Memory_alloc> return (0x8fa46f88) [DSP] @0,110,526tk: [+0
> T:0x8fa424cc] OM - Memory_alloc> Enter(size=0xa) [DSP]
> @0,110,571tk: [+0 T:0x8fa424cc] OM - Memory_alloc> return
> (0x8fa46fa0) [DSP] @0,110,626tk: [+0 T:0x8fa424cc] OM -
> Memory_alloc> Enter(size=0x20) [DSP] @0,110,671tk: [+0
> T:0x8fa424cc] OM - Memory_alloc> return (0x8fa46fb0) [DSP]
> @0,110,721tk: [+0 T:0x8fa424cc] OM - Memory_alloc>
> Enter(size=0x24) [DSP] @0,110,766tk: [+0 T:0x8fa424cc] OM -
> Memory_alloc> return (0x8fa46fd0) [DSP] @0,110,835tk: [+0
> T:0x8fa424cc] ti.sdo.ce.video1.VIDENC1 - VIDENC1_create>
> Enter (engine=0x0, name='h264enc', params=0x8fe05cc0) [DSP]
> @0,110,924tk: [+0 T:0x8fa424cc] CV - VISA_create(0x0,
> 'h264enc', 0x8fe05cc0, 0x2496, 'ti.sdo.ce.video1.IVIDENC1')
> [DSP] @0,111,001tk: [+0 T:0x8fa424cc] CV - VISA_create2(0x0,
> 'h264enc', 0x8fe05cc0, 0x30, 0x2496,
> 'ti.sdo.ce.video1.IVIDENC1') [DSP] @0,111,097tk: [+0
> T:0x8fa424cc] CE - Engine_open> Enter('local', 0x8fa461cc,
> 0x9c0) [DSP] @0,111,157tk: [+0 T:0x8fa424cc] OM -
> Memory_alloc> Enter(size=0x2c) [DSP] @0,111,207tk: [+0
> T:0x8fa424cc] OM - Memory_alloc> return (0x8fa47040) [DSP]
> @0,111,264tk: [+0 T:0x8fa424cc] CE - Engine_open>
> return(-1885048768) [DSP] @0,111,328tk: [+0 T:0x8fa424cc] OM
> - Memory_alloc> Enter(size=0x30) [DSP] @0,111,373tk: [+0
> T:0x8fa424cc] OM - Memory_alloc> return (0x8fa47070) [DSP]
> @0,111,427tk: [+0 T:0x8fa424cc] ti.sdo.ce.alg.Algorithm -
> Algorithm_create> Enter(fxns=0x8fac4fb8,
> idma3Fxns=0x8fac4fe4, iresFxns=0x0, params=0x8fe05cc0,
> attrs=0x8fa462e0) [DSP] @0,111,535tk: [+0 T:0x8fa424cc] OM -
> Memory_alloc> Enter(size=0x10) [DSP] @0,111,580tk: [+0
> T:0x8fa424cc] OM - Memory_alloc> return (0x8fa470a0) [DSP]
> @0,111,947tk: [+7 T:0x8fa424cc] ti.sdo.ce.alg.Algorithm -
> Algorithm_create> Algorithm creation FAILED; make sure that
> 1) alg params are correct/appropriate, 2) there is enough
> internal and external algorithm memory available -- check
> DSKT2 settings for heap assignments and scratch allocation
> [DSP] @0,112,107tk: [+0 T:0x8fa424cc] ti.sdo.ce.alg.Algorithm
> - Algorithm_delete> Enter(alg=0x8fa470a0) [DSP] @0,112,170tk:
> [+0 T:0x8fa424cc] OM - Memory_free> Enter(addr=0x8fa470a0,
> size=16) [DSP] @0,112,226tk: [+0 T:0x8fa424cc] OM -
> Memory_free> return (0x1) [DSP] @0,112,269tk: [+0
> T:0x8fa424cc] ti.sdo.ce.alg.Algorithm - Algorithm_delete>
> Exit [DSP] @0,112,322tk: [+0 T:0x8fa424cc]
> ti.sdo.ce.alg.Algorithm - Algorithm_create> return (0x0)
> [DSP] @0,112,379tk: [+2 T:0x8fa424cc] CV - VISA_create2>
> FAILED to create local codec.
> [DSP] @0,112,430tk: [+0 T:0x8fa424cc] CV -
> VISA_delete(0x8fa47070) [DSP] @0,112,476tk: [+5 T:0x8fa424cc]
> CV - VISA_delete> deleting codec (localQueue=0xffff,
> remoteQueue=0xffff) [DSP] @0,112,544tk: [+0 T:0x8fa424cc] OM
> - Memory_free> Enter(addr=0x8fa47070, size=48) [DSP]
> @0,112,598tk: [+0 T:0x8fa424cc] OM - Memory_free> return
> (0x1) [DSP] @0,112,643tk: [+0 T:0x8fa424cc]
> ti.sdo.ce.video1.VIDENC1 - VIDENC1_create> return (0x0) [DSP]
> @0,112,705tk: [+0 T:0x8fa424cc] ti.sdo.ce.video1.VIDENC1 -
> VIDENC1_delete> Enter (handle=0x0) [DSP] @0,112,763tk: [+0
> T:0x8fa424cc] CV - VISA_delete(0x0) [DSP] @0,112,801tk: [+0
> T:0x8fa424cc] ti.sdo.ce.video1.VIDENC1 - VIDENC1_delete>
> return [DSP] @0,112,853tk: [+0 T:0x8fa424cc] OM -
> Memory_free> Enter(addr=0x8fa46fd0, size=36) [DSP]
> @0,112,908tk: [+0 T:0x8fa424cc] OM - Memory_free> return
> (0x1) [DSP] @0,112,950tk: [+0 T:0x8fa424cc] OM - Memory_free>
> Enter(addr=0x8fa46fb0, size=32) [DSP] @0,113,005tk: [+0
> T:0x8fa424cc] OM - Memory_free> return (0x1) [DSP]
> @0,113,053tk: [+0 T:0x8fa424cc] OM - Memory_free>
> Enter(addr=0x8fa46fa0, size=10) [DSP] @0,113,107tk: [+0
> T:0x8fa424cc] OM - Memory_free> return (0x1) [DSP]
> @0,113,149tk: [+0 T:0x8fa424cc] OM - Memory_free>
> Enter(addr=0x8fa46f88, size=24) [DSP] @0,113,204tk: [+0
> T:0x8fa424cc] OM - Memory_free> return (0x1)
> @0,565,060us: [+0 T:0x4001eb80] CE - Engine_fwriteTrace>
> returning count [3916]
> @0,565,237us: [+2 T:0x4001eb80] CE - Engine_createNode> Returning 0x0
> @0,565,376us: [+2 T:0x4001eb80] CV - VISA_create2> FAILED to
> create remote codec (0x8).
> @0,565,511us: [+0 T:0x4001eb80] CV - VISA_delete(0x4ed78)
> @0,565,634us: [+5 T:0x4001eb80] CV - VISA_delete> deleting
> codec (localQueue=0xffff, remoteQueue=0xffff)
> @0,565,781us: [+0 T:0x4001eb80] ti.sdo.ce.video1.VIDENC1 -
> VIDENC1_create> return (0x0)
>
>
> --
> Non c'è più forza nella normalità, c'è solo monotonia.
>
> _______________________________________________
> Davinci-linux-open-source mailing list
> [email protected]
> http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
> _______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source