VIDEO STREAM TIMING DETECTION
A video signal identification system including an input module configured to receive an unknown video signal, a video signal processing module configured to process known video signals, and a processor coupled to the input module and to the video signal processing module and configured to determine and store information indicative of characteristics of the unknown video signal such that the unknown video signal becomes a known video signal that can be processed by the video signal processing module.
This application claims the benefit of U.S. Provisional Application No. 60/824,204, filed on Aug. 31, 2006, which is incorporated by reference herein in its entirety.
BACKGROUNDToday, many forms of video information are provided from information sources, such as cable companies, DVD players, and gaming consoles, to receivers, such as televisions in people's homes. Thus, an example of such information is digital television (DTV) information such as a high-definition television (HDTV) signal. Providing video information to a receiver typically involves processing the information according to one or more standardized specifications depending on, for the example, the method used to provide the video information to the receiver. The receiver is typically configured to receive and decode the video information according to the particular standard used. The video information provided by an information source typically includes “active” information (e.g., the portion of the video information corresponding to the displayed image) and “ancillary” information used by a receiver to properly display the active information (e.g., vertical synchronization (VS) information, horizontal synchronization (HS) information, pixel clocks, and/or a DACTIVE signal).
In order for a video signal processing system to process video information provided by an information source, several characteristics about the video information are desired to be known by the processing system. Characteristics of the video signal can include many attributes such as a polarity of the video signal, where edges are located in the video signal, a location of an active edge in the signal, a clock frequency used to transmit the video signal, a threshold value corresponding to the video signal, etc. The characteristics of the video signal, however, typically vary greatly depending on many factors such as where a receiver is located (e.g., different countries use different standards), the method used to provide the video information (e.g., via terrestrial broadcast, or via a cable distribution system), and/or the type of video information provided (e.g., video game images, television programming, computer graphics, etc.).
SUMMARYIn general, in an aspect, the invention provides a video signal identification system including an input module configured to receive an unknown video signal, a video signal processing module configured to process known video signals, and a processor coupled to the input module and to the video signal processing module and configured to determine and store information indicative of characteristics of the unknown video signal such that the unknown video signal becomes a known video signal that can be processed by the video signal processing module.
Implementations of the invention may provide one or more of the following features. The processor is configured to detect a polarity of at least a sub-portion of the unknown video signal, detect the presence of a vertical synchronization signal in the unknown video signal, detect the presence of a horizontal synchronization signal in the unknown video signal, provide, if a vertical synchronization signal is present in the unknown video signal, information related to a characteristic of the vertical synchronization signal, provide, if a horizontal synchronization signal is present in the unknown video signal, information related to a characteristic of the horizontal synchronization signal, wherein the video signal processing module is configured to recognize a type of the unknown video signal based upon the characteristic information provided by the processor. The processor is further configured to determine a vertical synchronization period of vertical synchronization pulses included in the vertical synchronization signal.
Implementations of the invention may also provide one or more of the following features. The processor is further configured to determine a consistency of the vertical synchronization signal by tracking the vertical synchronization period. The processor is further configured to determine a horizontal synchronization period of horizontal synchronization pulses included in the horizontal synchronization signal. The processor is further configured to determine a consistency of the horizontal synchronization signal by tracking the horizontal synchronization period. The processor is further configured to determine whether the unknown video signal includes letterboxed video. The processor is further configured to determine starting and ending locations of a letterboxed image included in the unknown video signal. The processor is further configured to determine whether the unknown video signal includes interlaced video. The processor is further configured to determine a location of first and last pixels of a horizontal line corresponding to a DACTIVE region of the unknown video signal.
In general, in another aspect, the invention provides a video signal identification method including receiving an unknown video signal, converting the unknown video signal into a known video signal by determining information indicative of characteristics of the unknown video signal, storing the information in a memory, and processing the known video signal using the information.
Implementations of the invention may provide one or more of the following features. Converting the unknown video signal into the known video signal includes detecting a polarity of at least a sub-portion of the unknown video signal, detecting the presence of a vertical synchronization signal in the unknown video signal, detecting the presence of a horizontal synchronization signal in the unknown video signal, providing, if a vertical synchronization signal is present in the unknown video signal, information related to a characteristic of the vertical synchronization signal, and providing, if a horizontal synchronization signal is present in the unknown video signal, information related to a characteristic of the horizontal synchronization signal. Converting the unknown video signal into the known video signal includes determining a vertical synchronization period of vertical synchronization pulses included in the vertical synchronization signal. Converting the unknown video signal into the known video signal includes determining a consistency of the vertical synchronization signal by tracking the vertical synchronization period.
Implementations of the invention may also provide one or more of the following features. Converting the unknown video signal into the known video signal includes determining a horizontal synchronization period of horizontal synchronization pulses included in the horizontal synchronization signal. Converting the unknown video signal into the known video signal includes determining a consistency of the horizontal synchronization signal by tracking the horizontal synchronization period. The method further includes determining whether the unknown video signal includes letterboxed video. The method further includes determining starting and ending locations of a letterboxed image included in the video signal. The method further includes determining if the unknown video signal includes interlaced video. The method further includes determining a location of first and last pixels of a horizontal line corresponding to a DACTIVE region of the unknown video signal.
Various aspects of the invention may provide one or more of the following capabilities. Characteristics of an unknown video stream can be detected. A video processing system can process more types of video streams as compared with prior techniques. The presence of a valid video information stream can be detected. Changes in an incoming video stream can be detected in a more efficient manner compared to prior techniques.
These and other capabilities of the invention, along with the invention itself, will be more fully understood after a review of the following figures, detailed description, and claims.
Embodiments of the invention provide techniques for detecting and documenting transmission characteristics of an incoming video stream. For example a video processing system includes a timing detection module and a video processing module. The timing detection module is configured to receive an unknown video information stream. The video processing module, however, may not be able to process the video information stream without knowing characteristic information regarding the video information stream. The timing detection module is configured to use several modules to determine characteristic information about the video information stream. The timing detection module is configured to store the characteristic information in a register coupled to the video processing module. The video processing module is configured to receive the video information stream, to retrieve the characteristic information, and to process the video information stream using the characteristic information. The timing detection module is configured to repeatedly analyze the video information stream to determine if the characteristic information should be updated. Other embodiments are within the scope of the invention.
Referring to
The system 5 is configured to receive a video information stream having unknown characteristics, to determine characteristics about the video information, and to process the video information using the determined characteristics. For example, in order to process the video information stream, the video processor 20 uses characteristic information corresponding to incoming video information. Without the characteristic information, the video processor 20 may have difficulty processing and/or displaying the video information (e.g., corrupted images and/or no images can result). Each time a new video signal is detected at the input 8, the timing detection processor 10 is configured to determine characteristics of the video stream and store characteristic information regarding these characteristics in the registers 30. Thus, the system 5 is configured to convert an unknown signal into a known signal by determining the characteristic information and using this information to process the video information. The video processor 20 is configured to receive the characteristic information from the controller 35 and to process the video information using the characteristic information. The controller 35 can be configured to provide all or a portion of the information stored in the registers 30, if desired.
The timing detection module 10 is configured to provide an indication that some or all of the characteristic information is ready to be used by the video processor 20 (e.g., through the controller 35 or via a direct connection to the video processor 20). For example, if portions of the characteristics are verified (e.g., have become stable) the timing detection processor 10 can set respective flags in the memory 15 thereby indicating that the corresponding characteristics are ready to be provided to the video processor 20. The timing detection processor 10 is further configured to set an additional flag if all of the relevant characteristics are ready to be used by the video processor 20. The timing detection processor 10 is configured such that if all “ready to read” flags are set and a portion of the characteristic information becomes unstable, then the timing detection processor 10 can cancel the flag indicating that the corresponding information is ready to be read.
The characteristic information stored by the timing detection processor 10 in the registers 30 can include single bit pieces of information and/or multi-bit pieces of information. Referring also to
Referring to
The signal detection module 305 is configured to detect the presence of an incoming signal by detecting the presence HS signals and VS signals contained within an HS signal stream and a VS signal stream, respectively. The signal detection module 305 includes a HS signal watchdog timer and a VS signal watchdog timer that that are each configured to operate at 27 MHz, although other clock frequencies are possible. The HS and VS signal watchdog timers are configured to timeout at 0×7FFFFF and 0×3FFF, respectively, if no HS signals or VS signals are detected (e.g., the counters count from 0×0 to the respective limits). The HS watchdog timer is configured to set a flag in the memory 15 if no suitable HS signal is detected prior to timing-out. Likewise, the VS watchdog timer is configured to set a flag in the memory 15 if no suitable VS signal is detected prior to timing-out. Using the above parameters (i.e., 27 MHz and 0×7FFFFF), if no suitable HS signal is detected within about 0.3 s, the HS watchdog timer will timeout and set the corresponding flag. Likewise, using the above parameters (i.e., 27 MHz and 0×3FFF), if no suitable VS signal is detected within about 0.6 ms, the VS watchdog timer will timeout and set a corresponding flag. The lack of timeout by the HS and VS watchdog timers indicates the presence of an HS signal and a VS signal, respectively. Once a timeout flag is set, the HS and VS watchdog timers are configured to count upwards from 0×0 again, and are configured to clear the timeout flag if a signal is detected.
The HS and the VS watchdog timers are configured not to timeout if a series of consecutive HS signals and VS signals are received within a specific amount of time. The HS watchdog timer is configured to detect 128 consecutive valid HSs. The HS watchdog timer is configured such that if 128 consecutive valid HSs are detected, the HS watchdog timer (and corresponding flag) is reset, thereby avoiding a timeout by the HS watchdog timer (and thus avoiding the corresponding flag). Likewise, the VS watchdog timer is configured to detect three consecutive valid VSs. The VS watchdog timer is configured such that if three consecutive valid VSs are detected, the VS watchdog timer (and corresponding flag) is reset, thereby avoiding a timeout by the VS watchdog timer. For example, so long as a valid signal is present (including HS signals and VS signals) the HS and VS watchdog timers will continuously be reset, thereby avoiding a timeout.
The signal detection module 305 is further configured to set additional flags and/or store additional characteristic information in response to predetermined events occurring. For example, the signal detection module 305 is configured such that if neither of the HS and VS watchdog timers have timed out, a flag can be set indicating that a valid signal is being received. The signal detection module 305 can be configured such that the valid signal flag is set by default, but a timeout by either or both of the HS and VS watchdog timers can cancel the valid signal flag. The signal detection module 305 is further configured to detect (as a function of how quickly the HS and VS watchdog timers are reset) a change in the vertical refresh rate and a change in the horizontal refresh rate.
The HS and VS watchdog timers can operate at different clock speeds, and be configured to timeout at different intervals than those described above. For example, the VS watchdog timer can be configured to operate at 50 MHz and timeout at a value of 0×1000000.
VS Detection ModuleThe VS detection module 310 is configured to detect the polarity of an incoming VS signal stream. The VS detection module 310 can be configured to begin operation if a valid video information stream has been detected by the signal detection module 305. Referring also to
The VS detection module 310 is configured to determine the location of the active edges in the VS signal stream. The VS detection module 310 is configured to determine edge locations corresponding to the VS signals. The VS detection module 310 is configured to combine the polarity information and the edge location information to determine the location of rising edges (as indicated by signals 415 in a rising-edge-indicating signal 416 and a falling-edge-indicating signal 419) and falling edges (as indicated by signals 420 in a rising-edge-indicating signal 417 and a falling-edge-indicating signal 418). The VS detection module 310 is configured to determine which edges are “active” edges and “deactive” edges by combining the polarity information, the edge location information, and the rising/falling edge information. The VS detection module 310 is configured to set flags in the registers 30 indicating the corresponding calculated values.
Using the above calculated information, the VS detection module 310 can determine a period corresponding to the VS signal stream. The VS detection module 310 is configured to calculate the period of the VS signal stream by analyzing the frequency at which active edges occur. The VS detection module 310 is configured to store information indicative of VS signal period in the registers 30. Furthermore, the VS detection module 310 is configured to compute the average period of a VS signal, e.g., using eight VS signal period measurements.
Threshold Detection ModuleThe threshold detection module 315 is configured to track the period of the VS signals contained in the VS signal stream and to provide an indication of how reliable/constant the average period is from one VS signal to the next. As described above, for each VS signal received by the VS detection module 310, the VS detection module 310 can calculate the average period e.g., over the prior eight VS signals. The threshold detection module 315 is configured to compare the average values to a variable threshold to calculate an indication of the stability of the VS signal.
Referring to
The HS detection module 320 is configured to detect the presence, polarity, duty cycle, and period of HS signals in the HS signal stream. In contrast to the VS signals described above, HS signals can be less constant and more unstable at times. Referring to
The HS detection module 320 is configured to ignore a portion of the HS signal stream 642 when determining the presence, polarity, duty cycle, and period of HS signals 644. For example, the HS detection module 320 is configured to ignore the HS signals 644 occurring during the same time as a VS signal 641 (e.g., an interval 620). The HS detection module 320 is further configured to ignore HS signals 644 occurring during unsafe intervals near the interval 620 including a pseudo back porch 625 and a pseudo front porch 630. The HS detection module 320 is configured to begin with a known value for the back porch 625, and a known number of HS signals 644 to obtain. The combination of i) the known starting value for the back porch 625 and ii) the known starting value of HS signal samples 644 to obtain can be used to define the size of the front porch 630. For example, if there are 100 ms between adjacent VS signals, the back porch is 5 ms, and forty HS signals 644 are obtained (at 2 ms intervals), then the front porch 630 is about 15 ms.
The HS detection module 320 is configured to determine the polarity, duty cycle, and period of the HS signals 644 by starting with a large value for the back porch 625 and a small number of samples to obtain. For example, the HS detection module 320 is configured to calculate the polarity, duty-cycle, active edges, and/or period of, e.g., eight of the HS signals 644 using techniques similar to that described above with respect to the VS detection module 310. Increasing the number of samples used to calculate the HS signal characteristic information can increase the quality of the resulting values. The HS detection module 320 is configured to calculate the size of the back porch 625 and the number of the HS signals 644 to obtain by gradually decreasing the size of the back porch 625 and increasing the quantity of samples 644 to obtain until an operational back porch and an operational number of samples 644 to obtain is calculated. The HS detection module 320 is configured calculate the operational back porch and operational number of samples 644 to obtain by gradually decreasing the size of the back porch 625 and increasing the number of samples 644 to obtain, respectively, until the threshold detection module 315 indicates that the error margin 515 has been violated (e.g., as defined by the threshold detection module 315). For example, if the HS detection module 320 is analyzing HS synch signals 644 in the safe region 610 and continues into the interval 620, the period of the measured HS signals 644 (corresponding to the interval 620) will likely have a period differing from the period of the HS signals 644 measured during the safe region 610 (thereby violating the error margin 515 in the threshold detection module 315). The HS detection module 320 is configured to determine the safe region 610 by combining the operational back porch 625 and the operational number of samples to obtain. The HS detection module 320 is configured to set flags indicating the size of the interval 605, the size of the safe region 610, the size of the operational back porch 625, the operational number of samples 644 to obtain, and the size of the front porch 630.
Line Detection ModuleThe line detection module 325 is configured to determine information about a quantity of lines in each field in the video information stream and a quantity of lines corresponding to a time when the VS signal stream 640 is active. The line detection module 325 is configured to use the characteristic information provided by the signal detection module 305, the VS detection module 310, threshold detection module 315, and the HS detection module 320 to calculate the respective quantities. Referring also to
Referring to
The interlace detection module 330 is further configured to examine four VS and HS signal comparisons. The interlace detection module 330 is configured to set a flag indicating that the video information stream includes progressive video information if all four (or another desired threshold or criterion) of the VS/HS signal comparisons are equal (e.g., all of the VS signal active edges align with HS signal active edges). Otherwise, the interlace detection module 330 sets a flag indicating that the video information stream includes interlaced video information.
DACTIVE Detection ModuleIn some versions of the video information stream, the active video information contained within the stream does not occupy the entire visible area of a window. Referring also to
Referring also to
The DACTIVE detection module 335 is configured to determine the portion of the video information stream where active data is expected. The DACTIVE detection module 335 is configured to detect a first and a last pixel from each of the horizontal lines in each of the frames (e.g., a frame includes two fields if interlaced, one field if progressive). For example, the DACTIVE detection module 335 is configured to determine pixel locations 965 and 970, corresponding to first and last pixels, respectively, of the line 825 of the window 805. The DACTIVE detection module 335 is configured to store information indicative of the pixel locations 965 and 970 in the registers 30. The DACTIVE detection module 335 is also configured to determine the first and last pixel location of other DACTIVE lines contained in the video information stream. The DACTIVE detection module 335 is configured to determine the first horizontal line (e.g., in a field) that includes a DACTIVE signal and to determine the last horizontal line (e.g., in a field) that includes a DACTIVE signal. The DACTIVE detection module 335 is configured to set flags in the registers 30 indicative of the calculated characteristic information.
Letterbox Detection ModuleReferring to
The letterbox detection module 340 is configured to determine the position of the active start 1010 and the active end 1015. The letterbox detection module 340 is configured to identify the first horizontal line that is non-black (e.g., the active start 1010) and to identify the last horizontal line that is non-black (e.g., the active end 1015). The letterbox detection module 340 is configured to determine if a horizontal line is non-black by comparing it to a known black threshold on a color component, per-pixel basis. For example, a threshold for an RGB signal includes a red threshold level, a green threshold level, and a blue threshold level. The letterbox detection module 340 is configured to compare each color component of each pixel of each horizontal line to thresholds (which may or may not be equal). The letterbox detection module 340 is configured such that if all of the color components making up a pixel are below their respective thresholds, the pixel is considered a “black pixel.” The letterbox detection module 340 is configured such that if the number of black pixels in each horizontal line is above a threshold (e.g., 75%) then the horizontal line is considered a black line. The letterbox detection module 340 is configured to store information corresponding to the position of the active start 1010 and the active end 1015 in the registers 30.
The letterbox detection module 340 is configured to determine the position of the window starts 1020 and 1030 and the window ends 1025 and 1035. As described above, the letterbox detection module 340 is configured to determine if each pixel of each horizontal line is a black pixel or a non-black pixel. To determine the starts 1020, 1030, the letterbox detection module 340 is further configured to count the number of consecutive non-black pixels in each horizontal line (beginning from, e.g., the left side of the picture), or determine a percentage of non-black pixels over a quantity (e.g., 20) of pixels. If the number of consecutive non-black pixels in a horizontal line exceeds a non-black-line threshold (e.g., N consecutive pixels or Y% (e.g., 90%) of M consecutive pixels), then the letterbox detection module 340 is configured to determine the start position of the window (e.g., the window start 1020). The letterbox detection module 340 is configured to determine the actual starting pixel (e.g., the first non-black pixel) by determining the pixel where the non-black-line threshold (comprising the color thresholds) is exceeded, and subtracting a quantity of pixels about equal to the threshold number (N) of consecutive pixels or the number (Y) of pixels used to determine the percent of non-black pixels (e.g., if the threshold is N pixels, if the threshold is exceeded, the window start began N pixels prior to the pixel that caused the threshold to be exceeded). Likewise, the letterbox detection module 340 is configured to determine the ends 1025, 1035 by comparing black pixels (e.g., consecutive black pixels or percent of consecutive pixels) to a threshold.
In operation, referring to
At stage 1105, the system 5 sets the registers 30 to the default values (e.g., as indicated in Appendix A). The system 5 uses default information from an external source and/or values previously stored in the registers 30.
At stage 1110, the system 5 determines if a video information stream is present at the input of the timing detection processor 10 using the signal detection module 305. The signal detection module 305 uses the VS and HS watchdog timers to determine the presence of valid VS and HS signals, respectively. The VS watchdog timer begins counting upwards from 0×0 and counts until either three consecutive valid VS signals are received, or the VS watchdog timer times out (e.g., upon reaching 0×7FFFFF). If the VS watchdog timer times out, the signal detection module 305 sets a flag indicating that no VS signal is being received. As long as VS signals are received, the VS watchdog timer avoids timing out (e.g., the watchdog timer is repeatedly reset). Likewise, the HS watchdog timer begins counting upwards from 0×0 and counts until either 128 consecutive valid HS signals are received, or the HS watchdog timer times out (e.g., upon reaching 0×3FFF). If the HS watchdog timer times out, the signal detection module 305 sets a flag indicating that no HS signal is being received. As long as HS signals are received, the HS watchdog timer avoids timing out. The signal detection module 305 sets a flag in the registers 30 if a valid video information signal is being received by the timing detection module (e.g., if neither of the VS or HS timeout flags are set). If no valid signal is received by the timing detection module 5, the process remains in stage 1110. If a valid signal is present, the process 1100 proceeds to stage 1115.
At stage 1115, the VS detection module 310 determines the polarity of the incoming VS signal stream using the VS detection module 310. The VS detection module determines the duty cycle of at least eight consecutive VS signals. If the duty cycle of eight consecutive VS signals is less than 50%, the VS detection module 310 sets a flag indicating that the polarity of the VS signal stream is active-high. If the duty cycle of the eight consecutive VS signals is greater than 50%, the VS detection module 310 sets a flag indicating that the polarity of the VS signal stream is active-low. If the VS detection module 310 cannot determine the polarity of an incoming VS signal stream, the process 1100 remains in stage 1115, otherwise the process 1100 proceeds to stage 1120. If the VS detection module 310 cannot determine the polarity of the incoming VS signal stream, then the process preferably remains at stage 1115, although other configurations are possible (e.g., the process 1100 proceeds to another stage after N loops of stage 1115).
At stage 1120, the threshold detection module 315 analyzes the VS signal stream received by the timing detection module 10. The threshold detection module 315 indicates if the average period (e.g., of the last eight received VS signals) violates a the error margin 515. The threshold detection module 315 begins analyzing the average period of the VS signals using a large threshold range 514 and gradually ramps-down the threshold range 514 until consecutive violations occur. The threshold detection module 315 backs off (e.g., enlarges) the threshold range 514 slightly until an acceptable number of violations occur (e.g., another threshold corresponding to one violation for every one thousand samples). The threshold detection module 315 sets a flag indicating that the threshold has been stabilized, and a flag indicating the size of the error margin 515. If the threshold is not stabilized, the process 1100 remains in stage 1120, otherwise the process 1100 proceeds to stage 1125. The “minimum threshold” can be adjusted avoid the process 1100 from remaining in stage 1125 indefinitely.
At stage 1125, the information calculated during the stages 1110, 1115, and 1120 are ready to be read by the video processor 20, if desired.
At stage 1130, the HS detection module 320 determines the polarity of the incoming HS signal stream 642. The HS detection module 320 analyzes the HS signals 644 corresponding to periods in time where no VS signal 641 is present in the video information stream (e.g., because the presence of a VS signal 641 can affect the stability of HS signals 644). The HS detection module 320 determines the polarity of the HS signals 644 by analyzing HS signals 644 in the safe region 610. If the HS detection module 320 cannot successfully determine the polarity of the HS signal stream 642, the process 1100 remains in stage 1130, otherwise the process 1100 proceeds to stage 1140.
At stage 1135, the HS detection module 320 maintains the back porch 625 at a constant level and gradually increases the number of samples 644 to obtain until the safe region 610 extends into the VS region 620. For example, once the timing detection module 10 locks on to the HS signal stream 642 during stage 1130, the average period of the HS signals 644 (e.g., over the prior eight HS signals 644) is provided to the threshold detection block 315 (which determines the operational threshold corresponding to the HS signal stream 642 observed during the stage 1130 and provides an indication of whether the error margin 515 has been violated). The HS detection module 320 increases the number of samples 644 to obtain until the threshold detection module 315 indicates that the error margin 515 is violated (e.g., the period of the HS samples 644 begins to vary because the HS samples 644 are obtained in the VS region 620). With the error margin 515 has been violated, the HS detection module 320 reduces, by a predetermined number, the number of samples 644 to obtain, thereby establishing the front porch 630. With the front porch 630 has been established, the process 1100 proceeds to stage 1140.
At stage 1140, the HS detection module 320 maintains the front porch 630 and the number of samples 644 to obtain at a constant level and gradually decreases the size of the back porch 625 until the safe region 610 extends into, the VS region 620. For example, once the timing detection module 10 locks on to the HS signal stream 642 during stage 1130 and stage 1135, the average period of the HS signals 644 (e.g., over the prior eight HS signals 644) is provided to the threshold detection block 315 (which determines the operational threshold corresponding to the HS signal stream 642 observed during stage 1130 and provides an indication of whether the error margin 515 has been violated). The HS detection module 320 decreases the size of the back porch 625 until the threshold detection module 315 indicates that the error margin 515 is violated (e.g., with the period of the HS samples 644 varying because the HS samples 644 are obtained in the VS region 620). With the error margin 515 violated, the HS detection module 320 reduces, by a predetermined amount, the size of the back porch 625. With the HS detection module 320 determining the size of the back porch 625, the process 1100 proceeds to stage 1145.
At stage 1145, the HS detection module 320 determines if the safe region 610 can be made larger without extending too close to the VS region 620. If the safe region 610 can be extended, the process 1100 proceeds to stage 1135, otherwise the process 1100 proceeds to stage 1150.
At stage 1150, the timing detection module 10 sets a flag indicating that the flags set during stages 1130, 1135, 1140, and 1145 are ready to be read by the video processor 20, if desired.
At stage 1155, the line detection module 325 determines the number of horizontal lines corresponding to sub-sets of fields of the video information stream. The line detection module 325 determines the quantity of horizontal lines in adjacent fields (e.g., the interval 715), and sets a flag accordingly. The line detection module 325 also determines the quantity of horizontal lines occurring in the video information stream when the VS signal is active (e.g., during an interval 720), and sets a flag accordingly.
At stage 1160, the interlace detection module 330 determines if the video information stream contains interlaced or progressive video information. The interlace detection module 330 determines if the video information stream includes interlaced or progressive video information by analyzing the quantity of lines in each of four consecutive fields of the video information stream. If the number of lines in each of the four consecutive fields is equal, then the interlace detection module 330 sets a flag indicating that the video information stream includes progressive video information, otherwise the interlace detection module sets a flag indicating that the video information stream includes interlaced video information.
At stage 1165, the DACTIVE detection module 335 determines the portion of the video information stream where active data is expected. The DACTIVE detection module 335 determines the first and last active pixel from each of the horizontal lines in each of the frames of the video information stream. The DACTIVE detection module 335 determines the first and the last horizontal line that includes DACTIVE information in each video frame of the video information stream. The DACTIVE detection module 335 sets corresponding flags in the registers 30 indicating the first and last horizontal lines that include DACTIVE information and the first and last pixels in each horizontal line.
At stage 1170, the letterbox detection module 340 determines the position of the active start 1010 and the position of the active end 1015. The letterbox detection module 340 identifies the first horizontal line that is non-black (e.g., the active start 1010) and identifies the last horizontal line that is non-black (e.g., the active end 1015). The letterbox detection module 340 determines whether a horizontal line is non-black by comparing it to the known black threshold on a color component, per-pixel basis. The letterbox detection module 340 indicates that a horizontal line is a black line if the number of black pixels in the horizontal line is above a threshold (e.g., 75% of pixels). The letterbox detection module 340 stores information corresponding to the position of the active start 1010 and the active end 1015 in the registers 30.
The letterbox detection module 340 determines the position of the window starts 1020 and 1030 and the window ends 1025 and 1035. The letterbox detection module 340 determines the actual starting pixel (e.g., the first non-black pixel) for the starts 1020, 1030 by determining the pixel where the non-black-line threshold is exceeded, and subtracting a quantity of pixels about equal to threshold quantity (e.g., N pixels, if the non-black-line threshold is N consecutive non-black-line pixels, or M pixels if the non-black-line threshold is a percentage of M consecutive pixels). Likewise, the letterbox detection module 340 determines the ends 1025, 1035.
Other embodiments are within the scope and spirit of the invention. For example, due to the nature of software, functions/modules described above can be implemented using software, hardware, firmware, hardwiring, or combinations of any of these. Features implementing functions may also be physically located at various positions, including being distributed such that portions of functions are implemented at different physical locations. For example, while
While the above discussion disclosed modules designed to calculate specific final quantities and/or values (e.g., the polarity), the modules are also configured to calculate (and store in the registers 30) intermediate characteristic information (e.g., edge location) in the process of calculating the final quantities and/or values. For example, Appendix A includes several examples of intermediate characteristic information.
While the above discussion disclosed setting flags, and storing information, other methods of communication can be used to provide characteristic and/or other information to the video processor 20 (e.g., an interrupt can be asserted).
While the above discussion disclosed separate modules, each performing respective tasks, the functionality provided by each respective module can be combined with other modules (e.g., the letterbox detection module can include the capability to detect the polarity of an incoming signal).
Further, while the description above refers to “the invention”, more than one invention may be disclosed.
Claims
1. A video signal identification system comprising:
- an input module configured to receive an unknown video signal;
- a video signal processing module configured to process known video signals; and
- a processor coupled to the input module and to the video signal processing module and configured to determine and store information indicative of characteristics of the unknown video signal such that the unknown video signal becomes a known video signal that can be processed by the video signal processing module.
2. The system of claim 1 wherein the processor is configured to:
- detect a polarity of at least a sub-portion of the unknown video signal;
- detect the presence of a vertical synchronization signal in the unknown video signal;
- detect the presence of a horizontal synchronization signal in the unknown video signal;
- provide, if a vertical synchronization signal is present in the unknown video signal, information related to a characteristic of the vertical synchronization signal;
- provide, if a horizontal synchronization signal is present in the unknown video signal, information related to a characteristic of the horizontal synchronization signal;
- wherein the video signal processing module is configured to recognize a type of the unknown video signal based upon the characteristic information provided by the processor.
3. The system of claim 2 wherein the processor is further configured to determine a vertical synchronization period of vertical synchronization pulses included in the vertical synchronization signal.
4. The system of claim 3 wherein the processor is further configured to determine a consistency of the vertical synchronization signal by tracking the vertical synchronization period.
5. The system of claim 2 wherein the processor is further configured to determine a horizontal synchronization period of horizontal synchronization pulses included in the horizontal synchronization signal.
6. The system of claim 5 wherein the processor is further configured to determine a consistency of the horizontal synchronization signal by tracking the horizontal synchronization period.
7. The system of claim 2 wherein the processor is further configured to determine whether the unknown video signal includes letterboxed video.
8. The system of claim 7 wherein the processor is further configured to determine starting and ending locations of a letterboxed image included in the unknown video signal.
9. The system of claim 2 wherein the processor is further configured to determine whether the unknown video signal includes interlaced video.
10. The system of claim 2 wherein the processor is further configured to determine a location of first and last pixels of a horizontal line corresponding to a DACTIVE region of the unknown video signal.
11. A video signal identification method comprising:
- receiving an unknown video signal;
- converting the unknown video signal into a known video signal by: determining information indicative of characteristics of the unknown video signal; storing the information in a memory; and
- processing the known video signal using the information.
12. The method of claim 11 wherein converting the unknown video signal into the known video signal includes:
- detecting a polarity of at least a sub-portion of the unknown video signal;
- detecting the presence of a vertical synchronization signal in the unknown video signal;
- detecting the presence of a horizontal synchronization signal in the unknown video signal;
- providing, if a vertical synchronization signal is present in the unknown video signal, information related to a characteristic of the vertical synchronization signal; and
- providing, if a horizontal synchronization signal is present in the unknown video signal, information related to a characteristic of the horizontal synchronization signal.
13. The method of claim 12 wherein converting the unknown video signal into the known video signal includes determining a vertical synchronization period of vertical synchronization pulses included in the vertical synchronization signal.
14. The method of claim 13 wherein converting the unknown video signal into the known video signal includes determining a consistency of the vertical synchronization signal by tracking the vertical synchronization period.
15. The method of claim 12 wherein converting the unknown video signal into the known video signal includes determining a horizontal synchronization period of horizontal synchronization pulses included in the horizontal synchronization signal.
16. The method of claim 15 wherein converting the unknown video signal into the known video signal includes determining a consistency of the horizontal synchronization signal by tracking the horizontal synchronization period.
17. The method of claim 12 further comprising determining whether the unknown video signal includes letterboxed video.
18. The method of claim 17 further comprising determining starting and ending locations of a letterboxed image included in the video signal.
19. The method of claim 12 further comprising determining if the unknown video signal includes interlaced video.
20. The method of claim 12 further comprising determining a location of first and last pixels of a horizontal line corresponding to a DACTIVE region of the unknown video signal.
Type: Application
Filed: Aug 15, 2007
Publication Date: Jun 19, 2008
Inventors: JAMES KOURAMANIS (Scarborough), Chun Wang (Markham)
Application Number: 11/839,361
International Classification: H04N 5/44 (20060101);