Skip to content

Commit

Permalink
Requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
oyvindln authored and atsampson committed Oct 16, 2021
1 parent 157e27e commit 46b4f2a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
9 changes: 4 additions & 5 deletions tools/ld-chroma-decoder/comb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -752,10 +752,9 @@ void Comb::FrameBuffer::doCNR()
const qint32 delay = c_nrc_b.size() / 2;

// High-pass result
// Windows fix: MSVC does not support VLA, so changed to using vector instead.
// TODO: May want to cache arrays instead of reallocating every field.
auto hpI = std::vector<double>(videoParameters.activeVideoEnd + delay);
auto hpQ = std::vector<double>(videoParameters.activeVideoEnd + delay);
// TODO: Cache arrays instead of reallocating every field.
std::vector<double> hpI(videoParameters.activeVideoEnd + delay);
std::vector<double> hpQ(videoParameters.activeVideoEnd + delay);


for (qint32 lineNumber = videoParameters.firstActiveFrameLine; lineNumber < videoParameters.lastActiveFrameLine; lineNumber++) {
Expand Down Expand Up @@ -809,7 +808,7 @@ void Comb::FrameBuffer::doYNR()
const qint32 delay = c_nr_b.size() / 2;

// High-pass result
auto hpY = std::vector<double>(videoParameters.activeVideoEnd + delay);
std::vector<double> hpY(videoParameters.activeVideoEnd + delay);

for (qint32 lineNumber = videoParameters.firstActiveFrameLine; lineNumber < videoParameters.lastActiveFrameLine; lineNumber++) {
double *Y = componentFrame->y(lineNumber);
Expand Down
2 changes: 1 addition & 1 deletion tools/ld-chroma-decoder/encoder/encoder.pro
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ TARGET = ld-chroma-encoder
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
DEFINES += _USE_MATH_DEFINES
win32:DEFINES += _USE_MATH_DEFINES

# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
Expand Down
2 changes: 1 addition & 1 deletion tools/ld-chroma-decoder/palcolour.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ void PalColour::doYNR(double *Yline)
const qint32 delay = c_nrpal_b.size() / 2;

// High-pass result
auto hpY = std::vector<double>(videoParameters.activeVideoEnd + delay);
std::vector<double> hpY(videoParameters.activeVideoEnd + delay);

// Feed zeros into the filter outside the active area
for (qint32 h = videoParameters.activeVideoStart - delay; h < videoParameters.activeVideoStart; h++) {
Expand Down

0 comments on commit 46b4f2a

Please sign in to comment.