Dear experts,
I am porting JM decoder into DSP side. I am using Codec engine right now, I just put all decoder into "example/codecs/viddec_copy/".
and compiling is successfully. However, the problem is that when I am using "malloc()" , i found that it does not work through, any suggestions? thanks very much,
The examples like this:
===============
void ParseCommand(InputParameters *p_Inp, char *inBuf)
{
f = fopen (filename, "r");
FileSize = ftell (f);
content = malloc (FileSize + 1);
FileSize = (long) fread (content, 1, FileSize, f);
content[FileSize] = '\0';
fclose (f);
ParseContent (p_Inp, Map, content, (int) strlen (content));
}
================
void ParseContent (InputParameters *p_Inp, Mapping *Map, char *buf, int bufsize)
{
.
.
char *bufend = &buf[bufsize];
.
.
.
}
=================
However, when running it on board, the following error occurs:
"DSP MMU Error Fault! MMU_IRQSTATUS = [0x1]. Virtual DSP addr reference that generated the interrupt = [0x78729560]."
If I change "bufsize" to "0", like "char *bufend = &buf[0];" in the second function, which does not give the error above.
I guess the "content = malloc (FileSize + 1);" did not work, am I right?
Regards,
David