CN109120929B - Video encoding method, video decoding method, video encoding device, video decoding device, electronic equipment and video encoding system - Google Patents

Video encoding method, video decoding method, video encoding device, video decoding device, electronic equipment and video encoding system Download PDF

Info

Publication number
CN109120929B
CN109120929B CN201811216417.6A CN201811216417A CN109120929B CN 109120929 B CN109120929 B CN 109120929B CN 201811216417 A CN201811216417 A CN 201811216417A CN 109120929 B CN109120929 B CN 109120929B
Authority
CN
China
Prior art keywords
frame
target frame
video
frames
target
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.)
Active
Application number
CN201811216417.6A
Other languages
Chinese (zh)
Other versions
CN109120929A (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.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information Technology Co 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 Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN201811216417.6A priority Critical patent/CN109120929B/en
Publication of CN109120929A publication Critical patent/CN109120929A/en
Application granted granted Critical
Publication of CN109120929B publication Critical patent/CN109120929B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/172Methods 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 picture, frame or field
    • 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/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/124Quantisation
    • 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/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/625Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding using discrete cosine transform [DCT]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/91Entropy coding, e.g. variable length coding [VLC] or arithmetic coding

Landscapes

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

Abstract

The application relates to a video encoding method, a video decoding method, a video encoding device, a video decoding device, an electronic device and a video encoding system. The video decoding method includes: in the process of coding a video, aiming at a target frame to be coded, if continuous N frames after the target frame is detected are the same as the target frame, carrying out preset frame level coding on the target frame and the continuous N frames; wherein, the N is greater than or equal to 1, and the frame-level coding is: performing block-level coding on the target frame and one frame in the continuous N frames, and performing frame-level quantity statement on the repeated frames corresponding to the target frame; and after the frame-level coding is finished, taking a first video frame which is different from the target frame and is subsequent to the target frame as a next target frame to be coded. Therefore, by the scheme, the coding efficiency in the coding process can be improved on the premise of ensuring the coding quality.

Description

Video encoding method, video decoding method, video encoding device, video decoding device, electronic equipment and video encoding system
Technical Field
The present application relates to the field of video processing, and in particular, to a method, an apparatus, an electronic device, and a system for video encoding and decoding.
Background
Digital video technology is widely applied to the fields of communication, computers, broadcast television and the like, and the generation of video coding technology is promoted because video is composed of a series of video frames, each video frame is usually a complete image, and the same or similar content exists in the same image or adjacent images.
Currently, video coding includes block-level coding for video, the principle of so-called block-level coding being: dividing a target frame to be coded into data blocks, and then coding sequentially from left to right and from top to bottom.
In the related art, in the block-level encoding of video, block-level encoding is performed for each frame. However, since some consecutive video frames may be identical, block-level encoding of each frame clearly results in less efficient encoding.
Disclosure of Invention
In order to overcome the problems in the related art, the present application provides a video encoding method, a video decoding method, a video encoding device, a video decoding device, an electronic apparatus, and a video encoding system, so as to improve the encoding efficiency in the encoding process and improve the decoding rate in the decoding process on the premise of ensuring the encoding quality. The specific technical scheme is as follows:
according to a first aspect of embodiments of the present application, there is provided a video encoding method, including:
in the process of coding a video, aiming at a target frame to be coded, if continuous N frames after the target frame is detected are the same as the target frame, carrying out preset frame level coding on the target frame and the continuous N frames; wherein, the N is greater than or equal to 1, and the frame-level coding is: performing block-level coding on the target frame and one frame in the continuous N frames, and performing frame-level quantity statement on the repeated frames corresponding to the target frame;
and after the frame-level coding is finished, taking a first video frame which is different from the target frame and is subsequent to the target frame as a next target frame to be coded.
Optionally, the video encoding method further includes:
for a target frame to be coded, if the next frame of the target frame is detected to be different from the target frame, carrying out block-level coding on the target frame;
and after the block-level coding of the target frame is finished, taking the next frame of the target frame as the next target frame to be coded.
Optionally, the method for declaring the number of frame levels of the repeated frames corresponding to the target frame includes:
and declaring the number of the repeated frames corresponding to the target frame in a frame header.
Optionally, the step of performing preset frame-level coding on the target frame and consecutive N frames includes:
adding first declaration information in a frame header of the target frame and one of the continuous N frames, and performing block-level coding on the frame to which the first declaration information is added;
wherein the first declaration information is to declare: with respect to the video frame to which the first declaration information is added, there are N repeated frames.
Optionally, for one of the target frame and consecutive N frames, adding first declaration information in a header of the frame, including:
adding first statement information in a frame header of the target frame;
alternatively, the first and second electrodes may be,
and adding first declaration information in the last frame of the continuous N frames.
Optionally, the step of performing preset frame-level coding on the target frame and consecutive N frames includes:
performing block-level encoding on the target frame;
adding second plaintext information in a header of a first video frame subsequent to the target frame and different from the target frame;
wherein the second declaration information is to declare: there are N repeated frames with respect to the last encoded video frame of the video frame to which the second luma information is added.
According to a second aspect of embodiments of the present application, there is provided a video decoding method, including:
in the process of decoding the video, restoring the target frame based on the coding information of the coded target frame; the video is coded according to a video coding method provided by the application;
and if the number of the repeated frames is declared in the target frame, recovering the repeated frames.
Optionally, if it is detected that the number of repeated frames is declared in the target frame, recovering the repeated frames includes:
and if the number of the repeated frames is declared in the frame header of the target frame, recovering the repeated frames.
Optionally, if it is detected that the number of the repeated frames is declared in the header of the target frame, recovering the repeated frames includes:
if detecting that first statement information exists in a frame header of the target frame, adding N target frames after/before the target frame;
the first declaration information is to declare: with respect to the video frame to which the first declaration information is added, there are N repeated frames.
Optionally, if it is detected that the number of the repeated frames is declared in the header of the target frame, recovering the repeated frames includes:
if the second declaration information exists in the frame header of the target frame, adding the last video frame of the N target frames between the target frame and the last video frame of the target frame;
the second declaration information is to declare: there are N repeated frames with respect to the last encoded video frame of the video frame to which the second luma information is added.
According to a third aspect of embodiments of the present application, there is provided a video encoding apparatus comprising:
the video coding device comprises a first coding unit, a second coding unit and a third coding unit, wherein the first coding unit is configured to perform preset frame level coding on a target frame to be coded in the process of coding a video, and if N continuous frames after the target frame is detected are the same as the target frame; wherein, the N is greater than or equal to 1, and the frame-level coding is: performing block-level coding on the target frame and one frame in the continuous N frames, and performing frame-level quantity statement on the repeated frames corresponding to the target frame;
and the determining unit is configured to take a first video frame which is different from the target frame and is subsequent to the target frame as a next target frame to be coded after the frame-level coding is performed.
Optionally, the video encoding apparatus further includes:
a second encoding unit configured to, for a target frame to be encoded, perform block-level encoding on the target frame if it is detected that a next frame of the target frame is different from the target frame;
the determining unit is further configured to, after performing block-level encoding on the target frame, take a next frame of the target frame as a next target frame to be encoded.
Optionally, the manner of declaring the number of frame levels of the repeated frames corresponding to the target frame by the first encoding unit includes:
and declaring the number of the repeated frames corresponding to the target frame in a frame header.
Optionally, the first encoding unit includes:
a first adding module, configured to add, for a target frame to be encoded, first declaration information in a header of a frame of the target frame and consecutive N frames if consecutive N frames after the target frame is detected are the same as the target frame;
a first encoding module configured to perform block-level encoding on the frame to which the first declaration information is added;
wherein the first declaration information is to declare: with respect to the video frame to which the first declaration information is added, there are N repeated frames.
Optionally, the first adding module is specifically configured to:
for a target frame to be coded, if N consecutive frames after the target frame is detected are the same as the target frame, adding first declaration information in a frame header of the target frame, or adding first declaration information in a last frame of the N consecutive frames.
Optionally, the first encoding unit includes:
a second encoding module configured to, for a target frame to be encoded, perform block-level encoding on the target frame if N consecutive frames after the target frame is detected to be the same as the target frame;
a second adding module configured to add second plaintext information in a header of a first video frame subsequent to the target frame and different from the target frame;
wherein the second declaration information is to declare: there are N repeated frames with respect to the last encoded video frame of the video frame to which the second luma information is added.
According to a fourth aspect of embodiments of the present application, there is provided a video decoding apparatus comprising:
a decoding unit configured to restore an encoded target frame based on encoding information of the encoded target frame in a process of decoding a video; wherein the video is encoded according to a video encoding method;
a recovery unit configured to recover the repeated frames if the number of the repeated frames declared in the target frame is detected.
Optionally, the recovery unit includes:
a recovery module configured to recover the repeated frames if the number of the repeated frames declared in the header of the target frame is detected.
Optionally, the recovery module is specifically configured to:
if detecting that first statement information exists in a frame header of the target frame, adding N target frames after/before the target frame;
the first declaration information is to declare: with respect to the video frame to which the first declaration information is added, there are N repeated frames.
Optionally, the recovery module is specifically configured to:
if the second declaration information exists in the frame header of the target frame, adding the last video frame of the N target frames between the target frame and the last video frame of the target frame;
the second declaration information is to declare: there are N repeated frames with respect to the last encoded video frame of the video frame to which the second luma information is added.
According to a fifth aspect of the embodiments of the present application, there is provided a video coding and decoding system, including:
the first electronic device is used for carrying out preset frame level coding on a target frame and N continuous frames if N continuous frames after the target frame is detected are the same as the target frame aiming at the target frame to be coded in the process of coding a video; wherein, the N is greater than or equal to 1, and the frame-level coding is: performing block-level coding on the target frame and one frame in the continuous N frames, and performing frame-level quantity statement on the repeated frames corresponding to the target frame; after the frame-level coding is finished, taking a first video frame which is after the target frame and is different from the target frame as a next target frame to be coded;
the second electronic equipment is used for restoring the target frame based on the coding information of the coded target frame in the process of decoding the video; and if the number of the repeated frames is declared in the target frame, recovering the repeated frames.
According to a sixth aspect of embodiments of the present application, there is provided an electronic apparatus, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to: when the executable instructions stored in the memory are executed, the steps of the video coding method provided by the application are realized.
According to a seventh aspect of embodiments of the present application, there is provided an electronic apparatus, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to: when the executable instructions stored in the memory are executed, the steps of the video decoding method provided by the application are realized.
According to an eighth aspect of embodiments herein, there is provided a non-transitory computer readable storage medium, wherein instructions, when executed by a processor of an electronic device, enable the electronic device to perform the steps of a video encoding method provided herein.
According to a ninth aspect of embodiments herein, there is provided a non-transitory computer readable storage medium, wherein instructions, when executed by a processor of an electronic device, enable the electronic device to perform the steps of a video decoding method provided herein.
According to a tenth aspect of embodiments herein, there is provided a computer program for being executed to perform the steps of a video encoding method as provided herein.
According to an eleventh aspect of embodiments herein, there is provided a computer program for being executed to perform the steps of a video decoding method provided herein.
According to the video coding method, in the process of coding a video, aiming at a target frame to be coded, if continuous N frames after the target frame to be coded is detected to be the same as the target frame, preset frame-level coding is carried out on the target frame and the continuous N frames, namely block-level coding is carried out on one of the target frame and the continuous N frames, and frame-level quantity statement is carried out on a repeated frame corresponding to the target frame; after the frame-level encoding is completed, the first video frame after the target frame and different from the target frame is used as the next target frame to be encoded. Therefore, according to the scheme, only one frame of the at least two continuous frames with consistent content is subjected to block-level coding, and the number of the repeated frames is declared at the same time, so that the block-level coding of the repeated frames is avoided, and the coding efficiency in the coding process can be improved on the premise of ensuring the coding quality.
In the video decoding method provided by the present application based on the above video encoding method, in the process of decoding a video, the target frame is restored based on the encoded information of the encoded target frame; if the number of the repeated frames declared in the target frame is detected, the repeated frames are recovered. Therefore, by the video decoding method, decoding corresponding to block-level coding on the repeated frames is avoided, and therefore, the decoding efficiency in the decoding process can be improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
FIG. 1 is a flow diagram illustrating a method of video encoding in accordance with an exemplary embodiment;
FIG. 2 is a flow diagram illustrating a method of video decoding in accordance with an exemplary embodiment;
FIG. 3 is a schematic diagram of a plurality of consecutive video frames shown in the present application;
FIG. 4 is a block diagram illustrating a video encoding apparatus according to an example embodiment;
fig. 5 is a block diagram illustrating a video decoding apparatus according to an example embodiment;
FIG. 6 is a block diagram illustrating a video codec system according to an example embodiment
FIG. 7 is a block diagram illustrating an electronic device in accordance with an exemplary embodiment;
FIG. 8 is a block diagram illustrating another electronic device in accordance with an exemplary embodiment;
fig. 9 is a block diagram illustrating an apparatus for video encoding/decoding according to an example embodiment;
fig. 10 is a block diagram illustrating another apparatus for video encoding/decoding according to an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
In order to solve the problems in the prior art, embodiments of the present application provide a video encoding method, a video decoding method, an apparatus, an electronic device, and a system.
First, a video encoding method provided in an embodiment of the present application is described below.
It should be noted that, a video encoding method provided by the present application may be applied to an electronic device. In a specific application, the electronic device may be a terminal device or a server. In addition, a video targeted by the video encoding method provided by the present application may be any video to be encoded, and the source, content, and the like of the video to be encoded are not limited in the present application.
Fig. 1 is a flow chart illustrating a method of video encoding according to an example embodiment. As shown in fig. 1, a video encoding method provided in an exemplary embodiment of the present application may include the following steps:
s101, in the process of coding a video, aiming at a target frame to be coded, if continuous N frames after the target frame is detected are the same as the target frame, carrying out preset frame level coding on the target frame and the continuous N frames;
where N is greater than or equal to 1, the frame-level encoding is: and carrying out block-level coding on the target frame and one frame in the continuous N frames, and carrying out frame-level quantity statement on the quantity of the repeated frames corresponding to the target frame.
In the process of encoding video, each video frame may be encoded in sequence according to the arrangement order of the video frames. It can be understood that the first target frame to be encoded by using the encoding method provided in this embodiment may be the first frame of the video. Of course, the first target frame to be encoded, which is encoded by using the encoding method provided in this embodiment, is not limited to the first frame of the video, for example: according to a predetermined encoding requirement, a first frame of a plurality of video frames of a certain period of the video can be used as a first video frame to be encoded by using the encoding method provided by the embodiment.
In this embodiment, for a target frame to be encoded, block-level encoding is not directly performed on the target frame, but whether consecutive N frames that are the same as the target frame exist after the target frame is detected, where the consecutive N frames include a next frame of the target frame. And if the continuous N frames after the target frame is detected to be the same as the target frame, performing preset frame-level coding on the target frame and the continuous N frames. For example: as shown in fig. 3, assuming that there are 5 video frames F1-F5, if the target frame is F1, F2-F4 are the same as the target frame, and F5 is different from the target frame, the consecutive N frames are: F2-F4, F5 is the first video frame after the target frame, which is different from the target frame, then the preset frame-level coding is performed on the F1 and F2-F4.
Specifically, in order to detect whether the target frame is the same as the consecutive N frames, it may be determined whether the target frame is the same as a next frame of the target frame, and if so, it may be continuously determined whether a next frame after the next frame is the same as the target frame until a video frame different from the first frame is found, and at this time, the number of repeated frames corresponding to the target frame, that is, the number of consecutive N frames may be obtained. It can be understood that if the target frame is not the same as the next frame of the target frame, the detection is stopped, and it is determined that the next frame of the target frame is not the same as the target frame, and the condition that N consecutive frames after the target frame are the same as the target frame is not met. For example: referring to fig. 3, assuming that there are 5 video frames F1-F5 and F1-F4 are the same video frame, if the target frame is F1, in order to detect whether the target frame is the same as consecutive N frames, first, it is determined whether F1 is the same as F2, if the determination result is the same, it is continuously determined whether F1 is the same as F3, if the determination result is the same, it is determined whether F1 is the same as F4, and if the determination result is the same, it is continuously determined whether F1 is the same as F5, and if the determination result is different, then, the consecutive 3 frames F1 is the same as F2-F4, and F5 is the first video frame different from F1.
It is understood that there are various ways to determine whether any two frames are the same, for example: the similarity of the two frames can be calculated, and whether the two frames are the same or not can be judged based on the similarity; alternatively, the two frames may be subtracted, and whether the two frames are the same may be determined based on the subtraction result. Any mode capable of judging whether the two frames are the same can be applied to the method, and what type is specifically adopted can be set according to the actual situation, and the method is not limited in the method.
In addition, optionally, the manner of declaring the number of frame levels of the repeated frames corresponding to the target frame may include: the method of declaring the number of the repeated frames corresponding to the target frame in the frame header is not limited to this. And, what is called, declare quantity in frame header, that is, add new semantics in frame header, the new semantics is used for representing declaration information, and the new semantics can adopt binary coding content.
It should be noted that, based on the way of declaring the number of the repeated frames corresponding to the target frame in the frame header, there are various specific implementation ways for performing preset frame-level coding on the target frame and consecutive N frames, and for clarity of layout and clear solution, detailed descriptions will be subsequently provided for the specific implementation ways for performing preset frame-level coding on the target frame and consecutive N frames.
S102, after the frame-level encoding is completed, taking a first video frame after the target frame and different from the target frame as a next target frame to be encoded.
Since the encoding quality of the target frame and the consecutive N frames is guaranteed by encoding only one frame while declaring the number of the repeated frames, that is, each frame equivalent to the target frame and the consecutive N frames is encoded, after the frame-level encoding is completed, the first video frame after the target frame and different from the target frame can be used as the next target frame to be encoded, and then the step of S101 is executed again. Therefore, each group of video frames with the same content in the video can be subjected to frame-level coding, so that the coding data amount is greatly reduced, and the coding efficiency is improved.
In addition, it should be noted that, for a target frame to be encoded, if it is detected that a next frame of the target frame is different from the target frame, block-level encoding may be performed on the target frame; after the block-level encoding of the target frame is completed, the next frame of the target frame is used as the next target frame to be encoded, and the process returns to S101.
It should be emphasized that the specific implementation of the block-level coding mentioned in this embodiment is the same as the block-level coding in the prior art, and the present application is not limited thereto. As an example, the process of block-level coding may be: for any data block to be coded, a prediction block corresponding to the data block to be coded is acquired from a reference frame, then the data block to be coded and the prediction block are subtracted to obtain a residual error, a Discrete Cosine Transform (DCT) Transform is performed on the residual error to obtain a DCT coefficient matrix, the DCT coefficient matrix is subjected to one-time quantization, and finally the DCT coefficient matrix obtained through quantization, a motion vector between the data block to be coded and the prediction block and the like are input into an entropy coder to be coded.
According to the video coding method, in the process of coding a video, aiming at a target frame to be coded, if continuous N frames after the target frame to be coded is detected to be the same as the target frame, preset frame-level coding is carried out on the target frame and the continuous N frames, namely block-level coding is carried out on one of the target frame and the continuous N frames, and frame-level quantity statement is carried out on a repeated frame corresponding to the target frame; after the frame-level encoding is completed, the first video frame after the target frame and different from the target frame is used as the next target frame to be encoded. Therefore, according to the scheme, for at least two continuous frames with consistent content, only one frame of the at least two frames is subjected to block-level coding, and the number of the repeated frames is declared at the same time, so that the block-level coding of the repeated frames is avoided, and the coding efficiency in the coding process can be improved on the premise of ensuring the coding quality.
Based on the way of declaring the number of the repeated frames corresponding to the target frame in the frame header, there are various specific implementation ways for performing preset frame-level coding on the target frame and consecutive N frames, and the following description is given by combining the two specific implementation ways.
Optionally, in an implementation, the step of performing preset frame-level coding on the target frame and the consecutive N frames may include:
adding first declaration information in a frame header of the frame aiming at the target frame and one frame in the continuous N frames, and carrying out block-level coding on the frame added with the first declaration information;
wherein the first declaration information is to declare: with respect to the video frame to which the first declaration information is added, there are N repeated frames.
In this implementation, the first declaration information may be added in a header of any one of the target frame and consecutive N frames. It is understood that the first declaration information may be binary coded content, and the binary coded content represents the following meaning: with respect to the video frame to which the first declaration information is added, there are N repeated frames. The specific binary code content corresponding to the first declaration information is not limited in application.
In a specific application, in order to add convenience, for one of the target frame and the consecutive N frames, adding the first declaration information in the header of the frame may include:
adding first declaration information in a frame header of the target frame; alternatively, the first declaration information is added in the last frame of the consecutive N frames.
For example, referring to fig. 3, assuming that there are 5 video frames F1-F5, and F1-F4 are the same video frames, if the target frame is F1, the target frame is the same as the consecutive 3 frames, at this time, first declaration information may be added in the frame header of F1, thereby completing frame-level encoding for F1 and F2-F4, the first declaration information indicating that there are 3 repeated frames for F1; when the repeated frames are recovered subsequently, 3F 1 may be added after F1 after F1 is decoded. As another example, referring to fig. 3, assuming that there are 5 video frames F1-F5, and F1-F4 are the same video frames, if the target frame is F1, the target frame is the same as the consecutive 3 frames, at this time, first declaration information may be added in the frame header of F4, thereby completing frame-level coding for F1 and F2-F4, the first declaration information indicating that there are 3 repeated frames for the F4; when the repeated frames are recovered, 3F 4 are added before F4 after F4 is obtained by decoding.
Optionally, in another implementation, the step of performing preset frame-level coding on the target frame and consecutive N frames may include:
performing block-level encoding on the target frame;
adding second plaintext information in a header of a first video frame which is subsequent to the target frame and different from the target frame;
wherein the second declaration information is to declare: there are N repeated frames with respect to the last encoded video frame of the video frame to which the second luma information is added.
It is to be understood that the second plaintext information may be binary encoded content, and the binary encoded content represents the following meaning: there are N repeated frames with respect to the last encoded video frame of the video frame to which the second luma information is added. The specific binary coded content corresponding to the second plaintext information is not limited in application.
For example, referring to fig. 3, assuming that there are 5 video frames F1-F5, F1-F4 are the same video frames, and F5 is different from F1, if the target frame is F1, the target frame is the same as the consecutive 3 frames, at this time, second luma information may be added in the frame header of F5, thereby completing frame-level coding for F1 and F2-F4, the second luma information indicating that there are 3 repeated frames F1 before F5; when the subsequent repeated frames are recovered, 3F 1 are added before F5 after F1 and F5 are obtained by decoding.
It is emphasized that the specific implementation of the above-mentioned frame-level coding for presetting the target frame and consecutive N frames is only an example and should not be construed as a limitation of the present application.
Corresponding to the video coding method, the embodiment of the application also provides a video decoding method.
It should be noted that, a video decoding method provided by the present application may be applied to an electronic device. In a specific application, the electronic device may be a terminal device or a server. In addition, a video targeted by the video decoding method provided by the present application may be any video to be encoded, and the source, content, and the like of the video to be encoded are not limited in the present application.
Fig. 2 is a flowchart illustrating a video decoding method according to an exemplary embodiment, where the video decoding method is a decoding method corresponding to the video encoding method described above. As shown in fig. 2, a video decoding method provided in an exemplary embodiment of the present application may include the following steps:
s201, in the process of decoding the video, restoring the target frame based on the coded information of the coded target frame;
the video is encoded according to the video encoding method provided in the above embodiment.
For an encoded target frame, the target frame may be restored based on encoding information of the encoded target frame. It should be noted that the specific implementation manner of restoring the target frame based on the coding information is the same as the restoration manner corresponding to the block-level coding in the prior art, and is not described herein again.
S202, if the number of the repeated frames is detected to be declared in the target frame, the repeated frames are recovered.
After restoring the target frame, whether the number of the repeated frames is declared in the target frame or not can be detected, and if the number of the repeated frames is declared in the target frame, the repeated frames can be recovered. It should be noted that, when a target frame is restored, the detection of the number statement and the recovery of the repeated frames can be executed; of course, after a plurality of target frames are restored, the number of the target frames can be detected and the repeated frames can be restored respectively.
In response to the foregoing manner of declaring the number of repeated frames in the frame header, if it is detected that the number of repeated frames is declared in the target frame, the recovering the repeated frames may include:
and if the number of the repeated frames is declared in the frame header of the target frame, recovering the repeated frames.
Optionally, in response to the above manner of declaring the number in one frame of the target frame and the consecutive N frames, if the number of repeated frames declared in the header of the target frame is detected, recovering the repeated frames may include:
if detecting that the first declaration information exists in the frame header of the target frame, adding N target frames after/before the target frame;
the first declaration information is for declaring: with respect to the video frame to which the first declaration information is added, there are N repeated frames.
For example: still taking fig. 3 as an example, assuming that the first declaration information is added to the frame header of F1, the repeated frame is recovered as: 3F 1 additions after F1; assuming that the first declaration information is added to the frame header of F4, the repeated frame is restored as follows: 3F 4 were added before F4.
Optionally, in response to the above manner of declaring the number in the first different video frame after the target frame, if the number of repeated frames declared in the header of the target frame is detected, recovering the repeated frames may include:
if the second declaration information exists in the frame header of the target frame, adding N previous video frames of the target frame between the target frame and the previous video frame of the target frame;
the second declaration information is used to declare: there are N repeated frames with respect to the last encoded video frame of the video frame to which the second luma information is added.
For example: still taking fig. 3 as an example, assuming that the second plaintext information is added to the frame header of F5, the repeated frame is recovered as: after decoding to F1 and F5, 3F 1 were added between F1 and F5.
In the video decoding method provided by the present application based on the above video encoding method, in the process of decoding a video, the target frame is restored based on the encoded information of the encoded target frame; if the number of the repeated frames declared in the target frame is detected, the repeated frames are recovered. Therefore, by the video decoding method, decoding corresponding to block-level coding on the repeated frames is avoided, and therefore, the decoding efficiency in the decoding process can be improved.
Corresponding to the video coding method, the embodiment of the application also provides a video coding device. Fig. 4 is a block diagram illustrating a video encoding apparatus according to an example embodiment. Referring to fig. 4, an exemplary embodiment of the present application provides a video encoding apparatus including: a first encoding unit 410 and a second determining unit 420.
The first encoding unit 410 is configured to, in a process of encoding a video, perform, for a target frame to be encoded, preset frame-level encoding on the target frame and N consecutive frames if N consecutive frames after the target frame is detected are the same as the target frame; wherein, the N is greater than or equal to 1, and the frame-level coding is: and performing block-level coding on the target frame and one frame in the continuous N frames, and performing frame-level quantity statement on the repeated frames corresponding to the target frame.
The determining unit 420 is configured to, after the frame-level encoding is performed, use a first video frame, which is subsequent to the target frame and is different from the target frame, as a next target frame to be encoded.
According to the video coding device, in the process of coding a video, for a target frame to be coded, if a continuous N frame after the target frame to be coded is detected to be the same as the target frame, preset frame-level coding is performed on the target frame and the continuous N frame, namely block-level coding is performed on one of the target frame and the continuous N frame, and the number of frame levels of a repeated frame corresponding to the target frame is declared; after the frame-level encoding is completed, the first video frame after the target frame and different from the target frame is used as the next target frame to be encoded. Therefore, according to the scheme, for at least two continuous frames with consistent content, only one frame of the at least two frames is subjected to block-level coding, and the number of the repeated frames is declared at the same time, so that the block-level coding of the repeated frames is avoided, and the coding efficiency in the coding process can be improved on the premise of ensuring the coding quality.
Optionally, on the basis of including the first encoding unit 410 and the determining unit 420, the video encoding apparatus further includes:
a second encoding unit configured to, for a target frame to be encoded, perform block-level encoding on the target frame if it is detected that a next frame of the target frame is different from the target frame;
the determining unit 420 is further configured to, after performing the block-level encoding on the target frame, use a next frame of the target frame as a next target frame to be encoded.
Optionally, in an implementation manner, the manner in which the first encoding unit 410 declares the number of frame levels of the repeated frames corresponding to the target frame includes:
and declaring the number of the repeated frames corresponding to the target frame in a frame header.
Optionally, in an implementation manner, the first encoding unit 410 includes:
a first adding module, configured to add, for a target frame to be encoded, first declaration information in a header of a frame of the target frame and consecutive N frames if consecutive N frames after the target frame is detected are the same as the target frame;
a first encoding module configured to perform block-level encoding on the frame to which the first declaration information is added;
wherein the first declaration information is to declare: with respect to the video frame to which the first declaration information is added, there are N repeated frames.
Optionally, the first adding module is specifically configured to:
for a target frame to be coded, if N consecutive frames after the target frame is detected are the same as the target frame, adding first declaration information in a frame header of the target frame, or adding first declaration information in a last frame of the N consecutive frames.
Optionally, in another implementation manner, the first encoding unit 410 includes:
a second encoding module configured to, for a target frame to be encoded, perform block-level encoding on the target frame if N consecutive frames after the target frame is detected to be the same as the target frame;
a second adding module configured to add second plaintext information in a header of a first video frame subsequent to the target frame and different from the target frame;
wherein the second declaration information is to declare: there are N repeated frames with respect to the last encoded video frame of the video frame to which the second luma information is added.
With regard to the apparatus in the above-described embodiment, the specific manner in which each unit/module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated herein.
Corresponding to the video decoding method, the embodiment of the application also provides a video decoding device. Fig. 5 is a block diagram illustrating a video decoding apparatus according to an example embodiment. Referring to fig. 5, an exemplary embodiment of the present application provides a video decoding apparatus including: a decoding unit 510 and a recovery unit 520.
The decoding unit 510 is configured to restore the target frame based on the encoding information of the encoded target frame in the process of decoding the video; the video is coded according to the video coding method provided by the application.
A recovery unit 520 configured to recover the repeated frames if the number of repeated frames declared in the target frame is detected.
According to the video decoding device, in the process of decoding a video, a target frame is restored based on the coding information of the coded target frame; if the number of the repeated frames declared in the target frame is detected, the repeated frames are recovered. Therefore, by the video decoding method, decoding corresponding to block-level coding on the repeated frames is avoided, and therefore, the decoding efficiency in the decoding process can be improved.
Optionally, the recovery unit 520 includes:
a recovery module configured to recover the repeated frames if the number of the repeated frames declared in the header of the target frame is detected.
Optionally, in an implementation, the recovery module is specifically configured to:
if detecting that first statement information exists in a frame header of the target frame, adding N target frames after/before the target frame;
the first declaration information is to declare: with respect to the video frame to which the first declaration information is added, there are N repeated frames.
Optionally, in an implementation, the recovery module is specifically configured to:
if the second declaration information exists in the frame header of the target frame, adding the last video frame of the N target frames between the target frame and the last video frame of the target frame;
the second declaration information is to declare: there are N repeated frames with respect to the last encoded video frame of the video frame to which the second luma information is added.
With regard to the apparatus in the above-described embodiment, the specific manner in which each unit/module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated herein.
Corresponding to the foregoing method embodiment, an embodiment of the present application further provides a video coding and decoding system, as shown in fig. 6, where the video coding and decoding system may include:
the first electronic device 610 is configured to, in a process of encoding a video, perform, for a target frame to be encoded, preset frame-level encoding on the target frame and N consecutive frames if N consecutive frames after the target frame is detected are the same as the target frame; wherein, the N is greater than or equal to 1, and the frame-level coding is: performing block-level coding on the target frame and one frame in the continuous N frames, and performing frame-level quantity statement on the repeated frames corresponding to the target frame; after the frame-level coding is finished, taking a first video frame which is after the target frame and is different from the target frame as a next target frame to be coded;
the second electronic device 620 is configured to restore the target frame based on the encoded information of the encoded target frame in the process of decoding the video; and if the number of the repeated frames is declared in the target frame, recovering the repeated frames.
For specific implementation and related explanation of each step executed by the first electronic device, reference may be made to related contents of the video encoding method described above, which is not described herein again. Similarly, as to the specific implementation manner and the related explanation content of each step executed by the second electronic device, reference may be made to the related content of the video decoding method described above, which is not described herein again. It is reasonable that the first electronic device may be a terminal device or a server, and the second electronic device may be a terminal device or a server.
In addition, corresponding to the video encoding method provided in the foregoing embodiment, an embodiment of the present application further provides an electronic device, as shown in fig. 7, where the electronic device may include:
a processor 710;
a memory 720 for storing processor-executable instructions;
wherein the processor 710 is configured to: when the executable instructions stored in the memory 720 are executed, the steps of a video encoding method provided by the embodiment of the present application are implemented.
It is understood that the electronic device may be a server or a terminal device, and in particular applications, the terminal device may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
Corresponding to the video decoding method, the embodiment of the application also provides an electronic device. As shown in fig. 8, the electronic apparatus includes:
a processor 810;
a memory 820 for storing processor-executable instructions;
wherein the processor 810 is configured to: when the executable instructions stored in the memory 820 are executed, the steps of a video decoding method provided by the embodiment of the present application are implemented.
It is understood that the electronic device may be a server or a terminal device, and in particular applications, the terminal device may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
Fig. 9 is a block diagram illustrating an apparatus 900 for video encoding/decoding according to an example embodiment. For example, the apparatus 900 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 9, apparatus 900 may include one or more of the following components: a processing component 902, a memory 904, a power component 906, a multimedia component 908, an audio component 910, an input/output (I/O) interface 912, a sensor component 914, and a communication component 916.
The processing component 902 generally controls overall operation of the device 900, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. Processing component 902 may include one or more processors 920 to execute instructions to perform all or a portion of the steps of the methods described above. Further, processing component 902 can include one or more modules that facilitate interaction between processing component 902 and other components. For example, the processing component 902 can include a multimedia module to facilitate interaction between the multimedia component 908 and the processing component 902.
The memory 904 is configured to store various types of data to support operation at the apparatus 900. Examples of such data include instructions for any application or method operating on device 900, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 904 may be implemented by any type or combination of volatile or non-volatile storage devices such as Static Random Access Memory (SRAM), electrically erasable programmable read only memory (EEFROM), erasable programmable read only memory (EFROM), programmable read only memory (FROM), Read Only Memory (ROM), magnetic storage, flash memory, magnetic or optical disks.
The power supply component 906 provides power to the various components of the device 900. The power components 906 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 900.
The multimedia component 908 comprises a screen providing an output interface between the device 900 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a touch panel (TF). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 908 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 900 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 910 is configured to output and/or input audio signals. For example, audio component 910 includes a Microphone (MIC) configured to receive external audio signals when apparatus 900 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 904 or transmitted via the communication component 916. In some embodiments, audio component 910 also includes a speaker for outputting audio signals.
I/O interface 912 provides an interface between processing component 902 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor component 914 includes one or more sensors for providing status assessment of various aspects of the apparatus 900. For example, the sensor assembly 914 may detect an open/closed state of the device 900, the relative positioning of the components, such as a display and keypad of the apparatus 900, the sensor assembly 914 may also detect a change in the position of the apparatus 900 or a component of the apparatus 900, the presence or absence of user contact with the apparatus 900, orientation or acceleration/deceleration of the apparatus 900, and a change in the temperature of the apparatus 900. The sensor assembly 914 may include a proximity sensor configured to detect the presence of a nearby object in the absence of any physical contact. The sensor assembly 914 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 914 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 916 is configured to facilitate communications between the apparatus 900 and other devices in a wired or wireless manner. The apparatus 900 may access a wireless network based on a communication standard, such as WiFi, an operator network (such as 2G, 3G, 4G, or 5G), or a combination thereof. In an exemplary embodiment, the communication component 916 receives a broadcast signal or broadcast associated information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 916 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 900 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital signal processors (DSFs), digital signal processing devices (DSFDs), programmable logic devices (FLDs), field programmable gate arrays (FFGAs), controllers, microcontrollers, microprocessors, or other electronic components for performing the above-described methods.
Fig. 10 is a block diagram illustrating an apparatus 1000 for video encoding/decoding according to an example embodiment. For example, the apparatus 1000 may be provided as a server. Referring to fig. 10, the apparatus 1000 includes a processing component 1022 that further includes one or more processors and memory resources, represented by memory 1032, for storing instructions, such as application programs, that are executable by the processing component 1022. The application programs stored in memory 1032 may include one or more modules that each correspond to a set of instructions. Further, the processing component 1022 is configured to execute instructions to perform the video encoding method/video decoding method described above.
The device 1000 may also include a power supply component 1026 configured to perform power management for the device 1000, a wired or wireless network interface 1050 configured to connect the device 1000 to a network, and an input/output (I/O) interface 1058. The apparatus 1000 may operate based on an operating system stored in memory 1032, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, or the like.
In addition, the present application also provides a non-transitory computer readable storage medium, and when executed by a processor of an electronic device, the instructions in the storage medium enable the electronic device to perform the steps of the video encoding method provided by the present application.
In addition, a non-transitory computer-readable storage medium is provided, and when executed by a processor of an electronic device, instructions in the storage medium enable the electronic device to perform the steps of a video decoding method provided in an embodiment of the present application.
In an exemplary embodiment, a non-transitory computer readable storage medium comprising instructions, such as the memory 904 comprising instructions, executable by the processor 920 of the apparatus 900 to perform the video encoding/decoding method described above is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
In addition, the embodiment of the present application also provides a computer program, which is used to be executed to execute the steps of the video coding method.
In addition, the embodiment of the present application further provides a computer program, which is configured to be executed to perform the steps of the video decoding method.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.

Claims (19)

1. A video encoding method, comprising:
in the process of coding a video, aiming at a target frame to be coded, if continuous N frames after the target frame is detected are the same as the target frame, carrying out preset frame level coding on the target frame and the continuous N frames; wherein, the N is greater than or equal to 1, and the frame-level coding is: performing block-level coding on one of the continuous N frames and the target frame, and performing frame-level quantity statement on a repeated frame corresponding to the target frame; the method for performing frame-level quantity declaration on the repeated frames corresponding to the target frame includes: declaring the number of repeated frames corresponding to the target frame in a frame header;
after the frame-level coding is finished, taking a first video frame which is after the target frame and is different from the target frame as a next target frame to be coded;
wherein the step of performing preset frame-level coding on the target frame and the consecutive N frames comprises:
adding first statement information in a frame header of a frame aiming at one frame of the continuous N frames and the target frame, and carrying out block-level coding on the frame added with the first statement information; wherein the first declaration information is to declare: with respect to the video frame to which the first declaration information is added, there are N repeated frames;
alternatively, the first and second electrodes may be,
performing block-level encoding on the target frame; adding second plaintext information in a header of a first video frame subsequent to the target frame and different from the target frame; wherein the second declaration information is to declare: there are N repeated frames with respect to the last encoded video frame of the video frame to which the second luma information is added.
2. The method of claim 1, further comprising:
for a target frame to be coded, if the next frame of the target frame is detected to be different from the target frame, carrying out block-level coding on the target frame;
and after the block-level coding of the target frame is finished, taking the next frame of the target frame as the next target frame to be coded.
3. The method according to claim 1, wherein adding first declaration information in a header of one of the target frame and consecutive N frames comprises:
adding first statement information in a frame header of the target frame;
alternatively, the first and second electrodes may be,
and adding first declaration information in the last frame of the continuous N frames.
4. A video decoding method, comprising:
in the process of decoding the video, restoring the target frame based on the coding information of the coded target frame; wherein the video is encoded according to the video encoding method of any one of claims 1-3;
and if the number of the repeated frames is declared in the target frame, recovering the repeated frames.
5. The method of claim 4, wherein recovering the repeated frames if the number of repeated frames declared in the target frame is detected comprises:
and if the number of the repeated frames is declared in the frame header of the target frame, recovering the repeated frames.
6. The method of claim 5, wherein if the number of repeated frames declared in the header of the target frame is detected, recovering the repeated frames comprises:
if detecting that first statement information exists in a frame header of the target frame, adding N target frames after/before the target frame;
the first declaration information is to declare: with respect to the video frame to which the first declaration information is added, there are N repeated frames.
7. The method of claim 5, wherein if the number of repeated frames declared in the header of the target frame is detected, recovering the repeated frames comprises:
if the second declaration information exists in the frame header of the target frame, adding the last video frame of the N target frames between the target frame and the last video frame of the target frame;
the second declaration information is to declare: there are N repeated frames with respect to the last encoded video frame of the video frame to which the second luma information is added.
8. A video encoding apparatus, comprising:
the video coding device comprises a first coding unit, a second coding unit and a third coding unit, wherein the first coding unit is configured to perform preset frame level coding on a target frame to be coded in the process of coding a video, and if N continuous frames after the target frame is detected are the same as the target frame; wherein, the N is greater than or equal to 1, and the frame-level coding is: performing block-level coding on one of the continuous N frames and the target frame, and performing frame-level quantity statement on a repeated frame corresponding to the target frame; the method for performing frame-level quantity declaration on the repeated frames corresponding to the target frame includes: declaring the number of repeated frames corresponding to the target frame in a frame header;
a determining unit configured to take a first video frame, which is subsequent to the target frame and different from the target frame, as a next target frame to be encoded after the frame-level encoding is performed;
wherein the first encoding unit includes:
a first adding module, configured to add, for a target frame to be encoded, first declaration information in a header of a frame of a consecutive N frame and a target frame if the consecutive N frame is the same as the target frame after the target frame is detected;
a first encoding module configured to perform block-level encoding on the frame to which the first declaration information is added; wherein the first declaration information is to declare: with respect to the video frame to which the first declaration information is added, there are N repeated frames;
alternatively, the first and second electrodes may be,
the first encoding unit includes:
a second encoding module configured to, for a target frame to be encoded, perform block-level encoding on the target frame if N consecutive frames after the target frame is detected to be the same as the target frame;
a second adding module configured to add second plaintext information in a header of a first video frame subsequent to the target frame and different from the target frame; wherein the second declaration information is to declare: there are N repeated frames with respect to the last encoded video frame of the video frame to which the second luma information is added.
9. The apparatus of claim 8, further comprising:
a second encoding unit configured to, for a target frame to be encoded, perform block-level encoding on the target frame if it is detected that a next frame of the target frame is different from the target frame;
the determining unit is further configured to, after performing block-level encoding on the target frame, take a next frame of the target frame as a next target frame to be encoded.
10. The apparatus of claim 8, wherein the first adding module is specifically configured to:
for a target frame to be coded, if N consecutive frames after the target frame is detected are the same as the target frame, adding first declaration information in a frame header of the target frame, or adding first declaration information in a last frame of the N consecutive frames.
11. A video decoding apparatus, comprising:
a decoding unit configured to restore an encoded target frame based on encoding information of the encoded target frame in a process of decoding a video; wherein the video is encoded according to the video encoding method of any one of claims 1-3;
a recovery unit configured to recover the repeated frames if the number of the repeated frames declared in the target frame is detected.
12. The apparatus of claim 11, wherein the recovery unit comprises:
a recovery module configured to recover the repeated frames if the number of the repeated frames declared in the header of the target frame is detected.
13. The apparatus of claim 12, wherein the recovery module is specifically configured to:
if detecting that first statement information exists in a frame header of the target frame, adding N target frames after/before the target frame;
the first declaration information is to declare: with respect to the video frame to which the first declaration information is added, there are N repeated frames.
14. The apparatus of claim 12, wherein the recovery module is specifically configured to:
if the second declaration information exists in the frame header of the target frame, adding the last video frame of the N target frames between the target frame and the last video frame of the target frame;
the second declaration information is to declare: there are N repeated frames with respect to the last encoded video frame of the video frame to which the second luma information is added.
15. A video coding/decoding system, comprising:
the first electronic device is used for carrying out preset frame level coding on a target frame and N continuous frames if N continuous frames after the target frame is detected are the same as the target frame aiming at the target frame to be coded in the process of coding a video; wherein, the N is greater than or equal to 1, and the frame-level coding is: performing block-level coding on one of the continuous N frames and the target frame, and performing frame-level quantity statement on a repeated frame corresponding to the target frame; the method for performing frame-level quantity declaration on the repeated frames corresponding to the target frame includes: declaring the number of repeated frames corresponding to the target frame in a frame header; after the frame-level coding is finished, taking a first video frame which is after the target frame and is different from the target frame as a next target frame to be coded;
the second electronic equipment is used for restoring the target frame based on the coding information of the coded target frame in the process of decoding the video; if the number of the repeated frames is declared in the target frame, recovering the repeated frames;
wherein the step of the first electronic device performing preset frame-level coding on the target frame and the consecutive N frames includes:
adding first statement information in a frame header of a frame aiming at one frame of the continuous N frames and the target frame, and carrying out block-level coding on the frame added with the first statement information; wherein the first declaration information is to declare: with respect to the video frame to which the first declaration information is added, there are N repeated frames; alternatively, the first and second electrodes may be,
performing block-level encoding on the target frame; adding second plaintext information in a header of a first video frame subsequent to the target frame and different from the target frame; wherein the second declaration information is to declare: there are N repeated frames with respect to the last encoded video frame of the video frame to which the second luma information is added.
16. An electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to: the method steps of any of claims 1-3 are implemented when executing executable instructions stored on the memory.
17. An electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to: the method steps of any of claims 4-7 are implemented when executing executable instructions stored on the memory.
18. A non-transitory computer readable storage medium, wherein instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform a video encoding method as recited in any one of claims 1-3.
19. A non-transitory computer readable storage medium, wherein instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform a video decoding method as recited in any one of claims 4-7.
CN201811216417.6A 2018-10-18 2018-10-18 Video encoding method, video decoding method, video encoding device, video decoding device, electronic equipment and video encoding system Active CN109120929B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811216417.6A CN109120929B (en) 2018-10-18 2018-10-18 Video encoding method, video decoding method, video encoding device, video decoding device, electronic equipment and video encoding system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811216417.6A CN109120929B (en) 2018-10-18 2018-10-18 Video encoding method, video decoding method, video encoding device, video decoding device, electronic equipment and video encoding system

Publications (2)

Publication Number Publication Date
CN109120929A CN109120929A (en) 2019-01-01
CN109120929B true CN109120929B (en) 2021-04-30

Family

ID=64854883

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811216417.6A Active CN109120929B (en) 2018-10-18 2018-10-18 Video encoding method, video decoding method, video encoding device, video decoding device, electronic equipment and video encoding system

Country Status (1)

Country Link
CN (1) CN109120929B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110505522A (en) * 2019-09-16 2019-11-26 腾讯科技(深圳)有限公司 Processing method, device and the electronic equipment of video data
CN114390314A (en) * 2021-12-30 2022-04-22 咪咕文化科技有限公司 Variable frame rate audio and video processing method, equipment and storage medium
CN117615137B (en) * 2024-01-15 2024-04-09 北京铁力山科技股份有限公司 Video processing method, device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07298260A (en) * 1994-04-21 1995-11-10 Canon Inc Compressor for image data, compression method for image data, expansion device for image data, image data expansion method and compression expansion system for image data
CN101507283A (en) * 2006-06-21 2009-08-12 霍尼韦尔国际公司 Two-stage codec for frame-based program images
CN104079950A (en) * 2014-07-04 2014-10-01 福建天晴数码有限公司 Video output processing method, device and system and video receiving processing method, device and system
CN107211126A (en) * 2015-02-02 2017-09-26 英特尔公司 Wireless bandwidth reduction in encoder

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010074676A (en) * 2008-09-19 2010-04-02 Konica Minolta Business Technologies Inc Image compression apparatus and image decompression apparatus
JP4760902B2 (en) * 2008-12-17 2011-08-31 ソニー株式会社 Information processing apparatus and method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07298260A (en) * 1994-04-21 1995-11-10 Canon Inc Compressor for image data, compression method for image data, expansion device for image data, image data expansion method and compression expansion system for image data
CN101507283A (en) * 2006-06-21 2009-08-12 霍尼韦尔国际公司 Two-stage codec for frame-based program images
CN104079950A (en) * 2014-07-04 2014-10-01 福建天晴数码有限公司 Video output processing method, device and system and video receiving processing method, device and system
CN107211126A (en) * 2015-02-02 2017-09-26 英特尔公司 Wireless bandwidth reduction in encoder

Also Published As

Publication number Publication date
CN109120929A (en) 2019-01-01

Similar Documents

Publication Publication Date Title
CN113766313B (en) Video data processing method and device, electronic equipment and storage medium
CN110287874B (en) Target tracking method and device, electronic equipment and storage medium
CN110708559B (en) Image processing method, device and storage medium
CN107277423B (en) Method and device for packet loss retransmission
CN109120929B (en) Video encoding method, video decoding method, video encoding device, video decoding device, electronic equipment and video encoding system
CN110536168B (en) Video uploading method and device, electronic equipment and storage medium
CN108881952B (en) Video generation method and device, electronic equipment and storage medium
CN110796012B (en) Image processing method and device, electronic equipment and readable storage medium
CN110611820A (en) Video coding method and device, electronic equipment and storage medium
EP3993430A1 (en) Method for encoding live broadcast data and electronic device
CN111953980B (en) Video processing method and device
CN109068138B (en) Video image processing method and device, electronic equipment and storage medium
CN111860552A (en) Model training method and device based on nuclear self-encoder and storage medium
CN112866612B (en) Frame insertion method, device, terminal and computer readable storage medium
CN111225208B (en) Video coding method and device
CN113301254A (en) Video recording method, processing method, device, terminal and storage medium
US20210360189A1 (en) Video processing method and apparatus, and storage medium
CN115348448B (en) Filter training method and device, electronic equipment and storage medium
CN114415817B (en) Display control method, electronic device and storage medium
CN112954348B (en) Video encoding method and device, electronic equipment and storage medium
CN110119652B (en) Video shot segmentation method and device
CN115033601A (en) Method and device for providing pixel picture
CN116206168A (en) Image processing method, device, storage medium and electronic equipment
CN116170593A (en) Video data encoding method, apparatus, electronic device and storage medium
CN116980620A (en) Image frame prediction method and device, electronic equipment and storage medium

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
GR01 Patent grant
GR01 Patent grant