CN105516779B - Film caption processing unit and method, and the method for parsing film caption - Google Patents

Film caption processing unit and method, and the method for parsing film caption Download PDF

Info

Publication number
CN105516779B
CN105516779B CN201410497927.0A CN201410497927A CN105516779B CN 105516779 B CN105516779 B CN 105516779B CN 201410497927 A CN201410497927 A CN 201410497927A CN 105516779 B CN105516779 B CN 105516779B
Authority
CN
China
Prior art keywords
subtitle
caption
film
block
time
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201410497927.0A
Other languages
Chinese (zh)
Other versions
CN105516779A (en
Inventor
黄治壹
邱宏昌
姚志宪
施宗钦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
MediaTek Inc
Original Assignee
MStar Semiconductor Inc Taiwan
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by MStar Semiconductor Inc Taiwan filed Critical MStar Semiconductor Inc Taiwan
Priority to CN201410497927.0A priority Critical patent/CN105516779B/en
Publication of CN105516779A publication Critical patent/CN105516779A/en
Application granted granted Critical
Publication of CN105516779B publication Critical patent/CN105516779B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Television Systems (AREA)
  • Studio Circuits (AREA)

Abstract

The present invention relates to the methods of processing film caption, and include: a film caption analyzing step includes: being multiple subtitle blocks by the division of teaching contents of a film caption shelves, these subtitle blocks respectively contain multiple caption contents, each caption content corresponding subtitle time;And a concordance list is generated, to record these subtitle blocks other characteristic time;An and film caption read step, for finding out a target caption content of a corresponding current play time, include: these characteristic times recorded according to the current play time and the concordance list find a target subtitle block of the corresponding current play time from these subtitle blocks;And the target caption content is found from the target subtitle block according to the current play time.

Description

Film caption processing unit and method, and the method for parsing film caption
Technical field
The present invention relates to film captions, especially with respect to film caption processing unit and method, and parsing film word The method of curtain.
Background technique
In general film caption can be divided into embedded and two kinds plug-in.Embedded subtitle is a part of film archive, Such as a film shelves may be comprising image part, voice parts and subtitle parts etc., general user can not be directly accessed Subtitle parts;And plug-in subtitle is independently of the archives except film shelves, user can directly edit it, such as adjust Time or modification word content, it might even be possible to the subtitle of newly-increased other country's language.There are many plug-in subtitle shelves plants format, " .srt ", " .smi ", " .sub " and " .txt " is several more typical secondary shelves names, according to the difference of format, a plug-in subtitle Shelves may include one or more groups of subtitles, and one group of subtitle represents the subtitle of the complete set of the corresponding film, such as Japanese subtitle, Chinese-traditional subtitle or simplified form of Chinese Character subtitle are respectively one group of subtitle.When each captioning unit of one group of subtitle generally comprises starting Between, end time and caption content or its change shape.Figure 1A is please referred to, is the subtitle shelves content of known " .srt " format Schematic diagram.Subtitle shelves include at least captioning unit 110 and captioning unit 120, respectively contain initial time 112 (122), terminate Time 114 (124) and caption content 116 (126).When in the current play time arrival initial time of film, corresponding subtitle The caption content is removed from picture when holding and be displayed on picture, and reaching the end time.Figure 1B is please referred to, is known The schematic diagram of the subtitle shelves content of " .sub " format.Subtitle shelves include at least captioning unit 130 and captioning unit 140, respectively wrap Containing initial time 132 (142), end time 134 (144) and caption content 136 (146).It is noted that when starting herein Between and the end time and it is indirect with when, minute, second shows, but has to pass through conversion.The side of the basic record of field 150 conversion Formula is represented 1 second with 25 frames (frame) in this example, therefore caption content 136 is actually to show from the 1st second of film To the 2nd second, the rest may be inferred by analogy.
Referring to Fig. 2, it is the configuration diagram for becoming known for handling the memory of film caption.Memory 200 is filled in broadcasting Dedicated for the parsing of processing caption and display in setting, include subtitle section 210 and index section 220.In general, playing dress The subtitle for supporting fixed group number is set, herein for 4 groups, the caption content of this 4 groups of subtitles is temporarily stored in subtitle sub-segments respectively 212,214,216 and 218, and every group of subtitle has a corresponding index, is separately stored in index sub-segments 222,224,226 And 228.And temporary sub-segments 211 are for keeping in film caption unit to be resolved when playing device parsing film caption shelves.With It is lower that collocation is handled into the flow chart of film caption to be described in more detail to the purposes of each memory segments.Referring to Fig. 3, its It is the flow chart of the method for known parsing film caption.Before film starts broadcasting, the controller of playing device (such as micro- place Manage device or central processing unit) parsing each group film caption shelves.It is first that the partial content of film caption shelves is temporary during parsing Deposit to the temporary sub-segments 211 of memory 200, after parsing by the caption content of film caption shelves be stored in subtitle sub-segments 212, 214, it one of 216 and 218 and establishes index and is stored in corresponding index sub-segments.Later when movie playback, then Corresponding subtitle is found from memory and is shown according to film caption selected by user.Specifically, at film caption Reason program initially from storage media (such as the storage medias such as flash memory, hard disk or solid state hard disk) obtain this 4 One of group film caption shelves (step S310) there is no any data in temporary sub-segments 211 because being the initial stage, Therefore step S320 and step S330 is without any recordable content, so skipping over two step and entering step S340.At this time It will be seen that temporary sub-segments 211 without any data, therefore enter step S360, judge whether to have completed to parse entire film word Curtain shelves? because being ready for starting to read film caption shelves, it is judged as NO and enters step S370, read from storage media The partial content of film caption shelves is to temporary sub-segments 211.At most of conditions, the size of film caption shelves is greater than temporary The size of sub-segments 211, so a film caption shelves, which have to read several times, could complete parsing.Later in temporary sub-district Captioning unit (step S350) is found in section 211, if there is finding, then the caption content of the captioning unit is first stored in subtitle Sub-segments 212 (step S320), then by the initial time of the captioning unit and end time, together with caption content in previous step In the position of memory 200, it is recorded in index sub-segments 222 (step S330), so just completes the parsing of a captioning unit. If next the data of temporary sub-segments 211 are not yet disposed (step S340), then find next captioning unit (step S350), until the data for keeping in sub-segments 211 are all disposed, then judge whether to have completed to parse entire film caption Shelves (step S360), if it is, representing current film caption shelves is completed parsing, if it is not, then carrying out step again S370 reads another part content of film caption shelves to temporary sub-segments 211 from storage media.Current film caption shelves It completes parsing and then repeats this process to parse other 3 film caption shelves, and resulting data filling subtitle will be parsed Section 214,216 and 218 and index sub-segments 224,226 and 228.
Referring to Fig. 4, the flow chart of its method for finding subtitle when being known broadcasting film.After film starts broadcasting, first Its corresponding index sub-segments (such as index sub-segments 224) (step S410) is found according to selected film caption, then according to According to current play time from finding position (step of the caption content that should be shown in subtitle sub-segments 214 in index S420), notice play interface is shown (step S430) after reading caption content, then is judged whether film has finished and (walked Rapid S440).Terminate this process if finishing, otherwise if find next caption content (step that should be shown again S420)。
In conclusion its size has been consolidated when system is completed because memory 200 is exclusive memory when showing subtitle It is fixed and be not easy to expand, it is difficult to increase supported subtitle group number increasing memory afterwards, so memory configuration And the processing method of film caption makes playing device that can only support to fix the film caption (such as 4 groups in upper example) of group number. Furthermore, because it is known that method whole caption contents of one group of subtitle are temporarily stored in subtitle sub-segments, so a subtitle sub-district Section generally has to occupy 256KB or more storage spaces, and the information complexity of concordance list (includes each captioning unit The position of initial time, end time and caption content in memory), so an index sub-segments generally have to occupy 128KB or more storage spaces;Therefore when supporting 4 groups of film captions, about 1.5MB or more storages must just be provided Deposit space.Moreover known technology is that each group subtitle that will be supported all has previously been stored in different subtitle sub-segments, such as carpostrote It is used for only wherein 1 group during putting, then other 3 groups of occupied memories just form waste, and when the group number supported The more, the situation of wasted memory will be more serious.
Summary of the invention
In view of the deficiency of prior art, a purpose of the present invention is that provide a kind of film caption processing unit and method with And the method for parsing film caption, to increase the elasticity of processing caption and save memory.
Present invention discloses a kind of methods for handling film caption, and include: a film caption analyzing step includes: by one The division of teaching contents of film caption shelves is multiple subtitle blocks, these subtitle blocks respectively contain multiple caption contents, each subtitle Content corresponds to the subtitle time;And a concordance list is generated, it is each to record these subtitle blocks other characteristic time This feature time be with its corresponding to subtitle block these caption contents corresponding to one of these subtitle times It is related;And a film caption read step includes for finding out a target caption content of a corresponding current play time: According to these characteristic times that the current play time and the concordance list are recorded, the corresponding mesh is found from these subtitle blocks One target subtitle block of preceding play time;And the target is found from the target subtitle block according to the current play time Caption content.
The present invention separately discloses a kind of method for parsing film caption, and include: the division of teaching contents by a film caption shelves is Multiple subtitle blocks, these subtitle blocks respectively contain multiple caption contents, each caption content corresponding subtitle time;And Generate a concordance list, to record these subtitle blocks other characteristic time, each this feature time be with its corresponding to Subtitle block these caption contents corresponding to one of these subtitle times it is related;Wherein, film when institute is played The target caption content that need to be presented is to generate these characteristic times recorded according to the concordance list.
The present invention separately discloses a kind of film caption processing unit, for parsing a film caption shelves and foundation one at present Play time finds out a target caption content, includes: a processing unit, for being multiple by the division of teaching contents of a film caption shelves Subtitle block simultaneously generates a concordance list, which records these subtitle blocks other characteristic time, and according to the mesh These characteristic times that preceding play time and the concordance list are recorded, when finding the corresponding current broadcasting from these subtitle blocks Between a target subtitle block, and found in the target subtitle from the target subtitle block according to the current play time Hold, wherein these subtitle blocks respectively contain multiple caption contents, each caption content corresponding subtitle time, each this feature Time with its corresponding to subtitle block these caption contents corresponding to one of these subtitle times it is related;And One memory includes: a first memory section, for storing the concordance list;And a second memory section, for storing The caption content that the target subtitle block includes.
Film caption processing unit and method of the invention and the method for parsing film caption can quickly establish film The concordance list of subtitle, the time of parsing film caption is greatly decreased.In addition, the present invention is not required to all subtitles of film caption Content has previously been stored in memory, but during movie playback, dynamic read at that time needed for caption content to depositing Reservoir, therefore the usage amount of memory can be greatly decreased.And because of space very little shared by concordance list, as long as reserved A small amount of memory can increase the group number of supported film caption easily, and the cost of system will not be made to be significantly increased.
Feature, implementation and effect for the present invention, hereby attached drawing being cooperated to make preferred embodiment, detailed description are as follows.
Detailed description of the invention
Figure 1A is the schematic diagram of the subtitle shelves content of known " .srt " format;
Figure 1B is the schematic diagram of the subtitle shelves content of known " .sub " format;
Fig. 2 is the configuration diagram for becoming known for handling the memory of film caption;
Fig. 3 is the flow chart of the method for known parsing film caption;
Fig. 4 finds the flow chart of the method for subtitle when being known broadcasting film;
Fig. 5 is the functional block diagram of an embodiment of film caption processing unit of the invention;
Fig. 6 is the configuration diagram of hardware memory of the present invention for handling film caption;
Fig. 7 is the flow chart of the method for present invention parsing film caption;
Fig. 8 is the comparative diagram of concordance list and film caption shelves of the invention;
Fig. 9 is the flow chart that the method for subtitle is found when the present invention plays film;And
Figure 10 is the temporary content of captioning unit section and the comparative diagram of film caption shelves when the present invention plays film.
Symbol description
110,120,130,140 captioning unit
112,122,132,142 initial time
114,124,134,144 end time
116,126,136,146 caption content
150 basic fields
200 memories
210 subtitle sections
211 temporary sub-segments
212,214,216,218 subtitle sub-segments
220 index sections
222,224,226,228 index sub-segments
S310~S370, S410~S440, S710~S790, S902~S990 step
505 film caption shelves
510 archives module for reading and writing
520 system storages
530 processing units
540 functional module memories
550 movie playback modules
610 temporary sections
620 index sections
622,624,626,628 index sub-segments
630 captioning unit sections
810 concordance lists
820 film caption shelves
821,822,823 subtitle block
821-0,821-1,821-K, 822-0,822-1,822-L, 823-0,823-1,823-M captioning unit
1010 corresponding tables
Specific embodiment
The technical terms of following description are the idioms referring to the art, if this specification is to part term It is illustrated or defines, the explanation of the part term is to be subject to the explanation or definition of this specification.
Disclosure of the invention includes film caption processing unit, film caption processing method and parsing film caption Method, be able to use a small amount of memory and rapidly parse film caption.The apparatus and method can be applied to movie playback dress It sets, under the premise of being embodied as possible, the art tool usually intellectual can select according to the disclosure of this specification Equivalent element or step is selected to realize the present invention, that is, implementation of the invention be not limited to after the embodiment chatted.Due to this hair It may be well known elements for the subelement that bright film caption processing unit is included is independent, therefore not influence the device Under the premise of the abundant announcement of invention and exploitativeness, illustrate that memorandum will be given for the details of well known elements below.In addition, this The film caption processing method of invention and parse film caption method can by film caption processing unit of the invention or Its equivalent device executes, and under the premise of not influencing the abundant announcement and exploitativeness of this method invention, following methods are invented Explanation will focus on step content and non-hardware.
Referring to Fig. 5, it is the functional block diagram of an embodiment of film caption processing unit of the invention.Film caption Processing unit can be a part of video playback device, and video playback device is, for example, TV or multimedia player, but not As limit.Film caption processing unit includes archives module for reading and writing 510, system storage 520, processing unit 530, function mould Block storage 540 and movie playback module 550.Processing unit 530 e.g. central processing unit or microcontroller are (also known as Make microprocessor);System storage 520 is used to store the system data or source code when video playback device operation;Function mould Block storage 540 is the exclusive memory that video playback device is used to handle film caption, is not shared with other functional modules; Movie playback module 550 then is used to control broadcasting and the display subtitle of film;Archives module for reading and writing 510 is used to control movie playback Device access is located at the film caption shelves 505 in hard disk or flash memory.System storage 520 and functional module memory 540 can be the different sections of the same physical memory, or adhere to two independent physical memories separately.Referring to Fig. 6, its It is the configuration diagram of hardware memory of the present invention for handling film caption.Functional module memory 540 includes temporary section 610, section 620 and captioning unit section 630 are indexed.Temporary film caption when temporary section 610 is for parsing film caption The partial data of shelves;Section 620 is indexed for generated concordance list after storage parsing subtitle, one group of subtitle will obtain a rope Draw table, according to the present invention caused by concordance list occupy fairly small storage space, and after having parsed one group of subtitle, it is only necessary to Its concordance list is stored without storing its caption content, therefore even if supporting multiple groups subtitle, the required memory of the present invention is empty Between it is still fairly small;Captioning unit section 630 is for keeping in several captioning unit when playing film.
It is the flow chart of the method for present invention parsing film caption please refer to Fig. 7 and Fig. 8, Fig. 7, Fig. 8 is the present invention Concordance list and film caption shelves comparative diagram.When parsing film caption, film caption shelves (step to be resolved is first obtained S710), the archives size (step S720) that the film caption shelves are obtained after film caption shelves to be resolved is obtained, then by the shadow Piece subtitle shelves are divided into multiple a subtitle blocks (step S730).In a preferred embodiment, can predetermine will draw The block number (such as X, X are positive integer) divided, block number will be related to size and the parsing film caption shelves institute of concordance list The time of cost, it is assumed that the size of film caption shelves is F, then the size of each block is equal or approximate F/X.Sequentially will later The content of film caption shelves, which is read in temporary section 610, keeps in, and is parsed.The size of temporary section 610 can be designed as The occupied memory size of the subtitle that single is shown on picture, that is, occupied size of captioning unit (such as 16KB), so if a subtitle block includes 10 captioning unit, then the subtitle block must divide 10 readings that could complete Parsing;However temporary section 610 can be also designed as to the larger time to save parsing, such as the size of temporary section 610 is set It is calculated as being more than or equal to block size, then each block, which only needs once to read, can be completed parsing.In fact, temporary section 610 Size can adjust according to the size F of film caption shelves, by it is actual number for, it is assumed that preset block counts be 256, The size of film caption shelves is no more than 4MB, then the size of each block will be less than 16KB (=4MB/256), so keeping at this time The size of section 610 can be designed as 16KB;However assuming that block counts are similarly 256, the sizes of film caption shelves between 4MB~ 8MB, then the size for keeping in section 610 can be designed as 32KB (=8MB/256) to save the parsing time, or still can set It is calculated as 16KB, to save memory.And in another preferred embodiment, it is fixed every time to be with the size for keeping in section 610 Unit reads film caption shelves, it is therefore assumed that the size of film caption shelves is F, the size for keeping in section 610 is R, then film word Curtain shelves will at most be divided into F/R block, such as temporary section 610 can store a subtitle block simultaneously, then block counts For F/R, however if temporary section 610 can only store half subtitle block, block counts F/2R simultaneously.Furthermore If guaranteeing block counts no more than some critical value, this critical value is related to the size of concordance list, then must be according to film word The size of curtain shelves adjusts the size of temporary section 610.By taking actual number as an example, it is assumed that the size of film caption shelves is no more than 4MB, the size for keeping in section 610 is 16KB, then film caption shelves can be at most divided into 256 (=4MB/16KB) a blocks, However if the size of film caption shelves is between 4MB~8MB, and it is desirable that block counts are no more than 256, then temporary section 610 is big The small 32KB that is preferably more than or equal to is read several times with saving parsing time or a subtitle block, then keeps in section 610 Size can be designed as being less than 32KB, and (such as points of 2 times readings of each subtitle block, the size of temporary section 610 are designed as 16KB).No matter film caption shelves will be divided into multiple blocks according to which kind of method, as shown in figure 8,820 quilt of film caption shelves At least N+1 subtitle block is divided into (comprising the 0th subtitle block 821, the 1st subtitle block 822 and n-th subtitle region Block 823), N is the positive integer more than or equal to 1, and each subtitle block includes multiple a captioning unit, such as subtitle block 821 It in total include K+1 captioning unit 821-0~821-K, subtitle block 822 and 823 separately includes L+1 and M+1 captioning unit, K, L, M are positive integer.Note that K, L, M may be equal or unequal, that is, each subtitle block may comprising same number or The captioning unit of different numbers, also it is possible that certain subtitle blocks only include 1 captioning unit, or even without including any word Curtain unit (but other data for storing film caption shelves).
Referring back to Fig. 7, when film caption shelves have been divided as multiple blocks (step S730), just read in next step Subtitle block (step S740).It is performed when step S740 first time, first character curtain block (subtitle region i.e. shown in Fig. 8 Block 0) be read, later when step S740 is performed again, then according to the time of captioning unit in film caption shelves by it is small to Big sequence sequentially reads other subtitle blocks.Then captioning unit (step S750) is found in subtitle block, if looking for To captioning unit, then the characteristic time (step S760) of the subtitle block is recorded in concordance list 810.Characteristic time can be word Curtain block a certain captioning unit time, such as earliest captioning unit time or captioning unit at the latest time (being not limited), in a preferred embodiment, as shown in figure 8, the characteristic time selects word earliest in the subtitle block The time of curtain unit, therefore concordance list 810 records the characteristic time 00:00:00 of the 0th subtitle block 821 the 0th position, 000.And if step S750 does not find captioning unit, representing the subtitle block does not have the characteristic time, therefore just with the subtitle region Characteristic time (step S765) of the characteristic time of the neighbouring subtitle block of block as the subtitle block.It is preferably real at one It applies in example, when subtitle block does not include any captioning unit, directly takes the characteristic time conduct of a subtitle block The characteristic time of the subtitle block;It is then in concordance list first temporarily by the subtitle block in another preferred embodiment Characteristic time leave a blank, be backfilled to after finding the characteristic time of next subtitle block, then by the characteristic time of newest acquirement Previous place of leaving a blank.When reading concordance list later, when the continuous two or more subtitle blocks of discovery correspond to identical spy When levying the time, then according to rule when inserting, it is minimum (corresponding to the characteristic time before continuing to use) or maximum only to read wherein number The subtitle block of (corresponding to backfill the later characteristic time).When having recorded the feature of current subtitle block in concordance list 810 Between after, by index value plus 1 (step S770), to prepare to insert the characteristic time of next subtitle block, that is, also according to The sequence that step S740 reads subtitle block inserts the characteristic time in concordance list.It note that step S740 may must be read The same subtitle block primary (such as temporary section 610 is more than or equal to size of a subtitle block) or multiple (such as it is temporary Size of the section 610 less than a subtitle block);In addition, when size of the temporary section 610 less than a subtitle block, also It is possible that only reading a subtitle block, such as the characteristic time is the time of captioning unit earliest in the subtitle block, then may be used Only to read a part of the subtitle block foremost, and other parts are skipped over to reduce the parsing time.
Then judge whether film caption shelves 820 all read and finish (step S780), if also unread finish, Continue to read next subtitle block (step S740);It is finished if read, the information (step of documentary subtitle shelves 820 Rapid S790), for example, coded format (ASCII, Unicode, UTF-8 etc.), film caption shelves format (" .srt ", " .smi " etc.) with And the columns of concordance list.The parsing of a film caption shelves is so just completed, and rope shown in fig. 6 will be stored in by generating concordance list Draw in an index sub-segments (one of index sub-segments 622,624,626,628) for section 620.Because of the invention Information stored by concordance list quite simplifies that (each temporal characteristics need to only occupy the storage space of 4Byte, if a total of 256 subtitle blocks, then the size of a concordance list is 4Bx256=1KB), therefore even if could support up to 8 groups of film captions, The storage space of index section 620 also only needs 8KB, compares storage space 128KBx8 required for known technology, the present invention can Substantially save memory.
Referring to Fig. 9, it is the flow chart for finding the method for subtitle when the present invention plays film.Please refer to Figure 10, It is the comparative diagram of the temporary content of captioning unit section 630 and film caption shelves when the present invention plays film.When film starts When broadcasting, playing device first judges whether film is the broadcasting (step S902) since starting point, if it is, reading target area Block (reads the 0th target block 821) at this time;If it is not, then finding out mesh from concordance list 810 according to current play time Marking-up curtain block (step S904).Start to play such as from time 00:01:00,700, foundation concordance list 810, at this time step S904 will find n-th subtitle block 823 as current target block.It can sequentially be found when searching, or with two points Search method (binary search) or other algorithms are found.It can be according to subtitle block and temporary section 610 when reading Size relation, the primary all data for reading subtitle block simultaneously, or subtitle block is read in several times.Read target subtitle region Whether block and after keeping in temporary section 610 (step S906), first check for captioning unit section 630 without available space (step S910).For the content that captioning unit section 630 stores as shown in the correspondence table 1010 of Figure 10, the data of a column are one corresponding Captioning unit, such as time for arranging of corresponding table 1010 the 0th correspond to starting and the end time of captioning unit 821-0, in subtitle Hold the caption content of corresponding captioning unit 821-0, and its label is then used to indicate (i.e. whether the captioning unit expired It had been displayed, such as was indicated with bit 0 it has been shown that bit 1 indicates not show).Therefore step S910 may have different judgements Method, such as each column of captioning unit section 630 all have data, then are judged as no available space, then carry out step S960 To rearrange captioning unit section 630;Although or each column of captioning unit section 630 all have data, some data Be denoted as it is out of date, then can be about to diameter these data overriding, just judge that captioning unit section 630 still has available space at this time. The size of captioning unit section 630 elastic can design, and subtitle is correct when enabling to play to store an appropriate number of captioning unit And it is swimmingly shown as principle, however all caption contents of target subtitle block can also be stored simultaneously.Preferably at one In embodiment, captioning unit section 630, which stores the correspondence table in 16 captioning unit, that is, Figure 10, has 16 column (R=15). By taking a column data occupies the storage space of 256Bytes on average as an example, then the size of captioning unit section 630 is 8KB.
Captioning unit section 630 does not have data at the beginning, therefore enters step S920, which is stored in parsing temporary The information of the captioning unit is inserted corresponding table 1010 as soon as often reading a captioning unit by each captioning unit in section 610 Appropriate field, then judge whether the data in temporary section 610 have all been disposed (step S940).If not yet It is all disposed, then next captioning unit (step S930) is found from temporary section 610 again, if there is finding caption list Member then goes to step S910;If do not found, step S940 is returned to.If step S940 judges the number in temporary section 610 According to being all disposed, then next subtitle block is read to temporary 610 (step of section from film caption shelves 821 S950).However if the data in section 610 are kept in during aforementioned step S910~S940 parses captioning unit It is not yet disposed but captioning unit section 630 has just been filled, then go to step S960.In step S960, captioning unit Section 630 is rearranged, and more particularly, had been displayed in corresponding table 1010 or out-of-date captioning unit will be marked as 1, and if when executing step S910 again next time discovery have the captioning unit labeled as 1, representing captioning unit section 630 still has Space can be used, and should can be removed or be override labeled as 1 captioning unit.Following step S970 is then according to current Play time finds target caption content from captioning unit section 630, that is, according to current play time from corresponding table 1010 find the caption content that should be shown, such as current play time is 00:00:00, and 105, then step S970 is read in subtitle Hold 0-1 as target caption content.After finding target caption content, playing module displaying target caption content (step is notified S980), then judge whether film is played and finish (step S990).If finished, terminate the stream of this broadcasting Journey;If do not finished also, step S910 is returned to, the storage condition decision according to current subtitle unit section 630 will weigh It is new to arrange captioning unit section 630 (step S960) or parse next captioning unit (step in temporary section 610 S920).Above-mentioned step S910~S990 will be executed repeatedly until movie playback terminates.It note that above-mentioned step S960 is not necessarily intended to execute between step S950 and step S970, can also be between step S970 and step S980 or step It executes between S980 and step S990, or is even executed between step S990 and step S910, in above-mentioned any variation In shape, step S970 is and then executed after step S950, and when the judging result of step S910, which is, is, i.e. execution step S970.That is the step (step S960) for rearranging captioning unit section 630 can find target caption content (step Rapid S970) or displaying target caption content (step S980) before or after execute, more particularly, when captioning unit section 630 are judged and have expired (step S910) between next time again judgement (again execute step S910), it is necessary at least execute one Secondary step S960, herein under the premise of, can also selectively be performed a plurality of times step S960 in the other times of process, for example, A step S960 is executed again after finding captioning unit (step S930).
In conclusion the method for parsing film caption the invention proposes one and corresponding display film caption Method, the two can use film caption processing unit of the invention and execute.Compared to known technology, the present invention is in parsing film Film caption shelves are divided into multiple blocks when subtitle, each block only records its characteristic time, therefore can be fairly quickly Process of analysis is completed, and generated concordance list is also fairly small, can save storage space.Furthermore it is only temporary when playing A small amount of caption content is deposited, and multiple groups subtitle shelves share a temporary section, therefore compared to known technology, the present invention is bigger Width section lacks the usage amount of memory.
Due to the art, tool usually intellectual can understand by the disclosure of the method invention of Fig. 7 and Fig. 9 The implementation detail and variation of the device inventions of Fig. 5, therefore, to avoid superfluous text, in the exposure requirement for not influencing this method invention and Under the premise of exploitativeness, repeat description gives memorandum herein.It is taken off in diagram before note that, the shape of element, size, ratio Sequence of example and step etc. is only to illustrate, and understands the present invention for the art tool usually intellectual and is used, non-to limit The system present invention.In addition, the art personage can disclosure under this invention and the demand of itself selectively implement it is any Some or all of embodiment technical characteristic, or selectively implement the group of some or all of multiple embodiments technical characteristic It closes, increases the elasticity when present invention is implemented whereby.
Although the embodiment of the present invention is as described above, however these embodiments not are used to limit the present invention, this technology neck The domain tool usually intellectual content that can express or imply according to the present invention imposes variation to technical characteristic of the invention, it is all this Many variations may belong to patent protection scope sought by the present invention, and in other words, scope of patent protection of the invention must regard Subject to the claim of this specification defines.

Claims (15)

1. a kind of method for handling film caption, includes:
One film caption analyzing step includes:
It is multiple subtitle blocks by the division of teaching contents of a film caption shelves, these subtitle blocks respectively contain multiple caption contents, Each caption content corresponding subtitle time;And
A concordance list is generated, to record these subtitle blocks other characteristic time, each this feature time and its institute are right One of these subtitle times corresponding to these caption contents for the subtitle block answered are related;And
One film caption read step includes for finding out a target caption content of a corresponding current play time:
According to these characteristic times that the current play time and the concordance list are recorded, correspondence is found from these subtitle blocks One target subtitle block of the current play time;And
The target caption content is found from the target subtitle block according to the current play time;
Wherein, the step of this finds the target caption content from the target subtitle block according to the current play time includes:
The caption content of a preset quantity is chosen from multiple caption contents of the target subtitle block, and records the preset quantity Each caption content corresponding subtitle time;
According to the current play time and these subtitle times, the target word is found out from these caption contents of the preset quantity Curtain content;
Mark the target caption content;And
These caption contents of the preset quantity are updated with target caption content that new caption content replaces this marked.
2. the method as described in claim 1, it is characterised in that the division of teaching contents by the film caption shelves is multiple subtitle regions The step of block, includes:
Obtain the size of the film caption shelves;
Size according to the film caption shelves determines a subtitle block size;And
The film caption shelves are read as unit of the subtitle block size to obtain these subtitle blocks.
3. the method as described in claim 1, which is characterized in that the step of generation concordance list includes:
These subtitle blocks are read according to a sequence;And
These characteristic times according to the journal these subtitle blocks are to generate the concordance list;
Wherein, if an intermediate subtitle block of these subtitle blocks does not include any subtitle, this is according to these words of the journal These characteristic times of curtain block are with the spy of the previous subtitle block of the intermediate subtitle block the step of concordance list to generate Levy the characteristic time that one of characteristic time of time and latter subtitle block is the intermediate subtitle block.
4. the method as described in claim 1, which is characterized in that these characteristic times are that the subtitle block corresponding to it includes One of the minimum value and maximum value of these subtitle times corresponding to these caption contents.
5. a kind of method for parsing film caption, includes:
It is multiple subtitle blocks by the division of teaching contents of a film caption shelves, these subtitle blocks respectively contain multiple caption contents, Each caption content corresponding subtitle time;And
A concordance list is generated, to record these subtitle blocks other characteristic time, each this feature time is and its institute One of these subtitle times corresponding to these caption contents of corresponding subtitle block are related;
The step of generation concordance list, includes:
These subtitle blocks are read according to a sequence;And
These characteristic times according to the journal these subtitle blocks are to generate the concordance list;
If the intermediate subtitle block of the one of these subtitle blocks does not include any subtitle, this is according to these subtitle blocks of the journal These characteristic times to generate be with the characteristic time of the previous subtitle block of the intermediate subtitle block the step of concordance list And one of characteristic time of latter subtitle block is the characteristic time of the intermediate subtitle block;
Wherein, the target caption content for playing required presentation when film is these characteristic times recorded according to the concordance list It generates.
6. method as claimed in claim 5, which is characterized in that the division of teaching contents by the film caption shelves is multiple subtitle regions The step of block, includes:
Obtain the size of the film caption shelves;
Size according to the film caption shelves determines a subtitle block size;And
The film caption shelves are read as unit of the subtitle block size to obtain these subtitle blocks.
7. method as claimed in claim 5, which is characterized in that these characteristic times are that the subtitle block corresponding to it includes One of the minimum value and maximum value of these subtitle times corresponding to these caption contents.
8. a kind of film caption processing unit, for parsing a film caption shelves and finding out a mesh according to a current play time Caption content is marked, includes:
One processing unit, for being multiple subtitle blocks by the division of teaching contents of a film caption shelves and generating a concordance list, the rope Draw table and records these subtitle blocks other characteristic time, and recorded according to the current play time and the concordance list These characteristic times find a target subtitle block of the corresponding current play time, and foundation from these subtitle blocks The current play time finds the target caption content from the target subtitle block, and wherein these subtitle blocks respectively contain more A caption content, each caption content corresponding subtitle time, each this feature time be with its corresponding to subtitle block One of these subtitle times corresponding to these caption contents are related;The processing unit also reads these according to a sequence Subtitle block, and these characteristic times according to the journal these subtitle blocks to generate the concordance list, if these words One intermediate subtitle block of curtain block does not include any subtitle, and the processing unit is with the previous subtitle block of the intermediate subtitle block Characteristic time and latter subtitle block one of characteristic time be the intermediate subtitle block characteristic time;And
One memory includes:
One first memory section, for storing the concordance list;And
One second memory section, for storing the caption content that the target subtitle block includes.
9. film caption processing unit as claimed in claim 8, which is characterized in that the concordance list is the corresponding film caption The film caption group that shelves are included, the first memory section also store another concordance list, which corresponds to another Film caption group.
10. film caption processing unit as claimed in claim 8, which is characterized in that the processing unit is according to the current broadcasting Time dynamic updates the second memory section.
11. film caption processing unit as claimed in claim 8, which is characterized in that the memory also includes:
One temporary section;
Wherein the processing unit by this keep in section as unit of by the division of teaching contents of the film caption shelves be these subtitle blocks.
12. film caption processing unit as claimed in claim 11, which is characterized in that the processing unit is according to the film caption The size of shelves determines the size of the temporary section.
13. film caption processing unit as claimed in claim 8, which is characterized in that the processing unit is from the target subtitle region The caption content of a preset quantity is chosen in multiple caption contents of block and obtains each caption content pair of the preset quantity The subtitle time answered, and the caption content of the preset quantity and subtitle time are stored to the second memory section, then According to the current play time and these subtitle times, the target caption content is found out from the second memory section.
14. film caption processing unit as claimed in claim 13, which is characterized in that the processing unit marks the target subtitle Content, and with target caption content that new caption content replaces this marked to update the second memory section.
15. film caption processing unit as claimed in claim 8, which is characterized in that these characteristic times are corresponding to it One of minimum value and maximum value of these subtitle times corresponding to these caption contents that subtitle block includes.
CN201410497927.0A 2014-09-25 2014-09-25 Film caption processing unit and method, and the method for parsing film caption Expired - Fee Related CN105516779B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410497927.0A CN105516779B (en) 2014-09-25 2014-09-25 Film caption processing unit and method, and the method for parsing film caption

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410497927.0A CN105516779B (en) 2014-09-25 2014-09-25 Film caption processing unit and method, and the method for parsing film caption

Publications (2)

Publication Number Publication Date
CN105516779A CN105516779A (en) 2016-04-20
CN105516779B true CN105516779B (en) 2018-12-11

Family

ID=55724366

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410497927.0A Expired - Fee Related CN105516779B (en) 2014-09-25 2014-09-25 Film caption processing unit and method, and the method for parsing film caption

Country Status (1)

Country Link
CN (1) CN105516779B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101764952A (en) * 2008-11-25 2010-06-30 新奥特(北京)视频技术有限公司 Subtitle list editing, examining and broadcasting method based on time periods
CN102739997A (en) * 2011-05-10 2012-10-17 新奥特(北京)视频技术有限公司 Subtitle plug-in segmentation rendering method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB201109323D0 (en) * 2011-06-03 2011-07-20 We R Interactive Ltd Video game system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101764952A (en) * 2008-11-25 2010-06-30 新奥特(北京)视频技术有限公司 Subtitle list editing, examining and broadcasting method based on time periods
CN102739997A (en) * 2011-05-10 2012-10-17 新奥特(北京)视频技术有限公司 Subtitle plug-in segmentation rendering method

Also Published As

Publication number Publication date
CN105516779A (en) 2016-04-20

Similar Documents

Publication Publication Date Title
TWI543612B (en) Subtitle processing device and its associated method and method of parsing subtitle
JP5100746B2 (en) Video playback apparatus and video playback method
KR101102758B1 (en) Recording medium, reproduction device, recording method, program, and reproduction method
US8050538B2 (en) Recording medium having data structure for managing reproduction of still pictures recorded thereon and recording and reproducing methods and apparatuses
CA2772021C (en) Storage medium having interactive graphic stream and apparatus for reproducing the same
CN101315804B (en) Editing device, editing method, and data processing device, data processing method
JP2007522595A (en) Recording medium and method and apparatus for decoding text subtitle stream
RU2005137185A (en) MEDIA FOR STORING INFORMATION, WRITING A STREAM OF SUBTITLE BASED ON THE TEXT, DEVICE AND METHOD FOR REPRODUCING IT
CN1918649A (en) Recording medium and method and apparatus for decoding text subtitle streams
CN101241744A (en) Recording medium, method and apparatus for reproducing/recording a text subtitle stream
CN101352038B (en) Recording device, recording method, recording program, imaging device, imaging method, and imaging program
RU2005102109A (en) DEVICE FOR RECORDING OR PLAYBACK OF MULTIMEDIA DATA USING HIERARCHIC INFORMATION STRUCTURE AND INFORMATION MEDIA FOR DATA FOR IT
KR100882078B1 (en) Reproduction apparatus for parallel processing of display set, recording medium, recording method, reproduction method, and computer-readable recording medium
RU2007146766A (en) MEDIA FOR STORING INFORMATION, WRITING A STREAM OF SUBTITLE BASED ON THE TEXT, DEVICE AND METHOD FOR REPRODUCING IT
KR20050072255A (en) Method for managing and reproducing a subtitle of high density optical disc
CN105516779B (en) Film caption processing unit and method, and the method for parsing film caption
US20070189319A1 (en) Method and apparatus for reproducing data streams
RU2377668C2 (en) Recording medium and method and device for playing back and recording text subtitle streams
RU2377669C2 (en) Recording medium with data structure for managing different data, and method and device for recording and playing back
KR100937416B1 (en) Apparatus and method for Personal Video Recorder
US7848615B2 (en) Medium for storing subtitle data structure of an audio/ video program and method for displaying the same
US20120201506A1 (en) Moving image processing apparatus, moving image processing method, and program
CN111629255B (en) Audio and video recording method and device, computer equipment and storage medium
RU2367036C2 (en) Recording medium with data structure for managing text subtitles, and recording and displaying methods and devices
CN100517487C (en) Recording medium having a data structure for managing font information for text subtitles and recording and reproducing methods and apparatuses

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20200413

Address after: No.1, Duhang 1st Road, Hsinchu City, Hsinchu Science Park, Taiwan, China

Patentee after: MEDIATEK Inc.

Address before: Taiwan Hsinchu County Tai Yuan Street China jhubei City, No. 26 4 floor 1

Patentee before: MSTAR SEMICONDUCTOR Inc.

TR01 Transfer of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20181211

CF01 Termination of patent right due to non-payment of annual fee