]> git.sesse.net Git - bmusb/commitdiff
Add extra_lines information for 1080i.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Tue, 17 Nov 2015 22:13:25 +0000 (23:13 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Tue, 17 Nov 2015 22:13:25 +0000 (23:13 +0100)
bmusb.cpp
bmusb.h

index b1c8fdc7225b00432f1e8610e451d0fd609e2882..18ea353bb580a06ad04b014ab4fb347df1c5964b 100644 (file)
--- a/bmusb.cpp
+++ b/bmusb.cpp
@@ -1169,17 +1169,17 @@ bool decode_video_format(uint16_t video_format, int *width, int *height, int *ex
        // usually it doesn't mean anything.
        uint16_t normalized_video_format = video_format & ~0xe808;
        constexpr VideoFormatEntry entries[] = {
-               { 0x0143, 1280,  720, 25, 5,    50,    1, false },  // 720p50.
-               { 0x0103, 1280,  720, 25, 5,    60,    1, false },  // 720p60.
-               { 0x0121, 1280,  720, 25, 5, 60000, 1001, false },  // 720p59.94.
-               { 0x01c3, 1920, 1080,  0, 0,    30,    1, false },  // 1080p30.
-               { 0x0003, 1920, 1080,  0, 0,    30,    1,  true },  // 1080i60.
-               { 0x01e1, 1920, 1080,  0, 0, 30000, 1001, false },  // 1080p29.97.
-               { 0x0021, 1920, 1080,  0, 0, 30000, 1001,  true },  // 1080i59.94.
-               { 0x0063, 1920, 1080,  0, 0,    25,    1, false },  // 1080p25.
-               { 0x0043, 1920, 1080,  0, 0,    25,    1,  true },  // 1080p50.
-               { 0x008e, 1920, 1080,  0, 0,    24,    1, false },  // 1080p24.
-               { 0x00a1, 1920, 1080,  0, 0, 24000, 1001, false },  // 1080p23.98.
+               { 0x0143, 1280,  720, 25,  5,    50,    1, false },  // 720p50.
+               { 0x0103, 1280,  720, 25,  5,    60,    1, false },  // 720p60.
+               { 0x0121, 1280,  720, 25,  5, 60000, 1001, false },  // 720p59.94.
+               { 0x01c3, 1920, 1080,  0,  0,    30,    1, false },  // 1080p30.
+               { 0x0003, 1920, 1080, 20, 25,    30,    1,  true },  // 1080i60.
+               { 0x01e1, 1920, 1080,  0,  0, 30000, 1001, false },  // 1080p29.97.
+               { 0x0021, 1920, 1080, 20, 25, 30000, 1001,  true },  // 1080i59.94.
+               { 0x0063, 1920, 1080,  0,  0,    25,    1, false },  // 1080p25.
+               { 0x0043, 1920, 1080,  0,  0,    25,    1,  true },  // 1080p50.
+               { 0x008e, 1920, 1080,  0,  0,    24,    1, false },  // 1080p24.
+               { 0x00a1, 1920, 1080,  0,  0, 24000, 1001, false },  // 1080p23.98.
        };
        for (const VideoFormatEntry &entry : entries) {
                if (normalized_video_format == entry.normalized_video_format) {
diff --git a/bmusb.h b/bmusb.h
index 58ad9e7f3d86b0c60fd742921a7a279708ea07f7..f643bd471738600615cf4dbafaef3e5564e03405 100644 (file)
--- a/bmusb.h
+++ b/bmusb.h
@@ -157,6 +157,7 @@ class BMUSBCapture {
 
 // Get details for the given video format; returns false if detection was incomplete.
 // Note: Frame rate is _frame_ rate, not field rate. So 1080i60 gets 30/1, _not_ 60/1.
+// TODO: Add another extra_lines_ parameter for interlaced.
 bool decode_video_format(uint16_t video_format, int *width, int *height, int *extra_lines_top, int *extra_lines_bottom,
                          int *frame_rate_nom, int *frame_rate_den, bool *interlaced);