Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/happycube/ld-decode into vh…
Browse files Browse the repository at this point in the history
…s_decode
  • Loading branch information
oyvindln committed Jan 19, 2025
2 parents 4c30dea + 7959ae9 commit 9e02e6a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tools/ld-process-vbi/biphasecode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,16 @@ qint32 BiphaseCode::manchesterDecoder(const SourceVideo::Data &lineData, qint32

// We must have 24-bits if the decode was successful
if (decodeCount != 24) {
if (decodeCount != 0) qDebug() << "BiphaseCode::manchesterDecoder(): Manchester decode failed! Got" << decodeCount << "bits, expected 24";

result = 0;

if (decodeCount != 0) {
qDebug() << "BiphaseCode::manchesterDecoder(): Manchester decode failed! Got" << decodeCount << "bits, expected 24";
// -1 is a good choice to indicate a parse error because it does not conflict with 0 (black line) or >0 (successfully parsed data)
// differentiating between parse errors and black lines is useful because if parse errors are known, they can be autofixed by studying the surrounding picture number cadence
result = -1;
}

}

return result;
Expand Down

0 comments on commit 9e02e6a

Please sign in to comment.