Image decoding method, image coding method, image decoding device, image coding device and equipment

By determining the area category of the target permission level on the decoding end and the encoding end, the permission protection of the image is solved, and the information access control of users of different permission levels is realized.

CN120568079APending Publication Date: 2025-08-29HANGZHOU HIKVISION DIGITAL TECHNOLOGY CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202510887704.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2022-11-14
Publication Date
2025-08-29

AI Technical Summary

Technical Problem

In the prior art, the video image reconstructed on the decoding side may present all permission information, such as license plates, local areas of the human body, screen information, etc., which poses security risks and require permission protection.

Method used

When enabling permission protection, determine the target area category corresponding to the target permission level, and decode or encode the current encoding unit according to the target area category to realize the permission protection of the image.

Benefits of technology

Improve data security and ensure that high-permission level users can view a large or all image information, while low-permission level users can only view a small amount of information, realizing the permission protection of image information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120568079A_ABST
    Figure CN120568079A_ABST
Patent Text Reader

Abstract

The invention provides an image decoding method and device, an image coding method and device and equipment, and the image decoding method comprises the steps: determining one or more target region types corresponding to a target authority level when authority protection is started; and decoding the current coding unit according to the target region category. Through the technical scheme of the invention, permission protection (such as license plates, human body local areas, screens, characters and the like) of various information of the image can be carried out, and the data security is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of coding and decoding technology, and in particular to an image decoding and encoding method, apparatus, and device thereof. Background Art

[0002] To save space, video images are encoded before transmission. Complete video encoding can include prediction, transformation, quantization, entropy coding, and filtering. The prediction process can include intra-frame prediction and inter-frame prediction. Inter-frame prediction leverages correlations in the temporal domain of the video, using pixels from adjacent coded images to predict the current pixel, effectively removing temporal redundancy. Intra-frame prediction leverages correlations in the spatial domain of the video, using pixels from coded blocks of the current frame to predict the current pixel, removing spatial redundancy. Both intra-frame and inter-frame prediction methods can reconstruct the complete video image at the decoder, and users can view the complete video image. However, after the decoder reconstructs the complete video image, it will contain all authorized information, such as license plate information, information about local human areas, and screen information. This poses a security risk and requires authorization protection. Summary of the Invention

[0003] In view of this, the present application provides an image decoding, image encoding method, device and equipment thereof, which can protect various types of information rights of images (such as license plates, local areas of the human body, screens, text, etc.) and improve data security.

[0004] The present application provides an image decoding method, applied to a decoding end, the method comprising:

[0005] When enabling permission protection, determining one or more target area categories corresponding to a target permission level;

[0006] The current coding unit is decoded according to the target region category.

[0007] The present application provides an image encoding method, applied to an encoding end, the method comprising:

[0008] When enabling permission protection, determining one or more target area categories; wherein the target area categories are area categories corresponding to the first permission level and not corresponding to the second permission level;

[0009] The current coding unit is encoded according to the target region category.

[0010] The present application provides an image decoding device, which is applied to a decoding end. The device includes:

[0011] a memory configured to store video data;

[0012] A decoder configured to:

[0013] When enabling permission protection, determining one or more target area categories corresponding to a target permission level;

[0014] The current coding unit is decoded according to the target region category.

[0015] The present application provides an image encoding device, applied to an encoding end, the device comprising:

[0016] a memory configured to store video data;

[0017] An encoder configured to:

[0018] When enabling permission protection, determining one or more target area categories; wherein the target area categories are area categories corresponding to the first permission level and not corresponding to the second permission level;

[0019] The current coding unit is encoded according to the target region category.

[0020] The present application provides a decoding end device, comprising: a processor and a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions that can be executed by the processor; the processor is used to execute the machine-executable instructions to implement the above-mentioned image decoding method.

[0021] The present application provides an encoding end device, comprising: a processor and a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions that can be executed by the processor; the processor is used to execute the machine-executable instructions to implement the above-mentioned image encoding method.

[0022] It can be seen from the above technical solutions that in the embodiment of the present application, when permission protection is enabled, the target area category corresponding to the target permission level can be determined, and the current coding unit can be decoded according to the target area category, so that various types of information permission protection of images and videos (such as license plates, local areas of the human body, screens, text, etc.) can be performed to improve data security. For example, when there are information security issues with images, the images can be protected so that users with high permission levels can view a large amount or even all of the image information, and users with low permission levels can only view a small amount of image information. For example, the image can be divided into low permission areas and high permission areas, low permission users can only view low permission areas, and high permission users can view low permission areas and high permission areas. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 It is a schematic diagram of the video coding framework;

[0024] Figure 2A-2C It is a schematic diagram of the video coding framework;

[0025] Figure 3 is a flowchart of an image decoding method in one embodiment of the present application;

[0026] Figure 4 is a flowchart of an image encoding method in one embodiment of the present application;

[0027] Figure 5 This is a schematic diagram of the area category identifier corresponding to the area in one embodiment of the present application;

[0028] Figure 6 This is a schematic diagram of the area category identifier corresponding to the area in one embodiment of the present application;

[0029] Figure 7 This is a schematic diagram of the area category identifier corresponding to the area in one embodiment of the present application;

[0030] Figure 8 This is a schematic diagram of the area category identifier corresponding to the area in one embodiment of the present application;

[0031] Figure 9A This is a hardware structure diagram of a decoding end device in one embodiment of the present application;

[0032] Figure 9B This is a hardware structure diagram of an encoding terminal device in one embodiment of the present application. DETAILED DESCRIPTION

[0033] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, rather than for limiting the present application. The singular forms of "a", "said" and "the" used in the embodiments of the present application and the claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to any or all possible combinations of one or more associated listed items. It should be understood that although the embodiments of the present application may use the terms first, second, etc. to describe various information, these information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of the embodiments of the present application, the first information may also be referred to as the second information, and the second information may also be referred to as the first information, depending on the context. In addition, the word "if" used can be interpreted as "at the time of...", or "when...", or "in response to determination".

[0034] In the embodiments of the present application, an image decoding and encoding method is proposed, which may involve the following concepts:

[0035] Prediction Signal: A prediction signal is a pixel value derived from an already coded pixel. The difference between the original pixel and the predicted pixel yields a residual, which is then transformed, quantized, and coefficient encoded. Inter-frame prediction signals are pixel values ​​derived from a reference frame (reconstructed pixel frame) for the current block. Due to the discrete pixel positions, interpolation is required to obtain the final predicted pixel. The closer the predicted pixel is to the original pixel, the smaller the residual energy obtained by subtracting the two, resulting in higher coding compression performance.

[0036] Rate-Distortion Optimized (RDO): Coding efficiency is evaluated using two key metrics: bit rate and Peak Signal to Noise Ratio (PSNR). A smaller bitrate results in a higher compression ratio, and a higher PSNR results in better reconstructed image quality. When selecting a mode, the discriminant formula is essentially a comprehensive evaluation of these two metrics. For example, the cost of a mode is: J(mode) = D + λ*R, where D represents distortion, typically measured using the SSE metric (mean squared sum of squared differences between the reconstructed image block and the source image). For cost considerations, the SAD metric (the sum of absolute differences between the reconstructed image block and the source image) can also be used. λ is the Lagrange multiplier, and R is the actual number of bits required to encode the image block in that mode, including the bits required for coding mode information, motion information, and residual information. Using the rate-distortion principle to compare coding modes during mode selection generally ensures optimal coding performance.

[0037] Video Coding Framework: See Figure 1 As shown in FIG, a schematic diagram of a video encoding framework of an encoding end can be used to implement the encoding end processing flow of the present application, and a schematic diagram of a video decoding framework can be used with FIG. Figure 1 Similarly, the video decoding framework can be used to implement the decoding end processing flow of this application.

[0038] For example, see Figure 1 As shown, the video encoding framework can include modules such as prediction, transformation, quantization, entropy encoder, inverse quantization, inverse transformation, reconstruction, and filtering. On the encoding side, the coordination between these modules enables the encoding process. Furthermore, the video decoding framework can include modules such as prediction, transformation, quantization, entropy decoder, inverse quantization, inverse transformation, reconstruction, and filtering. On the decoding side, the coordination between these modules enables the decoding process.

[0039] Numerous coding tools have been proposed for various modules on the encoding side, and each tool often has multiple modes. Different coding tools often achieve optimal coding performance for different video sequences. Therefore, during the encoding process, RDO (Rate-Distortion Optimize) is often used to compare the coding performance of different tools or modes to select the optimal mode. After determining the optimal tool or mode, the decision information for the tool or mode is transmitted by encoding marker information in the bitstream. Although this method brings higher coding complexity, it can adaptively select the optimal mode combination for different content to achieve optimal coding performance. The decoding side obtains relevant mode information by directly parsing the marker information, which has a minimal impact on complexity.

[0040] The following is a brief introduction to the structure of the encoding and decoding ends. Figure 2A As shown in FIG, a schematic block diagram of an example for implementing an encoding end is shown. Figure 2A In the embodiment, the encoding end includes a prediction processing unit, a residual calculation unit, a transform processing unit, a quantization unit, an encoding unit, an inverse quantization unit (also called an inverse quantization unit), an inverse transform processing unit (also called an inverse transform processing unit), a reconstruction unit (or a reconstruction unit), and a filter unit. In one example, the encoding end may further include a buffer and a decoded image buffer, wherein the buffer is used to cache the reconstructed encoding unit output by the reconstruction unit, and the decoded image buffer is used to cache the filtered encoding unit output by the filter unit.

[0041] The encoder (also known as an encoder) receives as input coding units (e.g., image blocks) of an image (which may be referred to as the image to be encoded). The encoder also includes a segmentation unit (not shown) for segmenting the image to be encoded into multiple coding units. The encoder performs block-by-block encoding to complete the encoding of the image to be encoded, for example, performing the encoding process for each coding unit. The prediction processing unit receives or obtains a coding unit (the current coding unit to be encoded of the current image to be encoded) and reconstructed image data, and predicts the current block based on relevant data in the reconstructed image data to obtain a prediction block for the current block. The prediction processing unit includes an inter-frame prediction unit, an intra-frame prediction unit, and a mode selection unit. The mode selection unit selects either an intra-frame prediction mode or an inter-frame prediction mode. If the intra-frame prediction mode is selected, the intra-frame prediction unit performs the prediction process; if the inter-frame prediction mode is selected, the inter-frame prediction unit performs the prediction process.

[0042] The residual calculation unit is configured to calculate the residual between the actual value of a coding unit and the prediction block of the coding unit, thereby obtaining a residual block. For example, the residual calculation unit may perform a pixel-by-pixel transformation by subtracting the pixel value of the prediction block from the pixel value of the coding unit. The transform processing unit is configured to perform a transform on the residual block, such as a discrete cosine transform (DCT) or discrete sine transform (DST), to obtain transform coefficients in the transform domain. The transform coefficients may also be referred to as transform residual coefficients, which may represent the residual block in the transform domain. The quantization unit is configured to quantize the transform coefficients by applying scalar quantization or vector quantization to obtain quantized transform coefficients, also referred to as quantized residual coefficients. The quantization process may reduce the bit depth associated with some or all transform coefficients. For example, during quantization, an n-bit transform coefficient may be rounded down to an m-bit transform coefficient, where n is greater than m. The degree of quantization may be modified by adjusting the quantization parameter (QP). For example, for scalar quantization, different scales may be applied to achieve finer or coarser quantization. A smaller quantization step size corresponds to finer quantization, and a larger quantization step size corresponds to coarser quantization. The appropriate quantization step size is indicated by a quantization parameter (QP).

[0043] The coding unit is used to encode the quantized residual coefficients, output the encoded image data in the form of an encoded bit stream (i.e., the encoding result of the current coding unit to be encoded), and then transmit the encoded bit stream to a decoder, or store it and subsequently transmit it to a decoder or use it for retrieval. The coding unit can also be used to encode other syntax elements of the current coding unit, such as encoding the prediction mode into the bit stream, etc. The coding algorithm includes but is not limited to a variable length coding (VLC) algorithm, a context adaptive VLC (CAVLC) algorithm, an arithmetic coding algorithm, a context adaptive binary arithmetic coding (CABAC) algorithm, a syntax-based context-adaptive binary arithmetic coding (SBAC) algorithm, and a probability interval partitioning entropy (PIPE) algorithm.

[0044] The inverse quantization unit is configured to inversely quantize the quantized coefficients to obtain inversely quantized coefficients. The inverse quantization is the reverse application of the quantization unit, for example, applying an inverse quantization scheme of the quantization scheme applied by the quantization unit based on or using the same quantization step size as the quantization unit. The inversely quantized coefficients may also be referred to as inversely quantized residual coefficients. The inverse transform processing unit is configured to inversely transform the inversely quantized coefficients. It should be understood that the inverse transform is the reverse application of the transform processing unit. For example, the inverse transform may include an inverse discrete cosine transform (DCT) or an inverse discrete sine transform (DST) to obtain an inversely transformed block in the pixel domain (or sample domain). The inversely transformed block may also be referred to as an inversely transformed inversely quantized block or an inversely transformed residual block. The reconstruction unit is configured to add the inversely transformed block (i.e., the inversely transformed residual block) to the prediction block to obtain a reconstructed block in the sample domain. The reconstruction unit may be a summer, for example, adding sample values ​​(i.e., pixel values) of the residual block to sample values ​​of the prediction block. The reconstructed block output by the reconstruction unit can be subsequently used to predict other coding units, for example, in an intra-frame prediction mode.

[0045] The filter unit (or simply "filter") is used to filter the reconstructed block to obtain a filtered block, thereby smoothly performing pixel conversion or improving image quality. The filter unit can be a loop filter unit, which is intended to represent one or more loop filters. For example, the filter unit can be a deblocking filter, a sample-adaptive offset (SAO) filter, or other filters, such as a bilateral filter, an adaptive loop filter (ALF), or a sharpening or smoothing filter, or a collaborative filter. In one example, the filtered block output by the filter unit can be subsequently used to predict other coding units, for example, in an inter-frame prediction mode, without limitation.

[0046] See also Figure 2B , a schematic block diagram of an example of an encoding end (also referred to as a decoder) for implementing an embodiment of the present application is shown. The decoder is used to receive, for example, encoded image data (i.e., an encoded bit stream, for example, including an encoded bit stream of a coding unit and associated syntax elements) encoded by an encoder to obtain a decoded image. The decoder includes a decoding unit, an inverse quantization unit, an inverse transform processing unit, a prediction processing unit, a reconstruction unit, and a filter unit. In some examples, the decoder may perform substantially the same Figure 2AThe decoding pass is the inverse of the encoding pass described by the encoder. In one example, the decoder may further include a buffer and a decoded image buffer, wherein the buffer is used to cache the reconstructed coding units output by the reconstruction unit, and the decoded image buffer is used to cache the filtered coding units output by the filter unit.

[0047] The decoding unit is configured to decode the encoded image data to obtain quantized coefficients and / or decoded coding parameters (e.g., the decoded parameters may include any one or all of inter-frame prediction parameters, intra-frame prediction parameters, filter parameters, and / or other syntax elements). The decoding unit is further configured to forward the decoded coding parameters to the prediction processing unit so that the prediction processing unit performs a prediction process based on the coding parameters. The inverse quantization unit may function similarly to the inverse quantization unit of the encoder and is configured to inversely quantize (i.e., inverse quantize) the quantized coefficients decoded by the decoding unit. The inverse transform processing unit may function similarly to the inverse transform processing unit of the encoder, and the reconstruction unit (e.g., a summer) may function similarly to the reconstruction unit of the encoder and is configured to inversely transform (e.g., using an inverse DCT, an inverse integer transform, or a conceptually similar inverse transform process) the quantized coefficients to obtain an inverse transform block (also referred to as an inverse transform residual block). The inverse transform block is the pixel-domain residual block for the current coding unit.

[0048] A prediction processing unit is configured to receive or obtain encoded image data (e.g., an encoded bitstream of a current coding unit) and reconstructed image data. The prediction processing unit may also receive or obtain prediction-related parameters and / or information about a selected prediction mode (i.e., decoded coding parameters) from, for example, a decoding unit, and predict the current coding unit based on the relevant data in the reconstructed image data and the decoded coding parameters to obtain a prediction block for the current coding unit. In one example, the prediction processing unit may include an inter-frame prediction unit, an intra-frame prediction unit, and a mode selection unit. The mode selection unit is configured to select an intra-frame prediction mode or an inter-frame prediction mode. If the intra-frame prediction mode is selected, the intra-frame prediction unit performs the prediction process. If the inter-frame prediction mode is selected, the inter-frame prediction unit performs the prediction process.

[0049] The reconstruction unit is configured to add the inverse transform block (i.e., the inverse transform residual block) to the prediction block to obtain a reconstructed block in the sample domain, for example, by adding the sample values ​​of the inverse transform residual block to the sample values ​​of the prediction block. The filter unit is configured to filter the reconstructed block to obtain a filtered block, which is the decoded coding unit.

[0050] It should be understood that in the encoder and decoder, the processing results of a certain link can also be further processed and output to the next link. For example, after the interpolation filtering, motion vector derivation or filtering links, the processing results of the corresponding link can be further subjected to operations such as Clip or shift.

[0051] Based on the encoder and decoder, the embodiment of the present application provides a possible encoding / decoding implementation method, such as Figure 2C As shown, Figure 2C This is a schematic diagram of a coding and decoding process provided by an embodiment of the present application. The coding and decoding implementation method includes process ① to process ⑤, which can be performed by the above-mentioned decoder and encoder. Process ①: Divide a frame of image into one or more non-overlapping parallel coding units. There is no dependency between the one or more parallel coding units and they can be completely parallel / independently encoded and decoded, such as Figure 2C A parallel encoding unit 1 and a parallel encoding unit 2 are shown.

[0052] Process ②: Each parallel coding unit can be further divided into one or more non-overlapping independent coding units. Each independent coding unit can be independent of each other, but can share some parallel coding unit header information. For example, the width of an independent coding unit is w_lcu and the height is h_lcu. If a parallel coding unit is divided into an independent coding unit, the size of the independent coding unit is exactly the same as the parallel coding unit; otherwise, the width of the independent coding unit should be larger than the height (unless it is an edge area). Typically, the independent coding unit can be a fixed size of w_lcu×h_lcu, where w_lcu and h_lcu are both powers of 2 (N ≥ 0), such as the size of the independent coding unit: 128×4, 64×4, 32×4, 16×4, 8×4, 32×2, 16×2, or 8×2.

[0053] As a possible example, the independent coding unit can be a fixed 128×4. If the size of the parallel coding unit is 256×8, the parallel coding unit can be equally divided into 4 independent coding units; if the size of the parallel coding unit is 288×10, the parallel coding unit is divided into: the first / second row is 2 128×4 + 1 32×4 independent coding units; the third row is 2 128×2 + 1 32×2 independent coding units. It is worth noting that the independent coding unit can include three components: luminance Y, chrominance Cb, and chrominance Cr, or three components: red (red, R), green (green, G), and blue (blue, B), or three components: luminance Y, chrominance Co, and chrominance Cg, or only one of them. If the independent coding unit contains three components, the sizes of the three components can be exactly the same or different, which is related to the input format of the image.

[0054] Process ③: Each independent coding unit can be further divided into one or more non-overlapping coding units. The coding units within an independent coding unit can be interdependent, such as multiple coding units can reference each other for pre-coding. If the coding unit and the independent coding unit are the same size (i.e., the independent coding unit is divided into only one coding unit), the size can be any of the sizes described in process ②. If the independent coding unit is divided into multiple non-overlapping coding units, feasible division examples include: horizontal division (the height of the coding unit is the same as the independent coding unit, but the width is different, which can be 1 / 2, 1 / 4, 1 / 8, 1 / 16, etc.), vertical division (the width of the coding unit is the same as the independent coding unit, but the height is different, which can be 1 / 2, 1 / 4, 1 / 8, 1 / 16, etc.), horizontal and vertical division (quadtree division), etc., with horizontal division being preferred.

[0055] The width of a coding unit is w_cu and the height is h_cu. The width should be greater than the height (unless it is an edge area). Typically, a coding unit is a fixed size of w_cu x h_cu, where both w_cu and h_cu are powers of 2N (N greater than or equal to 0), such as 16x4, 8x4, 16x2, 8x2, 8x1, 4x1, etc. For example, a coding unit is a fixed size of 16x4. If the size of an independent coding unit is 64x4, the independent coding unit is divided into four equal coding units; if the size of an independent coding unit is 72x4, the coding unit is divided into four 16x4 + one 8x4. It is worth noting that a coding unit can contain three components: luma (Y), chroma (Cb), and chroma (Cr) (or red (R), green (G), and blue (B), or luma (Y), chroma (Co), and chroma (Cg), or it can contain only one component. If it contains three components, the sizes of the components can be exactly the same or different, depending on the image input format.

[0056] It is worth noting that process ③ can be an optional step in the encoding and decoding method, and the encoder / decoder can encode and decode the residual coefficients (or residual values) of the independent coding units obtained in process ②.

[0057] Process ④: For the coding unit, it can be further divided into one or more non-overlapping prediction groups (PG), PG is also referred to as Group. Each PG is encoded and decoded according to the selected prediction mode to obtain the prediction value of PG, which constitutes the prediction value of the entire coding unit. Based on the prediction value and the original value of the coding unit, the residual value of the coding unit is obtained.

[0058] Process 5: Based on the residual values ​​of the coding units, the coding units are grouped to obtain one or more non-overlapping residual blocks (RBs). The residual coefficients of each RB are encoded and decoded according to a selected mode to form a residual coefficient stream. Specifically, the residual coefficients can be transformed or not transformed. The selected residual coefficient encoding and decoding method in process 5 may include, but is not limited to, any of the following: semi-fixed-length coding, exponential Golomb coding, Golomb-Rice coding, truncated unary coding, run-length coding, and direct encoding of the original residual values. For example, the encoder directly encodes the coefficients within the RB. For another example, the encoder can perform a transform on the residual block, such as DCT, DST, or Hadamard transform, and then encode the transformed coefficients. As one possible example, when the RB is small, the encoder directly quantizes all coefficients within the RB and then performs binarization encoding. If the RB is large, it can be divided into multiple coefficient groups (CGs), and each CG is then uniformly quantized and then binarized. In some embodiments of the present application, the coefficient group (CG) and the quantization group (QG) may be the same. Of course, the coefficient group and the quantization group may also be different.

[0059] The following is an example of the part of residual coefficient encoding using a semi-fixed length coding method. First, the maximum value of the absolute value of the residual in an RB block can be defined as the modified maximum value (modified maximum, mm). Secondly, the number of coding bits for the residual coefficient in the RB block is determined (the number of coding bits for the residual coefficient in the same RB block is consistent). For example, if the critical limit (CL) of the current RB block is 2 and the current residual coefficient is 1, then 2 bits are required to encode the residual coefficient 1, which is expressed as 01. If the CL of the current RB block is 7, it means encoding an 8-bit residual coefficient and a 1-bit sign bit. The determination of CL is to find the minimum M value that satisfies that all residuals of the current sub-block are within the range of [-2^(M-1), 2^(M-1)]. If both -2^(M-1) and 2^(M-1) exist, M increases by 1, requiring M+1 bits to encode all residuals of the current RB block. If only one of the two boundary values, -2^(M-1) or 2^(M-1), is present, a trailing bit is encoded to determine whether the boundary value is -2^(M-1) or 2^(M-1). If none of the residuals fall within either of these two values, the trailing bit need not be encoded. For some special cases, the encoder can directly encode the original value of the image instead of the residual value.

[0060] certainly, Figure 2CThe schematic diagram of the encoding and decoding process shown is only an example of the encoding and decoding implementation method, that is, process ① to process ⑤ is only an example and is not limited to this implementation method. The image decoding method and image encoding method in this embodiment can be applied to any encoding and decoding implementation method.

[0061] In one possible implementation, the decoding end can reconstruct a complete video image, and the user can view the complete video image. However, after the complete video image is reconstructed, all permissions may be displayed, such as license plate information, body area information, text information, screen information, etc., which poses a security risk and requires permission protection.

[0062] In response to the above findings, the embodiments of the present application propose an image decoding method and an image encoding method, and provide a permission-protected encoding and decoding method. In public safety scenarios, when images have information security issues, permission protection can be performed on images, and the permission areas of each level of the image can be efficiently and losslessly expressed, so that users with high permission levels can view a large amount or even all of the image information, while users with low permission levels can only view a small amount of image information. For example, an image can be divided into low-permission areas and high-permission areas. Low-permission users can only view low-permission areas, while high-permission users can view both low-permission areas and high-permission areas.

[0063] The image decoding method and the image encoding method are described in detail below with reference to several specific embodiments.

[0064] Example 1: In the present application, an image decoding method is proposed. Figure 3 FIG. 1 is a flow chart of the method, which is applied to a decoding end (also called a video decoder), and includes:

[0065] Step 301: When enabling rights protection, determine one or more target area categories corresponding to a target rights level (the target rights level is the rights level of a user accessing a decoding terminal).

[0066] Exemplarily, if the switch control information allows for enabling rights protection, then it is determined that rights protection is enabled. For example, the switch control information may include, but is not limited to: switch control information at the sequence level or sequence-level extended data; or switch control information at the image level or image-level extended data; or switch control information at the slice level; or switch control information at the tile level; or switch control information at the patch level; or switch control information at the LCU level; or switch control information at the control unit level.

[0067] Exemplarily, if there are multiple levels of switch control information, the previous level of switch control information is decoded; if the previous level of switch control information does not allow permission protection to be enabled, it is determined that permission protection is not enabled; if the previous level of switch control information allows permission protection to be enabled, the next level of switch control information is decoded. If the next level of switch control information does not allow permission protection to be enabled, it is determined that permission protection is not enabled; if the next level of switch control information allows permission protection to be enabled, and the next level of switch control information is the last level of switch control information, it is determined that permission protection is enabled; if the next level of switch control information allows permission protection to be enabled, and the next level of switch control information is not the last level of switch control information, the next level of switch control information is decoded, and so on.

[0068] Exemplarily, determining one or more target area categories corresponding to the target authority level may include but is not limited to: querying the mapping relationship between the target authority level and the candidate authority level to obtain the area categories corresponding to the target authority level and the candidate authority level, and determining the area categories corresponding to the target authority level and the candidate authority level as the target area categories corresponding to the target authority level; wherein the candidate authority level is an authority level lower than the target authority level; the mapping relationship includes the correspondence between the authority level and the area category.

[0069] For example, there is at least one region category (the default region category) that can be accessed by all permission levels. Regardless of the target permission level, the target region category corresponding to the target permission level includes the default region category, that is, the default region category serves as the target region category for all permission levels. In this case, there is no need to explicitly express the correspondence between permission levels and default region categories.

[0070] Step 302: Decode the current coding unit according to the target region category.

[0071] Exemplarily, when decoding a current coding unit, if the target region category exists in one or more current region categories corresponding to the current coding unit, a first bitstream corresponding to the current coding unit is decoded, the first bitstream including high-dimensional reconstruction information of the current coding unit; and the current coding unit is reconstructed based on the high-dimensional reconstruction information. Alternatively, if the target region category does not exist in one or more current region categories corresponding to the current coding unit, the current coding unit is reconstructed based on the low-dimensional reconstruction information.

[0072] Exemplarily, the low-dimensional reconstruction information is obtained by decoding a second code stream corresponding to the current coding unit; wherein the first code stream is a code stream obtained after decryption; and the second code stream is a code stream obtained without decryption.

[0073] In a possible implementation, one or more current region categories corresponding to the current coding unit may also be determined. For example, a region category identifier and one or more region location information corresponding to the region category identifier may be obtained. For the current coding unit corresponding to the region location information, the region category corresponding to the region category identifier is determined as the current region category corresponding to the current coding unit.

[0074] Exemplarily, before obtaining one or more area location information corresponding to the area category identifier, the total number of image areas corresponding to the area category identifier can be obtained; based on this, the total number of image areas and area location information corresponding to the area category identifier can be obtained, and the total number of image areas is not greater than the preset number threshold.

[0075] Exemplarily, obtaining a region category identifier and one or more region location information corresponding to the region category identifier may include, but is not limited to, decoding the region category identifier and one or more region location information corresponding to the region category identifier from the upper-layer unit syntax of the current coding unit. Obtaining the total number of image regions corresponding to the region category identifier may include, but is not limited to, decoding the total number of image regions corresponding to the region category identifier from the upper-layer unit syntax of the current coding unit.

[0076] Exemplarily, the region location information may include, but is not limited to, the region location information of a polygonal region, a rectangular region, or a circular region. For example, for a polygonal region or a rectangular region, the region location information may include at least one vertex coordinate relative to a preset origin; for a circular region, the region location information may include the coordinates of the center of the circular region relative to the preset origin and the radius.

[0077] For example, multiple image units can be arranged in a preset scanning order, and the region location information can include a starting image unit index and an ending image unit index at a preset origin; alternatively, the region location information can include a starting image unit index at a preset origin and the total number of image units in the current region; alternatively, the region location information can include an ending image unit index at a preset origin and the total number of image units in the current region. For example, if the region category identifier corresponds to multiple region location information, the ending image unit of the previous region location information is used as the preset origin corresponding to the current region location information.

[0078] Exemplarily, the image unit may be a coding unit, or the image unit may be an A*B image unit divided according to a preset division method; wherein A may be greater than or equal to the minimum size of the coding unit, such as 4, 8, etc., and B may be greater than or equal to the minimum size of the coding unit, such as 4, 8, etc.

[0079] Exemplarily, after obtaining the area category identifier, you can also obtain a merge identifier corresponding to the area category identifier, which is used to indicate whether there is an associated area category identifier that is merged with the area category identifier; if the merge identifier is used to indicate that there is an associated area category identifier that is merged with the area category identifier, then you can obtain the associated area category identifier corresponding to the area category identifier.

[0080] Exemplarily, after obtaining the associated region category identifier corresponding to the region category identifier, for the coding unit corresponding to the region location information corresponding to the associated region category identifier, the region category corresponding to the region category identifier and the region category corresponding to the associated region category identifier can be determined as the region category corresponding to the coding unit, that is, the region category corresponding to the coding unit can be multiple region categories.

[0081] The authority level corresponding to the associated area category identifier is equal to the authority level corresponding to the area category identifier; or, the authority level corresponding to the associated area category identifier is lower than the authority level corresponding to the area category identifier.

[0082] For example, before obtaining the associated area category identifier corresponding to the area category identifier, the total number of category identifiers corresponding to the associated area category identifier can be obtained. Based on this, obtaining the associated area category identifier corresponding to the area category identifier includes, but is not limited to: obtaining the total number of category identifiers corresponding to the area category identifier, that is, obtaining the total number of category identifiers, associated area category identifiers.

[0083] Exemplarily, obtaining the merge identifier corresponding to the region category identifier may include but is not limited to: decoding the merge identifier corresponding to the region category identifier from the upper-level unit syntax of the current coding unit; obtaining the associated region category identifier corresponding to the region category identifier may include but is not limited to: decoding the associated region category identifier corresponding to the region category identifier from the upper-level unit syntax of the current coding unit; obtaining the total number of category identifiers corresponding to the associated region category identifier may include but is not limited to: decoding the total number of category identifiers corresponding to the associated region category identifier from the upper-level unit syntax of the current coding unit.

[0084] In a possible implementation, one or more current region categories corresponding to the current coding unit can also be determined. For example, the region category identifier corresponding to each image unit can be obtained. Based on the region category identifier corresponding to the image unit covered by the current coding unit, the region category corresponding to the highest authority level in the region category identifier can be determined as the current region category corresponding to the current coding unit.

[0085] Exemplarily, obtaining the region category identifier corresponding to each image unit may include, but is not limited to: obtaining the region category identifier and region indication information, the region indication information being used to indicate multiple image units, and determining the region category identifier as the region category identifier corresponding to the multiple image units.

[0086] The area indication information includes the starting point coordinates under a preset origin, at least one direction identifier, the length corresponding to each direction identifier, and an end mark; wherein the starting point coordinates are used to indicate the image unit corresponding to the area category identifier, the direction identifier is used to indicate the direction of the image units belonging to the same area category, the length corresponding to each direction identifier is used to indicate the number of image units belonging to the same area category in the direction, and the end mark is used to indicate that the indication of multiple image units has been completed.

[0087] The length corresponding to each direction identifier may be fixed to 1.

[0088] Exemplarily, obtaining the region category identifier corresponding to each image unit may also include: determining a target shape surrounded by multiple image units indicated by the region indication information, so that the region category identifier can be determined as the region category identifier corresponding to the image unit within the target shape.

[0089] In the above embodiment, the preset origin is the upper left corner of the preset M*N rectangular partition, or the preset origin is obtained by decoding the bit stream, wherein the preset M*N rectangular partition is the LCU partition.

[0090] Exemplarily, obtaining the region category identifier corresponding to each image unit may include, but is not limited to: decoding the region category identifier corresponding to each image unit from an upper-layer unit syntax of the current coding unit.

[0091] In the above embodiment, the upper layer unit may include but is not limited to: the LCU, Patch, Slice, Tile, Image, Sequence, etc. where the current coding unit is located, and no limitation is imposed on this.

[0092] For example, the above execution order is only for the convenience of describing the examples given. In actual applications, the execution order between the steps can also be changed, and this execution order is not limited. Moreover, in other embodiments, the steps of the corresponding method are not necessarily executed in the order shown and described in this specification, and the steps included in the method may be more or less than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; multiple steps described in this specification may also be combined into a single step for description in other embodiments.

[0093] It can be seen from the above technical solutions that in the embodiment of the present application, when permission protection is enabled, the target area category corresponding to the target permission level can be determined, and the current coding unit can be decoded according to the target area category, so that permission protection of various permission information (such as license plate information, human body local area information, text information, screen information, etc.) can be performed to improve data security. For example, when there is an information security problem with the image, the image can be protected so that users with high permission levels can view a large amount or even all of the image information, and users with low permission levels can only view a small amount of image information. For example, the image can be divided into low permission areas and high permission areas, and low permission users can only view low permission areas, while high permission users can view low permission areas and high permission areas. Of course, the permissions can also be further subdivided, with different permissions corresponding to different image areas, and parallel permissions can also be set. For example, permission A can view license plate information, permission B can view human body local area information, and permission C can view license plate information and human body local area information.

[0094] Example 2: In the present embodiment, an image encoding method is proposed, see Figure 4 FIG. 1 is a flow chart of the method, which is applied to an encoding end (also called a video encoder), and includes:

[0095] Step 401: When enabling permission protection, determine one or more target area categories; wherein the target area category is an area category corresponding to the first permission level and not corresponding to the second permission level, that is, at least one permission level corresponds to the target area category, and at least one permission level does not correspond to the target area category.

[0096] Exemplarily, if the switch control information allows for enabling rights protection, then it is determined that rights protection is enabled. For example, the switch control information may include, but is not limited to: switch control information at the sequence level or sequence-level extended data; or switch control information at the image level or image-level extended data; or switch control information at the slice level; or switch control information at the tile level; or switch control information at the patch level; or switch control information at the LCU level; or switch control information at the control unit level.

[0097] Exemplarily, if there are multiple levels of switch control information, the switch control information of the previous level is obtained; if the switch control information of the previous level does not allow permission protection to be enabled, it is determined that permission protection is not enabled; if the switch control information of the previous level allows permission protection to be enabled, the switch control information of the next level is obtained. If the switch control information of the next level does not allow permission protection to be enabled, it is determined that permission protection is not enabled; if the switch control information of the next level allows permission protection to be enabled, and the switch control information of the next level is the last level of switch control information, it is determined that permission protection is enabled; if the switch control information of the next level allows permission protection to be enabled, and the switch control information of the next level is not the last level of switch control information, the switch control information of the next level is obtained, and so on.

[0098] Exemplarily, determining one or more target area categories may include, but is not limited to: obtaining the target area category by querying a mapping relationship, wherein the mapping relationship includes a correspondence between permission levels and area categories. For example, if all permission levels correspond to a certain area category, then this area category is not used as the target area category. If some permission levels correspond to a certain area category, but the remaining permission levels do not correspond to the area category, then this area category is used as the target area category.

[0099] Step 402: Encode the current coding unit according to the target region category.

[0100] Exemplarily, when encoding a current coding unit, if a target region category exists in one or more current region categories corresponding to the current coding unit, a first bitstream and a second bitstream corresponding to the current coding unit are encoded, where the first bitstream includes high-dimensional reconstruction information of the current coding unit, and the high-dimensional reconstruction information is used to reconstruct the current coding unit, and the second bitstream includes low-dimensional reconstruction information of the current coding unit, and the low-dimensional reconstruction information is used to reconstruct the current coding unit. Alternatively, when encoding the current coding unit, if the target region category does not exist in one or more current region categories corresponding to the current coding unit (i.e., the current region category is a region category corresponding to all permission levels, i.e., all permission levels can view the current coding unit corresponding to the current region category), the first bitstream corresponding to the current coding unit is encoded, and the first bitstream includes high-dimensional reconstruction information, and the high-dimensional reconstruction information is used to reconstruct the current coding unit.

[0101] Exemplarily, by encoding a second code stream corresponding to the current coding unit, and the second code stream includes low-dimensional reconstruction information; the first code stream is an encrypted code stream; and the second code stream is an unencrypted code stream.

[0102] In a possible implementation, one or more current region categories corresponding to the current coding unit may also be determined. For example, a region category identifier and one or more region location information corresponding to the region category identifier may be obtained. For the current coding unit corresponding to the region location information, the region category corresponding to the region category identifier is determined as the current region category corresponding to the current coding unit.

[0103] Exemplarily, before obtaining one or more area location information corresponding to the area category identifier, the total number of image areas corresponding to the area category identifier can be obtained; based on this, the total number of image areas and area location information corresponding to the area category identifier can be obtained, and the total number of image areas is not greater than the preset number threshold.

[0104] Exemplarily, obtaining a region category identifier and one or more region location information corresponding to the region category identifier may include, but is not limited to: obtaining a region category identifier and one or more region location information corresponding to the region category identifier, and encoding the region category identifier and one or more region location information corresponding to the region category identifier in the upper-level unit syntax of the current coding unit.

[0105] Exemplarily, obtaining the total number of image areas corresponding to the area category identifier may include but is not limited to: obtaining the total number of image areas corresponding to the area category identifier, and encoding the total number of image areas corresponding to the area category identifier in the upper unit syntax of the current coding unit.

[0106] Exemplarily, the region location information may include, but is not limited to, the region location information of a polygonal region, a rectangular region, or a circular region. For example, for a polygonal region or a rectangular region, the region location information may include at least one vertex coordinate relative to a preset origin; for a circular region, the region location information may include the coordinates of the center of the circular region relative to the preset origin and the radius.

[0107] For example, multiple image units can be arranged in a preset scanning order, and the region location information can include a starting image unit index and an ending image unit index at a preset origin; alternatively, the region location information can include a starting image unit index at a preset origin and the total number of image units in the current region; alternatively, the region location information can include an ending image unit index at a preset origin and the total number of image units in the current region. For example, if the region category identifier corresponds to multiple region location information, the ending image unit of the previous region location information is used as the preset origin corresponding to the current region location information.

[0108] Exemplarily, the image unit may be a coding unit, or the image unit may be an A*B image unit divided according to a preset division method; wherein A may be greater than or equal to the minimum size of the coding unit, such as 4, 8, etc., and B may be greater than or equal to the minimum size of the coding unit, such as 4, 8, etc.

[0109] Exemplarily, after obtaining the area category identifier, you can also obtain a merge identifier corresponding to the area category identifier, which is used to indicate whether there is an associated area category identifier that is merged with the area category identifier; if the merge identifier is used to indicate that there is an associated area category identifier that is merged with the area category identifier, then you can obtain the associated area category identifier corresponding to the area category identifier.

[0110] Exemplarily, after obtaining the associated region category identifier corresponding to the region category identifier, for the coding unit corresponding to the region location information corresponding to the associated region category identifier, the region category corresponding to the region category identifier and the region category corresponding to the associated region category identifier can be determined as the region category corresponding to the coding unit, that is, the region category corresponding to the coding unit can be multiple region categories.

[0111] The authority level corresponding to the associated area category identifier is equal to the authority level corresponding to the area category identifier; or, the authority level corresponding to the associated area category identifier is lower than the authority level corresponding to the area category identifier.

[0112] For example, before obtaining the associated area category identifier corresponding to the area category identifier, the total number of category identifiers corresponding to the associated area category identifier can be obtained. Based on this, obtaining the associated area category identifier corresponding to the area category identifier includes, but is not limited to: obtaining the total number of category identifiers corresponding to the area category identifier, that is, obtaining the total number of category identifiers, associated area category identifiers.

[0113] Exemplarily, obtaining the merge identifier corresponding to the region category identifier may include but is not limited to: obtaining the merge identifier corresponding to the region category identifier, and encoding the merge identifier corresponding to the region category identifier in the upper-level unit syntax of the current coding unit; obtaining the associated region category identifier corresponding to the region category identifier may include but is not limited to: obtaining the associated region category identifier corresponding to the region category identifier, and encoding the associated region category identifier corresponding to the region category identifier in the upper-level unit syntax of the current coding unit; obtaining the total number of category identifiers corresponding to the associated region category identifier may include but is not limited to: obtaining the total number of category identifiers corresponding to the associated region category identifier, and encoding the total number of category identifiers corresponding to the associated region category identifier in the upper-level unit syntax of the current coding unit.

[0114] In a possible implementation, one or more current region categories corresponding to the current coding unit can also be determined. For example, the region category identifier corresponding to each image unit can be obtained. Based on the region category identifier corresponding to the image unit covered by the current coding unit, the region category corresponding to the highest authority level in the region category identifier can be determined as the current region category corresponding to the current coding unit.

[0115] Exemplarily, obtaining the region category identifier corresponding to each image unit may include, but is not limited to: obtaining the region category identifier and region indication information, the region indication information being used to indicate multiple image units, and determining the region category identifier as the region category identifier corresponding to the multiple image units.

[0116] The area indication information includes the starting point coordinates under a preset origin, at least one direction identifier, the length corresponding to each direction identifier, and an end mark; wherein the starting point coordinates are used to indicate the image unit corresponding to the area category identifier, the direction identifier is used to indicate the direction of the image units belonging to the same area category, the length corresponding to each direction identifier is used to indicate the number of image units belonging to the same area category in the direction, and the end mark is used to indicate that the indication of multiple image units has been completed.

[0117] The length corresponding to each direction identifier may be fixed to 1.

[0118] Exemplarily, obtaining the region category identifier corresponding to each image unit may also include: determining a target shape surrounded by multiple image units indicated by the region indication information, so that the region category identifier can be determined as the region category identifier corresponding to the image unit within the target shape.

[0119] In the above embodiment, the preset origin is the upper left corner of the preset M*N rectangular partition, or the preset origin can be encoded in the bitstream, wherein the preset M*N rectangular partition is the LCU partition.

[0120] Exemplarily, obtaining the region category identifier corresponding to each image unit may include, but is not limited to: obtaining the region category identifier corresponding to each image unit, and encoding the region category identifier corresponding to each image unit in the upper-layer unit syntax of the current coding unit.

[0121] In the above embodiment, the upper layer unit may include but is not limited to: the LCU, Patch, Slice, Tile, Image, Sequence, etc. where the current coding unit is located, and no limitation is imposed on this.

[0122] For example, the above execution order is only for the convenience of describing the examples given. In actual applications, the execution order between the steps can also be changed, and this execution order is not limited. Moreover, in other embodiments, the steps of the corresponding method are not necessarily executed in the order shown and described in this specification, and the steps included in the method may be more or less than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; multiple steps described in this specification may also be combined into a single step for description in other embodiments.

[0123] It can be seen from the above technical solutions that in the embodiment of the present application, when permission protection is enabled, the target area category can be determined, and the current coding unit can be encoded according to the target area category, so that permission protection of various permission information (such as license plate information, local area information of the human body, text information, screen information, etc.) can be performed to improve data security. For example, when there is an information security problem with the image, the image can be protected so that users with high permission levels can view a large amount or even all of the image information, and users with low permission levels can only view a small amount of image information. For example, the image can be divided into low permission areas and high permission areas, and low permission users can only view low permission areas, while high permission users can view low permission areas and high permission areas. Of course, the permissions can also be further subdivided, with different permissions corresponding to different image areas, and parallel permissions can also be set. For example, permission A can view license plate information, permission B can view local area information of the human body, and permission C can view screen information.

[0124] Example 3: For Example 1 and Example 2, when permission protection is enabled, the decoding end can determine the target permission level. For example, assuming that user A is currently viewing the image reconstructed by the decoding end, the permission level of user A is used as the target permission level. Assuming that user B is currently viewing the image reconstructed by the decoding end, the permission level of user B is used as the target permission level, and so on. After obtaining the target permission level, the decoding end can determine one or more target area categories corresponding to the target permission level. That is, the target permission level may correspond to one target area category, or the target permission level may correspond to multiple target area categories. For the specific determination process, please refer to the subsequent examples. When permission protection is enabled, the encoding end can determine one or more target area categories. The target area category is an area category that corresponds to the first permission level and does not correspond to the second permission level, that is, at least one permission level corresponds to the target area category, and at least one permission level does not correspond to the target area category. For the specific determination process, please refer to the subsequent examples.

[0125] After obtaining the target region category, the encoding end may encode the current coding unit according to the target region category, and the decoding end may decode the current coding unit according to the target region category.

[0126] For example, at the encoding end, when encoding the current coding unit (i.e., the current block, each block to be encoded in the current image can be referred to as the current coding unit), the current region category corresponding to the current coding unit can be determined (the region category corresponding to the current coding unit can be recorded as the current region category). The current coding unit can correspond to one current region category or multiple current region categories. For how to determine the current region category corresponding to the current coding unit, please refer to the subsequent embodiments. At the decoding end, when decoding the current coding unit (i.e., the current block, each block to be decoded in the current image can be referred to as the current coding unit), the current region category corresponding to the current coding unit can be determined. The current coding unit can correspond to one current region category or multiple current region categories.

[0127] After obtaining the current region category corresponding to the current coding unit, if the target region category exists in one or more current region categories corresponding to the current coding unit, the encoder may encode a first bitstream and a second bitstream corresponding to the current coding unit, where the first bitstream includes high-dimensional reconstruction information of the current coding unit, and the high-dimensional reconstruction information is used to reconstruct the current coding unit, and the second bitstream includes low-dimensional reconstruction information of the current coding unit, and the low-dimensional reconstruction information is used to reconstruct the current coding unit.

[0128] After obtaining the current region category corresponding to the current coding unit, if the target region category exists in one or more current region categories corresponding to the current coding unit (which may be different from the target region category of the encoder), the decoder can decode the first bitstream corresponding to the current coding unit, parse the high-dimensional reconstruction information of the current coding unit from the first bitstream, and reconstruct the current coding unit based on the high-dimensional reconstruction information. Alternatively, if the target region category does not exist in one or more current region categories corresponding to the current coding unit, the decoder can decode the second bitstream corresponding to the current coding unit, parse the low-dimensional reconstruction information of the current coding unit from the second bitstream, and reconstruct the current coding unit based on the low-dimensional reconstruction information.

[0129] For example, high-dimensional reconstruction information, also known as open reconstruction information, includes the reconstructed values ​​of all pixels. These values ​​are not hidden, allowing the complete restoration of image content. For example, if the current coding unit for a human body part, license plate, screen, or text area is reconstructed based on the high-dimensional reconstruction information, the actual image of the human body part, license plate, screen, or text area can be viewed without hiding the actual image of the human body part, license plate, screen, or text area.

[0130] For example, low-dimensional reconstruction information can also be called hidden reconstruction information. Low-dimensional reconstruction information does not include the reconstruction values ​​of all pixels. It may only include the reconstruction values ​​of some pixels (the decoding end only parses the reconstruction values ​​of these pixels, and the remaining pixels can use default values). It may also include only one pixel value (that is, all pixels are this pixel value, such as 255, 0, etc.), or it may include several pixel values ​​(for example, the average value of some pixels, such as 137, 245, etc.). That is, the reconstruction value of the pixel is hidden in the low-dimensional reconstruction information, and the image content cannot be fully restored through the low-dimensional reconstruction information. For example, for the current coding unit of the local area of ​​the human body, license plate, screen, text, etc., if the current coding unit is reconstructed based on the low-dimensional reconstruction information, then the real picture of the local area of ​​the human body, license plate, screen, text, etc. cannot be viewed, that is, the real picture of the local area of ​​the human body, license plate, screen, text, etc. is hidden.

[0131] After obtaining the current region category corresponding to the current coding unit, if the target region category does not exist in one or more current region categories corresponding to the current coding unit (i.e., the current region category is a region category corresponding to all permission levels, i.e., all permission levels can view the current coding unit corresponding to the current region category), the encoder may encode a first bitstream corresponding to the current coding unit, where the first bitstream includes high-dimensional reconstruction information of the current coding unit, and the high-dimensional reconstruction information is used to reconstruct the current coding unit.

[0132] After the decoding end obtains the current region category corresponding to the current coding unit, if the target region category exists in one or more current region categories corresponding to the current coding unit, the decoding end may further decode the first bitstream corresponding to the current coding unit, parse high-dimensional reconstruction information of the current coding unit from the first bitstream, and reconstruct the current coding unit based on the high-dimensional reconstruction information.

[0133] Exemplarily, at the encoding end, when encoding the current coding unit, it can be determined whether the target region category exists in the current region category corresponding to the current coding unit. If so, the first bitstream corresponding to the current coding unit is encoded, and the first bitstream includes the high-dimensional reconstruction information of the current coding unit, but does not encode the low-dimensional reconstruction information of the current coding unit (that is, the low-dimensional reconstruction information is not carried through the second bitstream). At the decoding end, when decoding the current coding unit, it can be determined that the current region category corresponds to the current coding unit. If the target region category exists in the current region category corresponding to the current coding unit, the first bitstream corresponding to the current coding unit is decoded, and the high-dimensional reconstruction information of the current coding unit is parsed from the first bitstream, and the current coding unit is reconstructed based on the high-dimensional reconstruction information. If the target region category does not exist in the current region category corresponding to the current coding unit, the low-dimensional reconstruction information is directly derived (not parsed from the second bitstream), and the current coding unit is reconstructed based on the low-dimensional reconstruction information.

[0134] Among them, when the target area category does not exist in the current area category corresponding to the current coding unit, the decoding end does not decode the low-dimensional reconstruction information from the bitstream, but derives the low-dimensional reconstruction information, such as deriving the low-dimensional reconstruction information based on the reconstructed data, or the low-dimensional reconstruction information is default information, which is not restricted.

[0135] In the above embodiment, for the encoding end, the first code stream is an encrypted code stream. That is, when encoding the first code stream corresponding to the current coding unit, the first code stream can be encrypted to provide encryption protection for the first code stream. The second code stream is an unencrypted code stream. That is, when encoding the second code stream corresponding to the current coding unit, the second code stream is not encrypted. Of course, the encoding end can also encrypt the second code stream.

[0136] For the decoding end, the first code stream is the decrypted code stream. That is, when decoding the first code stream corresponding to the current coding unit, the first code stream can be decrypted to obtain the decrypted first code stream. The second code stream is the undecrypted code stream. That is, when decoding the second code stream corresponding to the current coding unit, the second code stream is not decrypted, and the decoding end can directly obtain the unencrypted second code stream.

[0137] In the above embodiment, the first and second code streams are not necessarily continuous streams. They can be obtained from specific positions in the overall code stream. For example, the first code streams of all coding units are spliced ​​together, and the second code streams of all coding units are spliced ​​together. Of course, the first and second code streams of each coding unit can also be continuous streams, that is, the first and second code streams of a coding unit are spliced ​​together.

[0138] The first code stream and the second code stream may be one code stream instead of two code streams. For example, the first code stream and the second code stream may correspond to the same sequence header and the same picture header.

[0139] For example, on the encoder side, when encoding the current coding unit, the current region category corresponding to the current coding unit can be determined. If the current region category corresponding to the current coding unit is the default region category (indicating that the region where the current coding unit is located does not require permission protection, nor does it need to distinguish between high-dimensional reconstruction information and low-dimensional reconstruction information), the bitstream corresponding to the current coding unit is encoded, and the bitstream includes the reconstruction information of the current coding unit (there is no need to distinguish between high-dimensional reconstruction information and low-dimensional reconstruction information, and it is sufficient to carry the reconstruction information of the current coding unit). On the decoder side, when decoding the current coding unit, the current region category corresponding to the current coding unit can be determined. If the current region category corresponding to the current coding unit is the default region category, the bitstream corresponding to the current coding unit is decoded, the reconstruction information of the current coding unit is parsed from the bitstream, and the current coding unit is reconstructed based on the reconstruction information.

[0140] Example 4: Example 4 is used to implement hierarchical control. In Example 1, Example 2 and Example 3, for the encoding end and the decoding end, it is necessary to determine the target area category when enabling permission protection, and encode or decode the current coding unit based on the target area category. As to whether to enable permission protection (also known as information protection), a flag bit can be transmitted at the sequence level, sequence-level extended data, image level, image-level extended data, Slice level, Tile level, Patch level, LCU level or control unit level, etc., and the flag bit is used to indicate whether permission protection is enabled. If the flag bit is the first value, permission protection is allowed to be enabled. If the flag bit is the second value, permission protection is not allowed to be enabled. Among them, the syntax used to manage or control several images can be called sequence level or sequence level extended data; the syntax used to manage or control a single frame image can be called image level or image level extended data; the syntax used to manage or control a parallel unit (i.e., an image area) including several coding units can be called slice level, tile level, or patch level; the syntax used to manage or control a maximum coding unit can be called LCU level; the syntax used to manage or control a control unit can be called control unit level. A control unit can include multiple maximum coding units, and a maximum coding unit can also include multiple control units, without limitation.

[0141] Exemplarily, if the switch control information allows the activation of permission protection, it is determined that permission protection is activated. If the switch control information does not allow the activation of permission protection, it is determined that permission protection is prohibited.

[0142] For example, the switch control information may include but is not limited to: switch control information at the sequence level or sequence-level extended data; or, switch control information at the image level or image-level extended data; or, switch control information at the slice level; or, switch control information at the tile level; or, switch control information at the patch level; or, switch control information at the LCU level; or, switch control information at the control unit level.

[0143] For example, if the sequence-level switch control information allows the activation of permission protection, it is determined that permission protection is activated. If the sequence-level switch control information does not allow the activation of permission protection, it is determined that the activation of permission protection is prohibited. The sequence-level switch control information may include a sequence-level flag bit. If the sequence-level flag bit has a first value, the activation of permission protection is permitted. If the sequence-level flag bit has a second value, the activation of permission protection is prohibited.

[0144] For another example, if the switch control information of the sequence-level extended data allows the activation of permission protection, it is determined that permission protection is activated. If the switch control information of the sequence-level extended data does not allow the activation of permission protection, it is determined that the activation of permission protection is prohibited. The switch control information of the sequence-level extended data may include a sequence-level extended data flag bit. If the sequence-level extended data flag bit has a first value, the activation of permission protection is permitted. If the sequence-level extended data flag bit has a second value, the activation of permission protection is prohibited.

[0145] For another example, if the image-level switch control information allows permission protection to be enabled, it is determined that permission protection is enabled. If the image-level switch control information does not allow permission protection to be enabled, it is determined that permission protection is prohibited. The image-level switch control information may include an image-level flag bit. If the image-level flag bit has a first value, permission protection is allowed to be enabled. If the image-level flag bit has a second value, permission protection is not allowed to be enabled.

[0146] For another example, if the switch control information of the image-level extended data allows the activation of rights protection, then it is determined that rights protection is enabled. If the switch control information of the image-level extended data does not allow the activation of rights protection, then it is determined that the activation of rights protection is prohibited. The switch control information of the image-level extended data may include an image-level extended data flag bit. If the image-level extended data flag bit has a first value, then the activation of rights protection is allowed. If the image-level extended data flag bit has a second value, then the activation of rights protection is not allowed.

[0147] For another example, if the slice-level switch control information allows permission protection to be enabled, it is determined that permission protection is enabled. If the slice-level switch control information does not allow permission protection to be enabled, it is determined that permission protection is prohibited from being enabled. The slice-level switch control information may include a slice-level flag bit. If the slice-level flag bit is a first value, permission protection is allowed to be enabled; if the slice-level flag bit is a second value, permission protection is not allowed to be enabled.

[0148] For another example, if the tile-level switch control information allows permission protection to be enabled, it is determined that permission protection is enabled. If the tile-level switch control information does not allow permission protection to be enabled, it is determined that permission protection is prohibited. The tile-level switch control information may include a tile-level flag bit. If the tile-level flag bit is a first value, permission protection is allowed to be enabled. If the tile-level flag bit is a second value, permission protection is not allowed to be enabled.

[0149] For another example, if the patch-level switch control information allows permission protection to be enabled, it is determined that permission protection is enabled. If the patch-level switch control information does not allow permission protection to be enabled, it is determined that permission protection is prohibited. The patch-level switch control information may include a patch-level flag bit. If the patch-level flag bit has a first value, permission protection is allowed to be enabled. If the patch-level flag bit has a second value, permission protection is not allowed to be enabled.

[0150] For another example, if the LCU-level switch control information allows the activation of permission protection, it is determined that permission protection is activated. If the LCU-level switch control information does not allow the activation of permission protection, it is determined that the activation of permission protection is prohibited. The LCU-level switch control information may include an LCU-level flag bit. If the LCU-level flag bit is a first value, the activation of permission protection is permitted. If the LCU-level flag bit is a second value, the activation of permission protection is prohibited.

[0151] For another example, if the control unit-level switch control information allows permission protection to be enabled, it is determined that permission protection is enabled. If the control unit-level switch control information does not allow permission protection to be enabled, it is determined that permission protection is prohibited from being enabled. The control unit-level switch control information may include a control unit-level flag bit. If the control unit-level flag bit is a first value, permission protection is allowed to be enabled. If the control unit-level flag bit is a second value, permission protection is not allowed to be enabled. Of course, the above are just a few examples and are not limiting.

[0152] Exemplarily, the switch control information of the sequence level / sequence level extended data can allow the current sequence to enable permission protection, that is, enable permission protection for all coding units in the current sequence. The switch control information of the image level / image level extended data can allow the current image to enable permission protection, that is, enable permission protection for all coding units in the current image. The switch control information of the slice level can allow the current slice to enable permission protection, that is, enable permission protection for all coding units in the current slice. The switch control information of the tile level can allow the current tile to enable permission protection, that is, enable permission protection for all coding units in the current tile. The switch control information of the patch level can allow the current patch to enable permission protection, that is, enable permission protection for all coding units in the current patch. The switch control information of the LCU level can allow the current LCU to enable permission protection, that is, enable permission protection for all coding units in the current LCU. The switch control information of the control unit level can allow the current control unit to enable permission protection, that is, enable permission protection for all coding units in the current control unit.

[0153] Example 5: Example 5 is used to implement hierarchical control. In Example 1, Example 2, and Example 3, as to whether to enable permission protection, if there are multiple levels of control, the principle of the lower level being controlled by the upper level is followed. For the encoding end, if there are multiple levels of switch control information, the switch control information of the previous level is obtained; if the switch control information of the previous level does not allow the enabling of permission protection, it is determined not to enable permission protection; if the switch control information of the previous level allows the enabling of permission protection, the switch control information of the next level is obtained. If the switch control information of the next level does not allow the enabling of permission protection, it is determined not to enable permission protection; if the switch control information of the next level allows the enabling of permission protection, and the switch control information of the next level is the last level of switch control information, it is determined to enable permission protection; if the switch control information of the next level allows the enabling of permission protection, and the switch control information of the next level is not the last level of switch control information, the switch control information of the next level is continued to be obtained, and so on. For the decoding end, if there are multiple levels of switch control information, the switch control information of the previous level is decoded; if the switch control information of the previous level does not allow the activation of permission protection, it is determined that permission protection is not enabled; if the switch control information of the previous level allows the activation of permission protection, the switch control information of the next level is decoded. If the switch control information of the next level does not allow the activation of permission protection, it is determined that permission protection is not enabled; if the switch control information of the next level allows the activation of permission protection, and the switch control information of the next level is the last level, it is determined that permission protection is enabled; if the switch control information of the next level allows the activation of permission protection, and the switch control information of the next level is not the last level, the switch control information of the next level is decoded, and so on.

[0154] Taking the example of multi-level switch control information being two-level switch control information, the previous-level switch control information is recorded as the first switch control information, and the next-level switch control information is recorded as the second switch control information. Taking the processing process at the decoding end as an example, the first-level switch control information is first decoded; if the first-level switch control information does not allow permission protection to be enabled, it is determined that permission protection is not enabled; if the first-level switch control information allows permission protection to be enabled, the second-level switch control information is decoded. If the second-level switch control information does not allow permission protection to be enabled, it is determined that permission protection is not enabled; if the second-level switch control information allows permission protection to be enabled, it is determined that permission protection is enabled. For example, the first switch control information can be switch control information for sequence-level / sequence-level extended data, and the second switch control information can be switch control information for image-level / image-level extended data, slice-level switch control information, tile-level switch control information, patch-level switch control information, LCU-level switch control information, or control unit-level switch control information. For another example, the first switch control information may be switch control information of image level / image level extended data, and the second switch control information may be switch control information of slice level, switch control information of tile level, switch control information of patch level, switch control information of LCU level or switch control information of control unit level.

[0155] For example, if there is identifier A at the sequence level and identifier B at the slice level, then identifier B will be explicitly present in the code stream only when identifier A enables permission protection (that is, permission protection is allowed).

[0156] Taking the example of multi-level switch control information being three-level switch control information, the previous-level switch control information can be recorded as first switch control information, the middle-level switch control information can be recorded as second switch control information, and the next-level switch control information can be recorded as third switch control information. Taking the processing process at the decoding end as an example, the first-level switch control information can be decoded first; if the first-level switch control information does not allow permission protection to be enabled, it is determined that permission protection is not enabled; if the first-level switch control information allows permission protection to be enabled, the second-level switch control information can be decoded; if the second-level switch control information does not allow permission protection to be enabled, it is determined that permission protection is not enabled; if the second-level switch control information allows permission protection to be enabled, the third-level switch control information can be decoded; if the third-level switch control information does not allow permission protection to be enabled, it is determined that permission protection is not enabled; if the third-level switch control information allows permission protection to be enabled, it is determined that permission protection is enabled. For example, the first switch control information may be switch control information of sequence level / sequence level extended data, the second switch control information may be switch control information of image level / image level extended data, and the third switch control information may be switch control information of slice level, switch control information of tile level, switch control information of patch level, switch control information of LCU level, or switch control information of control unit level.

[0157] For other situations such as four-level switch control information, the implementation method is similar and will not be repeated here.

[0158] Example 6: Example 6 is used to implement regional inheritance in regional characterization. In Example 1, Example 2 and Example 3, the decoding end needs to determine one or more target regional categories corresponding to the target authority level. In order to determine the target regional category corresponding to the target authority level, the following method can be used: query the mapping relationship between the target authority level and the candidate authority level to obtain the regional category corresponding to the target authority level and the candidate authority level, and determine the regional category corresponding to the target authority level and the candidate authority level as the target regional category corresponding to the target authority level; wherein the candidate authority level is an authority level lower than the target authority level. For example, a mapping relationship can be pre-configured, and the mapping relationship can include a correspondence between the authority level and the regional category, so that each regional category can be divided into authority levels.

[0159] For example, the authority level and the regional category can be a one-to-one correspondence, in which case each coding unit corresponds to one authority level, as shown in Table 1, which is an example of a mapping relationship. The authority level and the regional category can be a one-to-many relationship, in which different authority levels can correspond to the same number of regional categories, as shown in Table 2, which is an example of a mapping relationship. Different authority levels can also correspond to different numbers of regional categories, as shown in Table 3, which is an example of a mapping relationship. The authority level and the regional category can be a many-to-one relationship, that is, multiple authority levels can correspond to the same regional category, as shown in Table 4, which is an example of a mapping relationship.

[0160] Table 1

[0161] Permission Level Regional Category Clearance Level 1 Area Category 1 Clearance Level 2 Area Category 2 Clearance Level 3 Area Category 3

[0162] Table 2

[0163] Permission Level Regional Category Clearance Level 1 Area Category 1, Area Category 2 Clearance Level 2 Area Category 3, Area Category 4 Clearance Level 3 Regional Category 5, Regional Category 6

[0164] Table 3

[0165] Permission Level Regional Category Clearance Level 1 Area Category 1 Clearance Level 2 Area Category 2, Area Category 3, Area Category 4 Clearance Level 3 Regional Category 5, Regional Category 6

[0166] Table 4

[0167]

[0168]

[0169] Taking the mapping relationship shown in Table 1 as an example, if the permission levels are ranked from high to low as follows: Permission Level 1 > Permission Level 2 > Permission Level 3, then Permission Level 1 can access Area Category 1, Area Category 2, and Area Category 3; Permission Level 2 can access Area Category 2 and Area Category 3; and Permission Level 3 can access Area Category 3. If the permission levels are ranked from high to low as follows: Permission Level 1 = Permission Level 2 > Permission Level 3, then Permission Level 1 can access Area Category 1 and Area Category 3; Permission Level 2 can access Area Category 2 and Area Category 3; and Permission Level 3 can access Area Category 3. If the permission levels are ranked from high to low as follows: Permission Level 1 > Permission Level 2 = Permission Level 3, then Permission Level 1 can access Area Category 1, Area Category 2, and Area Category 3; Permission Level 2 can access Area Category 2; and Permission Level 3 can access Area Category 3. In other words, a higher permission level can access the area categories of a lower permission level.

[0170] Taking the mapping relationship shown in Table 2 as an example, the six area categories are divided into three authority levels, area category 1 and area category 2 are divided into authority level 1, area category 3 and area category 4 are divided into authority level 2, and area category 5 and area category 6 are divided into authority level 3. If the authority levels are from high to low: authority level 1>authority level 2>authority level 3, then: authority level 1 can access area category 1, area category 2, area category 3, area category 4, area category 5, and area category 6; authority level 2 can access area category 3, area category 4, area category 5, and area category 6; authority level 3 can access area category 5 and area category 6, that is, the upper authority level can access the area category of the lower authority.

[0171] In summary, when determining the target area category corresponding to the target authority level, the mapping relationship between the target authority level and the candidate authority level can be queried to obtain the area category corresponding to the target authority level and the candidate authority level, and the area category corresponding to the target authority level and the candidate authority level can be determined as the target area category corresponding to the target authority level. For example, taking the target authority level as authority level 2 as an example, the candidate authority level can be authority level 3. As shown in Table 1, area category 2 and area category 3 corresponding to authority level 2 and authority level 3 can be used as the target area category corresponding to authority level 2. As shown in Table 2, area category 3, area category 4, area category 5 and area category 6 corresponding to authority level 2 and authority level 3 can be used as the target area category corresponding to authority level 2. As shown in Table 3, area category 2, area category 3, area category 4, area category 5 and area category 6 corresponding to authority level 2 and authority level 3 can be used as the target area category corresponding to authority level 2.

[0172] In one possible implementation, there may be at least one region category (the default region category) that can be accessed by all permission levels. See Table 5 for an example of the mapping relationship for Table 1, and Table 6 for an example of the mapping relationship for Table 2, and so on. In this case, there is no need to explicitly express the correspondence between permission levels and default region categories. That is, Table 5 can be consistent with the syntax of Table 1, and Table 6 can be consistent with the syntax of Table 2, but implicitly, all permissions are allowed to access the default region category.

[0173] Table 5

[0174] Permission Level Regional Category Clearance Level 1 Area category 1, default area category Clearance Level 2 Area Category 2, Default Area Category Clearance Level 3 Area Category 3, Default Area Category

[0175] Table 6

[0176]

[0177]

[0178] In Tables 5 and 6, the default region category can be a pre-configured region category that can be accessed by all permission levels. If the current region category corresponding to the current coding unit is the default region category, it means that the region where the current coding unit is located does not need to be protected by permissions, and all permission levels can access the region where the default region category is located. Therefore, there is no distinction between high-dimensional reconstruction information and low-dimensional reconstruction information, and the current coding unit can be reconstructed through the reconstruction information. The encoder encodes the bitstream corresponding to the current coding unit, and the bitstream includes the reconstruction information of the current coding unit. The decoder decodes the bitstream corresponding to the current coding unit, parses the reconstruction information of the current coding unit from the bitstream, and reconstructs the current coding unit based on the reconstruction information.

[0179] In Examples 1, 2, and 3, the encoding end needs to determine one or more target region categories. To determine the target region category, the following method can be used: The target region category is obtained by querying a mapping relationship. The target region category is a region category that corresponds to the first permission level and not to the second permission level, i.e., at least one permission level corresponds to the target region category, and at least one permission level does not correspond to the target region category. For example, as shown in Table 1, assuming that permission level 1 > permission level 2 > permission level 3, then region category 1 corresponds to the first permission level (permission level 1) and not to the second permission level (permission level 2 and permission level 3). Therefore, region category 1 is the target region category. Region category 2 corresponds to the first permission level (permission level 1 and permission level 2) and not to the second permission level (permission level 3). Therefore, region category 2 is the target region category. Region category 3 corresponds to all permission levels (permission level 1, permission level 2, and permission level 3). That is, all permission levels have access rights to region category 3 and can view the image area corresponding to region category 3. Therefore, region category 3 is not the target region category. Similarly, as shown in Table 2, Region Category 1, Region Category 2, Region Category 3, and Region Category 4 are all target region categories, while Region Category 5 and Region Category 6 are not. As shown in Table 4, Region Category 1, Region Category 2, Region Category 3, and Region Category 4 are all target region categories, while Region Category 5 and Region Category 6 are not, and so on.

[0180] Example 7: Example 7 is used to implement the syntax design in region characterization. In Example 1, Example 2 and Example 3, the encoding end and the decoding end also need to determine the current region category corresponding to the current coding unit. The current coding unit can correspond to one current region category or multiple current region categories.

[0181] For example, the encoder can obtain a region category identifier and one or more region location information corresponding to the region category identifier; and for the current coding unit corresponding to the region location information, determine the region category corresponding to the region category identifier as the current region category corresponding to the current coding unit. The decoder can obtain a region category identifier and one or more region location information corresponding to the region category identifier; and for the current coding unit corresponding to the region location information, determine the region category corresponding to the region category identifier as the current region category corresponding to the current coding unit. The encoder can also encode the region category identifier and one or more region location information corresponding to the region category identifier in the syntax of a higher-level unit of the current coding unit. Based on this, the decoder can also decode the region category identifier and one or more region location information corresponding to the region category identifier from the syntax of the higher-level unit of the current coding unit. Alternatively, the encoder can avoid encoding the region category identifier and one or more region location information corresponding to the region category identifier in the syntax of the higher-level unit of the current coding unit, and the decoder can derive the region category identifier and one or more region location information corresponding to the region category identifier based on reconstructed data. This is not a limitation. Alternatively, the encoder may not encode the region category identifier in the upper-layer unit syntax of the current coding unit. However, the encoder may encode one or more region location information corresponding to the region category identifier in the upper-layer unit syntax of the current coding unit, and the decoder may derive the region category identifier based on the reconstructed data and decode the one or more region location information corresponding to the region category identifier from the upper-layer unit syntax of the current coding unit. There is no restriction on this. For example, the region category identifier can be implicitly derived and does not need to be explicitly transmitted. For example, when arranged in an agreed order, the decoder can implicitly derive the region category identifier.

[0182] For example, an example of the upper-layer unit syntax of the current coding unit may be 1 200 400 500 600. In this upper-layer unit syntax, "1" represents the region category identifier, and "200 400 500 600" represents the region location information corresponding to region category identifier 1. This region location information can be used to uniquely identify a region. Based on this, for the current coding unit corresponding to this region location information, the current region category corresponding to the current coding unit may be region category 1 corresponding to region category identifier 1.

[0183] For another example, an upper-layer unit syntax of the current coding unit may be 2 100 200 300 300 150 300 400 400 200 400 500 600. In this upper-layer unit syntax, "2" represents a region category identifier, "100 200 300 300," "150 300 400 400," and "200 400 500 600" represent three region location information corresponding to region category identifier 1. Three regions can be determined using these three region location information. Based on this, for the current coding unit corresponding to these three region location information, the current region category corresponding to the current coding unit may be region category 2 corresponding to region category identifier 2.

[0184] Example 8: Example 8 is used to implement syntax design in region characterization. In Example 1, Example 2, and Example 3, the encoder and decoder also need to determine the current region category corresponding to the current coding unit. For example, the encoder can obtain the region category identifier, the total number of image regions corresponding to the region category identifier, and the region position information of the total number of image regions; for the current coding unit corresponding to the region position information, the region category corresponding to the region category identifier is determined as the current region category corresponding to the current coding unit. The decoder can obtain the region category identifier, the total number of image regions corresponding to the region category identifier, and the region position information of the total number of image regions; for the current coding unit corresponding to the region position information, the region category corresponding to the region category identifier is determined as the current region category corresponding to the current coding unit.

[0185] Among them, the encoding end can also encode the region category identifier, the total number of image regions corresponding to the region category identifier, and the region location information of the total number of image regions in the upper-layer unit syntax of the current coding unit. On this basis, the decoding end can also decode the region category identifier, the total number of image regions corresponding to the region category identifier, and the region location information of the total number of image regions from the upper-layer unit syntax of the current coding unit. Alternatively, the encoding end may not encode the region category identifier, the total number of image regions corresponding to the region category identifier, and the region location information of the total number of image regions in the upper-layer unit syntax of the current coding unit, and the decoding end may derive the region category identifier, the total number of image regions corresponding to the region category identifier, and the region location information of the total number of image regions based on the reconstructed data, and there is no restriction on this. Alternatively, the encoder may not encode the region category identifier in the upper-layer unit syntax of the current coding unit. However, the encoder may encode the total number of image regions corresponding to the region category identifier and the region location information of the total number of image regions in the upper-layer unit syntax of the current coding unit, and the decoder may derive the region category identifier based on the reconstructed data and decode the total number of image regions corresponding to the region category identifier and the region location information of the total number of image regions from the upper-layer unit syntax of the current coding unit. There is no restriction on this. For example, the region category identifier can be implicitly derived and does not need to be explicitly transmitted. For example, when arranged in an agreed order, the decoder can implicitly derive the region category identifier.

[0186] For example, an example of the upper-layer unit syntax of the current coding unit can be 1 1 200 400 500 600. In this upper-layer unit syntax, the first "1" represents the region category identifier, the second "1" represents the total number of image regions corresponding to the region category identifier, and "200 400 500 600" represents the region location information corresponding to the region category identifier 1. This region location information can be used to uniquely identify a region. On this basis, the decoding end learns that the region category identifier is 1 based on the first "1" and that region location information needs to be parsed based on the second "1". For the current coding unit corresponding to the region location information, the current region category corresponding to the current coding unit can be region category 1 corresponding to region category identifier 1.

[0187] For another example, an example of the upper-layer unit syntax of the current coding unit can be 2 3 100 200 300300150 300 400 400 200 400 500 600. In this upper-layer unit syntax, "2" represents the region category identifier, "3" represents the total number of image regions corresponding to the region category identifier, and "100 200 300 300", "150 300 400 400", and "200 400 500 600" represent three region position information corresponding to the region category identifier 1. Three regions can be determined respectively through these three region position information. On this basis, the decoder knows that the region category identifier is 2 based on "1" and knows that three region position information needs to be parsed based on "3". For the current coding unit corresponding to these three region position information, the decoder determines that the current region category corresponding to the current coding unit can be region category 2 corresponding to region category identifier 2.

[0188] From the above, it can be seen that the grammatical design in region characterization can be: region category index value + number of shapes of the current region category + specific form, the region category index value can be the region category identifier, the number of shapes of the current region category can be the total number of image regions corresponding to the region category identifier, and the specific form can be the form of region location information. For the form of region location information, please refer to the subsequent embodiments.

[0189] In a possible implementation, for Example 7 and Example 8, the total amount of area location information corresponding to each area category identifier may also be limited, that is, the total amount of area location information needs to be no greater than a preset number threshold, and the preset number threshold can be configured based on experience, such as 16, 32, or 64. Taking 64 as an example, the area location information corresponding to the area category identifier needs to be no greater than 64.

[0190] In Example 8, the total number of image areas (the total number used to represent area location information) needs to be no greater than a preset number threshold. The preset number threshold can be configured based on experience, such as 16, 32, or 64. Taking 64 as an example, the total number of image areas needs to be no greater than 64, thereby limiting the depiction to only 64 areas.

[0191] In a possible implementation, for Example 7 and Example 8, the total number of area category identifiers can also be limited, that is, the total number of area category identifiers needs to be no greater than a threshold, and the threshold can be configured based on experience, such as 4, 8, 16, etc., that is, the total number of area category identifiers cannot exceed the threshold.

[0192] Obviously, by simultaneously limiting the total number of region category identifiers and the total number of image regions corresponding to the region category identifiers, the total number of all region position information corresponding to all region category identifiers can be limited.

[0193] Example 9: Example 9 is used to implement the syntax design in region characterization. On the basis of Example 7 or Example 8 (taking Example 8 as an example), the encoding end and the decoding end also need to determine the current region category corresponding to the current coding unit. In Example 7 and Example 8, the current coding unit corresponds to one current region category. In Example 9, the current coding unit corresponds to multiple current region categories.

[0194] For example, the encoder / decoder can obtain the region category identifier, the total number of image regions corresponding to the region category identifier, the total number of region location information of the image regions, and the merge identifier corresponding to the region category identifier. The merge identifier is used to indicate whether there is an associated region category identifier for a merge operation with the region category identifier. If the merge identifier is used to indicate that there is an associated region category identifier for a merge operation with the region category identifier, the encoder / decoder can obtain the associated region category identifier corresponding to the region category identifier. If the merge identifier is used to indicate that there is no associated region category identifier for a merge operation with the region category identifier, the encoder / decoder does not obtain the associated region category identifier corresponding to the region category identifier.

[0195] Among them, if the merge identifier is the first value, the merge identifier is used to indicate that there is an associated area category identifier that is merged with the area category identifier; if the merge identifier is the second value, the merge identifier is used to indicate that there is no associated area category identifier that is merged with the area category identifier.

[0196] For the current coding unit corresponding to the region position information corresponding to the region category identifier, the region category corresponding to the region category identifier is determined as the current region category corresponding to the current coding unit.

[0197] For the coding unit corresponding to the region position information corresponding to the associated region category identifier, the region category corresponding to the region category identifier and the region category corresponding to the associated region category identifier are determined as the region category corresponding to the coding unit, that is, the region category corresponding to the coding unit can be multiple region categories.

[0198] Among them, the encoding end can also encode the region category identifier, the total number of image regions corresponding to the region category identifier, the region position information of the total number of image regions, the merge identifier corresponding to the region category identifier, and the associated region category identifier corresponding to the region category identifier in the upper-layer unit syntax of the current coding unit. On this basis, the decoding end can also decode the region category identifier, the total number of image regions corresponding to the region category identifier, the total number of image regions, the region position information, the merge identifier corresponding to the region category identifier, and the associated region category identifier corresponding to the region category identifier from the upper-layer unit syntax of the current coding unit. Alternatively, the encoding end may not encode the above-mentioned syntax information in the upper-layer unit syntax of the current coding unit, and the decoding end may derive the region category identifier, the total number of image regions corresponding to the region category identifier, the total number of image regions, the region position information, the merge identifier corresponding to the region category identifier, and the associated region category identifier corresponding to the region category identifier based on the reconstructed data, and there is no limitation on this.

[0199] For example, an example of the upper-layer unit syntax of the current coding unit can be 4 1 200 400 500 600 10 2 3. In this upper-layer unit syntax, "4" represents the region category identifier, the first "1" represents the total number of image regions corresponding to the region category identifier 4, and "200 400 500 600" represents the region position information corresponding to the region category identifier 4. A region can be uniquely identified by the region position information. The second "1" represents a merge identifier, and the merge identifier is used to indicate that there is an associated region category identifier that is merged with the region category identifier 4. "0 2 3" is used to represent three associated region category identifiers.

[0200] On this basis, the decoding end knows that the area category identifier is 4 based on "4", and knows that an area location information needs to be parsed based on the first "1". For the current coding unit corresponding to the area location information, the current area category corresponding to the current coding unit can be the area category 4 corresponding to the area category identifier 4.

[0201] Based on the second "1", the decoding end learns that the merge identifier is used to indicate the existence of an associated region category identifier that is merged with region category identifier 4, that is, the associated region category identifiers are 0, 2, and 3. On this basis, for the coding unit corresponding to the region position information corresponding to associated region category identifier 0 (learned in the syntax of region category identifier 0), the current region category corresponding to the coding unit may be region category 4 corresponding to region category identifier 4 and region category 0 corresponding to associated region category identifier 0. For the coding unit corresponding to the region position information corresponding to associated region category identifier 2, the current region category corresponding to the coding unit may be region category 4 corresponding to region category identifier 4 and region category 2 corresponding to associated region category identifier 2. For the coding unit corresponding to the region position information corresponding to associated region category identifier 3, the current region category corresponding to the coding unit may be region category 4 corresponding to region category identifier 4 and region category 3 corresponding to associated region category identifier 3. Obviously, there may be multiple current region categories corresponding to a coding unit.

[0202] Example 10: Example 10 is used to implement syntax design in region characterization. Based on Example 7 or Example 8 (hereinafter described as an example based on Example 8), the encoding end and the decoding end also need to determine the current region category corresponding to the current coding unit, such as corresponding to multiple current region categories.

[0203] For example, the encoding end / decoding end can obtain the region category identifier, the total number of image regions corresponding to the region category identifier, the region location information of the total number of image regions, and the merge identifier corresponding to the region category identifier. The merge identifier is used to indicate whether there is an associated region category identifier for a merge operation with the region category identifier. If the merge identifier is used to indicate that there is an associated region category identifier for a merge operation with the region category identifier, the encoding end / decoding end can obtain the total number of category identifiers corresponding to the associated region category identifier, and the total number of associated region category identifiers corresponding to the region category identifier. If the merge identifier is used to indicate that there is no associated region category identifier for a merge operation with the region category identifier, the encoding end / decoding end does not obtain the associated region category identifier corresponding to the region category identifier.

[0204] On this basis, for the current coding unit corresponding to the region position information corresponding to the region category identifier, the region category corresponding to the region category identifier is determined as the current region category corresponding to the current coding unit. For the coding unit corresponding to the region position information corresponding to the associated region category identifier, the region category corresponding to the region category identifier and the region category corresponding to the associated region category identifier are determined as the region category corresponding to the coding unit, that is, the region category corresponding to the coding unit may be multiple region categories.

[0205] The encoder may further encode, in the syntax of the upper-layer unit of the current coding unit, a region category identifier, the total number of image regions corresponding to the region category identifier, region location information of the total number of image regions, a merge identifier corresponding to the region category identifier, the total number of category identifiers corresponding to the associated region category identifier, and the total number of associated region category identifiers. The decoder may decode, from the syntax of the upper-layer unit of the current coding unit, the region category identifier, the total number of image regions corresponding to the region category identifier, the total number of image regions, region location information, the merge identifier corresponding to the region category identifier, the total number of category identifiers corresponding to the associated region category identifier, and the total number of associated region category identifiers. Alternatively, the encoder may not encode the above-mentioned syntax information in the syntax of the upper-layer unit of the current coding unit, and the decoder may derive, based on the reconstructed data, the region category identifier, the total number of image regions corresponding to the region category identifier, the total number of image regions, region location information, the merge identifier corresponding to the region category identifier, the total number of category identifiers corresponding to the associated region category identifier, and the total number of associated region category identifiers.

[0206] For example, an example of the upper-level unit syntax of the current coding unit can be 4 1 200 400 500 600 1 302 3. In the upper-level unit syntax, "4" represents the region category identifier, the first "1" represents the total number of image regions corresponding to the region category identifier 4, "200 400 500 600" represents the region position information corresponding to the region category identifier 4, the second "1" represents the merge identifier, which is used to indicate that there is an associated region category identifier for a merge operation, the first "3" indicates that there are three associated region category identifiers in total, that is, three associated region category identifiers need to be parsed, and "0 2 3" are used to represent these three associated region category identifiers.

[0207] In summary, it can be seen that the grammatical design in region characterization can be: region category index value + number of shapes of the current region category + specific form + merge identifier + merge number X + X region index values, where the region category index value can be the region category identifier, the number of shapes of the current region category can be the total number of image regions corresponding to the region category identifier, the specific form can be the form of region location information, the merge identifier is used to indicate whether there is an associated region category identifier for the merge operation with the region category identifier, the merge number X indicates the number of associated region category identifiers, and the X region index values ​​indicate X associated region category identifiers.

[0208] In the above embodiment, the region merging operation can be restricted to be performed only with authority regions of the same level, or, can be performed only with authority regions of the same level and lower level authority regions, that is, the authority level corresponding to the associated region category identifier is equal to the authority level corresponding to the region category identifier; or, the authority level corresponding to the associated region category identifier is lower than the authority level corresponding to the region category identifier.

[0209] Example 11: Example 11 is used to implement the formal design in area characterization. In Examples 1-3 and 7-10, the area location information corresponding to the area category identifier is involved. The area location information may include but is not limited to the area location information of a polygonal area, a rectangular area, or a circular area. Of course, it can also be other shapes, such as an irregular quadrilateral, or a fan-shaped area, etc., and there is no restriction on this. It should be noted that in Examples 1-3 and 7-10, if it is necessary to support multiple area forms at the same time, for example, there are rectangular area characterizations and circular area characterizations at the same time, then it is necessary to additionally transmit the grammatical identifier of the characterization type to represent rectangular area characterizations or circular area characterizations, etc.

[0210] Application scenario 1: For the area location information of a polygonal area (such as an irregular quadrilateral, rhombus, or other arbitrary shapes), the area location information may include at least one vertex coordinate under a preset origin; for example, the area location information may include all vertex coordinates of the polygonal area under the preset origin.

[0211] Application scenario 2: For the area location information of a rectangular area, the area location information may include at least one vertex coordinate under a preset origin; for example, the area location information may include all vertex coordinates of the rectangular area under the preset origin, such as the four vertex coordinates of the rectangular area.

[0212] Application scenario 3: For the area position information of a rectangular area, the area position information includes the coordinates of the upper left corner and the lower right corner of the rectangular area under a preset origin; or, the area position information includes the coordinates of the lower left corner and the upper right corner of the rectangular area under a preset origin; or, the area position information includes the coordinates of any corner point of the rectangular area under a preset origin (such as the coordinates of the upper left corner, the coordinates of the lower left corner, the coordinates of the upper right corner, the coordinates of the lower right corner, etc.), the width of the rectangular area, and the height of the rectangular area.

[0213] Application scenario 4: For a circular area, the area location information may include the center coordinates of the circular area under a preset origin and the radius of the circular area, that is, the circle is described by the center coordinates and the radius.

[0214] In the above embodiments, the coordinates refer to the coordinates under the preset origin (such as the vertex coordinates of the polygonal area under the preset origin, the vertex coordinates of the rectangular area under the preset origin, the center coordinates of the circular area under the preset origin, etc.), and the preset origin can be any coordinate point in the current image.

[0215] For example, the upper left corner coordinate point in the current image can be used as the preset origin. Alternatively, the encoder can use any coordinate point in the current image as the preset origin and encode the information of the preset origin in the bitstream (used to indicate which coordinate point in the current image is used as the preset origin). The decoder decodes the preset origin information from the bitstream and then knows which coordinate point in the current image is used as the preset origin. Alternatively, the preset origin can be the upper left corner point of a preset M*N rectangular partition. The preset M*N rectangular partition can be an LCU partition, a CU partition, or other partitioning methods, without limitation.

[0216] For example, the current image can be divided into multiple LCUs, each LCU can be a rectangle of size M*N, M can be greater than or equal to the minimum size of the coding unit, N can be greater than or equal to the minimum size of the coding unit, on this basis, the upper left corner point of the preset LCU (preset M*N rectangle) can be used as the preset origin. Assuming that the regions corresponding to the region category identifier (i.e., the regions corresponding to the region position information) are all located in LCU1, the upper left corner point of LCU1 is used as the preset origin. Assuming that the regions corresponding to the region category identifier are all located in LCU2, the upper left corner point of LCU2 is used as the preset origin, and so on.

[0217] For example, see Figure 5 As shown, assuming that each area corresponding to each area category identifier (such as 0, 1, 2, etc.) is located in the black rectangular frame, the upper left corner point of the black rectangular frame can be used as the preset origin.

[0218] Example 12: Example 12 is used to implement formal design in region characterization. In Examples 1 to 3 and Examples 7 to 10, they all involve region location information corresponding to the region category identifier. In order to determine the region location information corresponding to the region category identifier, multiple image units can be arranged in a preset scanning order. On this basis, the region location information may include a starting image unit index and an ending image unit index at a preset origin; or, the region location information may include a starting image unit index at a preset origin and the total number of image units in the current region; or, the region location information may include an ending image unit index at a preset origin and the total number of image units in the current region.

[0219] For example, the current image can be divided into multiple image units, and the image units can be coding units, that is, each coding unit can be used as an image unit. Alternatively, the image units can be A*B image units divided according to a preset division method, that is, the current image can be divided into multiple image units of size A*B, and the size of each image unit is A*B, where A can be greater than or equal to the minimum size of the coding unit, such as 4, 8, etc., and B can be greater than or equal to the minimum size of the coding unit, such as 4, 8, etc.

[0220] Then, all the image units are arranged in a preset scanning order, such as arranging the image units in an orderly manner according to a certain rule (raster scanning, Hilbert scanning, etc.), so as to form a one-dimensional form.

[0221] The preset origin can correspond to any image unit among all image units. For example, when the preset origin is 0, it represents the first image unit among all image units, when the preset origin is 1, it represents the second image unit among all image units, and so on. The encoder can encode the preset origin information in the bitstream (used to indicate which image unit in the current image is used as the preset origin), and the decoder decodes the preset origin information from the bitstream to determine which image unit in the current image is used as the preset origin. Alternatively, the preset origin can be a default origin, such as the first image unit as the preset origin.

[0222] Among them, the preset origin can also be the upper left corner point of the preset M*N rectangular division (that is, the image unit in the upper left corner is used as the preset origin), wherein the preset M*N rectangular division can include but is not limited to LCU division, of course, it can also be CU division, and it can also be divided in other ways, without limitation.

[0223] For example, the current image can be divided into multiple LCUs, each LCU can be a rectangle of size M*N, M can be greater than or equal to the minimum size of the coding unit, N can be greater than or equal to the minimum size of the coding unit, on this basis, the upper left corner point of the preset LCU (that is, the image unit in the upper left corner is used as the preset origin) can be used as the preset origin. Assuming that the image units corresponding to the area category identifier are all located in LCU1, the upper left corner point of LCU1 is used as the preset origin. Assuming that the image units corresponding to the area category identifier are all located in LCU2, the upper left corner point of LCU2 is used as the preset origin, and so on.

[0224] For example, see Figure 5 As shown, assuming that the image units corresponding to each area category identifier (such as 0, 1, 2, etc.) are all located in the black rectangular frame, the upper left corner point of the black rectangular frame can be used as the preset origin, that is, the information of the external rectangular frame can be transmitted first, and then the above-mentioned internal area characterization can be performed.

[0225] For example, the region location information can be described one-dimensionally using a start point and an end point. That is, the region location information can include a starting image unit index and an ending image unit index at a preset origin. For example, if the preset origin is 0, the starting image unit index is 3, and the ending image unit index is 6, then the region location information corresponds to image units 3-6. If the preset origin is 1, the starting image unit index is 3, and the ending image unit index is 6, then the region location information corresponds to image units 4-7.

[0226] For example, the region location information can be described in one dimension using a starting point and a length, i.e., the region location information can include the starting image unit index at the preset origin and the total number of image units in the current region. For example, if the preset origin is 0, the starting image unit index is 3, and the total number of image units in the current region is 3, then the region location information corresponds to the 3rd to 5th image units (a total of 3 image units). If the preset origin is 1, the starting image unit index is 3, and the total number of image units in the current region is 5, then the region location information corresponds to the 4th to 8th image units (a total of 5 image units), and so on.

[0227] For example, the region location information can be described one-dimensionally using the end point and length. That is, the region location information can include the ending image unit index at the preset origin and the total number of image units in the current region. For example, if the preset origin is 0, the ending image unit index is 6, and the total number of image units in the current region is 3, then the region location information corresponds to image units 3-5 (a total of 3 image units).

[0228] In a possible implementation, if the area category identifier corresponds to multiple area location information, the end image unit of the previous area location information is used as the preset origin corresponding to the current area location information, that is, the transmission cost is reduced by transmitting the difference between the starting point of the current area and the end point of the previous area.

[0229] For example, when the one-dimensional description of the regional location information is performed through the start point and the end point, the preset origin of the first regional location information is 0, the starting image unit index is 3, and the ending image unit index is 6. Assuming that the preset origin of the second regional location information is 0, the starting image unit index is 8, and the ending image unit index is 12, then by using the ending image unit of the first regional location information as the preset origin corresponding to the second regional location information, the preset origin of the second regional location information is 5 (which can be deduced by the decoding end and does not need to be carried in the bitstream), the starting image unit index is 2, and the ending image unit index is 6.

[0230] For another example, when the one-dimensional description of the area location information is performed through the starting point and length, the preset origin of the first area location information is 0, the starting image unit index is 3, and the total number of image units in the current area is 4. Assuming that the preset origin of the second area location information is 0, the starting image unit index is 8, and the total number of image units in the current area is 5, then by using the ending image unit of the first area location information as the preset origin corresponding to the second area location information, the preset origin of the second area location information is 5, the starting image unit index is 2, and the total number of image units in the current area is 5.

[0231] Example 13: Example 13 is used to implement syntax design and formal design in region characterization. In Examples 1 to 3, the encoding end and the decoding end also need to determine the current region category corresponding to the current coding unit. The current coding unit can correspond to only one current region category. Of course, the current coding unit can also correspond to multiple current region categories, and there is no restriction on this. For example, the encoding end and the decoding end can obtain the region category identifier corresponding to each image unit; based on the region category identifier corresponding to the image unit covered by the current coding unit, the region category corresponding to the highest authority level in the region category identifier can be determined as the current region category corresponding to the current coding unit, that is, a current region category corresponding to the current coding unit is obtained.

[0232] For example, the current image can be divided into multiple image units in the form of MAP / MASK, that is, the current image is divided regularly (such as into multiple A*B blocks), and the image units can be A*B image units divided according to a preset division method, that is, the current image can be divided into multiple image units of size A*B, and the size of each image unit is A*B, A can be greater than or equal to the minimum size of the coding unit, such as 4, 8, etc., and B can be greater than or equal to the minimum size of the coding unit, such as 4, 8, etc.

[0233] For another example, the current image can be divided into multiple image units in the form of unit-level description. There are various units in the encoding / decoding process, such as coding units. The region description can be performed by corresponding region category identifiers to each coding unit. That is, the image unit can be a coding unit, that is, each coding unit can be used as an image unit, and the coding unit is each image block to be processed in the current image.

[0234] Then, the region category identifier corresponding to each image unit is determined. Assuming that there are five region category identifiers, such as 0, 1, 2, 3, 4, etc., the region category identifier corresponding to each image unit can be 0, or 1, or 2, or 3, or 4, that is, the region category identifiers of all image units can be described.

[0235] For example, the encoding end can determine the region category identifier corresponding to each image unit and encode the region category identifier corresponding to each image unit in the upper-layer unit syntax of the current encoding unit. The decoding end can decode the region category identifier corresponding to each image unit from the upper-layer unit syntax of the current encoding unit to obtain the region category identifier corresponding to each image unit. Alternatively, the encoding end may not encode the region category identifier corresponding to each image unit in the upper-layer unit syntax of the current coding unit, and the decoding end may derive the region category identifier corresponding to each image unit based on the reconstructed data, and there is no restriction on this.

[0236] Assuming there are 32 image units, the region category identifiers corresponding to these 32 image units can be found in Figure 6 As shown, there are 6 image units corresponding to the region category identification 1, and the remaining 26 image units corresponding to the region category identification 0. For the positional relationship of these image units, please refer to Figure 6 shown.

[0237] After obtaining the region category identifier corresponding to each image unit, the encoder and decoder can determine the region category identifier corresponding to the image unit covered by the current coding unit when encoding or decoding the current coding unit. If the current coding unit covers only one image unit, the region category corresponding to the region category identifier corresponding to the image unit is determined as the current region category corresponding to the current coding unit.

[0238] If the current coding unit covers multiple image units, based on the region category identifier corresponding to each image unit covered by the current coding unit, the region category corresponding to the highest authority level in the region category identifier can be determined as the current region category corresponding to the current coding unit. For example, assuming that the current coding unit is 16*8, and the current coding unit includes 8*8 image unit 1 and 8*8 image unit 2, if the authority level corresponding to the region category identifier of image unit 1 is higher than the authority level corresponding to the region category identifier of image unit 2, then the region category corresponding to the region category identifier corresponding to image unit 1 is determined as the current region category corresponding to the current coding unit. If the authority level corresponding to the region category identifier of image unit 2 is higher than the authority level corresponding to the region category identifier of image unit 1, then the region category corresponding to the region category identifier corresponding to image unit 2 is determined as the current region category corresponding to the current coding unit. If the authority level corresponding to the region category identifier of image unit 1 is equal to the authority level corresponding to the region category identifier of image unit 2, the region category corresponding to the region category identifier corresponding to image unit 1 can be determined as the current region category corresponding to the current coding unit, or the region category corresponding to the region category identifier corresponding to image unit 2 can be determined as the current region category corresponding to the current coding unit, or the region category corresponding to the region category identifier corresponding to image unit 1 and the region category corresponding to the region category identifier corresponding to image unit 2 can both be determined as the current region category corresponding to the current coding unit, that is, there can be two current region categories corresponding to the current coding unit. Of course, if the region category corresponding to the region category identifier corresponding to image unit 1 and the region category identifier corresponding to image unit 2 are the same, then the current region category corresponding to the current coding unit is one.

[0239] Example 14: Example 14 is used to implement syntax design and formal design in region characterization. In Examples 1 to 3, the encoding end and the decoding end also need to determine the current region category corresponding to the current coding unit, such as one current region category or multiple current region categories. For the encoding end and the decoding end, the region category identifier and the region indication information can be obtained. The region indication information is used to indicate multiple image units, and the region category identifier is determined as the region category identifier corresponding to the multiple image units. On this basis, based on the region category identifier corresponding to the image unit covered by the current coding unit, the region category corresponding to the highest authority level in the region category identifier can be determined as the current region category corresponding to the current coding unit.

[0240] For example, the current image can be divided into multiple image units in the form of MAP / MASK, that is, the current image is divided regularly (such as into multiple A*B blocks). The image unit can be an A*B image unit divided according to a preset division method, or the current image can be divided into multiple image units in the form of unit-level description. For example, each coding unit can be used as an image unit, and there is no restriction on this.

[0241] For the encoding end, the region category identifier corresponding to each image unit can be determined. Assuming that there are five region category identifiers, such as 0, 1, 2, 3, 4, etc., the region category identifier corresponding to each image unit can be 0, or 1, or 2, or 3, or 4, that is, the region category identifiers of all image units are described.

[0242] For the encoding end, the encoding end can also determine region indication information, which is used to indicate multiple image units. On this basis, the encoding end can encode the region category identifier and the region indication information corresponding to the region category identifier in the upper-level unit syntax of the current coding unit.

[0243] The decoding end may decode the region category identifier and the region indication information corresponding to the region category identifier from the upper-layer unit syntax of the current coding unit, thereby obtaining the region category identifier and the region indication information. Alternatively, the encoding end may not encode the region category identifier and the region indication information in the upper-layer unit syntax of the current coding unit, and the decoding end may derive the region category identifier and the region indication information based on the reconstructed data.

[0244] The region indication information is used to indicate a plurality of image units. Therefore, the decoding end may determine the region category identifier as the region category identifier corresponding to the plurality of image units indicated by the region indication information.

[0245] In a possible embodiment, the area indication information may include starting point coordinates under a preset origin, at least one direction identifier, the length corresponding to each direction identifier, and an end mark; wherein the starting point coordinates are used to indicate the image unit corresponding to the area category identifier (that is, the starting point coordinates indicate which image unit among all image units), the direction identifier is used to indicate the direction of image units belonging to the same area category, the length corresponding to each direction identifier is used to indicate the number of image units belonging to the same area category in that direction, and the end mark is used to indicate that the indication of multiple image units has been completed.

[0246] For example, the length of each direction identifier can be fixed to 1. In this case, the length of each direction identifier can be omitted in the syntax of the upper layer unit of the current coding unit, and the decoder can determine that the length of each direction identifier is 1. Assuming there are 32 image units, the region category identifiers corresponding to these 32 image units can be found in Figure 7 As shown, on this basis: the starting coordinates under the preset origin are used to represent the third image unit in the second row, such as the starting coordinates (2,3) are used to represent the third image unit in the second row. At least one direction identifier can be right, right, right, down, left, left, left, and different directions can be represented by different direction identifiers, such as 00 for right, 01 for left, 10 for down, and 11 for up. In summary, the area indication information can include: 2, 3, 00, 00, 00, 10, 01, 01, 01, and end mark. Based on the above region indication information, the first image unit (the third image unit in the second row) is found using the starting coordinate (2, 3), the second image unit (the fourth image unit in the second row) is found using the first "00", the third image unit (the fifth image unit in the second row) is found using the second "00", the fourth image unit (the sixth image unit in the second row) is found using the third "00", the fifth image unit (the sixth image unit in the third row) is found using "10", the sixth image unit (the fifth image unit in the third row) is found using the first "01", the seventh image unit (the fourth image unit in the third row) is found using the second "01", and the eighth image unit (the third image unit in the third row) is found using the third "01". The end marker indicates that the indication of multiple image units has been completed. Thus, eight image units are obtained, and the region category identifiers corresponding to these eight image units can be determined. That is, only one region category identifier needs to be transmitted to simultaneously obtain the region category identifiers corresponding to all eight image units.

[0247] For another example, the length corresponding to each direction identifier can be a variable value. In this case, the length corresponding to each direction identifier is carried in the syntax of the upper layer unit of the current coding unit, and the decoding end needs to determine the length corresponding to each direction identifier. Figure 7As shown, the starting coordinates under the preset origin are used to represent the third image unit in the second row, such as the starting coordinates (2, 3) representing the third image unit in the second row. At least one direction identifier can be right, downward, and left in sequence, and different direction identifiers can be used to represent different directions, such as 00 for right, 01 for left, 10 for downward, and 11 for upward. In summary, the area indication information can include: 2, 3, 00, 3, 10, 1, 01, 3, and end marker in sequence. Based on the above region indication information, the first image unit (the third image unit in the second row) is found using the starting coordinates (2, 3). The second image unit (the fourth image unit in the second row), the third image unit (the fifth image unit in the second row), and the fourth image unit (the sixth image unit in the second row) are found using "00" and a length of 3 (indicating three consecutive image units). The fifth image unit (the sixth image unit in the third row) is found using "10" and a length of 1. The sixth image unit (the fifth image unit in the third row), the seventh image unit (the fourth image unit in the third row), and the eighth image unit (the third image unit in the third row) are found using "01" and a length of 3. The end marker indicates that the indication of multiple image units has been completed. Thus, eight image units are obtained, and the region category identifiers corresponding to these eight image units can be determined. That is, only one region category identifier needs to be transmitted to simultaneously obtain the region category identifiers corresponding to all eight image units.

[0248] To sum up, the area category identifier corresponding to the image unit can be described in the form of a drawing. In this case, an additional end mark is required to indicate the end of the formal description. For example, the starting coordinates, direction identifier and end mark can be indicated by the area indication information, or the starting coordinates, direction identifier, the length corresponding to the direction identifier and the end mark can be indicated by the area indication information.

[0249] In the above embodiment, the preset origin can correspond to any image unit among all the image units. For example, when the preset origin is 0, it represents the first image unit among all the image units; when the preset origin is 1, it represents the second image unit among all the image units, and so on. The encoding end can encode the information of the preset origin in the code stream (used to indicate which image unit in the current image is used as the preset origin), and the decoding end decodes the preset origin information from the code stream, and then knows which image unit in the current image is used as the preset origin. Alternatively, the preset origin can be a default origin, such as the first image unit as the preset origin. Alternatively, the preset origin can be the upper left corner point of the preset M*N rectangular division (that is, the upper left corner image unit is used as the preset origin), wherein the preset M*N rectangular division can include but is not limited to LCU division, of course, it can also be CU division, and it can also be divided in other ways, without limitation.

[0250] For example, the current image can be divided into multiple LCUs, each LCU can be a rectangle of size M*N, M can be greater than or equal to the minimum size of the coding unit, N can be greater than or equal to the minimum size of the coding unit, on this basis, the upper left corner point of the preset LCU (that is, the image unit in the upper left corner is used as the preset origin) can be used as the preset origin. Assuming that the image units corresponding to the area category identifier are all located in LCU1, the upper left corner point of LCU1 is used as the preset origin. Assuming that the image units corresponding to the area category identifier are all located in LCU2, the upper left corner point of LCU2 is used as the preset origin, and so on.

[0251] For example, see Figure 5 As shown, assuming that the image units corresponding to each area category identifier (such as 0, 1, 2, etc.) are all located in the black rectangular frame, the upper left corner point of the black rectangular frame can be used as the preset origin, that is, the information of the external rectangular frame can be transmitted first, and then the above-mentioned internal area characterization can be performed.

[0252] In a possible implementation, the decoding end may also determine a target shape surrounded by multiple image units indicated by the region indication information, so that the region category identifier may be determined as the region category identifier corresponding to the image units within the target shape. Figure 8 As shown, the area indication information is used to indicate 16 image units corresponding to 16 ones, such as indicating these 16 image units through the starting point coordinates under a preset origin, at least one direction identifier, the length corresponding to each direction identifier, and an end mark. After obtaining the area indication information, the decoding end can determine the 16 image units indicated by the area indication information, and then determine the target shape (i.e., a rectangular area) surrounded by these 16 image units. In this way, the area category identifier can be determined as the area category identifier corresponding to all image units within the target shape, that is, the area category identifier can be determined as the area category identifier corresponding to 25 image units.

[0253] For the encoding end and the decoding end, after obtaining the region category identifier corresponding to each image unit (see the above-mentioned acquisition method of Example 14), when encoding or decoding the current coding unit, the region category identifier corresponding to the image unit covered by the current coding unit can be determined. If the current coding unit covers only one image unit, the region category corresponding to the region category identifier corresponding to the image unit is determined as the current region category corresponding to the current coding unit. If the current coding unit covers multiple image units, based on the region category identifier corresponding to each image unit covered by the current coding unit, the region category corresponding to the highest authority level in the region category identifier can be determined as the current region category corresponding to the current coding unit.

[0254] In a possible implementation, for Examples 1 to 14, all involve area categories corresponding to image areas. On this basis, a default area can also be set. For example, if a rectangular area is used to depict area location information, other areas outside the rectangular area can be used as default areas. If a circular area is used to depict area location information, other areas outside the circular area can be used as default areas. If both rectangular area depiction and circular area depiction are used, other areas outside the rectangular area and the circular area can be used as default areas. For the default area, if the current coding unit corresponds to the default area, the current area category corresponding to the current coding unit is the default area category, which is used to indicate that the area where the current coding unit is located does not require permission protection.

[0255] Example 15: Example 15 is used to implement the transmission hierarchy in regional characterization. Several syntaxes can be used to transmit the permission area, and the identification and transmission can be performed at the sequence level, sequence-level extended data, image level, image-level extended data, Slice level, Tile level, Patch level, LCU level, etc. Among them, the syntax used to manage or control several images can be called sequence level or sequence-level extended data; the syntax used to manage or control a single-frame image can be called image level or image-level extended data; the syntax used to manage or control a parallel unit (i.e., an image area) including several coding units can be called Slice level, Tile level, or Patch level; the syntax used to manage or control the maximum coding unit can be called LCU level; the syntax used to manage or control the control unit can be called control unit level. A control unit can include multiple maximum coding units, and a maximum coding unit can also include multiple control units. For example, in Examples 1 to 14, the upper-layer unit syntax of the current coding unit is involved, and the upper-layer unit may include but is not limited to: the LCU, Patch, Slice, Tile, image, sequence, etc. where the current coding unit is located, and there is no restriction on this. To summarize, the sequence-level syntax may be used as the upper-layer unit syntax of the current coding unit to transmit the information in the above-mentioned embodiments; or, the sequence-level extended data syntax may be used as the upper-layer unit syntax of the current coding unit to transmit the information in the above-mentioned embodiments; or, the image-level syntax may be used as the upper-layer unit syntax of the current coding unit to transmit the information in the above-mentioned embodiments; or, the image-level extended data syntax may be used as the upper-layer unit syntax of the current coding unit to transmit the information in the above-mentioned embodiments; or, the slice-level syntax may be used as the upper-layer unit syntax of the current coding unit to transmit the information in the above-mentioned embodiments; or, the tile-level syntax may be used as the upper-layer unit syntax of the current coding unit to transmit the information in the above-mentioned embodiments; or, the patch-level syntax may be used as the upper-layer unit syntax of the current coding unit to transmit the information in the above-mentioned embodiments; or, the LCU-level syntax may be used as the upper-layer unit syntax of the current coding unit to transmit the information in the above-mentioned embodiments.

[0256] Illustratively, the above embodiments can be implemented individually or in combination. For example, each of Embodiments 1 to 15 can be implemented individually, and at least two of Embodiments 1 to 15 can be implemented in combination. Illustratively, in the above embodiments, the content of the encoding end can also be applied to the decoding end, i.e., the decoding end can be processed in the same manner, and the content of the decoding end can also be applied to the encoding end, i.e., the encoding end can be processed in the same manner. These details will not be repeated here.

[0257] Based on the same application concept as the above method, an embodiment of the present application further proposes an image decoding device, which is applied to a decoding end and includes: a memory configured to store video data; a decoder configured to implement the decoding methods in the above embodiments 1 to 15, that is, the processing flow of the decoding end. For example, in one possible implementation, the decoder is configured to implement:

[0258] When enabling permission protection, determining one or more target area categories corresponding to a target permission level;

[0259] The current coding unit is decoded according to the target region category.

[0260] Based on the same application concept as the above method, an embodiment of the present application further proposes an image encoding device, which is applied to an encoding end and includes: a memory configured to store video data; an encoder configured to implement the encoding methods in the above embodiments 1 to 15, that is, the processing flow of the encoding end. For example, in one possible implementation, the encoder is configured to implement:

[0261] When enabling permission protection, determining one or more target area categories; wherein the target area categories are area categories corresponding to the first permission level and not corresponding to the second permission level;

[0262] The current coding unit is encoded according to the target region category.

[0263] Based on the same application concept as the above method, the decoding end device (also called video decoder) provided in the embodiment of the present application, from the hardware level, its hardware architecture diagram can be specifically referred to as Figure 9A As shown. It includes: a processor 911 and a machine-readable storage medium 912, the machine-readable storage medium 912 storing machine-executable instructions (image decoding instructions) that can be executed by the processor 911; the processor 911 is used to execute the machine-executable instructions to implement the image decoding methods of the above-mentioned embodiments 1 to 15 of the present application.

[0264] Based on the same application concept as the above method, the encoding end device (also called video encoder) provided in the embodiment of the present application, from the hardware level, its hardware architecture diagram can be specifically referred to as Figure 9B As shown. It includes: a processor 921 and a machine-readable storage medium 922, the machine-readable storage medium 922 storing machine-executable instructions (image encoding instructions) that can be executed by the processor 921; the processor 921 is used to execute the machine-executable instructions to implement the image encoding methods of the above-mentioned embodiments 1 to 15 of the present application.

[0265] Based on the same application concept as the above method, an embodiment of the present application also provides a machine-readable storage medium, on which a number of computer instructions are stored. When the computer instructions are executed by a processor, the method disclosed in the above example of the present application can be implemented, such as the image decoding method or the image encoding method in the above embodiments.

[0266] Based on the same application concept as the above method, an embodiment of the present application further provides a computer application, which, when executed by a processor, can implement the image decoding method or image encoding method disclosed in the above example of the present application.

[0267] Based on the same application concept as the above method, an image decoding device is also proposed in an embodiment of the present application. The device is applied to the decoding end, and the device includes: a processing module, which is used to determine one or more target area categories corresponding to the target permission level when permission protection is enabled; and a decoding module, which is used to decode the current coding unit according to the target area category.

[0268] Exemplarily, when decoding the current coding unit according to the target region category, the decoding module is specifically configured to: when decoding the current coding unit, if the target region category exists in one or more current region categories corresponding to the current coding unit, decode a first bitstream corresponding to the current coding unit, the first bitstream including high-dimensional reconstruction information of the current coding unit; and reconstruct the current coding unit based on the high-dimensional reconstruction information.

[0269] Exemplarily, when the decoding module decodes the current coding unit according to the target area category, it is specifically used to: when decoding the current coding unit, if the target area category does not exist in one or more current area categories corresponding to the current coding unit, reconstruct the current coding unit based on low-dimensional reconstruction information.

[0270] Exemplarily, the low-dimensional reconstruction information is obtained by decoding a second code stream corresponding to the current coding unit; wherein the first code stream is a decrypted code stream; and the second code stream is a non-decrypted code stream.

[0271] Exemplarily, the processing module is further configured to determine whether to enable permission protection if the switch control information allows the enabling of permission protection. The switch control information includes switch control information at the sequence level or sequence-level extended data; or switch control information at the image level or image-level extended data; or switch control information at the slice level; or switch control information at the tile level; or switch control information at the patch level; or switch control information at the LCU level; or switch control information at the control unit level.

[0272] Exemplarily, if there are multiple levels of switch control information, the decoding module is further used to decode the switch control information of the previous level; if the switch control information of the previous level does not allow the activation of permission protection, it is determined that permission protection is not enabled; if the switch control information of the previous level allows the activation of permission protection, the switch control information of the next level is decoded; if the switch control information of the next level does not allow the activation of permission protection, it is determined that permission protection is not enabled; if the switch control information of the next level allows the activation of permission protection, and the switch control information of the next level is the last level of switch control information, it is determined that permission protection is enabled.

[0273] Exemplarily, the processing module is further used to obtain a region category identifier and one or more region location information corresponding to the region category identifier; for a current coding unit corresponding to the region location information, the region category corresponding to the region category identifier is determined as the current region category corresponding to the current coding unit.

[0274] Exemplarily, the processing module is also used to obtain the total number of image areas corresponding to the area category identifier; when the processing module obtains one or more area location information corresponding to the area category identifier, it is specifically used to: obtain the total number of image areas corresponding to the area category identifier and the area location information; wherein, the total number of image areas is not greater than a preset number threshold.

[0275] Exemplarily, when the processing module obtains the region category identifier and one or more region location information corresponding to the region category identifier, it is specifically used to: decode the region category identifier and one or more region location information corresponding to the region category identifier from the upper-layer unit syntax of the current coding unit; when the processing module obtains the total number of image regions corresponding to the region category identifier, it is specifically used to: decode the total number of image regions corresponding to the region category identifier from the upper-layer unit syntax of the current coding unit.

[0276] Exemplarily, the area location information is the area location information of a polygonal area, a rectangular area, or a circular area; for polygonal areas and rectangular areas, the area location information includes at least one vertex coordinate under a preset origin; for a circular area, the area location information includes the center coordinates and radius of the circular area under the preset origin.

[0277] Exemplarily, multiple image units are arranged in a preset scanning order, and the area position information includes a starting image unit index and an ending image unit index at a preset origin; or, the area position information includes a starting image unit index at a preset origin and the total number of image units in the current area; or, the area position information includes an ending image unit index at a preset origin and the total number of image units in the current area.

[0278] Exemplarily, if the region category identifier corresponds to multiple region position information, the ending image unit of the previous region position information is used as the preset origin corresponding to the current region position information.

[0279] Exemplarily, the image unit is a coding unit, or the image unit is an A*B image unit divided according to a preset division method; wherein A is greater than or equal to the minimum size of the coding unit, and B is greater than or equal to the minimum size of the coding unit.

[0280] Exemplarily, the processing module is further used to obtain a merge identifier corresponding to the area category identifier, and the merge identifier is used to indicate whether there is an associated area category identifier for a merge operation with the area category identifier; if the merge identifier is used to indicate the existence of an associated area category identifier for a merge operation with the area category identifier, then the associated area category identifier corresponding to the area category identifier is obtained.

[0281] Exemplarily, the processing module is further configured to determine, for a coding unit corresponding to the region position information corresponding to the associated region category identifier, the region category corresponding to the region category identifier and the region category corresponding to the associated region category identifier as the region category corresponding to the coding unit.

[0282] Exemplarily, the permission level corresponding to the associated area category identifier is equal to the permission level corresponding to the area category identifier; or, the permission level corresponding to the associated area category identifier is lower than the permission level corresponding to the area category identifier.

[0283] Exemplarily, the processing module is further used to obtain the total number of category identifiers corresponding to the associated area category identifier; when the processing module obtains the associated area category identifier corresponding to the area category identifier, it is specifically used to: obtain the total number of category identifiers corresponding to the area category identifier, that is, associated area category identifiers.

[0284] Exemplarily, when the processing module obtains the merge identifier corresponding to the area category identifier, it is specifically used to: decode the merge identifier corresponding to the area category identifier from the upper-level unit syntax of the current coding unit; when the processing module obtains the associated area category identifier corresponding to the area category identifier, it is specifically used to: decode the associated area category identifier corresponding to the area category identifier from the upper-level unit syntax of the current coding unit; when the processing module obtains the total number of category identifiers corresponding to the associated area category identifier, it is specifically used to: decode the total number of category identifiers corresponding to the associated area category identifier from the upper-level unit syntax of the current coding unit.

[0285] Exemplarily, the processing module is also used to obtain the area category identifier corresponding to each image unit; based on the area category identifier corresponding to the image unit covered by the current coding unit, the area category corresponding to the highest authority level in the area category identifier is determined as the current area category corresponding to the current coding unit.

[0286] Exemplarily, when the processing module obtains the area category identifier corresponding to each image unit, it is specifically used to: obtain the area category identifier and area indication information, the area indication information is used to indicate multiple image units, and determine the area category identifier as the area category identifier corresponding to the multiple image units; wherein the area indication information includes the starting point coordinates under a preset origin, at least one direction identifier, the length corresponding to each direction identifier and an end mark; wherein the starting point coordinates are used to indicate the image unit corresponding to the area category identifier, the direction identifier is used to indicate the direction of image units belonging to the same area category, the length corresponding to each direction identifier is used to indicate the number of image units belonging to the same area category in the direction, and the end mark is used to indicate that the indication of multiple image units has been completed.

[0287] Exemplarily, the length corresponding to each direction identifier is fixed to 1.

[0288] Exemplarily, when the processing module obtains the area category identifier corresponding to each image unit, it is specifically used to: determine the target shape surrounded by multiple image units indicated by the area indication information; and determine the area category identifier as the area category identifier corresponding to the image unit within the target shape.

[0289] Exemplarily, the preset origin is the upper left corner of a preset M*N rectangular partition, or the preset origin is obtained by decoding a bitstream, wherein the preset M*N rectangular partition is an LCU partition.

[0290] Exemplarily, when the processing module obtains the region category identifier corresponding to each image unit, it is specifically configured to: decode the region category identifier corresponding to each image unit from the upper-layer unit syntax of the current coding unit.

[0291] Exemplarily, the upper layer unit is an LCU, a Patch, a Slice, a Tile, an image, or a sequence where the current coding unit is located.

[0292] Exemplarily, when the processing module determines one or more target area categories corresponding to the target authority level, it is specifically used to: query the mapping relationship between the target authority level and the candidate authority level, obtain the area categories corresponding to the target authority level and the candidate authority level, and determine the area categories corresponding to the target authority level and the candidate authority level as the target area categories corresponding to the target authority level; wherein the candidate authority level is an authority level lower than the target authority level; the mapping relationship includes the correspondence between the authority level and the area category.

[0293] Based on the same application concept as the above method, an image encoding device is also proposed in an embodiment of the present application, which is applied to the encoding end, and the device includes: a processing module, which is used to determine one or more target area categories when permission protection is enabled; wherein, the target area category is an area category corresponding to the first permission level and not corresponding to the second permission level; an encoding module, which is used to encode the current encoding unit according to the target area category.

[0294] Exemplarily, when encoding the current coding unit according to the target region category, the encoding module is specifically configured to: when encoding the current coding unit, if the target region category exists in one or more current region categories corresponding to the current coding unit, encode a first bitstream and a second bitstream corresponding to the current coding unit, where the first bitstream includes high-dimensional reconstruction information of the current coding unit, and the second bitstream includes low-dimensional reconstruction information of the current coding unit.

[0295] Those skilled in the art will appreciate that embodiments of the present application may be provided as methods, systems, or computer program products. The present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Embodiments of the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0296] The foregoing is merely an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included within the scope of the claims of the present application.

Claims

1. An image decoding method, characterized in that: The method comprises: When enabling permission protection, determining one or more target area categories corresponding to a target permission level; Obtaining a region category identifier and one or more region location information corresponding to the region category identifier; for a current coding unit corresponding to the region location information, determining the region category corresponding to the region category identifier as a current region category corresponding to the current coding unit; A current coding unit is decoded according to the target region category and the current region category.

2. The method according to claim 1, characterized in that Before obtaining the one or more area location information corresponding to the area category identifier, the method further includes: obtaining the total number of image areas corresponding to the area category identifier; The acquiring one or more area position information corresponding to the area category identifier includes: acquiring a total number of area position information of the image areas corresponding to the area category identifier; The total number of image regions is no greater than a preset number threshold.

3. The method according to claim 1 or 2, characterized in that The acquiring the region category identifier and the one or more region location information corresponding to the region category identifier comprises: decoding the region category identifier and the one or more region location information corresponding to the region category identifier from an upper layer unit syntax of the current coding unit; The acquiring the total number of image areas corresponding to the area category identifier includes: decoding the total number of image areas corresponding to the area category identifier from an upper layer unit syntax of the current coding unit.

4. The method according to claim 1 or 2, characterized in that The area position information is a rectangular area, and the area position information includes at least one vertex coordinate relative to a preset origin; The preset origin is the upper left corner of a preset M*N rectangular partition, and the preset M*N rectangular partition is an LCU partition; or the preset origin is obtained by decoding a bit stream.

5. The method according to claim 1, characterized in that The decoding of the current coding unit according to the target region category and the current region category includes: When decoding the current coding unit, if the target region category exists in one or more current region categories corresponding to the current coding unit, decoding a first bitstream corresponding to the current coding unit, where the first bitstream includes high-dimensional reconstruction information of the current coding unit; The current coding unit is reconstructed based on the high-dimensional reconstruction information.

6. The method according to claim 5, characterized in that The decoding of the current coding unit according to the target region category and the current region category includes: If the target region category does not exist in one or more current region categories corresponding to the current coding unit, reconstructing the current coding unit based on the low-dimensional reconstruction information; The low-dimensional reconstruction information is obtained by decoding the second bit stream corresponding to the current coding unit; Wherein, the first code stream is a code stream obtained through decryption; The second code stream is a code stream that has not been decrypted.

7. The method according to claim 1, characterized in that The method further comprises: If the switch control information allows enabling rights protection, it is determined to enable rights protection; wherein the switch control information includes sequence-level switch control information; or image-level switch control information.

8. An image coding method, characterized in that: The method comprises: When enabling permission protection, determine one or more target area categories; Obtaining a region category identifier and one or more region location information corresponding to the region category identifier; for a current coding unit corresponding to the region location information, determining the region category corresponding to the region category identifier as a current region category corresponding to the current coding unit; A current coding unit is encoded according to the target region category and the current region category.

9. An image decoding device, characterized in that: The device comprises: a processing module configured to, when enabling permission protection, determine one or more target region categories corresponding to a target permission level; obtain a region category identifier and one or more region location information corresponding to the region category identifier; and, for a current coding unit corresponding to the region location information, determine the region category corresponding to the region category identifier as a current region category corresponding to the current coding unit; A decoding module is configured to decode a current coding unit according to the target region category and the current region category.

10. An image encoding device, characterized in that The device comprises: a processing module configured to, when enabling rights protection, determine one or more target region categories; obtain a region category identifier and one or more region location information corresponding to the region category identifier; and, for a current coding unit corresponding to the region location information, determine the region category corresponding to the region category identifier as a current region category corresponding to the current coding unit; An encoding module is configured to encode a current coding unit according to the target region category and the current region category.

11. An image decoding device, characterized in that: include: a processor and a machine-readable storage medium storing machine-executable instructions capable of being executed by the processor; The processor is configured to execute machine-executable instructions to implement the method according to any one of claims 1 to 7.

12. An image encoding device, characterized in that include: a processor and a machine-readable storage medium storing machine-executable instructions capable of being executed by the processor; The processor is configured to execute machine-executable instructions to implement the method of claim 8.

13. A machine-readable storage medium, characterized in that The machine-readable storage medium stores a plurality of computer instructions, and when the computer instructions are executed by a processor, the method according to any one of claims 1 to 7 is implemented, or the method according to claim 8 is implemented.

Citation Information

Patent Citations

  • Method and device for processing and accessing images

    CN105491443A

  • Picture management method and device and electronic equipment

    CN111400745A

  • An encoding / decoding method, apparatus, and electronic device

    CN113453012A

  • Video frame coding method and device, electronic equipment and storage medium

    CN113473138A

  • Video image reconstruction method and device, computer equipment and storage medium

    CN114079782A