CN112351278A - Video encoding method and device and video decoding method and device - Google Patents

Video encoding method and device and video decoding method and device Download PDF

Info

Publication number
CN112351278A
CN112351278A CN202011218409.2A CN202011218409A CN112351278A CN 112351278 A CN112351278 A CN 112351278A CN 202011218409 A CN202011218409 A CN 202011218409A CN 112351278 A CN112351278 A CN 112351278A
Authority
CN
China
Prior art keywords
key frame
parameter
key
frame
mode
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
CN202011218409.2A
Other languages
Chinese (zh)
Other versions
CN112351278B (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 Kingsoft Cloud Network Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network 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 Kingsoft Cloud Network Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN202011218409.2A priority Critical patent/CN112351278B/en
Publication of CN112351278A publication Critical patent/CN112351278A/en
Application granted granted Critical
Publication of CN112351278B publication Critical patent/CN112351278B/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/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/136Incoming video signal characteristics or properties
    • H04N19/137Motion inside a coding unit, e.g. average field, frame or block difference
    • 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/103Selection of coding mode or of prediction mode
    • 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/177Methods 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 a group of pictures [GOP]
    • 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/189Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the adaptation method, adaptation tool or adaptation type used for the adaptive coding
    • H04N19/196Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the adaptation method, adaptation tool or adaptation type used for the adaptive coding being specially adapted for the computation of encoding parameters, e.g. by averaging previously computed encoding parameters
    • 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
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction

Landscapes

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

Abstract

The application relates to a video encoding method and device and a video decoding method and device, wherein the video encoding method comprises the following steps: acquiring a parameter value of a motion parameter of a first non-key frame; in the case that the parameter value of the motion parameter is higher than a target threshold value, determining to switch the encoding mode from a first encoding mode to a second encoding mode, wherein the non-key frames in the first encoding mode and the second encoding mode only configure forward reference frames, and the distance between the reference frames and the non-key frames configured by the non-key frames in the second encoding mode is smaller than the distance between the reference frames and the non-key frames configured by the non-key frames in the first encoding mode; and encoding the second non-key frame according to a second encoding mode, wherein in the case that the non-key frame is included after the second non-key frame, the non-key frame after the second non-key frame is encoded according to the second encoding mode. The method and the device solve the technical problem that the encoding and decoding flexibility of the video is poor in the related technology.

Description

Video encoding method and device and video decoding method and device
Technical Field
The present application relates to the field of computers, and in particular, to a method and an apparatus for encoding a video, and a method and an apparatus for decoding a video.
Background
In the current video coding technology, generally, only the influence of the delay of a coding mode on user experience is considered, and better experience can be ensured when a user plays a video through a mode of reducing delay as much as possible, but the mode cannot adjust the video coding and decoding process according to different playing scenes, so that the flexibility of the video coding and decoding process is poor, and a video suitable for the current playing environment of the user cannot be provided for the user.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The application provides a video encoding method and device and a video decoding method and device, which aim to at least solve the technical problem of poor flexibility of video encoding and decoding in the related technology.
According to an aspect of an embodiment of the present application, there is provided a video encoding method, including:
acquiring a parameter value of a motion parameter of a first non-key frame, wherein the first non-key frame is a video frame which is coded before a second non-key frame to be coded currently in a target video, the motion parameter is used for indicating the intensity of motion of the second non-key frame relative to a reference frame of the second non-key frame, and the parameter value of the motion parameter is in direct proportion to the intensity;
in the case that the parameter value of the motion parameter is higher than a target threshold value, determining to switch the encoding mode from a first encoding mode to a second encoding mode, wherein the non-key frames in the first encoding mode and the second encoding mode only configure forward reference frames, and the distance between the reference frames and the non-key frames configured by the non-key frames in the second encoding mode is smaller than the distance between the reference frames and the non-key frames configured by the non-key frames in the first encoding mode;
and encoding the second non-key frame according to the second encoding mode, wherein if a non-key frame is included after the second non-key frame, the non-key frame after the second non-key frame is encoded according to the second encoding mode.
According to another aspect of the embodiments of the present application, there is also provided a video decoding method, including:
acquiring a parameter value of a motion parameter of a first non-key frame, wherein the first non-key frame is a video frame decoded before a second non-key frame to be decoded currently in a target video, the motion parameter is used for indicating the intensity of motion of the second non-key frame relative to a reference frame of the second non-key frame, and the parameter value of the motion parameter is in direct proportion to the intensity;
determining to switch a decoding mode from a first decoding mode to a second decoding mode if a parameter value of the motion parameter is higher than a target threshold, wherein the non-key frames in the first decoding mode and the second decoding mode only configure forward reference frames, and a distance between a reference frame and a non-key frame configured by the non-key frame in the second decoding mode is smaller than a distance between a reference frame and a non-key frame configured by the non-key frame in the first decoding mode;
and decoding the second non-key frame according to the second decoding mode, wherein if a non-key frame is included after the second non-key frame, the non-key frame after the second non-key frame is decoded according to the second decoding mode.
According to another aspect of the embodiments of the present application, there is also provided an apparatus for encoding video, including:
the device comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for acquiring a parameter value of a motion parameter of a first non-key frame, the first non-key frame is a video frame which is coded before a second non-key frame to be coded currently in a target video, the motion parameter is used for indicating the intensity degree of motion of the second non-key frame relative to a reference frame of the second non-key frame, and the parameter value of the motion parameter is in direct proportion to the intensity degree;
a determining module, configured to determine to switch an encoding mode from a first encoding mode to a second encoding mode if a parameter value of the motion parameter is higher than a target threshold, where non-key frames in the first encoding mode and the second encoding mode only configure forward reference frames, and a distance between reference frames and non-key frames configured by non-key frames in the second encoding mode is smaller than a distance between reference frames and non-key frames configured by non-key frames in the first encoding mode;
and a first encoding module, configured to encode the second non-key frame according to the second encoding mode, where if a non-key frame is included after the second non-key frame, the non-key frame after the second non-key frame is encoded according to the second encoding mode.
According to another aspect of the embodiments of the present application, there is also provided a video decoding apparatus, including:
an obtaining module, configured to obtain a parameter value of a motion parameter of a first non-key frame, where the first non-key frame is a video frame that has been decoded before a second non-key frame to be decoded currently in a target video, the motion parameter is used to indicate a severity of motion of the second non-key frame relative to a reference frame of the second non-key frame, and the parameter value of the motion parameter is proportional to the severity;
a determining module, configured to determine to switch a decoding mode from a first decoding mode to a second decoding mode if a parameter value of the motion parameter is higher than a target threshold, where non-key frames in the first decoding mode and the second decoding mode only configure forward reference frames, and a distance between a reference frame configured by a non-key frame and a non-key frame in the second decoding mode is smaller than a distance between a reference frame configured by a non-key frame and a non-key frame in the first decoding mode;
a decoding module, configured to decode the second non-key frame according to the second decoding mode, where, when a non-key frame is included after the second non-key frame, the non-key frame after the second non-key frame is decoded according to the second decoding mode.
According to another aspect of the embodiments of the present application, there is also provided a storage medium including a stored program which, when executed, performs the above-described method.
According to another aspect of the embodiments of the present application, there is also provided an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the above method through the computer program.
In the embodiment of the application, a parameter value of a motion parameter of a first non-key frame is obtained, wherein the first non-key frame is a video frame which is coded before a second non-key frame to be coded currently in a target video, the motion parameter is used for indicating the intensity degree of motion of the second non-key frame relative to a reference frame of the second non-key frame, and the parameter value of the motion parameter is in direct proportion to the intensity degree; in the case that the parameter value of the motion parameter is higher than a target threshold value, determining to switch the encoding mode from a first encoding mode to a second encoding mode, wherein the non-key frames in the first encoding mode and the second encoding mode only configure forward reference frames, and the distance between the reference frames and the non-key frames configured by the non-key frames in the second encoding mode is smaller than the distance between the reference frames and the non-key frames configured by the non-key frames in the first encoding mode; coding a second non-key frame according to a second coding mode, wherein under the condition that the second non-key frame also comprises a non-key frame, according to the mode of coding the non-key frame after the second non-key frame according to the second coding mode, for the second non-key frame to be coded currently, obtaining the parameter value of the motion parameter of the first non-key frame coded before, judging whether to switch the coding mode according to the relation between the parameter value of the motion parameter and a target threshold value, if the parameter value of the motion parameter is higher than the target threshold value, the motion of the non-key frame relative to the key frame is severe, switching the coding mode from a first coding mode with larger distance between the coding frame and a reference frame to a second coding mode with smaller distance between the coding frame and the reference frame, thereby reducing the influence of the motion on the coding process, and the first coding mode and the second coding mode are both non-key frames and only configure a forward reference frame, the purpose of considering both decoding delay and encoding quality is achieved, so that the technical effect of improving the encoding and decoding flexibility of the video is achieved, and the technical problem of poor encoding and decoding flexibility of the video in the related technology is solved.
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.
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
Fig. 1 is a schematic diagram of a hardware environment of a video coding and decoding method according to an embodiment of the present application;
fig. 2 is a flow chart of an alternative video encoding method according to an embodiment of the present application;
fig. 3 is a first schematic diagram of an alternative video encoding method according to an embodiment of the present application;
FIG. 4 is a second schematic diagram of an alternative video encoding method according to an embodiment of the present application;
fig. 5 is a third schematic diagram of an alternative video encoding method according to an embodiment of the present application;
FIG. 6 is a flow chart of an alternative method of decoding video according to an embodiment of the present application;
FIG. 7 is a schematic diagram of an alternative video encoding apparatus according to an embodiment of the present application;
fig. 8 is a schematic diagram of an alternative video decoding apparatus according to an embodiment of the present application;
fig. 9 is a block diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Alternatively, in the present embodiment, the video coding and decoding method may be applied to a hardware environment formed by the terminal 101 and the server 103 as shown in fig. 1. As shown in fig. 1, a server 103 is connected to a terminal 101 through a network, which may be used to provide services (such as game services, application services, multimedia services, etc.) for the terminal or a client installed on the terminal, and a database may be provided on the server or separately from the server to provide data storage services for the server 103, and the network includes but is not limited to: the terminal 101 is not limited to a PC, a mobile phone, a tablet computer, and the like. The video encoding method according to the embodiment of the present application may be performed by the server 103, and the video decoding method may be performed by the terminal 101. The terminal 101 executing the video decoding method according to the embodiment of the present application may also be executed by a client installed thereon.
According to an aspect of an embodiment of the present application, there is provided an embodiment of a method of encoding video. Fig. 2 is a flowchart of an alternative video encoding method according to an embodiment of the present application, and as shown in fig. 2, the method may include the following steps:
step S202, obtaining a parameter value of a motion parameter of a first non-key frame, wherein the first non-key frame is a video frame which is coded before a second non-key frame to be coded currently in a target video, the motion parameter is used for indicating the intensity degree of motion of the second non-key frame relative to a reference frame of the second non-key frame, and the parameter value of the motion parameter is in direct proportion to the intensity degree;
step S204, under the condition that the parameter value of the motion parameter is higher than a target threshold value, determining to switch the coding mode from a first coding mode to a second coding mode, wherein the non-key frames in the first coding mode and the second coding mode only configure forward reference frames, and the distance between the reference frames and the non-key frames configured by the non-key frames in the second coding mode is smaller than the distance between the reference frames and the non-key frames configured by the non-key frames in the first coding mode;
step S206, encoding the second non-key frame according to the second encoding mode, wherein if a non-key frame is included after the second non-key frame, encoding the non-key frame after the second non-key frame according to the second encoding mode.
Through the above steps S202 to S206, for the second non-key frame to be currently encoded, acquiring a parameter value of a motion parameter of the first non-key frame that has been encoded before, determining whether to switch the encoding mode according to a relationship between the parameter value of the motion parameter and a target threshold, if the parameter value of the motion parameter is higher than the target threshold, it indicates that the motion of the non-key frame relative to the key frame is severe, and switching the encoding mode from the first encoding mode in which the distance between the encoded frame and the reference frame is large to the second encoding mode in which the distance between the encoded frame and the reference frame is small, thereby reducing the influence of the motion on the encoding process, and the first encoding mode and the second encoding mode are both non-key frames and only configure a forward reference frame, achieving the purpose of considering both decoding delay and encoding quality, thereby achieving the technical effect of improving the encoding and decoding flexibility of the video, and the technical problem of poor flexibility of video coding and decoding in the related technology is solved.
Optionally, in this embodiment, the video encoding method may be applied to, but not limited to, live video, real-time communication, panoramic video, video on demand, and other scenes. The target video may include, but is not limited to, a video stream in a live broadcast, real-time communication (e.g., a video call), or panoramic video, a video file in a panoramic video or video-on-demand, and the like.
As an alternative embodiment, during the live broadcast of the video, the encoding mode may be adaptively adjusted, but not limited to, by the following procedure:
receiving a live video stream;
obtaining a parameter value of a motion parameter of a first non-key frame in the live video stream, wherein the first non-key frame is a video frame which is coded before a second non-key frame to be coded currently in the live video stream, the motion parameter is used for indicating the intensity of motion of the second non-key frame relative to a reference frame of the second non-key frame, and the parameter value of the motion parameter is in direct proportion to the intensity;
in the case that the parameter value of the motion parameter is higher than a target threshold value, determining to switch the encoding mode from a first encoding mode to a second encoding mode, wherein the non-key frames in the first encoding mode and the second encoding mode only configure forward reference frames, and the distance between the reference frames and the non-key frames configured by the non-key frames in the second encoding mode is smaller than the distance between the reference frames and the non-key frames configured by the non-key frames in the first encoding mode;
coding the second non-key frame according to the second coding mode to obtain a coded video, wherein under the condition that the non-key frame is included after the second non-key frame, the non-key frame after the second non-key frame is coded according to the second coding mode;
and sending the coded video to a live broadcast end of the video.
Optionally, in this embodiment, in the process of encoding a live video, when a non-key frame in a live video stream is encoded, it is determined whether a degree of motion of the non-key frame to be encoded with respect to a reference frame is severe according to a parameter value of a motion parameter of the encoded non-key frame, and if the motion is severe, the encoding mode is switched from a first encoding mode with low image quality to a second encoding mode with high image quality, so that the encoding process of the live video is adaptively adjusted, and the encoding process can consider both a requirement for delay and a requirement for image quality, thereby improving the image quality as much as possible while ensuring low-delay transmission, and improving the experience of a user in watching the live video.
As an alternative embodiment, during the playing process of the panoramic video, the encoding mode may be adaptively adjusted through, but not limited to, the following processes:
under the condition that a main visual angle area displayed by a panoramic video is detected to be switched to a first area, acquiring a video code stream to be switched corresponding to the first area, wherein the definition of the video code stream to be switched is higher than that of an original video code stream displayed by the first area before area switching;
acquiring a parameter value of a motion parameter of a first non-key frame of a video code stream to be switched, wherein the first non-key frame is a video frame which is coded before a second non-key frame to be coded currently in the video code stream to be switched, the motion parameter is used for indicating the intensity of motion of the second non-key frame relative to a reference frame of the second non-key frame, and the parameter value of the motion parameter is in direct proportion to the intensity;
in the case that the parameter value of the motion parameter is higher than a target threshold value, determining to switch the encoding mode from a first encoding mode to a second encoding mode, wherein the non-key frames in the first encoding mode and the second encoding mode only configure forward reference frames, and the distance between the reference frames and the non-key frames configured by the non-key frames in the second encoding mode is smaller than the distance between the reference frames and the non-key frames configured by the non-key frames in the first encoding mode;
coding the second non-key frame according to the second coding mode to obtain a coded video code stream, wherein under the condition that the non-key frame is included after the second non-key frame, the non-key frame after the second non-key frame is coded according to the second coding mode;
and sending the coded video code stream to a display device of the panoramic video.
Optionally, in this embodiment, in the process of encoding a panoramic video, when a non-key frame in a video code stream of the panoramic video is encoded, whether the degree of motion of the non-key frame to be encoded relative to a reference frame is severe is determined according to a parameter value of a motion parameter of the encoded non-key frame, and if the motion is severe, the encoding mode is switched from a first encoding mode with low image quality to a second encoding mode with high image quality, so that the encoding process of the panoramic video can consider both the requirement of delay and the requirement of image quality, thereby improving the image quality as much as possible while ensuring low-delay transmission, and improving the experience of a user in the process of watching the panoramic video.
As an alternative embodiment, during the playing process of the video resource transmitted in real time, the encoding mode may be adaptively adjusted through, but not limited to, the following processes:
acquiring real-time transmission video resources from a video acquisition end;
determining coding information of a video frame to be coded in the real-time transmitted video resource, wherein the video frame to be coded is a non-key frame in a target video, and the coding information is used for indicating the coding quality and the decoding delay of the video frame;
according to the coding information, determining a target coding mode matched with the video frame from a target coding mode set corresponding to the video frame, wherein the target coding mode set comprises a coding mode allowed to be used by the video frame, and a non-key frame in the coding mode allowed to be used by the video frame is only configured with a forward reference frame;
coding the video frame according to the target coding mode to obtain a coded video resource;
and sending the coded video resource to a video playing end.
Optionally, in this embodiment, in the process of performing real-time transmission of a video, it is determined whether the degree of motion of a non-key frame to be encoded with respect to a reference frame is severe according to a parameter value of a motion parameter of an encoded non-key frame, and if the degree of motion is severe, the encoding mode is switched from a first encoding mode with low image quality to a second encoding mode with high image quality, so that the encoding process of the real-time transmission video is adaptively adjusted, and the encoding process can consider both the requirement of delay and the requirement of image quality, so that the image quality can be improved as much as possible while ensuring low-delay transmission, and the experience of a user in the process of performing real-time audio/video communication is improved.
In the technical solution provided in step S202, the first non-key frame is a video frame that has been encoded before the second non-key frame to be currently encoded in the target video. Such as: the first non-key frame may be a previous non-key frame to the second non-key frame.
Optionally, in this embodiment, the motion parameter is used to indicate the intensity of the motion of the second non-key frame relative to the reference frame of the second non-key frame, and the parameter value of the motion parameter is proportional to the intensity. That is, the larger the parameter value of the motion parameter, the more severely the second non-key frame moves relative to the reference frame of the second non-key frame. The reference frame of the second non-key frame may be a key frame in a group of pictures to which the second non-key frame belongs.
As an alternative embodiment, obtaining the parameter value of the motion parameter of the first non-key frame includes:
s11, obtaining encoding parameters of the first non-key frame, wherein the encoding parameters include at least one of: the average value of the motion vectors of the first non-key frame, the average value of the coding costs of all coding units of the first non-key frame, the ratio of the intra-frame prediction costs of all coding units of the first non-key frame to the inter-frame prediction costs, the code rate of the first non-key frame and the image quality of the first non-key frame;
s12, determining a parameter value of the motion parameter according to a plurality of parameters if the encoding parameter includes the plurality of parameters;
s13, in case that the encoding parameter includes one parameter, determining a value of the one parameter as a parameter value of the motion parameter.
Optionally, in this embodiment, the encoding parameters of the first non-key frame may include, but are not limited to, one or more of the following: mean (MV) of first non-key frame motion vectorsi) Mean coding Cost (Cost) of all coding units of the first non-key framei) Intra prediction cost of all coding units of the first non-key frame
Figure BDA0002761208120000111
And inter prediction cost
Figure BDA0002761208120000112
Ratio of
Figure BDA0002761208120000113
The code rate of the first non-key frame (which may be an index such as the pixel depth bpp to indicate the average bit per pixel), and the image quality of the first non-key frame (which may be an index such as the peak signal-to-noise ratio (PSNR)).
Where i represents the ith non-key frame. A Motion Vector (MV) is used to represent motion information of a pixel block in inter prediction. In order to balance distortion and code rate during coding, the distortion and the code rate are integrated and converted into coding cost through Lagrange coefficients. A Coding Unit (CU) is the most basic coding unit in HEVC, and for an I frame, all CUs have only intra prediction mode; for P-frames and B-frames, each CU can select either intra-frame or inter-frame prediction, and by comparing the coding costs of the two types of prediction modes, the one with the lower cost is selected as the prediction mode for actual coding.
Optionally, in this embodiment, the indicator for measuring the intensity of the motion between frames may be one or a combination of the above parameters. If it is a parameter, it can be directly determined as a parameter value of the motion parameter. If the parameter is a combination of a plurality of parameters, the parameter value of the motion parameter can be determined according to the selected plurality of parameters.
As an alternative embodiment, determining the parameter value of the motion parameter from the plurality of parameters comprises:
s21, normalizing each parameter in the plurality of parameters to obtain a normalization value corresponding to each parameter;
and S22, determining the weighted sum of the normalization values corresponding to each parameter as the parameter value of the motion parameter.
Optionally, in this embodiment, if there are multiple parameters serving as the measure in common, the parameters may be normalized to obtain a weighted sum, and the weighted sum is calculated as a parameter value of the motion parameter to be compared with the target threshold.
Optionally, in this embodiment, the weight of each parameter may be set according to actual requirements, for example: the importance of the parameter may be set, and the more important parameter is set with a higher weight.
As an alternative embodiment, determining the parameter value of the motion parameter from the plurality of parameters comprises:
s31, comparing each parameter in the plurality of parameters with a threshold corresponding to each parameter;
and S32, determining that the parameter value of the motion parameter is higher than the target threshold value when at least one of the parameters is higher than the corresponding threshold value or the parameters are all higher than the corresponding threshold value.
Optionally, in this embodiment, if there are multiple parameters serving as the measurement indexes, each parameter may be compared with the corresponding threshold, and the determination condition may be a sum relationship, that is, when the multiple parameters are higher than the corresponding thresholds, it may be determined that the parameter value of the motion parameter is higher than the target threshold. The relationship of "or" may be adopted, that is, as long as one parameter is higher than the threshold, the condition of switching the coding mode is considered to be satisfied.
As an alternative embodiment, after the step S202, the method further includes:
and under the condition that the parameter value of the motion parameter is not higher than the target threshold value, the second non-key frame is coded according to the first coding mode.
Optionally, in this embodiment, if the motion parameter is not higher than the target threshold, the current second non-key frame continues to be encoded using the encoding mode that only refers to the I frame, and for a non-key frame subsequent to the second non-key frame, it is determined whether the encoding mode needs to be switched according to the relationship between the parameter value of the motion parameter of the second non-key frame and the target threshold.
In the technical solution provided in step S204, the target video may be divided in a manner of an image group. A Group of Pictures (GOP) refers to a set of consecutive Pictures in a video. Typically, the first picture in a GOP is an I-frame, which is intra-coded without reference to other frames. Other frames in the GOP may be B frames or P frames, where P frames are coded with forward reference and B frames are coded with bi-directional reference.
Optionally, in this embodiment, the non-key frames in the first encoding mode and the second encoding mode only configure the forward reference frame, that is, the group of pictures only includes I frames and P frames. The dividing manner of the group of pictures may be, but not limited to, a manner including 8P frames, a manner including 16P frames, and the like. In this embodiment, a manner of 8P frames is taken as an example, and other manners are similar to the above, and are not described herein again.
Optionally, in this embodiment, a distance between a reference frame and a non-key frame of the non-key frame configuration in the second encoding mode is smaller than a distance between a reference frame and a non-key frame of the non-key frame configuration in the first encoding mode, for example: the first coding mode may be a coding mode in which P frames refer to only I frames, and the second coding mode may be a coding mode in which P frames refer to previous P frames and I frames. Under the condition that the motion between the video frames is severe, the coding mode with the large distance between the coding frame and the reference frame is switched to the coding mode with the small distance between the coding frame and the reference frame, so that the motion intensity of the coding frame relative to the reference frame can be reduced, and the coding quality is improved.
Alternatively, in this embodiment, the target threshold may be determined according to the setting conditions of the encoding parameters and the comparison rules.
Such as: three coding parameters are used to determine the severity of motion of a current P-frame relative to a reference I-frame: mean value of current frame MV (MV)i) Mean value of coding costs (Cost) of all CUs of current framei) Ratio of intra prediction cost to inter prediction cost of all CUs of the current frame
Figure BDA0002761208120000141
The three indexes can be directly obtained during encoding, and all meet the characteristics that: the larger the value, the worse the reference performance. And if the ith P frame in the GOP meets the following formula, switching the coding reference frame mode from the first coding mode to the second coding mode from the next frame until the next GOP starts and switching back to the ultra-low delay configuration. Wherein T ismv,Tcost,Tcost_ratioThree thresholds, respectively, the formula shows that when any index is greater than the threshold, the coding mode can be switched.
Figure BDA0002761208120000151
As an alternative embodiment, determining to switch the coding mode from the first coding mode to the second coding mode comprises:
s41, determining a target threshold interval in which the parameter value of the motion parameter falls in a plurality of threshold intervals, wherein the threshold intervals correspond to a plurality of coding modes one to one, and the coding modes are all non-key frames and only configure a forward reference frame;
s42, determining the coding mode corresponding to the target threshold interval as the second coding mode.
Optionally, in this embodiment, the second encoding mode may include a plurality of encoding modes, each of the encoding modes corresponds to a threshold interval, and the second encoding mode finally used in the corresponding encoding mode is determined according to the threshold interval in which the parameter value of the motion parameter falls.
As an alternative embodiment, before determining to switch the coding mode from the first coding mode to the second coding mode, the method further includes:
determining that the Mth previous and Mth non-key frames in the group of pictures refer to a previous non-key frame and a key frame and the Mth subsequent non-key frames refer to an Mth non-key frame and a key frame in the second encoding mode, wherein M is an integer greater than 2 and less than N, and N is the number of non-key frames included in the group of pictures;
determining that non-key frames in the image group are divided into a plurality of segments in the first coding mode, wherein the first non-key frame in each segment only refers to key frames in the image group, and non-key frames after the first non-key frame in each segment only refer to non-key frames positioned before the segment; and/or determining that the non-key frames in the group of pictures in the first coding mode only refer to key frames in the group of pictures.
Alternatively, in this embodiment, the second encoding mode may be, but is not limited to, one of LDP encoding modes, where the LDP encoding mode (Low-Delay-P) is a Low-Delay P frame encoding configuration, the first frame in each GOP is encoded in an I frame, the subsequent frames are all encoded in P frames, and each P frame is encoded with reference to only the picture preceding in the play order. Such as: the second coding mode may be a mode in which a portion of P frames reference both an I frame and a previous P frame, and another portion of P frames reference both a previous P frame and a previous P frame. Fig. 3 is a first schematic diagram of an alternative video encoding method according to an embodiment of the present application, and as shown in fig. 3, the second encoding mode may be that the 4 th previous and 4 th P frames refer to the previous P frame and the I frame, and the 4 th subsequent P frame refers to the 4 th P frame and the previous P frame. Poc (picture order count) represents the display order of the source video frames at video encoding.
It should be noted that, an optional LDP coding mode is provided here, and the LDP coding mode in this embodiment may also be another LDP coding mode, which is not limited in this embodiment.
Alternatively, in this embodiment, the first encoding mode may be a mode in which a P frame in the group of pictures is encoded with reference to only an I frame, that is, the first P frame after the I frame in the group of pictures is encoded with reference to only the I frame, and whether to switch the encoding mode is determined from the second P frame according to the parameter value of the motion parameter of the previous P frame. Fig. 4 is a second schematic diagram of an alternative video encoding method according to an embodiment of the present application, and as shown in fig. 4, the first encoding mode can encode and decode only the reference I frame for all P frames in the group of pictures.
Optionally, in this embodiment, the first encoding mode may also be an encoding mode for determining reference frames in a segmented manner, non-key frames in the group of pictures are divided into a plurality of segments, a first non-key frame in each segment only refers to a key frame in the group of pictures, and a non-key frame after the first non-key frame in each segment only refers to a non-key frame located before in the segment.
Alternatively, in this embodiment, the number of divided segments in the first encoding mode may be determined, but is not limited to, using a target number of levels determined according to a target delay time and a target codec time, where the target delay time is an allowed maximum delay time, the target codec time is a codec time of one video frame, the codec time includes a time used for encoding and a time used for decoding, and the target number of levels is the number of non-key frames allowed to be codec within the target delay time. And determining the number of the fragments of the image group division according to the target series, wherein the number of the non-key frames to be coded contained in each fragment is less than or equal to the target series.
Fig. 5 is a third schematic diagram of an alternative video encoding method according to an embodiment of the present application, and as shown in fig. 5, the first encoding mode may be that 8P frames are divided into 4 slices, each slice includes 2P frames, the first P frame in each slice refers to an I frame, and the second P frame refers to the first P frame in the slice.
In the technical solution provided in step S206, if it is determined to switch the encoding mode, both the current non-key frame to be encoded and the subsequent non-key frame are encoded using the second encoding mode.
According to an aspect of embodiments of the present application, there is provided an embodiment of a method for decoding video. Fig. 6 is a flowchart of an alternative video decoding method according to an embodiment of the present application, and as shown in fig. 6, the method may include the following steps:
step S602, obtaining a parameter value of a motion parameter of a first non-key frame, wherein the first non-key frame is a video frame decoded before a second non-key frame to be decoded currently in a target video, the motion parameter is used for indicating the intensity of motion of the second non-key frame relative to a reference frame of the second non-key frame, and the parameter value of the motion parameter is in direct proportion to the intensity;
step S604, determining to switch the decoding mode from a first decoding mode to a second decoding mode when the parameter value of the motion parameter is higher than a target threshold, where non-key frames in the first decoding mode and the second decoding mode only configure forward reference frames, and a distance between a reference frame configured by a non-key frame and a non-key frame in the second decoding mode is smaller than a distance between a reference frame configured by a non-key frame and a non-key frame in the first decoding mode;
step S606, decoding the second non-key frame according to the second decoding mode, wherein, under the condition that a non-key frame is included after the second non-key frame, decoding the non-key frame after the second non-key frame according to the second decoding mode.
As an alternative embodiment, during the live broadcast of the video, the decoding mode may be adaptively adjusted, but not limited to, by the following procedure:
receiving a live video stream;
obtaining a parameter value of a motion parameter of a first non-key frame in the live video stream, wherein the first non-key frame is a video frame decoded before a second non-key frame to be decoded currently in the live video stream, the motion parameter is used for indicating the intensity of motion of the second non-key frame relative to a reference frame of the second non-key frame, and the parameter value of the motion parameter is in direct proportion to the intensity;
determining to switch a decoding mode from a first decoding mode to a second decoding mode if a parameter value of the motion parameter is higher than a target threshold, wherein the non-key frames in the first decoding mode and the second decoding mode only configure forward reference frames, and a distance between a reference frame and a non-key frame configured by the non-key frame in the second decoding mode is smaller than a distance between a reference frame and a non-key frame configured by the non-key frame in the first decoding mode;
decoding the second non-key frame according to the second decoding mode to obtain a decoded video, wherein under the condition that the non-key frame is included after the second non-key frame, the non-key frame after the second non-key frame is decoded according to the second decoding mode;
and playing the decoded video at a playing end of the live video.
Optionally, in this embodiment, in a process of decoding a live video, when decoding a non-key frame in a live video stream, it is determined whether a degree of motion of the non-key frame to be decoded with respect to a reference frame is severe according to a parameter value of a motion parameter of the decoded non-key frame, and if the motion is severe, a decoding mode is switched from a first decoding mode with low image quality to a second decoding mode with high image quality, so that a decoding process of the live video is adaptively adjusted, and the decoding process can consider both a requirement for delay and a requirement for image quality, thereby improving the image quality as much as possible while ensuring low-delay transmission, and improving experience of a user in the process of watching the live video.
As an alternative embodiment, during the playing process of the panoramic video, the decoding mode may be adaptively adjusted through, but not limited to, the following processes:
under the condition that a main visual angle area displayed by a panoramic video is detected to be switched to a first area, acquiring a video code stream to be switched corresponding to the first area, wherein the definition of the video code stream to be switched is higher than that of an original video code stream displayed by the first area before area switching;
acquiring a parameter value of a motion parameter of a first non-key frame of a video code stream to be switched, wherein the first non-key frame is a video frame decoded before a second non-key frame to be decoded currently in the video code stream to be switched, the motion parameter is used for indicating the intensity of motion of the second non-key frame relative to a reference frame of the second non-key frame, and the parameter value of the motion parameter is in direct proportion to the intensity;
determining to switch a decoding mode from a first decoding mode to a second decoding mode if a parameter value of the motion parameter is higher than a target threshold, wherein the non-key frames in the first decoding mode and the second decoding mode only configure forward reference frames, and a distance between a reference frame and a non-key frame configured by the non-key frame in the second decoding mode is smaller than a distance between a reference frame and a non-key frame configured by the non-key frame in the first decoding mode;
decoding the second non-key frame according to the second decoding mode to obtain a decoded video code stream, wherein under the condition that the non-key frame is included after the second non-key frame, the non-key frame after the second non-key frame is decoded according to the second decoding mode;
and displaying the decoding video code stream on the display equipment of the panoramic video.
Optionally, in this embodiment, in a process of decoding a panoramic video, when a non-key frame in a video code stream of the panoramic video is decoded, whether a degree of motion of the non-key frame to be decoded relative to a reference frame is severe is determined according to a parameter value of a motion parameter of the decoded non-key frame, and if the motion is severe, a decoding mode is switched from a first decoding mode with low image quality to a second decoding mode with high image quality, so that a requirement of delay and a requirement of image quality are considered in a decoding process of the panoramic video, thereby ensuring low-delay transmission while improving the image quality as much as possible, and improving experience of a user in the process of watching the panoramic video.
As an alternative embodiment, during the playing process of the video resource transmitted in real time, the decoding mode may be adaptively adjusted through, but not limited to, the following processes:
acquiring real-time transmitted video resources from a video transmission end;
determining decoding information of a video frame to be decoded in the real-time transmitted video resource, wherein the video frame to be decoded is a non-key frame in a target video, and the decoding information is used for indicating the decoding quality and the decoding delay of the video frame;
according to the decoding information, determining a target decoding mode matched with the video frame from a target decoding mode set corresponding to the video frame, wherein the target decoding mode set comprises a decoding mode allowed to be used by the video frame, and a non-key frame in the decoding mode allowed to be used by the video frame only configures a forward reference frame;
decoding the video frame according to the target decoding mode to obtain a decoded video resource;
and playing the decoded video resource at a video playing end.
Optionally, in this embodiment, in the process of performing real-time transmission of a video, it is determined whether the degree of motion of a non-key frame to be decoded with respect to a reference frame is severe according to a parameter value of a motion parameter of a decoded non-key frame, and if the degree of motion is severe, the decoding mode is switched from a first decoding mode with low image quality to a second decoding mode with high image quality, so that the decoding process of the real-time transmission video is adaptively adjusted, and the decoding process can consider both the requirement of delay and the requirement of image quality, so that the image quality can be improved as much as possible while ensuring low-delay transmission, and the experience of a user in the process of performing real-time audio and video communication is improved.
As an alternative embodiment, in the above step S604, the switching of the decoding mode from the first decoding mode to the second decoding mode may be determined by, but is not limited to:
determining a target threshold interval in which a parameter value of the motion parameter falls in a plurality of threshold intervals, wherein the threshold intervals correspond to a plurality of decoding modes one to one, and all the decoding modes are non-key frames and only configure a forward reference frame;
and determining the decoding mode corresponding to the target threshold interval as the second decoding mode.
As an alternative embodiment, after obtaining the parameter value of the motion parameter of the first non-key frame, the second non-key frame may also be processed, but not limited to, by:
decoding the second non-key frame according to the first decoding mode if the parameter value of the motion parameter is not higher than the target threshold.
As an alternative embodiment, in step S602, the parameter value of the motion parameter of the first non-key frame may be obtained by, but is not limited to, the following manners:
obtaining decoding parameters of the first non-key frame, wherein the decoding parameters comprise at least one of: the average value of the motion vectors of the first non-key frame, the average value of the decoding costs of all decoding units of the first non-key frame, the ratio of the intra-frame prediction costs of all decoding units of the first non-key frame to the inter-frame prediction costs, the code rate of the first non-key frame and the image quality of the first non-key frame;
determining a parameter value of the motion parameter from a plurality of parameters in a case where the decoding parameter includes the plurality of parameters;
in the case where the decoding parameter includes one parameter, determining a value of the one parameter as a parameter value of the motion parameter.
As an alternative embodiment, in the above-mentioned process of obtaining the parameter value of the motion parameter of the first non-key frame, the parameter value of the motion parameter may be determined according to a plurality of parameters by, but not limited to:
normalizing each parameter in the plurality of parameters to obtain a normalized value corresponding to each parameter;
and determining the weighted sum of the normalization values corresponding to each parameter as the parameter value of the motion parameter.
As an alternative embodiment, the parameter value of the motion parameter may also be determined from a plurality of parameters, but not limited to, by:
comparing each parameter of the plurality of parameters to a threshold corresponding to said each parameter;
and determining that the parameter value of the motion parameter is higher than a target threshold value when at least one of the plurality of parameters is higher than the corresponding threshold value or the plurality of parameters are all higher than the corresponding threshold value.
As an alternative embodiment, before the step S604, the method further includes:
determining that the Mth previous and Mth non-key frames in the group of pictures refer to a previous non-key frame and a key frame and the Mth subsequent non-key frames refer to an Mth non-key frame and a key frame in the second decoding mode, wherein M is an integer greater than 2 and less than N, and N is the number of non-key frames included in the group of pictures;
determining that non-key frames in the image group are divided into a plurality of fragments in the first decoding mode, wherein the first non-key frame in each fragment only refers to key frames in the image group, and non-key frames after the first non-key frame in each fragment only refer to non-key frames positioned before the fragment; and/or determining that the non-key frames in the group of pictures in the first decoding mode only refer to key frames in the group of pictures.
It should be noted that, in this embodiment, the video decoding process is similar to the encoding process, and is not described herein again.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling an electronic device (such as a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present application.
According to another aspect of the embodiments of the present application, there is also provided a video encoding apparatus for implementing the above-described video encoding method. Fig. 7 is a schematic diagram of an alternative video encoding apparatus according to an embodiment of the present application, and as shown in fig. 7, the apparatus may include:
an obtaining module 72, configured to obtain a parameter value of a motion parameter of a first non-key frame, where the first non-key frame is a video frame that has been encoded before a second non-key frame to be currently encoded in a target video, the motion parameter is used to indicate a severity of motion of the second non-key frame relative to a reference frame of the second non-key frame, and the parameter value of the motion parameter is proportional to the severity;
a determining module 74, configured to determine to switch the encoding mode from a first encoding mode to a second encoding mode if the parameter value of the motion parameter is higher than a target threshold, wherein the non-key frames in the first encoding mode and the second encoding mode only configure forward reference frames, and a distance between a reference frame and a non-key frame configured by the non-key frame in the second encoding mode is smaller than a distance between a reference frame and a non-key frame configured by the non-key frame in the first encoding mode;
a first encoding module 76, configured to encode the second non-key frame according to the second encoding mode, where in a case where a non-key frame is included after the second non-key frame, the non-key frame after the second non-key frame is encoded according to the second encoding mode.
It should be noted that the obtaining module 72 in this embodiment may be configured to execute the step S202 in this embodiment, the determining module 74 in this embodiment may be configured to execute the step S204 in this embodiment, and the first encoding module 76 in this embodiment may be configured to execute the step S206 in this embodiment.
It should be noted here that the modules described above are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the disclosure of the above embodiments. It should be noted that the modules described above as a part of the apparatus may operate in a hardware environment as shown in fig. 1, and may be implemented by software or hardware.
Through the modules, for the second non-key frame to be coded currently, the parameter value of the motion parameter of the first non-key frame coded before the second non-key frame is obtained, judging whether to switch the coding mode according to the relation between the parameter value of the motion parameter and the target threshold value, if the parameter value of the motion parameter is higher than the target threshold value, which indicates that the motion of the non-key frame relative to the key frame is more severe, the coding mode is switched from a first coding mode in which the distance between the coding frame and the reference frame is larger to a second coding mode in which the distance between the coding frame and the reference frame is smaller, thereby reducing the influence of motion on the coding process, and the first coding mode and the second coding mode are both non-key frames and only configure the forward reference frame, achieving the purpose of considering both decoding delay and coding quality, therefore, the technical effect of improving the flexibility of encoding and decoding of the video is achieved, and the technical problem of poor flexibility of encoding and decoding of the video in the related technology is solved.
As an alternative embodiment, the determining module includes:
a first determining unit, configured to determine a target threshold interval in which a parameter value of the motion parameter falls in a plurality of threshold intervals, where the threshold intervals correspond to a plurality of coding modes in a one-to-one manner, where each of the coding modes is a non-key frame and only configures a forward reference frame;
and a second determining unit, configured to determine, as the second encoding mode, an encoding mode corresponding to the target threshold interval.
As an alternative embodiment, the apparatus further comprises:
and a second encoding module, configured to, after obtaining the parameter value of the motion parameter of the first non-key frame, encode the second non-key frame according to the first encoding mode when the parameter value of the motion parameter is not higher than the target threshold.
As an alternative embodiment, the obtaining module includes:
an obtaining unit, configured to obtain coding parameters of the first non-key frame, where the coding parameters include at least one of: the average value of the motion vectors of the first non-key frame, the average value of the coding costs of all coding units of the first non-key frame, the ratio of the intra-frame prediction costs of all coding units of the first non-key frame to the inter-frame prediction costs, the code rate of the first non-key frame and the image quality of the first non-key frame;
a third determining unit configured to determine a parameter value of the motion parameter according to a plurality of parameters if the encoding parameter includes the plurality of parameters;
a fourth determining unit configured to determine, in a case where the encoding parameter includes one parameter, a value of the one parameter as a parameter value of the motion parameter.
As an alternative embodiment, the third determining unit is configured to:
normalizing each parameter in the plurality of parameters to obtain a normalized value corresponding to each parameter;
and determining the weighted sum of the normalization values corresponding to each parameter as the parameter value of the motion parameter.
As an alternative embodiment, the third determining unit is configured to:
comparing each parameter of the plurality of parameters to a threshold corresponding to said each parameter;
and determining that the parameter value of the motion parameter is higher than a target threshold value when at least one of the plurality of parameters is higher than the corresponding threshold value or the plurality of parameters are all higher than the corresponding threshold value.
As an alternative embodiment, the apparatus is further configured to:
before determining to switch the coding mode from the first coding mode to the second coding mode, determining that an Mth previous and Mth non-key frame in the group of pictures references a previous non-key frame and a key frame in the second coding mode, and an Mth subsequent non-key frame references an Mth non-key frame and a key frame, wherein M is an integer greater than 2 and less than N, and N is the number of non-key frames included in the group of pictures;
before determining to switch the coding mode from a first coding mode to a second coding mode, determining that non-key frames in a picture group in the first coding mode are divided into a plurality of segments, wherein a first non-key frame in each segment only refers to key frames in the picture group, and non-key frames after the first non-key frame in each segment only refer to non-key frames positioned before in the segment; and/or determining that the non-key frames in the group of pictures in the first coding mode only refer to key frames in the group of pictures.
According to another aspect of the embodiments of the present application, there is also provided a video encoding apparatus for implementing the above-described video encoding method. Fig. 8 is a schematic diagram of an alternative video encoding apparatus according to an embodiment of the present application, and as shown in fig. 8, the apparatus may include:
an obtaining module 82, configured to obtain a parameter value of a motion parameter of a first non-key frame, where the first non-key frame is a video frame that has been decoded before a second non-key frame to be decoded currently in a target video, the motion parameter is used to indicate a severity of motion of the second non-key frame relative to a reference frame of the second non-key frame, and the parameter value of the motion parameter is proportional to the severity;
a determining module 84, configured to determine to switch the decoding mode from a first decoding mode to a second decoding mode if the parameter value of the motion parameter is higher than a target threshold, wherein the non-key frames in the first decoding mode and the second decoding mode only configure forward reference frames, and a distance between a reference frame configured by a non-key frame and a non-key frame in the second decoding mode is smaller than a distance between a reference frame configured by a non-key frame and a non-key frame in the first decoding mode;
a decoding module 86, configured to decode the second non-key frame according to the second decoding mode, where if a non-key frame is included after the second non-key frame, the non-key frame after the second non-key frame is decoded according to the second decoding mode.
It should be noted that the obtaining module 82 in this embodiment may be configured to execute step S602 in this embodiment, the determining module 84 in this embodiment may be configured to execute step S604 in this embodiment, and the encoding module 86 in this embodiment may be configured to execute step S606 in this embodiment.
As an alternative embodiment, the determining module is configured to:
determining a target threshold interval in which a parameter value of the motion parameter falls in a plurality of threshold intervals, wherein the threshold intervals correspond to a plurality of coding modes one to one, and the coding modes are all non-key frames and only configure a forward reference frame;
and determining the coding mode corresponding to the target threshold interval as the second coding mode.
As an alternative embodiment, the apparatus is further configured to:
after obtaining the parameter value of the motion parameter of the first non-key frame, encoding the second non-key frame according to the first encoding mode under the condition that the parameter value of the motion parameter is not higher than the target threshold.
As an alternative embodiment, the obtaining module is configured to:
acquiring coding parameters of the first non-key frame, wherein the coding parameters comprise at least one of the following: the average value of the motion vectors of the first non-key frame, the average value of the coding costs of all coding units of the first non-key frame, the ratio of the intra-frame prediction costs of all coding units of the first non-key frame to the inter-frame prediction costs, the code rate of the first non-key frame and the image quality of the first non-key frame;
determining a parameter value of the motion parameter according to a plurality of parameters in the case that the encoding parameter includes the plurality of parameters;
in the case where the encoding parameter includes one parameter, the value of the one parameter is determined as the parameter value of the motion parameter.
As an alternative embodiment, the obtaining module is configured to:
normalizing each parameter in the plurality of parameters to obtain a normalized value corresponding to each parameter;
and determining the weighted sum of the normalization values corresponding to each parameter as the parameter value of the motion parameter.
As an alternative embodiment, the obtaining module is configured to:
comparing each parameter of the plurality of parameters to a threshold corresponding to said each parameter;
and determining that the parameter value of the motion parameter is higher than a target threshold value when at least one of the plurality of parameters is higher than the corresponding threshold value or the plurality of parameters are all higher than the corresponding threshold value.
As an alternative embodiment, the apparatus is further configured to:
before determining to switch the coding mode from the first coding mode to the second coding mode, determining that an Mth previous and Mth non-key frame in the group of pictures references a previous non-key frame and a key frame in the second coding mode, and an Mth subsequent non-key frame references an Mth non-key frame and a key frame, wherein M is an integer greater than 2 and less than N, and N is the number of non-key frames included in the group of pictures;
determining that non-key frames in the image group are divided into a plurality of segments in the first coding mode, wherein the first non-key frame in each segment only refers to key frames in the image group, and non-key frames after the first non-key frame in each segment only refer to non-key frames positioned before the segment; and/or determining that the non-key frames in the group of pictures in the first coding mode only refer to key frames in the group of pictures.
It should be noted here that the modules described above are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the disclosure of the above embodiments. It should be noted that the modules described above as a part of the apparatus may be operated in a hardware environment as shown in fig. 1, and may be implemented by software, or may be implemented by hardware, where the hardware environment includes a network environment.
According to a further aspect of the embodiments of the present invention, there is also provided an electronic device for implementing the video encoding method, as shown in fig. 9, the electronic device includes a memory 902 and a processor 904, the memory 902 stores a computer program, and the processor 904 is configured to execute the steps in any one of the method embodiments by the computer program.
Optionally, in this embodiment, the electronic apparatus may be located in at least one network device of a plurality of network devices of a computer network.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
acquiring a parameter value of a motion parameter of a first non-key frame, wherein the first non-key frame is a video frame which is coded before a second non-key frame to be coded currently in a target video, the motion parameter is used for indicating the intensity of motion of the second non-key frame relative to a reference frame of the second non-key frame, and the parameter value of the motion parameter is in direct proportion to the intensity;
in the case that the parameter value of the motion parameter is higher than a target threshold value, determining to switch the encoding mode from a first encoding mode to a second encoding mode, wherein the non-key frames in the first encoding mode and the second encoding mode only configure forward reference frames, and the distance between the reference frames and the non-key frames configured by the non-key frames in the second encoding mode is smaller than the distance between the reference frames and the non-key frames configured by the non-key frames in the first encoding mode;
and encoding the second non-key frame according to the second encoding mode, wherein if a non-key frame is included after the second non-key frame, the non-key frame after the second non-key frame is encoded according to the second encoding mode.
Optionally, in this embodiment, the processor may be further configured to execute, by the computer program, the following steps:
acquiring a parameter value of a motion parameter of a first non-key frame, wherein the first non-key frame is a video frame decoded before a second non-key frame to be decoded currently in a target video, the motion parameter is used for indicating the intensity of motion of the second non-key frame relative to a reference frame of the second non-key frame, and the parameter value of the motion parameter is in direct proportion to the intensity;
determining to switch a decoding mode from a first decoding mode to a second decoding mode if a parameter value of the motion parameter is higher than a target threshold, wherein the non-key frames in the first decoding mode and the second decoding mode only configure forward reference frames, and a distance between a reference frame and a non-key frame configured by the non-key frame in the second decoding mode is smaller than a distance between a reference frame and a non-key frame configured by the non-key frame in the first decoding mode;
and decoding the second non-key frame according to the second decoding mode, wherein if a non-key frame is included after the second non-key frame, the non-key frame after the second non-key frame is decoded according to the second decoding mode.
Alternatively, it can be understood by those skilled in the art that the structure shown in fig. 9 is only an illustration, and the electronic device may also be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, and a Mobile Internet Device (MID), a PAD, and the like. Fig. 9 is a diagram illustrating a structure of the electronic device. For example, the electronic device may also include more or fewer components (e.g., network interfaces, etc.) than shown in FIG. 9, or have a different configuration than shown in FIG. 9.
The memory 902 may be configured to store software programs and modules, such as program instructions/modules corresponding to the video encoding or decoding method and apparatus in the embodiments of the present invention, and the processor 904 executes various functional applications and data processing by executing the software programs and modules stored in the memory 902, that is, implements the video encoding or decoding method described above. The memory 902 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 902 may further include memory located remotely from the processor 904, which may be connected to the terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof. The memory 902 may be, but not limited to, specifically used for storing data and information in a video encoding and decoding process. As an example, as shown in fig. 9, the memory 902 may include, but is not limited to, an obtaining module 9022, a determining module 9024, and a first encoding module 9026 in the video image processing apparatus. In addition, the video encoding apparatus may further include, but is not limited to, other module units in the video encoding apparatus, which is not described in this example again.
As another example, the memory 902 may further include, but is not limited to, an obtaining module, a determining module, and a decoding module in the video decoding apparatus. In addition, the video decoding apparatus may further include, but is not limited to, other module units in the video decoding apparatus, which is not described in this example again.
Optionally, the transmitting device 906 is used for receiving or sending data via a network. Examples of the network may include a wired network and a wireless network. In one example, the transmission device 906 includes a network adapter (NIC) that can be connected to a router via a network cable and other network devices to communicate with the internet or a local area network. In one example, the transmission device 906 is a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
In addition, the electronic device further includes: a display 908 for displaying data and information during the video encoding and decoding process; and a connection bus 910 for connecting the respective module parts in the above-described electronic apparatus.
Embodiments of the present application also provide a storage medium. Alternatively, in the present embodiment, the storage medium may be a program code for executing an encoding method of a video.
Optionally, in this embodiment, the storage medium may be located on at least one of a plurality of network devices in a network shown in the above embodiment.
Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps:
acquiring a parameter value of a motion parameter of a first non-key frame, wherein the first non-key frame is a video frame which is coded before a second non-key frame to be coded currently in a target video, the motion parameter is used for indicating the intensity of motion of the second non-key frame relative to a reference frame of the second non-key frame, and the parameter value of the motion parameter is in direct proportion to the intensity;
in the case that the parameter value of the motion parameter is higher than a target threshold value, determining to switch the encoding mode from a first encoding mode to a second encoding mode, wherein the non-key frames in the first encoding mode and the second encoding mode only configure forward reference frames, and the distance between the reference frames and the non-key frames configured by the non-key frames in the second encoding mode is smaller than the distance between the reference frames and the non-key frames configured by the non-key frames in the first encoding mode;
and encoding the second non-key frame according to the second encoding mode, wherein if a non-key frame is included after the second non-key frame, the non-key frame after the second non-key frame is encoded according to the second encoding mode.
Optionally, in this embodiment, the storage medium is further configured to store program code for performing the following steps:
acquiring a parameter value of a motion parameter of a first non-key frame, wherein the first non-key frame is a video frame decoded before a second non-key frame to be decoded currently in a target video, the motion parameter is used for indicating the intensity of motion of the second non-key frame relative to a reference frame of the second non-key frame, and the parameter value of the motion parameter is in direct proportion to the intensity;
determining to switch a decoding mode from a first decoding mode to a second decoding mode if a parameter value of the motion parameter is higher than a target threshold, wherein the non-key frames in the first decoding mode and the second decoding mode only configure forward reference frames, and a distance between a reference frame and a non-key frame configured by the non-key frame in the second decoding mode is smaller than a distance between a reference frame and a non-key frame configured by the non-key frame in the first decoding mode;
and decoding the second non-key frame according to the second decoding mode, wherein if a non-key frame is included after the second non-key frame, the non-key frame after the second non-key frame is decoded according to the second decoding mode.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment is not described herein again.
Optionally, in this embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a storage medium, and including instructions for causing one or more computer devices (which may be personal computers, servers, network devices, or the like) to execute all or part of the steps of the method described in the embodiments of the present application.
In the above embodiments of the present application, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present application and it should be noted that those skilled in the art can make several improvements and modifications without departing from the principle of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.

Claims (18)

1. A method for encoding video, comprising:
acquiring a parameter value of a motion parameter of a first non-key frame, wherein the first non-key frame is a video frame which is coded before a second non-key frame to be coded currently in a target video, the motion parameter is used for indicating the intensity of motion of the second non-key frame relative to a reference frame of the second non-key frame, and the parameter value of the motion parameter is in direct proportion to the intensity;
in the case that the parameter value of the motion parameter is higher than a target threshold value, determining to switch the encoding mode from a first encoding mode to a second encoding mode, wherein the non-key frames in the first encoding mode and the second encoding mode only configure forward reference frames, and the distance between the reference frames and the non-key frames configured by the non-key frames in the second encoding mode is smaller than the distance between the reference frames and the non-key frames configured by the non-key frames in the first encoding mode;
and encoding the second non-key frame according to the second encoding mode, wherein if a non-key frame is included after the second non-key frame, the non-key frame after the second non-key frame is encoded according to the second encoding mode.
2. The method of claim 1, wherein determining to switch the coding mode from the first coding mode to the second coding mode comprises:
determining a target threshold interval in which a parameter value of the motion parameter falls in a plurality of threshold intervals, wherein the threshold intervals correspond to a plurality of coding modes one to one, and the coding modes are all non-key frames and only configure a forward reference frame;
and determining the coding mode corresponding to the target threshold interval as the second coding mode.
3. The method of claim 1, wherein after obtaining parameter values for the motion parameters for the first non-key frame, the method further comprises:
and under the condition that the parameter value of the motion parameter is not higher than the target threshold value, the second non-key frame is coded according to the first coding mode.
4. The method of claim 1, wherein obtaining parameter values for the motion parameters of the first non-key frame comprises:
acquiring coding parameters of the first non-key frame, wherein the coding parameters comprise at least one of the following: the average value of the motion vectors of the first non-key frame, the average value of the coding costs of all coding units of the first non-key frame, the ratio of the intra-frame prediction costs of all coding units of the first non-key frame to the inter-frame prediction costs, the code rate of the first non-key frame and the image quality of the first non-key frame;
determining a parameter value of the motion parameter according to a plurality of parameters in the case that the encoding parameter includes the plurality of parameters;
in the case where the encoding parameter includes one parameter, the value of the one parameter is determined as the parameter value of the motion parameter.
5. The method of claim 4, wherein determining the parameter value for the athletic parameter from the plurality of parameters comprises:
normalizing each parameter in the plurality of parameters to obtain a normalized value corresponding to each parameter;
and determining the weighted sum of the normalization values corresponding to each parameter as the parameter value of the motion parameter.
6. The method of claim 4, wherein determining the parameter value for the athletic parameter from the plurality of parameters comprises:
comparing each parameter of the plurality of parameters to a threshold corresponding to said each parameter;
and determining that the parameter value of the motion parameter is higher than a target threshold value when at least one of the plurality of parameters is higher than the corresponding threshold value or the plurality of parameters are all higher than the corresponding threshold value.
7. The method of claim 1, wherein prior to determining to switch the coding mode from the first coding mode to the second coding mode, the method further comprises:
determining that the Mth previous and Mth non-key frames in the group of pictures refer to a previous non-key frame and a key frame and the Mth subsequent non-key frames refer to an Mth non-key frame and a key frame in the second encoding mode, wherein M is an integer greater than 2 and less than N, and N is the number of non-key frames included in the group of pictures;
determining that non-key frames in the image group are divided into a plurality of segments in the first coding mode, wherein the first non-key frame in each segment only refers to key frames in the image group, and non-key frames after the first non-key frame in each segment only refer to non-key frames positioned before the segment; and/or determining that the non-key frames in the group of pictures in the first coding mode only refer to key frames in the group of pictures.
8. A method for decoding video, comprising:
acquiring a parameter value of a motion parameter of a first non-key frame, wherein the first non-key frame is a video frame decoded before a second non-key frame to be decoded currently in a target video, the motion parameter is used for indicating the intensity of motion of the second non-key frame relative to a reference frame of the second non-key frame, and the parameter value of the motion parameter is in direct proportion to the intensity;
determining to switch a decoding mode from a first decoding mode to a second decoding mode if a parameter value of the motion parameter is higher than a target threshold, wherein the non-key frames in the first decoding mode and the second decoding mode only configure forward reference frames, and a distance between a reference frame and a non-key frame configured by the non-key frame in the second decoding mode is smaller than a distance between a reference frame and a non-key frame configured by the non-key frame in the first decoding mode;
and decoding the second non-key frame according to the second decoding mode, wherein if a non-key frame is included after the second non-key frame, the non-key frame after the second non-key frame is decoded according to the second decoding mode.
9. The method of claim 8, wherein determining to switch a decoding mode from the first decoding mode to the second decoding mode comprises:
determining a target threshold interval in which a parameter value of the motion parameter falls in a plurality of threshold intervals, wherein the threshold intervals correspond to a plurality of decoding modes one to one, and all the decoding modes are non-key frames and only configure a forward reference frame;
and determining the decoding mode corresponding to the target threshold interval as the second decoding mode.
10. The method of claim 8, wherein after obtaining parameter values for the motion parameters for the first non-key frame, the method further comprises:
decoding the second non-key frame according to the first decoding mode if the parameter value of the motion parameter is not higher than the target threshold.
11. The method of claim 8, wherein obtaining parameter values for the motion parameters of the first non-key frame comprises:
obtaining decoding parameters of the first non-key frame, wherein the decoding parameters comprise at least one of: the average value of the motion vectors of the first non-key frame, the average value of the decoding costs of all decoding units of the first non-key frame, the ratio of the intra-frame prediction costs of all decoding units of the first non-key frame to the inter-frame prediction costs, the code rate of the first non-key frame and the image quality of the first non-key frame;
determining a parameter value of the motion parameter from a plurality of parameters in a case where the decoding parameter includes the plurality of parameters;
in the case where the decoding parameter includes one parameter, determining a value of the one parameter as a parameter value of the motion parameter.
12. The method of claim 11, wherein determining the parameter value for the athletic parameter from the plurality of parameters comprises:
normalizing each parameter in the plurality of parameters to obtain a normalized value corresponding to each parameter;
and determining the weighted sum of the normalization values corresponding to each parameter as the parameter value of the motion parameter.
13. The method of claim 11, wherein determining the parameter value for the athletic parameter from the plurality of parameters comprises:
comparing each parameter of the plurality of parameters to a threshold corresponding to said each parameter;
and determining that the parameter value of the motion parameter is higher than a target threshold value when at least one of the plurality of parameters is higher than the corresponding threshold value or the plurality of parameters are all higher than the corresponding threshold value.
14. The method of claim 8, wherein prior to determining to switch the decoding mode from the first decoding mode to the second decoding mode, the method further comprises:
determining that the Mth previous and Mth non-key frames in the group of pictures refer to a previous non-key frame and a key frame and the Mth subsequent non-key frames refer to an Mth non-key frame and a key frame in the second decoding mode, wherein M is an integer greater than 2 and less than N, and N is the number of non-key frames included in the group of pictures;
determining that non-key frames in the image group are divided into a plurality of fragments in the first decoding mode, wherein the first non-key frame in each fragment only refers to key frames in the image group, and non-key frames after the first non-key frame in each fragment only refer to non-key frames positioned before the fragment; and/or determining that the non-key frames in the group of pictures in the first decoding mode only refer to key frames in the group of pictures.
15. An apparatus for encoding video, comprising:
the device comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for acquiring a parameter value of a motion parameter of a first non-key frame, the first non-key frame is a video frame which is coded before a second non-key frame to be coded currently in a target video, the motion parameter is used for indicating the intensity degree of motion of the second non-key frame relative to a reference frame of the second non-key frame, and the parameter value of the motion parameter is in direct proportion to the intensity degree;
a determining module, configured to determine to switch an encoding mode from a first encoding mode to a second encoding mode if a parameter value of the motion parameter is higher than a target threshold, where non-key frames in the first encoding mode and the second encoding mode only configure forward reference frames, and a distance between reference frames and non-key frames configured by non-key frames in the second encoding mode is smaller than a distance between reference frames and non-key frames configured by non-key frames in the first encoding mode;
and a first encoding module, configured to encode the second non-key frame according to the second encoding mode, where if a non-key frame is included after the second non-key frame, the non-key frame after the second non-key frame is encoded according to the second encoding mode.
16. An apparatus for decoding video, comprising:
an obtaining module, configured to obtain a parameter value of a motion parameter of a first non-key frame, where the first non-key frame is a video frame that has been decoded before a second non-key frame to be decoded currently in a target video, the motion parameter is used to indicate a severity of motion of the second non-key frame relative to a reference frame of the second non-key frame, and the parameter value of the motion parameter is proportional to the severity;
a determining module, configured to determine to switch a decoding mode from a first decoding mode to a second decoding mode if a parameter value of the motion parameter is higher than a target threshold, where non-key frames in the first decoding mode and the second decoding mode only configure forward reference frames, and a distance between a reference frame configured by a non-key frame and a non-key frame in the second decoding mode is smaller than a distance between a reference frame configured by a non-key frame and a non-key frame in the first decoding mode;
a decoding module, configured to decode the second non-key frame according to the second decoding mode, where, when a non-key frame is included after the second non-key frame, the non-key frame after the second non-key frame is decoded according to the second decoding mode.
17. A storage medium, characterized in that the storage medium comprises a stored program, wherein the program when executed performs the method of any of the preceding claims 1 to 14.
18. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor executes the method of any of the preceding claims 1 to 14 by means of the computer program.
CN202011218409.2A 2020-11-04 2020-11-04 Video encoding method and device and video decoding method and device Active CN112351278B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011218409.2A CN112351278B (en) 2020-11-04 2020-11-04 Video encoding method and device and video decoding method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011218409.2A CN112351278B (en) 2020-11-04 2020-11-04 Video encoding method and device and video decoding method and device

Publications (2)

Publication Number Publication Date
CN112351278A true CN112351278A (en) 2021-02-09
CN112351278B CN112351278B (en) 2023-07-07

Family

ID=74429206

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011218409.2A Active CN112351278B (en) 2020-11-04 2020-11-04 Video encoding method and device and video decoding method and device

Country Status (1)

Country Link
CN (1) CN112351278B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113891019A (en) * 2021-09-24 2022-01-04 深圳Tcl新技术有限公司 Video encoding method, video encoding device, shooting equipment and storage medium
CN116233445A (en) * 2023-05-10 2023-06-06 腾讯科技(深圳)有限公司 Video encoding and decoding processing method and device, computer equipment and storage medium

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AT44064B (en) * 1909-08-17 1910-09-26 Thomas Thomassen Sabroe Pulsator for pneumatic milking.
US6748114B1 (en) * 1999-09-03 2004-06-08 Nec Corporation Moving picture encoding method and moving picture encoding apparatus
US20040146108A1 (en) * 2003-01-23 2004-07-29 Shih-Chang Hsia MPEG-II video encoder chip design
CN1649413A (en) * 2005-01-26 2005-08-03 上海大学 Quick selecting method for H.264/AVC multiple reference frame
CN101534442A (en) * 2009-04-13 2009-09-16 腾讯科技(深圳)有限公司 Video coding system and video coding method
CN101720044A (en) * 2009-12-10 2010-06-02 四川长虹电器股份有限公司 Adaptive frame structure-based AVS coding method
US20100166079A1 (en) * 2008-12-31 2010-07-01 Nxp B.V. System and method for providing fast trick modes
US20100309976A1 (en) * 2009-06-04 2010-12-09 Texas Instruments Incorporated Method and apparatus for enhancing reference frame selection
CN104754345A (en) * 2013-12-27 2015-07-01 展讯通信(上海)有限公司 Video encoding method and video encoder
CN106170979A (en) * 2014-04-30 2016-11-30 英特尔公司 Constant Quality video encodes
CN107770538A (en) * 2016-08-23 2018-03-06 华为技术有限公司 A kind of methods, devices and systems for detecting scene switch frame
CN107948654A (en) * 2017-11-21 2018-04-20 广州市百果园信息技术有限公司 Video sending, receiving method and device and terminal
CN108184126A (en) * 2017-12-27 2018-06-19 生迪智慧科技有限公司 Video coding and coding/decoding method, the encoder and decoder of snapshot image
CN108574843A (en) * 2017-03-14 2018-09-25 安讯士有限公司 Determine the method and encoder system of the GOP length for Video coding

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AT44064B (en) * 1909-08-17 1910-09-26 Thomas Thomassen Sabroe Pulsator for pneumatic milking.
US6748114B1 (en) * 1999-09-03 2004-06-08 Nec Corporation Moving picture encoding method and moving picture encoding apparatus
US20040146108A1 (en) * 2003-01-23 2004-07-29 Shih-Chang Hsia MPEG-II video encoder chip design
CN1649413A (en) * 2005-01-26 2005-08-03 上海大学 Quick selecting method for H.264/AVC multiple reference frame
US20100166079A1 (en) * 2008-12-31 2010-07-01 Nxp B.V. System and method for providing fast trick modes
CN101534442A (en) * 2009-04-13 2009-09-16 腾讯科技(深圳)有限公司 Video coding system and video coding method
US20100309976A1 (en) * 2009-06-04 2010-12-09 Texas Instruments Incorporated Method and apparatus for enhancing reference frame selection
CN101720044A (en) * 2009-12-10 2010-06-02 四川长虹电器股份有限公司 Adaptive frame structure-based AVS coding method
CN104754345A (en) * 2013-12-27 2015-07-01 展讯通信(上海)有限公司 Video encoding method and video encoder
CN106170979A (en) * 2014-04-30 2016-11-30 英特尔公司 Constant Quality video encodes
CN107770538A (en) * 2016-08-23 2018-03-06 华为技术有限公司 A kind of methods, devices and systems for detecting scene switch frame
CN108574843A (en) * 2017-03-14 2018-09-25 安讯士有限公司 Determine the method and encoder system of the GOP length for Video coding
CN107948654A (en) * 2017-11-21 2018-04-20 广州市百果园信息技术有限公司 Video sending, receiving method and device and terminal
CN108184126A (en) * 2017-12-27 2018-06-19 生迪智慧科技有限公司 Video coding and coding/decoding method, the encoder and decoder of snapshot image

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
GIORGIO RASCIONI,ET AL: "An Optimized Dynamic Scene Change Detection Algorithm for H.264/AVC Encoded VIdeo Sequences", 《INTERNATIONAL JOURNAL OF DIGITAL MULTIMEDIA BROADCASTING》 *
刘君,等: "场景切换时的码率控制研究", 《第十四届全国图象图形学学术会议论文集》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113891019A (en) * 2021-09-24 2022-01-04 深圳Tcl新技术有限公司 Video encoding method, video encoding device, shooting equipment and storage medium
CN116233445A (en) * 2023-05-10 2023-06-06 腾讯科技(深圳)有限公司 Video encoding and decoding processing method and device, computer equipment and storage medium
CN116233445B (en) * 2023-05-10 2023-07-14 腾讯科技(深圳)有限公司 Video encoding and decoding processing method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN112351278B (en) 2023-07-07

Similar Documents

Publication Publication Date Title
CN105409216B (en) Conditional concealment of lost video data
CN112040233B (en) Video encoding method, video decoding method, video encoding device, video decoding device, electronic device, and storage medium
Psannis HEVC in wireless environments
CN112333448B (en) Video encoding method and apparatus, video decoding method and apparatus, electronic device, and storage medium
CN112351285B (en) Video encoding method, video decoding method, video encoding device, video decoding device, electronic equipment and storage medium
CN101663895B (en) Video coding mode selection using estimated coding costs
CN112351278B (en) Video encoding method and device and video decoding method and device
CN110636312A (en) Video encoding and decoding method and device and storage medium
CN111182300B (en) Method, device and equipment for determining coding parameters and storage medium
CN110545433B (en) Video encoding and decoding method and device and storage medium
CN116567228A (en) Encoding method, real-time communication method, apparatus, device and storage medium
WO2014012219A1 (en) Video quality assessment at a bitstream level
EP3319317B1 (en) Video encoding and decoding method and device
CN112351276B (en) Video encoding method and device and video decoding method and device
WO2014032463A1 (en) Method and apparatus for estimating content complexity for video quality assessment
CN110662071A (en) Video decoding method and apparatus, storage medium, and electronic apparatus
CN110572672A (en) Video encoding and decoding method and device, storage medium and electronic device
CN110545431B (en) Video decoding method and device, video encoding method and device
CN110636293B (en) Video encoding and decoding methods and devices, storage medium and electronic device
CN110677721B (en) Video encoding and decoding method and device and storage medium
CN110582022B (en) Video encoding and decoding method and device and storage medium
Usman et al. Exploiting the spatio-temporal attributes of HD videos: A bandwidth efficient approach
KR101378434B1 (en) Method for fast intra prediction mode decision
CN112351277B (en) Video encoding method and device and video decoding method and device
CN112040235B (en) Video resource encoding method and device and video resource decoding method and device

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