Click here to Skip to main content
15,900,378 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Visual studio 2010 compile error - I don't understand how to fix it Pin
Jochen Arndt22-Jul-14 5:44
professionalJochen Arndt22-Jul-14 5:44 
GeneralRe: Visual studio 2010 compile error - I don't understand how to fix it Pin
Member 1095872122-Jul-14 6:26
Member 1095872122-Jul-14 6:26 
GeneralRe: Visual studio 2010 compile error - I don't understand how to fix it Pin
Member 1095872122-Jul-14 6:26
Member 1095872122-Jul-14 6:26 
QuestionRegarding Image re sizing using Tiva c series MCU and Keil as IDE. Pin
Member 1083350122-Jul-14 2:09
Member 1083350122-Jul-14 2:09 
AnswerRe: Regarding Image re sizing using Tiva c series MCU and Keil as IDE. Pin
CPallini22-Jul-14 2:40
mveCPallini22-Jul-14 2:40 
GeneralRe: Regarding Image re sizing using Tiva c series MCU and Keil as IDE. Pin
Member 1083350122-Jul-14 2:56
Member 1083350122-Jul-14 2:56 
QuestionRe: Regarding Image re sizing using Tiva c series MCU and Keil as IDE. Pin
CPallini22-Jul-14 6:07
mveCPallini22-Jul-14 6:07 
AnswerRe: Regarding Image re sizing using Tiva c series MCU and Keil as IDE. Pin
Member 1083350122-Jul-14 19:05
Member 1083350122-Jul-14 19:05 
hi CPallini,

Actually for using malloc we need to allocate heap space in startup.s file, here its allowing only 1000k of memory and if I enter 2000k it will throw error as "there is no space in execution region", so when it try to access the memory at 35k it will show error, below is the code where it is getting stuck.

pImage = (uint8 *)malloc(row_pitch * decoded_height);// here the size of allocation is >32kb.

if (!pImage)
{
fclose(g_pInFile);
return NULL;
}

row_blocks_per_mcu = image_info.m_MCUWidth >> 3;
col_blocks_per_mcu = image_info.m_MCUHeight >> 3;

for ( ; ; )
{
int y, x;
uint8 *pDst_row;

status = pjpeg_decode_mcu();

if (status)
{
if (status != PJPG_NO_MORE_BLOCKS)
{
printf("pjpeg_decode_mcu() failed with status %u\n", status);

free(pImage);
fclose(g_pInFile);
return NULL;
}

break;
}

if (mcu_y >= image_info.m_MCUSPerCol)
{
free(pImage);
fclose(g_pInFile);
return NULL;
}

if (reduce)
{
// In reduce mode, only the first pixel of each 8x8 block is valid.
pDst_row = pImage + mcu_y * col_blocks_per_mcu * row_pitch + mcu_x * row_blocks_per_mcu * image_info.m_comps;
if (image_info.m_scanType == PJPG_GRAYSCALE)
{
*pDst_row = image_info.m_pMCUBufR[0];
}
else
{
uint y, x;
for (y = 0; y < col_blocks_per_mcu; y++)
{
uint src_ofs = (y * 128);
for (x = 0; x < row_blocks_per_mcu; x++)
{
pDst_row[0] = image_info.m_pMCUBufR[src_ofs]; // Here the error occurs.
pDst_row[1] = image_info.m_pMCUBufG[src_ofs];
pDst_row[2] = image_info.m_pMCUBufB[src_ofs];
pDst_row += 3;
src_ofs += 64;
}
pDst_row += row_pitch - 3 * row_blocks_per_mcu;
}
}
}
mcu_x++;
if (mcu_x == image_info.m_MCUSPerRow)
{
mcu_x = 0;
mcu_y++;
}
}

fclose(g_pInFile);

*x = decoded_width;
*y = decoded_height;
*comps = image_info.m_comps;

return pImage;


thanks
srini
QuestionRe: Regarding Image re sizing using Tiva c series MCU and Keil as IDE. Pin
CPallini22-Jul-14 20:29
mveCPallini22-Jul-14 20:29 
AnswerRe: Regarding Image re sizing using Tiva c series MCU and Keil as IDE. Pin
Member 1083350123-Jul-14 0:20
Member 1083350123-Jul-14 0:20 
GeneralRe: Regarding Image re sizing using Tiva c series MCU and Keil as IDE. Pin
CPallini23-Jul-14 0:50
mveCPallini23-Jul-14 0:50 
GeneralRe: Regarding Image re sizing using Tiva c series MCU and Keil as IDE. Pin
Member 1083350123-Jul-14 1:01
Member 1083350123-Jul-14 1:01 
GeneralRe: Regarding Image re sizing using Tiva c series MCU and Keil as IDE. Pin
CPallini23-Jul-14 1:23
mveCPallini23-Jul-14 1:23 
QuestionPRINTDLG to CPrintInfo Pin
_Flaviu21-Jul-14 23:43
_Flaviu21-Jul-14 23:43 
AnswerRe: PRINTDLG to CPrintInfo Pin
Richard MacCutchan22-Jul-14 0:29
mveRichard MacCutchan22-Jul-14 0:29 
GeneralRe: PRINTDLG to CPrintInfo Pin
_Flaviu22-Jul-14 1:22
_Flaviu22-Jul-14 1:22 
QuestionRe: PRINTDLG to CPrintInfo Pin
Richard MacCutchan22-Jul-14 2:19
mveRichard MacCutchan22-Jul-14 2:19 
AnswerRe: PRINTDLG to CPrintInfo Pin
_Flaviu22-Sep-14 1:25
_Flaviu22-Sep-14 1:25 
GeneralRe: PRINTDLG to CPrintInfo Pin
Richard MacCutchan22-Sep-14 1:29
mveRichard MacCutchan22-Sep-14 1:29 
GeneralRe: PRINTDLG to CPrintInfo Pin
_Flaviu22-Sep-14 1:39
_Flaviu22-Sep-14 1:39 
GeneralRe: PRINTDLG to CPrintInfo Pin
_Flaviu25-Sep-14 3:36
_Flaviu25-Sep-14 3:36 
GeneralRe: PRINTDLG to CPrintInfo Pin
Richard MacCutchan25-Sep-14 3:51
mveRichard MacCutchan25-Sep-14 3:51 
GeneralRe: PRINTDLG to CPrintInfo Pin
_Flaviu25-Sep-14 21:10
_Flaviu25-Sep-14 21:10 
GeneralRe: PRINTDLG to CPrintInfo Pin
_Flaviu25-Sep-14 23:17
_Flaviu25-Sep-14 23:17 
GeneralRe: PRINTDLG to CPrintInfo Pin
Richard MacCutchan25-Sep-14 23:35
mveRichard MacCutchan25-Sep-14 23:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.