Skip to content

Commit

Permalink
Cleaned up code.
Browse files Browse the repository at this point in the history
  • Loading branch information
ggarra13 committed Feb 19, 2024
1 parent 16a48ef commit a60bad5
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions lib/tlIO/FFmpegWrite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,6 @@ namespace tl
else
throw std::runtime_error(
string::Format("Unknown pixel format {0}").arg(s));
// else if (s == "RGB10")
// return AV_PIX_FMT_RGB10;
// else if (s == "RGB12")
// return AV_PIX_FMT_RGB12;
return o;
}

Expand Down Expand Up @@ -109,15 +105,25 @@ namespace tl
if (!s)
s = "bt601";

if (s && strstr(s, "bt709")) {
if (s && strstr(s, "bt709"))
{
colorspace = AVCOL_SPC_BT709;
} else if (s && strstr(s, "fcc")) {
}
else if (s && strstr(s, "fcc"))
{
colorspace = AVCOL_SPC_FCC;
} else if (s && strstr(s, "smpte240m")) {
}
else if (s && strstr(s, "smpte240m"))
{
colorspace = AVCOL_SPC_SMPTE240M;
} else if (s && (strstr(s, "bt601") || strstr(s, "bt470") || strstr(s, "smpte170m"))) {
}
else if (s && (strstr(s, "bt601") || strstr(s, "bt470") ||
strstr(s, "smpte170m")))
{
colorspace = AVCOL_SPC_BT470BG;
} else if (s && strstr(s, "bt2020")) {
}
else if (s && strstr(s, "bt2020"))
{
colorspace = AVCOL_SPC_BT2020_NCL;
}

Expand Down

0 comments on commit a60bad5

Please sign in to comment.