@@ -20,20 +20,20 @@ static void Main(string[] args)
2020 config . EnableSSE = 1 ;
2121 config . EnableNeon = 1 ;
2222 config . EnableAvx2 = 1 ;
23- config . NumThreads = 1 ;
23+ config . NumThreads = 4 ;
2424 Converter . SetConfig ( config ) ;
2525
2626 H264Encoder encoder = new H264Encoder ( ) ;
2727 H264Decoder decoder = new H264Decoder ( ) ;
2828
2929 decoder . Initialize ( ) ;
3030
31- var bytes = File . ReadAllBytes ( "RawBgr1 .bin" ) ;
32- var data = new ImageData ( ImageType . Bgra , 1920 , 1920 , 3200 * 4 , bytes ) ;
31+ var bytes = File . ReadAllBytes ( "RawBgr .bin" ) ;
32+ var data = new ImageData ( ImageType . Bgra , 1920 , 1080 , 1920 * 4 , bytes ) ;
3333 int w = data . Width ;
3434 int h = data . Height ;
3535
36- encoder . Initialize ( w , h , 200_000_000 , 30 , ConfigType . CameraCaptureAdvanced ) ;
36+ encoder . Initialize ( w , h , 200_000_000 , 30 , ConfigType . CameraBasic ) ;
3737
3838 RgbImage rgbb = new RgbImage ( w , h ) ;
3939 Stopwatch sw = Stopwatch . StartNew ( ) ;
@@ -62,14 +62,7 @@ static void Main(string[] args)
6262 //Console.WriteLine($"F:{encoded.FrameType} size: {encoded.Length}");
6363 // Bitmap result = RgbToBitmap(rgbb);
6464 // result.Save("Ok1.bmp");
65- byte [ ] datt = new byte [ w * h * 3 ] ;
66-
67- unsafe
68- {
69- fixed ( byte * dataPtr = datt )
70- Buffer . MemoryCopy ( ( byte * ) rgbb . ImageBytes . ToPointer ( ) , dataPtr , datt . Length , datt . Length ) ;
71- }
72- File . WriteAllBytes ( "Output3.bin" , datt ) ;
65+
7366 }
7467
7568 }
0 commit comments