OpenCores
URL https://opencores.org/ocsvn/nova/nova/trunk

Subversion Repositories nova

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 6 to Rev 7
    Reverse comparison

Rev 6 → Rev 7

/trunk/test/hex2bin.cpp
0,0 → 1,27
// Author(s) : Ke Xu
// Email : eexuke@yahoo.com
// Description: Convert text file to binary (.yuv) file
// Copyright (C) 2008 Ke Xu
 
#include <stdio.h>
int main ()
{
int buffer;
int i;
FILE * inFile;
FILE * outFile;
inFile = fopen ("C:/xxx/xxx/nova_display.log","r");
outFile = fopen ("C:/xxx/xxx/nova300.yuv", "w+b");
//1 frame:9504 x 32bit
//300 frame:9504 x 300 x 32 bit = 2851200 x 32bit
for (i = 0; i < 2851200; i++)
{
fscanf (inFile,"%x",&buffer);
fwrite (&buffer,4,1,outFile);
}
fclose (inFile);
fclose (outFile);
return 0;
}
 
/trunk/test/bin2hex.pl
0,0 → 1,35
#! /usr/bin/perl
 
# Author(s) : Ke Xu
# Email : eexuke@yahoo.com
# Description: Convert binary .264 file to text format
# Usage : bin2hex.pl xxx.264
# Copyright (C) 2008 Ke Xu
 
open STDOUT, ">akiyo300_1ref.txt" || die "Can't open output file:$!\n";
if (open(BINFILE,"<".$ARGV[0]))
{
binmode(BINFILE);
$s = '';
$i = 0;
while (!eof(BINFILE))
{
if ($i >= 2)
{
printf "%s\n",$s;
$s = '';
$i = 0;
}
else
{
$i++;
$s .= sprintf("%02X",ord(getc(BINFILE)));
}
}
###if last line of BINFILE is less than 16 byte
if ($i < 2)
{
printf "%s",$s;
}
close (BINFILE);
}
/trunk/test/readme.txt
1,0 → 5,35
To be added soon
bin2hex.pl :convert binary .264 into text format.
 
hex2bin.cpp:convert text format to binary .264.
 
bitstream folder:encoded bitstream .264 should be converted first by bin2hex.pl while .txt can be directly read into verilog.

powered by: WebSVN 2.1.0

© copyright 1999-2022 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.