diff --git a/mythtv/programs/mythcommflag/ClassicCommDetector.cpp b/mythtv/programs/mythcommflag/ClassicCommDetector.cpp
index 93f280e..4d9ff23 100644
a
|
b
|
enum frameAspects { |
31 | 31 | COMM_ASPECT_WIDE |
32 | 32 | } FrameAspects; |
33 | 33 | |
| 34 | // letter-box and pillar-box are not mutually exclusive |
| 35 | // So 3 is a valid value = (COMM_FORMAT_LETTERBOX | COMM_FORMAT_PILLARBOX) |
| 36 | // And 4 = COMM_FORMAT_MAX is the number of valid values. |
34 | 37 | enum frameFormats { |
35 | | COMM_FORMAT_NORMAL = 0, |
36 | | COMM_FORMAT_LETTERBOX, |
37 | | COMM_FORMAT_PILLARBOX, |
38 | | COMM_FORMAT_MAX |
| 38 | COMM_FORMAT_NORMAL = 0, |
| 39 | COMM_FORMAT_LETTERBOX = 1, |
| 40 | COMM_FORMAT_PILLARBOX = 2, |
| 41 | COMM_FORMAT_MAX = 4, |
39 | 42 | } FrameFormats; |
40 | 43 | |
41 | 44 | static QString toStringFrameMaskValues(int mask, bool verbose) |
… |
… |
static QString toStringFrameFormats(int format, bool verbose) |
88 | 91 | switch (format) |
89 | 92 | { |
90 | 93 | case COMM_FORMAT_NORMAL: |
91 | | return (verbose) ? "normal" : "N"; |
| 94 | return (verbose) ? "normal" : " N "; |
92 | 95 | case COMM_FORMAT_LETTERBOX: |
93 | | return (verbose) ? "letter" : "L"; |
| 96 | return (verbose) ? "letter" : " L "; |
94 | 97 | case COMM_FORMAT_PILLARBOX: |
95 | | return (verbose) ? "pillar" : "P"; |
| 98 | return (verbose) ? "pillar" : " P "; |
| 99 | case COMM_FORMAT_LETTERBOX | COMM_FORMAT_PILLARBOX: |
| 100 | return (verbose) ? "letter,pillar" : "L,P"; |
96 | 101 | case COMM_FORMAT_MAX: |
97 | | return (verbose) ? " max " : "M"; |
| 102 | return (verbose) ? " max " : " M "; |
98 | 103 | } |
99 | 104 | |
100 | | return (verbose) ? " null " : "n"; |
| 105 | return (verbose) ? "unknown" : " U "; |
101 | 106 | } |
102 | 107 | |
103 | 108 | QString FrameInfoEntry::GetHeader(void) |
… |
… |
void ClassicCommDetector::ProcessFrame(VideoFrame *frame, |
917 | 922 | delete[] colMax; |
918 | 923 | colMax = 0; |
919 | 924 | |
| 925 | frameInfo[curFrameNumber].format = COMM_FORMAT_NORMAL; |
920 | 926 | if ((topDarkRow > commDetectBorder) && |
921 | 927 | (topDarkRow < (height * .20)) && |
922 | 928 | (bottomDarkRow < (height - commDetectBorder)) && |
923 | 929 | (bottomDarkRow > (height * .80))) |
924 | 930 | { |
925 | | frameInfo[curFrameNumber].format = COMM_FORMAT_LETTERBOX; |
| 931 | frameInfo[curFrameNumber].format |= COMM_FORMAT_LETTERBOX; |
926 | 932 | } |
927 | | else if ((leftDarkCol > commDetectBorder) && |
| 933 | if ((leftDarkCol > commDetectBorder) && |
928 | 934 | (leftDarkCol < (width * .20)) && |
929 | 935 | (rightDarkCol < (width - commDetectBorder)) && |
930 | 936 | (rightDarkCol > (width * .80))) |
931 | 937 | { |
932 | | frameInfo[curFrameNumber].format = COMM_FORMAT_PILLARBOX; |
933 | | } |
934 | | else |
935 | | { |
936 | | frameInfo[curFrameNumber].format = COMM_FORMAT_NORMAL; |
| 938 | frameInfo[curFrameNumber].format |= COMM_FORMAT_PILLARBOX; |
937 | 939 | } |
938 | 940 | |
939 | 941 | avg = totBrightness / blankPixelsChecked; |