CN113438486A - Multi-channel video coding method and coding device - Google Patents

Multi-channel video coding method and coding device Download PDF

Info

Publication number
CN113438486A
CN113438486A CN202110508928.0A CN202110508928A CN113438486A CN 113438486 A CN113438486 A CN 113438486A CN 202110508928 A CN202110508928 A CN 202110508928A CN 113438486 A CN113438486 A CN 113438486A
Authority
CN
China
Prior art keywords
coding
path
encoding
main
source video
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110508928.0A
Other languages
Chinese (zh)
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.)
Zhongtian Xingxing Shanghai Technology Co ltd
Original Assignee
Zhongtian Xingxing Shanghai 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 Zhongtian Xingxing Shanghai Technology Co ltd filed Critical Zhongtian Xingxing Shanghai Technology Co ltd
Priority to CN202110508928.0A priority Critical patent/CN113438486A/en
Publication of CN113438486A publication Critical patent/CN113438486A/en
Pending legal-status Critical Current

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/40Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using video transcoding, i.e. partial or full decoding of a coded input stream followed by re-encoding of the decoded output stream
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • H04N19/436Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation using parallelised computational arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/44Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder

Abstract

The embodiment of the invention provides a multi-channel video coding method and a coding device, and relates to the technical field of image processing. The multi-channel video coding method comprises the following steps: dividing the multi-path coding path into a main coding path and a slave coding path, wherein the coding resolution of the main coding path is greater than that of at least one slave coding path, and the coding resolution of the slave coding path is less than that of at least one main coding path; encoding the source video image by using each main encoding path, outputting a video code stream from each main encoding path, and obtaining encoding information of each main encoding path; and for each path of slave coding path, based on the coding information of the target master coding path, coding the source video image by using the slave coding path, and outputting the video code stream from the slave coding path, wherein the target master coding path is a master coding path with a coding resolution greater than that of the slave coding path. The invention reduces the repeated calculation in the multi-path coding process and accelerates the speed of multi-path coding.

Description

Multi-channel video coding method and coding device
Technical Field
The invention relates to the technical field of image processing, in particular to a multi-channel video coding method and a coding device.
Background
Video Transcoding (Video Transcoding) refers to converting a Video code stream that has been compression-coded into another Video code stream to adapt to different network bandwidths, different terminal processing capabilities and different user requirements. Taking a video website as an example, for the same source video, a plurality of videos with different resolutions need to be transcoded for the video, and therefore, the source video needs to be transcoded by a plurality of encoders to obtain videos with various resolutions, so that a user can select a video with a proper resolution according to own broadband and requirements.
However, in the prior art, a plurality of encoders respectively and independently perform decoding, and each decoder needs to perform decoding, resampling and encoding processes, so that a large number of repeated calculations exist, and the encoding speed is reduced.
Disclosure of Invention
The invention aims to provide a multi-channel video coding method and a multi-channel video coding device, which utilize the correlation that a main coding path and a secondary coding path both code the same source video image, realize the multiplexing of coding information between the main coding path and the secondary coding path, share the same operation in multi-channel video coding, thereby reducing the repeated calculation in the multi-channel coding process and accelerating the speed of multi-channel coding.
To achieve the above object, the present invention provides a multi-channel video encoding method, comprising: dividing a multi-path coding path into a main coding path and a slave coding path, wherein the coding resolution of the main coding path is greater than that of at least one slave coding path, and the coding resolution of the slave coding path is less than that of at least one main coding path; encoding the source video image by using each main encoding path, outputting a video code stream from each main encoding path, and obtaining encoding information of each main encoding path; and for each path of slave coding path, based on the coding information of a target master coding path, coding a source video image by using the slave coding path, and outputting a video code stream from the slave coding path, wherein the target master coding path is the master coding path with a coding resolution greater than that of the slave coding path.
The present invention also provides an encoding apparatus, comprising: a plurality of encoders respectively corresponding to a plurality of encoding paths, the plurality of encoding paths being divided into a master encoding path and a slave encoding path, the encoding resolution of the master encoding path being greater than the encoding resolution of at least one of the slave encoding paths, the encoder in the master encoding path being a master encoder, the encoder in the slave encoding path being a slave encoder; the main encoder is used for encoding a source video image, outputting a video code stream from the corresponding main encoding path and obtaining encoding information of the corresponding main encoding path; the slave encoder is used for encoding a source video image based on the encoding information of a target main encoding path, and outputting a video code stream from the corresponding slave encoding path, wherein the target main encoding path is the main encoding path with the encoding resolution ratio larger than that of the slave encoding path.
In the embodiment of the invention, when a multi-path coding path is used for coding a source video image, the multi-path coding path is firstly divided into a main coding path and a slave coding path, the coding resolution of the main coding path is greater than the coding resolution of at least one path of the slave coding path, and the coding resolution of the slave coding path is less than the coding resolution of at least one path of the main coding path; then, each main coding path is used for respectively coding a source video image, each main coding path outputs a video code stream with a corresponding coding resolution, coding information of each main coding path can be obtained at the same time, and then when a slave coding path is used for coding the source video image, each slave coding path can code the source video image based on the coding information of the main coding path (target main coding path) with the coding resolution being greater than that of the slave coding path and output the video code stream with the corresponding coding resolution; namely, the multiplexing of the coding information between the main coding path and the auxiliary coding path is realized by utilizing the correlation that the main coding path and the auxiliary coding path are used for coding the same source video image, and the same operation in multi-path video coding is shared, so that the repeated calculation in the multi-path coding process is reduced, and the speed of multi-path coding is accelerated.
In one embodiment, the dividing the multi-path coding path into a master coding path and a slave coding path includes: and taking the coding path with the largest coding resolution in the multi-path coding paths as a main coding path, and taking the coding path with the coding resolution smaller than that of the main coding path as a slave coding path.
In one embodiment, the coding information includes coding information of macroblocks in each frame image of the source video image; the encoding processing of the source video image by using the slave encoding path based on the encoding information of the target master encoding path comprises the following steps: for each macro block of a source video image, acquiring at least one target macro block corresponding to the macro block in the coding information of the target main coding path based on the coding resolution of the target main coding path and the coding resolution of the auxiliary coding path; and based on the coding information of the target macro block corresponding to each macro block of the source video image, coding each macro block of the source video image by using the secondary coding path.
In one embodiment, the coding information comprises a reference frame image corresponding to each frame image in the source video image; the encoding processing of the source video image by using the slave encoding path based on the encoding information of the target master encoding path comprises the following steps: for a target frame image of a source video image, obtaining a reference frame image corresponding to each target frame image based on the coding information of the target main coding path, wherein the target frame image is a frame image of the source video image with the corresponding reference frame image; and based on the reference frame image corresponding to each target frame image in the source video image, encoding each target frame image of the source video image by using the slave encoding path.
In one embodiment, the encoding information further includes a frame type of each frame of image in the source video image; the encoding processing of the source video image by using the slave encoding path based on the encoding information of the target master encoding path comprises the following steps: and based on the frame type of each frame image of the source video image contained in the coding information of the target main coding path, carrying out coding processing on each frame image of the source video image by using the auxiliary coding path.
In one embodiment, before the encoding processing of the source video image by using each of the main encoding paths, outputting a video code stream from each of the main encoding paths, and obtaining encoding information of each of the main encoding paths, the method further includes: decoding the source video image through each main coding path to obtain a decoded source video image; the encoding processing of the source video image by using each main encoding path includes: encoding the decoded source video image by using each main encoding path; based on the coding information of the target main coding path, the method for coding the source video image by using the auxiliary coding path comprises the following steps: and based on the coding information of the target main coding path, carrying out coding processing on the source video image which is decoded by the target main coding path by utilizing the auxiliary coding path.
In one embodiment, the encoding the source video image by using each of the main encoding paths, and outputting the video code stream from each of the main encoding paths includes: preprocessing a source video image according to the coding parameters corresponding to the main coding path; and coding the source video image after the pre-processing to obtain a video code stream output by the main coding path.
Drawings
Fig. 1 is a schematic diagram of an encoding apparatus to which a multi-pass video encoding method according to a first embodiment of the present invention is applied;
fig. 2 is a detailed flowchart of a multi-channel video encoding method according to a first embodiment of the present invention;
fig. 3 is a schematic diagram of an encoding apparatus to which a multi-pass video encoding method according to a first embodiment of the present invention is applied, in which an encoding path having a maximum encoding resolution among multi-pass encoding paths is used as a main encoding path;
FIG. 4 is a detailed flowchart of a multi-channel video encoding method according to a second embodiment of the present invention;
FIG. 5 is a detailed flowchart of a multi-channel video encoding method according to a third embodiment of the present invention;
fig. 6 is a schematic diagram of an encoding apparatus to which a multi-pass video encoding method according to a third embodiment of the present invention is applied.
Detailed Description
The embodiments of the present invention will be described in detail below with reference to the accompanying drawings in order to more clearly understand the objects, features and advantages of the present invention. It should be understood that the embodiments shown in the drawings are not intended to limit the scope of the present invention, but are merely intended to illustrate the spirit of the technical solution of the present invention.
In the following description, for the purposes of illustrating various disclosed embodiments, certain specific details are set forth in order to provide a thorough understanding of the various disclosed embodiments. One skilled in the relevant art will recognize, however, that the embodiments may be practiced without one or more of the specific details. In other instances, well-known devices, structures and techniques associated with this application may not be shown or described in detail to avoid unnecessarily obscuring the description of the embodiments.
Throughout the specification and claims, the word "comprise" and variations thereof, such as "comprises" and "comprising," are to be understood as an open, inclusive meaning, i.e., as being interpreted to mean "including, but not limited to," unless the context requires otherwise.
Reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
As used in this specification and the appended claims, the singular forms "a", "an", and "the" include plural referents unless the context clearly dictates otherwise. It should be noted that the term "or" is generally employed in its sense including "or/and" unless the context clearly dictates otherwise.
In the following description, for the purposes of clearly illustrating the structure and operation of the present invention, directional terms will be used, but terms such as "front", "rear", "left", "right", "outer", "inner", "outer", "inward", "upper", "lower", etc. should be construed as words of convenience and should not be construed as limiting terms.
The first embodiment of the invention relates to a multi-channel video coding method, which is applied to a coding device, wherein the coding device can be applied to an application scene with video code streams with various output resolutions, such as a server of a video website. Referring to fig. 1, a coding apparatus is provided with multiple coding paths, each coding path has different coding resolutions, each coding path corresponds to one encoder 1 (only the connection relationship between the encoders 1 is schematically described in fig. 1), in addition, each coding path further includes decoding and resampling processes, a source video image input into each coding path is generally compressed, and decoding is to decode the compressed source video image by using a decoder to obtain a decoded source video image; the resampling is used for adjusting the resolution when the encoding resolution of the current encoding path is different from the resolution of the source video image.
Fig. 2 shows a specific flow of the multi-channel video encoding method according to this embodiment.
Step 101, dividing the multi-path coding path into a main coding path and a slave coding path, where the coding resolution of the main coding path is greater than the coding resolution of at least one slave coding path, and the coding resolution of the slave coding path is less than the coding resolution of at least one main coding path.
Specifically, at least one encoding path is selected from the multiple encoding paths as a main encoding path, the encoding resolution of the main encoding path is greater than that of at least one slave encoding path, the encoding resolution of each slave encoding path is less than that of at least one main encoding path, an encoder in the main encoding path is a main encoder, and an encoder in the slave encoding path is a slave encoder.
In an example, referring to fig. 3, the multiple encoding paths are sequentially arranged according to the size of the encoding resolution, the encoding path with the largest encoding resolution in the multiple encoding paths is used as the master encoding path, and the encoding path with the encoding resolution smaller than the master encoding path is used as the slave encoding path; namely, one coding path with the largest coding resolution is selected from the multiple coding paths as a main coding path, and the coding paths except the main coding path are all slave coding paths.
And 102, encoding the source video image by using each main encoding path, outputting a video code stream from each main encoding path, and obtaining encoding information of each main encoding path.
Specifically, taking any one main encoding path as an example, after a source video image is input to the main encoding path, the source video image is decoded first, if the resolution of the source video image is different from the encoding resolution of the main encoding path, the decoded source video image needs to be resampled to obtain a source video image matched with the encoding resolution of the main encoding path, then the resampled source video image is encoded by using the main encoder in the main encoding path, and then the main encoder outputs a video code stream of the corresponding encoding resolution, and can obtain encoding information of the main encoding path when the source video image is encoded.
In this embodiment, when the main encoding path performs encoding processing on the resampled source video image, the encoding processing process includes: and preprocessing the source video image according to the coding parameters corresponding to the main coding path, and then coding the preprocessed source video image to obtain a video code stream output by the main coding path. Specifically, the encoding device presets encoding parameters corresponding to each encoding path, after receiving a resampled source video image, a main encoding path performs encoding frame type decision, scene switching detection and the like based on the encoding parameters corresponding to the main encoding path, and then a main encoder encodes the video image after pre-processing, wherein the encoding includes mode decision, reconstruction, quantization transformation, entropy encoding, code rate control and the like of a macro block (or an encoding unit) of each frame of the video image, and after completing the encoding, the main encoder outputs a corresponding video code stream and encoding information for encoding each frame of the video image.
And 103, for each path of slave coding path, based on the coding information of the target master coding path, coding the source video image by using the slave coding path, and outputting a video code stream from the slave coding path, wherein the target master coding path is the master coding path with the coding resolution greater than that of the slave coding path.
Specifically, taking any one slave encoding path as an example, selecting one master encoding path with an encoding resolution greater than that of the slave encoding path from the master encoding paths obtained by dividing in step 101, and marking as a target master encoding path; the main encoder in the target main coding path sends the coding information obtained by coding the source video image to the corresponding auxiliary encoder in the auxiliary coding path, decodes the source video image input to the auxiliary coding path, if the resolution of the source video image is different from the coding resolution of the auxiliary coding path, the decoded source video image needs to be resampled to obtain the source video image matched with the coding resolution of the auxiliary coding path, because the source video image corresponding to the coding information sent by the main encoder is the same video image as the source video image received by the auxiliary coding path, at least part of the coding information sent by the main encoder can be multiplexed, so that the auxiliary encoder can utilize the coding information sent by the main encoder to code the resampled source video image and output a video code stream with the corresponding coding resolution from the encoder, the coding speed is improved.
If the method for dividing the master encoding path and the slave encoding paths in fig. 3 is used, the divided one master encoding path may serve as a target master encoding path corresponding to each slave encoding path, and at this time, only one master encoding path is needed to perform complete encoding processing on the source video image, and the master encoder in the master encoding path simultaneously transmits encoding information during encoding processing on the source video image to the slave encoders in each slave encoding path, so that each slave encoder can perform encoding processing on the source video image based on the encoding information, and the encoding speed can be further increased; or dividing the multi-path coding paths into a plurality of groups of coding paths according to the size of the coding resolution, selecting the coding path with the maximum coding resolution from each group of coding paths as a main coding path, using other coding paths in the group of coding paths as auxiliary coding paths, and using the main coding path in each group of coding paths as a target main coding path of each auxiliary coding path in the same group.
In this embodiment, when a multi-path coding path is used to code a source video image, the multi-path coding path is first divided into a main coding path and a slave coding path, where the coding resolution of the main coding path is greater than the coding resolution of at least one slave coding path, and the coding resolution of the slave coding path is less than the coding resolution of at least one main coding path; then, each main coding path is used for respectively coding a source video image, each main coding path outputs a video code stream with a corresponding coding resolution, coding information of each main coding path can be obtained at the same time, and then when a slave coding path is used for coding the source video image, each slave coding path can code the source video image based on the coding information of the main coding path (target main coding path) with the coding resolution being greater than that of the slave coding path and output the video code stream with the corresponding coding resolution; namely, the multiplexing of the coding information between the main coding path and the auxiliary coding path is realized by utilizing the correlation that the main coding path and the auxiliary coding path are used for coding the same source video image, and the same operation in multi-path video coding is shared, so that the repeated calculation in the multi-path coding process is reduced, and the speed of multi-path coding is accelerated.
A second embodiment of the invention relates to a method of multi-channel video coding, the second embodiment being relative to the first embodiment: the present embodiment provides a specific structure for performing encoding processing on a source video image by using a secondary encoding path based on encoding information of a target primary encoding path. Wherein the encoded information includes but is not limited to: the method comprises the steps of encoding information of macro blocks in each frame of image of a source video image, a reference frame image corresponding to each frame of image in the source video image and the frame type of each frame of image in the source video image.
Fig. 4 shows a specific flow of the multi-channel video encoding method according to this embodiment.
Step 201, dividing the multi-path coding path into a main coding path and a slave coding path, where the coding resolution of the main coding path is greater than the coding resolution of at least one slave coding path, and the coding resolution of the slave coding path is less than the coding resolution of at least one main coding path. This step is substantially the same as step 101 in the first embodiment, and will not be described herein again.
Step 202, encoding the source video image by using each main encoding path, outputting a video code stream from each main encoding path, and obtaining encoding information of each main encoding path. This step is substantially the same as step 201 in the first embodiment, and will not be described herein again.
Step 203, comprising the following substeps:
in sub-step 2031, for each slave encoding path, each frame image of the source video image is encoded by the slave encoding path based on the frame type of each frame image of the source video image included in the encoding information of the target master encoding path.
Substep 2032, for each path of slave coding path, for the target frame image of the source video image, based on the coding information of the target master coding path, obtaining a reference frame image corresponding to each target frame image, where the target frame image is a frame image in the source video image where the corresponding reference frame image exists.
Sub-step 2033 is to perform encoding processing on each target frame image of the source video image by using the slave encoding path based on the reference frame image corresponding to each target frame image in the source video image.
Sub-step 2034, for each slave encoding path, for each macroblock of the source video image, based on the encoding resolution of the target master encoding path and the encoding resolution of the slave encoding path, obtaining at least one target macroblock corresponding to the macroblock in the encoding information of the target master encoding path.
Sub-step 2035 is performed to perform encoding processing on each macro block of the source video image by using the sub-encoding path based on the encoding information of the target macro block corresponding to each macro block of the source video image.
Specifically, taking the method for dividing the master encoding path and the slave encoding path in fig. 3 as an example, when the master encoder in the master encoding path encodes the source video image, in addition to outputting the video stream with the corresponding encoding resolution, the master encoder in the master encoding path may also output the encoding information when each frame of image in the source video image is encoded, where the encoding information includes, but is not limited to: the frame type of each frame of image in the source video image, a reference frame image corresponding to each frame of image in the source video image and the coding information of the macro block in each frame of image of the source video image. When a source video image is coded, the type of each frame image frame in the source video image can be an I frame (intra-frame coded frame), a P frame (front-back predictive coded frame) or a B frame (bidirectional predictive interpolation coded frame), the I frame can be used as a reference frame of the P frame and the B frame, the P frame can be used as a reference frame of the B frame, the B frame can not be used as a reference frame, and the P frame and the B frame can have one or more reference frames; for an I-frame, it has no reference frame.
For each path of slave coding path, when a slave coder in the slave coding path carries out coding processing on a source video image, firstly analyzing coding information sent by a master coder to obtain the frame type of each frame image of source image data contained in the coding information, and then respectively carrying out coding processing on each frame image based on the frame type of each frame image; specifically, for the I-frame image, the encoding parameters corresponding to the secondary encoding path are directly adopted to encode the I-frame image; for a P frame image or a B frame image, when performing motion search, a reference frame image corresponding to the frame image in the coding information sent by the main encoder is acquired as a motion search range, and then coding processing is performed based on the searched reference frame image satisfying the condition, thereby accelerating the coding speed.
In the present embodiment, the encoding information includes encoding information of macroblocks (or encoding units) of each frame image, such as block size, block type, intra prediction mode, inter motion vector, and the like.
For each path of slave encoding path, when a slave encoder in the slave encoding path performs encoding processing on each frame image of a source video image, each macro block in one frame image needs to be encoded, firstly, the resolution ratio of the encoding resolution of a master encoding path to the encoding resolution of the slave encoding path is obtained, then, according to the resolution ratio and the position and the size of the current macro block, the current macro block is mapped to a larger area on the same frame image in the source video image encoded by the master encoder, and then, the macro block contained in the area is obtained from encoding information and is a target macro block corresponding to the current macro block; when the slave encoder performs encoding processing on the current macro block, the slave encoder can perform rapid encoding processing on the current macro block according to the encoding parameters corresponding to the slave encoding path and the encoding information of each target macro block, so that the encoding speed is increased; based on the above coding process, the slave encoder can complete the fast coding of each frame of image of the source video image based on the coding information sent by the master encoder.
The third embodiment of the present invention relates to a multi-channel video coding method, and compared with the first embodiment, the third embodiment is mainly improved by: the source video image is decoded by the primary encoding path and is no longer decoded by the secondary encoding path.
Fig. 5 shows a specific flow of the multi-channel video encoding method according to this embodiment.
Step 301, dividing the multi-path coding path into a main coding path and a slave coding path, where the coding resolution of the main coding path is greater than the coding resolution of the at least one slave coding path, and the coding resolution of the slave coding path is less than the coding resolution of the at least one main coding path. This step is substantially the same as step 101 in the first embodiment, and will not be described herein again.
And step 302, decoding the source video image through each main coding path to obtain a decoded source video image.
And 303, encoding the decoded source video image by using each main encoding path, outputting a video code stream from each main encoding path, and obtaining encoding information of each main encoding path.
Specifically, taking any one main encoding path as an example, after a source video image is input to the main encoding path, the source video image is decoded to obtain a decoded source video image, if the resolution of the decoded source video image is different from the encoding resolution of the main encoding path, the decoded source video image needs to be resampled to obtain a source video image matched with the encoding resolution of the main encoding path, then the resampled source video image is encoded by using the main encoder in the main encoding path, and then the main encoder outputs a video code stream with a corresponding encoding resolution, and at the same time, encoding information of the main encoding path when the source video image is encoded can be obtained.
And 304, based on the coding information of the target main coding path, coding the source video image decoded from the target main coding path by using the auxiliary coding path.
Specifically, taking any one slave encoding path as an example, selecting one master encoding path with an encoding resolution greater than that of the slave encoding path from the master encoding paths obtained by dividing in step 301, and marking as a target master encoding path; the target main coding path sends the decoded source video image to the slave coding path after decoding the source video image, and the slave coding path resamples the decoded source video image when the resolution of the received decoded source video image is different from the coding resolution of the slave coding path to obtain the source video image matched with the coding resolution of the slave coding path; meanwhile, the main encoder of the target main encoding path can send encoding information obtained by encoding the source video image to the auxiliary encoder in the auxiliary encoding path, and because the source video image corresponding to the encoding information sent by the main encoder and the source video image received by the auxiliary encoding path are the same video image, at least part of the encoding information sent by the main encoder can be multiplexed, so that the auxiliary encoder can encode the resampled source video image (from the target encoding path) by using the encoding information sent by the main encoder, output a video code stream with a corresponding encoding resolution, and improve the encoding speed.
In one example, if the multiple encoding paths are arranged in sequence according to the size of the encoding resolution, the encoding path with the largest encoding resolution in the multiple encoding paths is used as a main encoding path, and the encoding path with the encoding resolution smaller than that of the main encoding path is used as a slave encoding path; selecting a coding path with the largest coding resolution from the multiple coding paths as a main coding path, wherein the coding paths except the main coding path are all auxiliary coding paths, please refer to fig. 6, at this time, only the source video image needs to be decoded in the coding path (main coding path) with the largest resolution, and then the main coding path sends the decoded source video image to each auxiliary coding path respectively, so as to further improve the coding speed; at the same time, the master encoding path also sends the encoding information obtained by encoding the source video image to the slave encoders in the slave encoding paths, so that the slave encoding paths can encode the source video image decoded from the target master encoding path based on the encoding information sent by the master encoding path in step 304.
In this embodiment, only the main encoding path is used to decode the source video image, and the slave encoding path may receive the decoded source video image sent by the target main encoding path and perform encoding processing, without repeating decoding of the source video image, thereby further increasing the encoding speed.
A fourth embodiment of the present invention relates to an encoding apparatus applied to an application scene having a video stream that outputs a plurality of resolutions, such as a server of a video website. As shown in fig. 1, the encoding apparatus includes: the multi-path coding system comprises a plurality of encoders 1, wherein the encoders 1 correspond to multiple paths of coding paths respectively, the coding resolution of each path of coding path is different, the multiple paths of coding paths are divided into a main coding path and a slave coding path, the coding resolution of the main coding path is greater than the coding resolution of at least one path of slave coding path, the encoder 1 in the main coding path is a main encoder, and the encoder 1 in the slave coding path is a slave encoder; wherein, each path of coding path also comprises the processes of decoding and resampling, the source video image input into each coding path is generally compressed, and the decoding is to decode the compressed source video image by using a decoder to obtain a decoded source video image; the resampling is used for adjusting the resolution when the encoding resolution of the current encoding path is different from the resolution of the source video image.
In an example, referring to fig. 3, the multiple encoding paths are sequentially arranged according to the size of the encoding resolution, the encoding path with the largest encoding resolution in the multiple encoding paths is used as the master encoding path, and the encoding path with the encoding resolution smaller than the master encoding path is used as the slave encoding path; namely, one coding path with the largest coding resolution is selected from the multiple coding paths as a main coding path, and the coding paths except the main coding path are all slave coding paths.
The main encoder is used for encoding the source video image, outputting a video code stream from the corresponding main encoding path and obtaining the encoding information of the corresponding main encoding path.
The main encoder is used for preprocessing the source video image according to the encoding parameters corresponding to the main encoding path and encoding the preprocessed source video image to obtain a video code stream output by the main encoding path. Specifically, the encoding device presets encoding parameters corresponding to each encoding path, after receiving a resampled source video image, a main encoding path performs encoding frame type decision, scene switching detection and the like based on the encoding parameters corresponding to the main encoding path, and then a main encoder encodes the video image after pre-processing, wherein the encoding includes mode decision, reconstruction, quantization transformation, entropy encoding, code rate control and the like of a macro block (or an encoding unit) of each frame of the video image, and after completing the encoding, the main encoder outputs a corresponding video code stream and encoding information for encoding each frame of the video image.
And the slave encoder is used for encoding the source video image based on the encoding information of the target main encoding path and outputting the video code stream from the corresponding slave encoding path, wherein the target main encoding path is a main encoding path with the encoding resolution being greater than that of the slave encoding path. Specifically, if the method for dividing the master encoding path and the slave encoding path in fig. 3 is used, the divided one master encoding path may serve as a target master encoding path corresponding to each slave encoding path, and at this time, only one master encoding path is needed to perform complete encoding processing on the source video image, and the master encoder in the master encoding path may simultaneously send encoding information during encoding processing on the source video image to the slave encoders in each slave encoding path, so that each slave encoder may perform encoding processing on the source video image based on the encoding information, and the encoding speed may be further increased; or dividing the multi-path coding paths into a plurality of groups of coding paths according to the size of the coding resolution, selecting the coding path with the maximum coding resolution from each group of coding paths as a main coding path, using other coding paths in the group of coding paths as auxiliary coding paths, using the main coding path in each group of coding paths as a target main coding path of each auxiliary coding path in the same group, and respectively sending the coding information when the source video image is coded to the auxiliary encoders in the auxiliary coding paths in the same group by the main encoders in the main coding paths of each group of coding paths.
In this embodiment, when a multi-path coding path is used to code a source video image, the multi-path coding path is first divided into a main coding path and a slave coding path, where the coding resolution of the main coding path is greater than the coding resolution of at least one slave coding path, and the coding resolution of the slave coding path is less than the coding resolution of at least one main coding path; then, each main coding path is used for respectively coding a source video image, each main coding path outputs a video code stream with a corresponding coding resolution, coding information of each main coding path can be obtained at the same time, and then when a slave coding path is used for coding the source video image, each slave coding path can code the source video image based on the coding information of the main coding path (target main coding path) with the coding resolution being greater than that of the slave coding path and output the video code stream with the corresponding coding resolution; namely, the multiplexing of the coding information between the main coding path and the auxiliary coding path is realized by utilizing the correlation that the main coding path and the auxiliary coding path are used for coding the same source video image, and the same operation in multi-path video coding is shared, so that the repeated calculation in the multi-path coding process is reduced, and the speed of multi-path coding is accelerated.
Since the first to third embodiments correspond to the present embodiment, the present embodiment can be implemented in cooperation with the first to third embodiments. The related technical details mentioned in the first to third embodiments are still valid in this embodiment, and the technical effects that can be achieved in the first to third embodiments can also be achieved in this embodiment, and are not described herein again in order to reduce repetition. Accordingly, the related-art details mentioned in the present embodiment can also be applied to the first to third embodiments.
While the preferred embodiments of the present invention have been described in detail above, it should be understood that aspects of the embodiments can be modified, if necessary, to employ aspects, features and concepts of the various patents, applications and publications to provide yet further embodiments.
These and other changes can be made to the embodiments in light of the above detailed description. In general, in the claims, the terms used should not be construed to be limited to the specific embodiments disclosed in the specification and the claims, but should be construed to include all possible embodiments along with the full scope of equivalents to which such claims are entitled.

Claims (10)

1. A multi-channel video encoding method, comprising:
dividing a multi-path coding path into a main coding path and a slave coding path, wherein the coding resolution of the main coding path is greater than that of at least one slave coding path, and the coding resolution of the slave coding path is less than that of at least one main coding path;
encoding the source video image by using each main encoding path, outputting a video code stream from each main encoding path, and obtaining encoding information of each main encoding path;
and for each path of slave coding path, based on the coding information of a target master coding path, coding a source video image by using the slave coding path, and outputting a video code stream from the slave coding path, wherein the target master coding path is the master coding path with a coding resolution greater than that of the slave coding path.
2. The multi-pass video coding method according to claim 1, wherein the dividing the multi-pass coding path into a master coding path and a slave coding path comprises:
and taking the coding path with the largest coding resolution in the multi-path coding paths as a main coding path, and taking the coding path with the coding resolution smaller than that of the main coding path as a slave coding path.
3. The multi-pass video coding method according to claim 1, wherein the coding information comprises coding information of macroblocks in each frame of a source video image;
the encoding processing of the source video image by using the slave encoding path based on the encoding information of the target master encoding path comprises the following steps:
for each macro block of a source video image, acquiring at least one target macro block corresponding to the macro block in the coding information of the target main coding path based on the coding resolution of the target main coding path and the coding resolution of the auxiliary coding path;
and based on the coding information of the target macro block corresponding to each macro block of the source video image, coding each macro block of the source video image by using the secondary coding path.
4. The multi-channel video coding method according to claim 1, wherein the coding information includes a reference frame picture corresponding to each frame picture in the source video pictures;
the encoding processing of the source video image by using the slave encoding path based on the encoding information of the target master encoding path comprises the following steps:
for a target frame image of a source video image, obtaining a reference frame image corresponding to each target frame image based on the coding information of the target main coding path, wherein the target frame image is a frame image of the source video image with the corresponding reference frame image;
and based on the reference frame image corresponding to each target frame image in the source video image, encoding each target frame image of the source video image by using the slave encoding path.
5. The multi-pass video coding method according to claim 1, wherein the coding information further includes a frame type of each frame of picture in the source video pictures;
the encoding processing of the source video image by using the slave encoding path based on the encoding information of the target master encoding path comprises the following steps:
and based on the frame type of each frame image of the source video image contained in the coding information of the target main coding path, carrying out coding processing on each frame image of the source video image by using the auxiliary coding path.
6. The multi-channel video coding method according to claim 1, wherein before the coding processing of the source video image by using each of the main coding paths, outputting a video stream from each of the main coding paths, and obtaining coding information of each of the main coding paths, the method further comprises:
decoding the source video image through each main coding path to obtain a decoded source video image;
the encoding processing of the source video image by using each main encoding path includes:
encoding the decoded source video image by using each main encoding path;
based on the coding information of the target main coding path, the method for coding the source video image by using the auxiliary coding path comprises the following steps:
and based on the coding information of the target main coding path, carrying out coding processing on the source video image which is decoded by the target main coding path by utilizing the auxiliary coding path.
7. The multi-pass video coding method according to any one of claims 1 to 6,
the encoding processing of the source video image by using each main encoding path and the output of the video code stream from each main encoding path include:
preprocessing a source video image according to the coding parameters corresponding to the main coding path;
and coding the source video image after the pre-processing to obtain a video code stream output by the main coding path.
8. An encoding apparatus, comprising: a plurality of encoders respectively corresponding to a plurality of encoding paths, the plurality of encoding paths being divided into a master encoding path and a slave encoding path, the encoding resolution of the master encoding path being greater than the encoding resolution of at least one of the slave encoding paths, the encoder in the master encoding path being a master encoder, the encoder in the slave encoding path being a slave encoder;
the main encoder is used for encoding a source video image, outputting a video code stream from the corresponding main encoding path and obtaining encoding information of the corresponding main encoding path;
the slave encoder is used for encoding a source video image based on the encoding information of a target main encoding path, and outputting a video code stream from the corresponding slave encoding path, wherein the target main encoding path is the main encoding path with the encoding resolution ratio larger than that of the slave encoding path.
9. The encoding apparatus as claimed in claim 8, wherein the encoding path having the largest encoding resolution among the multi-path encoding paths is a master encoding path, and the encoding path having a smaller encoding resolution than the master encoding path is a slave encoding path.
10. The encoding apparatus as claimed in claim 8, wherein the primary encoder is configured to pre-process a source video image according to the encoding parameters corresponding to the primary encoding path;
and the main encoder is used for encoding the source video image after the pre-processing to obtain a video code stream output by the main encoding path.
CN202110508928.0A 2021-05-11 2021-05-11 Multi-channel video coding method and coding device Pending CN113438486A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110508928.0A CN113438486A (en) 2021-05-11 2021-05-11 Multi-channel video coding method and coding device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110508928.0A CN113438486A (en) 2021-05-11 2021-05-11 Multi-channel video coding method and coding device

Publications (1)

Publication Number Publication Date
CN113438486A true CN113438486A (en) 2021-09-24

Family

ID=77753413

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110508928.0A Pending CN113438486A (en) 2021-05-11 2021-05-11 Multi-channel video coding method and coding device

Country Status (1)

Country Link
CN (1) CN113438486A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110075734A1 (en) * 2008-05-30 2011-03-31 Victor Company Of Japan, Limited Moving picture encoding system, moving picture encoding method, moving picture encoding program, moving picture decoding system, moving picture decoding method, moving picture decoding program, moving picture reencoding sytem, moving picture reencoding method, and moving picture reencoding program
CN106231315A (en) * 2016-08-05 2016-12-14 北京数码视讯科技股份有限公司 A kind of video coding system and the method for video coding of this system of application
CN108401185A (en) * 2018-05-03 2018-08-14 深圳市网心科技有限公司 Reference frame selecting method, video transcoding method, electronic equipment and storage medium
CN108600757A (en) * 2018-05-03 2018-09-28 深圳市网心科技有限公司 Macro block (mb) type determination method, video transcoding method, electronic equipment and storage medium
CN108769689A (en) * 2018-05-03 2018-11-06 深圳市网心科技有限公司 Skip macro blocks determination method, video transcoding method, electronic equipment and storage medium
CN111277826A (en) * 2020-01-22 2020-06-12 腾讯科技(深圳)有限公司 Video data processing method and device and storage medium
CN111741298A (en) * 2020-08-26 2020-10-02 腾讯科技(深圳)有限公司 Video coding method and device, electronic equipment and readable storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110075734A1 (en) * 2008-05-30 2011-03-31 Victor Company Of Japan, Limited Moving picture encoding system, moving picture encoding method, moving picture encoding program, moving picture decoding system, moving picture decoding method, moving picture decoding program, moving picture reencoding sytem, moving picture reencoding method, and moving picture reencoding program
CN106231315A (en) * 2016-08-05 2016-12-14 北京数码视讯科技股份有限公司 A kind of video coding system and the method for video coding of this system of application
CN108401185A (en) * 2018-05-03 2018-08-14 深圳市网心科技有限公司 Reference frame selecting method, video transcoding method, electronic equipment and storage medium
CN108600757A (en) * 2018-05-03 2018-09-28 深圳市网心科技有限公司 Macro block (mb) type determination method, video transcoding method, electronic equipment and storage medium
CN108769689A (en) * 2018-05-03 2018-11-06 深圳市网心科技有限公司 Skip macro blocks determination method, video transcoding method, electronic equipment and storage medium
CN111277826A (en) * 2020-01-22 2020-06-12 腾讯科技(深圳)有限公司 Video data processing method and device and storage medium
CN111741298A (en) * 2020-08-26 2020-10-02 腾讯科技(深圳)有限公司 Video coding method and device, electronic equipment and readable storage medium

Similar Documents

Publication Publication Date Title
CN1156164C (en) Transcoding
US20170208328A1 (en) Real-time video encoder rate control using dynamic resolution switching
KR100694275B1 (en) Transcoder device for transcoding compressed and encoded bitstream of motion picture in syntax level and motion picture communication system
KR100763205B1 (en) Method and apparatus for motion prediction using motion reverse
KR20050026484A (en) Method and apparatus for transcoding between hybrid video codec bitstreams
Tagliasacchi et al. Intra mode decision based on spatio-temporal cues in pixel domain Wyner-Ziv video coding
KR100281329B1 (en) Mode signal coding method of binary shape signal and its restoration method
KR20050031460A (en) Method and apparatus for performing multiple description motion compensation using hybrid predictive codes
Zhang et al. Efficient error recovery for multiple description video coding
CN113438486A (en) Multi-channel video coding method and coding device
CN106170089B (en) H.265-based multi-path coding method
CN1254974C (en) Video coding method and corresponding encoder
CN101494718B (en) Method and apparatus for encoding image
WO2011148887A1 (en) Video image delivery system, video image transmission device, video image delivery method, and video image delivery program
JP2004007788A (en) Device and method for encoding animation, and device and method for decoding the same
Wang et al. Single-input-multiple-ouput transcoding for video streaming
RU2648581C1 (en) Method of encoding and decoding video information of reduced, standard and high definition
KR20040046320A (en) Method for moving picture coding
JP4350796B2 (en) Image coding apparatus and bit stream generation apparatus
JP3910594B2 (en) Image encoding device
KR20240025601A (en) Reconstruction techniques for video frames
JP4260192B2 (en) Image decoding device
JP4260194B2 (en) Image decoding device
JP4260195B2 (en) Image decoding device
JP4260193B2 (en) Image decoding 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
RJ01 Rejection of invention patent application after publication

Application publication date: 20210924

RJ01 Rejection of invention patent application after publication