Decoding method, coding method, device, decoding end and coding end

By determining the prediction mode of the transform layer at the decoding and encoding ends in point cloud compression and avoiding redundant tag transmission, the resource waste and complexity problems caused by the transmission of prediction mode information are solved, and the coding efficiency is improved.

CN120835153APending Publication Date: 2025-10-24VIVO MOBILE COMM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410457792.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-16
Publication Date
2025-10-24

AI Technical Summary

Technical Problem

In the existing technology, there is redundancy in the transmission of prediction mode information in point cloud compression, which leads to waste of transmission resources and increased coding complexity.

Method used

The decoding end and the encoding end avoid transmitting redundant tags in some cases by determining the prediction mode of the transform layer. For example, when the transform layer is an upper layer or a lower layer that does not allow weighted prediction, the prediction mode is directly inferred, and the encoding end does not carry redundant tags in the corresponding case.

Benefits of technology

It improves coding efficiency, reduces transmission resource waste, and reduces coding complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120835153A_ABST
    Figure CN120835153A_ABST
Patent Text Reader

Abstract

The invention discloses a decoding method and device, a coding method and device, a decoding end and a coding end, and belongs to the technical field of communication, and the decoding method comprises the steps that the decoding end decodes an obtained first code stream; under the condition that the transformation layer of the first code stream is an upper layer, determining that the transformation layer uses an intra-frame layer prediction mode; or, under the condition that the transformation layer of the first code stream is a lower layer and weighted prediction is not allowed, determining that the transformation layer uses an inter-frame layer prediction mode.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of communication, and particularly relates to a decoding method, an encoding method, a device, a decoding end and an encoding end. BACKGROUND

[0002] In a geometry-based point cloud compression (PCC) encoder framework, the geometry information and attribute information of a point cloud are encoded separately. The geometry information is first encoded, and then the attribute information is encoded using the reconstructed geometry information.

[0003] There are mainly two kinds of attribute information encoding methods, which are a region-adaptive hierarchical transform (RAHT) and a prediction and lifting transform based on a level of detail (LOD) division. The entire RAHT transform layer is divided into three layers, which are an upper layer, a middle layer and a lower layer.

[0004] After the encoding end determines the prediction mode used by the transform layer, the encoding end needs to encode and transmit the prediction mode used by the transform layer to the decoding end. However, the existing mode of transmitting the prediction mode information has redundant information transmission, which causes waste of transmission resources and affects the encoding efficiency. SUMMARY

[0005] Embodiments of the present application provide a decoding method, an encoding method, a device, a decoding end and an encoding end, which can solve the problems of transmission resource waste and increased encoding complexity caused by the existing prediction mode information transmission.

[0006] In a first aspect, a decoding method is provided, and the method comprises:

[0007] The decoding end decodes the obtained first code stream;

[0008] In a case where a transform layer of the first code stream is an upper layer, it is determined that the transform layer uses an intra-layer prediction mode; or,

[0009] In a case where the transform layer of the first code stream is a lower layer and weighted prediction is not allowed, it is determined that the transform layer uses an inter-layer prediction mode.

[0010] In a second aspect, an encoding method is provided, and the method comprises:

[0011] The encoding end sends a first code stream to a decoding end;

[0012] In a case where a transform layer of the first code stream is an upper layer and a prediction mode corresponding to the transform layer is a layer-based prediction mode, the first code stream does not carry a second flag; or,

[0013] In a case where the transform layer of the first bitstream is an upper layer and a case where the transform layer uses a layer-based prediction mode, the first bitstream does not carry the second flag.

[0014] The second flag is used to indicate whether the transform layer is an intra prediction layer or an inter prediction layer.

[0015] In a third aspect, a decoding apparatus is provided, which is applied to a decoding end and includes:

[0016] A decoding module is configured to decode the obtained first bitstream.

[0017] In a case where the transform layer of the first bitstream is an upper layer, the first determining module is configured to determine that the transform layer uses an intra layer prediction mode; or in a case where the transform layer of the first bitstream is a lower layer and weighted prediction is not allowed, the first determining module is configured to determine that the transform layer uses an inter layer prediction mode.

[0018] In a fourth aspect, an encoding apparatus is provided, which is applied to an encoding end and includes:

[0019] A sending module is configured to send a first bitstream to a decoding end.

[0020] In a case where the transform layer of the first bitstream is an upper layer and a case where the transform layer uses a layer-based prediction mode, the first bitstream does not carry the second flag; or

[0021] In a case where the transform layer of the first bitstream is a lower layer and weighted prediction is not allowed, and a case where the transform layer uses a layer-based prediction mode, the first bitstream does not carry the second flag.

[0022] The second flag is used to indicate whether the transform layer is an intra prediction layer or an inter prediction layer.

[0023] In a fifth aspect, an electronic device is provided, which includes a processor and a memory. The memory stores programs or instructions that can be run on the processor. When the programs or instructions are executed by the processor, the steps of the method according to the first aspect or the steps of the method according to the second aspect are implemented.

[0024] In a sixth aspect, an electronic device is provided, including a processor and a communication interface, wherein, in a case that the electronic device is a decoding end, the processor is configured to decode a first bitstream obtained; in a case that a transform layer of the first bitstream is an upper layer, it is determined that the transform layer uses an intra-layer prediction mode; or, in a case that the transform layer of the first bitstream is a lower layer and weighted prediction is not allowed, it is determined that the transform layer uses an inter-layer prediction mode; or, in a case that the electronic device is a coding end, the communication interface is configured to send the first bitstream to a decoding end; in a case that the transform layer of the first bitstream is an upper layer and a prediction mode corresponding to the transform layer is a layer-based prediction mode, the first bitstream does not carry a second flag; or, in a case that the transform layer of the first bitstream is a lower layer and weighted prediction is not allowed and the prediction mode corresponding to the transform layer is a layer-based prediction mode, the first bitstream does not carry the second flag.

[0025] The second flag is used to indicate that the transform layer is an intra-prediction layer or an inter-prediction layer.

[0026] In a seventh aspect, an electronic device is provided, including a memory configured to store video data, and a processing circuit configured to implement steps of the method according to the first aspect or steps of the method according to the second aspect.

[0027] In an eighth aspect, a readable storage medium is provided, the readable storage medium stores a program or instructions, the program or instructions are executed by a processor to implement steps of the method according to the first aspect or steps of the method according to the second aspect.

[0028] In a ninth aspect, a coding system is provided, including a coding end device and a decoding end device, the decoding end device can be used to execute steps of the method according to the first aspect, and the coding end device can be used to execute steps of the method according to the second aspect.

[0029] In a tenth aspect, a chip is provided, the chip includes a processor and a communication interface, the communication interface and the processor are coupled, the processor is configured to run a program or instructions to implement steps of the method according to the first aspect or steps of the method according to the second aspect.

[0030] In an eleventh aspect, a computer program / program product is provided, the computer program / program product is stored in a storage medium, the program / program product is executed by at least one processor to implement steps of the method according to the first aspect or steps of the method according to the second aspect.

[0031] In the embodiment of the present application, the decoding end decodes the acquired first code stream, and in the case that the transform layer of the first code stream is an upper layer or a lower layer which does not allow weighted prediction, the decoding end can directly infer the prediction mode used by the transform layer, so as to achieve the purpose of improving decoding efficiency. BRIEF DESCRIPTION OF DRAWINGS

[0032] Figure 1 A schematic diagram of a coding system provided by an embodiment of the present application is shown;

[0033] Figure 2a An encoding flowchart performed by an encoder based on an AVS-PCC encoding framework is shown;

[0034] Figure 2b An encoding flowchart performed by an encoder based on an MPEG G-PCC encoding framework is shown;

[0035] Figure 3a A decoding flowchart performed by a decoder based on an AVS-PCC decoding framework is shown;

[0036] Figure 3b A decoding flowchart performed by a decoder based on an MPEG G-PCC decoding framework is shown;

[0037] Figure 4 A step flowchart of a decoding method provided by an embodiment of the present application is shown;

[0038] Figure 5 A step flowchart of an encoding method provided by an embodiment of the present application is shown;

[0039] Figure 6 A structural schematic diagram of a decoding apparatus provided by an embodiment of the present application is shown;

[0040] Figure 7 A structural schematic diagram of an encoding apparatus provided by an embodiment of the present application is shown;

[0041] Figure 8 A structural schematic diagram of an electronic device provided by an embodiment of the present application is shown;

[0042] Figure 9 A structural schematic diagram of a terminal provided by an embodiment of the present application is shown. DETAILED DESCRIPTION

[0043] The technical solutions in the embodiments of the present application will be clearly described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art belong to the scope of protection of the present application.

[0044] The terms "first", "second", and the like in the present application are used to distinguish similar objects, and are not used to describe a particular order or sequence. It should be understood that the terms used in this way can be interchanged as appropriate, so that the embodiments of the present application can be implemented in an order other than that illustrated or described herein, and the objects distinguished by "first", "second" are generally of a kind and do not limit the number of objects, for example, the first object can be one or more. In addition, "or" in the present application means at least one of the connected objects. For example, "A or B" covers three scenarios, namely, scenario one: including A and not including B; scenario two: including B and not including A; scenario three: including A and including B. The character " / " generally represents that the objects before and after are in an "or" relationship.

[0045] Before introducing the technical solutions provided by the embodiments of the present application, the meanings of some terms therein will be introduced first.

[0046] Point cloud: The point cloud refers to a set of discrete points that are irregularly distributed in space and express the spatial structure and surface attributes of a three-dimensional object or a three-dimensional scene. The point cloud can be divided into different categories according to different classification standards. For example, according to the acquisition method, it can be divided into dense point cloud and sparse point cloud; for another example, according to the time sequence type, it can be divided into static point cloud and dynamic point cloud.

[0047] Point cloud data: The geometric coordinate information and attribute information possessed by each point in the point cloud together constitute the point cloud data. The geometric coordinate information can also be referred to as three-dimensional position information, and the geometric coordinate information of a point in the point cloud refers to the spatial coordinates (x, y, z) of the point, which can include the coordinate values of the point in each coordinate axis direction of the three-dimensional coordinate system, for example, the coordinate value x in the X-axis direction, the coordinate value y in the Y-axis direction, and the coordinate value z in the Z-axis direction. The attribute information of a point in the point cloud can include at least one of the following: color information, material information, and laser reflection intensity information (also referred to as reflectivity). Generally, each point in the point cloud has the same number of attribute information, for example, each point in the point cloud can have two attribute information of color information and laser reflection intensity, and for another example, each point in the point cloud can have three attribute information of color information, material information, and laser reflection intensity information.

[0048] Point Cloud Compression (PCC): Point Cloud Compression refers to a process of encoding geometry coordinate information and attribute information of each point in a point cloud to obtain a compressed bitstream. Point Cloud Compression can include two main processes of geometry coordinate information encoding and attribute information encoding. At present, a point cloud compression framework that can compress a point cloud can be a Geometry Point Cloud Compression (G-PCC) codec framework provided by Moving Picture Experts Group (MPEG) or a Video Point Cloud Compression (V-PCC) codec framework, or an Audio Video Standard (AVS)-PCC codec framework provided by AVS.

[0049] Point Cloud Decoding: Point Cloud Decoding refers to a process of decoding a compressed bitstream obtained by point cloud encoding to reconstruct a point cloud. In detail, it refers to a process of reconstructing geometry coordinate information and attribute information of each point in a point cloud based on geometry bitstream and attribute bitstream in the compressed bitstream. After obtaining the compressed bitstream at the decoding end, for the geometry bitstream, first, entropy decoding is performed to obtain quantized information of each point in the point cloud, and then dequantization is performed to reconstruct the geometry coordinate information of each point in the point cloud. For the attribute bitstream, first, entropy decoding is performed to obtain quantized attribute residual information or quantized transform coefficients of each point in the point cloud; then, dequantization is performed on the quantized attribute residual information to obtain reconstructed residual information, and dequantization is performed on the quantized transform coefficients to obtain reconstructed transform coefficients; the reconstructed transform coefficients are subjected to inverse transformation to obtain reconstructed residual information; and according to the reconstructed residual information of each point in the point cloud, the attribute information of each point in the point cloud can be reconstructed. The reconstructed attribute information of each point in the point cloud is sequentially and one-to-one corresponding to the reconstructed geometry coordinate information to reconstruct the point cloud.

[0050] Figure 1 FIG. 1 is a schematic diagram of a coding system 10 provided by an embodiment of the present application. The technical solution of the embodiment of the present application relates to coding (CODEC) of point cloud data (including encoding or decoding).

[0051] As Figure 1As shown, the coding system 10 includes a source device 100 that provides encoded point cloud data to be decoded and displayed by a destination device 110. In particular, the source device 100 provides the point cloud data to the destination device 110 via a communication medium 120. The source device 100 and the destination device 110 can comprise any one or more of a desktop computer, a notebook (i.e., laptop) computer, a tablet computer, a set-top box, a mobile telephone, a wearable device (e.g., a smart watch or a wearable camera), a television, a camera, a display device, a vehicle-mounted device, a virtual reality (VR) device, an augmented reality (AR) device, a mixed reality (MR) device, a digital media player, a video gaming console, a video conferencing device, a video streaming device, a broadcast receiver device, a broadcast transmitter device, a spacecraft, an airplane, a robot, a satellite, etc.

[0052] In Figure 1 the example, the source device 100 includes a data source 101, a memory 102, an encoder 200, and an output interface 104. The destination device 110 includes an input interface 111, a decoder 300, a memory 113, and a display device 114. The source device 100 represents an example of an encoding device, while the destination device 110 represents an example of a decoding device. In other examples, the source device 100 and the destination device 110 can not include some of the components shown in FIG. 1, or can include other components not shown in FIG. 1. For example, the source device 100 can acquire point cloud data through an external capture device. Also, the destination device 110 can interface with an external display device, rather than including an integrated display device. For another example, the memory 102, the memory 113 can be external memories. Figure 1 Figure 1 Although

[0053] Although Figure 1 the source device 100 and the destination device 110 are illustrated as separate devices, they can also be integrated in one device in some examples. In such embodiments, the corresponding functionalities of the source device 100 and the destination device 110 can be implemented using the same hardware or software, or using separate hardware or software, or any combination thereof.

[0054] In some examples, the source device 100 and the destination device 110 can perform unidirectional or bidirectional transmission of data. If bidirectional transmission of data is performed, the source device 100 and the destination device 110 can operate in a substantially symmetrical manner. That is, each of the source device 100 and the destination device 110 can include an encoder and a decoder.

[0055] ​Data source 101 represents a source of point cloud data (i.e., raw, uncoded point cloud data) and provides the encoder 200 with point cloud data to encode. Source device 100 can include a capture device (e.g., a camera device, a sensor device, or a scanning device), an archive including previously captured point cloud data, or a feed interface to receive point cloud data from a data content provider. The camera device can include a conventional camera, a stereo camera, a light field camera, etc., the sensor device can include a laser device, a radar device, etc., and the scanning device can include a three-dimensional laser scanning device, etc. The point cloud data can be obtained by capturing a visual scene of a real world through the capture device. Alternatively, data source 101 can generate computer graphics based data as source data, or combine real-time data, archived data, and computer generated data. For example, the data source generates point cloud data from a virtual object (e.g., a virtual three-dimensional object and a virtual three-dimensional scene obtained by three-dimensional modeling).

[0056] Encoder 200 encodes the captured, pre-captured, or computer generated data. Encoder 200 can rearrange the point cloud data from a received order (sometimes referred to as a "display order") to an encoding order. Encoder 200 can generate a bitstream including the encoded point cloud data. Source device 100 can then output the encoded point cloud data via output interface 104 onto a communication medium 120 for reception or retrieval by, for example, input interface 111 of destination device 110.

[0057] Memory 102 of source device 100 and memory 113 of destination device 110 represent general purpose memories. In some examples, memory 102 can store raw data from data source 101, and memory 113 can store decoded point cloud data from decoder 300. Additionally or alternatively, memory 102, 113 can store software instructions executable by, for example, encoder 200 and decoder 300, respectively. Although memory 102 and memory 113 are shown separately from encoder 200 and decoder 300 in this example, it should be understood that encoder 200 and decoder 300 can also include internal memories for functionally similar or equivalent purposes. If encoder 200 and decoder 300 are deployed on the same hardware device, memory 102 and memory 113 can be the same memory. Furthermore, memory 102, 113 can store, for example, encoded point cloud data output from encoder 200 and input to decoder 300. In some examples, portions of memory 102, 113 can be allocated as one or more point cloud buffers, e.g., for storing raw, decoded, or encoded point cloud data.

[0058] In some examples, source device 100 can output encoded data from output interface 104 to storage 113. Similarly, destination device 110 can access encoded data from storage 113 via input interface 111. Storage 113 or storage 102 can include any of a variety of distributed or locally accessed data storage media such as a hard drive, Blu-ray discs, Digital Versatile Discs (DVDs), Compact Disc Read-Only Memory (CD-ROMs), flash drives, volatile or non-volatile memory, or any other suitable digital storage media for storing encoded point cloud data.

[0059] Output interface 104 can include any type of medium or device capable of transmitting encoded point cloud data from source device 100 to destination device 110. For example, output interface 104 can include a transmitter or a transceiver, such as an antenna, configured to transmit encoded point cloud data from source device 100 directly to destination device 110 in real-time. The encoded point cloud data can be modulated according to a communication standard of a wireless communication protocol and transmitted to destination device 110.

[0060] Communication medium 120 can include a transitory medium, such as a wireless broadcast or wired network transmission. For example, communication medium 120 can include radio frequency (RF) spectrum or one or more physical transmission lines (e.g., cable). Communication medium 120 can form a portion of a packet-based network, such as a local area network, a wide area network, or a global network such as the Internet. Communication medium 120 can also be in a form of a storage medium, such as a non-transitory storage medium, such as a hard disk, flash drive, compact disc, digital point cloud disc, Blu-ray disc, volatile or non-volatile memory, or any other suitable digital storage media for storing encoded point cloud data.

[0061] In some embodiments, communication medium 120 can include a router, switch, base station, or any other equipment that can be used to facilitate communication from source device 100 to destination device 110. For example, a server (not shown) can receive the encoded point cloud data from source device 100 and provide to destination device 110, e.g., via a network transmission to destination device 110. The server can include a web server (e.g., for a website), a server configured to provide a file transfer protocol service such as a File Transfer Protocol (FTP) or File Delivery Over Unidirectional Transport (FLUTE) protocol, a content delivery network (CDN) device, a Hypertext Transfer Protocol (HTTP) server, a Multimedia Broadcast Multicast Services (MBMS) or evolved Multimedia Broadcast Multicast Service (eMBMS) server, or a Network-attached storage (NAS) device, etc. The server can implement one or more HTTP streaming protocols such as an MPEG Media Transport (MMT) protocol, a Dynamic Adaptive Streaming over HTTP (DASH) protocol, an HTTP Live Streaming (HLS) protocol, or a Real Time Streaming Protocol (RTSP), etc.

[0062] Destination device 110 can access the encoded point cloud data from the server, e.g., through a wireless channel (e.g., a Wi-Fi connection) or a wired connection (e.g., a Digital subscriber line (DSL), a cable modem, etc.) for accessing the encoded point cloud data stored on the server.

[0063] Output interface 104 and input interface 111 can represent wireless transmitters / receivers, modems, wired networking components (e.g., Ethernet cards), wireless communication components operating according to the IEEE 802.11 standard or the IEEE 802.15 standard (e.g., ZigBee™), the Bluetooth standard, etc., or other physical components. In examples where output interface 104 and input interface 111 comprise wireless components, output interface 104 and input interface 111 can be configured to transfer data, such as encoded point cloud data, according to WIFI, Ethernet, cellular networks (such as 4G, LTE (Long-Term Evolution), LTE-Advanced, 5G, 6G, etc.), etc.

[0064] The technology provided by embodiments of the present application can be applied to support one or more of the following application scenarios: machine perception point cloud, which can be used in autonomous navigation systems, real-time inspection systems, geographic information systems, visual sorting robots, rescue robots, etc.; human eye perception point cloud, which can be used in digital cultural heritage, free-viewpoint broadcasting, three-dimensional immersive communication, three-dimensional immersive interaction, etc.

[0065] Input interface 111 of destination device 110 receives the encoded bitstream from communication medium 120. The encoded bitstream can include high-level syntax elements and encoded data units (e.g., sequences, groups of pictures, pictures, slices, blocks, etc.) that are used to decode the encoded data units to obtain decoded point cloud data. Display device 114 displays the decoded point cloud data to a user. Display device 114 can include a cathode ray tube (CRT), a liquid-crystal display (LCD), a plasma display, an organic light-emitting diode (OLED) display, or other type of display device. In some examples, destination device 110 can not have display device 114, e.g., if the decoded point cloud data is used to determine the location of a physical object, display device 114 can be replaced by a processor.

[0066] The encoder 200 and the decoder 300 can be implemented as one or more of various processing circuitry, which can include one or more microprocessors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs), discrete logic circuitry, hardware, or any combinations thereof. When the techniques are implemented partially in software, a device can store instructions for the software in a suitable, non- transitory computer-readable storage medium and execute the instructions in hardware using one or more processors to perform the techniques of this disclosure.

[0067] The basic principles of the encoder 200 and the decoder 300 provided by the embodiments of the present application are introduced below taking the G-PCC and AVS-PCC coding framework as an example.

[0068] The coding framework of G-PCC and AVS-PCC is roughly the same. As shown in FIG. 1, the coding framework of G-PCC and AVS-PCC includes an encoder and a decoder. Figure 2a An encoding flowchart performed by an encoder based on the coding framework of AVS-PCC is shown in FIG. 2, and the encoder can be the encoder 200 shown in FIG. 1. Figure 2b An encoding flowchart performed by an encoder based on the coding framework of MPEG G-PCC is shown in FIG. 3, and the encoder can be the encoder 200 shown in FIG. 1. Figure 1 As shown in FIG. 1, the encoding framework can generally be divided into a geometry coordinate information encoding process and an attribute information encoding process. In the geometry information encoding process, the geometry coordinate information of each point in the point cloud is encoded to obtain a geometry bitstream; in the attribute information encoding process, the attribute information of each point in the point cloud is encoded to obtain an attribute bitstream; and the geometry bitstream and the attribute bitstream jointly constitute a compressed code stream of the point cloud.

[0069] For the geometry information encoding process, the encoding flow performed by the encoder 200 is as follows:

[0070] 1. Pre-processing: It can include Transform Coordinates and Voxelize. Through scaling and translation operations, pre-processing is to convert the point cloud data in three-dimensional space into an integer form and move its minimum geometry position to the coordinate origin. In some examples, the encoder 200 can not perform pre-processing.

[0071] 2、Geometry Coding: For AVS-PCC coding framework, geometry coding includes two modes, which are Octree-based geometry coding and Prediction Tree-based geometry coding. For G-PCC coding framework, geometry coding includes three modes, which are Octree-based geometry coding, Trisoup-based geometry coding and Prediction Tree-based geometry coding. Among them:

[0072] Octree-based geometry coding: Octree is a tree data structure, which uniformly divides the pre-set bounding box in three-dimensional space, and each node has eight child nodes. By using "1" and "0" to indicate whether each child node of the octree is occupied or not, the occupancy code information is obtained as the code stream of the point cloud geometry information.

[0073] Prediction Tree-based geometry coding: A prediction strategy is used to generate a prediction tree, and each node of the prediction tree is traversed from the root node. The residual coordinate value corresponding to each traversed node is encoded.

[0074] Trisoup-based geometry coding: The point cloud is divided into blocks of a certain size, and the intersection points (called vertices) of the edges of the block on the surface of the point cloud are located. The compression of the geometry information is realized by encoding whether there is an intersection point on each edge of the block and the position of the intersection point.

[0075] 3、Geometry Entropy Encoding: Statistical compression encoding is performed on the occupancy code information of the octree, the prediction residual information of the prediction tree and the vertex information of the trisoup, and finally the binary (0 or 1) compressed code stream is output. Statistical encoding is a lossless encoding method, which can effectively reduce the code rate required to express the same signal. The commonly used statistical encoding method is Content Adaptive Binary Arithmetic Coding (CABAC) based on context.

[0076] 4、Geometry Reconstruction: The geometry information after geometry coding is decoded and reconstructed.

[0077] For the attribute information coding process, the encoder 200 performs the following encoding process:

[0078] 1、Color Transformation: Apply a transform to transform the color information of the attribute to a different domain, for example, the color information can be transformed from the RGB color space to the YCbCr color space.

[0079] 2. Attribute Recoloring: In lossy coding, after the geometry coordinate information is encoded, the encoder needs to decode and reconstruct the geometry information, i.e., to restore the geometry information of each point in the point cloud. The attribute information of one or more neighboring points in the original point cloud is found and used as the attribute information of the reconstructed point.

[0080] In some examples, the encoder 200 can not perform color transformation or attribute recoloring.

[0081] 3. Attribute information processing: In AVS-PCC, attribute information processing can include three modes, namely, prediction encoding, transform encoding, and prediction and transform encoding, which can be used under different conditions.

[0082] Among them, prediction encoding refers to determining the neighbor points of the to-be-encoded point in the encoded points as prediction points according to distance or spatial relationship information, calculating the predicted attribute information of the to-be-encoded point based on the attribute information of the prediction points according to the set criteria, calculating the difference between the real attribute information of the to-be-encoded point and the predicted attribute information as attribute residual information, and quantizing, transforming (optional), and entropy encoding the attribute residual information.

[0083] Transform encoding refers to grouping and transforming attribute information using transform methods such as discrete cosine transform (DCT) and Haar transform (Haar), quantizing transform coefficients, obtaining attribute reconstruction information through inverse quantization and inverse transform, calculating the difference between the real attribute information and the attribute reconstruction information to obtain attribute residual information and quantizing it, and entropy encoding the quantized transform coefficients and attribute residual.

[0084] Prediction and transform encoding refers to using prediction to obtain attribute residual information for transform, quantizing and entropy encoding the transform coefficients.

[0085] In MPEG G-PCC, attribute information processing can include three modes, namely, prediction and transform (Prediction Transform) encoding, lifting transform (Lifting Transform) encoding, and region adaptive hierarchical transform (RegionAdaptive Hierarchical Transform, RAHT) encoding, which can be used under different conditions.

[0086] Among them, the prediction transform coding refers to dividing the point cloud into multiple different levels (Level of Detail, LoD) according to the distance selection sub-point set, realizing multi-quality level point cloud representation from rough to fine. The adjacent layers can realize top-down prediction, that is, the attribute information of the points introduced in the fine layer is predicted from the adjacent points in the rough layer, and the corresponding attribute residual information is obtained. Among them, the points at the bottom layer are encoded as reference information.

[0087] The lifting transform coding refers to introducing a weight update strategy of the neighborhood points on the basis of the LoD adjacent layer prediction, finally obtaining the predicted attribute information of each point, and obtaining the corresponding attribute residual information.

[0088] The hierarchical region adaptive transform coding refers to that the attribute information is converted into the transform domain through the RAHT transform, and the signal is referred to as a transform coefficient.

[0089] 4, attribute quantization (Attribute Quantization): The degree of quantization accuracy is usually determined by the quantization parameter. The transform coefficient or attribute residual information obtained by processing the attribute information is quantized, and the quantized result is entropy coded, for example, in the prediction transform coding and the lifting transform coding, the quantized attribute residual information is entropy coded; in the RAHT, the quantized transform coefficient is entropy coded.

[0090] 5, entropy coding (Entropy Coding): The quantized attribute residual information and / or transform coefficient is generally compressed using run length coding (Run Length Coding) and arithmetic coding (Arithmetic Coding). The corresponding coding mode, quantization parameter and other information are also encoded by the entropy encoder.

[0091] The encoder 200 encodes the geometric coordinate information of each point in the point cloud to obtain a geometric bit stream, and encodes the attribute information of each point in the point cloud to obtain an attribute bit stream. The encoder 200 can transmit the encoded geometric bit stream and attribute bit stream to the decoder 300.

[0092] Figure 3a The decoder performs a decoding process according to the decoding framework of the AVS-PCC based decoder, as shown in the following figure: Figure 3b The decoder performs a decoding process according to the decoding framework of the MPEG G-PCC based decoder, and the decoder can be Figure 1The decoder 300 is shown. After the decoder 300 receives the compressed bitstream (i.e., attribute bitstream and geometry bitstream) transmitted by the encoder 200, the geometry bitstream is decoded to reconstruct the geometry coordinate information of the points in the point cloud, and the attribute bitstream is decoded to reconstruct the attribute information of the points in the point cloud.

[0093] The decoding process performed by the decoder 300 is as follows:

[0094] 1. Entropy Decoding: The geometry bitstream and the attribute bitstream are respectively entropy decoded to obtain geometry syntax elements and attribute syntax elements.

[0095] 2. Geometry Decoding: For the AVS-PCC encoding framework, geometry decoding includes two modes, namely, octree-based geometry decoding and prediction tree-based geometry decoding. For the G-PCC encoding framework, geometry decoding includes three modes, namely, octree-based geometry decoding, trisoup-based geometry decoding, and prediction tree-based prediction decoding.

[0096] Octree-based geometry decoding: The octree is reconstructed based on the geometry syntax elements parsed from the geometry bitstream.

[0097] Prediction tree-based geometry decoding: The prediction tree is reconstructed based on the geometry syntax elements parsed from the geometry bitstream.

[0098] Trisoup-based geometry decoding: The triangle model is reconstructed based on the geometry syntax elements parsed from the geometry bitstream.

[0099] 3. Geometry Reconstruction: Reconstruction is performed to obtain the geometry coordinate information of the points in the point cloud.

[0100] 4. Coordinate Inverse Transformation: The reconstructed geometry coordinate information is inverse transformed to convert the reconstructed coordinates (positions) of the points in the point cloud from the transformed domain back to the original domain.

[0101] 5. Dequantization: The attribute syntax elements are dequantized.

[0102] 6. Attribute Information Processing: In AVS-PCC, attribute information processing determines the color information of the points in the point cloud by predicting or prediction-transforming the prediction residual or prediction residual transform coefficients after dequantization, or by transforming the transform coefficients after dequantization.

[0103] In MPEG G-PCC, attribute information processing determines the color information of the points in the point cloud by RAHT on the attribute information after dequantization, or by LOD and inverse lifting on the attribute information after dequantization.

[0104] 7. Color inverse transform: transform color information from YCbCr color space to RGB color space. In some examples, the color inverse transform operation can not be performed.

[0105] The decoding method and the encoding method provided by the embodiments of the present application are described in detail below with reference to the drawings and some embodiments and application scenarios thereof.

[0106] As shown in the figure, the present application provides a decoding method, which comprises: Figure 4

[0107] Step 401: decoding the obtained first code stream at the decoding end;

[0108] Step 402: in the case where the transform layer of the first code stream is an upper layer, determining that the transform layer uses an intra-layer prediction mode; or, in the case where the transform layer of the first code stream is a lower layer and weighted prediction is not allowed, determining that the transform layer uses an inter-layer prediction mode.

[0109] Optionally, the encoding end is encoded according to a region hierarchical adaptive transform (RAHT) encoding mode to obtain the first code stream; or, the encoding end can be encoded according to other encoding methods to obtain the first code stream, which is not limited here.

[0110] In an implementation manner, the transform layer of the encoding mode used by the encoding end is three layers, which are an upper layer, a middle layer and a lower layer respectively.

[0111] As an optional embodiment, in the case where the decoding end decodes the obtained first code stream to obtain a first flag,

[0112] In the case where the transform layer of the first code stream is an upper layer, determining that the transform layer uses an intra-layer prediction mode comprises: in the case where the transform layer of the first code stream is an upper layer and the first flag indicates that the prediction mode corresponding to the transform layer is a layer-based prediction mode, determining that the transform layer uses an intra-layer prediction mode; or,

[0113] In the case where the transform layer of the first code stream is a lower layer and weighted prediction is not allowed, determining that the transform layer uses an inter-layer prediction mode comprises: in the case where the transform layer of the first code stream is a lower layer and weighted prediction is not allowed, and the first flag indicates that the prediction mode corresponding to the transform layer is a layer-based prediction mode, determining that the transform layer uses an inter-layer prediction mode.

[0114] ​It should be noted that the "prediction mode" mentioned in the embodiments of the present application can also be referred to as "prediction method"; for example, the "inter-layer prediction mode" can also be referred to as "inter-layer prediction method"; the "intra-layer prediction mode" can also be referred to as "intra-layer prediction method"; the "prediction mode in units of layers" can also be referred to as "prediction method in units of layers"; the "prediction mode in units of nodes" can also be referred to as "prediction method in units of nodes"; and the like.

[0115] For example, the first flag can be identified by "layer_based_pred_mode_flag". The prediction mode used by the current transform layer is parsed from the first code stream, and the specific method is as follows:

[0116] First, decode layer_based_pred_mode_flag. If layer_based_pred_mode_flag = 0, it indicates that the prediction mode used by the transform layer is the prediction mode in units of nodes, and the decoding is ended. Otherwise (i.e., if layer_based_pred_mode_flag = 1), if the transform layer is an upper layer, it is inferred that the prediction mode used by the transform layer is the intra-layer prediction mode, and the decoding is ended. Or, if the transform layer is a lower layer and the layer does not allow weighted prediction, it is inferred that the prediction mode used by the transform layer is the inter-layer prediction mode.

[0117] In other words, in the case that the transform layer of the first code stream is an upper layer or a lower layer that does not allow weighted prediction, the decoding end can directly infer the prediction mode used by the transform layer when decoding the prediction mode information in the embodiments of the present application, so as to achieve the purpose of improving the decoding efficiency.

[0118] As an optional embodiment, in the case that the transform layer is a middle layer or a lower layer that allows weighted prediction, and the first flag indicates that the prediction mode corresponding to the transform layer is the prediction mode in units of layers, the method further comprises:

[0119] Decoding the first code stream to obtain a second flag;

[0120] In the case that the second flag indicates that the transform layer is an intra-layer, it is determined that the prediction mode used by the transform layer is the intra-layer prediction mode; or in the case that the second flag indicates that the transform layer is an inter-layer, it is determined that the prediction mode used by the transform layer is the inter-layer prediction mode.

[0121] For example, the second flag can be named "layer_pred_mode". In the case that the transform layer is a middle layer or a lower layer and weighted prediction is allowed, when layer_based_pred_mode_flag is 1, it means that prediction is used layer by layer, and another flag is needed to be parsed in the first bitstream to identify whether the current layer is an inter layer or an intra layer, which is identified by the second flag. When layer_pred_mode is 1, it means that the current layer is an inter layer, and further means that the transform layer uses an inter layer prediction mode. When layer_pred_mode is 0, it means that the current layer is an intra layer, and further means that the transform layer uses an intra layer prediction mode.

[0122] For example, If (layer_based_pred_mode_flag == 0)

[0123] / * nothing * / end parsing

[0124] Else

[0125] if (is upper layer)

[0126] infer as intra layer, end parsing; equivalent to layer_pred_mode = 0;

[0127] if (is lower layer and the layer does not allow weighted prediction)

[0128] infer as inter layer, end parsing; equivalent to layer_pred_mode = 1;

[0129] Otherwise, continue parsing layer_pred_mode.

[0130] In other words, in the upper layer: if layer_based_pred_mode_flag is 1: it can be directly inferred that the current layer uses an intra layer prediction mode;

[0131] In the lower layer and not allowing weighted prediction: if layer_based_pred_mode_flag is 1: it can be directly inferred that the current layer uses an inter layer prediction mode.

[0132] In the middle layer or lower layer (and allow weighting), if layer_based_pred_mode_flag is 1: indicates that the current layer uses the prediction mode in the layer unit, and further decoding layer_pred_mode is needed to determine whether it is the inter-layer prediction mode or the intra-layer prediction mode.

[0133] In order to more clearly describe the decoding method provided by the embodiments of the present application, the entire decoding process of the decoding end is described below.

[0134] First, the quantized transform coefficients or coefficient residuals in the input code stream (such as the first code stream) are entropy decoded and dequantized.

[0135] Then, the transform tree structure is constructed from bottom to top. Since the attribute decoding is after the geometry decoding, when the attribute information is decoded, the position coordinates of each point are reconstructed. The point cloud is reordered in ascending order according to the Morton order, and then the octree structure is constructed from bottom to top from the bottom layer. In the process of constructing the transform tree, the corresponding Morton code information and weight information are generated for the merged nodes.

[0136] Then, the top-down processing is performed, and the processing process includes:

[0137] The prediction mode information of the current transform layer is obtained according to the method of step 401-step 402. The prediction mode can be a node-based prediction mode, or an inter-layer prediction mode, or an intra-layer prediction mode.

[0138] Then, the corresponding prediction mode is applied to the current layer node according to the parsed layer_based_pred_mode_flag and layer_pred_mode. In this method, the entire raht transform layer is divided into three layers: upper, middle and lower. Different layers use different methods to determine the prediction mode and prediction value of the current node.

[0139] The division of the upper, middle and lower layers is divided by parsing two syntax elements in the code stream that identify the hierarchical structure: raht_prediction_signalling_upper_dist and raht_prediction_signalling_lower_dist.

[0140] raht_prediction_signalling_upper_dist: indicates the first layer of the middle layers from the layer with a distance equal to raht_prediction_signalling_upper_dist from the layer where the root node is located. Define the layer where the root node is located as RahtRootLvl, and the first layer of the middle layer can be identified as StartSignalPredictionLvlP:

[0141] StartSignalPredictionLvlP = RahtRootLvl - raht_prediction_signalling_upper_dist

[0142] raht_prediction_signalling_lower_dist: indicates the last layer of the middle layer.

[0143] Definition: EndSignalPredictionLvl = raht_prediction_signalling_lower_dist

[0144] When the current layer lvl is greater than StartSignalPredictionLvlP, it indicates that the current layer is in the upper layer; when the current layer lvl is less than EndSignalPredictionLvl, it indicates that the current layer is in the lower layer; when the current layer lvl is less than or equal to StartSignalPredictionLvlP and greater than or equal to EndSignalPredictionLvl, it indicates that the current layer is in the middle layer.

[0145] At the same time, optionally, a flag is transmitted in the code stream to indicate whether intra-inter frame weighted prediction is allowed, if the flag is 1, two relative quantities raht_average_prediction_upper_num and raht_average_prediction_lower_num are further transmitted in the code stream to further identify the number of layers that can use intra-inter frame weighted prediction values:

[0146] raht_average_prediction_upper_num: indicates the number of layers allowed to perform weighted prediction on EndSignalPredictionLvl, including EndSignalPredictionLvl layer.

[0147] raht_average_prediction_lower_num: indicates the number of layers allowed to do weighted prediction under EndSignalPredictionLvl. Does not include EndSignalPredictionLvl. (For example, when EndSignalPredictionLvl is 5, raht_average_prediction_upper_num and raht_average_prediction_lower_num are both 1, then the number of layers allowed to do weighted prediction is the 5th and 4th layers)

[0148] The prediction mode of each node can be divided into four kinds, in order to distinguish, the following use inter, intra, average, null to represent inter prediction, intra prediction, intra inter weighted prediction and no prediction respectively.

[0149] If (layer_based_pred_mode_flag = 0), the prediction mode of the node

[0150] a) If in the upper layer: infer the prediction mode of the current node (inter (inter) ----> intra (intra) ----> null).

[0151] First, determine whether the placeholder child node of the current frame node and the child node of the corresponding reference frame node are completely matched:

[0152] If matched, the prediction mode of the current node is Inter, and the prediction value is the inter prediction value;

[0153] Otherwise, if intra prediction is enabled, the prediction mode of the current node is intra, and the prediction value is the intra prediction value;

[0154] Otherwise, the prediction mode of the current node is null, no prediction, no prediction value.

[0155] b) If in the middle layer: infer or decode the prediction mode of the current node from the code stream according to the matching of the current node and the reference frame node, the opening of Intra prediction.

[0156] If inter_pred_complete_match = 0 and RahtIntraPredEligible = = 0, directly infer the prediction mode of the current node as Null. Otherwise, decode the prediction mode of the current node from the code stream:

[0157] When the decoded prediction mode of the current node is inter, the determination of the prediction value is divided into two cases:

[0158] When the current layer allows intra-inter weighted prediction and inter_pred_complete_match = 1 and RahtIntraPredEligible = 1, the prediction value is an intra-inter weighted prediction value;

[0159] When the current layer does not allow intra-inter weighted prediction, the prediction value is an inter prediction value.

[0160] When the decoded prediction mode of the current node is intra, the prediction value is an intra prediction value;

[0161] When the decoded prediction mode of the current node is null, no prediction is performed, and there is no prediction value.

[0162] c) If in the lower layer: infer the prediction mode of the node (intra -> null)

[0163] First, it is checked whether Intra prediction is enabled. If so, the determination of the prediction value is divided into two cases:

[0164] When the current layer allows intra-inter weighted prediction and inter_pred_complete_match = 1 and RahtIntraPredEligible = 1, the prediction value is an intra-inter weighted prediction value;

[0165] When the current layer does not allow intra-inter weighted prediction, the prediction value is an intra prediction value.

[0166] Otherwise, no prediction is performed, and there is no prediction value.

[0167] inter_pred_complete_match = 1, the prediction mode of the current node is Inter, and the prediction value is an inter prediction value; otherwise, it is necessary to determine whether Intra prediction of the current node is enabled. The parameter RahtIntraPredEligible is used to identify whether Intra prediction of the current node is enabled.

[0168] It should be noted that the method for determining whether an inter node matches and whether Intra prediction is enabled in the embodiments of the present application is as follows:

[0169] For example, for a 2*2*2 size node block, the node with the same geometry position in the reference frame is selected as its reference frame node. Since some sub-nodes in the corresponding position of the reference frame node can be empty, there is no prediction value. Therefore, a parameter inter_pred_complete_match is used to represent whether all the occupied sub-nodes of the current frame node can be found in the same position sub-nodes of the corresponding reference frame node. If yes, it represents complete match, inter_pred_complete_match = 1; otherwise, 0.

[0170] If inter_pred_complete_match = 1, the prediction mode of the current node is Inter, and the prediction value is the inter-frame prediction value.

[0171] Otherwise, it is necessary to determine whether the current node is enabled for intra-frame prediction. A flag RahtIntraPredEligible is used to identify whether the current node is enabled for intra-frame prediction. The following is the condition for determining whether to enable intra-frame prediction:

[0172] If the current node is a root node, no intra-frame prediction is performed, and RahtIntraPredEligible = 0.

[0173] If it is not a root node, it is necessary to determine whether to perform prediction on the current 2*2*2 node, and the process is as follows:

[0174] 1) Determine whether the number of occupied sub-nodes is equal to 1: if the number of non-empty occupied sub-nodes of the current node to be encoded is 1, set the number of neighbor parent nodes to 19, and do not perform intra-frame prediction, RahtIntraPredEligible = 0. Otherwise, continue to determine 2:

[0175] 2) Determine whether the number of neighbor grandparent nodes is greater than or equal to 2: if the number of neighbor grandparent nodes (including grandparent nodes) of the current node to be encoded is less than 2, do not perform intra-frame prediction, and RahtIntraPredEligible = 0. Otherwise, proceed to 3:

[0176] 3) Neighbor search: the search range is: the parent node of the current node to be encoded (1), the coplanar neighbor nodes of the parent node of the current node to be encoded (6), the collinear neighbor nodes of the parent node of the current node to be encoded (12), the coplanar neighbor nodes of the current node to be encoded (6), and the collinear neighbor nodes of the current node to be encoded (12). Search the above neighbor nodes in turn, if the neighbor node exists, record the index information corresponding to it, and record the number of neighbor nodes of the parent node (including the parent node itself). Then proceed to 4.

[0177] 4) Determine if the number of neighbor parent nodes is greater than or equal to 6: if the number of neighbor parent nodes of the current node to be coded is less than the threshold 6, do not perform intra prediction, RahtIntraPredEligible = 0.

[0178] 5) Otherwise, intra prediction is enabled, RahtIntraPredEligible = 1.

[0179] if (layer_based_pred_mode_flag = 1 && layer_pred_mode = 1)

[0180] When layer_based_pred_mode_flag = 1 and layer_pred_mode is 1, it means that the current layer is inter layer, at this time the determination method of the prediction value of each node of the current layer is as follows:

[0181] When the current layer allows weighted prediction: if the current node is inter node matching and intra prediction is enabled, the prediction value is the intra-inter weighted prediction value. Otherwise, if the intra prediction is enabled, the prediction value is the intra prediction value; otherwise, it is not predicted, and there is no prediction value.

[0182] When the current layer does not allow weighted prediction: if the current node is inter node matching, the prediction value is the inter prediction value. Otherwise, if the intra prediction is enabled, the prediction value is the intra prediction value; otherwise, it is not predicted, and there is no prediction value.

[0183] if (layer_based_pred_mode_flag = 1 && layer_pred_mode = 0)

[0184] When layer_based_pred_mode_flag = 1 and layer_pred_mode is 0, it means that the current layer is intra layer, at this time the determination method of the prediction value of each node of the current layer is as follows:

[0185] When the intra prediction is enabled, the prediction value is the intra prediction value. Otherwise, it is not predicted, and there is no prediction value.

[0186] Wherein, the calculation of the intra prediction value is as follows:

[0187] When RahtIntraPredEligible is 1, the nearest neighbor found in the neighbor search is used to perform weighted prediction on each sub-node of the current node.

[0188] The prediction weight of the parent node is 9, the prediction weight of the neighbor node coplanar with the current to-be-encoded child node is 5, the prediction weight of the neighbor node collinear with the current to-be-encoded child node is 2, the prediction weight of the neighbor parent node coplanar with the current to-be-encoded child node is 3, and the prediction weight of the neighbor parent node collinear with the current to-be-encoded child node is 1.

[0189] Each child node of the current 2*2*2 node is weighted predicted by using the neighbor node and the weight, to obtain an intra-frame prediction value of each child node of the 2*2*2 node.

[0190] The inter-frame prediction value is calculated as follows:

[0191] The inter-frame prediction value of the current 2*2*2 node is from the prediction value of the 2*2*2 node at the same position in the reference frame, and when a certain child node of the node at the same position in the reference frame is empty (the prediction value is 0), the attribute average value of the current node is used to replace the inter-frame prediction value of the child node (which can be referred to as the revision inter-frame prediction value at this time).

[0192] The intra-frame and inter-frame weighted prediction value is calculated as follows:

[0193] The intra-frame and inter-frame weighted prediction value is a weighted average of the intra-frame prediction value and the inter-frame prediction value of the current node, and the weight values of the two are determined by the prediction mode of the parent node, the neighbor parent node, and the neighbor coded child node.

[0194] Finally, the RAHT inverse transform is performed on the coefficient / coefficient residual after the inverse quantization of the current node, and then the corresponding prediction value is added to obtain the final attribute reconstruction value.

[0195] In summary, the decoding end decodes the obtained first code stream, and in the case that the transform layer of the first code stream is an upper layer or a lower layer that does not allow weighted prediction, the decoding end can directly infer the prediction mode used by the transform layer, thereby achieving the purpose of improving the decoding efficiency. When decoding the prediction mode information of the upper layer and the lower layer (and not starting the weighting), a certain inference is made, which is more in line with logic and avoids transmitting redundancy.

[0196] On the one hand, in the existing technology, in the RAHT-based encoding mode, the calculation process of the rate-distortion optimization cost (hereinafter referred to as cost) of the prediction mode of the node in the upper layer nodeByNodeCost and the cost of the prediction mode of the inter-frame layer interLayerCost is the same, that is, the values finally calculated by nodeByNodeCost and interLayerCost are the same. Then the existing indication method of the prediction mode used by the upper layer is redundant, and the encoding end repeatedly calculates the cost, which affects the encoding efficiency; similarly, the decoding end also has redundant information decoding, which affects the decoding efficiency.

[0197] On the other hand, in the prior art, in the RAHT-based encoding mode, when in the lower layer and the weighted prediction is not allowed, the calculation process of the cost of the prediction mode in the node unit, nodeByNodeCost, and the cost of the prediction mode in the intra layer, intraLayerCost, is the same, that is, the finally calculated values of nodeByNodeCost and intraLayerCost are the same. Then, the indication mode of the prediction mode used by the existing lower layer (and the weighted prediction is not allowed) is redundant, and the cost is calculated repeatedly at the encoding end, which affects the encoding efficiency; similarly, the decoding of the redundant information at the decoding end also affects the decoding efficiency.

[0198] As shown in Figure 5 The embodiment of the present application also provides an encoding method, which comprises the following steps:

[0199] Step 501, the encoding end sends a first code stream to the decoding end;

[0200] In the case that the transform layer of the first code stream is the upper layer and the prediction mode corresponding to the transform layer is the prediction mode in the layer unit, the first code stream does not carry a second flag; or,

[0201] In the case that the transform layer of the first code stream is the lower layer and the weighted prediction is not allowed, and the prediction mode corresponding to the transform layer is the prediction mode in the layer unit, the first code stream does not carry the second flag.

[0202] The second flag is used to indicate whether the transform layer is the intra prediction layer or the inter prediction layer.

[0203] Optionally, the first code stream carries a first flag; the first flag is used to indicate whether the prediction mode corresponding to the transform layer is the prediction mode in the layer unit or the prediction mode in the node unit.

[0204] In the embodiment of the present application, the encoding end determines the prediction mode used by the current transform layer first, and then transmits the obtained prediction mode information. First, the first flag is encoded and transmitted, for example, the first flag can temporarily use "layer_based_pred_mode_flag" to identify. It can also be understood that:

[0205] In the upper layer: the semantic of layer_based_pred_mode_flag is whether it is the prediction mode in the layer unit, and if not, it is the prediction mode in the node unit; or the semantic can also be understood as whether it is the intra layer prediction mode, and if not, it is the prediction mode in the node unit;

[0206] In the case of the lower layer and without allowing weighted prediction, the semantics of layer_based_pred_mode_flag is: whether it is a layer-based prediction mode, and not a node-based prediction mode; or it can also be understood as: whether it is an inter-layer prediction mode, and not a node-based prediction mode.

[0207] As an optional embodiment, in the case of the transform layer being a middle layer or the transform layer being a lower layer and allowing weighted prediction, and the prediction mode corresponding to the transform layer being a layer-based prediction mode, the first code stream carries the second flag.

[0208] In the case of the first transform layer being a middle layer or a lower layer and allowing weighted prediction, the first flag is used to indicate whether the transform layer uses a layer-based prediction mode or a node-based prediction mode.

[0209] In the case of the first flag indicating that the transform layer uses a layer-based prediction mode, the first code stream carries a second flag, which is used to indicate whether the transform layer is an inter-layer prediction layer or an intra-layer prediction layer.

[0210] For example, the second flag can be identified by "layer_pred_mode". In the case of the first transform layer being a middle layer or a lower layer and allowing weighted prediction, when layer_based_pred_mode_flag is 1, it indicates that a layer-by-layer prediction is used, and at this time, another flag needs to be used in the first code stream to identify whether the current layer is an inter-layer prediction layer or an intra-layer prediction layer, and the flag is identified by the second flag. It can also be understood as:

[0211] In the case of a middle layer or a lower layer (which allows weighted prediction):

[0212] The semantics of layer_based_pred_mode_flag is: whether it is a layer-based prediction mode, and not a node-based prediction mode;

[0213] The semantics of layer_pred_mode is: when layer_based_pred_mode_flag indicates a layer-based prediction mode, the layer_pred_mode is used to further indicate whether it is an inter-layer prediction mode or an intra-layer prediction mode.

[0214] For example, the transmission method of the prediction mode information of the transform layer is as follows:

[0215] First, encode transmission layer_based_pred_mode_flag,

[0216] If (middle layer || (lower layer && allow weighted prediction))

[0217] If (layer_based_pred_mode_flag == 1)

[0218] Continue to encode transmission layer_pred_mode

[0219] In the embodiments of the present application, on the one hand, for the upper layer or the lower layer without allowing weighted prediction, the encoding end only needs to transmit the first flag (without transmitting the second flag) when transmitting the prediction mode information, and the decoding end can infer the prediction mode used by the corresponding transform layer according to the first flag, thereby saving the code stream and achieving the purpose of improving the coding efficiency; on the other hand, when the upper layer or the lower layer without allowing weighted prediction, the encoding end does not need to calculate the cost of a specific prediction mode, and the coding time can be reduced, thereby improving the coding efficiency.

[0220] In at least one embodiment of the present application, before step 301, the method further comprises:

[0221] A calculation module is configured to calculate the target rate-distortion optimization cost of the transform layer when using a plurality of prediction modes; the plurality of prediction modes include a node-based prediction mode, an inter-layer intra prediction mode, and an inter-layer inter prediction mode; wherein,

[0222] In the case where the transform layer is the upper layer, the target rate-distortion optimization cost of the transform layer using the inter-layer inter prediction method is set to infinity; or,

[0223] In the case where the transform layer is the lower layer and does not allow weighted prediction, the target rate-distortion optimization cost of the transform layer using the inter-layer intra prediction method is set to infinity.

[0224] For example, the overall encoding process of the encoding end is as follows:

[0225] The encoding end constructs a transform tree structure; for example, an octree structure is constructed from the bottom layer by using the reconstructed geometry, and in the process of constructing the transform tree, the corresponding Moltin code information, attribute information and weight information need to be generated for the merged nodes;

[0226] The encoding end processes the transform tree structure from top to bottom to obtain the target rate-distortion optimization cost of the transform layer when using a plurality of prediction modes; the prediction mode can be a node-based prediction mode, an inter-layer inter prediction mode, or an inter-layer intra prediction mode;

[0227] The encoding end selects a prediction mode with a minimum rate-distortion optimization cost as the prediction mode used by the transform layer.

[0228] In other words, the encoding end selects a prediction mode for the current transform layer, which can be a prediction mode in units of nodes, a prediction mode of an inter layer, or a prediction mode of an intra layer.

[0229] The method for selecting a prediction mode for the current transform layer is as follows: based on a rate-distortion optimization (RDO) method, the encoding end calculates three costs for the current transform layer in units of nodes, inter layer, and intra layer prediction modes, respectively, and selects a prediction mode with a minimum cost as the prediction mode of the transform layer.

[0230] For example, the calculation method of the target rate-distortion optimization cost when the transform layer uses multiple prediction modes is as follows:

[0231] 1) When the first transform layer is in an upper layer

[0232] The calculation of the cost of the prediction mode in units of nodes is as follows:

[0233] First, it is determined whether the current frame node and the corresponding reference frame node are completely matched. If matched, the prediction value of the current node is an inter prediction value, the inter prediction residual is calculated, the RAHT transform and quantization are performed, and the cost of encoding the inter prediction residual coefficient is calculated, and then added to the nodeByNodeCost.

[0234] Otherwise, it is determined whether the current node is enabled for intra prediction. If the intra prediction is enabled, the prediction value of the current node is an intra prediction value, the intra prediction residual is calculated, the RAHT transform and quantization are performed, and the cost of encoding the intra prediction residual coefficient is calculated, and then added to the nodeByNodeCost.

[0235] Otherwise, the current node has no prediction value, and the original value is directly subjected to the RAHT transform and quantization, and the cost of encoding the original transform coefficient is calculated, and then added to the nodeByNodeCost.

[0236] The calculation of the cost of the inter layer prediction mode is as follows:

[0237] Not calculated, and set to infinity.

[0238] Calculation of cost of Intra layer prediction mode:

[0239] First, if Intra prediction is on, the prediction value of the current node is Intra prediction value, calculate the cost of encoding Intra prediction residual coefficients, then add to intraLayerCost;

[0240] Otherwise, the current node has no prediction value, calculate the cost of encoding the original transform coefficients, then add to intraLayerCost.

[0241] 2) The first transform layer is in the middle layer

[0242] Calculation of cost of prediction mode in node unit:

[0243] If inter_pred_complete_match = 1, and Intra prediction is also on, use RDO to select the appropriate prediction mode in Inter, Intra, Null. At the same time, it should be pointed out that if the current layer allows weighted prediction, the value used by Inter mode is the weighted prediction value, if not allowed, Inter mode uses the inter prediction value.

[0244] If inter_pred_complete_match = 0, and Intra prediction is on, use RDO to select the appropriate prediction mode in Inter (at this time, the inter prediction value of part of the sub-nodes uses the average value of the parent node instead, which can be regarded as the revision of the inter prediction value), Intra, Null.

[0245] If inter_pred_complete_match = 1 and Intra prediction is not on, use RDO to select the appropriate prediction mode in Inter, Null.

[0246] If inter_pred_complete_match = 0 and Intra prediction is not on, at this time, there is no need to perform RDO, directly infer as Null non-prediction mode.

[0247] If the inter node does not match and the intra prediction is not on, directly calculate the cost of encoding the original transform coefficients, then add to nodeByNodeCost.

[0248] Otherwise, the mode with the minimum cost of encoding the current node is calculated by the method of RDO, then the cost of encoding the information of the mode (as the prediction mode information needs to be transmitted in the bitstream at this time, including inter, intra and null, the cost of transmitting the prediction mode also needs to be added when calculating the cost) and the cost of encoding the residual transform coefficients / original transform coefficients are calculated and added to the nodeByNodeCost.

[0249] The calculation of the cost of Inter layer prediction mode:

[0250] Firstly, it is judged whether the current layer is allowed to conduct weighted prediction,

[0251] If allowed:

[0252] Firstly, if the inter node matches and the intra is turned on, the prediction value of the current node is the weighted prediction value, the cost of encoding the weighted prediction residual coefficient is calculated, and then added to the interLayerCost;

[0253] Otherwise, if the intra prediction is turned on, the prediction value is the intra prediction value, the cost of encoding the intra prediction residual coefficient is calculated, and then added to the interLayerCost;

[0254] Otherwise, there is no prediction value, the cost of encoding the original transform coefficient is calculated, and then added to the interLayerCost.

[0255] If not allowed:

[0256] If the inter node matches, the prediction value is the inter prediction value, the cost of encoding the inter prediction residual coefficient is calculated, and then added to the interLayerCost;

[0257] Otherwise, if the intra prediction is turned on, the prediction value is the intra prediction value, the cost of encoding the intra prediction residual coefficient is calculated, and then added to the interLayerCost;

[0258] Otherwise, it is not predicted, there is no prediction value, the cost of encoding the original transform coefficient is calculated, and then added to the interLayerCost.

[0259] The calculation of the cost of Intra layer prediction mode:

[0260] Firstly, if the intra prediction is turned on, the prediction value of the current node is the intra prediction value, the cost of encoding the intra prediction residual coefficient is calculated, and then added to the intraLayerCost;

[0261] Otherwise, there is no prediction value, calculate the cost of coding the original transform coefficients, and then add to intraLayerCost.

[0262] 3) The first transform layer is at the lower layer

[0263] The calculation of the cost of the prediction mode in node unit:

[0264] First, judge whether the current layer allows weighted prediction,

[0265] If yes:

[0266] First, if the inter-node matches and intra is on, the prediction value of the current node is the weighted prediction value, calculate the cost of coding the weighted prediction residual coefficients, and then add to nodeByNodeCost;

[0267] Otherwise, there is no prediction value, calculate the cost of coding the original transform coefficients, and then add to nodeByNodeCost.

[0268] If no:

[0269] If intra prediction is on, the prediction value is the intra prediction value, calculate the cost of coding the intra prediction residual coefficients, and then add to nodeByNodeCost;

[0270] Otherwise, there is no prediction, calculate the cost of coding the original transform coefficients, and then add to nodeByNodeCost.

[0271] The calculation of the cost of the prediction mode in node unit:

[0272] First, judge whether the current layer allows weighted prediction,

[0273] If yes:

[0274] First, if the inter-node matches and intra is on, the prediction value of the current node is the weighted prediction value, calculate the cost of coding the weighted prediction residual coefficients, and then add to interLayerCost;

[0275] Otherwise, if intra prediction is on, the prediction value is the intra prediction value, calculate the cost of coding the intra prediction residual coefficients, and then add to interLayerCost;

[0276] Otherwise, there is no prediction value, calculate the cost of coding the original transform coefficients, and then add to interLayerCost.

[0277] If no:

[0278] If inter node match, the predictor is inter predictor, calculate the cost of coding inter prediction residual coefficients, then add to interLayerCost;

[0279] Otherwise, if intra prediction is on, the predictor is intra predictor, calculate the cost of coding intra prediction residual coefficients, then add to interLayerCost;

[0280] Otherwise, no predictor, no predictor, calculate the cost of coding original transform coefficients, then add to interLayerCost.

[0281] The calculation of cost of Intra layer prediction mode:

[0282] First, judge whether the current layer is allowed to do weighted prediction,

[0283] If allowed:

[0284] First, if intra prediction is on, the predictor of current node is intra predictor, calculate the cost of coding intra prediction residual coefficients, then add to intraLayerCost;

[0285] Otherwise, current node has no predictor, calculate the cost of coding original transform coefficients, then add to intraLayerCost.

[0286] If not allowed:

[0287] Do not calculate, set to infinity.

[0288] The above process can be represented by the following table 1:

[0289] Table 1. Cost calculation table

[0290]

[0291] When the intraLayerCost, interLayerCost and nodeByNodeCost of the current layer are obtained

[0292] The following comparison is made:

[0293] When (nodeByNodeCost < intraLayerCost) && (nodeByNodeCost < interLayerCost)

[0294] layer_based_pred_mode_flag = 0; / / is the prediction mode based on node

[0295] ----According to the prediction mode in the node unit, the transform coefficient / residual transform coefficient of all nodes in the current layer is calculated, quantized and entropy encoded.

[0296] When (intraLayerCost < nodeByNodeCost) && (intraLayerCost < interLayerCost)

[0297] layer_based_pred_mode_flag = 1; / / It is the prediction mode in the layer unit

[0298] layer_pred_mode = 0; / / It is intra layer

[0299] ----According to the prediction mode in the intra layer, the transform coefficient / residual transform coefficient of all nodes in the current layer is calculated, quantized and entropy encoded.

[0300] When (interLayerCost < intraLayerCost) && (interLayerCost < nodeByNodeCost)

[0301] layer_based_pred_mode_flag = 1; / / It is the prediction mode in the layer unit

[0302] layer_pred_mode = 1; / / It is inter layer

[0303] ----According to the prediction mode in the inter layer, the transform coefficient / residual transform coefficient of all nodes in the current layer is calculated, quantized and entropy encoded.

[0304] In summary, in the embodiment of the present application, on the one hand, for the upper layer or the lower layer which does not allow weighted prediction, the encoding end only needs to transmit the first flag (without transmitting the second flag) when transmitting the prediction mode information, and the decoding end can infer the prediction mode used by the corresponding transform layer according to the first flag, thereby saving the code stream and achieving the purpose of improving the coding efficiency; on the other hand, when the upper layer or the lower layer which does not allow weighted prediction, the encoding end does not need to calculate the cost of the specific prediction mode, which can reduce the encoding time and thus improve the coding efficiency.

[0305] The decoding method or the encoding method provided in the embodiment of the present application can be executed by the decoding device or the encoding device. In the embodiment of the present application, the decoding method or the encoding method is executed by the decoding device or the encoding device as an example, and the decoding device or the encoding device provided in the embodiment of the present application is described.

[0306] As Figure 6As shown, the embodiment of the present application further provides a decoding device, applied to a decoding end, the device comprises:

[0307] The decoding module 601 is configured to decode the acquired first code stream.

[0308] The first determining module 602 is configured to determine that the transform layer uses the intra-layer prediction mode in the case that the transform layer of the first code stream is an upper layer; or determine that the transform layer uses the inter-layer prediction mode in the case that the transform layer of the first code stream is a lower layer and weighted prediction is not allowed.

[0309] As an optional embodiment, in the case that the first code stream acquired by the decoding end is decoded to obtain a first flag,

[0310] The first determining module further comprises:

[0311] The first determining sub-module is configured to determine that the transform layer uses the intra-layer prediction mode in the case that the transform layer of the first code stream is an upper layer, and the first flag indicates that the prediction mode corresponding to the transform layer is a layer-based prediction mode; or

[0312] The second determining sub-module is configured to determine that the transform layer uses the inter-layer prediction mode in the case that the transform layer of the first code stream is a lower layer and weighted prediction is not allowed, and the first flag indicates that the prediction mode corresponding to the transform layer is a layer-based prediction mode.

[0313] In the embodiment of the present application, the decoding end decodes the acquired first code stream, and in the case that the transform layer of the first code stream is an upper layer or a lower layer in which weighted prediction is not allowed, the decoding end can directly infer the prediction mode used by the transform layer, thereby achieving the purpose of improving the decoding efficiency.

[0314] It should be noted that the decoding device provided by the embodiment of the present application is a device capable of executing the above-mentioned decoding method, and all embodiments of the above-mentioned decoding method are applicable to the device and can achieve the same or similar beneficial effects, which will not be repeated here.

[0315] As shown, the embodiment of the present application further provides an encoding device, applied to an encoding end, the device comprises: Figure 7 The sending module 701 is configured to send the first code stream to the decoding end.

[0316] In the case that the transform layer of the first code stream is an upper layer, and the prediction mode corresponding to the transform layer is a layer-based prediction mode, the first code stream does not carry a second flag; or

[0317]

[0318] ​in a case where the transform layer is an upper layer or a lower layer and weighted prediction is not allowed, the first bitstream does not carry the second flag;

[0319] The second flag is used to indicate that the transform layer is an intra prediction layer or an inter prediction layer.

[0320] As an optional embodiment, the first bitstream carries a first flag; the first flag is used to indicate that the prediction mode corresponding to the transform layer is a layer-based prediction mode or a node-based prediction mode.

[0321] As an optional embodiment, in a case where the transform layer is a middle layer or the transform layer is a lower layer and weighted prediction is allowed, and the prediction mode corresponding to the transform layer is a layer-based prediction mode, the first bitstream carries the second flag.

[0322] As an optional embodiment, the apparatus further includes:

[0323] The computing module is configured to calculate a target rate-distortion optimization cost of the transform layer when a plurality of prediction modes are used; the plurality of prediction modes include a node-based prediction mode, an intra-layer prediction mode, and an inter-layer prediction mode; and

[0324] In a case where the transform layer is an upper layer, the target rate-distortion optimization cost of the transform layer using the inter-layer prediction method is set to infinity; or

[0325] In a case where the transform layer is a lower layer and weighted prediction is not allowed, the target rate-distortion optimization cost of the transform layer using the intra-layer prediction method is set to infinity.

[0326] In the embodiments of the present application, on the one hand, for an upper layer or a lower layer that does not allow weighted prediction, the encoding end only needs to transmit the first flag (without transmitting the second flag) when transmitting the prediction method information, and the decoding end can directly infer the prediction method used by the corresponding transform layer according to the first flag, thereby saving the bitstream and achieving the purpose of improving the encoding efficiency; on the other hand, when the upper layer or the lower layer that does not allow weighted prediction, the encoding end does not need to calculate the cost of a specific prediction method, which can reduce the encoding time and thus improve the encoding efficiency.

[0327] It should be noted that the encoding apparatus provided in the embodiments of the present application is an apparatus capable of executing the above-mentioned encoding method, and all the embodiments of the above-mentioned encoding method are applicable to the apparatus and can achieve the same or similar beneficial effects, which will not be repeated here.

[0328] The decoding apparatus or the encoding apparatus in the embodiments of the present application can be an electronic device, for example, an electronic device with an operating system, or a component in an electronic device, for example, an integrated circuit or a chip. The electronic device can be a terminal or another device other than the terminal. Exemplarily, the terminal can include, but is not limited to, the types of the terminal 11 listed above, and the other device can be a server, a network attached storage (NAS) or the like, which is not limited in the embodiments of the present application.

[0329] The decoding apparatus or the encoding apparatus provided in the embodiments of the present application can implement each process implemented by the method embodiments of FIG. 2 to FIG. 3, and achieve the same technical effects. To avoid repetition, details are not described herein.

[0330] As shown in FIG. 1, Figure 8 The embodiments of the present application also provide an electronic device 800, which includes a processor 801 and a memory 802, and the memory 802 stores programs or instructions executable on the processor 801. For example, when the electronic device 800 is an encoding terminal, the programs or instructions are executed by the processor 801 to implement each step of the above-mentioned encoding method embodiments, and achieve the same technical effects. When the electronic device 800 is a decoding terminal, the programs or instructions are executed by the processor 801 to implement each step of the above-mentioned decoding method embodiments, and achieve the same technical effects. To avoid repetition, details are not described herein. Optionally, the memory 802 can be the memory 102 or the memory 113 in the embodiments shown in FIG. 1. Figure 1 The processor 801 can implement the functions of the encoder 200 or the decoder 300 in the embodiments shown in FIG. 1 and FIG. 2. Figure 1 The processor 801 can implement the functions of the encoder 200 or the decoder 300 in the embodiments shown in FIG. 1 and FIG. 2.

[0331] The embodiments of the present application also provide an electronic device, which includes a memory configured to store video data, and a processing circuit configured to implement each step of the above-mentioned decoding method or encoding method embodiments. Optionally, the memory can be the memory 102 or the memory 113 in the embodiments shown in FIG. 1. Figure 1 The processing circuit can implement the functions of the encoder 200 or the decoder 300 in the embodiments shown in FIG. 1 and FIG. 2. Figure 1 The processing circuit can implement the functions of the encoder 200 or the decoder 300 in the embodiments shown in FIG. 1 and FIG. 2.

[0332] The embodiments of the present application also provide an electronic device, which includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run programs or instructions to implement the steps in the method embodiments shown in FIG. 1 and FIG. 2. The device embodiments correspond to the above-mentioned method embodiments, and each implementation process and implementation manner of the above-mentioned method embodiments can be applicable to the terminal embodiments, and achieve the same technical effects. Figure 4 or Figure 5 The device embodiments correspond to the above-mentioned method embodiments, and each implementation process and implementation manner of the above-mentioned method embodiments can be applicable to the terminal embodiments, and achieve the same technical effects.

[0333] The electronic device can be a terminal, or can be another device other than the terminal, such as a server, a Network Attached Storage (NAS), and the like.

[0334] The terminal can be a mobile phone, a Tablet Personal Computer, a Laptop Computer, a notebook computer, a Personal Digital Assistant (PDA), a palm computer, a netbook, an Ultra-mobile Personal Computer (UMPC), a Mobile Internet Device (MID), an Augmented Reality (AR) device, a Virtual Reality (VR) device, a mixed reality (MR) device, a robot, a Wearable Device, a flight vehicle, a Vehicle User Equipment (VUE), a shipboard device, a Pedestrian User Equipment (PUE), a smart home (a home device with a wireless communication function, such as a refrigerator, a television, a washing machine, or furniture, etc.), a game console, a Personal Computer (PC), a kiosk, or a self-service machine, and the like terminal-side device. The Wearable Device includes a smart watch, a smart bracelet, a smart earphone, smart glasses, smart jewelry (a smart bracelet, a smart necklace, a smart ring, a smart necklace, a smart anklet, a smart necklace, and the like), a smart wristband, smart clothing, and the like. The vehicle-mounted device can also be referred to as a vehicle-mounted terminal, a vehicle-mounted controller, a vehicle-mounted module, a vehicle-mounted component, a vehicle-mounted chip, or a vehicle-mounted unit, and the like. It should be noted that the specific type of the terminal is not limited in the embodiments of the present application.

[0335] The server can be a standalone physical server, or can be a server cluster or a distributed system composed of multiple physical servers, or can be a cloud server. The cloud server can provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, a Content Delivery Network (CDN), or cloud computing services based on big data and artificial intelligence platforms, and the like.

[0336] Taking the electronic device as a terminal as an example, Figure 9A hardware structure diagram of a terminal according to an embodiment of the present application.

[0337] The terminal 900 includes, but is not limited to, at least part of components such as a radio frequency unit 901, a network module 902, an audio output unit 903, an input unit 904, a sensor 905, a display unit 906, a user input unit 907, an interface unit 908, a memory 909, and a processor 910.

[0338] Those skilled in the art can understand that the terminal 900 can further include a power supply (such as a battery) for supplying power to each component, and the power supply can be logically connected to the processor 910 through a power management system, so as to realize functions such as management of charging, discharging, and power consumption management through the power management system. Figure 9 The terminal structure shown in the figure does not constitute a limitation on the terminal, and the terminal can include more or fewer components than those shown in the figure, or combine certain components, or different component arrangements, which are not described here.

[0339] It should be understood that in the embodiments of the present application, the input unit 904 can include a graphics processing unit (GPU) 9041 and a microphone 9042. The graphics processor 9041 processes image data of a still picture or a video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 906 can include a display panel 9061, which can be configured in the form of a liquid crystal display, an organic light-emitting diode, etc. The user input unit 907 includes at least one of a touch panel 9071 and other input devices 9072. The touch panel 9071 is also called a touch screen. The touch panel 9071 can include two parts of a touch detection device and a touch controller. The other input devices 9072 can include, but are not limited to, a physical keyboard, function keys (such as volume control keys, on-off keys, etc.), trackballs, mice, joysticks, etc., which are not described here.

[0340] In the embodiments of the present application, the radio frequency unit 901 can transmit the downlink data received from the network side device to the processor 910 for processing. In addition, the radio frequency unit 901 can send uplink data to the network side device. Generally, the radio frequency unit 901 includes, but is not limited to, an antenna, an amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, etc.

[0341] The memory 909 can be used to store software programs or instructions and various data. The memory 909 can mainly include a first storage area storing programs or instructions and a second storage area storing data, wherein the first storage area can store an operating system, application programs or instructions required by at least one function (such as a sound playing function, an image playing function, etc.), and the like. In addition, the memory 909 can include a volatile memory or a non-volatile memory. The non-volatile memory can be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically EPROM (EEPROM), or a flash memory. The volatile memory can be a Random Access Memory (RAM), a Static RAM (SRAM), a Dynamic RAM (DRAM), a Synchronous DRAM (SDRAM), a Double Data Rate SDRAM (DDR SDRAM), an Enhanced SDRAM (ESDRAM), a Synch link DRAM (SLDRAM), and a Direct Rambus RAM (DRRAM). The memory 909 in the embodiments of the present application includes but is not limited to these and any other suitable types of memory.

[0342] The processor 910 can include one or more processing units; optionally, the processor 910 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and an application program, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It can be understood that the above-mentioned modem processor can also not be integrated into the processor 910.

[0343] The processor 910 is configured to decode the first code stream obtained by the terminal; in a case where a transform layer of the first code stream is an upper layer, determine that the transform layer uses an intra-layer prediction mode; or in a case where the transform layer of the first code stream is a lower layer and weighted prediction is not allowed, determine that the transform layer uses an inter-layer prediction mode.

[0344] Or, the radio frequency unit 901 is configured to send a first code stream to a decoding end; in a case where a transform layer of the first code stream is an upper layer and a prediction mode corresponding to the transform layer is a layer-based prediction mode, the first code stream does not carry a second flag; or in a case where the transform layer of the first code stream is a lower layer and weighted prediction is not allowed and the prediction mode corresponding to the transform layer is the layer-based prediction mode, the first code stream does not carry the second flag; the second flag is used to indicate that the transform layer is an intra prediction layer or an inter prediction layer.

[0345] It can be understood that the implementation process of each implementation manner mentioned in the embodiment can refer to the related description of the method embodiment and achieve the same or corresponding technical effects. To avoid repetition, details are not described herein.

[0346] The embodiment of the present application further provides a readable storage medium, wherein the readable storage medium stores a program or instructions, and the program or instructions are executed by a processor to implement each process of the above-mentioned decoding method or encoding method embodiment and achieve the same technical effects. To avoid repetition, details are not described herein.

[0347] The processor is the processor in the terminal in the above-mentioned embodiment. The readable storage medium includes a computer readable storage medium, such as a computer readable memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc. In some examples, the readable storage medium can be a non-transitory readable storage medium.

[0348] The embodiment of the present application further provides a chip, wherein the chip includes a processor and a communication interface, the communication interface is coupled with the processor, and the processor is configured to run a program or instructions to implement each process of the above-mentioned decoding method or encoding method embodiment and achieve the same technical effects. To avoid repetition, details are not described herein.

[0349] It should be understood that the chip mentioned in the embodiment of the present application can include a system on chip (SOC), and can also include a standalone display chip, etc.

[0350] The embodiment of the present application further provides a computer program / program product, wherein the computer program / program product is stored in a storage medium, and the computer program / program product is executed by at least one processor to implement each process of the above-mentioned decoding method or encoding method embodiment and achieve the same technical effects. To avoid repetition, details are not described herein.

[0351] The embodiment of the present application further provides a communication system, including a decoding end device and an encoding end device, wherein the decoding end device can be used to execute the steps of the above-mentioned decoding method, and the encoding end device can be used to execute the steps of the above-mentioned encoding method.

[0352] It should be noted that, in the present document, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises... a" does not, without more constraints, exclude the presence of additional identical elements in the process, method, article, or apparatus that comprises the element. Furthermore, it should be noted that the methods and apparatuses of the present embodiments are not limited by the order of the steps or the sequence for performing the steps, as some steps can occur in different orders and / or concurrently with one another; for example, described methods can be performed in an order other than that described, and / or steps can be added, omitted or combined. Furthermore, features described with respect to certain examples can be combined in other examples.

[0353] From the above description of the embodiments, it is apparent that the method of the above-mentioned embodiments can be realized by means of a computer software product and general hardware platform, of course, it can also be realized by hardware. The computer software product is stored in a storage medium (such as ROM, RAM, magnetic disc, optical disc, etc.), and includes a plurality of instructions for making the terminal or network side device execute the method described in each embodiment of the present application.

[0354] The embodiments of the present application are described above in combination with the drawings, but the present application is not limited to the above-mentioned specific embodiments, the above-mentioned specific embodiments are only illustrative, but not restrictive, and those skilled in the art can make many forms of embodiments under the inspiration of the present application without departing from the scope of the present application and the scope protected by the claims.

Claims

1. A decoding method, comprising: The method comprises: The decoding end decodes the obtained first code stream; In the case where the transform layer of the first code stream is an upper layer, it is determined that the transform layer uses an intra-layer prediction mode; or, In the case where the transform layer of the first code stream is a lower layer and weighted prediction is not allowed, it is determined that the transform layer uses an inter-layer prediction mode.

2. The method of claim 1, wherein, In the case where the decoding end decodes the obtained first code stream to obtain a first flag, In the case where the transform layer of the first code stream is an upper layer, it is determined that the transform layer uses an intra-layer prediction mode, comprising: in the case where the transform layer of the first code stream is an upper layer and the first flag indicates that the prediction mode corresponding to the transform layer is a layer-based prediction mode, it is determined that the transform layer uses an intra-layer prediction mode; or, In the case where the transform layer of the first code stream is a lower layer and weighted prediction is not allowed, it is determined that the transform layer uses an inter-layer prediction mode, comprising: in the case where the transform layer of the first code stream is a lower layer and weighted prediction is not allowed, and the first flag indicates that the prediction mode corresponding to the transform layer is a layer-based prediction mode, it is determined that the transform layer uses an inter-layer prediction mode.

3. An encoding method characterized by, The method comprises: The encoding end sends a first code stream to a decoding end; In the case where the transform layer of the first code stream is an upper layer and the prediction mode corresponding to the transform layer is a layer-based prediction mode, the first code stream does not carry a second flag; or, In the case where the transform layer of the first code stream is a lower layer and weighted prediction is not allowed, and the prediction mode corresponding to the transform layer is a layer-based prediction mode, the first code stream does not carry a second flag; The second flag is used to indicate that the transform layer is an intra-prediction layer or an inter-prediction layer.

4. The method of claim 3, wherein, The first code stream carries a first flag; the first flag is used to indicate that the prediction mode corresponding to the transform layer is a layer-based prediction mode or a node-based prediction mode.

5. The method of claim 3 or 4, wherein, In the case where the transform layer is a middle layer or the transform layer is a lower layer and weighted prediction is allowed, and the prediction mode corresponding to the transform layer is a layer-based prediction mode, the first code stream carries the second flag.

6. The method according to any one of claims 3-5, characterized in that, Before the encoding end sends the first code stream to the decoding end, the method further comprises: The encoding end calculates a target rate-distortion optimization cost when the transform layer uses a plurality of prediction modes; the plurality of prediction modes comprise a node-based prediction mode, an intra-layer prediction mode and an inter-layer prediction mode; wherein, In the case where the transform layer is an upper layer, the target rate-distortion optimization cost of the inter-layer prediction method used by the transform layer is set to infinity; or, In the case where the transform layer is a lower layer and weighted prediction is not allowed, the target rate-distortion optimization cost of the intra-layer prediction method used by the transform layer is set to infinity.

7. A decoding apparatus, characterized by comprising: Applied to a decoding end, the device comprises: A decoding module, configured to decode an obtained first code stream; The first determining module is configured to determine that the transform layer uses an intra-layer prediction mode in a case where the transform layer of the first code stream is an upper layer; or determine that the transform layer uses an inter-layer prediction mode in a case where the transform layer of the first code stream is a lower layer and weighted prediction is not allowed.

8. The apparatus of claim 7, wherein, In a case where the first code stream obtained is decoded at the decoding end to obtain a first flag, The first determining module further includes: The first determining sub-module is configured to determine that the transform layer uses an intra-layer prediction mode in a case where the transform layer of the first code stream is an upper layer and the first flag indicates that the prediction mode corresponding to the transform layer is a layer-based prediction mode; or The second determining sub-module is configured to determine that the transform layer uses an inter-layer prediction mode in a case where the transform layer of the first code stream is a lower layer and weighted prediction is not allowed, and the first flag indicates that the prediction mode corresponding to the transform layer is a layer-based prediction mode.

9. An encoding apparatus, comprising: The apparatus is applied to an encoding end, and the apparatus includes: The sending module is configured to send a first code stream to a decoding end; In a case where the transform layer of the first code stream is an upper layer and the prediction mode corresponding to the transform layer is a layer-based prediction mode, the first code stream does not carry a second flag; or In a case where the transform layer of the first code stream is a lower layer and weighted prediction is not allowed, and the prediction mode corresponding to the transform layer is a layer-based prediction mode, the first code stream does not carry a second flag. The second flag is used to indicate that the transform layer is an intra-prediction layer or an inter-prediction layer.

10. The apparatus of claim 9, wherein, The first code stream carries a first flag, and the first flag is used to indicate that the prediction mode corresponding to the transform layer is a layer-based prediction mode or a node-based prediction mode.

11. The apparatus of claim 9 or 10, wherein, In a case where the transform layer is a middle layer or the transform layer is a lower layer and weighted prediction is allowed, and the prediction mode corresponding to the transform layer is a layer-based prediction mode, the first code stream carries the second flag.

12. The device of any one of claims 9-11, wherein, The apparatus further includes: The calculating module is configured to calculate a target rate-distortion optimization cost of the transform layer when the transform layer uses a plurality of prediction modes, the plurality of prediction modes including a node-based prediction mode, an intra-layer prediction mode, and an inter-layer prediction mode. In a case where the transform layer is an upper layer, the target rate-distortion optimization cost of the transform layer using an inter-layer prediction method is set to infinity; or In a case where the transform layer is a lower layer and weighted prediction is not allowed, the target rate-distortion optimization cost of the transform layer using an intra-layer prediction method is set to infinity.

13. An electronic device, comprising: The apparatus includes a processor and a memory, the memory stores programs or instructions executable on the processor, and the programs or instructions are executed by the processor to implement the steps of the decoding method of claim 1 or 2, or implement the steps of the encoding method of any one of claims 3 to 6.

14. A readable storage medium, characterized by, The readable storage medium stores programs or instructions, and the programs or instructions are executed by the processor to implement the decoding method of claim 1 or 2, or implement the steps of the encoding method of any one of claims 3 to 6.

15. A chip, characterized by The chip comprises a processor and a communication interface, the communication interface and the processor are coupled, the processor is used for running programs or instructions, and steps of the decoding method as claimed in claim 1 or 2 or steps of the encoding method as claimed in any one of claims 3 to 6 are realized.

16. A computer program product, characterised in that, The computer program product comprises computer instructions, and the computer instructions are executed by a processor to realize steps of the decoding method as claimed in claim 1 or 2 or steps of the encoding method as claimed in any one of claims 3 to 6.