The present invention is directed to data compression and decompression and, more particularly, to recovering from discontinuities in time synchronization in an audio/video decoder.
Data compression is used for reducing the volume of data stored, transmitted or reconstructed (decoded and played back), especially for video content. Decoding recovers the audio and video content from the compressed data in a format suitable for playback. Various standards of formats for encoding and decoding compressed signals efficiently are available. Some standards that are commonly used for moving pictures and associated audio are the International Standards Organization (ISO), International Electrotechnical Commission (IEC) and Moving Picture Experts Group (MPEG) standards, and International Telecommunications Union (ITU) recommendations such as ITU-T H.262|ISO/IEC13818 (MPEG2) and ITU-T H.264, the VPx standards and the VC-1 standard.
In the ISO/IEC13818 (MPEG2) standard, the highest syntactic structure of the coded video bit stream is the video sequence. A video sequence starts with a sequence header that may optionally be followed by a group of pictures header and then by one or more coded frames. The order of the coded frames in the coded bit stream is the order in which the decoder processes them, but not necessarily in the correct order for display.
A Program Map Table, specifies, among other information, which packet identifiers (PIDs), and therefore which elementary streams are associated to form each program. This table also indicates the PID of the Transport Stream packets that carry program clock recovery data (PCR) for each program.
The decoding process for various video compression standards involves decoding the compressed data for the different picture items in the order in which it is received, which may be defined by a decoding timestamp (DTS) in the input transport bit stream, combining the inter-coded and intra-coded items according to the motion vectors or intra-prediction modes, re-ordering the picture items and synchronizing the video data with the audio data for presentation.
In order to achieve the time synchronization between the audio and the video, the input transport bit stream typically also contains a presentation timestamp (PTS). However, discontinuities can occur in the timestamps, for example due to data being dropped during transport (streaming or broadcasting) from the source, wrap around during playback loops, timestamp jumping during creating or encoding the source files such as splicing files, restarting playlists or the source server, or re-synchronization between the bit stream clock, defined by the PCR, and the timestamp.
The discontinuity caused by the missing PTS at the decoder may be detectable by the decoder demultiplexer (demux) from the transport stream. Recovery from the missing PTS at the decoder using the PCR to reset the local system clock in the decoder would require a system clock controller to reset the local system clock and software support. Recovery from the missing PTS at the decoder by the decoder rendering module resetting the local system clock would require a run-time configurable local system clock and software support. Recovery from the missing PTS at the decoder by the decoder demux using a prediction of the missing PTS based on the PTS received before the discontinuity and corrected by a video or audio frame duration can provide erroneous predictions in the case of variable duration samples.
It would be advantageous to have an audio/video decoder in which reliable recovery from a discontinuity in presentation timestamps can be achieved by predicting the missing presentation timestamp(s) without resetting the local system clock in the decoder.
The present invention, together with objects and advantages thereof, may best be understood by reference to the following description of embodiments thereof shown in the accompanying drawings. Elements in the drawings are illustrated for simplicity and clarity and have not necessarily been drawn to scale.
In the decoder 100, if a discontinuity occurs in the series of PTS, the demultiplexer and control decoder module 104 provides a prediction TSP of a PTS after the discontinuity that is conditional on whether the last PTS in data of the elementary bit stream is still valid when the discontinuity is detected. In the decoder 100, if the last PTS in data from the elementary bit stream is still valid when a discontinuity occurs in the series of PTS, the demultiplexer and control decoder module 104 provides a prediction TSP of a PTS after the discontinuity that is based on extrapolation from a PTS received prior to detection of the discontinuity using a defined duration TDURATION of sample data in the elementary bit stream. If the last PTS in data from the elementary bit stream has lapsed when the discontinuity is detected, the prediction TSP of the PTS after detection of the discontinuity is based on the current time TH indicated by the local clock 106 extrapolated using a defined duration TLATENCY. A PTS is still valid if the render time TSMIN that it indicates is later than the current time TM (TSMIN>TM) indicated by the local clock 106, and has lapsed if the current time TM indicated by the local clock 106 is already later than the render time TSMIN that the PTS indicates (TSMIN<TM). The validity of a PTS may be defined by whether data is still present in the pipeline 104, 110, 108 from the input of the demultiplexer and control decoder module 104 to an output from the presentation decoder module 108. The prediction TSP based on the current time TM indicated by the local clock may be extrapolated using a defined duration of latency TLATENCY from an output from the demultiplexer and control decoder module 104 to an output from the render module 116, 118.
The demultiplexer and control decoder module 104 may provide the prediction TSP of a first PTS after the discontinuity based on extrapolation using defined data (a PTS received prior to detection of the discontinuity, or the current time indicated by the local clock), and provides an adjustment of a subsequent PTS based on the prediction TSP of the first PTS after the discontinuity. The adjustment of the subsequent PTS may extrapolate the prediction TSP of the first PTS after the discontinuity using a difference (TN+1−TN), (TN+2−TN) between the received values of the subsequent PTS and the first PTS.
When the packetized elementary bit stream PES contain compressed video picture and audio data in different tracks with respective series of PTS, the PTS may be adjusted only if discontinuity is detected in all the series of PTS.
TS
P(N+1)
=TS
PN+(TS(N+1)−TSN)
TS
P(N+2)
=TS
PN+(TS(N+2)−TSN).
The invention may be implemented at least partially in a non-transitory machine-readable medium containing a computer program for running on a computer system, the program at least including code portions for performing steps of a method according to the invention when run on a programmable apparatus, such as a computer system or enabling a programmable apparatus to perform functions of a device or system according to the invention.
The computer program may be stored internally on computer readable storage medium or transmitted to the computer system via a computer readable transmission medium. All or some of the computer program may be provided on non-transitory computer-readable media permanently, removably or remotely coupled to an information processing system. The computer-readable media may include, for example and without limitation, any number of the following: magnetic storage media including disk and tape storage media; optical storage media such as compact disk media (e.g., CD ROM, CD R, etc.) and digital video disk storage media; nonvolatile memory storage media including semiconductor-based memory units such as FLASH memory, EEPROM, EPROM, ROM; ferromagnetic digital memories; MRAM; volatile storage media including registers, buffers or caches, main memory, RAM and so on; and data transmission media including computer networks, point-to-point telecommunication equipment, and carrier wave transmission media, just to name a few.
A computer program is a list of instructions such as a particular application program and/or an operating system. The computer program may for instance include one or more of: a subroutine, a function, a procedure, an object method, an object implementation, an executable application, an applet, a servlet, a source code, an object code, a shared library/dynamic load library and/or other sequence of instructions designed for execution on a computer system.
In the foregoing specification, the invention has been described with reference to specific examples of embodiments of the invention. It will, however, be evident that various modifications and changes may be made therein without departing from the broader spirit and scope of the invention as set forth in the appended claims.
Those skilled in the art will recognize that the boundaries between logic blocks are merely illustrative and that alternative embodiments may merge logic blocks or circuit elements or impose an alternate decomposition of functionality upon various logic blocks or circuit elements. Thus, it is to be understood that the architectures depicted herein are merely exemplary, and that in fact many other architectures can be implemented which achieve the same functionality. Similarly, any arrangement of components to achieve the same functionality is effectively “associated” such that the desired functionality is achieved. Hence, any two components combined to achieve a particular functionality can be seen as “associated with” each other such that the desired functionality is achieved, irrespective of architectures or intermediate components. Likewise, any two components so associated can also be viewed as being “operably connected”, or “operably coupled”, to each other to achieve the desired functionality.
Furthermore, those skilled in the art will recognize that boundaries between the above described operations merely illustrative. The multiple operations may be combined into a single operation, a single operation may be distributed in additional operations and operations may be executed at least partially overlapping in time. Moreover, alternative embodiments may include multiple instances of a particular operation, and the order of operations may be altered in various other embodiments.
Also, the invention is not limited to physical devices or units implemented in non-programmable hardware but can also be applied in programmable devices or units able to perform the desired device functions by operating in accordance with suitable program code, such as mainframes, minicomputers, servers, workstations, personal computers, notepads, personal digital assistants, electronic games, automotive and other embedded systems, cell phones and various other wireless devices, commonly denoted in this application as ‘computer systems’.
In the claims, the word ‘comprising’ or ‘having’ does not exclude the presence of other elements or steps then those listed in a claim. Furthermore, the terms “a” or “an,” as used herein, are defined as one or more than one. Also, the use of introductory phrases such as “at least one” and “one or more” in the claims should not be construed to imply that the introduction of another claim element by the indefinite articles “a” or “an” limits any particular claim containing such introduced claim element to inventions containing only one such element, even when the same claim includes the introductory phrases “one or more” or “at least one” and indefinite articles such as “a” or “an”. The same holds true for the use of definite articles. Unless stated otherwise, terms such as “first” and “second” are used to arbitrarily distinguish between the elements such terms describe. Thus, these terms are not necessarily intended to indicate temporal or other prioritization of such elements. The mere fact that certain measures are recited in mutually different claims does not indicate that a combination of these measures cannot be used to advantage.
Number | Date | Country | Kind |
---|---|---|---|
201510625896.7 | Aug 2015 | CN | national |