Skip to content

Commit

Permalink
changes for 3.42.1
Browse files Browse the repository at this point in the history
* Add support for yuv420p10 with bt.709 #104
  • Loading branch information
argorar committed Nov 5, 2024
1 parent 99d91cb commit 4ff003c
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 5 deletions.
17 changes: 14 additions & 3 deletions MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ public partial class MainForm : Form
bool bt2020;
bool hdr10;
bool bt601;
bool bt709;

private List<string> _temporaryFilesList;

Expand Down Expand Up @@ -1613,6 +1614,8 @@ void SetFile(string path)
hdr10 = false;
bt2020 = false;
yuvj420p = false;
bt601 = false;
bt709 = false;

if (Path.GetExtension(path) == ".avs")
{
Expand Down Expand Up @@ -1845,6 +1848,11 @@ void SetFile(string path)
bt601 = true;
}

if (nav.GetAttribute("color_space", "") == "bt709")
{
bt709 = true;
}

// Check if this is a Hi444p video - if so, we'll need to do something weird if you wanna add subs later.
Program.InputHasWeirdPixelFormat = nav.GetAttribute("pix_fmt", "").StartsWith("yuv444p");

Expand Down Expand Up @@ -2482,8 +2490,7 @@ string GenerateArguments()
var pixelFormat = checkBoxAlpha.Checked && checkBoxAlpha.Enabled ? "yuva420p" : "yuv420p";
pixelFormat = hdr10 && mp4Box.SelectedIndex == ((int)Mp4Codec.Hevc_nvenc) ? "p010le" : pixelFormat;
pixelFormat = hdr10 && mp4Box.SelectedIndex < ((int)Mp4Codec.H264_nvenc)
&& mp4Box.SelectedIndex > ((int)Mp4Codec.H264_nvenc) ? "yuv420p10le" : pixelFormat;
pixelFormat = hdr10 && mp4Box.SelectedIndex != ((int)Mp4Codec.Hevc_nvenc) ? "yuv420p10le" : pixelFormat;
var threads = trackThreads.Value;
var slices = GetSlices();
Expand All @@ -2505,10 +2512,14 @@ string GenerateArguments()
extraArguments + $@" -color_primaries bt709 -color_trc bt709 -colorspace {colorSpace} -color_range full" :
extraArguments;

extraArguments = hdr10 ?
extraArguments = hdr10 && !bt709?
extraArguments + @" -color_trc smpte2084 -color_primaries bt2020 -colorspace bt2020nc " :
extraArguments;

extraArguments = hdr10 && bt709 ?
extraArguments + @" -color_trc bt709 -color_primaries bt709 -colorspace bt709 " :
extraArguments;

extraArguments = bt2020 ?
extraArguments + @" -color_trc arib-std-b67 -color_primaries bt2020 -colorspace bt2020nc " :
extraArguments;
Expand Down
Binary file added NewUpdate/3.42.1.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion NewUpdate/latest
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.42.0
3.42.1
2 changes: 1 addition & 1 deletion Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("3.42.0")]
[assembly: AssemblyVersion("3.42.1")]
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,13 +224,17 @@ Drag and drop two or more video files inside the application, select what do you
* Change Rate: ```Alt + Shift + c```

### Supporters
* Cybelia♡
* Chibi
* bouteloua
* ManletPride
* 3nly

## Changelog

#### Version 3.42.1
* Add support for yuv420p10 with bt.709 [issue](https://github.com/argorar/WebMConverter/issues/104)

#### Version 3.42.0
* Add merge audio, in track selector choose mix all (only two tracks sopported now) [request](https://github.com/argorar/WebMConverter/issues/102)
* Expand support for HDR
Expand Down

0 comments on commit 4ff003c

Please sign in to comment.