CN112351278B - 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
CN112351278B
CN112351278B CN202011218409.2A CN202011218409A CN112351278B CN 112351278 B CN112351278 B CN 112351278B CN 202011218409 A CN202011218409 A CN 202011218409A CN 112351278 B CN112351278 B CN 112351278B
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.)
Active
Application number
CN202011218409.2A
Other languages
Chinese (zh)
Other versions
CN112351278A (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

Abstract

The application relates to a video coding method and device, and a video decoding method and device, wherein the video coding method comprises the following steps: acquiring a parameter value of a motion parameter of a first non-key frame; 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 are only configured with forward reference frames, and the distance between the reference frames configured by the non-key frames and the non-key frames in the second coding mode is smaller than the distance between the reference frames configured by the non-key frames and the non-key frames in the first coding mode; and encoding the second non-key frames according to a second encoding mode, wherein in the case that the non-key frames are also included after the second non-key frames, the non-key frames after the second non-key frames are encoded according to the second encoding mode. The method and the device solve the technical problem of poor flexibility of encoding and decoding of the video in the related technology.

Description

Video encoding method and device and video decoding method and device
Technical Field
The present disclosure relates to the field of computers, and in particular, to a method and apparatus for encoding video, and a method and apparatus for decoding video.
Background
In the existing video coding technology, the influence of the delay of a coding mode on user experience is only considered generally, and better experience can be ensured when a user plays videos by reducing the delay as much as possible, but the method cannot adjust the coding and decoding processes of the videos according to different playing scenes, so that the flexibility of the video coding and decoding processes is poor, and videos 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 at present.
Disclosure of Invention
The application provides a video coding method and device and a video decoding method and device, which are used for at least solving the technical problem of poor coding and decoding flexibility of videos in related technologies.
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;
Under the condition that the parameter value of the motion parameter is higher than a target threshold value, determining to switch a 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 are only configured with 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;
and encoding the second non-key frame according to the second encoding mode, wherein in the case that the second non-key frame further comprises the 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 method for decoding video, 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;
Under the condition that the parameter value of the motion parameter is higher than a target threshold value, determining to switch a decoding mode from a first decoding mode to a second decoding mode, wherein the non-key frames in the first decoding mode and the second decoding mode are only configured with forward reference frames, and the distance between the reference frames and the non-key frames configured by the non-key frames in the second decoding mode is smaller than the distance between the reference frames and the non-key frames configured by the non-key frames in the first decoding mode;
and decoding the second non-key frame according to the second decoding mode, wherein if the second non-key frame further comprises the 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 method comprises the steps of acquiring parameter values of motion parameters 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 parameters are 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 values of the motion parameters are in direct proportion to the intensity;
A determining module, configured to determine, when a parameter value of the motion parameter is higher than a target threshold, to switch an encoding mode from a first encoding mode to a second encoding mode, where only forward reference frames are configured for non-key frames in the first encoding mode and the second encoding mode, and a distance between a reference frame configured for the non-key frames and a non-key frame in the second encoding mode is smaller than a distance between the reference frame configured for the non-key frames and the non-key frames in the first encoding mode;
and the first coding module is used for coding the second non-key frame according to the second coding mode, wherein the non-key frames after the second non-key frame are coded according to the second coding mode when the non-key frames after the second non-key frame are included.
According to another aspect of the embodiments of the present application, there is also provided a decoding apparatus for video, including:
the method comprises the steps of obtaining parameter values of motion parameters 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 parameters are 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 values of the motion parameters are in direct proportion to the intensity;
A determining module, configured to determine, when a parameter value of the motion parameter is higher than a target threshold, to switch a decoding mode from a first decoding mode to a second decoding mode, where the first decoding mode and a non-key frame in the second decoding mode configure only a forward reference frame, and a distance between the reference frame and the non-key frame configured by the non-key frame in the second decoding mode is smaller than a distance between the reference frame and the non-key frame configured by the non-key frame in the first decoding mode;
and the decoding module is used for decoding the second non-key frame according to the second decoding mode, wherein the non-key frame after the second non-key frame is decoded according to the second decoding mode when the non-key frame is also included after the second non-key frame.
According to another aspect of the embodiments of the present application, there is also provided a storage medium including a stored program that 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, the processor executing the method described above by the computer program.
In the embodiment of the application, a parameter value of a motion parameter of a first non-key frame is acquired, wherein the first non-key frame is a video frame 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; 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 are only configured with forward reference frames, and the distance between the reference frames configured by the non-key frames and the non-key frames in the second coding mode is smaller than the distance between the reference frames configured by the non-key frames and the non-key frames in the first coding mode; and according to the second coding mode, coding a second non-key frame, wherein under the condition that the second non-key frame further comprises the non-key frame, according to the mode of coding the non-key frame after the second non-key frame by the second coding mode, for the second non-key frame to be coded currently, acquiring the parameter value of the motion parameter of the first non-key frame which is coded before the second non-key frame, judging whether to switch the coding mode according to the relation between the parameter value of the motion parameter and the target threshold, if the parameter value of the motion parameter is higher than the target threshold, the non-key frame is relatively violent in motion, and switching the coding mode of the non-key frame from the first coding mode with a larger distance between the coding frame and the reference frame to the second coding mode with a smaller distance between the coding frame and the reference frame, so that the influence of motion on the coding process is reduced, and the first coding mode and the second coding mode are both the non-key frame and only are configured with the forward reference frame, so that the aim of taking the decoding delay and the coding quality into account is fulfilled, so that is the technical effect of improving the coding and decoding flexibility of video is improved is achieved, and the technical problem of poorer coding and decoding flexibility of video is solved in 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 invention or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, and it will be obvious to a person skilled in the art that other drawings can be obtained from these drawings without inventive effort.
Fig. 1 is a schematic diagram of a hardware environment of a video encoding 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 schematic diagram I of an alternative video encoding method according to an embodiment of the present application;
FIG. 4 is a schematic diagram II of an alternative video encoding method according to an embodiment of the present application;
FIG. 5 is a schematic diagram III of an alternative video encoding method according to an embodiment of the present application;
FIG. 6 is a flow chart of an alternative video decoding method 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 present application solution better understood by those skilled in the art, the following description will be made in detail and with reference to the accompanying drawings in the embodiments of the present application, it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the present application described herein may be implemented in sequences other than those illustrated or otherwise 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 encoding and decoding method may be applied to a hardware environment constituted by the terminal 101 and the server 103 as shown in fig. 1. As shown in fig. 1, the server 103 is connected to the terminal 101 through a network, which may be used to provide services (such as game services, application services, multimedia services, etc.) to the terminal or clients installed on the terminal, and a database may be provided on the server or independent of the server, for providing data storage services to the server 103, where the network includes, but is not limited to: the terminal 101 is not limited to a PC, a mobile phone, a tablet computer, or the like. The video encoding method of 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 method for decoding video performed by the terminal 101 according to the embodiment of the present application may be performed by a client installed thereon.
According to an aspect of the embodiments of the present application, a method embodiment of encoding video is provided. Fig. 2 is a flowchart of an alternative video encoding method according to an embodiment of the present application, as shown in fig. 2, the method may include the steps of:
Step S202, acquiring a parameter value of a motion parameter of a first non-key frame, wherein the first non-key frame is a video frame 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;
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 are only configured with 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;
and step S206, encoding the second non-key frames according to the second encoding mode, wherein, if the second non-key frames further comprise non-key frames, the non-key frames after the second non-key frames are encoded according to the second encoding mode.
Through the steps S202 to S206, for the second non-key frame to be encoded, the parameter value of the motion parameter of the first non-key frame that has been encoded before is obtained, and whether to switch the encoding mode is determined according to the relation between the parameter value of the motion parameter and the target threshold, if the parameter value of the motion parameter is higher than the target threshold, the motion of the non-key frame relative to the key frame is indicated to be more intense, and the encoding mode is switched from the first encoding mode with a larger distance between the encoding frame and the reference frame to the second encoding mode with a smaller distance between the encoding frame and the reference frame, so as to reduce the influence of the motion on the encoding process, and the first encoding mode and the second encoding mode are both the non-key frame and only configure the forward reference frame, so as to achieve the purpose of considering both the decoding delay and the encoding quality, thereby achieving the technical effect of improving the encoding and decoding flexibility of the video, and further solving the technical problem of poor encoding and decoding flexibility of the video in the related technology.
Alternatively, 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, live, real-time communication (e.g., video call) or video streaming in panoramic video, video files in panoramic video or video on demand, and so forth.
As an alternative embodiment, during live video, the encoding mode may be adaptively adjusted, but not limited to, by:
receiving a live video stream;
acquiring 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 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;
under the condition that the parameter value of the motion parameter is higher than a target threshold value, determining to switch a 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 are only configured with 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;
encoding the second non-key frame according to the second encoding mode to obtain an encoded video, wherein, under the condition that the second non-key frame further comprises the non-key frame, the non-key frame after the second non-key frame is encoded according to the second encoding mode;
And sending the encoded video to a live broadcast end of the video.
Optionally, in this embodiment, when encoding a live video, determining whether the motion degree of a non-key frame to be encoded relative to a reference frame is severe according to a parameter value of a motion parameter of the encoded non-key frame when encoding the non-key frame in the live video stream, if the motion degree is severe, switching the encoding mode from a first encoding mode with lower image quality to a second encoding mode with higher image quality, so as to adaptively adjust the encoding process of the live video, so that the encoding process considers both the requirement of delay and the requirement of image quality, thereby ensuring low-delay transmission, simultaneously improving the image quality as much as possible, and improving the experience of a user in the process of watching the live video.
As an alternative embodiment, during the playing of the panoramic video, the encoding mode may be adaptively adjusted by, but not limited to, the following processes:
under the condition that the main view angle area of panoramic video display 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 the area is switched;
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 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;
under the condition that the parameter value of the motion parameter is higher than a target threshold value, determining to switch a 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 are only configured with 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;
encoding the second non-key frame according to the second encoding mode to obtain an encoded video code stream, wherein when the second non-key frame further comprises the non-key frame, the non-key frame after the second non-key frame is encoded according to the second encoding mode;
And sending the coded video code stream to a display device of the panoramic video.
Optionally, in this embodiment, when encoding a non-key frame in a video bitstream of a panoramic video, determining whether a motion degree of the non-key frame to be encoded relative to a reference frame is severe according to a parameter value of a motion parameter of the encoded non-key frame, if the motion degree is severe, switching an encoding mode from a first encoding mode with a lower image quality to a second encoding mode with a higher image quality, so that the encoding process of the panoramic video considers both a requirement of delay and a 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 watching the panoramic video.
As an alternative embodiment, during the playing of the video asset transmitted in real time, the encoding mode may be adaptively adjusted by, but not limited to, the following processes:
acquiring video resources transmitted in real time from a video acquisition end;
determining coding information of a video frame to be coded in the video resource transmitted in real time, wherein the video frame to be coded is a non-key frame in a target video, and the coding information is used for indicating coding quality and decoding delay of the video frame;
Determining a target coding mode matched with the video frame from a target coding mode set corresponding to the video frame according to the coding information, wherein the target coding mode set comprises a coding mode allowing the video frame to be used, and only configuring a forward reference frame by a non-key frame in the coding mode allowing the video frame to be used;
encoding the video frame according to the target encoding mode to obtain an encoded video resource;
and sending the coded video resources to a video playing end.
Optionally, in this embodiment, during the process of transmitting video in real time, according to the parameter value of the motion parameter of the encoded non-key frame, it is determined whether the motion degree of the non-key frame to be encoded relative to the reference frame is severe, if the motion is severe, the encoding mode is switched from the first encoding mode with lower image quality to the second encoding mode with higher image quality, so as to adaptively adjust the process of transmitting video in real time, so that the encoding process considers both the requirement of delay and the requirement of image quality, thereby ensuring low-delay transmission, improving the image quality as much as possible, and improving the experience of the user during the process of transmitting audio and video in real time.
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 violent the second non-key frame moves with respect 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 the group of images to which the second non-key frame belongs.
As an optional embodiment, acquiring the parameter value of the motion parameter of the first non-key frame includes:
s11, 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 cost of all the coding units of the first non-key frame, the ratio of the intra-frame prediction cost to the inter-frame prediction cost of all the coding units of the first non-key frame, the code rate of the first non-key frame and the image quality of the first non-key frame;
S12, in the case that the coding parameters comprise a plurality of parameters, determining parameter values of the motion parameters according to the plurality of parameters;
s13, in the case that the coding parameter comprises one parameter, determining the value of the one parameter as the parameter value of the motion parameter.
Alternatively, in the present embodiment, the encoding parameters of the first non-key frame may include, but are not limited to, one or several of the following: mean (MV) of first non-key frame motion vector i ) The coding Cost average (Cost) of all coding units of the first non-key frame i ) Intra prediction costs for all coding units of a first non-key frame
Figure GDA0004262225570000111
Cost of inter prediction
Figure GDA0004262225570000112
Ratio of->
Figure GDA0004262225570000113
The code rate (an index such as pixel depth bpp may be used to represent the average bit of each pixel) of the first non-key frame, and the image quality (an index such as peak signal to noise ratio PSNR may be used) of the first non-key frame.
Where i represents the i-th non-key frame. A Motion Vector (MV) is used to represent motion information of a pixel block at the time of inter prediction. In order to balance distortion and code rate during coding, the distortion and the code rate are combined, and the Lagrange coefficient is converted into coding cost. A Coding Unit (CU) is the most basic coding unit in HEVC, and for I frames, all CUs have only intra prediction modes; for P-frames and B-frames, each CU may choose intra or inter prediction, by comparing the coding costs of the two types of prediction modes, choosing the one of which is the lower cost as the prediction mode for the actual coding.
Alternatively, in this embodiment, the index for measuring the intensity of motion between frames may be one or a combination of several of the above parameters. If a parameter, it can be determined directly as a parameter value of the motion parameter. If a combination of parameters is used, the parameter values of the motion parameters may be determined from the selected 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 normalized value corresponding to each parameter;
s22, determining the weighted sum of the normalized values corresponding to each parameter as the parameter value of the motion parameter.
Alternatively, in the present embodiment, if there are a plurality of parameters in common as the measurement index, the parameter value whose normalized weighted sum calculates a value as the motion parameter may be compared with the target threshold.
Alternatively, in this embodiment, the weights of the respective parameters may be set according to actual requirements, for example: the more important parameters may be set with higher weights depending on the importance of the parameters.
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 a target threshold value under the condition that at least one of the parameters is higher than the corresponding threshold value or the parameters are higher than the corresponding threshold value.
Optionally, in this embodiment, if a plurality of parameters are used together as a measurement index, each parameter may be compared with a threshold corresponding to the parameter, and the discrimination condition may take a "sum" relationship, that is, when the plurality of parameters are all higher than the corresponding threshold, it can be determined that the parameter value of the motion parameter is higher than the target threshold. The or relationship may be taken, that is, the condition for the coding mode switch is considered to be satisfied as long as one parameter is higher than the threshold.
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, encoding the second non-key frame according to the first encoding mode.
Optionally, in this embodiment, if the motion parameter is not higher than the target threshold, the current second non-key frame is encoded by using the encoding mode only referring 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 relation 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 the manner of image groups. A group of pictures (Group of Pictures, GOP) refers to a collection of consecutive pictures in a video. Typically, the first picture in the 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 frame forward references are encoded and B frame bi-directional references are encoded.
Optionally, in this embodiment, the non-key frames in the first coding mode and the second coding mode only configure the forward reference frames, i.e. only include I-frames and P-frames in the group of pictures. The partition manner of the image group may include, but is 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 manner of 8P frames, and are not described herein.
Optionally, in this embodiment, the distance between the reference frame and the non-key frame configured by the non-key frame in the second coding mode is smaller than the distance between the reference frame and the non-key frame configured by the non-key frame in the first coding mode, for example: the first coding mode may be a coding mode in which the P frame references only the I frame, and the second coding mode may be a coding mode in which the P frame references the previous P frame and I frame. Under the condition that the motion between video frames is severe, the coding mode with a large distance between the coding frame and the reference frame is switched to the coding mode with a 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 parameter and the comparison rule.
Such as: three coding parameters are used for judging the motion intensity degree of a current P frame relative to a reference frame I frame: mean value of current frame MV (MV i ) The coding Cost average (Cost of all CUs of the current frame i ) Ratio of intra prediction cost to inter prediction cost of all CUs of current frame
Figure GDA0004262225570000141
These three indices can be obtained directly at encoding and all satisfy the characteristics: the larger the value, the worse the reference performance. And if the following formula is met for the ith P frame in the GOP, starting from the next frame, switching the coding reference frame mode from the first coding mode to the second coding mode until the next GOP starts to be switched back to the ultra-low delay configuration again. Wherein T is mv ,T cost ,T cost_ratio Three thresholds are respectively, and the formula shows that when any index is larger than the threshold, the coding mode can be switched.
Figure GDA0004262225570000151
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 a parameter value of the motion parameter falls in a plurality of threshold intervals, wherein the plurality of threshold intervals are in one-to-one correspondence with a plurality of coding modes, and the plurality of coding modes are 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 coding mode may include a plurality of coding modes, where each coding mode corresponds to a threshold interval, and the second coding mode that is ultimately used in the corresponding coding mode is determined according to the threshold interval that the parameter value of the motion parameter falls into.
As an alternative embodiment, before determining to switch the coding mode from the first coding mode to the second coding mode, the method further comprises:
determining that an Mth preceding non-key frame and an Mth non-key frame in the image group in the second coding mode refer to a previous non-key frame and a key frame, and that an Mth following non-key frame refers to an Mth non-key frame and a previous non-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 image group;
determining that non-key frames in the image group in the first coding mode are divided into a plurality of fragments, wherein a 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 in the fragment; and/or determining that non-key frames in the group of pictures in the first encoding mode refer only to key frames in the group of pictures.
Alternatively, in the present embodiment, the second encoding mode may be, but not limited to, one of LDP encoding modes, the LDP encoding mode (Low-Delay-P) being a Low-Delay P frame encoding configuration, the first frame in each GOP being encoded in I frames, the subsequent frames being all encoded in P frames, and each P frame being encoded with reference to only the picture preceding it in play order. Such as: the second coding mode may be a mode in which a part of the P frames simultaneously reference the I frame and the previous P frame, and another part of the P frames simultaneously reference the previous P frame and the previous another P frame. Fig. 3 is a 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 frame refers to the previous P frame and I frame, and the 4 th subsequent P frame refers to the 4 th P frame and the previous P frame. POC (pictur order count) shows the display order of the source video frames at the time of video encoding.
It should be noted that, an optional LDP coding mode is given here, and the LDP coding mode in this embodiment may also be another kind of LDP coding mode, which is not limited in this embodiment.
Alternatively, in this embodiment, the first coding mode may be a mode in which P frames in the group of pictures are coded with reference to only I frames, that is, a first P frame after an I frame in the group of pictures is coded with reference to only I frames, and it is determined whether to switch the coding modes according to the parameter values of the motion parameters of the previous P frame from the second P frame. Fig. 4 is a 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 may refer to only I-frame encoding and decoding for all P-frames in the group of pictures.
Optionally, in this embodiment, the first coding mode may be a coding mode of determining the reference frames in a segment, where the non-key frames in the image group are divided into a plurality of segments, and a first non-key frame in each segment refers only to the key frames in the image group, and a non-key frame following the first non-key frame in each segment refers only to the non-key frames preceding the segment in which the non-key frame is located.
Alternatively, in the present embodiment, the number of the divided slices in the first encoding mode may be determined using, but not limited to, a target progression determined according to a target delay time and a target codec time, wherein the target delay time is an allowable maximum delay time, the target codec time is a codec time of one video frame, the codec time includes a time taken for encoding and a time taken for decoding, and the target progression is a number of non-key frames allowed to be encoded and decoded within the target delay time. And determining the number of the image group divided fragments according to the target progression, wherein the number of the non-key frames to be encoded contained in each fragment is smaller than or equal to the target progression.
Fig. 5 is a third schematic diagram of an alternative video encoding method according to an embodiment of the present application, as shown in fig. 5, the first encoding mode may be divided into 4 segments between 8P frames, each segment including 2P frames, the first P frame in each segment referring to an I frame, and the second P frame referring to the first P frame in the segment.
In the technical solution provided in step S206, if it is determined to switch the coding modes, the current non-key frame to be coded and the subsequent non-key frames are coded in the second coding mode.
According to an aspect of the embodiments of the present application, a method embodiment of decoding video is provided. Fig. 6 is a flowchart of an alternative video decoding method according to an embodiment of the present application, as shown in fig. 6, the method may include the steps of:
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 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, when the parameter value of the motion parameter is higher than the target threshold, determining to switch the decoding mode from a first decoding mode to a second decoding mode, where the non-key frames in the first decoding mode and the second decoding mode configure only forward reference frames, and the distance between the reference frame configured by the non-key frame and the non-key frame in the second decoding mode is smaller than the distance between the reference frame configured by the non-key frame and the non-key frame in the first decoding mode;
And step S606, decoding the second non-key frame according to the second decoding mode, where, if the second non-key frame further includes a 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 live video, the decoding mode may be adaptively adjusted, but not limited to, by:
receiving a live video stream;
acquiring 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;
under the condition that the parameter value of the motion parameter is higher than a target threshold value, determining to switch a decoding mode from a first decoding mode to a second decoding mode, wherein the non-key frames in the first decoding mode and the second decoding mode are only configured with forward reference frames, and the distance between the reference frames and the non-key frames configured by the non-key frames in the second decoding mode is smaller than the distance between the reference frames and the non-key frames configured by the non-key frames in the first decoding mode;
Decoding the second non-key frame according to the second decoding mode to obtain a decoded video, wherein if the second non-key frame further comprises a non-key frame, decoding the non-key frame after the second non-key frame according to the second decoding mode;
and playing the decoded video at the playing end of the live video.
Optionally, in this embodiment, when decoding a non-key frame in a live video stream during decoding the live video, determining whether the motion degree of the non-key frame to be decoded relative to a reference frame is severe according to the parameter value of the motion parameter of the decoded non-key frame, if the motion degree is severe, switching the decoding mode from a first decoding mode with lower image quality to a second decoding mode with higher image quality, so as to adaptively adjust the decoding process of the live video, so that the decoding process considers both the requirement of delay and the requirement of image quality, thereby ensuring low-delay transmission, simultaneously improving the image quality as much as possible, and improving the experience of a user during watching the live video.
As an alternative embodiment, during the playing of the panoramic video, the decoding mode may be adaptively adjusted by, but not limited to, the following processes:
Under the condition that the main view angle area of panoramic video display 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 the area is switched;
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;
under the condition that the parameter value of the motion parameter is higher than a target threshold value, determining to switch a decoding mode from a first decoding mode to a second decoding mode, wherein the non-key frames in the first decoding mode and the second decoding mode are only configured with forward reference frames, and the distance between the reference frames and the non-key frames configured by the non-key frames in the second decoding mode is smaller than the distance between the reference frames and the non-key frames configured by the non-key frames 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, if the second non-key frame further comprises a non-key frame, the non-key frame after the second non-key frame is decoded according to the second decoding mode;
displaying the decoded video code stream on a display device of the panoramic video.
Optionally, in this embodiment, when decoding a non-key frame in a video bitstream of a panoramic video, determining whether a motion degree of the non-key frame to be decoded relative to a reference frame is severe according to a parameter value of a motion parameter of the decoded non-key frame, if the motion degree is severe, switching a decoding mode from a first decoding mode with a lower image quality to a second decoding mode with a higher image quality, so that the decoding process of the panoramic video considers both a requirement of delay and a 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 watching the panoramic video.
As an alternative embodiment, during the playing of the video asset transmitted in real time, the decoding mode may be adaptively adjusted by, but not limited to, the following processes:
Acquiring video resources transmitted in real time from a video transmission end;
determining decoding information of a video frame to be decoded in the video resource transmitted in real time, 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 decoding delay of the video frame;
determining a target decoding mode matched with the video frame from a target decoding mode set corresponding to the video frame according to the decoding information, wherein the target decoding mode set comprises a decoding mode allowing the video frame to be used, and only configuring a forward reference frame by a non-key frame in the decoding mode allowing the video frame to be used;
decoding the video frame according to the target decoding mode to obtain a decoded video resource;
and playing the decoded video resources at a video playing end.
Optionally, in this embodiment, during the process of performing real-time video transmission, whether the motion degree of the non-key frame to be decoded relative to the reference frame is severe is determined according to the parameter value of the motion parameter of the decoded non-key frame, if the motion degree is severe, the decoding mode is switched from the first decoding mode with lower image quality to the second decoding mode with higher image quality, so that the real-time video transmission decoding process is adaptively adjusted, the decoding process can take the delay requirement and the image quality requirement into consideration, so that the image quality can be improved as much as possible while the low-delay transmission is ensured, and the experience degree of the user in the process of performing real-time audio/video communication is improved.
As an alternative embodiment, in the above step S604, it may be determined, but not limited to, that the decoding mode is switched from the first decoding mode to the second decoding mode by:
determining a target threshold interval in which a parameter value of the motion parameter falls in a plurality of threshold intervals, wherein the plurality of threshold intervals are in one-to-one correspondence with a plurality of decoding modes, and the plurality of decoding modes are non-key frames and only configure a forward reference frame;
and determining a 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, a second non-key frame may be further processed by, but not limited to:
and decoding the second non-key frame according to the first decoding mode under the condition that the parameter value of the motion parameter is not higher than the target threshold value.
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 not limited to, the following ways:
obtaining decoding parameters of the first non-key frame, wherein the decoding 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 decoding costs of all decoding units of the first non-key frame, the ratio of the intra-frame prediction costs to the inter-frame prediction costs of all decoding units of the first non-key frame, the code rate of the first non-key frame and the image quality of the first non-key frame;
In the case that the decoding parameter includes a plurality of parameters, determining a parameter value of the motion parameter according to the plurality of parameters;
in case the decoding parameter comprises a parameter, the value of the one parameter is determined as the parameter value of the motion parameter.
As an alternative embodiment, in the above process of acquiring the parameter values of the motion parameters of the first non-key frame, the parameter values of the motion parameters may be determined according to a plurality of parameters by, but not limited to, the following ways:
normalizing each parameter in the plurality of parameters to obtain a normalized value corresponding to each parameter;
and determining the weighted sum of the normalized 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, but not limited to, from a plurality of parameters by:
comparing each parameter of the plurality of parameters with a threshold corresponding to each parameter;
and determining that the parameter value of the motion parameter is higher than a target threshold value under the condition that at least one of the parameters is higher than the corresponding threshold value or the parameters are all higher than the corresponding threshold value.
As an alternative embodiment, before the step S604, the method further includes:
determining that an Mth preceding non-key frame and an Mth non-key frame in the image group in the second decoding mode refer to a previous non-key frame and a key frame, and that an Mth following non-key frame refers to an Mth non-key frame and a previous non-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 image group;
determining that non-key frames in the image group in the first decoding mode are divided into a plurality of fragments, wherein a 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 in the fragment; and/or determining that non-key frames in the group of pictures in the first decoding mode refer only to key frames in the group of pictures.
It should be noted that, in this embodiment, the decoding process of the video is similar to the encoding process described above, and will not be described here again.
It should be noted that, for simplicity of description, the foregoing method embodiments are all expressed as a series of action combinations, but it should be understood by those skilled in the art that the present application is not limited by the order of actions described, as some steps may be performed in other order or simultaneously in accordance with the present application. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily required in the present application.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk), comprising several instructions for causing an electronic device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method described in 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 video encoding method. Fig. 7 is a schematic diagram of an alternative video encoding apparatus according to an embodiment of the present application, 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 is encoded before a second non-key frame to be currently encoded in a target video, and 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, where the first encoding mode and the non-key frames in the second encoding mode configure only 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;
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 further included after the second non-key frame, encode the non-key frame after the second non-key frame according to the second encoding mode.
It should be noted that, the acquiring module 72 in this embodiment may be used to perform step S202 in the embodiment of the present application, the determining module 74 in this embodiment may be used to perform step S204 in the embodiment of the present application, and the first encoding module 76 in this embodiment may be used to perform step S206 in the embodiment of the present application.
It should be noted that the above modules are the same as examples and application scenarios implemented by the corresponding steps, but are not limited to what is disclosed in the above embodiments. It should be noted that the above modules may be implemented in software or hardware as a part of the apparatus in the hardware environment shown in fig. 1.
Through the module, for the second non-key frame to be coded, the parameter value of the motion parameter of the first non-key frame which is coded before the second non-key frame is obtained, whether the coding mode is switched is judged according to the relation between the parameter value of the motion parameter and the target threshold, if the parameter value of the motion parameter is higher than the target threshold, the motion of the non-key frame relative to the key frame is indicated to be more intense, the coding mode of the non-key frame is switched from the first coding mode with a larger distance between the coding frame and the reference frame to the second coding mode with a smaller distance between the coding frame and the reference frame, so that the influence of the motion on the coding process is reduced, and the first coding mode and the second coding mode are both the non-key frame and only are configured with the forward reference frame, so that the aim of considering the decoding delay and the coding quality is achieved, the technical effect of improving the coding and decoding flexibility of the video is achieved, and the technical problem of poor coding and decoding flexibility of the video in the related technology is solved.
As an alternative embodiment, the determining module includes:
the first determining unit is used for determining a target threshold interval in which the parameter value of the motion parameter falls in a plurality of threshold intervals, wherein the plurality of threshold intervals are in one-to-one correspondence with a plurality of coding modes, and the plurality of coding modes are non-key frames and only configure a forward reference frame;
And the second determining unit is used for determining the coding mode corresponding to the target threshold interval as the second coding mode.
As an alternative embodiment, the apparatus further comprises:
and the second coding module is used for coding the second non-key frame according to the first coding mode under the condition that the parameter value of the motion parameter is not higher than the target threshold value after the parameter value of the motion parameter of the first non-key frame is acquired.
As an alternative embodiment, the acquiring module includes:
an obtaining unit, configured to obtain a coding parameter of the first non-key frame, where the coding parameter includes at least one of: the average value of the motion vectors of the first non-key frame, the average value of the coding cost of all the coding units of the first non-key frame, the ratio of the intra-frame prediction cost to the inter-frame prediction cost of all the coding units of the first non-key frame, 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, in a case where the encoding parameter includes a plurality of parameters, a parameter value of the motion parameter according to the plurality of parameters;
A fourth determining unit configured to determine a value of one parameter as a parameter value of the motion parameter in a case where the encoding parameter includes the one 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 normalized 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 with a threshold corresponding to each parameter;
and determining that the parameter value of the motion parameter is higher than a target threshold value under the condition that at least one of the parameters is higher than the corresponding threshold value or the parameters are all higher than the corresponding threshold value.
As an alternative embodiment, the device 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 preceding non-key frame and an mth non-key frame in the image group in the second coding mode refer to a previous non-key frame and a key frame, and an mth following non-key frame refers to an mth non-key frame and a previous non-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 image group;
Before determining to switch the encoding mode from a first encoding mode to a second encoding mode, determining that non-key frames in the image group in the first encoding mode are divided into a plurality of fragments, wherein a 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 in the fragment; and/or determining that non-key frames in the group of pictures in the first encoding mode refer only 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 video encoding method. Fig. 8 is a schematic diagram of an alternative video encoding apparatus according to an embodiment of the present application, 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 decoded before a second non-key frame to be decoded currently in a target video, and 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, when the parameter value of the motion parameter is higher than a target threshold, to switch the decoding mode from a first decoding mode to a second decoding mode, where the first decoding mode and the second decoding mode are configured with only forward reference frames, and the second decoding mode is configured with reference frames and non-key frames that are less than the first decoding mode;
and 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 further 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 acquiring module 82 in this embodiment may be used to perform step S602 in the embodiment of the present application, the determining module 84 in this embodiment may be used to perform step S604 in the embodiment of the present application, and the encoding module 86 in this embodiment may be used to perform step S606 in the embodiment of the present application.
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 plurality of threshold intervals are in one-to-one correspondence with a plurality of coding modes, and the plurality of coding modes are 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 device is further configured to:
after the parameter value of the motion parameter of the first non-key frame is acquired, the second non-key frame is encoded according to the first encoding mode under the condition that the parameter value of the motion parameter is not higher than the target threshold value.
As an alternative embodiment, the acquiring module is configured to:
obtaining 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 cost of all the coding units of the first non-key frame, the ratio of the intra-frame prediction cost to the inter-frame prediction cost of all the coding units of the first non-key frame, the code rate of the first non-key frame and the image quality of the first non-key frame;
In the case that the encoding parameter includes a plurality of parameters, determining a parameter value of the motion parameter according to the plurality of parameters;
in case the encoding parameter comprises a parameter, the value of the one parameter is determined as the parameter value of the motion parameter.
As an alternative embodiment, the acquiring 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 normalized values corresponding to each parameter as the parameter value of the motion parameter.
As an alternative embodiment, the acquiring module is configured to:
comparing each parameter of the plurality of parameters with a threshold corresponding to each parameter;
and determining that the parameter value of the motion parameter is higher than a target threshold value under the condition that at least one of the parameters is higher than the corresponding threshold value or the parameters are all higher than the corresponding threshold value.
As an alternative embodiment, the device 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 preceding non-key frame and an mth non-key frame in the image group in the second coding mode refer to a previous non-key frame and a key frame, and an mth following non-key frame refers to an mth non-key frame and a previous non-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 image group;
Determining that non-key frames in the image group in the first coding mode are divided into a plurality of fragments, wherein a 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 in the fragment; and/or determining that non-key frames in the group of pictures in the first encoding mode refer only to key frames in the group of pictures.
It should be noted that the above modules are the same as examples and application scenarios implemented by the corresponding steps, but are not limited to what is disclosed in the above embodiments. It should be noted that the above modules may be implemented in software or in hardware as part of the apparatus shown in fig. 1, 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 above-described video encoding method, as shown in fig. 9, the electronic device comprising a memory 902 and a processor 904, the memory 902 having stored therein a computer program, the processor 904 being arranged to perform the steps of any of the method embodiments described above by means of the computer program.
Alternatively, in this embodiment, the electronic apparatus may be located in at least one network device of a plurality of network devices of the computer network.
Alternatively, in the present embodiment, the above-described 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;
under the condition that the parameter value of the motion parameter is higher than a target threshold value, determining to switch a 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 are only configured with 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;
and encoding the second non-key frame according to the second encoding mode, wherein in the case that the second non-key frame further comprises the 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 above processor may be further 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 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;
under the condition that the parameter value of the motion parameter is higher than a target threshold value, determining to switch a decoding mode from a first decoding mode to a second decoding mode, wherein the non-key frames in the first decoding mode and the second decoding mode are only configured with forward reference frames, and the distance between the reference frames and the non-key frames configured by the non-key frames in the second decoding mode is smaller than the distance between the reference frames and the non-key frames configured by the non-key frames in the first decoding mode;
and decoding the second non-key frame according to the second decoding mode, wherein if the second non-key frame further comprises the non-key frame, the non-key frame after the second non-key frame is decoded according to the second decoding mode.
Alternatively, it will be understood by those skilled in the art that the structure shown in fig. 9 is only schematic, 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, a mobile internet device (MobileInternetDevices, MID), a PAD, etc. Fig. 9 is not limited to the 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 used 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 the software programs and modules stored in the memory 902, thereby performing various functional applications and data processing, that is, implementing 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 remotely located relative to the processor 904, which may be connected to the terminal via 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 used to store data and information in a video codec process, among other things. As an example, as shown in fig. 9, the memory 902 may include, but is not limited to, an acquisition module 9022, a determination module 9024, and a first encoding module 9026 in the processing device including the video image. In addition, other module units in the video encoding apparatus may be included, but are not limited to, and are not described in detail in this example.
As another example, the memory 902 may further include, but is not limited to, an acquisition module, a determination module, and a decoding module in a decoding apparatus including the video. In addition, other module units in the video decoding apparatus may be included, but are not limited to, and are not described in detail in this example.
Optionally, the transmission device 906 is used to receive or transmit data via a network. Specific examples of the network described above may include wired networks and wireless networks. In one example, the transmission means 906 includes a network adapter (NetworkInterfaceController, NIC) that can connect to other network devices and routers via a network cable to communicate with the internet or a local area network. In one example, the transmission device 906 is a radio frequency (RadioFrequency, RF) module for communicating wirelessly with the internet.
In addition, the electronic device further includes: a display 908 for displaying data and information in the video encoding and decoding process; and a connection bus 910 for connecting the respective module parts in the above-described electronic device.
Embodiments of the present application also provide a storage medium. Alternatively, in the present embodiment, the above-described storage medium may be used to execute the program code of the encoding method of video.
Alternatively, in this embodiment, the storage medium may be located on at least one network device of the plurality of network devices in the network shown in the above embodiment.
Alternatively, in the present embodiment, the storage medium is configured to store program code for performing the steps of:
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;
under the condition that the parameter value of the motion parameter is higher than a target threshold value, determining to switch a 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 are only configured with 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;
And encoding the second non-key frame according to the second encoding mode, wherein in the case that the second non-key frame further comprises the non-key frame, the non-key frame after the second non-key frame is encoded according to the second encoding mode.
Optionally, in the present embodiment, the storage medium is further configured to store program code for performing the steps of:
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;
under the condition that the parameter value of the motion parameter is higher than a target threshold value, determining to switch a decoding mode from a first decoding mode to a second decoding mode, wherein the non-key frames in the first decoding mode and the second decoding mode are only configured with forward reference frames, and the distance between the reference frames and the non-key frames configured by the non-key frames in the second decoding mode is smaller than the distance between the reference frames and the non-key frames configured by the non-key frames in the first decoding mode;
And decoding the second non-key frame according to the second decoding mode, wherein if the second non-key frame further comprises the non-key frame, the non-key frame after the second non-key frame is decoded according to the second decoding mode.
Alternatively, specific examples in this embodiment may refer to examples described in the foregoing embodiments, and this embodiment is not described herein.
Alternatively, in the present embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing embodiment numbers of the present application are merely for describing, and do not represent advantages or disadvantages of the embodiments.
The integrated units in the above embodiments may be stored in the above-described computer-readable storage medium if implemented in the form of software functional units and sold or used as separate products. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, including several instructions to cause one or more computer devices (which may be personal computers, servers or network devices, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application.
In the foregoing embodiments of the present application, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In 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 exemplary, and the division of the units, such as the division of the units, is merely a logical function division, and may be implemented in another manner, for example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described as separate units may or may not be physically separate, and units shown 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 may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The foregoing is merely a preferred embodiment of the present application and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present application and are intended to be comprehended within the scope of the present application.

Claims (18)

1. A method of 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;
under the condition that the parameter value of the motion parameter is higher than a target threshold value, determining to switch a 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 are only configured with 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;
And encoding the second non-key frame according to the second encoding mode, wherein in the case that the second non-key frame further comprises the 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 encoding modes from the first encoding mode to the second encoding 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 plurality of threshold intervals are in one-to-one correspondence with a plurality of coding modes, and the plurality of coding modes are 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 the parameter values of the motion parameters of 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, encoding the second non-key frame according to the first encoding mode.
4. The method of claim 1, wherein obtaining parameter values for the motion parameters of the first non-key frame comprises:
obtaining 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 cost of all the coding units of the first non-key frame, the ratio of the intra-frame prediction cost to the inter-frame prediction cost of all the coding units of the first non-key frame, the code rate of the first non-key frame and the image quality of the first non-key frame;
in the case that the encoding parameter includes a plurality of parameters, determining a parameter value of the motion parameter according to the plurality of parameters;
in case the encoding parameter comprises a 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 of the motion 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 normalized values corresponding to each parameter as the parameter value of the motion parameter.
6. The method of claim 4, wherein determining the parameter value of the motion parameter from the plurality of parameters comprises:
comparing each parameter of the plurality of parameters with a threshold corresponding to each parameter;
and determining that the parameter value of the motion parameter is higher than a target threshold value under the condition that at least one of the parameters is higher than the corresponding threshold value or the parameters are all higher than the corresponding threshold value.
7. The method of claim 1, wherein prior to determining to switch the encoding mode from the first encoding mode to the second encoding mode, the method further comprises:
determining a non-key frame before an Mth non-key frame and an Mth non-key frame in the image group under the second coding mode refer to a previous non-key frame and a key frame, wherein the non-key frame after the Mth non-key frame refers to the Mth non-key frame and the previous non-key frame, M is an integer more than 2 and less than N, and N is the number of the non-key frames included in the image group;
determining that non-key frames in the image group in the first coding mode are divided into a plurality of fragments, wherein a 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 in the fragment; and/or determining that non-key frames in the group of pictures in the first encoding mode refer only to key frames in the group of pictures.
8. A method of 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;
under the condition that the parameter value of the motion parameter is higher than a target threshold value, determining to switch a decoding mode from a first decoding mode to a second decoding mode, wherein the non-key frames in the first decoding mode and the second decoding mode are only configured with forward reference frames, and the distance between the reference frames and the non-key frames configured by the non-key frames in the second decoding mode is smaller than the distance between the reference frames and the non-key frames configured by the non-key frames in the first decoding mode;
and decoding the second non-key frame according to the second decoding mode, wherein if the second non-key frame further comprises the 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 decoding modes 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 plurality of threshold intervals are in one-to-one correspondence with a plurality of decoding modes, and the plurality of decoding modes are non-key frames and only configure a forward reference frame;
and determining a decoding mode corresponding to the target threshold interval as the second decoding mode.
10. The method of claim 8, wherein after obtaining the parameter values of the motion parameters of the first non-key frame, the method further comprises:
and decoding the second non-key frame according to the first decoding mode under the condition that the parameter value of the motion parameter is not higher than the target threshold value.
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 following: 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 to the inter-frame prediction costs of all decoding units of the first non-key frame, the code rate of the first non-key frame and the image quality of the first non-key frame;
In the case that the decoding parameter includes a plurality of parameters, determining a parameter value of the motion parameter according to the plurality of parameters;
in case the decoding parameter comprises a parameter, the value of the one parameter is determined as the parameter value of the motion parameter.
12. The method of claim 11, wherein determining the parameter value of the motion 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 normalized values corresponding to each parameter as the parameter value of the motion parameter.
13. The method of claim 11, wherein determining the parameter value of the motion parameter from the plurality of parameters comprises:
comparing each parameter of the plurality of parameters with a threshold corresponding to each parameter;
and determining that the parameter value of the motion parameter is higher than a target threshold value under the condition that at least one of the parameters is higher than the corresponding threshold value or the 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 a non-key frame before an Mth non-key frame and an Mth non-key frame in the image group in the second decoding mode refer to a previous non-key frame and a key frame, and a non-key frame after the Mth non-key frame refers to the Mth non-key frame and the previous non-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 image group;
determining that non-key frames in the image group in the first decoding mode are divided into a plurality of fragments, wherein a 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 in the fragment; and/or determining that non-key frames in the group of pictures in the first decoding mode refer only to key frames in the group of pictures.
15. A video encoding apparatus, comprising:
the method comprises the steps of acquiring parameter values of motion parameters 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 parameters are 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 values of the motion parameters are in direct proportion to the intensity;
A determining module, configured to determine, when a parameter value of the motion parameter is higher than a target threshold, to switch an encoding mode from a first encoding mode to a second encoding mode, where only forward reference frames are configured for non-key frames in the first encoding mode and the second encoding mode, and a distance between a reference frame configured for the non-key frames and a non-key frame in the second encoding mode is smaller than a distance between the reference frame configured for the non-key frames and the non-key frames in the first encoding mode;
and the first coding module is used for coding the second non-key frame according to the second coding mode, wherein the non-key frames after the second non-key frame are coded according to the second coding mode when the non-key frames after the second non-key frame are included.
16. A video decoding apparatus, comprising:
the method comprises the steps of obtaining parameter values of motion parameters 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 parameters are 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 values of the motion parameters are in direct proportion to the intensity;
A determining module, configured to determine, when a parameter value of the motion parameter is higher than a target threshold, to switch a decoding mode from a first decoding mode to a second decoding mode, where the first decoding mode and a non-key frame in the second decoding mode configure only a forward reference frame, and a distance between the reference frame and the non-key frame configured by the non-key frame in the second decoding mode is smaller than a distance between the reference frame and the non-key frame configured by the non-key frame in the first decoding mode;
and the decoding module is used for decoding the second non-key frame according to the second decoding mode, wherein the non-key frame after the second non-key frame is decoded according to the second decoding mode when the non-key frame is also included after the second non-key frame.
17. A storage medium comprising a stored program, wherein the program when run performs the method of any one 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, characterized in that the processor performs 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 CN112351278A (en) 2021-02-09
CN112351278B true 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)

Families Citing this family (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
CN116233445B (en) * 2023-05-10 2023-07-14 腾讯科技(深圳)有限公司 Video encoding and decoding processing method and device, computer equipment and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6748114B1 (en) * 1999-09-03 2004-06-08 Nec Corporation Moving picture encoding method and moving picture encoding apparatus
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
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

Family Cites Families (4)

* 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.
US20040146108A1 (en) * 2003-01-23 2004-07-29 Shih-Chang Hsia MPEG-II video encoder chip design
US8428145B2 (en) * 2008-12-31 2013-04-23 Entropic Communications, Inc. 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

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6748114B1 (en) * 1999-09-03 2004-06-08 Nec Corporation Moving picture encoding method and moving picture encoding apparatus
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
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
An Optimized Dynamic Scene Change Detection Algorithm for H.264/AVC Encoded VIdeo Sequences;Giorgio Rascioni,et al;《International Journal of Digital MultiMedia Broadcasting》;全文 *
场景切换时的码率控制研究;刘君,等;《第十四届全国图象图形学学术会议论文集》;全文 *

Also Published As

Publication number Publication date
CN112351278A (en) 2021-02-09

Similar Documents

Publication Publication Date Title
US11451787B2 (en) Method and apparatus for video encoding and decoding
CN105409216B (en) Conditional concealment of lost video data
US20220058775A1 (en) Video denoising method and apparatus, and storage medium
US11558639B2 (en) Selective resolution video encoding method, computer device, and readable storage medium
US20060165176A1 (en) Method and apparatus for encoder assisted-frame rate up conversion (EA-FRUC) for video compression
CN112333448B (en) Video encoding method and apparatus, video decoding method and apparatus, electronic device, and storage medium
WO2021057481A1 (en) Video coding-decoding method and related device
CN112351278B (en) Video encoding method and device and video decoding method and device
CN112351285B (en) Video encoding method, video decoding method, video encoding device, video decoding device, electronic equipment and storage medium
WO2021057705A1 (en) Video encoding and decoding methods, and related apparatuses
WO2021057697A1 (en) Video encoding and decoding methods and apparatuses, storage medium, and electronic device
WO2018076370A1 (en) Video frame processing method and device
EP2875640A1 (en) Video quality assessment at a bitstream level
CN110662071B (en) Video decoding method and device, storage medium and electronic device
EP3319317B1 (en) Video encoding and decoding method and device
WO2014032463A1 (en) Method and apparatus for estimating content complexity for video quality assessment
CN110545431B (en) Video decoding method and device, video encoding method and device
WO2021057478A1 (en) Video encoding and decoding method and related apparatus
CN110636293B (en) Video encoding and decoding methods and devices, storage medium and electronic device
CN112351277B (en) Video encoding method and device and video decoding method and device
CN114222127A (en) Video coding method, video decoding method and device
Usman et al. Exploiting the spatio-temporal attributes of HD videos: A bandwidth efficient approach
US10523945B2 (en) Method for encoding and decoding video signal
CN110602507A (en) Frame loss processing method, device and system
CN112351276A (en) Video encoding method and device and video 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