Quantcast
Channel: EngineerZone: Message List
Viewing all articles
Browse latest Browse all 36216

Re: read yuv file from SDRAM

$
0
0

You can refer FileIO based demo code in video occupancy detection. In the simplest you can read the *.yuv file as :

 

FILE    *fpIn;
unsigned int  file_ret;

char* sInFname = "C:/Analog Devices/SoftwareModules/Media/VideoOccupancySensor/test.yuv";
fpIn = fopen(sInFname, "rb");
if(fpIn == NULL)
{
       printf("Error Opening file %s\n", sInFname);
        return FILE_IO_FAILURE;
}
 

// Read video frame from file
file_ret = fread(SDRAM_BUFF_ADDR, 1, (SIZE_OF_FRAME), fpIn);
if(file_ret != (SIZE_OF_FRAME))
{
      printf("Error Opening file %s\n", fpIn);
      return FILE_IO_FAILURE;
}


Viewing all articles
Browse latest Browse all 36216

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>