Hi list,
We are working with multiple instances of MPEG4 encoder algorithm on DaVinci
and in that we are facing some problems.
In our system there are two threads on ARM who deals with the MPEG4 encoder
running on DSP, i.e. control thread and DSP thread, we have typical command
and response based protocol implementation between these two threads.
In this case control thread sends messages to DSP thread to create the
instances of MPEG4 encoder algorithm on DSP.
After creating the instance of an algorithm DSP thread returns the handle of
the algorithm back to the control thread.
On receiving this handle Control thread stores these handles in to an array
and when control thread has the valid data to encode it sends that data to
the DSP thread with respective handles from this array.
We are able to create the 4 instances of MPEG4 encoder when Control thread
sends 4 commands to DSP thread. But the problem we are facing is:
When Control thread sends 4 commands with different valid data and handles
to the DSP thread, DSP thread encodes the last command properly but do not
encode the first 3 channels properly and gives OutArgs.bytesGenerated = 0
most of the time for these 3 commands. But if we change our design little
bit and send only one message to process from Control thread and we use for
loop (4 times) to process with different data and handles as well then it
encodes all four channels (instances) properly.
As per the comments received from TI support team for the multiple instances
of an algorithm we have made our application.cfg.
In this configuration file we have made changes for the support of four
channels (instances) of MPEG4 encoder:
/* Load support for the encoders */
var MPEG4ENC1 = xdc.useModule('codecs.mpeg4enc.MPEG4ENC');
var MPEG4ENC2 = xdc.useModule('codecs.mpeg4enc.MPEG4ENC');
var MPEG4ENC3 = xdc.useModule('codecs.mpeg4enc.MPEG4ENC');
var MPEG4ENC4 = xdc.useModule('codecs.mpeg4enc.MPEG4ENC');
/*
* ======== Engine Configuration ========
*/
var Engine = xdc.useModule('ti.sdo.ce.Engine');
var demoEngine = Engine.create("encode", [
{name: "videoEnc1", mod: MPEG4ENC1, groupId: 0, local: false},
{name: "videoEnc2", mod: MPEG4ENC2, groupId: 0, local: false},
{name: "videoEnc3", mod: MPEG4ENC3, groupId: 0, local: false},
{name: "videoEnc4", mod: MPEG4ENC4, groupId: 0, local: false},
]);
Is our application.cfg is ok or we don't need to insert module of MPEG4
multiple times that we did using xdc.useModule 4 times?
Still we are not clear with the configuration of DSP Server image (.x64p
file).
This is the code of our Dspserver.cfg:
/* get various codec modules; i.e., implementation of codecs */
var MPEG4ENC = xdc.useModule('codecs.mpeg4enc.MPEG4ENC');
/*
* ======= Server Configuration ========
*/
var Server = xdc.useModule('ti.sdo.ce.Server');
Server.threadAttrs.stackSize = 2048;
Server.threadAttrs.priority = Server.MINPRI;
Server.algs = [
{name: "mpeg4enc", mod: MPEG4ENC, threadAttrs: {
stackSize: 8192, stackMemId: 0, priority: Server.MINPRI + 1}
},
];
Do we have to make changes such as we did for application.cfg in the
Dspserver.cfg for 4 instances of MPEG4 encoder or our Dspserver.cfg is
proper?
___________
Regards,
Zuber Saiyed
Embedded Engineer,
eInfochips Ltd.,
Ahmedabad, India.
Tel (O.):- +91 79 26563705 (Ext-126)
Cell No.: +91 98247 45644
Mail to: [EMAIL PROTECTED]
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source