Pb de retour( du tableau) de ma fonction
airwann
- Messages postés
-
2
- Date d'inscription
- lundi 18 août 2003
- Statut
- Membre
- Dernière intervention
- 19 août 2003
-
cbestern
- Messages postés
-
25
- Date d'inscription
- jeudi 19 décembre 2002
- Statut
- Membre
- Dernière intervention
- 17 novembre 2003
-
bonjour,
j ai un problème comment dois je modifier l'entête de ma fonction pour recupérer le tableau de structure 3 d alloué dynamiquement
merci d avance car je suis à la limite du pétage de plomb
////////////////////////////////////////////////////////////////////
void allocation_image_memoire_buffer_sequence(struct macro *** *image,unsigned int *nbre_picture_startcode_code,unsigned int *composante_horizontal,unsigned int *composante_vertical)
{ unsigned int i,j;
unsigned int *DIMivert,*DIMjhori;
if( (DIMivert=(unsigned int *)calloc(1,sizeof(unsigned int))) == NULL)
{
puts("allocation demandee impossible pour DIMivert\n");
}
if( (DIMjhori=(unsigned int *)calloc(1,sizeof(unsigned int))) == NULL)
{
puts("allocation demandee impossible pour DIMhori\n");
}
DIMivert[0]=0;DIMjhori[0]=0;
puts("allocation_image_memoire_buffer_sequence\n");
if( (*nbre_picture_startcode_code 0) || (*composante_horizontal 0)|| (*composante_vertical == 0))
{
exit(1);
puts("probleme de detection\n");
}
*DIMivert=(*composante_vertical)>>4;*DIMjhori=(*composante_horizontal)>>4;
//dimension temporaire
// déclaration des séquences d'images
// allocate space memory for 3D matrix ((buffer sequence d image))
/////////////////////////////////////////////////////////////////////////////////////
image=(struct macro ***)calloc((*nbre_picture_startcode_code), sizeof(struct macro **));
if(!image)
{
puts("\nError making nbreimage image\n");exit(1);
}
for(i = 0 ; i < (*nbre_picture_startcode_code) ; i++)
{
image[i] = (struct macro **)calloc((*DIMivert-1),sizeof(struct macro *));
if(!image[i])
{
puts("\nError making DIMivert2 image\n");exit(1);
}
for(j =0;j<(*DIMivert);j++)
{
image[i][j] = (struct macro *)calloc((*DIMjhori-1),sizeof(struct macro));
if(!image[i][j])
{
puts("\nError making DIMjhori image\n");exit(1);
}
}
}
free(DIMivert);free(DIMjhori);
}
///////////////////////////////////////