A deep video encoding and decoding method supporting multiple computational complexities
By using fiberizable convolution/deconvolution layers and nonlinear transformation functions in deep video encoding and decoding methods, channel widths are automatically allocated, solving the computational complexity allocation problem and achieving multiple complexity support and efficient video decoding.
Patent Information
- Application Number
- CN202410926618.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-11
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2044-07-11
AI Technical Summary
Existing deep video encoding and decoding methods are difficult to optimize the computational complexity distribution of different modules, resulting in low video encoding and decoding efficiency, especially in the inability to effectively support multiple computational complexity in different device scenarios.
Using fiberizable convolution/deconvolution layers and non-linear transformation functions with multiple complexity constraints, the optimal channel width is automatically allocated through motion estimation, motion compensation and residual compression modules to achieve a variety of video codecs. Complexity support.
It improves video decoding efficiency, supports multiple computational complexity, eliminates video redundancy, and improves video compression efficiency and transmission quality.
Smart Images

Figure CN118474377B
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of video processing and encoding technology, and in particular relates to a deep video encoding and decoding method supporting multiple computational complexities. Background Art
[0002] Traditional image and video codecs, such as H.264 and H.265, rely heavily on manual operations. Recently, learning-based video codecs have achieved good coding performance and outperformed widely used commercial codecs such as H.264 and H.265. However, learning-based video codecs are always inefficient due to the complex computational operations. In practical application scenarios, it is best for video codecs to decode videos in real time. In addition, decoders of different devices can afford different computational complexities in different scenarios. For example, cloud servers can afford more computational resources, while smartphones can afford much less computational resources. Therefore, it is also very ideal to develop a video decoder that can support multiple computational complexities simultaneously.
[0003] In order to realize practical video codecs, it should be considered that most decoders have different modules during the decoding process. The network structures of different modules in each decoder (such as motion decoder, residual decoder and motion compensation network) need to be carefully designed to meet different complexity constraints. However, different modules need to process different types of information (such as residual information and motion information), so different channel widths are required under different complexity constraints, which makes it difficult to manually design the optimal channel width for different convolutional layers in different modules. Existing deep image compression methods do not optimally allocate a given complexity budget to different types of modules (such as motion decoder and residual decoder). Different types of modules play different roles in deep video compression. The performance degradation of some modules (such as motion decoder) (due to the use of layers with lower computational cost) may also affect subsequent modules (such as residual decoder). Therefore, how to allocate a given complexity budget to different types of modules is a difficult problem. Summary of the invention
[0004] The purpose of the embodiments of the present invention is to provide a deep video encoding and decoding method that supports multiple computational complexities, aiming to solve the problems raised in the background technology.
[0005] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:
[0006] S1. On the encoder side, motion estimation is performed using the input frame and the reference frame as input;
[0007] S2, processing the motion information from the motion estimation module through the motion compression module to obtain decoded motion information;
[0008] S3, performing motion compensation through a given reference frame and decoded motion information to generate a predicted frame;
[0009] S4, obtaining residual information through the input frame and the predicted frame, and obtaining decoded residual information through a residual compression module;
[0010] S5. Add the reconstructed residual information back to the predicted frame to generate a reconstructed output frame.
[0011] As a further limitation of the technical solution of the embodiment of the present invention, the performing motion estimation on the encoder side using the input frame and the reference frame as input comprises the following steps:
[0012] Divide the image sequence of the input frame into many non-overlapping macroblocks. In standards such as H.264, these macroblocks are usually 16x16 pixels in size.
[0013] A search range in the reference frame is set for each macroblock. The search range is usually a rectangular area centered at the corresponding position of the current macroblock in the reference frame.
[0014] Within the set search range, according to the MSE matching criterion, find the block that is most similar to the current macroblock, that is, the matching block. MSE quantifies the difference between the two macroblocks by calculating the average of the square difference between the corresponding pixel values. The smaller the MSE value, the more similar the two macroblocks are. The calculation formula of MSE is:
[0015] ;
[0016] Where M and N are the number of pixels in the macroblock in the horizontal and vertical directions, respectively; s(x,y) represents the pixel value at position (x,y) in the current macroblock; and z(x,y) represents the pixel value at the corresponding position of the candidate macroblock in the reference frame.
[0017] The relative displacement between the matching block and the current macroblock (including the horizontal and vertical components) is the motion vector, which effectively removes the inter-frame redundancy and greatly reduces the number of bits in video transmission.
[0018] Some optimization algorithms are used to further improve the accuracy and efficiency of motion estimation, such as the selection of initial search points, optimization of matching criteria, adjustment of motion search strategies, etc.
[0019] As a further limitation of the technical solution of the embodiment of the present invention, the processing of the motion information from the motion estimation module by the motion compression module to obtain the decoded motion information specifically includes the following steps:
[0020] The motion compression module includes a motion encoder, entropy encoding, entropy decoding and a motion decoder. The motion encoder encodes the motion information from the motion estimation module to generate coded motion features.
[0021] Perform entropy coding operation, convert the encoded motion features into motion bit stream, and send it to the decoder end;
[0022] At the decoder side, the motion bitstream is first entropy decoded into entropy-decoded motion features, which are then decoded into decoded motion information by a motion decoder network;
[0023] As a further limitation of the technical solution of the embodiment of the present invention, the specific operations of the entropy encoding and decoding are:
[0024] Calculate information entropy: ,in is the probability of the source sending a symbol, and q is the total number of source symbols. This formula is used to calculate the average amount of information (i.e. uncertainty) of the source, helping the encoder understand the characteristics of the source;
[0025] The calculation results of information entropy guide the establishment of the coding table. Frequently appearing symbols will be assigned shorter codewords, while infrequently appearing symbols will be assigned longer codewords.
[0026] According to the established coding table, the symbol sequence sent by the source is converted into the corresponding codeword sequence;
[0027] Entropy decoding is the reverse process of entropy coding. First, the codewords are read from the compressed bitstream. Then, a pre-established coding table (the same as that used for encoding) is used to find the original symbol corresponding to each codeword. Finally, the found symbols are combined in the order in the bitstream to restore the original data sequence.
[0028] As a further limitation of the technical solution of the embodiment of the present invention, the motion decoder specifically includes the following steps:
[0029] The motion decoder network decodes the quantized motion information into the original motion vector, and the network includes multiple convolutional layers, nonlinear transformation functions, etc. The present invention replaces each convolution / deconvolution layer in the decoder with a fiberizable convolution / deconvolution layer to achieve multiple complexity constraints, and the nonlinear transformation function selects LReLU;
[0030] The fiberizable convolutional layer adds a channel width selection module to the convolutional layer to determine the optimal channel width of each convolutional layer according to the current complexity constraints. Each convolutional layer provides three options to achieve different computational complexities;
[0031] After selecting the channel width, a convolution operation is performed to extract features from the input and generate decoded motion vectors. Nonlinear transformation introduces nonlinearity in the decoding process to better approximate the original motion vectors.
[0032] The decoded motion vector will be used in the subsequent motion compensation step.
[0033] As a further limitation of the technical solution of the embodiment of the present invention, the performing motion compensation by using a given reference frame and decoded motion information to generate a predicted frame specifically includes the following steps:
[0034] According to the decoded motion vector, find the corresponding pixel block in the reference frame;
[0035] "Move" these pixel blocks to the corresponding positions in the current frame, which is actually a copy and paste process and does not involve actual pixel displacement;
[0036] The moved pixel block is combined with other parts of the current frame (such as pixels that have not yet been predicted) to generate a predicted frame.
[0037] As a further limitation of the technical solution of the embodiment of the present invention, the step of obtaining residual information through the input frame and the predicted frame, and obtaining decoded residual information through the residual compression module specifically includes the following steps:
[0038] For each pixel or pixel block in the input frame, calculate the difference between its original value and the predicted value of the corresponding pixel or pixel block in the predicted frame to obtain the residual information ;
[0039] The residual compression module includes a residual encoder, entropy encoding, entropy decoding and a residual decoder. The residual encoder encodes the generated residual information to generate encoded residual features. ;
[0040] Perform entropy coding operation, convert the encoded residual features into residual bit stream, and send it to the decoder end;
[0041] At the decoder side, the residual bitstream is first entropy decoded into entropy decoded residual features , which is then decoded into residual motion information by the residual decoder network .
[0042] As a further limitation of the technical solution of the embodiment of the present invention, the residual encoder specifically includes the following steps:
[0043] Initialize and set relevant parameters in the arithmetic encoder;
[0044] Make coding decisions (i.e., decide on input and output), input: the binarized value of the syntax element (Binval), the context model (context_id), and the encoder's environmental parameters (such as codirange, codilow, and symCnt); output: updated codirange, codilow (the current probability interval of the arithmetic encoder, codirange indicates the length of the interval, and codilow indicates the lower limit of the interval) and symCnt (used to track the number of encoded symbols associated with a specific context or condition);
[0045] Use the current encoder range codiRange to calculate the index value i of Qi (the index value obtained from the probability model table based on the context_id and the most likely symbol state of the currently encoded Binval).
[0046] Use the state index (obtained from the context model) and i to look up the table and obtain the probability of Rlps (the probability range of non-most likely symbol states, used to update codirange and codilow);
[0047] The probability interval lower limit and the probability interval range in arithmetic coding are updated according to whether the symbol to be encoded is the most likely symbol;
[0048] The residual information is transformed, and the transformed residual signal is quantized. The specific range of the quantization step depends on the specific needs of the application and the compression ratio target. The quantization step of the low-frequency signal is set to a value between 1 and 10 (the actual value will be dynamically adjusted according to the compression quality and image content), and the quantization step of the high-frequency signal is several to dozens of times that of the low-frequency signal.
[0049] The residual information is transformed (such as discrete cosine transform DCT) to make the signal energy more concentrated, and the transformed residual signal is quantized, where a larger quantization step size is used for high-frequency signals and a smaller quantization step size is used for low-frequency signals to ensure that the basic information of the image is not lost.
[0050] As a further limitation of the technical solution of the embodiment of the present invention, the residual decoder has the following specific process:
[0051] The residual decoder network is responsible for decoding the quantized residual into the original residual data; each deconvolution layer in the decoder is replaced by a fiberizable deconvolution layer to achieve multiple complexity constraints, and the nonlinear transformation function selects IGDN;
[0052] The fiberized deconvolution layer selects the channel width before performing the convolution operation, extracts features from the input and generates decoded residual data. The nonlinear transformation introduces nonlinearity in the decoding process, which helps to recover more details from the quantized residual.
[0053] The decoded residual data will be used to combine with the predicted frame to generate the final reconstructed frame.
[0054] Compared with the prior art, the present invention has the following beneficial effects:
[0055] 1. The present invention proposes a deep video encoding and decoding method that supports multiple computational complexities for efficient video decoding. It only needs to use one learning decoder instead of multiple decoders to simultaneously support multiple complexity levels, develop a video decoder that can simultaneously support multiple computational complexities, and realize practical video codec functions.
[0056] 2. The motion decoder and residual decoder in the present invention can automatically assign the optimal complexity (i.e., the optimal channel width of different convolutional layers) to different types of modules to meet the overall complexity limit of the entire video decoder, more effectively eliminate and compress redundancy in the video, and thus achieve higher video compression efficiency.
[0057] 3. The present invention can realize data integration and analysis, upload the encoded video to the platform for integration and analysis, provide scientific data support for subsequent processing, and expand the application field of video. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required to be used in the embodiments or the description of the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention.
[0059] Figure 1 A schematic diagram showing the working principle provided by an embodiment of the present invention;
[0060] Figure 2 A schematic diagram of a motion decoder provided by an embodiment of the present invention is shown;
[0061] Figure 3 A schematic diagram of a residual decoder provided by an embodiment of the present invention is shown;
[0062] Figure 4 A schematic diagram of a complexity-guided fibrillable convolutional layer provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0063] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0064] It is understandable that deep video codec technology can more comprehensively and accurately identify, analyze and extract useful information from video sequences by learning and analyzing video sequences through deep learning algorithms. However, due to the complexity of computational operations, learning-based video codecs are always inefficient. In actual application scenarios, video codecs fail to decode videos in real time. In addition, decoders of different devices can withstand different computational complexities in different scenarios, and existing deep video codec technology is not universal.
[0065] To solve the above problems, an embodiment of the present invention provides a deep video encoding and decoding method supporting multiple computational complexities, and the specific steps of the method are as follows:
[0066] Figure 1 A schematic diagram showing the working principle provided by an embodiment of the present invention.
[0067] S1. On the encoder side, motion estimation is performed using the input frame and the reference frame as input;
[0068] In an embodiment of the present invention, an image sequence of an input frame is divided into a plurality of non-overlapping macroblocks. In standards such as H.264, these macroblocks are usually 16x16 pixels in size. A search range in a reference frame is set for each macroblock. The search range is usually a rectangular area centered on a corresponding position of the current macroblock in the reference frame. Within the set search range, a block most similar to the current macroblock, i.e., a matching block, is found according to the MSE matching criterion. The MSE quantifies the difference between the two macroblocks by calculating the average of the squares of the differences between the corresponding pixel values of the two macroblocks. The smaller the MSE value, the more similar the two macroblocks are. The calculation formula of the MSE is:
[0069] ;
[0070] Among them, M and N are the number of pixels of the macroblock in the horizontal and vertical directions respectively, s(x,y) represents the pixel value at the position (x,y) in the current macroblock, and z(x,y) represents the pixel value at the corresponding position of the candidate macroblock in the reference frame; within the set search range, according to certain matching criteria (such as absolute error and SAD, SATD, etc.), find the block that is most similar to the current macroblock, that is, the matching block; the relative displacement between the matching block and the current macroblock (including horizontal and vertical components) is the motion vector, which effectively removes inter-frame redundancy and greatly reduces the number of bits in video transmission; some optimization algorithms are used to further improve the accuracy and efficiency of motion estimation, such as the selection of initial search points, optimization of matching criteria, and adjustment of motion search strategies.
[0071] S2, processing the motion information from the motion estimation module through the motion compression module to obtain decoded motion information;
[0072] In this embodiment, the motion compression module includes a motion encoder, entropy encoding, entropy decoding and a motion decoder. The motion encoder processes the motion information from the motion estimation module. Encode and generate coded motion features ; Perform entropy coding operation to encode the motion features Converted into a motion bitstream and sent to the decoder; at the decoder, the motion bitstream is first entropy decoded into entropy decoded motion features , which is then decoded into decoded motion information by the motion decoder network .
[0073] The specific operations of entropy encoding and decoding are:
[0074] Calculate information entropy: ,in is the probability of the source sending a symbol, and q is the total number of source symbols. This formula is used to calculate the average amount of information (i.e. uncertainty) of the source, helping the encoder understand the characteristics of the source;
[0075] The calculation results of information entropy guide the establishment of the coding table. Frequently appearing symbols will be assigned shorter codewords, while infrequently appearing symbols will be assigned longer codewords.
[0076] According to the established coding table, the symbol sequence sent by the source is converted into the corresponding codeword sequence;
[0077] Entropy decoding is the reverse process of entropy coding. First, the codewords are read from the compressed code stream. Then, the original symbols corresponding to each codeword are found using the pre-established coding table (the same as that used during encoding). Finally, the found symbols are combined in the order in the code stream to restore the original data sequence.
[0078] Figure 2 A schematic diagram of a motion decoder provided by an embodiment of the present invention is shown. Specifically:
[0079] Each convolution / deconvolution layer in the decoder is replaced with a fibrillated convolution / deconvolution layer to achieve multiple complexity constraints, and LReLU is selected as the nonlinear transformation function; a channel width selection module is added to the fibrillated convolution layer to determine the optimal channel width of each convolution layer according to the current complexity constraints. Figure 4 A schematic diagram of a complexity-guided convolutional layer provided by an embodiment of the present invention is shown. With the complexity vector as input, the channel width selection module will automatically select the optimal channel width for each fibrillable convolutional layer to optimize the allocation of the overall complexity budget to different types of modules. When the first option is selected, the network is the same as the network without the fibrillable convolutional layer. For the second or third options, only a subset of the convolution weights are used in the convolution operation to reduce the computational complexity. The second solution uses input channels, output only output channels. Therefore, the complexity of this solution is only times. The third solution only uses input and output channels, the computational complexity is the original times; after selecting the channel width, a convolution operation is performed to extract features from the input and generate the decoded motion vector. The nonlinear transformation introduces nonlinearity in the decoding process to better approximate the original motion vector.
[0080] S3, performing motion compensation through a given reference frame and decoded motion information to generate a predicted frame;
[0081] In this embodiment, according to the decoded motion vector, a corresponding pixel block is found in the reference frame;
[0082] These pixel blocks are "moved" to the corresponding positions in the current frame, which is actually a copy and paste process that does not involve actual pixel displacement; the moved pixel blocks are combined with other parts of the current frame (such as pixels that have not yet been predicted) to generate a predicted frame.
[0083] S4, obtaining residual information through the input frame and the predicted frame, and obtaining decoded residual information through a residual compression module;
[0084] In this embodiment, for each pixel or pixel block in the input frame, the difference between its original value and the predicted value of the pixel or pixel block at the corresponding position in the predicted frame is calculated to obtain residual information. The residual compression module includes a residual encoder, entropy encoding, entropy decoding and a residual decoder. The residual encoder encodes the generated residual information to generate a coded residual feature. ; Perform entropy coding operation, convert the encoded residual features into residual bit stream, and send it to the decoder; at the decoder, the residual bit stream is first entropy decoded into entropy decoded residual features , which is then decoded into residual motion information by the residual decoder network , Figure 3 A schematic diagram of a residual decoder provided by an embodiment of the present invention is shown.
[0085] S5, adding the reconstructed residual information back to the predicted frame to generate a reconstructed output frame;
[0086] The residual encoder specifically comprises the following steps:
[0087] Initialize and set relevant parameters in the arithmetic encoder;
[0088] Make coding decisions (i.e., decide on input and output), input: the binarized value of the syntax element (Binval), the context model (context_id), and the encoder's environmental parameters (such as codirange, codilow, and symCnt); output: updated codirange, codilow (the current probability interval of the arithmetic encoder, codirange indicates the length of the interval, and codilow indicates the lower limit of the interval) and symCnt (used to track the number of encoded symbols associated with a specific context or condition);
[0089] Use the current encoder range codiRange to calculate the index value i of Qi (the index value obtained from the probability model table based on the context_id and the most likely symbol state of the currently encoded Binval).
[0090] Use the state index (obtained from the context model) and i to look up the table and obtain the probability of Rlps (the probability range of non-most likely symbol states, used to update codirange and codilow);
[0091] The lower limit and range of the probability interval in arithmetic coding are updated according to whether the symbol to be encoded is the most likely symbol; the residual information is transformed, and the transformed residual signal is quantized. The specific range of the quantization step depends on the specific needs of the application and the compression ratio target. The quantization step of the low-frequency signal is set to a value between 1 and 10 (the actual value will be dynamically adjusted according to the compression quality and image content), and the quantization step of the high-frequency signal is several to dozens of times that of the low-frequency signal.
[0092] The residual information is transformed (such as discrete cosine transform DCT) to make the signal energy more concentrated, and the transformed residual signal is quantized, where a larger quantization step size is used for high-frequency signals and a smaller quantization step size is used for low-frequency signals to ensure that the basic information of the image is not lost.
[0093] As a further limitation of the technical solution of the embodiment of the present invention, the residual decoder has the following specific process:
[0094] The residual decoder network is responsible for decoding the quantized residual into the original residual data; each deconvolution layer in the decoder is replaced by a fiberizable deconvolution layer to achieve multiple complexity constraints, and the nonlinear transformation function selects IGDN;
[0095] The fiberized deconvolution layer selects the channel width before performing the convolution operation, extracts features from the input and generates decoded residual data. The nonlinear transformation introduces nonlinearity in the decoding process, which helps to recover more details from the quantized residual.
[0096] The decoded residual data will be used to combine with the predicted frame to generate the final reconstructed frame.
[0097] In this embodiment, for each corresponding pixel in the predicted frame and the reconstructed residual, an addition operation is performed at the pixel level. If the data type or value range of the predicted frame and the residual is different, data type conversion or range adjustment may be required to ensure the correctness of the addition operation.
[0098] The results of the present invention improve video compression efficiency, optimize video transmission quality, expand the application field of video, and ensure the practicability of deep video coding and decoding on various devices.
[0099] It should be understood that, although each step in the flow chart of each embodiment of the present invention is shown in sequence according to the indication of the arrow, these steps are not necessarily performed in sequence according to the order indicated by the arrow. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be performed in other orders. Moreover, at least a portion of the steps in each embodiment may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these sub-steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with at least a portion of other steps or sub-steps or stages of other steps.
[0100] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0101] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
Claims
1. A deep video encoding and decoding method supporting multiple computational complexities, characterized in that: The method specifically comprises the following steps: S1. On the encoder side, motion estimation is performed using the input frame and the reference frame as input; The specific steps include: The image sequence of the input frame is divided into a number of non-overlapping macroblocks, and a search range in the reference frame is set for each macroblock. The search range is a rectangular area centered on the corresponding position of the current macroblock in the reference frame. Within the set search range, according to the MSE matching criterion, find the block that is most similar to the current macroblock, that is, the matching block. MSE quantifies the difference between the two macroblocks by calculating the average of the square difference between the corresponding pixel values. The smaller the MSE value, the more similar the two macroblocks are. The calculation formula of MSE is: ; Where M and N are the number of pixels in the macroblock in the horizontal and vertical directions, respectively; s(x,y) represents the pixel value at position (x,y) in the current macroblock; and z(x,y) represents the pixel value at the corresponding position of the candidate macroblock in the reference frame. The relative displacement between the matching block and the current macroblock is the motion vector; S2. Processing the motion information from the motion estimation module through a motion compression module to obtain decoded motion information; the motion compression module includes a motion encoder, entropy encoding, entropy decoding and a motion decoder, specifically including the following steps: The motion encoder uses the motion information from the motion estimation module Encode and generate coded motion features ; Perform entropy coding operation to encode the motion features Convert to motion bit stream and send to the decoder; At the decoder side, the motion bitstream is first entropy decoded into entropy decoded motion features , which is then decoded into decoded motion information by the motion decoder network ; The specific process of entropy coding and entropy decoding is as follows: Entropy coding is the coding process that does not lose any information according to the entropy principle. Information entropy is the average amount of information in the source. Information entropy is calculated as: ,in is the probability of the source sending a symbol, and q is the total number of source symbols; The calculation results of information entropy guide the establishment of the coding table. According to the established coding table, the symbol sequence sent by the source is converted into the corresponding codeword sequence; Entropy decoding is the reverse process of entropy coding. First, the codewords are read from the compressed code stream. Then, the original symbols corresponding to each codeword are found using the pre-established coding table. Finally, the found symbols are combined according to the order in the code stream to restore the original data sequence. The motion decoder performs the following steps: The motion decoder network decodes the quantized motion information into the original motion vector. The network contains multiple convolutional layers and nonlinear transformation functions. The convolution / deconvolution layer in the decoder uses a fiberizable convolution / deconvolution layer, and the nonlinear transformation function selects LReLU. The fiberizable convolutional layer adds a channel width selection module to the convolutional layer to determine the optimal channel width of each convolutional layer according to the current complexity constraints. Each convolutional layer provides three options to achieve different computational complexities. After selecting the channel width, a convolution operation is performed to extract features from the input and generate decoded motion vectors. Nonlinear transformation introduces nonlinearity in the decoding process to better approximate the original motion vectors. The decoded motion vector is used in the subsequent motion compensation step; S3, performing motion compensation through a given reference frame and decoded motion information to generate a predicted frame; specifically comprising the following steps: According to the decoded motion vector, find the corresponding pixel block in the reference frame; "Move" these pixel blocks to the corresponding positions in the current frame, combine the moved pixel blocks with other parts of the current frame to generate a predicted frame; S4, obtaining residual information through the input frame and the predicted frame, and obtaining decoded residual information through a residual compression module; specifically comprising the following steps: For each pixel or pixel block in the input frame, calculate the difference between its original value and the predicted value of the corresponding pixel or pixel block in the predicted frame to obtain the residual information ; The residual compression module includes a residual encoder, entropy encoding, entropy decoding and a residual decoder. The residual encoder encodes the generated residual information to generate encoded residual features. ; Perform entropy coding operation, convert the encoded residual features into residual bit stream, and send it to the decoder end; At the decoder side, the residual bitstream is first entropy decoded into entropy decoded residual features , which is then decoded into residual motion information by the residual decoder network ; The residual encoder performs the following steps: Before the first macroblock of the coded slice, the residual encoder is initialized and the relevant parameters in the arithmetic encoder are set; Make coding decisions, i.e., decide on input and output, input: binarized values of syntax elements, context model, and environment parameters of the encoder; output: updated environment parameters of the encoder; Calculate the index value i of Qi using the current encoder interval range; Using the state index and i to look up the table, the probability of the probability range of the non-most likely symbol state is obtained; The probability interval lower limit and the probability interval range in arithmetic coding are updated according to whether the symbol to be encoded is the most likely symbol; Transform the residual information and quantize the transformed residual signal. The specific range of the quantization step depends on the specific requirements of the application and the compression ratio target. The quantization step of the low-frequency signal is set to a value between 1 and 10, and the quantization step of the high-frequency signal is several to dozens of times that of the low-frequency signal. The residual decoder performs the following steps: The residual decoder network decodes the quantized residual into the original residual data. The fiberized deconvolution layer selects the channel width before performing the convolution operation, extracts features from the input and generates decoded residual data. The nonlinear transformation introduces nonlinearity in the decoding process. The decoded residual data will be combined with the predicted frame to generate the final reconstructed frame; S5, adding the reconstructed residual information back to the predicted frame to generate a reconstructed output frame; specifically comprising the following steps: For each corresponding pixel in the predicted frame and the reconstructed residual, an addition operation is performed at the pixel level. If the data type or value range of the predicted frame and the residual is different, data type conversion or range adjustment is required to ensure the correctness of the addition operation.
