Video coding method, training method and device, equipment, product and medium
The video decoder using the multi-video generation model projects reconstructed features onto a unified feature space and generates a probability distribution using information from the previous frame. This solves the problem of balancing video quality and low latency in existing technologies, enabling bitstream sharing and flexible mode switching, and improving encoding and decoding efficiency and quality.
Patent Information
- Application Number
- CN202611535227.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-30
- Publication Date
- 2026-11-20
AI Technical Summary
Existing generative video coding and decoding technologies struggle to balance video quality with the demands of low-latency streaming. Furthermore, existing codecs bind a single bitstream to a single decoding path, making it impossible to flexibly switch decoding modes. This necessitates the separate optimization and transmission of multiple bitstreams, increasing bitrate costs and system complexity.
The video decoder employs multiple video generation models. By projecting reconstructed features onto a unified feature space, it generates conditional features, allowing different models to share the same bitstream. It also combines the reconstructed features of the previous frame to generate probability distribution information, supporting the switching of different decoding modes.
It enables the sharing of the same bitstream in different decoding modes, reduces bitstream generation and transmission costs, improves compression efficiency and reconstruction quality, and meets the needs of high-quality offline decoding and low-latency streaming decoding.
Smart Images

Figure CN123145406A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of video coding technology, specifically to a video encoding / decoding method, training method, apparatus, device, product, or medium. Background Technology
[0002] Various electronic devices support digital video. These devices transmit and receive, or otherwise transfer, digital video data via communication networks, and / or store digital video data on storage devices. Because communication networks have limited bandwidth capacity and storage devices have limited storage resources, video data can be compressed using one or more video codec standards before transmission or storage to generate coded video data using a lower bit rate, while avoiding or minimizing video quality degradation.
[0003] In generative video coding and decoding technology, the codec binds a bitstream to a single decoding path. The encoder needs to know the computing power and latency budget of the receiver in advance and output a bitstream that matches the decoding mode of the receiver.
[0004] Furthermore, in generative video coding and decoding technology, generative video decoders have high system costs and are difficult to balance the requirements of video quality and low latency streaming. Summary of the Invention
[0005] The embodiments of this disclosure provide a video encoding / decoding method, training method, apparatus, device, product, and medium.
[0006] According to a first aspect of this disclosure, a video decoding method is provided, the video decoding method being executed by a video decoder, the video decoder including a plurality of video generation models, wherein the video decoding method includes: receiving encoded data of a current frame to be decoded; decoding the encoded data to obtain reconstructed features of the current frame; projecting the reconstructed features of the current frame onto a preset feature space to obtain conditional features, wherein the preset feature space corresponds to the feature space of the input features of each of the plurality of video generation models; and predicting the current frame based on the conditional features using a target model selected from the plurality of video generation models.
[0007] Optionally, the video decoder further includes a latent space decoder corresponding to each video generation model, wherein predicting the current frame based on the conditional features using the target model among the plurality of video generation models includes: guiding the target model to generate latent space features based on the conditional features; and reconstructing the current frame based on the latent space features using the latent space decoder corresponding to the target model, wherein the plurality of video generation models include a bidirectional diffusion transformer and a unidirectional diffusion transformer, wherein the number of parameters of the latent space decoder corresponding to the bidirectional diffusion transformer is less than the number of parameters of the latent space decoder corresponding to the unidirectional diffusion transformer.
[0008] According to a second aspect of this disclosure, a video decoding method is provided, the video decoding method being executed by a video decoder, the video decoder including a video generation model, the video decoding method comprising: receiving encoded data of a current frame to be decoded; generating probability distribution information for entropy decoding of the current frame based on reconstructed features of a previously decoded frame; decoding the encoded data based on the probability distribution information to obtain reconstructed features of the current frame; and predicting the current frame using the video generation model based on the reconstructed features.
[0009] Optionally, generating probability distribution information for entropy decoding of the current frame based on the reconstructed features of the decoded previous frame includes: extracting context information for the current frame based on the reconstructed features of the previous frame, wherein the context information includes a first context feature and / or a second context feature, the first context feature corresponding to the hyper-implicit representation of the previous frame, the second context feature corresponding to the primary implicit representation of the previous frame, the primary implicit representation of the previous frame being obtained by compressing the reconstructed features of the previous frame, and the hyper-implicit representation of the previous frame being obtained by compressing the primary implicit representation of the previous frame; performing arithmetic decoding on the encoded data based on a preset probability distribution to obtain residual features; generating a first probability distribution based on the residual features and the first context feature; performing arithmetic decoding on the encoded data based on the first probability distribution to obtain a hyper-implicit representation; and generating a second probability distribution as the probability distribution information based on the residual features, the hyper-implicit representation, and the second context feature.
[0010] According to a third aspect of this disclosure, a video encoding method is provided, the video encoding method being executed by a video encoder, wherein the video encoding method includes: acquiring a current frame to be encoded; generating a latent space representation corresponding to the current frame based on the current frame; generating probability distribution information for entropy encoding of the current frame based on reconstructed features of an encoded previous frame; and encoding the current frame based on the latent space representation and the probability distribution information to obtain encoded data of the current frame.
[0011] According to a fourth aspect of this disclosure, a training method for a video encoding / decoding system is provided. The video encoding / decoding system includes multiple video generation models and a conditional codec. The training method includes: encoding training frame samples using the conditional codec to generate training encoded data of the training frame samples; decoding the training encoded data using the conditional codec to obtain training reconstructed features; projecting the training reconstructed features onto a preset feature space using the conditional codec to obtain training conditional features, wherein the preset feature space corresponds to the input features of each of the multiple video generation models; predicting prediction frames using the multiple video generation models based on the training conditional features; and training the multiple video generation models and the conditional codec based on the prediction frames to obtain a trained video encoding / decoding system.
[0012] Optionally, the training condition features include multiple condition features that correspond one-to-one with the multiple training frame samples. The step of using the multiple video generation models to predict the prediction frame based on the training condition features includes: adding noise to the multiple condition features at the same diffusion time step to obtain multiple noisy condition features; and inputting the multiple noisy condition features in parallel into each of the multiple video generation models to obtain the prediction frame output by each video generation model.
[0013] Optionally, the plurality of video generation models include a first model and a second model, and the trained video encoding / decoding system includes a trained first model and a trained second model. The training method further includes: performing adversarial distillation training on the trained second model based on the trained first model to obtain a distilled second model. The adversarial distillation training on the trained second model based on the trained first model includes: using the trained first model as a teacher model and an adversarial supervision model, and using the trained second model as a student model, to perform adversarial distillation training on the trained second model. Alternatively, the video encoding / decoding system further includes a first latent space decoder corresponding to the first model, and the adversarial distillation training on the trained second model based on the trained first model includes: jointly training the trained second model and the second latent space decoder to obtain a jointly trained second model and a trained second latent space decoder, wherein the number of parameters in the second latent space decoder is less than the number of parameters in the first latent space decoder; using the trained first model as a teacher model and an adversarial supervision model, and using the jointly trained second model as a student model, to perform adversarial distillation training on the jointly trained second model.
[0014] According to a fifth aspect of this disclosure, a video decoding apparatus is provided, the video decoding apparatus being disposed in a video decoder, the video decoder including a plurality of video generation models, wherein the video decoding apparatus includes: a first receiving unit configured to receive encoded data of a current frame to be decoded; a first decoding unit configured to decode the encoded data to obtain reconstructed features of the current frame; a projection unit configured to project the reconstructed features of the current frame onto a preset feature space to obtain conditional features, wherein the preset feature space corresponds to the feature space of the input features of each of the plurality of video generation models; and a first prediction unit configured to predict the current frame based on the conditional features using a target model selected from the plurality of video generation models.
[0015] According to a sixth aspect of this disclosure, a video decoding apparatus is provided, the video decoding apparatus being disposed within a video decoder, the video decoder including a video generation model, the video decoding apparatus comprising: a second receiving unit configured to receive encoded data of a current frame to be decoded; a decoding probability generation unit configured to generate probability distribution information for entropy decoding of the current frame based on reconstructed features of a previously decoded frame; a second decoding unit configured to decode the encoded data based on the probability distribution information to obtain reconstructed features of the current frame; and a second prediction unit configured to predict the current frame based on the reconstructed features using the video generation model.
[0016] According to a seventh aspect of this disclosure, a video encoding apparatus is provided, the video encoding apparatus being disposed in a video encoder, wherein the video encoding apparatus includes: an acquisition unit configured to acquire a current frame to be encoded; a latent space representation generation unit configured to generate a latent space representation corresponding to the current frame based on the current frame; an encoding probability generation unit configured to generate probability distribution information for entropy encoding of the current frame based on reconstructed features of an encoded previous frame; and an encoding unit configured to encode the current frame based on the latent space representation and the probability distribution information to obtain encoded data of the current frame.
[0017] According to an eighth aspect of this disclosure, a training apparatus for a video encoding / decoding system is provided. The video encoding / decoding system includes multiple video generation models and a conditional codec. The training apparatus comprises: a training encoding unit configured to encode training frame samples using the conditional codec to generate training encoded data of the training frame samples; a training decoding unit configured to decode the training encoded data using the conditional codec to obtain training reconstructed features; a training projection unit configured to project the training reconstructed features onto a preset feature space using the conditional codec to obtain training conditional features, wherein the preset feature space corresponds to the input features of each of the multiple video generation models; a training prediction unit configured to predict prediction frames using the multiple video generation models based on the training conditional features; and a training unit configured to train the multiple video generation models and the conditional codec based on the prediction frames to obtain a trained video encoding / decoding system.
[0018] According to a ninth aspect of this disclosure, an electronic device is provided, comprising: one or more processors; and a memory coupled to the one or more processors and configured to store instructions executable by the one or more processors, wherein the one or more processors, when executing the instructions, are configured to perform the method described according to embodiments of this disclosure.
[0019] According to a tenth aspect of this disclosure, a computer program product is provided, including computer instructions that, when executed by at least one processor, implement the method described according to embodiments of this disclosure.
[0020] According to the eleventh aspect of this disclosure, a computer-readable storage medium is provided that stores instructions and a bit stream thereon, wherein the instructions, when executed by a computing device having one or more processors, cause the one or more processors to perform a video encoding method as described in embodiments of this disclosure to generate the bit stream.
[0021] According to an eighth aspect of this disclosure, a method for storing a bitstream is provided, comprising: performing a video encoding method as described in embodiments of this disclosure to generate a bitstream; and storing the bitstream.
[0022] The technical solutions provided by the embodiments of this disclosure bring at least the following beneficial effects: By employing the video encoding and decoding scheme according to this disclosure, on the decoding side, by projecting the reconstructed features of video frames onto a feature space corresponding to multiple video generation models, conditional features that can be shared by the multiple video generation models can be obtained from a single bitstream. Such conditional features can guide any of the multiple video generation models to predict video frames, thereby allowing the encoding side to transmit only one bitstream to support different video generation models on the decoding side, without having to repeatedly encode and / or transmit multiple bitstreams for each video generation model, thus reducing the consumption of bitstream generation and transmission.
[0023] Furthermore, by employing the video encoding and decoding scheme according to this disclosure, the probability distribution information for encoding and decoding the current frame is obtained based on the reconstruction features of the previous frame. When determining the probability distribution of the current frame, the context information of the previous frame can be considered, so that the bits are allocated more reasonably when encoding and decoding the current frame, thereby simultaneously improving compression efficiency and reconstruction quality.
[0024] Furthermore, by employing the video encoding and decoding scheme according to this disclosure, and through joint training of multiple video generation models and conditional codecs, the conditional codec can generate conditional features from a single bitstream that can be shared by the multiple video generation models. Such conditional features can guide any of the multiple video generation models to predict video frames. Using an encoding and decoding system trained in this way, only one bitstream needs to be transmitted on the encoding side to support different video generation models on the decoding side, without having to repeatedly encode and / or transmit multiple bitstreams for each video generation model, thus reducing the consumption of bitstream generation and transmission.
[0025] It will be understood that the above general description and the following detailed description are merely examples and do not limit this disclosure. Attached Figure Description
[0026] The accompanying drawings, which are incorporated in and form part of this specification, illustrate examples according to this disclosure and, together with this description, serve to explain the principles of this disclosure.
[0027] Figure 1 This is a schematic flowchart illustrating an example of a video decoding method according to some embodiments of the present disclosure.
[0028] Figure 2 This is a schematic block diagram illustrating a video encoding / decoding system according to some embodiments of the present disclosure.
[0029] Figure 3 This is a schematic flowchart illustrating another example of a video decoding method according to some embodiments of the present disclosure.
[0030] Figure 4This is a schematic block diagram illustrating a conditional codec according to some embodiments of the present disclosure.
[0031] Figure 5 This is a schematic flowchart illustrating an example of generating probability distribution information according to some embodiments of the present disclosure.
[0032] Figure 6 This is a schematic block diagram illustrating a hierarchical entropy model according to some embodiments of the present disclosure.
[0033] Figure 7 This is a schematic diagram showing a comparison between a probability distribution generation method using some embodiments of the present disclosure and a factorization prior method.
[0034] Figure 8 This is a schematic flowchart illustrating a video encoding method according to some embodiments of the present disclosure.
[0035] Figure 9 This is a schematic flowchart illustrating another example of generating probability distribution information according to some embodiments of the present disclosure.
[0036] Figure 10 This is a schematic flowchart illustrating a training method for a video codec system according to some embodiments of the present disclosure.
[0037] Figure 11 This is a schematic diagram illustrating the various stages of a training method for a video encoding / decoding system according to some embodiments of the present disclosure.
[0038] Figure 12 This is a schematic diagram illustrating an example of autoregressive diffusion training and inference with conditional bitstream.
[0039] Figure 13 This is a graph showing the rate-distortion-sensory curves on HEVC-B, UVG, and MCL-JCV.
[0040] Figure 14 It is a graph showing the rate-distortion-sensory curves on HEVC-B, UVG, and MCL-JCV.
[0041] Figure 15 This is a schematic diagram illustrating the subjective visual effect of qualitative contrast on HEVC-B.
[0042] Figure 16 This is a diagram illustrating a computing environment coupled to a user interface according to some embodiments of the present disclosure. Detailed Implementation
[0043] Referring now to the detailed description, examples of which are illustrated in the accompanying drawings. Numerous non-limiting details are set forth in the following detailed description to aid in understanding the subject matter presented herein. However, various alternatives may be used without departing from the scope of the claims, and the subject matter may be practiced without these specific details. For example, the subject matter presented herein can be implemented on many types of electronic devices with digital video capabilities.
[0044] It should be noted that the terms "first," "second," etc., used in the specification, claims, and drawings of this disclosure are used to distinguish objects and not to describe any specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in sequences other than those shown in the drawings or described in this disclosure.
[0045] It should be noted that the phrase "at least one of several items" in this disclosure refers to three parallel cases: "any one of the several items", "a combination of any number of the several items", and "all of the several items". For example, "including at least one of A and B" includes the following three parallel cases: (1) including A; (2) including B; (3) including A and B. Another example is "performing at least one of step one and step two", which means the following three parallel cases: (1) performing step one; (2) performing step two; (3) performing both step one and step two.
[0046] In traditional video coding and decoding technologies such as H.265 / HEVC and H.266 / VVC, a hybrid coding framework is proposed, centered on block partitioning, intra / inter-frame prediction, transform, quantization, and loop filtering. In this framework, the encoder removes temporal redundancy through motion estimation and spatial redundancy through transform, while the decoder reconstructs pixels block by block according to standard specifications. This type of coding and decoding standard aims to minimize pixel distortion (Peak Signal-to-Noise Ratio (PSNR) and Multi-Scale Structural Similarity (MS-SSIM)).
[0047] However, aiming to minimize pixel distortion encourages averaging of uncertain details. At extremely low bitrates (such as <0.005 bpp), pixel-level information cannot be accurately transmitted, resulting in significantly blurred reconstructed videos and the erasure of fine structures and repetitive textures. Furthermore, even with optimal objective distortion metrics (such as PSNR), there is a significant gap between human subjective quality and generative methods, leading to poor perceived quality.
[0048] In response, generative coding and decoding technologies focus more on the rate-distortion-perceptual tradeoff. Specifically, they accept synthesized but visually consistent details to reconstruct visually convincing content. Among generative coding and decoding technologies, video diffusion transformers can perform joint reasoning on appearance and motion, making them one of the generative video decoders with better perceptual reconstruction quality.
[0049] For example, taking distortion-optimized neural video codecs such as Deep Context Video Compression with Feature Modulation (DCVC-FM) and Deep Context Video Compression for Real-Time (DCVC-RT) as examples, end-to-end optimized video compression can be achieved using neural networks: the video (hidden) representation is analyzed, transformed, quantized, and arithmetically encoded using a context-based entropy model; the decoding end uses temporal feature context for conditional reconstruction, and the entire process is jointly trained with rate-distortion as the objective. The DCVC series introduces mechanisms such as recursive temporal context modeling and feature-level motion information transfer, achieving performance exceeding that of the VVC standard at medium bitrates.
[0050] However, the fixed semantics of standard and neural codecs bind to a single decoding process, preventing the decoder from switching between "quality mode" and "low-latency mode" based on its own computing power / latency budget. To support both modes simultaneously, two separately optimized bitstreams need to be generated, transmitted, and stored, doubling the bitrate cost and system complexity. Furthermore, codec systems such as video diffusion transformers are costly and struggle to balance video quality with the low-latency requirements of streaming.
[0051] In some cases, generative video codecs can also utilize pre-training to generate latent spaces or diffusion priors for perceptual reconstruction.
[0052] However, in generative video coding and decoding schemes, existing generative codecs strongly bind a bitstream to a synthesis path. If high-quality offline decoding and low-latency streaming decoding are required simultaneously, two bitstreams must be optimized and transmitted separately, and the encoder must know the computing power and latency budget of the receiver in advance.
[0053] In addition, dense bidirectional attention requires the entire encoded sequence (or the entire buffer) to be obtained before decoding, and the large model needs to be called repeatedly for 50 iterations of denoising. The deep 3D causal convolution and attention of the decoder of the three-dimensional (3D) variational autoencoder (VAE) also become the latency-dominant factor, with a latency of up to seconds per frame at 1080p, making it completely unsuitable for streaming / real-time scenarios.
[0054] Furthermore, image-based frame-by-frame generation (such as Generative Latent Coded Video (GLC-Video)) generates seemingly reasonable but inconsistent details independently in adjacent frames, amplifying minor spatial ambiguities into noticeable flickering and significantly increasing temporal distortion errors.
[0055] In addition, autoregressive video diffusion (such as the CausVid model which distills bidirectional DiT into a few-step causal generator; self-enforcing mechanisms that alleviate exposure bias by autoregressive unfolding during training) can support streaming output, but there are the following problems: (1) Causal constraints lose future evidence, resulting in reduced compression efficiency and perception quality; (2) Single-step distillation amplifies the accumulation of errors (exposure bias: training is conditioned on real history while inference is conditioned on generated history; or self-unfolding training leads to training serialization and gradient truncation); (3) The number of latent space channels generated is limited (such as video VAE latent space with only 16 channels and RGB with only 3 channels), resulting in insufficient motion / structure / color cues carried as temporal conditions.
[0056] In view of the above problems, exemplary embodiments of this disclosure provide a video decoding method and apparatus, a video encoding method and apparatus, a training method and apparatus for a video encoding and decoding system, an electronic device, a computer-readable storage medium, and a computer program product, which can solve or at least alleviate one of the above problems.
[0057] In a first aspect of an exemplary embodiment of this disclosure, a video decoding method is provided, which can be executed by a video decoder, the video decoder including a plurality of video generation models.
[0058] like Figure 1 As shown, the video decoding method may include the following steps: In step S110, the encoded data of the current frame to be decoded can be received.
[0059] As an example, a video decoder can receive a video bitstream containing encoded data of the current frame from the encoding side.
[0060] In step S120, the encoded data can be decoded to obtain the reconstructed features of the current frame.
[0061] As an example, step S120 may include: performing arithmetic decoding on the encoded data to obtain compressed features (e.g., master-latent representation); and reconstructing the current frame based on the compressed features obtained from the arithmetic decoding to obtain the reconstructed features of the current frame.
[0062] For example, such as Figure 2 As shown, the video decoder may include a conditional decoder. In this step, the conditional decoder can be used to decode the encoded data to obtain the reconstructed features of the current frame.
[0063] As an example, a conditional decoder may include an arithmetic decoder, a latent decoder, and a conditional header. Specifically, the arithmetic decoder can be used to perform arithmetic decoding on the encoded data of the received current frame to obtain the master-latent representation (e.g., it can be represented as...). ); a latent decoder can be used to reconstruct the current frame based on the master latent representation, obtaining reconstructed features (e.g., which can be represented as ).
[0064] However, in the embodiments of this disclosure, the method of obtaining the reconstructed features is not limited to using the conditional decoder described above, and other decoders may also be used.
[0065] In step S130, the reconstructed features of the current frame can be projected onto a preset feature space to obtain conditional features.
[0066] Here, conditional features can be used to guide the video generation model to generate or predict video frames. The pre-defined feature space can correspond to the feature space of the input features of each of the multiple video generation models.
[0067] As an example, with Figure 2 For example, a conditional decoder can be used to project the reconstructed features of the current frame onto a preset feature space to obtain conditional features.
[0068] For example, a conditional decoder can also include a condition header, which can be used to reconstruct the features of the current frame (such as those mentioned above). Projecting the feature into a predefined feature space yields conditional features (e.g., which can be represented as...). ).
[0069] Here, by projecting the reconstructed features onto a unified feature space for multiple video generation models, the conditional features can be made to have no model-specific latent space features. Each model shares a complete transmission representation, and different models can use this conditional feature as a condition to generate video frame features, thereby achieving video encoding and decoding of "single bitstream, multi-mode decoding".
[0070] Furthermore, in the embodiments of this disclosure, the aforementioned multiple video generation models can be diffusion transformers, which can refer to denoising diffusion generation models based on the Transformer backbone.
[0071] As an example, the aforementioned multiple video generation models can be models with different decoding modes. For instance, the aforementioned multiple video generation models can include a first model and a second model.
[0072] Here, the first model can be, for example, but not limited to, a Bidirectional Diffusion Transformer (BI-DiT), where "bidirectional" refers to using full-sequence (e.g., non-causal) attention on the entire sequence; the second model can be, for example, but not limited to, a Unidirectional Diffusion Transformer, such as an Autoregressive Diffusion Transformer (AR-DiT), where "autoregressive" refers to generating the video frame-by-frame (or block-by-block) in temporal order. In embodiments of this disclosure, the aforementioned video generation models may include, but are not limited to, Wan2.1-1.3B Video DiT.
[0073] However, the video generation model of the embodiments of this disclosure is not limited to the above examples, and the video generation model described herein can be any pre-trained video diffusion transformer.
[0074] In step S140, the current frame can be predicted based on conditional features using a target model selected from multiple video generation models.
[0075] As an example, such as Figure 2 As shown, the video decoder may also include a latent space decoder corresponding to each video generation model. Here, the latent space decoders corresponding to each video generation model may be the same or at least partially different.
[0076] In this step, the target model can be any model among multiple video generation models. For example, the target model can be selected from multiple video generation models based on the video decoder's own computing power and / or latency budget, or it can be selected based on user input.
[0077] For example, in the aforementioned video generation models including BI-DiT and AR-DiT, under a quality mode (UniGVC-BI / Random Access) where the video decoder has sufficient computational power and / or latency budget, and / or prioritizes decoding quality, BI-DiT can be chosen as the target model. For instance, a conditional sequence can be decoded from the entire bitstream, and BI-DiT can be used with dense bidirectional attention, such as 50 denoising iterations, to jointly generate the target latent sequence, which is then restored to pixels by a subsequent latent space decoder. Under a low-latency mode (UniGVC-AR / Streaming) where the video decoder has insufficient computational power and / or latency budget, and / or prioritizes decoding efficiency, AR-DiT can be chosen as the target model. As a causal DiT, AR-DiT can generate one latent block at a time using a rolling key-value cache (KV Cache), with the conditional lightweight decoder mapping it to pixels on the fly. Here, causal window attention ensures bounded cache length and minimizes the latency of the first frame. The key-value cache can cache historical attention keys during inference to avoid redundant computation.
[0078] The above method allows switching between different modes during the decoding process. Both decoders receive the same conditional features (e.g., conditional sequences) reconstructed from the bitstream. The sending end or encoding end can store or transmit only one bitstream, thus completely postponing the trade-off between video decoding quality and latency to the receiving end or decoding end. At the same receiving end, the decoding mode can be switched as needed during the decoding process.
[0079] As an example, in step S140, if a target model is selected, the target model can be guided based on conditional features to generate latent space features; and the current frame can be reconstructed based on the latent space features using the latent space decoder corresponding to the target model.
[0080] For example, such as Figure 2 As shown, conditional features and random noise can be concatenated using channels to obtain concatenated features; this concatenated model can be input into the target model to obtain the latent space features output from the target model; this latent space feature can be input into the latent space decoder corresponding to the target model to reconstruct the current video frame.
[0081] Here, the latent space decoder can be, for example, the decoding module of a video latent space codec. As an example, the video latent space codec can be a neural codec that maps video to a continuous latent space, such as, but not limited to, a variational autoencoder (VAE). In embodiments of this disclosure, the variational autoencoder can, for example, employ, but not limited to, a VAE for Wan video. Furthermore, the number of channels, spatiotemporal downsampling rate, and other parameters of the aforementioned video generation model and video latent space codec can be set according to actual needs, and embodiments of this disclosure do not impose any particular limitations on this.
[0082] As an example, when the aforementioned video generation models include both bidirectional and unidirectional diffusion transformers, the number of parameters in the latent space decoder corresponding to the bidirectional diffusion transformer can be smaller than that corresponding to the unidirectional diffusion transformer. For instance, a lightweight latent space decoder (e.g., "Tiny-D") can be used as the latent space decoder for the unidirectional diffusion transformer, thereby further improving the decoding efficiency of the decoding mode using the unidirectional diffusion transformer and further reducing decoding latency.
[0083] It should be noted that, although Figure 2 Taking channel stitching as an example, conditional features are injected into the subsequent video generation model. However, the embodiments of this disclosure are not limited to this. For example, the conditional features can also be injected as cross-attention keys after being projected by an independent encoder network. Furthermore, in the embodiments of this disclosure, the number of conditional channels and resolution of the conditional features can be configured as needed.
[0084] In a second aspect of an exemplary embodiment of this disclosure, a video decoding method is provided, which can be executed by a video decoder, the video decoder including a video generation model (e.g., one or more video generation models).
[0085] like Figure 3 As shown, the video decoding method may include the following steps: In step S310, the encoded data of the current frame to be decoded can be received.
[0086] As an example, a video decoder can receive a video bitstream containing encoded data of the current frame from the encoding side.
[0087] In step S320, probability distribution information for entropy decoding of the current frame can be generated based on the reconstructed features of the decoded previous frame.
[0088] Specifically, during the video encoding and decoding process, the probability distribution of the current video frame can be estimated by obtaining information from the previous video frame as context information. This probability distribution can be input into entropy encoding or entropy decoding, which determines the compression effect of the video.
[0089] Traditional probability distribution estimation does not consider the context information of video frames; therefore, the estimated probability distribution may not accurately guide bit allocation in entropy encoding and decoding. To address this, in embodiments of this disclosure, when decoding each video frame, information about the decoded video frame can be cached (e.g., cached in a buffer). For example, a recursive memory cache can be updated. Thus, when decoding the current video frame, information from the previous video frame can be retrieved from the cache as context information to estimate the probability distribution of the current video frame.
[0090] As an example, such as Figure 5 As shown, step S320 may include: In step S510, contextual information for the current frame can be extracted based on the reconstructed features of the previous frame.
[0091] Here, the context information may include a first context feature and / or a second context feature. The first context feature may be obtained based on the hyper-latent representation of the previous frame, and the second context feature may be obtained based on the primary latent representation of the previous frame. The primary latent representation of the previous frame may be obtained by compressing the reconstructed features of the previous frame, and the hyper-latent representation of the previous frame may be obtained by compressing the primary latent representation of the previous frame.
[0092] As an example, as above Figure 2 As shown, a video decoder may include a conditional decoder in a conditional codec, a video generation model, and a latent space decoder corresponding to the video generation model. The conditional decoder can receive the encoded data of the current frame.
[0093] It should be noted that, although this still includes multiple video generation models... Figure 2 For example, in the embodiments of the second aspect of this disclosure, the video decoder may include multiple video generation models as described in the embodiments of the first aspect above, or it may include only one video generation model (e.g., Figure 2 The first or second model in the model) and only one hidden space decoder (e.g. Figure 2 The corresponding first hidden space decoder or second hidden space decoder in the middle.
[0094] Figure 4 A schematic block diagram of a conditional codec according to embodiments of the present disclosure is shown. Figure 4As shown, the conditional decoder in a conditional codec (also known as a "unified latent space video codec") may include an arithmetic decoder AD, a latent decoder D, a decoding module of a hierarchical entropy model (HEM), a memory fuser M, and a context extractor C.
[0095] As an example, an arithmetic decoder (AD) can be used to perform arithmetic decoding on the encoded data (e.g., bitstream) of the received current frame to obtain the master-latent representation. It is possible to utilize the latent decoder D, based on the master implicit representation. Reconstruct the current frame to obtain the reconstructed features. .
[0096] As an example, such as Figure 4 As shown, in the latent decoder D, the primary implicit representation can be processed first. Perform upsampling of the spatial dimension by a factor of 2, and then combine the upsampled features with the features extracted based on the reconstructed features from the previous frame. Channel concatenation yields concatenated features, which can then be reconstructed using depth-wise convolution (DC) blocks to obtain reconstructed features. However, the reconstructed features were obtained. The process is not limited to this; other feature reconstruction methods can also be used.
[0097] As an example, for the reconstructed features of each video frame, a memory fusion unit M can be used to reconstruct the features (e.g., The features are fused with the reconstructed features of the previous video frame to obtain the fused features. For example, in the memory fusion unit M, the reconstructed features of the current frame and the reconstructed features of the previous video frame can be concatenated channel by channel, and the concatenated features can be compressed by the DC block to obtain the fused features. .
[0098] As an example, the context extractor C can be used to extract features from the fused data. Extract the context information for the current frame.
[0099] For example, in the context extractor C, the fused features can be... Compression is performed, and a multi-attention head mechanism is used to extract contextual features corresponding to each head from the compressed features, such as, but not limited to, the first contextual feature. and / or second context features Furthermore, as an example, the above features It can also be used to extract contextual features from compressed features using this multi-attention mechanism.
[0100] In embodiments of this disclosure, the first context feature may correspond to the hyper-latent representation of the previous frame, for example, having the same number of channels and spatial resolution as the hyper-latent representation of the previous frame; the second context feature may correspond to the primary latent representation of the previous frame, for example, having the same number of channels and spatial resolution as the primary latent representation of the previous frame. Here, the primary latent representation of the previous frame can be obtained by compressing the reconstructed features of the previous frame, and the hyper-latent representation of the previous frame can be obtained by compressing the primary latent representation of the previous frame.
[0101] In step S520, the encoded data can be arithmetically decoded based on a preset probability distribution to obtain residual features.
[0102] For example, such as Figure 6 As shown, in the HEM decoding module, a preset probability distribution can be used. Arithmetic decoding is performed on the encoded data to obtain residual features. Here, the probability distribution This can be determined during the training process of the conditional codec.
[0103] In step S530, a first probability distribution can be generated based on the residual features and the first context features.
[0104] For example, such as Figure 6 As shown, in the HEM decoding module, residual features can be used as a basis for... and first context features The first probability distribution is generated by performing operations such as 2-Step Mean Estimation. , among which, in the first The super-hidden representation can be obtained by decoding in one step. ,in, Take 0 and 1.
[0105] In step S540, the encoded data can be arithmetically decoded based on the first probability distribution to obtain the hyper-hidden representation.
[0106] For example, such as Figure 6 As shown, in the HEM decoding module, it can be based on the first probability distribution. Arithmetic decoding is performed on the encoded data to obtain the hyper-implicit representation. .
[0107] In step S550, a second probability distribution can be generated as probability distribution information based on residual features, hyper-latent representation, and second context features.
[0108] As an example, such as Figure 6 As shown, in the HEM decoding module, a hyperdecoder can be used based on residual features. Hyperhidden representation Second context features A second probability distribution is generated by performing actions such as 4-Step Mean Estimation. As probability distribution information. For example, residual features can be used. The hyperhidden representation obtained by decoding Channel concatenation is performed, and the concatenated features are input into the super decoder to obtain the super-prior features. The second probability distribution is obtained by performing a process such as a 4-step mean estimation. , among which, in the first The super-hidden representation can be obtained by decoding in one step. ,in, Take 0, 1, 2 and 3.
[0109] The HEM design described above can realize a three-layer cascaded entropy structure. Specifically, it can be achieved from residual features. Decoding Hyper-Hidden Representation Among them, residual characteristics After dequantization, entropy decoding is performed using a pre-defined probability distribution with zero mean Gaussian and a learnable channel-wise scale to achieve the desired residual features. Weak modeling, thereby controlling the residual features The low bits of the decoded data; then, it can be conditional upon... With temporal features as contextual information Hyper-hidden representation For example, two-pass checkerboard decoding can be used. The super decoder can be [ ; Reconstructing Prior Features Then, it can be conditional on the prior features. With temporal features as contextual information ,like Figure 4 As shown, the primary hidden representation For example, a quadtree partitioning method (such as the DCVC-DC model) can be used for decoding.
[0110] The above methods can be used to make residual characteristics The decoding branch can shrink to zero, concentrating the bits into the implicit representation modeled by a stronger spatial and / or temporal context. Hyperhidden representation Above. Following the approach of the DCVC-UF model, the scale parameters of each partition are predicted in a single pass, and only the mean is refined across multiple chessboard / quadritree passes. Arithmetic decoding only needs to be performed on the residual features. Hyperhidden representation Hidden representation Each of the three layers interacts with the accelerator once, and the mean asymptotic estimate is retained on the device side to achieve high-throughput decoding.
[0111] It should be noted that the HEM according to the embodiments of this disclosure is not limited to the above examples. For example, the above two-pass chessboard partitioning and / or four-pass quadtree partitioning can also be replaced by other spatial context partitioning (e.g., single-pass or multi-pass chessboard partitioning, arbitrary grouping parallel decoding, autoregressive channel partitioning, etc.).
[0112] In addition, residual characteristics With hyper-hidden representation The decomposition can be arbitrary; for example, on the encoding side of HEM, it can be based on the master-latent representation. The first few channels (e.g., 16) of the features encoded by the super encoder are selected as residual features, and the other channels are used as super-hidden representations. Alternatively, other levels of residual decomposition methods can be used.
[0113] also, Figure 6 The methods of single-scale prediction and multiple-pass refinement of the mean shown can also be interchanged; for example, a single-scale prediction of the mean and a refinement of the scale can be used.
[0114] return Figure 3 In step S330, the encoded data can be decoded based on the probability distribution information to obtain the reconstructed features of the current frame.
[0115] For example, such as Figure 4 As shown, in the conditional decoder, probability distribution information can be used as a basis. Decode the encoded data to obtain the reconstructed features of the current frame. For example, based on probability distribution information Entropy decoding, such as arithmetic decoding, can be performed on the encoded data to obtain the master-latent representation of the current frame. Then, using the latent decoder D, the reconstructed features of the current frame are obtained. .
[0116] In step S340, the current frame can be predicted using a video generation model based on reconstructed features.
[0117] As an example, such as Figure 2 As shown, the reconstructed features of the current frame can be projected to obtain conditional features, which can then guide the video generation model to predict the current frame.
[0118] In this step, the process of predicting the current frame based on the reconstructed features can be the same as the decoding process in the embodiment of the first aspect above, or it can be different from the decoding process in the embodiment of the first aspect above.
[0119] Figure 7 This is a schematic diagram showing the effect of comparing the bit allocation on HEVC-B using a probability distribution generation method according to some embodiments of the present disclosure with a factorization hyperprior method.
[0120] like Figure 7 As shown, in tests against the standard test sequences BQTerrace, Basketball, Cactus, Kimino1, and ParkScene, at the extreme bitrate, the probability distribution is estimated using the traditional factorized hyperprior method without context modeling, and residual features are not considered. With hyper-hidden representation Decompose the hyper-hidden representation in the decoding process. The process consumes a large number of bits; however, by using HEM according to embodiments of this disclosure, most of the bits can be allocated to the master-latent representation modeled by strong context. With hyper-hidden representation In weakly modeled residual features Less than 3% of the bits are left on top, improving both compression efficiency and reconstruction quality.
[0121] In a third aspect of exemplary embodiments of this disclosure, a video encoding method is provided, which is performed by a video encoder.
[0122] like Figure 8 As shown, the video encoding method includes the following steps: In step S810, the current frame to be encoded can be obtained.
[0123] In step S820, a latent space representation corresponding to the current frame can be generated based on the current frame.
[0124] As an example, as above Figure 2 As shown, the video encoder may also include a latent space encoder, which can be used to compress the current frame to obtain the latent space representation corresponding to the current frame.
[0125] Here, the latent space encoder can be, for example, the encoding module of a video latent space codec. As an example, the video latent space codec can be a neural codec that maps video to a continuous latent space, such as, but not limited to, a VAE. In embodiments of this disclosure, the variational autoencoder can, for example, employ, but not limited to, a VAE for video. Furthermore, parameters such as the number of channels and spatiotemporal downsampling rate configuration of the aforementioned video latent space codec can be set according to actual needs, and embodiments of this disclosure do not impose any particular limitations on this.
[0126] In step S830, probability distribution information for entropy coding of the current frame can be generated based on the reconstructed features of the encoded previous frame.
[0127] Specifically, during the video encoding and decoding process, the probability distribution of the current video frame can be estimated by obtaining information from the previous video frame as context information. This probability distribution can be input into entropy encoding or entropy decoding, which determines the compression effect of the video.
[0128] Traditional probability distribution estimation does not consider the context information of video frames; therefore, the estimated probability distribution may not accurately guide bit allocation in entropy encoding and decoding. To address this, in embodiments of this disclosure, when encoding each video frame, information about the encoded video frame can be cached (e.g., cached in a buffer). Thus, when encoding the current video frame, information from the previous video frame can be retrieved from the buffer as context information to estimate the probability distribution of the current video frame.
[0129] As an example, such as Figure 9 As shown, step S830 may include: In step S910, contextual information for the current frame can be extracted based on the reconstructed features of the previous frame.
[0130] Here, the context information includes a first context feature and / or a second context feature. The first context feature corresponds to the super-latent representation of the previous frame, and the second context feature corresponds to the main latent representation of the previous frame. The main latent representation of the previous frame is obtained by compressing the reconstructed features of the previous frame, and the super-latent representation of the previous frame is obtained by compressing the main latent representation of the previous frame.
[0131] As an example, as above Figure 2 As shown, a video encoder may include a conditional encoder in a conditional codec, wherein the conditional encoder may receive reconstructed features of the current frame.
[0132] Figure 4 A schematic block diagram of a conditional codec according to embodiments of the present disclosure is shown. Figure 4As shown, the condition encoder in the conditional codec may include an arithmetic encoder AE, a latent encoder E, an arithmetic decoder AD, a latent decoder D, a hierarchical entropy model HEM, a memory fuser M, and a context extractor C.
[0133] As an example, the latent encoder E can be used to represent the latent space corresponding to the current frame. Perform arithmetic encoding to obtain the primary and implicit representations. ; can represent the main hidden. Quantization is performed to obtain quantized features; an arithmetic encoder (AE) can be used to encode the quantized features to obtain the encoded data of the current frame (e.g., video bitstream).
[0134] As an example, such as Figure 4 As shown, in the latent encoder E, the DC block can be used to represent the latent space (or latent frame). Compress the data and utilize the features previously decoded. As a temporal context, the compressed features are combined with the features extracted based on the reconstructed features from the previous frame. Channel concatenation is performed to obtain concatenated features. Then, DC blocks can be used to compress the concatenated features, and the compressed features are downsampled by a factor of 2 in spatial dimension to obtain the latent representation. (Inter-frame coding), where, for the first hidden frame, the temporal buffer and input zeros are initialized, and a small set of intra-frame dedicated entropy modeling layers (intra-frame coding) are activated. However, the primary hidden representation is obtained. The process is not limited to the above process, and other encoding methods can also be used.
[0135] As an example, for the reconstructed features of each video frame, a memory fusion unit M can be used to reconstruct the features (e.g., The features are fused with the reconstructed features of the previous video frame to obtain the fused features. For example, in the memory fusion unit M, the reconstructed features of the current frame and the reconstructed features of the previous video frame can be concatenated channel by channel, and the concatenated features can be compressed by the DC block to obtain the fused features. .
[0136] As an example, the context extractor C can be used to extract features from the fused data. Extract the context information for the current frame.
[0137] For example, in the context extractor C, the fused features can be... Compression is performed, and a multi-attention head mechanism is used to extract contextual features corresponding to each head from the compressed features, such as, but not limited to, the first contextual feature. and / or second context features Furthermore, as an example, the above features It can also be used to extract contextual features from compressed features using this multi-attention mechanism.
[0138] In embodiments of this disclosure, the first context feature may correspond to the hyper-latent representation of the previous frame, for example, having the same number of channels and spatial resolution as the hyper-latent representation of the previous frame; the second context feature may correspond to the primary latent representation of the previous frame, for example, having the same number of channels and spatial resolution as the primary latent representation of the previous frame. Here, the primary latent representation of the previous frame can be obtained by compressing the reconstructed features of the previous frame, and the hyper-latent representation of the previous frame can be obtained by compressing the primary latent representation of the previous frame.
[0139] In step S920, the main implicit representation of the current frame can be encoded based on a preset probability distribution to obtain encoded features, and the encoded features can be decomposed into residual features and super implicit representation.
[0140] For example, such as Figure 6 As shown, in the HEM encoding module, a hyper encoder can be used to process the master-slave representation. Compression is performed to obtain the compressed features (i.e., the features encoded above). Then, channel splitting can be performed on the compressed features to obtain the split (or decomposed) residual features. and hyper-hidden representation Among them, residual characteristics The number of channels can be less than that of the hyperhidden representation. The number of channels.
[0141] In step S930, a first probability distribution can be generated based on residual features, hyperlatent representation, and first context features.
[0142] As an example, residual features can be analyzed separately. and hyper-hidden representation Quantization is performed to obtain residual characteristics. Quantization features and hyperhidden representation The quantization features. Then, an arithmetic encoder can be used based on the residual features. Quantitative characteristics and preset probability distribution Arithmetic decoding is performed on the encoded data to obtain residual features. Here, the probability distribution... This can be determined during the training process of the conditional codec.
[0143] For example, such as Figure 6 As shown, in the HEM encoding module, residual features can be used as a basis. Quantization features and first context features The first probability distribution is generated by performing operations such as 2-Step Mean Estimation. , among which, in the first The hyperhidden representation that can be obtained by step quantization ,in, Take 0 and 1.
[0144] In step S940, arithmetic encoding can be performed on the hyperimplicit representation based on the first probability distribution to obtain the encoded data of the hyperimplicit representation, and arithmetic encoding can be performed on the residual features based on the preset probability distribution to obtain the encoded data of the residual features.
[0145] In step S950, arithmetic decoding can be performed on the encoded data of the hyper-implicit representation and the encoded data of the residual features to obtain the decoded hyper-implicit representation and the decoded residual features.
[0146] For example, such as Figure 6 As shown, in the HEM decoding module, it can be based on the first probability distribution. Arithmetic decoding is performed on the encoded data of the hyperimplicit representation and the encoded data of the residual features, respectively, to obtain the decoded hyperimplicit representation. and the residual characteristics of decoding .
[0147] In step S960, a second probability distribution can be generated as probability distribution information based on the decoded hyper-hidden representation, the decoded residual features, and the second context features.
[0148] As an example, such as Figure 6 As shown, in the HEM decoding module, a super decoder can be used based on the residual characteristics of the decoded data. Hyper-hidden representation of decoding Second context features A second probability distribution is generated by performing actions such as 4-Step Mean Estimation. This can be used as probability distribution information. For example, the residual features from the decoding can be used. Hyperhidden representation obtained by quantization Channel concatenation is performed, and the concatenated features are input into the super decoder to obtain the super-prior features. The second probability distribution is obtained by performing a process such as a 4-step mean estimation. , among which, in the first The super-hidden representation can be obtained by decoding in one step. ,in, Take 0, 1, 2 and 3.
[0149] The above HEM design can realize a three-layer cascaded entropy structure, specifically, it can be achieved from the hyperhidden representation. Decompose residual characteristics Among them, residual characteristics After quantization, entropy encoding is performed using a pre-defined probability distribution with zero mean Gaussian and a learnable channel-wise scale to achieve the processing of residual features. Weak modeling, thereby controlling the residual features The low bits of the encoding; then, it can be conditional on the residual features. With temporal features as contextual information Hyper-hidden representation For example, two-pass checkerboard encoding can be used; the super decoder can be [ ; Reconstructing Prior Features Then, it can be conditional on the prior features. With temporal features as contextual information ,like Figure 4 As shown, the primary hidden representation For example, quadtree partitioning (e.g., DCVC-DC model) can be used for encoding.
[0150] The above methods can be used to make residual characteristics The coding branch can shrink to zero, concentrating bits into the master implicit representation modeled by a stronger spatial and / or temporal context. Hyperhidden representation Above. Following the approach of the DCVC-UF model, the scale parameters of each partition are predicted in a single pass, and only the mean is refined across multiple chessboard / quadritree passes. Arithmetic decoding only needs to be performed on the residual features. Hyperhidden representation Hidden representation Each of the three layers interacts with the accelerator once, and the mean asymptotic estimate is retained on the device side to achieve high-throughput decoding.
[0151] It should be noted that the HEM according to the embodiments of this disclosure is not limited to the above examples. For example, the above two-pass chessboard partitioning and / or four-pass quadtree partitioning can also be replaced by other spatial context partitioning (e.g., single-pass or multi-pass chessboard partitioning, arbitrary grouping parallel decoding, autoregressive channel partitioning, etc.).
[0152] In addition, residual characteristics With hyper-hidden representation The decomposition can be arbitrary; for example, on the encoding side of HEM, it can be based on the master-latent representation. The first few channels (e.g., 16) of the features encoded by the super encoder are selected as residual features, and the other channels are used as super-hidden representations. Alternatively, other levels of residual decomposition methods can be used.
[0153] Return to reference Figure 8 In step S840, the current frame can be encoded based on the latent space representation and probability distribution information to obtain the encoded data of the current frame.
[0154] For example, such as Figure 4 As shown, in the conditional encoder, the main latent representation can be obtained based on the latent space representation. ; can represent the main hidden. Quantization is performed to obtain quantized features; then, based on probability distribution information... Arithmetic encoding is performed on the quantized features to obtain the encoded data of the current frame.
[0155] The video decoding method of the first aspect of the embodiments of this disclosure can be used in conjunction with the video decoding method of the second aspect and the video coding method of the third aspect of the embodiments of this disclosure. For example, a conditional codec is used to map a given video x∈R^T×H×W to a continuous latent sequence of 1:16 channels, 8x spatial downsampling, and 4x temporal downsampling (the first frame is represented separately) by a (frozen) video VAE encoder. Latent space coding is much cheaper than pixel domain coding and is the basis for ultra-low bitrates. The learned codec maps l to an arithmetic-coded bitstream b and reconstructs a series of spatially aligned conditional features. The conditional feature c is a complete transport representation shared by both synthesis paths—there are no mode-specific latent space payloads. Both BI and AR modes are conditional on the conditional feature c to achieve encoding and decoding of a single bitstream, dual-mode decoding. Here, the unified intra / inter-frame design ensures that each conditional feature is in the same feature space, making end-to-end joint optimization with two diffusion decoders possible (which will be described in detail below), and also naturally satisfies the causality requirements of autoregressive streaming decoding.
[0156] In a fourth aspect of an exemplary embodiment of the present disclosure, a training method for a video encoding and decoding system is provided, the video encoding and decoding system including multiple video generation models and conditional codecs.
[0157] like Figure 10 As shown, the training method may include the following steps: In step S1010, the training frame samples can be encoded using a conditional codec to generate training encoded data for the training frame samples.
[0158] In step S1020, the training encoded data can be decoded using a conditional codec to obtain the training reconstructed features.
[0159] In step S1030, the training reconstructed features can be projected onto a preset feature space using a conditional encoder-decoder to obtain training conditional features.
[0160] Here, the preset feature space corresponds to the input features of each of the multiple video generation models.
[0161] In the embodiments of this disclosure, steps S1010 to S1030 can be understood similarly to the corresponding operations in the embodiments of the first to third aspects, and therefore will not be repeated here.
[0162] In step S1040, multiple video generation models can be used to predict the predicted frame based on the training condition features.
[0163] In this step, each of the multiple video generation models can be used to predict the predicted frame of each model based on the training condition features.
[0164] In step S1050, multiple video generation models and conditional codecs can be trained based on the predicted frames to obtain a trained video codec system.
[0165] In step S1050, for example, Figure 11 As shown in (a), multiple video generation models and conditional codecs can be jointly trained. For example, each video generation model can be combined with a Low-Rank Adaptation (LoRA) module, where LoRA refers to inserting low-rank trainable sidepaths onto pre-trained weights to achieve lightweight fine-tuning. In the example of multiple video generation models including BI-DiT and AR-DiT, BI-DiT and AR-DiT can respectively serve Dense Bidirectional DiT (BI-DiT) and Windowed Causal DiT (AR-DiT).
[0166] In the embodiments of this disclosure, for the joint training described above, autoregression can be performed based on the codec conditions obtained from decoding. For example, Diffusion Forcing (DF) shares the same diffusion time step across all frames, allowing parallel training, and the training and inference use the exact same conditional sequence decoded from the bitstream.
[0167] As an example, the training condition features include multiple condition features that correspond one-to-one with multiple training frame samples. The above step S1050 may include: adding noise to the multiple condition features at the same diffusion time step to obtain multiple noisy condition features; and inputting the multiple noisy condition features in parallel into each of the multiple video generation models to obtain the predicted frame output by each video generation model.
[0168] Specifically, in autoregressive video diffusion, three typical training paradigms include Teacher Forcing (TF), Diffusion Forcing (DF) and Self Forcing (SF). In Teacher Forcing, parallel training is performed conditioned on the clean ground-truth prefix, but during inference, the prefix is replaced with imperfect generation results, leading to exposure bias; in Diffusion Forcing, different noise levels are assigned to each frame of the sequence to enable parallel training, but there still exists a distribution difference between the noisy history used for training and the clean prefix used for inference; in Self Forcing, autoregressive unfolding is performed during training and conditioned on the generation history, which aligns training and inference, but the training is serialized and gradients in the unfolding process are usually truncated. Therefore, if autoregression is performed by generating latent representations, either exposure bias will be introduced by adopting Teacher Forcing, or serialized training will be caused by adopting Self Forcing.
[0169] The problems of the above training paradigms stem from that the autoregressive variable is the generated latent representation itself. For video generation, there is no alternative (the generated latent representation is the only strong temporal observation), while in video compression, the bitstream provides frame-aligned conditional signals at each step. Accordingly, the embodiments of the present disclosure reconstruct the training paradigm.
[0170] For example, as Figure 12 shown, the autoregressive inference based on previously generated frames includes two training modes: Teacher Forcing training and Self Forcing training. The Teacher Forcing training uses original frames as the autoregressive context, which is inconsistent with the generated frames used during inference. The Self Forcing training uses generated frames as the autoregressive context during training, which satisfies the consistency between training and inference, but requires serial generation and cannot support parallel training. In contrast, the autoregressive inference based on codec conditions includes Diffusion Forcing training, which can not only ensure the consistency between training and inference, but also support training parallelization.
[0171] Specifically, in the embodiments of the present disclosure, the autoregressive variable can be changed, and the video generation model does not take the frames generated historically before the current t-th video frame ( <t) as external conditions, but utilizes a causal condition sequence ≤ t (the aforementioned conditional feature), which can be deterministically decoded from the bitstream b and is completely consistent in training and inference. Inside the video generation model, KV caching is performed for historical activations for temporal modeling, but the reconstruction error is never explicitly fed back as the condition for the next step.
[0172] The above contextual autoregressive training architecture retains the following advantages: (1) fully parallel optimization of conditional DF (all target latent frames share the same diffusion time step and are trained in parallel under causal attention); (2) self-unfolded training-test consistency (conditional constants come from the bitstream, and there is no conditional distribution drift); (3) each frame can backpropagate gradients to the codec in parallel without serial unfolding. By adopting this architecture, the feature context learned by the model (e.g., supporting hundreds of channels (such as 256)) typically contains richer motion and / or structural and / or color prediction cues than just reconstructed frames (e.g., RGB3 channels) or clean VAE latent representations (e.g., 16 channels), and is not constrained by the requirement that it "must be directly reconstructable".
[0173] The embodiments of this disclosure tested the visual comparison of TF / SF / DF under the same bit rate. The test results show that DF maintains its appearance better over time, and its cumulative degradation is significantly less than that of TF and SF.
[0174] Furthermore, embodiments of this disclosure also perform visual analysis on AR-DiT under different bitrate conditions. For example, tests were conducted at 480p and approximately 0.0045–0.005 bpp, and the results show that, compared to TF / SF, the conditional DF-based scheme maintains better appearance and exhibits less cumulative degradation in the time direction.
[0175] Furthermore, in the embodiments of this disclosure, multiple video generation models can be initialized from pre-trained video DiT (e.g., Wan2.1-1.3B). For example, in BI-DiT, dense spatiotemporal attention can be retained to support sequence-level whole-segment generation, thereby adopting a video quality-first strategy; in AR-DiT, causal temporal window attention with a width of w hidden frames can be applied (w=3 was selected in the ablation experiment), and masked attention supports both streaming inference and limits the upper bound of the KV buffer length.
[0176] In addition, two sets of low-rank adaptation (LoRA) can be inserted into the training process of multiple video generation models respectively to maintain the generation prior and train only lightweight sidepaths. Here, LoRA refers to inserting low-rank trainable sidepaths into the pre-trained weights to achieve lightweight fine-tuning.
[0177] During training, the gradients of multiple video generation models collectively shape the same bitstream representation to achieve shared conditional features that are not exclusive to any particular attention pattern. After training, dense branches such as BI-DiT support sequence-level generation of buffered segments; while causal branches such as AR-DiT process newly arriving conditional features one by one with bounded key-value memory.
[0178] Furthermore, in embodiments of this disclosure, the video generation model can also be trained using adversarial distillation.
[0179] As an example, the aforementioned multiple video generation models may include a first model (e.g., BI-DiT) and a second model (e.g., AR-DiT), and the trained video encoding / decoding system includes a trained first model and a trained second model.
[0180] In this example, the training method may further include: performing adversarial distillation training on a trained second model based on a trained first model to obtain a distillation-trained second model.
[0181] In one example, the step of adversarial distillation training of a trained second model based on a trained first model may include: using the trained first model as a teacher model and an adversarial supervised model, using the trained second model as a student model, and performing adversarial distillation training on the trained second model.
[0182] Specifically, in the joint training in step 1050 above, the resulting second model is a multi-step model (e.g., multi-step AR-DiT). To further improve the model's real-time performance, for example, ... Figure 11 As shown in (b), in stage 2, after merging LoRA, the codec can be frozen, and under the same codec conditions, a first model such as BI-DiT can simultaneously act as the real scoring network, the pseudo-scoring network, and the adversarial supervisor. Under the same bitstream condition c (the aforementioned conditional features), a multi-step second model such as AR-DiT can be distilled into a single step. This represents the adversarial loss for latent feature generation. Indicates the distribution matching distillation loss, This represents the flow matching loss.
[0183] As an example, the real scoring network s_real and the pseudo-scoring network s_fake can be initialized with the first model, and the generator G_θ and the pseudo-scoring network s_fake can be jointly optimized, where the hidden representation can be generated. l Adding noise, for example, l_τ=(1-τ)l+τε, where τ represents the time step of random sampling with added noise, and ε represents the noise. Conditional Distribution Matching Distillation (Conditional DMD) estimates the gradient using the conditional score difference with normalized weights w(τ). Here, distribution matching distillation refers to the technique of using the distributional score difference to distill a multi-step diffusion into a few-step / single-step generation.
[0184] Typically, distribution matching only allows the student model to approximate the (imperfect) distribution of the teacher model. However, in the embodiments of this disclosure, a lightweight discriminant head D_φ can be appended to the intermediate features F_i of the pseudo-scoring network s_fake. Specifically, the learnable query vector q_i is processed through a cross-attention mechanism and a Multi-Layer Perceptron (MLP) to generate the logit vectors a_i for each layer. These are then concatenated and processed by an MLP to obtain a scalar logit with a non-saturating GAN loss. During discriminant head updates, the adversarial gradient is truncated on the backbone of the pseudo-scoring network s_fake. For example, the lightweight discriminant head D_φ is optimized only by the classification loss, and s_fake is updated only by its flow matching loss. Five D_φ / s_fake updates are performed for each update of the generator G_θ. This isolation stabilizes adversarial learning while preserving an accurate estimate of the generator's evolutionary distribution.
[0185] It should be noted that in the above example, the DMD score difference gradient estimation can be replaced with other distribution matching methods (such as integral probability metrics, MMD, optimal transmission score matching, etc.). Furthermore, the latent space discriminator can be replaced with other feature-level discriminators. Additionally, the adversarial loss can be replaced with a hinge loss instead of the non-saturating GAN loss. Moreover, the adversarial gradient truncation and 1:5 update ratio can be adjusted according to stability requirements.
[0186] Furthermore, it should be noted that although the second model, distilled to a single step, has been described above, the embodiments of this disclosure are not limited to this. The second model can also be distilled to fewer steps, such as 2 or 4 steps, achieving different trade-offs between quality and latency. Additionally, the 50 denoising steps for the first model can be adjusted as needed.
[0187] Alternatively or additionally, in another example, the video codec system may also include a first latent space decoder corresponding to the first model. In this example, the step of performing adversarial distillation training on a trained second model based on the trained first model may include: jointly training the trained second model and the second latent space decoder to obtain a jointly trained second model and a trained second latent space decoder; using the trained first model as a teacher model and an adversarial supervised model, and using the jointly trained second model as a student model, performing adversarial distillation training on the jointly trained second model.
[0188] Here, the number of parameters of the second hidden space decoder can be less than the number of parameters of the first hidden space decoder. For example, the second hidden space decoder can be a lightweight decoder (e.g., it can also be called Tiny-D).
[0189] For example, such as Figure 11As shown in (c), in stage 3, the second model of a single step can be jointly fine-tuned in pixel space and the lightweight decoder Tiny-D can be conditionally optimized.
[0190] Specifically, when AR-DiT is reduced to a single step, the use of deep 3D causal convolutions and attention with a first latent space decoder, such as the original video VAE decoder, may limit further optimization of latency, for example, approximately 69.34 ms / frame in experiments.
[0191] In this embodiment, the first latent space decoder corresponding to the second module used in joint training can be replaced by a lightweight decoder consisting of 2D causal memory blocks (e.g., CNN blocks) and pixel shaving upsampling. Each memory block fuses the activation of the current frame with cached features from the previous frame, preserving causal temporal information without using any 3D convolutions, and streaming pixels frame by frame.
[0192] By replacing the original first latent space decoder corresponding to the second module with a lightweight decoder, the high-dimensional encoder-decoder conditions can be directly injected into the lightweight decoder. The first projective receiver generates a concatenation of the latent representation and the conditions [l_t;c_t]. Using this method, in some test examples, the conditions alone can maintain faithful geometry and color at 0.0005 bpp; the generated latent representation provides perceptual detail; and the concatenation of the two achieves an optimal balance. Even at bitrates as low as 0.0005 bpp, high-dimensional (e.g., 256 channels) conditions consistently improve reconstruction quality.
[0193] During the pixel-level fine-tuning process in Phase 3, the lightweight decoder and the newly inserted LoRA in a second model, such as single-step AR-DiT, can be jointly optimized. The loss for joint optimization includes: MSE, perceptual term, etc. (Deep feature-based perceptual similarity metrics on convolutional neural network (VGG) features, such as Learned Perceptual Image Patch Similarity (LPIPS) and Deep Image Structure and Texture Similarity (DISTS), and pixel adversarial terms provided by a feature discriminator composed of frozen DINOv3 model features.) Flow distortion error calculated from the optical flow of the Recurrent All-Pairs FieldTransforms (RAFT) network. (Used to improve time-domain stability), where, GT&Recon represents the mean squared error loss, and GT&Recon represents the original video and the reconstructed video.
[0194] It should be noted that the lightweight decoder described above is merely an example. Other streaming decoding structures without 3D convolutions (such as grouped temporal convolutions or recursive state-space decoders) can also be used as lightweight decoders. Furthermore, the conditional injection method is not limited to... Figure 11 The channel splicing shown can also be, for example, cross-attention, FiLM modulation, AdaLN, etc.
[0195] It should be noted that the execution order of the pixel fine-tuning process and the distillation training process described above can be arbitrary. For example, pixel fine-tuning can be performed first, followed by distillation training, or distillation and pixel fine-tuning can be performed alternately. Furthermore, the video encoding / decoding system can continue to jointly update in subsequent stages with a small learning rate.
[0196] Furthermore, in the embodiments of this disclosure, each video generation model (e.g., BI-DiT and AR-DiT) can share a backbone and implement single-model dual-mode with mode switching (such as attention mask switching), further reducing the model storage at the decoding end.
[0197] Furthermore, during the training process described above, the LoRA adapter at any stage can be replaced with other efficient fine-tuning methods (such as prefix fine-tuning, Adapter, cue fine-tuning, partial layer unfreezing, etc.) or it can be replaced with full-parameter fine-tuning.
[0198] Furthermore, the aforementioned causal window width w can be set from 1 to 5 (or greater) depending on the computational power / quality requirements. Additionally, the KV cache can be replaced with variations such as a fixed-length sliding window cache, a gated forget cache, or a hierarchical cache, as long as causality is maintained.
[0199] According to the video encoding / decoding method and training method of the video encoding / decoding system according to the embodiments of this disclosure, a unified generative video encoding / decoding method (UniGVC) can be provided, which allows a single compressed bitstream to drive two decoding modes simultaneously.
[0200] For example, in the embodiments of this disclosure, a single bitstream can simultaneously support quality-oriented bidirectional random access decoding (UniGVC-BI) and low-latency-oriented autoregressive streaming decoding (UniGVC-AR). The decoding end can freely switch between the two modes based on its own computing power and latency budget. The encoding end does not need to know the capabilities of the receiving end and does not need to repeatedly encode / transmit two bitstreams, thereby solving the problem of strong binding between video quality and latency in related technologies.
[0201] Furthermore, the video encoding / decoding method and the training method of the video encoding / decoding system according to the embodiments of this disclosure can be jointly optimized with a hierarchical latent space video codec and a video diffusion decoder, achieving the best rate-distortion-perceptual tradeoff and time-stable reconstruction in current evaluations even at extremely low bitrates such as 0.0005 bpp, thus solving the problems of poor perceptual quality and temporal flicker in related technologies at ultra-low bitrates.
[0202] Furthermore, according to the video encoding / decoding method and training method of the video encoding / decoding system according to the embodiments of this disclosure, a context autoregressive mechanism is proposed, which uses the frame-aligned encoder / decoder conditions that are deterministically decoded from the bitstream as the temporal history, rather than using the generated hidden representation as the history. This allows for fully parallel training with shared diffusion time steps and ensures that the distribution of training and inference conditions is consistent, thus solving the problems of inconsistency between training and inference and error accumulation in autoregressive diffusion.
[0203] Furthermore, the video encoding / decoding method and training method of the video encoding / decoding system according to embodiments of this disclosure reduce a second model, such as an autoregressive diffusion model, to a single step by using an adversarial distribution matching distillation with a first model, such as a bidirectional model, as the teacher. Additionally, a conditional lightweight video decoder can replace a high-latency decoder, such as a 3D VAE. With this design, a real-time decoding speed of 36.85 FPS can be achieved at 1080p, which is more than 250 times faster than the bidirectional mode, thus solving the real-time bottleneck of streaming decoding.
[0204] The video encoding / decoding method and the training method of the video encoding / decoding system according to the embodiments of this disclosure can be applied to scenarios such as on-demand and / or offline high-quality scenarios, live streaming and / or real-time communication scenarios, and heterogeneous receiving end scenarios.
[0205] For example, in on-demand and / or offline high-quality scenarios, video content can be fully buffered before decoding to pursue the ultimate reconstruction quality and perceived realism (such as cloud video enhancement, offline transcoding, and high-quality archiving); in live streaming and / or real-time communication scenarios, the decoding end can only receive the bitstream step by step, requiring low-latency output frame by frame (such as mobile live streaming and real-time video backhaul); in heterogeneous receiving end scenarios, the same bitstream needs to be decoded by multiple receiving ends with different computing power and latency budgets (such as high-end GPU servers choosing high-quality mode and edge devices choosing low-latency mode).
[0206] The following will refer to Figures 13 to 15 Several test or comparative examples of video encoding / decoding methods according to embodiments of the present disclosure are described.
[0207] In one example, on the 1080p standard test sets HEVC-B, UVG, and MCL-JCV (first 96 frames each), UniGVC was evaluated with intra-period = -1. The test results show that the bidirectional random access decoder UniGVC-BI, based on the video codec system of this disclosure, forms the strongest overall rate-distortion-perception (RDP) front among all evaluation methods. For example, as... Figure 13 As shown, at similar bitrates, the perceptual fidelity (LPIPS / DISTS) of the method in the embodiments of this disclosure is significantly better than that of MSE-type codecs (DCVC-FM / RT), and the distribution-level metrics (such as Fréchet Inception Distance (FID) and Kernel Inception Distance (KID)) are better than those of existing generative codecs (GLC-Video, GLVC, GNVC-VD, GVC1D, Free-GVC, S2VC), with the gain being particularly significant near the lowest operating point of 0.0005 bpp. The autoregressive streaming decoder UniGVC-AR of the video codec system according to this disclosure actively trades some quality for latency, while still maintaining competitive overall performance. Here, VTM-LD represents the VVC Test Model Low Delay, and VTM-RA represents the VVC Test Model RandomAccess.
[0208] In one example, frame-level reconstructed GLC-Video exhibits significantly larger stream distortion errors (sharp isolated frames ≠ stable video); in contrast, the UniGVC-BI video codec system according to this disclosure provides higher video quality with a Disentangled Objective Video Quality Evaluator (DOVER), while exhibiting temporal performance close to conservative distortion-class codecs, and a smooth curve as the bitrate decreases (no low-bitrate flickering collapse even at 0.0005 bpp). Figure 14 As shown in (a), the flow distortion error (temporal stability) is traded over the overall quality of the DOVER; as Figure 14 As shown in (b), the human preference study on HEVC-B further supports the above conclusions.
[0209] In one example, a qualitative comparison test was performed on HEVC-B, where each case was a mosaic of the same row of regions from 96 frames to demonstrate temporal consistency. For example... Figure 15As shown, at 0.0019 / 0.0014 bpp (DCVC-RT requires 0.0099 / 0.0082 bpp, GLC-Video requires 0.0056 / 0.0066 bpp), the UniGVC-BI video codec system according to this disclosure recovers stable textures and clean boundaries through sequence-level joint inference; DCVC-RT is stable but smooths out fine edges and repetitive textures; the details of GLC-Video frame-level synthesis drift with frames and the time stripes are discontinuous; the UniGVC-AR video codec system according to this disclosure maintains the scene layout and motion consistent with the bidirectional mode, with only a slight reduction in detail, which is the expected cost of causal real-time decoding.
[0210] In real-time decoding tests, the UniGVC-AR video codec system disclosed herein decodes 1080p video at 36.85 FPS on a single B300 GPU, which is more than 250 times faster than UniGVC-BI. The quantitative ablation of the progressive acceleration path (1080p, HEVC-B, and four bitrates from 0.0005 to 0.004 bpp) is shown in Table 1 below: Table 1
[0211] As shown in Table 1 above, switching from a 50-step bidirectional model to a 1-step autoregressive model can reduce DiT latency from 6948.61 ms / frame to 16.10 ms / frame; it significantly narrows the quality loss against DMD (proving that bidirectional scoring teachers can improve causal students); the lightweight decoder can reduce VAE-D components from 69.34 ms / frame to 3.62 ms / frame and increase end-to-end throughput from 10.77 ms / frame to 36.85 ms / frame; pixel fine-tuning and conditional training processes can recover most of the quality loss, resulting in a final BD-PSNR that is 0.452 dB higher than the reference of the 50-step bidirectional model (0.287 dB, see the ablation description in the main text), with only a 0.010 difference in LPIPS and only a 0.022 difference in DISTS. Here, in Table 1 above, "BD-" indicates the same bitrate conditions.
[0212] Furthermore, the attention window ablation (1080pFPS, 0.001–0.004bpp four-point BD-rate on HEVC-C) is shown in Table 2 below: Table 2
[0213] As shown in Table 2, dense bidirectional attention compression is the most efficient but only achieves 7.09 FPS; window w=3 achieves the best trade-off between 62.18 FPS and quality loss, further reducing the window saves only a limited amount of time but leads to a sharp deterioration in quality.
[0214] The video encoding and decoding scheme of the embodiments of this disclosure can reconstruct a frame-aligned, mode-independent conditional sequence from a bitstream generated by a layered latent space codec. The same bitstream can be decoded by multi-step bidirectional DiT (quality / random access) or by single-step causal DiT (low latency / streaming). Mode selection can be postponed to the decoding end or switched during decoding, avoiding repeated encoding and dual bitstream transmission.
[0215] Furthermore, the video codec scheme using the embodiments of this disclosure can use the codec conditional sequence of deterministic decoding from the bitstream as the temporal history (instead of generating latent representations / pixels), and with conditional diffusion forced training with shared diffusion time steps across the entire frame, achieve fully parallel training, completely consistent training-inference conditions, and parallel backpropagation of gradients for each frame to the codec, thereby eliminating the exposure bias of TF and the serial training problem of SF.
[0216] Furthermore, the video encoding and decoding scheme using the embodiments of this disclosure can concentrate bits into the branches of the master implicit representation and the super implicit representation modeled by strong spatiotemporal context (the branch of residual features <3% bits) through hierarchical entropy decomposition, and is combined with efficient arithmetic decoding interaction of scale single prediction and mean multi-pass refinement.
[0217] Furthermore, the video encoding and decoding scheme using the embodiments of this disclosure can simultaneously act as the real score, the pseudo score, and the adversarial supervisor under the same bitstream conditions, thus distilling causal AR-DiT into a single step.
[0218] Furthermore, the video encoding and decoding scheme of the embodiments of this disclosure can conditionally optimize a lightweight video decoder, for example, by constructing a streaming pixel decoder with 2D causal memory blocks (without 3D convolution) and pixel rearrangement (PixelShuffle), and injecting high-dimensional bitstream conditions with [l_t;c_t] splicing. Combined with the feature discriminator of the DINOv3 model and pixel-level fine-tuning of the RAFT stream distortion loss, the decoding pipeline can be improved from 10.77 to 36.85 FPS with virtually no loss in quality.
[0219] Furthermore, the video encoding and decoding scheme of the embodiments of this disclosure can unify intra-frame / inter-frame recursive implicit coding. Specifically, by zero initialization of the first frame and activation of a small number of intra-frame entropy layers, and recursive feature memorization of subsequent frames, the unified architecture ensures consistency of the conditional feature space and satisfies causal streaming constraints.
[0220] Furthermore, the video encoding and decoding scheme using the embodiments of this disclosure can establish window attention (w=3) causality. For example, window causal attention with bounded KV buffers can achieve a balance between streaming throughput and temporal modeling capabilities, and the window size can be flexibly configured according to deployment requirements.
[0221] An exemplary embodiment of the present disclosure also provides a video decoding apparatus disposed on a video decoder, the video decoder including a plurality of video generation models.
[0222] The video decoding device may include: a first receiving unit configured to receive encoded data of the current frame to be decoded; a first decoding unit configured to decode the encoded data to obtain reconstructed features of the current frame; a projection unit configured to project the reconstructed features of the current frame onto a preset feature space to obtain conditional features, wherein the preset feature space corresponds to the feature space of the input features of each of the multiple video generation models; and a first prediction unit configured to predict the current frame based on the conditional features using a target model selected from the multiple video generation models.
[0223] Optionally, the video decoder also includes a latent space decoder corresponding to each video generation model, wherein the first prediction unit is configured to: guide the target model based on conditional features to generate latent space features; and reconstruct the current frame based on the latent space features using the latent space decoder corresponding to the target model, wherein the multiple video generation models include a bidirectional diffusion transformer and a unidirectional diffusion transformer, wherein the number of parameters of the latent space decoder corresponding to the bidirectional diffusion transformer is less than the number of parameters of the latent space decoder corresponding to the unidirectional diffusion transformer.
[0224] An exemplary embodiment of the present disclosure also provides a video decoding apparatus disposed on a video decoder, the video decoder including a video generation model.
[0225] The video decoding device may include: a second receiving unit configured to receive encoded data of the current frame to be decoded; a decoding probability generation unit configured to generate probability distribution information for entropy decoding of the current frame based on the reconstructed features of the previously decoded frame; a second decoding unit configured to decode the encoded data based on the probability distribution information to obtain the reconstructed features of the current frame; and a second prediction unit configured to predict the current frame based on the reconstructed features using a video generation model.
[0226] Optionally, the decoding probability generation unit is configured to: extract context information for the current frame based on the reconstructed features of the previous frame, wherein the context information includes a first context feature and / or a second context feature, the first context feature corresponding to the hyper-implicit representation of the previous frame, the second context feature corresponding to the primary implicit representation of the previous frame, the primary implicit representation of the previous frame being obtained by compressing the reconstructed features of the previous frame, and the hyper-implicit representation of the previous frame being obtained by compressing the primary implicit representation of the previous frame; perform arithmetic decoding on the encoded data based on a preset probability distribution to obtain residual features; generate a first probability distribution based on the residual features and the first context feature; perform arithmetic decoding on the encoded data based on the first probability distribution to obtain the hyper-implicit representation; and generate a second probability distribution as probability distribution information based on the residual features, the hyper-implicit representation, and the second context feature.
[0227] An exemplary embodiment of the present disclosure also provides a video encoding apparatus, which is disposed in a video encoder.
[0228] The video encoding apparatus may include: an acquisition unit configured to acquire the current frame to be encoded; a latent space representation generation unit configured to generate a latent space representation corresponding to the current frame based on the current frame; an encoding probability generation unit configured to generate probability distribution information for entropy encoding of the current frame based on the reconstructed features of the previously encoded frame; and an encoding unit configured to encode the current frame based on the latent space representation and the probability distribution information to obtain the encoded data of the current frame.
[0229] An exemplary embodiment of the present disclosure also provides a training apparatus for a video encoding and decoding system, the video encoding and decoding system including multiple video generation models and conditional codecs.
[0230] The training device may include: a training encoding unit configured to encode training frame samples using a conditional codec to generate training encoded data of the training frame samples; a training decoding unit configured to decode the training encoded data using a conditional codec to obtain training reconstructed features; a training projection unit configured to project the training reconstructed features onto a preset feature space using a conditional codec to obtain training conditional features, wherein the preset feature space corresponds to the input features of each of the multiple video generation models; a training prediction unit configured to predict prediction frames based on the training conditional features using multiple video generation models; and a training unit configured to train multiple video generation models and a conditional codec based on the prediction frames to obtain a trained video encoding / decoding system.
[0231] Optionally, the training conditional features include multiple conditional features that correspond one-to-one with multiple training frame samples. The training unit is configured to: add noise to the multiple conditional features at the same diffusion time step to obtain multiple noisy conditional features; and input the multiple noisy conditional features in parallel into each of the multiple video generation models to obtain the predicted frame output by each video generation model.
[0232] Optionally, the multiple video generation models include a first model and a second model, and the trained video encoding and decoding system includes a trained first model and a trained second model, wherein the training unit is further configured to: perform adversarial distillation training on the trained second model based on the trained first model to obtain a distillation-trained second model.
[0233] Optionally, the training unit is further configured to: use the trained first model as a teacher model and an adversarial supervised model, use the trained second model as a student model, and perform adversarial distillation training on the trained second model; or, the video encoding and decoding system further includes a first latent space decoder corresponding to the first model, and the training unit is further configured to: jointly train the trained second model and the second latent space decoder to obtain a jointly trained second model and a trained second latent space decoder, wherein the number of parameters of the second latent space decoder is less than the number of parameters of the first latent space decoder; use the trained first model as a teacher model and an adversarial supervised model, use the jointly trained second model as a student model, and perform adversarial distillation training on the jointly trained second model.
[0234] It should be understood that the specific processing performed by the aforementioned device has been referenced. Figures 1 to 11 A detailed description has been provided, and the relevant details will not be repeated here.
[0235] Furthermore, it should be understood that each unit in the above-described device may be implemented as a hardware component and / or a software component.
[0236] Figure 16 A computing environment 1610 coupled to a user interface 1650 is shown. The computing environment 1610 may be part of a data processing server. The computing environment 1610 includes a processor 1620, memory 1630, and input / output (I / O) interface 1640.
[0237] Processor 1620 typically controls the overall operation of computing environment 1610, such as operations associated with display, data acquisition, data communication, and image processing. Processor 1620 may include one or more processors for executing instructions to perform all or some of the steps in the methods described above. Furthermore, processor 1620 may include one or more modules that facilitate interaction between processor 1620 and other components. The processor may be a central processing unit (CPU), microprocessor, microcontroller, graphics processing unit (GPU), etc.
[0238] Memory 1630 is configured to store various types of data to support the operation of computing environment 1610. Memory 1630 may include predefined software 1632. Examples of such data include instructions for any application or method operating on computing environment 1610, video datasets, image data, etc. Memory 1630 can be implemented using any type of volatile or non-volatile memory device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0239] I / O interface 1640 provides an interface between processor 1620 and peripheral interface modules (such as keyboard, click wheel, buttons, etc.). I / O interface 1640 can be coupled with encoders and decoders.
[0240] In an embodiment, a non-transitory computer-readable storage medium or computer program product is also provided, including, for example, a plurality of programs in memory 1630 and / or a storage bitstream. The plurality of programs can be executed by processor 1620 to perform the encoding or decoding methods described above, wherein the bitstream is generated by the encoding method and / or will be decoded by the decoding method described above. For example, the computer program product may include a non-transitory computer-readable storage medium. In one example, the plurality of programs can be executed by processor 1620 to receive a bitstream or data stream including encoded video information (e.g., video blocks representing encoded video frames, and / or one or more associated syntax elements, etc.), and can also be executed by processor 1620 to perform the decoding method described above based on the received bitstream or data stream. In another example, the plurality of programs can be executed by processor 1620 to perform the encoding method described above to encode video information (e.g., video blocks representing video frames, and / or one or more associated syntax elements, etc.) into a bitstream or data stream, and can also be executed by processor 1620 to transmit or store the bitstream or data stream. Alternatively, the aforementioned bit stream or data stream may be stored in a non-transitory computer-readable storage medium or computer program product.
[0241] In an embodiment, a bitstream (e.g., including encoded video information) generated by the above encoding method and / or decoded by the above decoding method is provided.
[0242] In an embodiment, a computing device is also provided, comprising: one or more processors (e.g., processor 1620); and a non-transitory computer-readable storage medium or memory 1630 therein storing a plurality of programs executable by the one or more processors, wherein the one or more processors are configured to perform the methods described above when executing the plurality of programs. In one example, the one or more processors are configured to perform the encoding method described above to generate a bitstream when executing the plurality of programs, and the computing device may further include a transmitter configured to transmit the bitstream. In an alternative example, the one or more processors are configured to perform the encoding method described above to generate a bitstream when executing the plurality of programs, and to transmit or store the bitstream. In one example, the bitstream will be decoded using the decoding method described above.
[0243] In an embodiment, the computing environment 1610 may be implemented by one or more ASICs, DSPs, digital signal processing devices (DSPDs), programmable logic devices (PLDs), FPGAs, GPUs, controllers, microcontrollers, microprocessors, or other electronic components for performing the methods described above.
[0244] In one embodiment, a method for storing a bitstream is also provided, comprising: storing the bitstream on a non-transitory computer-readable storage medium, wherein the bitstream is generated by the above-described encoding method and / or decoded by the above-described decoding method. In another embodiment, a method for storing a bitstream or a method for encoding video data is also provided, comprising: performing the above-described encoding method to generate a bitstream, and storing the bitstream on a non-transitory computer-readable storage medium. In one example, the bitstream will be decoded by the above-described decoding method.
[0245] In one embodiment, a method for transmitting a bitstream is also provided, the bitstream being generated by the above-described encoding method and / or decoded by the above-described decoding method. In another embodiment, a method for transmitting a bitstream or for encoding video data is also provided, comprising: performing the above-described encoding method to generate a bitstream, and transmitting the bitstream to a decoder. In one example, the bitstream will be decoded by the above-described decoding method. In another embodiment, a method for receiving a bitstream is also provided, the bitstream being generated by the above-described encoding method and / or decoded by the above-described decoding method.
[0246] In one embodiment, an electronic device is also provided, comprising: one or more processors; and a memory coupled to the one or more processors and configured to store instructions executable by the one or more processors, wherein the one or more processors, when executing the instructions, are configured to perform a video decoding method, a video encoding method, or a training method for a video encoding / decoding system according to exemplary embodiments of the present disclosure.
[0247] In one embodiment, a computer program product is also provided, the computer program product including computer instructions, which, when executed by at least one processor, implement the video decoding method, video encoding method, or training method of the video encoding / decoding system according to exemplary embodiments of the present disclosure.
[0248] In one embodiment, a computer-readable storage medium is also provided, on which instructions and a bit stream are stored, wherein the instructions, when executed by a computing device having one or more processors, cause one or more processors to perform a video encoding method according to an exemplary embodiment of the present disclosure to generate the bit stream.
[0249] In one embodiment, a method for storing a bitstream is also provided, the method comprising: performing a video encoding method as described in an exemplary embodiment of the present disclosure to generate a bitstream; and storing the bitstream.
[0250] The description in this disclosure has been presented for illustrative purposes and is not intended to be exhaustive or limited to this disclosure. Many modifications, variations, and alternative embodiments will be apparent to those skilled in the art from the teachings presented in the foregoing description and the associated drawings.
[0251] Unless otherwise specifically stated, the order of steps in the method according to this disclosure is intended to be illustrative only, and the steps of the method according to this disclosure are not limited to the specific order described above, but may be changed according to actual circumstances. Furthermore, at least one step in the method according to this disclosure may be adjusted, combined, or omitted as needed.
[0252] The examples chosen and described are intended to explain the principles of this disclosure and to enable others skilled in the art to understand the various embodiments of this disclosure, and preferably to utilize the basic principles and various embodiments with various modifications suitable for the intended particular purpose. Therefore, it will be understood that the scope of this disclosure is not limited to the specific examples of the disclosed embodiments, and that modifications and other embodiments are intended to be included within the scope of this disclosure.
Claims
1. A video decoding method, characterized in that, The video decoding method is executed by a video decoder, which includes multiple video generation models. The video decoding method includes: Receive the encoded data of the current frame to be decoded; The encoded data is decoded to obtain the reconstructed features of the current frame; The reconstructed features of the current frame are projected onto a preset feature space to obtain conditional features, wherein the preset feature space corresponds to the feature space of the input features of each of the multiple video generation models. The current frame is predicted using a target model selected from the plurality of video generation models, based on the conditional features.
2. The video decoding method according to claim 1, characterized in that, The video decoder also includes a latent space decoder corresponding to each video generation model. The step of predicting the current frame using the target model among the multiple video generation models based on the conditional features includes: Based on the aforementioned conditional features, the target model is guided to generate latent space features; The current frame is reconstructed using the latent space decoder corresponding to the target model and based on the latent space features. The multiple video generation models include a bidirectional diffusion transformer and a unidirectional diffusion transformer, wherein the number of parameters of the latent space decoder corresponding to the bidirectional diffusion transformer is less than the number of parameters of the latent space decoder corresponding to the unidirectional diffusion transformer.
3. A video decoding method, characterized in that, The video decoding method is executed by a video decoder, which includes a video generation model. The video decoding method includes: Receive the encoded data of the current frame to be decoded; Based on the reconstructed features of the decoded previous frame, generate probability distribution information for entropy decoding of the current frame; Based on the probability distribution information, the encoded data is decoded to obtain the reconstructed features of the current frame; The current frame is predicted using a video generation model based on the reconstructed features.
4. The video decoding method according to claim 3, characterized in that, The generation of probability distribution information for entropy decoding of the current frame based on the reconstructed features of the decoded previous frame includes: Based on the reconstructed features of the previous frame, context information for the current frame is extracted. The context information includes a first context feature and / or a second context feature. The first context feature corresponds to the super-latent representation of the previous frame, and the second context feature corresponds to the main latent representation of the previous frame. The main latent representation of the previous frame is obtained by compressing the reconstructed features of the previous frame, and the super-latent representation of the previous frame is obtained by compressing the main latent representation of the previous frame. Based on a preset probability distribution, the encoded data is arithmetic decoded to obtain residual features; Based on the residual features and the first context features, a first probability distribution is generated; Based on the first probability distribution, arithmetic decoding is performed on the encoded data to obtain the hyper-implicit representation; Based on the residual features, the hyper-hidden representation, and the second context features, a second probability distribution is generated as the probability distribution information.
5. A video encoding method, characterized in that, The video encoding method is executed by a video encoder, wherein the video encoding method includes: Get the current frame to be encoded; Based on the current frame, generate a latent space representation corresponding to the current frame; Based on the reconstructed features of the encoded previous frame, generate probability distribution information for the entropy encoding of the current frame; Based on the latent space representation and the probability distribution information, the current frame is encoded to obtain the encoded data of the current frame.
6. A training method for a video encoding / decoding system, characterized in that, The video encoding and decoding system includes multiple video generation models and conditional codecs. The training method includes: The conditional codec is used to encode the training frame samples to generate the training encoded data of the training frame samples; The training encoded data is decoded using the conditional codec to obtain the training reconstructed features; Using the conditional codec, the trained reconstructed features are projected onto a preset feature space to obtain trained conditional features, wherein the preset feature space corresponds to the input features of each video generation model in the multiple video generation models; Using the multiple video generation models and based on the training condition features, a predicted frame is obtained. Based on the predicted frames, the multiple video generation models and the conditional codec are trained to obtain a trained video codec system.
7. The training method according to claim 6, characterized in that, The training condition features include multiple condition features that correspond one-to-one with the multiple training frame samples. The step of using the multiple video generation models to predict the predicted frame based on the training condition features includes: For the multiple conditional features, noise is added at the same diffusion time step to obtain multiple noisy conditional features; The multiple noisy conditional features are input in parallel into each of the multiple video generation models to obtain the predicted frame output by each video generation model.
8. The training method according to claim 6, characterized in that, The plurality of video generation models include a first model and a second model, and the trained video encoding / decoding system includes a trained first model and a trained second model, wherein the training method further includes: Based on the trained first model, the trained second model is subjected to adversarial distillation training to obtain a distillation-trained second model. Wherein, the step of performing adversarial distillation training on the trained second model based on the trained first model includes: The trained first model is used as the teacher model and the adversarial supervision model, and the trained second model is used as the student model. Adversarial distillation training is then performed on the trained second model. or, The video encoding / decoding system further includes a first latent space decoder corresponding to the first model, and the adversarial distillation training of the trained second model based on the trained first model includes: The trained second model and the second latent space decoder are jointly trained to obtain a jointly trained second model and a trained second latent space decoder, wherein the number of parameters of the second latent space decoder is less than the number of parameters of the first latent space decoder. The trained first model is used as the teacher model and the adversarial supervision model, and the jointly trained second model is used as the student model. Adversarial distillation training is performed on the jointly trained second model.
9. A video decoding device, characterized in that, The video decoding device is disposed on the video decoder, which includes multiple video generation models. The video decoding device includes: The first receiving unit is configured to receive the encoded data of the current frame to be decoded; The first decoding unit is configured to decode the encoded data to obtain the reconstructed features of the current frame; The projection unit is configured to project the reconstructed features of the current frame onto a preset feature space to obtain conditional features, wherein the preset feature space corresponds to the feature space of the input features of each of the multiple video generation models. The first prediction unit is configured to predict the current frame based on the conditional features using a target model selected from the plurality of video generation models.
10. A video decoding device, characterized in that, The video decoding device is disposed on the video decoder, the video decoder includes a video generation model, and the video decoding device includes: The second receiving unit is configured to receive the encoded data of the current frame to be decoded; The decoding probability generation unit is configured to generate probability distribution information for entropy decoding of the current frame based on the reconstructed features of the previously decoded frame. The second decoding unit is configured to decode the encoded data based on the probability distribution information to obtain the reconstructed features of the current frame; The second prediction unit is configured to use a video generation model to predict the current frame based on the reconstructed features.
11. A video encoding device, characterized in that, The video encoding device is disposed on the video encoder, wherein the video encoding device includes: The acquisition unit is configured to acquire the current frame to be encoded; The latent space representation generation unit is configured to generate a latent space representation corresponding to the current frame based on the current frame; The encoding probability generation unit is configured to generate entropy-encoded probability distribution information for the current frame based on the reconstructed features of the previously encoded frame. The encoding unit is configured to encode the current frame based on the latent space representation and the probability distribution information to obtain the encoded data of the current frame.
12. A training device for a video encoding / decoding system, characterized in that, The video encoding and decoding system includes multiple video generation models and conditional codecs. The training device includes: The training encoding unit is configured to use the conditional codec to encode training frame samples to generate training encoded data of the training frame samples; The training decoding unit is configured to use the conditional codec to decode the training encoded data to obtain training reconstructed features; The training projection unit is configured to use the conditional codec to project the training reconstructed features onto a preset feature space to obtain training conditional features, wherein the preset feature space corresponds to the input features of each of the multiple video generation models. The training prediction unit is configured to use the plurality of video generation models to predict the prediction frame based on the training condition features; The training unit is configured to train the plurality of video generation models and the conditional codec based on the predicted frames to obtain a trained video codec system.
13. An electronic device, comprising: One or more processors; as well as A memory, coupled to the one or more processors and configured to store instructions executable by the one or more processors. The one or more processors are configured to perform the method according to any one of claims 1-8 when executing the instructions.
14. A computer program product comprising computer instructions, characterized in that, When the computer instructions are executed by at least one processor, they implement the method according to any one of claims 1 to 8.
15. A computer-readable storage medium storing instructions and a bit stream thereon, characterized in that, When the instructions are executed by a computing device having one or more processors, the one or more processors cause the one or more processors to perform the video encoding method as described in claim 5 to generate the bitstream.
