CN107105255A - Add tagged method and apparatus in video file - Google Patents

Add tagged method and apparatus in video file Download PDF

Info

Publication number
CN107105255A
CN107105255A CN201610099403.5A CN201610099403A CN107105255A CN 107105255 A CN107105255 A CN 107105255A CN 201610099403 A CN201610099403 A CN 201610099403A CN 107105255 A CN107105255 A CN 107105255A
Authority
CN
China
Prior art keywords
label
macro block
coding
video data
video
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.)
Granted
Application number
CN201610099403.5A
Other languages
Chinese (zh)
Other versions
CN107105255B (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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding Ltd
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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201610099403.5A priority Critical patent/CN107105255B/en
Publication of CN107105255A publication Critical patent/CN107105255A/en
Application granted granted Critical
Publication of CN107105255B publication Critical patent/CN107105255B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/167Position within a video image, e.g. region of interest [ROI]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

Add tagged method and apparatus in a kind of video file of the application proposition, adding tagged method in the video file includes:Video file before decoding addition label, obtains video data;Store the macro block information in video data;Label data is obtained, and merges video data and label data, new video data is obtained;The new video data is encoded, obtains adding the video file after label, wherein, the coding includes predictive coding, and the predictive coding includes:When the macro block that occupation proportion of the label in the frame of video being added to is less than preset value or present encoding is the unappropriated macro block of label, coding is predicted using the macro block information of storage.This method can lift processing speed.

Description

Add tagged method and apparatus in video file
Technical field
The application, which is related in video editing techniques field, more particularly to a kind of video file, adds tagged method And device.
Background technology
Under normal circumstances, in order to using H264 encode video file in addition label, it is necessary to right first Video file decode obtaining each frame data (ARGB pixel datas or YUV pixels), then in Central processor (Central Processing Unit, CPU) or graphics processor (Graphics Processing Unit, GPU) computing obtains each frame data of label, by each frame number of video file Merged according to each frame data with label and obtain new frame data, finally all new frame numbers to obtaining Encoded according to progress and obtain new video file.
Wherein, in correlation technique, there can be the process of macro block information search within the frame/frames in coding, and The amount of calculation of this process is larger, and the consuming time is longer, and therefore, it is longer that correlation technique can have processing time The problem of, influence Consumer's Experience.
The content of the invention
The application is intended at least solve one of technical problem in correlation technique to a certain extent.
Therefore, the purpose of the application is to propose to add tagged method, the party in a kind of video file Method can lift processing speed, and then lift Consumer's Experience.
Further object is to propose to add tagged device in a kind of video file.
Add tagged side to reach in above-mentioned purpose, the video file that the application first aspect embodiment is proposed Method, including:Video file before decoding addition label, obtains video data;Store in video data Macro block information;Label data is obtained, and merges video data and label data, new video is obtained Data;The new video data is encoded, obtains adding the video file after label, wherein, The coding includes predictive coding, and the predictive coding includes:When label is in the frame of video being added to When the macro block that interior occupation proportion is less than preset value or present encoding is label unappropriated macro block, adopt Coding is predicted with the macro block information of storage.
Add tagged method in the video file that the application first aspect embodiment is proposed, by decoding Store macro block information during video file, and during predictive coding in some cases, using the grand of storage Block message is predicted coding, because the amount of calculation of the search procedure of macro block information is larger, can expend very For a long time, the macro block information of storage is searched for and directly used in the present embodiment without macro block information, can To significantly reduce processing time, so as to lift Consumer's Experience.
Add tagged dress to reach in above-mentioned purpose, the video file that the application second aspect embodiment is proposed Put, including:Decoder module, for decoding the video file before addition label, obtains video data;Deposit Module is stored up, for storing the macro block information in video data;Merging module, for obtaining label data, And merge video data and label data, obtain new video data;Coding module, for described new Video data encoded, obtain add label after video file, wherein, the coding includes Predictive coding, the predictive coding includes:When occupation proportion of the label in the frame of video being added to When macro block less than preset value or present encoding is label unappropriated macro block, using the macro block of storage Information is predicted coding.
Add tagged device in the video file that the application second aspect embodiment is proposed, by decoding Store macro block information during video file, and during predictive coding in some cases, using the grand of storage Block message is predicted coding, because the amount of calculation of the search procedure of macro block information is larger, can expend very For a long time, the macro block information of storage is searched for and directly used in the present embodiment without macro block information, can To significantly reduce processing time, so as to lift Consumer's Experience.
The aspect and advantage that the application is added will be set forth in part in the description, and will partly be retouched from following Become obvious in stating, or recognize by the practice of the application.
Brief description of the drawings
The above-mentioned and/or additional aspect of the application and advantage are from the following description of the accompanying drawings of embodiments It will be apparent and be readily appreciated that, wherein:
Fig. 1 be the embodiment of the application one propose video file in add tagged method flow signal Figure;
Fig. 2 is that the flow for adding tagged method in the video file that another embodiment of the application is proposed is shown It is intended to;
Fig. 3 is the schematic flow sheet of H264 encoding and decoding;
Fig. 4 is the schematic diagram of the NAL unit obtained after H264 is encoded;
Fig. 5 is the schematic diagram of label occupied area in frame of video;
Fig. 6 is that the structure for adding tagged device in the video file that another embodiment of the application is proposed is shown It is intended to;
Fig. 7 is that the structure for adding tagged device in the video file that another embodiment of the application is proposed is shown It is intended to.
Embodiment
Embodiments herein is described below in detail, the example of the embodiment is shown in the drawings, wherein certainly Beginning to same or similar label eventually represents same or similar module or the mould with same or like function Block.The embodiments described below with reference to the accompanying drawings are exemplary, is only used for explaining the application, and can not It is interpreted as the limitation to the application.On the contrary, embodiments herein includes falling into attached claims All changes, modification and equivalent in the range of spirit and intension.
Fig. 1 be the embodiment of the application one propose video file in add tagged method flow signal Figure.
Referring to Fig. 1, this method includes:
S11:Video file before decoding addition label, obtains video data.
In the embodiment of the present application, by taking H264 encoding and decoding as an example, therefore, the video file before addition label The video file encoded using H264 can be specifically referred to, it is necessary to add label in the video file.
After being decoded to video file, each frame data of video file can be obtained, in order to it is rear Each frame data of continuous label are distinguished, and each frame data obtained after being decoded to video file can To be referred to as video data.
S12:Store the macro block information in video data.
Each frame data can include multiple macro block informations, in storage, can be deposited according to different scenes Store up corresponding macro block information.For example, all macro block informations can be stored, or, can only it store The macro block information not taken by label.Particular content may refer to subsequent embodiment.
S13:Label data is obtained, and merges video data and label data, new video data is obtained.
Wherein it is possible to which being set by user needs to be added to the label substance in video file, then pass through CPU Or GPU computings obtain each frame data of label, each frame data of the label are properly termed as number of tags According to.
After video data and label data is obtained, video data and label data can be merged, with right Each frame is answered, merges each frame data of video file and each frame data of label, obtains new frame Data, the new frame data are properly termed as new video data.
S14:The new video data is encoded, obtains adding the video file after label, its In, the coding includes predictive coding, and the predictive coding includes:When label is in regarding for being added to It is the unappropriated macro block of label that the occupation proportion of frequency frame in, which is less than preset value or the macro block of present encoding, When, coding is predicted using the macro block information of storage.
It can be encoded after new video data is obtained, so that new video file is obtained, The new video file is exactly to add the video file after label.
It would generally include in coding:Predictive coding, transition coding, quantization and entropy code etc..
In correlation technique, in predictive coding generally using the process of the search of macro block information within the frame/frames, Coding is predicted with the intraframe prediction information or inter prediction information that are obtained according to search.
And in the present embodiment, in some cases, volume is directly predicted using the macro block information of storage Code, it is not necessary to carry out the search of macro block information again.Wherein, certain situation includes:Label is being added When the occupation proportion in frame of video arrived is less than preset value, or, the macro block of present encoding be label not The macro block of occupancy.Wherein, the predictive coding can be grand including what is encoded successively to different macro blocks Whether block loop coding, be the unappropriated macro block of label with the macro block for judging present encoding.
In the present embodiment, by storing macro block information in decoding video file, and in some cases Predictive coding when, coding is predicted using the macro block information of storage, due to the search of macro block information The amount of calculation of process is larger, can expend for a long time, without macro block information search in the present embodiment Directly using the macro block information of storage, processing time can be significantly reduced, so as to lift Consumer's Experience.
Fig. 2 is that the flow for adding tagged method in the video file that another embodiment of the application is proposed is shown It is intended to.
In order to be better understood from the application, first H264 encoding and decoding related contents are described.
H264 encoding and decoding flow is as shown in Figure 3.For cataloged procedure, coding is predicted first, And predictive coding is divided into infra-frame prediction and inter prediction, for intraframe coding, it is necessary in a variety of prediction moulds Optimal predictive mode is searched in formula, after then the difference between comparison prediction value and real pixel is transmitted to Continuous link;For interframe encode, the estimation between present frame and reference frame is carried out based on reference frame Motion vector is tried to achieve, is obtained using Motion estimation and compensation relative to reference frame motion vector, than Follow-up link is passed to compared with the difference between predicted value and real pixel;Then transition coding can be carried out, The high-frequency signal in prediction difference is removed, then by quantifying the further energy for reducing difference signal; Finally reordered and obtain final network abstract layer (Network Abstraction with entropy code Layer, NAL) unit, store into video file.
Then it is the inverse process of coding for decoding process.
Referring to Fig. 4, each NAL unit (NAL unit) includes one or more (slice), often Individual piece includes data in head and piece.Data are made up of a series of continuous coded macroblocks (MB) in piece, According to the difference of macro block (mb) type, it is divided into infra-frame prediction macro block and inter prediction macro block or without prediction Macro block (Skip MB), it can be seen that infra-frame prediction macro block and inter prediction macro block have not The information of forecasting of same type, intraframe prediction information is predictive mode (Intra modes), and inter prediction Information is reference frame (Reference frames) and motion vector (Motion Vectors).
Under general scene, the label being added in video file can't take all spaces of two field picture, More situations are that label only takes less region in the frame of video file, similar to Figure 5. Frame of video is divided into 4x4 region, wherein the region that label does not take is represented for filling part, Filling part represents the region that label takes.Now, the region taken by label is whole frame of video 3/16.Based on this feature, the embodiment of the present application is effectively sharp during new frame data coding The information obtained with decoding, reduces some operations in cataloged procedure.
Referring to Fig. 2, this method includes:
S201:The occupation proportion of label in the video frame is determined according to the coordinate information of label.
Wherein, label can be set by user, therefore, it can obtain the seat of label from configuration information Mark information.
Occupation proportion refers to the ratio of the macro block number of label occupancy and total macro block number of frame of video.
Macroblock size is typically 16x16 pixel, big according to the coordinate information of label and each macro block It is small to calculate the macro block number of label occupancy, further according to total macro block number of each frame of video, The occupation proportion of label in the video frame can be determined.
S202:Judge whether the occupation proportion is more than preset value, if so, S203-S211 is performed, it is no Then, S212-S218 is performed.
Preset value is, for example, 25%.
After occupation proportion and preset value is got, the two values can be compared, to obtain judged result.
S203:Video file before decoding addition label, obtains video data, and store video data In the macro block information that is not taken by label.
Wherein it is possible to determine the macro block that label takes according to the coordinate information of label, and then get not The macro block information taken by label.
Macro block information can include:Intraframe prediction information and inter prediction information.
Intraframe prediction information is specifically predictive mode (Intra Modes).
Inter prediction information is specifically included:Reference frame (Reference frames) and motion vector (Motion Vectors)。
S204:Label data is obtained, and merges video data and label data, new video counts are obtained According to.
Wherein it is possible to which being set by user needs to be added to the label substance in video file, then pass through CPU Or GPU computings obtain each frame data of label, each frame data of the label are properly termed as number of tags According to.
After video data and label data is obtained, video data and label data can be merged, with right Each frame is answered, merges each frame data of video file and each frame data of label, obtains new frame Data, the new frame data are properly termed as new video data.
Obtain that the flows such as follow-up coding can be carried out after new video data.
S205:After macro block loop coding starts, the macro block of present encoding is determined.
For example, using traversal by the way of, successively using each macro block as present encoding macro block.
S206:Judge whether the macro block of present encoding is taken by label, if so, S207 is performed, otherwise, Perform S208.
S207:New macro block information is calculated by frame in and interframe search procedure, and uses new macro block Information, coding is predicted to new video data.S209 is performed afterwards.
After macro block is taken by label, the search of macro block information can be re-started, to improve the degree of accuracy.
For example, by the search of intra-frame macro block information, new predictive mode can be obtained, and using new Predictive mode carry out intraframe predictive coding, by the search of inter macroblocks information, can obtain new Reference frame and motion vector, inter prediction encoding is carried out using new reference frame and operation vector.
S208:Using the macro block information of storage, coding is predicted to new video data.
For example, the macro block information of storage includes:Intraframe prediction information (predictive mode) and inter prediction Information (reference frame and motion vector), then can carry out infra-frame prediction according to intraframe prediction information respectively Coding, inter prediction encoding is carried out according to inter prediction information.
S209:Transition coding, quantization and entropy code etc. are carried out to the data after predictive coding.
S210:Judge whether to terminate macro block loop coding, if so, performing S211, otherwise, repetition is held Row S205 and its subsequent step.
For example, after the completion of all macro blocks are all encoded, it is determined that terminating macro block loop coding, otherwise continuing Macro block loop coding.
S211:Macro block loop coding terminates.
S212:Video file before decoding addition label, obtains video data, and store video data In all macro block informations.
Wherein it is possible to determine the macro block that label takes according to the coordinate information of label, and then get not The macro block information taken by label.
Macro block information can include:Intraframe prediction information and inter prediction information.
Intraframe prediction information is specifically predictive mode (Intra Modes).
Inter prediction information is specifically included:Reference frame (Reference frames) and motion vector (Motion Vectors)。
S213:Label data is obtained, and merges video data and label data, new video counts are obtained According to.
Wherein it is possible to which being set by user needs to be added to the label substance in video file, then pass through CPU Or GPU computings obtain each frame data of label, each frame data of the label are properly termed as number of tags According to.
After video data and label data is obtained, video data and label data can be merged, with right Each frame is answered, merges each frame data of video file and each frame data of label, obtains new frame Data, the new frame data are properly termed as new video data.
Obtain that the flows such as follow-up coding can be carried out after new video data.
S214:After macro block loop coding starts, the macro block of present encoding is determined.
For example, using traversal by the way of, successively using each macro block as present encoding macro block.
S215:Using the macro block information of storage, coding is predicted to new video data.
For example, the macro block information of storage includes:Intraframe prediction information (predictive mode) and inter prediction Information (reference frame and motion vector), then can carry out infra-frame prediction according to intraframe prediction information respectively Coding, inter prediction encoding is carried out according to inter prediction information.
S216:Transition coding, quantization and entropy code etc. are carried out to the data after predictive coding.
S217:Judge whether to terminate macro block loop coding, if so, performing S218, otherwise, repetition is held Row S214 and its subsequent step.
For example, after the completion of all macro blocks are all encoded, it is determined that terminating macro block loop coding, otherwise continuing Macro block loop coding.
S218:Macro block loop coding terminates.
, can by saving the process that macro block information is searched within the frame/frames in above-mentioned S208 or S215 To substantially reduce the time of coding.Experiment shows that the scramble time of video is about 2 times of decoding time More than, and in an encoding process, the time of predictive coding occupies 70% or so of the whole scramble time, The time of predictive coding is concentrated mainly on the search of macro block information.Macro block ratio is occupied for label to be less than The situation of preset value, all macro block information search procedures are omitted, and rough estimate can be to whole mark Label adding procedure brings 50% or so performance boost.Certainly, now ignore label information to macro block to believe The influence brought is ceased, the residual error of predictive coding can be increased, the code stream to final coding generation is brought necessarily Increase, but in values, increased scope will be limited, relative to what is finally brought This increase is worth for performance boost.The feelings that macro block ratio is more than preset value are taken for label Condition, situation about being taken according to macro block is predicted coding respectively, for the macro block not taken by label, Using decoding storage macro block information, can effectively reduce the scramble time, for by label take it is grand Block, re-searches for macro block information and can guarantee that the residual error of final predictive coding is optimal, relative to conventional volume The increase of coding information is not brought for code stream journey.
In the present embodiment, by storing macro block information in decoding video file, and in some cases Predictive coding when, coding is predicted using the macro block information of storage, due to the search of macro block information The amount of calculation of process is larger, can expend for a long time, without macro block information search in the present embodiment Directly using the macro block information of storage, processing time can be significantly reduced.Further, a point situation is adopted Coding is predicted with the macro block information of storage or re-searches for calculating new macro block information, can be taken into account Operand and the degree of accuracy, the need for meeting different scenes.
Fig. 6 is that the structure for adding tagged device in the video file that another embodiment of the application is proposed is shown It is intended to.Referring to Fig. 6, the device 60 includes:Decoder module 61, memory module 62, merging module 63 and coding module 64.
Decoder module 61, for decoding the video file before addition label, obtains video data.
In the embodiment of the present application, by taking H264 encoding and decoding as an example, therefore, the video file before addition label The video file encoded using H264 can be specifically referred to, it is necessary to add label in the video file.
After being decoded to video file, each frame data of video file can be obtained, in order to it is rear Each frame data of continuous label are distinguished, and each frame data obtained after being decoded to video file can To be referred to as video data.
Memory module 62, for storing the macro block information in video data.
Each frame data can include multiple macro block informations, in storage, can be deposited according to different scenes Store up corresponding macro block information.For example, all macro block informations can be stored, or, can only it store The macro block information not taken by label.
Merging module 63, for obtaining label data, and merges video data and label data, obtains New video data.
Wherein it is possible to which being set by user needs to be added to the label substance in video file, then pass through CPU Or GPU computings obtain each frame data of label, each frame data of the label are properly termed as number of tags According to.
After video data and label data is obtained, video data and label data can be merged, with right Each frame is answered, merges each frame data of video file and each frame data of label, obtains new frame Data, the new frame data are properly termed as new video data.
Coding module 64, for being encoded to the new video data, is obtained after addition label Video file, wherein, the coding includes predictive coding, and the predictive coding includes:When label exists When the occupation proportion in frame of video being added to is less than preset value, carried out using the macro block information of storage Predictive coding;Or, the predictive coding includes the macro block circulation encoded successively to different macro blocks Coding, when the macro block of present encoding is the unappropriated macro block of label, is entered using the macro block information of storage Row predictive coding.
It can be encoded after new video data is obtained, so that new video file is obtained, The new video file is exactly to add the video file after label.
It would generally include in coding:Predictive coding, transition coding, quantization and entropy code etc..
In correlation technique, in predictive coding generally using the process of the search of macro block information within the frame/frames, Coding is predicted with the intraframe prediction information or inter prediction information that are obtained according to search.
And in the present embodiment, in some cases, volume is directly predicted using the macro block information of storage Code, it is not necessary to carry out the search of macro block information again.Wherein, certain situation includes:Label is being added When the occupation proportion in frame of video arrived is less than preset value, or, the macro block of present encoding be label not The macro block of occupancy.Wherein, the predictive coding can be grand including what is encoded successively to different macro blocks Whether block loop coding, be the unappropriated macro block of label with the macro block for judging present encoding.
In some embodiments, referring to Fig. 7, the device 60 also includes:
Determining module 65, for determining the occupancy ratio of label in the video frame according to the coordinate information of label Example.
Wherein, label can be set by user, therefore, it can obtain the seat of label from configuration information Mark information.
Occupation proportion refers to the ratio of the macro block number of label occupancy and total macro block number of frame of video.
Macroblock size is typically 16x16, can be counted according to the coordinate information of label and each macroblock size The macro block number of label occupancy is calculated, further according to total macro block number of each frame of video, it may be determined that The occupation proportion of label in the video frame.
Accordingly, the memory module 62 specifically for:
If the occupation proportion be more than preset value, storage video data in not by label take it is grand Block message;
If the occupation proportion is less than or equal to all macro block letters in preset value, storage video data Breath.
Preset value is, for example, 25%.
After occupation proportion and preset value is got, the two values can be compared, to obtain judged result.
After judged result is obtained, unappropriated macro block information or storage are stored according to judged result All macro block informations.
In some embodiments, the predictive coding that the coding module 64 is performed includes:
If the occupation proportion is more than preset value, after macro block loop coding starts, present encoding is judged Macro block whether taken by label;If the macro block of present encoding is not taken by label, using the macro block of storage Information, coding is predicted to new video data.
On the other hand, if the macro block of present encoding is taken by label, frame in and interframe search procedure are passed through New macro block information is calculated, and uses new macro block information, coding is predicted to new video data.
In some embodiments, the predictive coding that the coding module 64 is performed includes:
If the occupation proportion is less than or equal to preset value, after macro block loop coding starts, using depositing The macro block information of storage, coding is predicted to new video data.
The particular content of each module may refer to the associated description in above-described embodiment in the present embodiment, herein not It is described in detail again.
In the present embodiment, by storing macro block information in decoding video file, and in some cases Predictive coding when, coding is predicted using the macro block information of storage, due to the search of macro block information The amount of calculation of process is larger, can expend for a long time, without macro block information search in the present embodiment Directly using the macro block information of storage, processing time can be significantly reduced, so as to lift Consumer's Experience.
It should be noted that in the description of the present application, term " first ", " second " etc. are only used for retouching Purpose is stated, and it is not intended that indicating or implying relative importance.In addition, in the description of the present application, removing Non- to be otherwise noted, the implication of " multiple " refers at least two.
Any process described otherwise above or method description are construed as in flow chart or herein, table Show including it is one or more be used for realize specific logical function or process the step of executable instruction generation Module, fragment or the part of code, and the scope of the preferred embodiment of the application includes other realization, Wherein can not by order that is shown or discussing, including according to involved function by it is basic and meanwhile in the way of Or in the opposite order, carrying out perform function, this should be by embodiments herein those of skill in the art Member is understood.
It should be appreciated that each several part of the application can be realized with hardware, software, firmware or combinations thereof. In the above-described embodiment, multiple steps or method can in memory and by suitable instruction be held with storage The software or firmware that row system is performed are realized.If for example, realized with hardware, and in another embodiment party It is the same in formula, it can be realized with any one of following technology well known in the art or their combination:Have For the discrete logic for the logic gates that logic function is realized to data-signal, with suitable combination The application specific integrated circuit of logic gates, programmable gate array (PGA), field programmable gate array (FPGA) Deng.
Those skilled in the art be appreciated that to realize the whole that above-described embodiment method carries or Part steps can be by program to instruct the hardware of correlation to complete, and described program can be stored in one kind In computer-readable recording medium, the program upon execution, including one of the step of embodiment of the method or its group Close.
In addition, each functional unit in the application each embodiment can be integrated in a processing module, Can also be that unit is individually physically present, can also two or more units be integrated in a module In.Above-mentioned integrated module can both be realized in the form of hardware, it would however also be possible to employ software function module Form is realized.If the integrated module is realized using in the form of software function module and is used as independent product Sale in use, can also be stored in a computer read/write memory medium.
Storage medium mentioned above can be read-only storage, disk or CD etc..
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", The description of " specific example " or " some examples " etc. means to combine that the embodiment or example describe is specific Feature, structure, material or feature are contained at least one embodiment of the application or example.In this theory In bright book, identical embodiment or example are not necessarily referring to the schematic representation of above-mentioned term.Moreover, Specific features, structure, material or the feature of description can be in any one or more embodiments or examples In combine in an appropriate manner.
Although embodiments herein has been shown and described above, it is to be understood that above-described embodiment It is exemplary, it is impossible to be interpreted as the limitation to the application, one of ordinary skill in the art is the application's In the range of above-described embodiment can be changed, change, replace and modification.

Claims (10)

1. add tagged method in a kind of video file, it is characterised in that including:
Video file before decoding addition label, obtains video data;
Store the macro block information in video data;
Label data is obtained, and merges video data and label data, new video data is obtained;
The new video data is encoded, obtains adding the video file after label, wherein, The coding includes predictive coding, and the predictive coding includes:When label is in the frame of video being added to When the macro block that interior occupation proportion is less than preset value or present encoding is label unappropriated macro block, adopt Coding is predicted with the macro block information of storage.
2. according to the method described in claim 1, it is characterised in that also include:
The occupation proportion of label in the video frame is determined according to the coordinate information of label.
3. method according to claim 2, it is characterised in that grand in the storage video data Block message, including:
If the occupation proportion be more than preset value, storage video data in not by label take it is grand Block message;
If the occupation proportion is less than or equal to all macro block letters in preset value, storage video data Breath.
4. method according to claim 2, it is characterised in that if the occupation proportion is more than in advance If value, the predictive coding, including:
After macro block loop coding starts, judge whether the macro block of present encoding is taken by label;
If the macro block of present encoding is not taken by label, using the macro block information of storage, to new video counts According to being predicted coding.
5. method according to claim 4, it is characterised in that also include:
If the macro block of present encoding is taken by label, newly grand is calculated by frame in and interframe search procedure Block message, and new macro block information is used, coding is predicted to new video data.
6. method according to claim 2, it is characterised in that if the occupation proportion be less than or Equal to preset value, the predictive coding, including:
After macro block loop coding starts, using the macro block information of storage, new video data is predicted Coding.
7. add tagged device in a kind of video file, it is characterised in that including:
Decoder module, for decoding the video file before addition label, obtains video data;
Memory module, for storing the macro block information in video data;
Merging module, for obtaining label data, and merges video data and label data, obtains new Video data;
Coding module, for encoding the new video data, obtains adding the video after label File, wherein, the coding includes predictive coding, and the predictive coding includes:When label is being added It is that label is vacant that the occupation proportion in frame of video being added to, which is less than preset value or the macro block of present encoding, Macro block when, coding is predicted using the macro block information of storage.
8. device according to claim 7, it is characterised in that also include:
Determining module, for determining the occupation proportion of label in the video frame according to the coordinate information of label.
9. device according to claim 8, it is characterised in that the memory module specifically for:
If the occupation proportion be more than preset value, storage video data in not by label take it is grand Block message;
If the occupation proportion is less than or equal to all macro block letters in preset value, storage video data Breath.
10. device according to claim 8, it is characterised in that what the coding module was performed Predictive coding includes:
If the occupation proportion is more than preset value, after macro block loop coding starts, present encoding is judged Macro block whether taken by label;If the macro block of present encoding is not taken by label, using the macro block of storage Information, coding is predicted to new video data;
If the occupation proportion is less than or equal to preset value, after macro block loop coding starts, using depositing The macro block information of storage, coding is predicted to new video data.
CN201610099403.5A 2016-02-23 2016-02-23 Method and device for adding label in video file Active CN107105255B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610099403.5A CN107105255B (en) 2016-02-23 2016-02-23 Method and device for adding label in video file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610099403.5A CN107105255B (en) 2016-02-23 2016-02-23 Method and device for adding label in video file

Publications (2)

Publication Number Publication Date
CN107105255A true CN107105255A (en) 2017-08-29
CN107105255B CN107105255B (en) 2020-03-03

Family

ID=59658372

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610099403.5A Active CN107105255B (en) 2016-02-23 2016-02-23 Method and device for adding label in video file

Country Status (1)

Country Link
CN (1) CN107105255B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108769781A (en) * 2018-06-14 2018-11-06 视云融聚(广州)科技有限公司 A kind of video tab localization method
CN108769828A (en) * 2018-05-23 2018-11-06 深圳市网心科技有限公司 Picture watermark adding method, electronic device and computer readable storage medium
CN111654749A (en) * 2020-06-24 2020-09-11 百度在线网络技术(北京)有限公司 Video data production method and device, electronic equipment and computer readable medium
CN113014926A (en) * 2021-04-30 2021-06-22 北京汇钧科技有限公司 Video transcoding method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1419786A (en) * 2001-01-23 2003-05-21 皇家菲利浦电子有限公司 Watermarking a compressed niformation signal
CN101014125A (en) * 2006-02-02 2007-08-08 三星电子株式会社 Method of and apparatus for deciding intraprediction mode
CN101681499A (en) * 2007-06-14 2010-03-24 汤姆逊许可证公司 modifying a coded bitstream
KR20120045132A (en) * 2010-10-29 2012-05-09 에스케이플래닛 주식회사 Apparatus and method for encoding video
CN103329537A (en) * 2011-01-21 2013-09-25 Sk电信有限公司 Apparatus and method for generating/recovering motion information based on predictive motion vector index encoding, and apparatus and method for image encoding/decoding using same

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1419786A (en) * 2001-01-23 2003-05-21 皇家菲利浦电子有限公司 Watermarking a compressed niformation signal
CN101014125A (en) * 2006-02-02 2007-08-08 三星电子株式会社 Method of and apparatus for deciding intraprediction mode
CN101681499A (en) * 2007-06-14 2010-03-24 汤姆逊许可证公司 modifying a coded bitstream
KR20120045132A (en) * 2010-10-29 2012-05-09 에스케이플래닛 주식회사 Apparatus and method for encoding video
CN103329537A (en) * 2011-01-21 2013-09-25 Sk电信有限公司 Apparatus and method for generating/recovering motion information based on predictive motion vector index encoding, and apparatus and method for image encoding/decoding using same

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108769828A (en) * 2018-05-23 2018-11-06 深圳市网心科技有限公司 Picture watermark adding method, electronic device and computer readable storage medium
CN108769781A (en) * 2018-06-14 2018-11-06 视云融聚(广州)科技有限公司 A kind of video tab localization method
WO2019237752A1 (en) * 2018-06-14 2019-12-19 视云融聚(广州)科技有限公司 Video tag locating method
CN111654749A (en) * 2020-06-24 2020-09-11 百度在线网络技术(北京)有限公司 Video data production method and device, electronic equipment and computer readable medium
CN113014926A (en) * 2021-04-30 2021-06-22 北京汇钧科技有限公司 Video transcoding method and device, electronic equipment and storage medium
CN113014926B (en) * 2021-04-30 2023-04-07 北京汇钧科技有限公司 Video transcoding method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN107105255B (en) 2020-03-03

Similar Documents

Publication Publication Date Title
CN107155107B (en) Method for video coding and device, video encoding/decoding method and device
CN103314593B (en) The Video coding of Fault recovery improvement and decoding
CN102576411B (en) Scene change detection
CN110166771B (en) Video encoding method, video encoding device, computer equipment and storage medium
CN109688407B (en) Reference block selection method and device for coding unit, electronic equipment and storage medium
CN107105255A (en) Add tagged method and apparatus in video file
CN102239693A (en) Moving picture decoding method and moving picture encoding method
GB2492778A (en) Motion compensated image coding by combining motion information predictors
CN104869403B (en) A kind of shot segmentation method based on X264 compression videos
CN110383838A (en) Transformation limitation based on block size
CN109194955B (en) Scene switching detection method and system
CN105898308A (en) Resolution-variable coding mode prediction method and device
CN108769828A (en) Picture watermark adding method, electronic device and computer readable storage medium
US20230276063A1 (en) Npu for encoding or decoding videostream format for machine analisys
CA2689441C (en) A system and method for time optimized encoding
WO2020227911A1 (en) Method for accelerating coding/decoding of hevc video sequence
KR20070026360A (en) Method for compressing/decompressing video information
TW202310628A (en) Video coding method and apparatus thereof
Moon et al. Boundary block-merging (BBM) technique for efficient texture coding of arbitrarily shaped object
TWI847224B (en) Video coding method and apparatus thereof
US11831887B1 (en) Scalable video coding for machine
CN113573067B (en) Video coding method and device
US11743477B1 (en) Video-stream format for machine analysis using NPU
US20200068214A1 (en) Motion estimation using pixel activity metrics
TW202339504A (en) Geometric partitioning mode and merge candidate reordering

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 1240001

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant
REG Reference to a national code

Ref country code: HK

Ref legal event code: WD

Ref document number: 1240001

Country of ref document: HK