Skip to content

Commit 881c5b5

Browse files
committed
decoder optimisation & code cleanup
1 parent 62b830a commit 881c5b5

File tree

18 files changed

+447
-378
lines changed

18 files changed

+447
-378
lines changed
0 Bytes
Binary file not shown.

Examples/CrossPlatformTest/Program.cs

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@ namespace CrossPlatformTest
66
{
77
internal class Program
88
{
9+
//TODO test on linux with the opt none removal
10+
911
/*
10-
* Loads a raw rgba and encodes - decodes.
11-
* I publish this for linux and add ncessary .so files on executable dir.
12+
* Loads a raw rgba and encodes -> decodes.
13+
* I publish this for linux and add ncessary .so files on out dir.
1214
*/
1315
static void Main(string[] args)
1416
{
@@ -70,13 +72,6 @@ static void Main(string[] args)
7072
decoder.Dispose();
7173
Console.ReadLine();
7274
}
73-
74-
75-
76-
77-
78-
79-
8075
}
8176

8277
}
Binary file not shown.

H264Sharp/Converter.cs

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@ public class Converter
2929

3030
private readonly bool x64 = Environment.Is64BitProcess;
3131

32+
/// <summary>
33+
/// Downslales image by given factor efficiently
34+
/// i.e multiplier 2 gives w/2,h/2.
35+
/// </summary>
36+
/// <param name="from"></param>
37+
/// <param name="to"></param>
38+
/// <param name="multiplier"></param>
3239
public void Downscale(ImageData from, RgbImage to, int multiplier)
3340
{
3441
unsafe
@@ -94,19 +101,9 @@ public void Downscale(ImageData from, RgbImage to, int multiplier)
94101
DownscaleImgx86(ref ugi, ref t, multiplier);
95102
}
96103
}
97-
98-
99-
100104
}
101-
102105
}
103-
104-
105-
106-
107-
108106
}
109-
110107
}
111108

112109

0 commit comments

Comments
 (0)