Abstract:
A method for generation a thumbnail file is provided. The method includes: receiving a command; obtaining time information corresponding to the command and a frame to be output; adjusting the frame to be output to a predetermined resolution according to a resolution of the frame to be output to generate a thumbnail; and generating the thumbnail file according to the time information and the thumbnail.

Description:
[0001]    This application claims the benefit of Taiwan application Serial No. 101132041, filed Sep. 3, 2012, the subject matter of which is incorporated herein by reference. 
       BACKGROUND OF THE INVENTION 
       [0002]    1. Field of the Invention 
         [0003]    The invention relates in general to digital video recording, and more particularly to a method and apparatus for generating thumbnails for digital video recording. 
         [0004]    2. Description of the Related Art 
         [0005]    In form of rougher or smaller icons or images, thumbnails are a presentation of larger images or picture frames according to related techniques for allowing users to more quickly identify a desired target. The architecture of a conventional video recorder frequently results in certain issues, especially user inconveniences. For example, when a conventional digital video recorder performs a simple operation of fast-forwarding or rewinding along a time axis, a user can only identify a target image during the fast-forward or rewind process through guessing a time point of the target image. That is to say, such method, in which users can only search for the target image by merely recalling a corresponding time point or by constantly fast-forwarding or rewinding, is quite inefficient. As another example, the conventional digital video recorder may also display a certain intra-frame (I frame) for users to guess, estimate or compare a time point at which a target image appears. However, an original transport stream does not carry complete image messages of other types of frames such as predictive frames (P frames) and bi-directional frames (B frames), and so no image information can be directly converted from the image messages. Hence, users can only observe an image of an I frame near the expected time point rather than the precise target image, meaning that such method yields an imprecise result. Further, this architecture needs to support high-level hardware devices such as a graphics engine that occupies the performance of a processor. Therefore, there is a need for a solution for enhancing the performance of digital video recorders as well as user viewing experiences. 
       SUMMARY OF THE INVENTION 
       [0006]    According to an aspect of the present invention, a method for generating a thumbnail file is provided. The method comprises: receiving a command; obtaining time information corresponding to the command and a frame to be output; adjusting the frame to be output to a predetermined resolution according to a resolution of the frame to be output to generate a thumbnail; and generating the thumbnail file according to the thumbnail. 
         [0007]    According to another aspect of the present invention, an apparatus for generating a thumbnail file is provided. The apparatus comprises: a reception unit, for receiving a command; an extraction unit, for obtaining a frame to be output according to the command; a processing circuit, for adjusting the frame to be output to a predetermined resolution according to a resolution of the frame to be output to generate a thumbnail; and a thumbnail file generation unit, for obtaining time information according to the command and generating the thumbnail file according to the time information and the thumbnail. 
         [0008]    According to another aspect of the present invention, a playback method based on a thumbnail file is provided. The method comprises: receiving a command corresponding to the thumbnail file; obtaining a timestamp and a presentation timestamp corresponding to the thumbnail file; obtaining and demultiplexing encoded data corresponding to the thumbnail file to generate a plurality of demultiplexed results comprising a predetermined demultiplexed result, and selecting the predetermined demultiplexed result according to the timestamp, wherein the demultiplexed results respectively comprise different timestamps; decoding the predetermined demultiplexed result to generate a plurality of decoded data comprising predetermined decoded data, and selecting the predetermined decoded data according to the presentation timestamp, wherein the decoded data respectively comprise different presentation timestamps; and starting playback from the predetermined decoded data. 
         [0009]    In digital video recording operations, a digital multimedia recording/playback system implementing the method and apparatus disclosed by the present invention is capable of, in real-time, recording thumbnails and associated information of user-preferred time points according to user controls. When a user selects a digital video recorded section, the digital multimedia recording/playback system is capable of precisely providing the user with thumbnails of user-preferred time points for the user to choose from, thereby enhancing user viewing experiences by precisely offering the user with options of user-preferred time points. 
         [0010]    The above and other aspects of the invention will become better understood with regard to the following detailed description of the preferred but non-limiting embodiments. The following description is made with reference to the accompanying drawings. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0011]      FIG. 1  is a schematic diagram of an apparatus for generating a thumbnail according to an embodiment of the present invention. 
           [0012]      FIG. 2  is a flowchart of a method for generating a thumbnail according to an embodiment of the present invention. 
           [0013]      FIG. 3  shows details of the method in  FIG. 2  according to an embodiment. 
           [0014]      FIG. 4  shows an architecture involved for playing a selected thumbnail in the apparatus  100  in  FIG. 1  according to an embodiment. 
           [0015]      FIG. 5  is a process involved for playing a selected thumbnail in the method in  FIG. 2  according to an embodiment. 
       
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
       [0016]      FIG. 1  is a schematic diagram of an apparatus  100  for generating a thumbnail according to an embodiment of the present invention. The apparatus  100  may comprise at least a part (e.g., a part or all) of a digital multimedia recording/playback system. For example, the apparatus  100  may comprise a part of the digital multimedia recording/playback system, a control circuit in the digital multimedia recording/playback system, or an entire part of the digital multimedia recording/playback system (i.e., the entirety of the digital multimedia recording/playback system). 
         [0017]    As shown in  FIG. 1 , the apparatus  100  comprises a control chip  110 , a storage module such as a dynamic random access memory (DRAM)  120  and a display device  150 . In the embodiment, the control chip  110  comprises a demultiplexing unit  112 , a thumbnail file generation unit  113 , a decoding unit  114 , a scaling unit  116 , an extraction unit  118 , a command reception unit  110 C and a processor  110 P. The storage module, such as the DRAM  120 , comprises a direct frame buffer  122 , a thumbnail storage region  124  and a thumbnail file storage region  126 . In practice, the storage module, such as the DRAM  120 , may comprise a plurality of buffers, and more particularly independent buffers, such as the direct frame buffer  122 , the thumbnail storage region  124 , the thumbnail file storage region  126  and an output queue (not shown) of the scaling unit  116 . The output queue is for temporarily storing a frame that the scaling unit  116  transmits to the display device  150 . 
         [0018]    In the embodiment, the control chip  110  may comprise a processing circuit. The processing circuit represents the processor  110 P executing at least a code (not shown, e.g., at least one software module), and is capable of controlling a data stream supplied to control chip  110  and a corresponding operation procedure. For clear illustrations, for example, the processing circuit is directly depicted as the processor  110 P in  FIG. 1 . The processor  110 P executing the at least one code (e.g., the at least one software module) or other codes (e.g., other software modules) may also be utilized to implement modules/units/elements not shown in the apparatus  100 . According to an alternative embodiment, at least a part of modules/units/elements in the control chip  110  may be integrated into the processor  110 P. 
         [0019]    According to the embodiment in  FIG. 1 , the apparatus  100  performs a digital video recording operation to record a digital video recorded program for a user. In the digital video recording operation, when the user sends a specific command CMD at a specific time point T(k), the command reception unit  110 C receives the specific command, and the thumbnail file generation unit  113  obtains a timestamp TS(k) and a presentation timestamp PTS(k) corresponding to the specific time point T(k), where the index k is a positive integer, for example. The timestamp and the presentation timestamp are both utilized for marking the time for playing a frame. Further, as the timestamp TS(k) has a minimum unit of 1 second whereas the presentation timestamp PTS(k) has a minimum unit of less than 1 second, it is possible that different frames have different presentation timestamps PTS(k) but the same timestamp TS(k). In the digital video recording operation, when the user sends the specific command CMD at the specific time point T(k), the command reception unit  110 C receives the specific command CMD, and the extraction unit  118  obtains a frame F(T(k)) to be output corresponding to the specific time point T(k). Further, the processing circuit (particularly the processor  110 P executing the at least one code) adjusts at least one of a size and a resolution of the frame F(T(k)) to be output according to reference information provided by the scaling unit  116  to generate an adjusted picture P(k), and utilizes the adjusted picture P(k) as a thumbnail corresponding to the specific time point T(k). Further, the thumbnail file generation unit  113  generates a thumbnail file containing mapping information according to the timestamp TS(k), the presentation timestamp PTS(k) and the thumbnail (i.e., the adjusted picture P(k)), and temporarily stores the thumbnail file in the thumbnail file storage region  126 . The mapping information in the thumbnail file indicates that the thumbnail corresponds to the timestamp TS(k) and the presentation timestamp PTS(k). In practice, for example, the apparatus  100  may store and backup the thumbnail file to a non-volatile memory module/unit/element (e.g., an optical disk, a hard drive and/or a flash memory). According to an alternative embodiment, the apparatus  100  (particularly the thumbnail file generation unit  113 ) may directly store the thumbnail file to the above non-volatile storage module/unit/element. 
         [0020]    The demultiplexing unit  112  demultiplexes encoded data generated by the digital video recording operation to generate demultiplexed results comprising the timestamp TS(k). For example, the demultiplexed results may be packetized elementary streams (PESs), and the timestamp TS(k) may be stored in a PES header at the forefront of the PESs. The decoding unit  114  decodes the demultiplexed results to generate decoded data comprising the presentation timestamp PTS(k). For example, the decoded data may be packets, and the presentation timestamp PTS(k) may be stored in a packet header in the forefront of the packets. As shown in  FIG. 1 , the thumbnail file generation unit  113  retrieves the timestamp TS(k) from the demultiplexed results outputted by the demultiplexing unit  112 , and retrieves the presentation timestamp PTS(k) from the decoded data outputted by the decoding unit  114 . Further, in the digital video recording operation, when the user sends the specific command CMD at the specific time point T(k), the command reception unit  110 C receives the specific command, and the extraction unit  118  obtains the frame F(T(k)) to be output corresponding to the specific time point from the above output queue of the scaling unit  116 , for example. 
         [0021]    In the embodiment, at least a part of the decoded data represents a decoded output frame F DECODER     —     OUT (T(k)), and the scaling unit  116  selectively scales the decoded output frame F DECODER     —     OUT (T(k)) to generate the frame F(T(k)) to be output, or bypasses the decoded output frame F DECODER     —     OUT (T(k)) as the frame F(T(k)) to be output. In practice, for example, the reference information comprises the size of the decoded output frame F DECODER     —     OUT  (T(k)). According to a predetermined size (particularly a predetermined size for a thumbnail) and the size of the decoded output frame F DECODER     —     OUT (T(k)), the processing circuit adjusts at least one of the size and resolution of the frame F(T(k)) to be output to generate the adjusted picture P(k), wherein the predetermined size is smaller than the size of the frame F(T(k)) to be output. The above example is for illustrating the present invention and is not to be construed as limiting the present invention. According to another embodiment of the present invention, the reference information may comprise a scaling ratio. The scaling ratio indicates that the scaling unit  116  scales the decoded output frame F DECODER     —     OUT (T(k)) to generate the frame F(T(k)) to be output or bypasses the decoded output frame F DECODER     —     OUT (T(k)) as the frame F(T(k)) to be output. According to the predetermined size and the scaling ratio, the processing circuit adjusts at least one of the size and resolution of the frame F(T(k)) to be output to generate the adjusted picture P(k). 
         [0022]    In the embodiment in  FIG. 1 , for example, the processing circuit (particularly the processor  110 P executing the at least one code) may adjust at least one of the size and resolution of the frame F(T(k)) to be output according to the reference information to generate the adjusted picture P(k). According to an alternative embodiment of the present invention, the processing circuit (particularly the processor  110 P executing the at least one code) may adjust the size and the resolution of the frame F(T(k)) to be output according to the reference information to generate the adjusted picture P(k). 
         [0023]      FIG. 2  shows a flowchart of a method  200  for generating a thumbnail according to an embodiment of the present invention. The method  200  is applicable to the apparatus  100 , and comprises the following steps. 
         [0024]    In step  210 , the command reception unit  110 C receives a user command such as the specific command CMD. In the embodiment, the user sends the specific command CMD at the specific time point T(k) in the digital video recorded program. 
         [0025]    In step  220 , the processing circuit (e.g., the processor  110 P executing the at least one code) obtains a size and a format of a frame, and more particularly, obtains the size and the format of the decoded output frame F DECODER     —     OUT (T(k)) according to the reference information. 
         [0026]    In step  230 , the thumbnail file generation unit  113  obtains the timestamp TS(k). 
         [0027]    In step  240 , the thumbnail file generation unit  113  obtains the presentation timestamp PTS(k). 
         [0028]    In step  250 , the extraction unit  118  obtains a frame in an original size such as the frame F(T(k)) to be output in a queue (i.e., the output queue), and temporarily stores the frame F(T(k)) to be output in the direct frame buffer  122 . 
         [0029]    In step  260 , the processing circuit (particularly the above processor  110 P executing the at least one code) generates a thumbnail, e.g., the adjusted picture P(k), and temporarily stores the thumbnail in the thumbnail storage region  124 . 
         [0030]    In step  270 , the thumbnail file generation unit  113  generates the above thumbnail file, and temporarily stores the thumbnail file in the thumbnail file storage region  126 . 
         [0031]    In step  280 , the apparatus  100  (e.g., the thumbnail file generation unit  113 , or the processing circuit, particularly the above processor  110 P executing the at least one code) stores the thumbnail file, and more particularly, stores the thumbnail file to above the non-volatile memory module/unit/element. 
         [0032]      FIG. 3  shows details of the method  200  in  FIG. 2  according to an embodiment. For example, the above index k is a positive integer varying from 1 to K. According to the embodiment, the apparatus  100  (e.g., the thumbnail file generation unit  113 , or the processing circuit, particularly the above processor  110 P executing the at least one code) records different sets of information such as {(TS(k), PTS(k), P(k) |k=1, 2, . . . , K) respectively corresponding to numerous times points {T(1), T(2), . . . , T(K)} into the thumbnail file. 
         [0033]    According to the embodiment, the processing circuit (particularly the above processor  110 P executing the at least one code) controls the apparatus  100  to output a graphic user interface to be displayed by the display device  150  according to a pattern in  FIG. 3 . In  FIG. 3 , the lower part represents the thumbnails {P(1), P(2), . . . , P(K)} in the graphic user interface, and the upper part represents time values of numerous sets of time values of time points (i.e., {(PTS(1), TS(1)), (PTS(2), TS(2)), . . . , (PTS(K), TS(K))} corresponding to the thumbnails {P(1), P(2), . . . , P(K)}, with the precision of the time value represented by each of the presentation timestamps being far higher than the precision of the time value represented by each of the timestamps). Hence, when the user wishes to view the above digital video recorded program, the user is allowed to readily select a desired digital video recorded section from different digital video recorded sections corresponding to the times points {T(1), T(2), . . . , T(K)} according to personal preferences. 
         [0034]      FIG. 4  shows an architecture involved for playing a selected thumbnail in the apparatus  100  in  FIG. 1  according to an embodiment. As shown in  FIG. 4 , the apparatus  100  may further comprise a thumbnail file analysis unit  115 . The thumbnail file analysis unit  115  analyzes the above thumbnail file according to a predetermined file format. More particularly, the predetermined file format is a file format that the thumbnail file generation unit  113  employs for generating the thumbnail file, and so the thumbnail file analysis unit  115  may analyze the thumbnail file according to the predetermined file format to obtain the numerous sets of information such as {(TS(k), PTS(k), P(k) |k=1, 2, . . . , K) corresponding to the times points {T(1), T(2), . . . , T(K)}. 
         [0035]    In practice, the processing circuit (particularly the above processor  110 P executing the at least one code) may determine and select a data stream corresponding to the timestamp TS(k) according to the timestamp TS(k) outputted by the thumbnail file analysis unit  115 , so as to input the data stream corresponding to the timestamp TS(k) to the demultiplexing unit  112  in the architecture in  FIG. 4 . For example, the demultiplexing unit  112  demultiplexes the data stream to generate demultiplexed results corresponding to time points near the time point T(k) (in the digital video recorded program). The demultiplexed results comprise the timestamp TS(k). The decoding unit  114  accurately selects the demultiplexed results corresponding to the time point T(k) (in the digital video recorded program) according to the presentation timestamp PTS(k) outputted by the thumbnail file analysis unit  115  to generate decoded data corresponding to the time points near the time point T(k) (in the digital video recorded program). The decoded data comprise the presentation timestamp PTS(k). Thus, the apparatus  100  is capable of starting playback from the position of the decoded data corresponding to the time point T(k) (in the digital video recorded program) for the user to view. 
         [0036]      FIG. 5  shows a process  500  involved for playing a selected thumbnail in the method  200  in  FIG. 2  according to an embodiment. The process  500 , applicable to the architecture for playing a selected thumbnail in  FIG. 4 , is described as below. 
         [0037]    In step  510 , the command reception unit  110 C receives a user command such as another command CMD′. The command CMD′ instructs the apparatus  100  to start providing a service of “starting playback according to selected thumbnail”, and more particularly, the command CMD′ instructs the apparatus  100  to start playing from the position represented by the thumbnail P(k). 
         [0038]    In step  520 , the thumbnail file analysis unit  115  analyzes a thumbnail file, e.g., the above thumbnail file, corresponding to the digital video recorded program to provide the timestamp TS(k) and the presentation timestamp PTS(k) to the processing circuit (more particularly the above processor  110 P executing the at least one code) and the decoding unit  114 . 
         [0039]    In step  530 , the processing circuit (more particularly the above processor  110 P executing the at least one code) obtains the timestamp TS(k), and skips to the video section such as the position of the same timestamp TS(k) in the above digital video recorded program. 
         [0040]    In step  540 , the decoding unit  114  obtains the presentation timestamp PTS(k), and skips to a video section such as the position of the same presentation timestamp PTS(k) in the above digital video recorded program. 
         [0041]    In step  550 , the decoding unit  114  decodes the frame at the position of the presentation timestamp PTS(k). 
         [0042]    In step  560 , the scaling unit  116  scales the frame to an appropriate size. 
         [0043]    In step  570 , the scaling unit  116  outputs the frame in the appropriate size, and particularly, the scaling unit  116  outputs the frame F(T(k)) through the above output queue to the display device  150 . 
         [0044]    Therefore, in digital video recording operations, a digital multimedia recording/playback system implementing the method and apparatus disclosed by the present invention is capable of, in real-time, recording thumbnails and associated information of user-preferred time points according to user controls. When a user selects a digital video recorded section, the digital multimedia recording/playback system is capable of precisely providing the user with thumbnails of user-preferred time points for the user to choose from, thereby enhancing user viewing experiences by precisely offering the user with options of user-preferred time points. 
         [0045]    While the invention has been described by way of example and in terms of the preferred embodiments, it is to be understood that the invention is not limited thereto. On the contrary, it is intended to cover various modifications and similar arrangements and procedures, and the scope of the appended claims therefore should be accorded the broadest interpretation so as to encompass all such modifications and similar arrangements and procedures.