Standby graph generation method, coding method, device and equipment
By decoding and converting the reference map and the gain map, a backup map suitable for different display devices is generated, which solves the problem of inconsistent resolution and bit depth between the reference map and the gain map, and achieves good display effect of high dynamic range images on standard dynamic range devices.
Patent Information
- Application Number
- CN202411102221.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2026-02-13
AI Technical Summary
How to apply a gain map to a reference map to generate a backup map, especially when the resolution, bit depth, and color gamut space conversion of the reference map and the gain map are inconsistent, to achieve good display results of high dynamic range images on standard dynamic range display devices.
By decoding the reference map and gain map, it is determined that the resolution of the spare map is the same as that of the reference map. The bit depth of the spare map is obtained and converted. After the color gamut space conversion, the gain map is applied to generate a spare map suitable for standard dynamic range display devices.
It achieves good display effect of high dynamic range images on different display devices, solves the problem of resolution and bit depth inconsistency in gain map applications, and improves the versatility and quality of image display.
Smart Images

Figure CN121531092A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of image processing technology, specifically relating to a method, encoding method, apparatus, and device for generating backup images. Background Technology
[0002] With advancements in image acquisition and display technologies, high dynamic range (HDR) imaging and display can now be achieved on consumer electronics devices such as smartphones, tablets, and computer monitors. While an increasing number of devices support HDR still image display, a significant number of electronic devices still only support Standard Dynamic Range (SDR). HDR images captured can achieve good display quality on both HDR and SDR display devices. A gain map-based HDR acquisition, storage, and display scheme is a promising approach.
[0003] In related technologies, display devices generate a backup image by applying a gain image to a reference image, and then use the backup image for display. However, how to apply a gain image to a reference image to generate the backup image is a technical problem that needs to be solved. Summary of the Invention
[0004] This application provides a spare map generation method, encoding method, apparatus, and device that can solve the problem of how to generate a spare map by applying a gain map on a reference map.
[0005] Firstly, a method for generating a backup image is provided, executed by a decoding device, the method comprising:
[0006] The reference map information and the gain map information are decoded respectively to obtain the first reference map and the first gain map;
[0007] Perform a first operation based on the first reference map and the first gain map, and generate a first backup map based on the first operation;
[0008] Wherein, when the first gain map is a gain map of three channels, the gain map information includes the encoding information of the gain map of each of the three channels, or the gain map information includes the encoding information of the image after the gain map of the three channels is encapsulated;
[0009] And / or,
[0010] The first operation satisfies at least one of the following:
[0011] The resolution of the first backup image is determined to be the same as the resolution of the first reference image;
[0012] Obtain the alternative map resolution from the metadata, and apply the first gain map based on the alternative map resolution;
[0013] Obtain the backup image bit depth, and perform backup image conversion based on the backup image bit depth;
[0014] If a color gamut space conversion is determined, the first reference image is converted.
[0015] Obtain the gain map bit depth, and apply the first gain map on the first reference map based on the gain map bit depth.
[0016] Secondly, an encoding method is provided, executed by an encoding terminal device, the method comprising:
[0017] A second gain map is generated based on the second baseline map and the second backup map.
[0018] The second reference map and the second gain map are encoded respectively to obtain reference map information and gain map information;
[0019] Wherein, the gain map information includes the spare map bit depth; and / or,
[0020] When the second gain map is a three-channel gain map, the gain map information includes the encoding information of the gain map for each of the three channels; or, the gain map information includes the encoding information of the image after the gain maps of the three channels are encapsulated; and / or,
[0021] The gain map information includes the gain map bit depth.
[0022] Thirdly, a backup drawing generation apparatus is provided, comprising:
[0023] The processing module is used to decode the reference map information and the gain map information respectively to obtain the first reference map and the first gain map;
[0024] The processing module is further configured to perform a first operation based on the first reference map and the first gain map, and generate a first backup map based on the first operation;
[0025] Wherein, when the first gain map is a gain map of three channels, the gain map information includes the encoding information of the gain map of each of the three channels, or the gain map information includes the encoding information of the image after the gain map of the three channels is encapsulated;
[0026] And / or,
[0027] The first operation satisfies at least one of the following:
[0028] The resolution of the first backup image is determined to be the same as the resolution of the first reference image;
[0029] Obtain the alternative map resolution from the metadata, and apply the first gain map based on the alternative map resolution;
[0030] Obtain the backup image bit depth, and perform backup image conversion based on the backup image bit depth;
[0031] If a color gamut space conversion is determined, the first reference image is converted.
[0032] Obtain the gain map bit depth, and apply the first gain map on the first reference map based on the gain map bit depth.
[0033] Fourthly, an encoding device is provided, comprising:
[0034] The processing module is used to generate a second gain map based on the second reference map and the second backup map;
[0035] The processing module is also used to encode the second reference map and the second gain map respectively to obtain reference map information and gain map information;
[0036] Wherein, the gain map information includes the spare map bit depth; and / or,
[0037] When the second gain map is a three-channel gain map, the gain map information includes the encoding information of the gain map for each of the three channels; or, the gain map information includes the encoding information of the image after the gain maps of the three channels are encapsulated; and / or,
[0038] The gain map information includes the gain map bit depth.
[0039] Fifthly, a backup drawing generation apparatus is provided, the apparatus being configured to perform the steps of the method described in the first aspect.
[0040] In a sixth aspect, an encoding apparatus is provided, the apparatus being configured to perform the steps of the method described in the second aspect.
[0041] In a seventh aspect, a decoding device is provided, the decoding device including a processor and a memory, the memory storing a program or instructions executable on the processor, the program or instructions, when executed by the processor, implementing the steps of the method as described in the first aspect.
[0042] Eighthly, a decoding device is provided, including a processor and a communication interface, wherein...
[0043] The processor is used to decode the reference map information and the gain map information respectively to obtain the first reference map and the first gain map;
[0044] The processor is also configured to perform a first operation based on the first reference map and the first gain map, and to generate a first backup map based on the first operation;
[0045] Wherein, when the first gain map is a gain map of three channels, the gain map information includes the encoding information of the gain map of each of the three channels, or the gain map information includes the encoding information of the image after the gain map of the three channels is encapsulated;
[0046] And / or,
[0047] The first operation satisfies at least one of the following:
[0048] The resolution of the first backup image is determined to be the same as the resolution of the first reference image;
[0049] Obtain the alternative map resolution from the metadata, and apply the first gain map based on the alternative map resolution;
[0050] Obtain the backup image bit depth, and perform backup image conversion based on the backup image bit depth;
[0051] If a color gamut space conversion is determined, the first reference image is converted.
[0052] Obtain the gain map bit depth, and apply the first gain map on the first reference map based on the gain map bit depth.
[0053] In a ninth aspect, an encoding end device is provided, the encoding end device including a processor and a memory, the memory storing a program or instructions executable on the processor, the program or instructions, when executed by the processor, implementing the steps of the method as described in the second aspect.
[0054] In a tenth aspect, an encoding terminal device is provided, including a processor and a communication interface, wherein,
[0055] A processor for generating a second gain map based on a second reference map and a second backup map;
[0056] The processor is also configured to encode the second reference map and the second gain map respectively to obtain reference map information and gain map information;
[0057] Wherein, the gain map information includes the spare map bit depth; and / or,
[0058] When the second gain map is a three-channel gain map, the gain map information includes the encoding information of the gain map for each of the three channels; or, the gain map information includes the encoding information of the image after the gain maps of the three channels are encapsulated; and / or,
[0059] The gain map information includes the gain map bit depth.
[0060] Eleventhly, a readable storage medium is provided, on which a program or instructions are stored, which, when executed by a processor, implement the steps of the method described in the first aspect, or implement the steps of the method described in the second aspect.
[0061] In a twelfth aspect, a wireless communication system is provided, comprising: a decoding end device and an encoding end device, wherein the decoding end device is configured to perform the steps of the method described in the first aspect, and the encoding end device is configured to perform the steps of the method described in the second aspect.
[0062] In a thirteenth aspect, a chip is provided, the chip including a processor and a communication interface coupled to the processor, the processor being configured to run programs or instructions to implement the method as described in the first aspect, or to implement the method as described in the second aspect.
[0063] In a fourteenth aspect, a computer program / program product is provided, the computer program / program product being stored in a storage medium, the computer program / program product being executed by at least one processor to implement the method as described in the first aspect, or to implement the method as described in the second aspect.
[0064] In this embodiment of the application, the reference map information and the gain map information are decoded respectively to obtain a first reference map and a first gain map; a first operation is performed based on the first reference map and the first gain map, and a first spare map is generated based on the first operation, which enables the application of the gain map on the reference map to generate a spare map. Furthermore, when the first gain map is a three-channel gain map, the gain map information includes the encoding information of the gain map for each of the three channels, or the gain map information includes the encoding information of the image after the gain maps of the three channels are encapsulated, which can solve the problem of how to implement the encoding and decoding of a three-channel gain map; and / or, determining that the resolution of the first spare map is the same as the resolution of the first reference map, or obtaining the spare map resolution from metadata and applying the first gain map based on the spare map resolution, can solve the problem of how to determine the resolution of the spare map; and / or, obtaining the spare map bit depth and performing spare map conversion based on the spare map bit depth, can solve the problem of how to determine the spare map bit depth; and / or, when it is determined that a color gamut space conversion is to be performed, performing conversion processing on the first reference map, can solve the problem of how to determine the processing timing of the conversion processing on the reference map; and / or, obtaining the gain map bit depth and applying the first gain map on the first reference map based on the gain map bit depth, can solve the problem of how to determine the gain map bit depth. Attached Figure Description
[0065] Figure 1 This is a block diagram of a wireless communication system applicable to embodiments of this application;
[0066] Figure 2a This is a schematic diagram illustrating the generation of an HDR image by combining an SDR image with a gain map, as provided in an embodiment of this application.
[0067] Figure 2b This is a schematic diagram illustrating the generation of an SDR image by combining an HDR image with a gain map, as provided in an embodiment of this application.
[0068] Figure 3 This is a schematic diagram of a gain map calculation process provided in an embodiment of this application;
[0069] Figure 4 This is a flowchart of a gain map application provided in an embodiment of this application;
[0070] Figure 5 This is a flowchart of a gain map application that includes linear transformation and color gamut transformation, provided in an embodiment of this application.
[0071] Figure 6 This is a block diagram of a color gamut conversion and gain map application with wireless linear conversion provided in an embodiment of this application;
[0072] Figure 7This is a flowchart of a method for generating a spare diagram provided in an embodiment of this application;
[0073] Figure 8 This is a flowchart of an encoding method provided in an embodiment of this application;
[0074] Figure 9 This is a schematic diagram of a spare drawing generation device provided in an embodiment of this application;
[0075] Figure 10 This is a schematic diagram of the structure of an encoding device provided in an embodiment of this application;
[0076] Figure 11 This is a schematic diagram of the structure of a communication device provided in an embodiment of this application;
[0077] Figure 12 This is a schematic diagram of the structure of a terminal provided in an embodiment of this application;
[0078] Figure 13 This is one of the structural schematic diagrams of a network-side device provided in the embodiments of this application;
[0079] Figure 14 This is a second schematic diagram of the structure of a network-side device provided in an embodiment of this application. Detailed Implementation
[0080] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.
[0081] The terms "first," "second," etc., used in this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first" and "second" are generally of the same class, not limited in number; for example, the first object can be one or more. Furthermore, "or" in this application indicates at least one of the connected objects. For example, the scope of protection for "A or B" covers at least three scenarios: Scenario 1: including A but not B; Scenario 2: including B but not A; Scenario 3: including both A and B. In addition, the terms "A and / or B," "at least one of A and B," and "at least one of A or B" also cover at least the above three scenarios. The character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0082] The term "instruction" in this application can be either a direct instruction (or explicit instruction) or an indirect instruction (or implicit instruction). A direct instruction can be understood as one in which the sender explicitly informs the receiver of specific information, the operation to be performed, or the requested result, etc., in the instruction sent. An indirect instruction can be understood as one in which the receiver determines the corresponding information based on the instruction sent by the sender, or makes a judgment and determines the operation to be performed or the requested result, etc., based on the judgment result.
[0083] It is worth noting that the technologies described in this application are not limited to Long Term Evolution (LTE) / LTE-Advanced (LTE-A) systems, but can also be used in other wireless communication systems, such as Code Division Multiple Access (CDMA), Time Division Multiple Access (TDMA), Frequency Division Multiple Access (FDMA), Orthogonal Frequency Division Multiple Access (OFDMA), Single-carrier Frequency-Division Multiple Access (SC-FDMA), or other systems. The terms "system" and "network" in this application are often used interchangeably, and the described technologies can be used with the systems and radio technologies mentioned above, as well as with other systems and radio technologies. The following description describes New Radio (NR) systems for illustrative purposes, and the term NR is used in most of the following description; however, these technologies can also be applied to systems other than NR systems, such as 6th generation (6G) radio systems. th Generation 6G communication system.
[0084] Figure 1This diagram illustrates a block diagram of a wireless communication system applicable to embodiments of this application. The wireless communication system includes a terminal 11 and a network-side device 12. The terminal 11 can be a mobile phone, tablet computer, laptop computer, notebook computer, personal digital assistant (PDA), handheld computer, netbook, ultra-mobile personal computer (UMPC), mobile internet device (MID), augmented reality (AR), virtual reality (VR) device, robot, wearable device, flight vehicle, vehicle user equipment (VUE), shipboard equipment, pedestrian user equipment (PUE), smart home devices (home appliances with wireless communication capabilities, such as refrigerators, televisions, washing machines, or furniture), game consoles, personal computers (PCs), ATMs, or self-service machines, etc. Wearable devices include: smartwatches, smart bracelets, smart headphones, smart glasses, smart jewelry (smart bracelets, smart chains, smart rings, smart necklaces, smart anklets, smart anklets, etc.), smart wristbands, smart clothing, etc. Among these, in-vehicle devices can also be referred to as in-vehicle terminals, in-vehicle controllers, in-vehicle modules, in-vehicle components, in-vehicle chips, or in-vehicle units, etc. It should be noted that the specific type of terminal 11 is not limited in this application embodiment. Network-side equipment 12 may include access network equipment or core network equipment, wherein access network equipment may also be referred to as Radio Access Network (RAN) equipment, radio access network function, or radio access network unit. Access network equipment may include base stations, Wireless Local Area Network (WLAN) access points (APs), or Wireless Fidelity (WiFi) nodes, etc.The term "base station" can be referred to as Node B (NB), Evolved Node B (eNB), Next Generation Node B (gNB), New Radio Node B (NR Node B), Access Point, Relay Base Station (RBS), Serving Base Station (SBS), Base Transceiver Station (BTS), Radio Base Station, Radio Transceiver, Basic Service Set (BSS), Extended Service Set (ESS), Home Node B (HNB), Home Evolved Node B, Transmit / Receive Point (TRP), or any other suitable term in the relevant field, as long as the same technical effect is achieved. The term "base station" is not limited to any specific technical terminology. It should be noted that this application embodiment only uses a base station in an NR system as an example for description and does not limit the specific type of base station.
[0085] Core network equipment, also known as core network nodes, core network functions, or core network elements, includes, but is not limited to, at least one of the following: Mobility Management Entity (MME), Access and Mobility Management Function (AMF), Session Management Function (SMF), User Plane Function (UPF), Policy Control Function (PCF), Policy and Charging Rules Function (PCRF), Edge Application Server Discovery Function (EASDF), Unified Data Management (UDM), Unified Data Repository (UDR), Home Subscriber Server (HSS), Centralized network configuration (CNC), Network Repository Function (NRF), Network Exposure Function (NEF), and Local NEF. The core network equipment (NEF, or L-NEF) includes the following functions: Binding Support Function (BSF), Application Function (AF), Location Management Function (LMF), Gateway Mobile Location Centre (GMLC), and Network Data Analytics Function (NWDAF). It should be noted that this application embodiment only uses the core network equipment in the NR system as an example and does not limit the specific type of core network equipment. If the name of the core network equipment mentioned in this application embodiment changes in subsequent protocol versions (e.g., 6G), it will still be within the scope of protection of this application.
[0086] Optionally, the core network equipment can be implemented by one or more functional modules in a single device, or by multiple devices working together; this application does not specifically limit this. It is understood that the aforementioned functional modules can be network elements in hardware devices, software functional modules running on dedicated hardware, or virtualized functional modules instantiated on a platform (e.g., a cloud platform).
[0087] For ease of understanding, the following explains some aspects of the embodiments of this application:
[0088] 1. HDR High Dynamic Range Imaging Based on Gain Map
[0089] With advancements in image acquisition and display technologies, high dynamic range (HDR) imaging and display can now be achieved on consumer electronics devices such as smartphones, tablets, and computer monitors. While more and more devices support HDR still image display, a large number of electronic devices still only support standard dynamic range (SDR). Achieving good display results on both HDR and SDR display devices is crucial, and gain map-based HDR acquisition, storage, and display solutions are a commonly used approach. Gain maps are typically generated during HDR image acquisition and, as additional information, can be stored in a specific file format, such as the image format itself or as additional information for a particular image format, before encoding, encapsulation, and transmission. During display device application, the gain map information is decoded. Gain maps are usually generated based on HDR images and their corresponding tone-mapped SDR images. The use of gain maps can involve generating corresponding HDR images from SDR and gain maps, or vice versa. Figure 2a and Figure 2b As shown. Both formats require storing gain map information. Therefore, the gain map information, as additional information, increases the image's storage space. It is usually referred to as... Figure 2a SDR images and Figure 2b The HDR image in the image is the baseline image. The image generated after applying a gain map to the baseline image is called the backup image, such as... Figure 2a HDR images and Figure 2b The SDR image in the image is a backup image.
[0090] 2. Calculation, downsampling, and normalization of the gain map.
[0091] For the calculation of the gain map, please refer to... Figure 3The gain map is generated based on the luminance values of the backup and reference maps. For example, the gain map can be used as a ratio of the corresponding luminance values (e.g., corresponding pixel values) of the backup and reference maps. Before calculating the ratio of their luminance values, the backup and reference maps using a certain bit depth can be transformed to the linear domain; alternatively, they can be transformed to the corresponding PQ, HLQ, or gamma domains based on perceptual quantization (PQ), hybrid log-gamma (HLQ), or gamma. In some cases, the values in the reference map need to be scaled and aligned so that the floating-point values corresponding to the three RGB color values of the reference diffuse white are 1.0. Normalization or integer-to-float conversion of the reference map, as well as floating-point-to-integer conversion, requires the bit depth information of the reference map.
[0092] The gain map is used as a multiplier in application. A value of "1" indicates that the backup map and the reference map have the same brightness value. A value less than 1 indicates that the backup map becomes darker, and a value greater than 1 indicates that the backup map becomes brighter.
[0093] In one implementation, the gain map is the ratio of the corresponding brightness values of the linear domain spare map and the reference map, and the ratio value is Log2, i.e.:
[0094] G = log2((L alternate +k alternate ) / (L baseline +k baseline ))
[0095] Where L alternate This is the brightness value of the backup image, L. baseline It is the brightness value of the reference image, k alternate and k baseline It is a non-zero constant. Gain maps can be single-channel or multi-channel. A single-channel gain map means that the same gain map is applied to the R / G / B channels. A multi-channel, such as a three-channel gain map, means that each R, G, and B channel has its own gain map.
[0096] To reduce the storage space of the gain map, it can be downsampled, such as by halving both its length and width. The downsampled gain map is then normalized. The gain map normalization and denormalization operations require the maximum, minimum, and bit depth information of the current gain map. The normalization operation is as follows:
[0097] G 归一化 =(GG 最小值 ) / (G 最大值 -G最小值 )
[0098] Where G is the gain map value to be normalized, G 归一化 Let G be the normalized value. 最小值 G is the minimum value of the current gainmap. 最大值 This represents the maximum value of the current gain map. In practical applications, the normalized gain map values will also undergo optional gamma correction, i.e.:
[0099] G 归一化_gamma =G 归一化 gamma
[0100] If the gamma value is 1, it is equivalent to no gamma correction processing being performed.
[0101] The normalized gain map values are then encoded with a bit depth of N (N can be 8, 10, 12, etc.) to scale the normalized gain map values to 0 to 2. N The scaling range is -1. If N is 8, the scaling range is 0 to 255.
[0102] 3. Application of gain diagrams
[0103] The application process of gain map is as follows: Figure 4 As shown. The baseline image and gain map are typically encoded in JPEG / HEIF / AVIF or other supported image formats at the acquisition end. In application, the baseline image and gain map are first decoded to obtain the decoded baseline image and gain map, along with their corresponding metadata. The decoded baseline image needs to be converted to the linear domain, or to the PQ, HLG, or gamma domain. After the baseline image is converted from the nonlinear domain to the linear domain, it is usually normalized or scaled, converting the pixel values from integers to floating-point numbers.
[0104] When displaying the gain map, the bit depth information of the gain map is required. Therefore, the decoded gain map value G with a bit depth of N needs to be converted to a floating-point number, for example, G... float =G / (2 N -1). Perform inverse gamma operation based on the gamma value in the metadata, and perform inverse normalization operation based on the maximum and minimum values of the gain map in the metadata to obtain the gain map value in the log2 domain.
[0105] If the gain map is downsampled before compression encoding, the decoded gain map value G needs to be processed on the display before application. log2An upsampling operation is performed to make the gain map resolution the same as the reference image resolution. Then, based on the display device's capabilities and the current display environment, the gain map is applied to the reference image, and the gain map values are scaled to generate a backup image in the linear domain, PQ domain, HLG domain, or gamma domain. For each color component of the reference image, the backup image is generated by combining the reference image and the gain map in the linear RGB space.
[0106] Alternative plots in the linear, PQ, HLG, or gamma domains need to be encoded according to the bit depth N supported by the display and sent to the display, scaled to 0 to 2. N The scaling range is -1. If N is 10, the scaling range is 0 to 1023.
[0107] In related technologies, Figure 5 The flowchart only shows the transformation from the baseline plot to the linear domain. This module can also be a transformation of the PQ, HLG, or gamma domains.
[0108] 4. Color gamut space conversion
[0109] The gain map metadata contains three metadata entries related to color gamut: the base map's color gamut, the standby map's color gamut, and the gain map's applied color gamut. The base and standby map's color gamut can use Exif colorspace tags, ICC profiles, or coding-independent code points (CICP) metadata to describe their color encoding and color space. The gain map's applied color space metadata describes the color space used when the gain map is applied; it can be either the base map's color space or the standby map's color space.
[0110] Figure 6 It is a block diagram of a gain graph application that includes possible color space conversion modules. Figure 6 The dashed box represents two optional modules, only one of which will be executed. When the gain map applies a color gamut space that is the alternate map color gamut space, and the reference map color gamut space differs from the alternate map color gamut space, the reference map color gamut space is converted to the alternate map color gamut space before applying the gain map. When the gain map applies a color gamut space that is the reference map color gamut space, and the reference map color gamut space differs from the alternate map color gamut space, after applying the gain map, the newly acquired linear alternate map color gamut space is converted to the color space specified by the alternate map color gamut space metadata.
[0111] 5. Gain graph metadata encapsulation and gain graph storage
[0112] In related technologies, gain map data is stored using a binary metadata structure. This data structure uses big-endian byte order, meaning the most significant byte is stored at the least significant address. For example, the data structure is as follows:
[0113]
[0114] GainMapChannel specifies the metadata for the gain map of each channel. If it is a single channel, this metadata is applied to all three RGB channels. If it is a multi-channel channel, the R, G, and B channels each have their own corresponding channel metadata.
[0115] In the JPEG container format, the gain map and its metadata are stored using the CIPA Multi-Picture Format (CIPADC-007). The benchmark image contains the APP2 marker from Table 1, and its metadata stores the corresponding information from the GainMapVersion structure. The benchmark image is the first individual image stored using the CIPA Multi-Picture Format (CIPADC-007).
[0116] Table 1
[0117]
[0118] Among them, "unique header label" refers to a unique header label.
[0119] The null-termination character refers to the null terminator.
[0120] Metadata refers to metadata.
[0121] When using JPEG format, the gain map data is compressed using JPEG and stored after the baseline image using CIPA DC-007 Multi-PictureFormat, and the MP type of the gain map follows the definition of gain map type in CIPA DC-007. The gain map includes the APP2 marker in Table 1. CIPA DC-007 Multi-Picture Format supports storing multiple other individual images after the baseline image.
[0122] The following description, in conjunction with the accompanying drawings, details the backup drawing generation method, encoding method, apparatus, and related equipment provided in this application through some embodiments and application scenarios.
[0123] See Figure 7 , Figure 7 This is a flowchart of a backup image generation method provided in an embodiment of this application. The backup image generation method can be executed by a decoding end device, such as... Figure 7 As shown, the method for generating backup diagrams includes the following steps:
[0124] Step 101: Decode the reference map information and the gain map information respectively to obtain the first reference map and the first gain map;
[0125] Step 102: Perform a first operation based on the first reference map and the first gain map, and generate a first backup map based on the first operation;
[0126] Wherein, when the first gain map is a gain map of three channels, the gain map information includes the encoding information of the gain map of each of the three channels, or the gain map information includes the encoding information of the image after the gain map of the three channels is encapsulated;
[0127] And / or,
[0128] The first operation satisfies at least one of the following:
[0129] The resolution of the first backup image is determined to be the same as the resolution of the first reference image;
[0130] Obtain the alternative map resolution from the metadata, and apply the first gain map based on the alternative map resolution;
[0131] Obtain the backup image bit depth, and perform backup image conversion based on the backup image bit depth;
[0132] If a color gamut space conversion is determined, the first reference image is converted.
[0133] Obtain the gain map bit depth, and apply the first gain map on the first reference map based on the gain map bit depth.
[0134] In this context, "gain map" can also be translated as "enhancement map," and "gain map" can also be described as "enhancement map."
[0135] In one implementation, when applying the first gain map, it can be determined that the resolution of the first backup map is the same as the resolution of the first reference map.
[0136] The first reference map can also be described as a reference map, a decoded reference map, or a reference map obtained through decoding. The first gain map can also be described as a gain map, a decoded gain map, or a gain map obtained through decoding.
[0137] The step of obtaining the backup image resolution from the metadata may be obtained from the gain image metadata or from the reference image metadata; etc., this embodiment does not limit this step.
[0138] In one embodiment, the baseline image information may include the encoding information of the second baseline image (or expressed as the source baseline image); or, the baseline image information may include the encoding information of the second baseline image and the encoding information of the baseline image metadata.
[0139] In one embodiment, the gain map information may include the encoding information of the second gain map (or expressed as the source gain map); or, the gain map information may include the encoding information of the second gain map and the encoding information of the gain map metadata.
[0140] In one embodiment, decoding the reference map information and the gain map information respectively to obtain the first reference map and the first gain map includes:
[0141] The reference map information and the gain map information and their metadata are decoded respectively to obtain the first reference map and the first gain map and their corresponding metadata.
[0142] The step of performing a first operation based on the first reference map and the first gain map, and generating a first backup map based on the first operation, includes:
[0143] A first operation is performed based on the first baseline map, the first gain map, and the corresponding metadata, and a first backup map is generated based on the first operation.
[0144] In one embodiment, decoding the reference map information and the gain map information respectively to obtain the first reference map and the first gain map includes:
[0145] The encoding information of the reference map, the gain map, the gain map metadata, and the reference map metadata are decoded respectively to obtain the first reference map, the first gain map, the gain map metadata, and the reference map metadata.
[0146] The step of performing a first operation based on the first reference map and the first gain map, and generating a first backup map based on the first operation, includes:
[0147] A first operation is performed based on the first reference map, the first gain map, the gain map metadata, and the reference map metadata, and a first backup map is generated based on the first operation.
[0148] In one embodiment, the first operation includes applying a gain map, and during the application of the gain map, determining that the resolution of the first backup map is the same as the resolution of the first reference map.
[0149] In one implementation, the first operation includes applying a gain map, the application of the gain map including: obtaining a spare map resolution from metadata, and applying the first gain map based on the spare map resolution.
[0150] In one embodiment, the first operation includes: after generating a linear spare map using the applied gain map, obtaining the spare map bit depth, and performing spare map conversion based on the spare map bit depth.
[0151] In one embodiment, the first operation includes: performing a conversion process on the first reference image before applying the gain map, provided that a color gamut space conversion is determined; or performing a conversion process on the first reference image after applying the gain map, provided that a color gamut space conversion is determined.
[0152] In one embodiment, the first operation includes applying a gain map, the application of the gain map including: obtaining a gain map bit depth, and applying the first gain map on the first reference map based on the gain map bit depth.
[0153] It's important to note that in related technologies, the length and width of the gain map need to be compared with those of the baseline map when applying the gain map. If the length and width of the gain map are smaller than those of the baseline map, the gain map needs to be upsampled to make its length and width the same as the baseline map before application. The metadata definition does not specify a resolution for the backup map. Therefore, different implementations may yield different results at different backup map resolutions, leading to poor versatility in the application of gain maps in HDR images.
[0154] In this embodiment of the application, determining that the resolution of the first backup image is the same as the resolution of the first reference image can solve the problem of how to determine the resolution of the backup image when metadata is missing.
[0155] like Figure 3 As shown, generating a gain map requires both a source alternate image and a source reference image. The relationship between the source alternate image and the source reference image during gain map generation is not specified in related technologies. In one implementation, the source alternate image and the source reference image must have the same resolution and be in the same color space before generating the gain map. The reference image and the generated gain map are compressed and encoded and stored in JPEG, HEIF, AVIF, or other image formats. The resolution information, such as the length and width, of the reference image and the gain map is encoded in the image format's metadata. When applying the gain map on the display side or editing the gain map HDR image, the resolution information, such as the length and width, of the reference image and the gain map can be obtained from their image format's metadata or auxiliary information. The alternate image is not related to the reference image or the gain map. Figure 1Because the encoding is performed on the gain map, the resolution information of the backup image cannot be obtained when displaying or editing the gain map HDR image. To clarify the gain map application operation, this embodiment determines that when applying the gain map, the default resolution of the backup image is the same as the resolution of the decoded reference image.
[0156] For example, when generating a gain map at the shooting end (or during HDR image editing), a source backup map and a source reference map are used. After the gain map is generated, it can undergo operations such as downsampling, normalization, encoding, decoding, upsampling, and denormalization. The reference map can also be encoded and decoded. When applying the gain map on the display side, the generated backup map is an approximation of the source backup map, not an exact replica; it is a reconstructed backup map. If the gain map is not downsampled and a lossless encoding and decoding scheme is used, the source gain map can be completely reconstructed on the display side. Considering that lossless encoding requires more storage space than lossy encoding, lossy encoding and decoding are usually used for the gain map.
[0157] It's important to note that after applying the gain map and generating the linear domain spare map, the linear domain spare map needs to be sent to the display. Sending the spare map to the display requires converting it from a linear domain floating-point number to an RGB image with a bit depth of N. The bit depth N is affected by two factors: the bit depth supported by the display device and the bit depth of the spare map used to generate the gain map. In related technologies, there are no constraints or definitions regarding the bit depth of the spare map. For example, if the spare map has a 12-bit bit depth when generating the gain map, but the display device only supports a 10-bit bit depth, the spare map obtained from applying the gain map needs to be converted to 10 bits. If the display is unaware that the source spare map used to generate the gain map is 12-bit, artifacts such as banding may occur during the conversion process.
[0158] In this embodiment, the backup image bit depth is obtained, and backup image conversion is performed based on the backup image bit depth. For example, the backup image bit depth can be obtained from the gain image data; or, the backup image bit depth can be selected according to the maximum bit depth supported by the electronic device, which can solve the problem of how to determine the backup image bit depth.
[0159] It should be noted that in related technologies, the gain map can be single-channel or three-channel. When a three-channel gain map is used, the gain of each channel is usually important. When compressing and encoding a three-channel gain map, if JPEG or HEVC encoding is used, the RGB data needs to be converted to YCbCr / YUV 4:2:0. After conversion, due to downsampling, the gain map in the G and B channels will lose half of its information, which will lead to a decrease in the quality of the reconstructed image on the display.
[0160] In this embodiment of the application, when the first gain map is a gain map of three channels, the gain map information includes the encoding information of the gain map of each of the three channels, or the gain map information includes the encoding information of the image after the gain map of the three channels is encapsulated, which can realize the encoding and encapsulation method of the three-channel gain map.
[0161] Understandably, a gain map can be single-channel, in which case the same gain map is applied to all three RGB channels. A gain map can also be three-channel, which is suitable for processing content with rich color and contrast. The gain map is the ratio of pixel brightness between the reference and baseline images, not a traditional grayscale or color image. To facilitate integration into existing image encoding workflows, the gain map and the baseline... Figure 1 Similarly, image codecs are used for compression and decompression. In scenarios suitable for three-channel gain maps, the gain values of the three channels are different and applied to the RGB channels respectively. In current JPEG, HEIF, or AVIF image formats, the RGB can be converted to YCbCr 4:2:0 or YCbCr 4:2:2 formats by an image encoder before compression encoding. If it is a three-channel gain map, and it is encapsulated into an image according to the RGB color components, the gain map corresponding to the red R channel is encapsulated into the R channel of the RGB image format, the gain map corresponding to the green G channel is encapsulated into the G channel of the RGB image format, and the gain map corresponding to the blue B channel is encapsulated into the B channel of the RGB image format. After converting from RGB to YCbCr, the gain information of the G channel is not lost, but the gain information of the R and B channels is halved. Although it is upsampled from YCbCr to RGB after decoding, some gain information of the R and B channels will be lost, affecting the quality of the generated backup image.
[0162] In one implementation, the gain maps of the three channels can be processed as three separate grayscale images, for example, the encoding and decoding order being R, G, B channels. Each channel's gain map is encoded and decoded as an independent grayscale image. In this processing method, no additional downsampling is performed on the gain map of a single channel, preserving more information from the gain map and helping to ensure the quality of the generated backup image.
[0163] In one implementation, if the gain map is three-channel and the three-channel gain maps are processed as a single RGB image, then only one three-channel gain map is encapsulated and decoded. If the gain map is three-channel and the three-channel gain maps are three grayscale images, then the three-channel gain maps are encapsulated and decoded separately, in the order of R, G, B, or other pre-defined processing order. For JPEG encoding, to obtain high quality reconstructed gain map and backup image, three grayscale images can be used to encapsulate and encapsulate the gain map. For HEVC encoding or other encoding methods that support the 4:4:4 chroma component format, where chroma components are not downsampled, the three-channel gain maps can still be merged into a single RGB image for encoding and encapsulation. To obtain a smaller gain map storage space, the three-channel gain maps can be merged into a single RGB image for encoding, with the chroma component sampling format being 4:2:0 or 4:2:2.
[0164] Compared to a scheme where each channel is encoded as a separate grayscale image, a scheme where all three channels are encoded as a single RGB image will require less storage space.
[0165] One could consider a storage space and image quality decision: whether to encode each channel as a separate grayscale image or to encode all three channels as a single RGB image.
[0166] It should be noted that in the color gamut conversion part of related technologies, such as Figure 6 As shown, the block diagram and description do not explain the operations between the reference image and the color gamut conversion module. In the current module, the reference image is decoded into JPEG, HEIF, or AVIF, and then its color gamut is converted. Then, based on the reference image, gain image, metadata, and current display capabilities, the gain image is applied. The application of the gain image should be performed in the linear domain, or the PG, HLG, or gamma domain. The current description and block diagram do not cover these operations.
[0167] In this embodiment, when a color gamut space conversion is determined to be performed, the first reference image is converted. For example, if the color gamut space applied to the gain image is the same as the backup image's color gamut space, and the color gamut space of the reference image differs from that of the backup image, the first reference image is converted; the converted first reference image undergoes color gamut space conversion; the first gain image is applied to the color gamut space-converted first reference image to generate a first backup image. Alternatively, if the color gamut space applied to the gain image is the same as the reference image's color gamut space, and the color gamut space of the reference image differs from that of the backup image, the first reference image is converted; the first gain image is applied to the converted first reference image; the color gamut space of the first reference image after applying the first gain image is converted to generate a first backup image. This solves the problem that when color gamut conversion is required before or after applying the gain image, the reference image needs to undergo linear conversion, or PQ, HLG, or gamma domain conversion.
[0168] It should be noted that in related technologies, the bit depth quantization of the gain map is defined in the gain map metadata. When applying the gain map, the decoded gain map metadata does not contain the gain map bit depth quantization metadata. Therefore, bit depth information is missing when performing floating-point operations on the gain map.
[0169] In this embodiment of the application, the gain map bit depth is obtained, and the first gain map is applied on the first reference map based on the gain map bit depth.
[0170] In this embodiment of the application, the reference map information and the gain map information are decoded respectively to obtain a first reference map and a first gain map; a first operation is performed based on the first reference map and the first gain map, and a first spare map is generated based on the first operation, which enables the application of the gain map on the reference map to generate a spare map. Furthermore, when the first gain map is a three-channel gain map, the gain map information includes the encoding information of the gain map for each of the three channels, or the gain map information includes the encoding information of the image after the gain maps of the three channels are encapsulated, which can solve the problem of how to implement the encoding and decoding of a three-channel gain map; and / or, determining that the resolution of the first spare map is the same as the resolution of the first reference map, or obtaining the spare map resolution from metadata and applying the first gain map based on the spare map resolution, can solve the problem of how to determine the resolution of the spare map; and / or, obtaining the spare map bit depth and performing spare map conversion based on the spare map bit depth, can solve the problem of how to determine the spare map bit depth; and / or, when it is determined that a color gamut space conversion is to be performed, performing conversion processing on the first reference map, can solve the problem of how to determine the processing timing of the conversion processing on the reference map; and / or, obtaining the gain map bit depth and applying the first gain map on the first reference map based on the gain map bit depth, can solve the problem of how to determine the gain map bit depth.
[0171] Optionally, obtaining the backup map bit depth includes:
[0172] Obtain the backup map bit depth from the gain map metadata, wherein the gain map information includes the gain map metadata.
[0173] In this embodiment, the backup map bit depth is obtained from the gain map data, and the gain map information includes the gain map data, which can solve the problem of how to determine the backup map bit depth.
[0174] Optionally, the spare map bit depth is stored in the gain map data in a binary structure.
[0175] The spare map bit depth in the gain map data can be spare map bit depth metadata.
[0176] When applying a gain map, to accurately reconstruct and generate a backup map, it is necessary to know the bit depth of the source backup map used to generate the gain map. How to obtain the bit depth of the source backup map is a problem that needs to be solved. In this embodiment, the bit depth of the source backup map can be stored as metadata in the gain map metadata. When applying the gain map, the bit depth of the backup map can be decoded from the gain map metadata. Based on the bit depth N of the backup map, before displaying the backup map, the linear backup map generated by applying the gain map can be converted into an RGB image with a bit depth of N, for example, converting the linear backup map from a floating-point number to an integer with a bit depth of N. If the bit depth N is less than or equal to the bit depth supported by the display device, it can be displayed directly. If the bit depth N is greater than the bit depth M supported by the display device, the N-bit backup map can be converted into an M-bit image for display. Specific algorithms can be introduced during the conversion process to reduce potential artifacts such as banding.
[0177] For example, if the source spare image is 12-bit, but the display device only supports 10-bit, the linear domain spare image obtained by applying the gain map can be converted into a 12-bit RGB image, and then the 12-bit RGB image can be converted into a 10-bit RGB image using a specific algorithm before being sent to the display device. Another implementation method is to directly convert the linear domain spare image obtained by applying the gain map into a 10-bit RGB image before sending it to the display device, but this has a higher probability of artifacts.
[0178] The bit depth information of the spare image can be stored in a binary structure, as shown below:
[0179] aligned(8)class GainMapMetadata{
[0180] GainMapVersion version;
[0181] if(minimum_version==0){
[0182] unsigned int(1)is_multichannel;
[0183] unsigned int(1)use_base_colour_space;
[0184] unsigned int(3)gain_map_quantization;
[0185] unsigned int(3)alternate_bit_depth;
[0186] int channel_count=(is_multichannel)*2+1;
[0187] unsigned int(32)base_hdr_headroom_numerator;
[0188] unsigned int(32)base_hdr_headroom_denominator;
[0189] unsigned int(32)alternate_hdr_headroom_numerator;
[0190] unsigned int(32)alternate_hdr_headroom_denominator;
[0191] GainMapChannel channels[channel_count];
[0192] }
[0193] `alternate_bit_depth` indicates the bit depth of the alternate bit depth. For example, 000 is 8 bits, 001 is 10 bits, 010 is 12 bits, 011 is 14 bits, 100 is 16 bits, and other values are reserved bits. In other embodiments, the number of bits for `alternate_bit_depth` can be selected based on the number of `alternate_bit_depth` bits that need to be supported. For example, if there are only 4 options, 2 bits can be used to represent `unsigned int(2)alternate_bit_depth`.
[0194] Optionally, obtaining the backup map bit depth includes:
[0195] If the spare map bit depth is not included in the gain map data, the spare map bit depth is selected according to the maximum bit depth supported by the electronic device, and the gain map information includes the gain map data.
[0196] The selected backup map bit depth is less than or equal to the maximum bit depth supported by the electronic device.
[0197] Alternatively, the electronic device may be a display device.
[0198] In one embodiment, selecting a backup image bit depth based on the maximum bit depth supported by the electronic device includes: obtaining a reference image bit depth, and selecting a backup image bit depth based on the reference image bit depth and the maximum bit depth supported by the electronic device.
[0199] The bit depth of the reference map can be the bit depth of the first reference map.
[0200] In one implementation, if the gain image metadata does not contain bit depth information for a spare image, when the reference image is SDR, the bit depth of the spare image can be selected according to the following rules: the selected bit depth is greater than the SDR bit depth and less than or equal to the bit depth supported by the display device. When the reference image is HDR, the selected bit depth of the spare image is less than the HDR bit depth and not greater than the bit depth supported by the display device.
[0201] In this embodiment, when the spare bit depth is not included in the gain image data, the spare bit depth is selected according to the maximum bit depth supported by the electronic device, which can solve the problem of how to determine the spare bit depth; furthermore, the selected spare bit depth is less than or equal to the maximum bit depth supported by the electronic device, thereby ensuring that the selected spare bit depth can be applied to the electronic device.
[0202] Optionally, when the first reference image is a standard dynamic range SDR image, the bit depth of the selected backup image is greater than the bit depth of the first reference image; or,
[0203] When the first reference image is a high dynamic range (HDR) image, the bit depth of the selected backup image is less than the bit depth of the first reference image.
[0204] Optionally, the gain map information includes gain map metadata, the gain map metadata includes the gain map bit depth, and the data type of the gain map bit depth is binary metadata;
[0205] or,
[0206] The gain map information includes gain map auxiliary information in image format, and the gain map auxiliary information includes the gain map bit depth.
[0207] The gain map bit depth in the gain map metadata can be in the form of gain map bit depth metadata. Gain map bit depth metadata can be used to store the bit depth information of the gain map. In one embodiment, the minimum bit depth of the gain map is 8 bits. The bit depth of the gain map may differ from the bit depth of the reference map or the spare map. The gain map bit depth metadata can be stored in a binary structure, as shown below:
[0208] aligned(8)class GainMapMetadata{
[0209] GainMapVersion version;
[0210] if(minimum_version==0){
[0211] unsigned int(1)is_multichannel;
[0212] unsigned int(1)use_base_colour_space;
[0213] unsigned int(3)gain_map_quantization;
[0214] unsigned int(3) reserved;
[0215] int channel_count=(is_multichannel)*2+1;
[0216] unsigned int(32)base_hdr_headroom_numerator;
[0217] unsigned int(32)base_hdr_headroom_denominator;
[0218] unsigned int(32)alternate_hdr_headroom_numerator;
[0219] unsigned int(32)alternate_hdr_headroom_denominator;
[0220] GainMapChannel channels[channel_count];
[0221] }
[0222] `gain_map_quantization` is used to indicate the bit depth of the gain map. For example, 000 is 8 bits, 001 is 10 bits, 010 is 12 bits, 011 is 14 bits, 100 is 16 bits, and other values are reserved. This application provides a binary encapsulation structure for the gain map bit depth metadata in the gain map metadata. In other embodiments, the bits for `gain_map_quantization` can be selected based on the number of bit depths that need to be supported. For example, if there are only 4 options, 2 bits can be used to represent `unsigned int(2)gain_map_quantization`.
[0223] In one implementation, the gain map bit depth is not stored separately as binary structure metadata, but rather in the auxiliary information of the image format, such as the auxiliary information for JPEG, HEIF, or AVIF image formats. The bit depth information of the gain map is obtained by decoding the auxiliary information of the JPEG, HEIF, or AVIF image format. When displaying the applied gain map, the bit depth information of the gain map is used, and the decoded gain map value G with a bit depth of N is converted into a floating-point number G. float =G / (2 N -1).
[0224] In this embodiment, the gain map information includes gain map metadata, which includes the gain map bit depth, and the data type of the gain map bit depth is binary metadata; or, the gain map information includes gain map auxiliary information in image format, which includes the gain map bit depth; thus, the gain map bit depth can be obtained from the gain map metadata or the gain map auxiliary information, which can solve the problem of how to determine the gain map bit depth.
[0225] Optionally, the step of performing a first operation based on the first reference map and the first gain map, and generating a first backup map based on the first operation, includes:
[0226] When the color gamut space of the gain map is the spare map color gamut space, and the color gamut space of the reference map is different from that of the spare map color gamut space, the first reference map is converted.
[0227] Perform color gamut space conversion on the first reference image after conversion;
[0228] The first gain map is applied to the first reference map after color gamut space conversion to generate the first backup map.
[0229] Here, "gain map applied color gamut space" can be understood or replaced as the color gamut space applied to the gain map, or the color gamut space of the applied gain map. The color gamut space applied to the gain map can refer to the color gamut space applied to the first gain map.
[0230] Additionally, the color gamut space of the backup image can be understood or replaced as the color gamut space of the backup image. The color gamut space of the backup image can refer to the color gamut space of the first backup image.
[0231] Additionally, the reference image color gamut space can be understood or replaced as the color gamut space of the reference image. The reference image color gamut space can refer to the color gamut space of the first reference image.
[0232] In one implementation, based on the gain map metadata information, when color space conversion is required, it is determined whether the applied gain map is performed in the linear domain, or in the PQ, HLG, or gamma domain.
[0233] For example, when the color gamut space applied to the gain map is the spare map color gamut space, and the reference map color gamut space is different from the spare map color gamut space, the reference map and gain map are converted from integers to floating-point numbers based on the reference map bit depth and the gain map bit depth, respectively. A linear domain conversion, or a PQ, HLG, or gamma domain conversion, is performed before applying the gain map. Figure 5 As shown, a color gamut space conversion is then performed, followed by the application of a gain map to generate the final reconstructed backup map.
[0234] In addition, linear domain transformation, such as gamma correction of RGB images, involves performing inverse gamma correction on the decoded RGB image.
[0235] In this embodiment, when the color gamut space applied to the gain map is the color gamut space of the backup map, and the color gamut space of the reference map is different from that of the backup map, the first reference map is converted; the first reference map after conversion is converted to a different color gamut space; the first gain map is applied to the first reference map after color gamut space conversion to generate the first backup map. In this way, the problem of how to determine the processing timing for converting the reference map can be solved.
[0236] Optionally, the step of performing a first operation based on the first reference map and the first gain map, and generating a first backup map based on the first operation, includes:
[0237] When the color gamut space of the gain map is the color gamut space of the reference map, and the color gamut space of the reference map is different from that of the spare map, the first reference map is converted.
[0238] The first gain map is applied to the first reference map after the conversion process;
[0239] A color gamut space conversion is performed on the first reference image after applying the first gain image to generate a first backup image.
[0240] The color gamut space used for the gain map, the color gamut space of the backup map, and the color gamut space of the reference map can be referred to in the relevant descriptions of the color gamut space used for the gain map, the color gamut space of the backup map, and the color gamut space of the reference map, and will not be repeated here.
[0241] In one implementation, based on the gain map metadata information, when color space conversion is required, it is determined whether the applied gain map is performed in the linear domain, or in the PQ, HLG, or gamma domain.
[0242] When the color gamut space applied to the gain map is the reference map color gamut space, and the reference map color gamut space differs from the backup map color gamut space, after obtaining the decoded reference map, the reference map and gain map are converted from integers to floating-point numbers based on the reference map bit depth and the gain map bit depth, respectively, and then linear domain conversion, or PQ, HLG, or gamma domain conversion is performed. The gain map is then applied, and the color space of the reconstructed backup map generated by applying the gain map is converted to the color space specified by the backup map color space metadata to generate the final reconstructed backup map. Figure 5 As shown.
[0243] In addition, linear domain transformation, such as gamma correction of RGB images, involves performing inverse gamma correction on the decoded RGB image.
[0244] In this embodiment, when the color gamut space applied to the gain map is the color gamut space of the reference map, and the color gamut space of the reference map is different from that of the backup map, the first reference map is converted; the first gain map is applied to the first reference map after conversion; the color gamut space of the first reference map after applying the first gain map is converted to generate the first backup map. In this way, the problem of how to determine the processing timing of the conversion of the reference map can be solved.
[0245] Optionally, the conversion process includes at least one of the following:
[0246] Conversion between integers and floating-point numbers;
[0247] Linear transformation, perceptual quantization PQ domain transformation, mixed logarithmic HLG domain transformation, or gamma domain transformation.
[0248] The conversion process of the first reference image may include: converting the decoded first gain image from an integer to a floating-point number based on the bit depth of the first gain image; converting the decoded first reference image from an integer to a floating-point number based on the bit depth of the first reference image; and performing linear conversion, PQ domain conversion, HLG domain conversion, or gamma domain conversion on the first reference image.
[0249] Optionally, the first operation also satisfies any one of the following:
[0250] If the color gamut space used in the gain map is the spare map color gamut space, and the color gamut space of the reference map is different from that of the spare map color gamut space, then the reference map color gamut space will be converted to the spare map color gamut space.
[0251] When the color gamut space of the gain map is the reference map color gamut space, and the reference map color gamut space is different from the spare map color gamut space, it is determined to convert the acquired reconstructed linear spare map color gamut space to the color space indicated by the spare map color gamut space metadata.
[0252] If the color gamut space of the reference image and the color gamut space of the backup image are the same, no color gamut space conversion is performed.
[0253] The color gamut space used for the gain map, the color gamut space of the backup map, and the color gamut space of the reference map can be referred to in the relevant descriptions of the color gamut space used for the gain map, the color gamut space of the backup map, and the color gamut space of the reference map, and will not be repeated here.
[0254] It should be noted that the flowchart for color gamut space conversion is as follows: Figure 6 As shown. Based on the applied color space information of the gain map metadata, an optional color space conversion can be performed before or after applying the gain map.
[0255] In one implementation, when the color gamut space applied to the gain map is the spare map color gamut space, and the reference map color gamut space is different from the spare map color gamut space, the reference map color gamut space is converted to the spare map color gamut space before applying the gain map.
[0256] In one implementation, when the color gamut space applied to the gain map is the reference map color gamut space, and the reference map color gamut space is different from the standby map color gamut space, after applying the gain map, the newly acquired reconstructed linear standby map color gamut space is converted to the color space specified by the standby map color gamut space metadata.
[0257] In one implementation, when the color gamut space of the reference image is the same as that of the backup image, color gamut space conversion is not performed before or after applying the gain image.
[0258] Additionally, when color space conversion is required, determine whether to apply the gain map in the linear domain, or in the PQ, HLG, or gamma domain.
[0259] In this embodiment, if the gain map applies a color gamut space that is the backup map color gamut space, and the reference map color gamut space is different from the backup map color gamut space, it is determined that the reference map color gamut space will be converted to the backup map color gamut space; or, if the gain map applies a color gamut space that is the reference map color gamut space, and the reference map color gamut space is different from the backup map color gamut space, it is determined that the acquired reconstructed linear backup map color gamut space will be converted to the color space indicated by the backup map color gamut space metadata; or, if the reference map color gamut space and the backup map color gamut space are the same, no color gamut space conversion is performed. This allows for determining how to perform color gamut space conversion and how to conduct it.
[0260] Optionally, the encoding information of the gain map of each of the three channels includes: encoding information obtained by encoding the grayscale image of the gain map of each of the three channels respectively;
[0261] or,
[0262] The encoding information of the image after the gain map of the three channels is encapsulated includes: the encoding information obtained by encapsulating the gain map of the three channels and encoding the encapsulated image.
[0263] Here, the gain map of the three channels can refer to a three-channel gain map. For example, the RGB channels each have their own gain maps G_R, G_G, and G_B. In this case, there are two encoding and encapsulation methods:
[0264] A): Encode the grayscale image of the gain map of each of the three channels separately. For example, encode and encapsulate the gain maps G_R, G_G, and G_B of the three channels separately.
[0265] B): The gain maps of the three channels are encapsulated, and the encapsulated image is encoded. For example, the gain maps G_R, G_G, and G_B of the three channels are encapsulated into one image (similar to a color image including RGB three channels). In JPEG or HEVC encoding, RGB will be converted to YCbCr format, and then encoded and encapsulated as a three-channel image. The luminance component corresponds to the gain map of the G channel, and the chrominance component corresponds to the gain maps of the R and B channels. Or, the Y luminance channel corresponds to G_G, the chrominance channel Cb corresponds to the gain map G_B, and the chrominance channel Cr corresponds to the gain map G_R.
[0266] Compared to a three-channel gain map, a single-channel gain map refers to a single-channel gain map G. When applying the gain map, the gain map G of each RGB channel is exactly the same, so only one single-channel gain map G is encoded and decoded.
[0267] See Figure 8 , Figure 8 This is a flowchart of an encoding method provided in an embodiment of this application. The encoding method can be executed by an encoding terminal device, such as... Figure 8 As shown, the encoding method includes the following steps:
[0268] Step 201: Generate a second gain map based on the second reference map and the second backup map;
[0269] Step 202: Encode the second reference map and the second gain map respectively to obtain reference map information and gain map information;
[0270] Wherein, the gain map information includes the spare map bit depth; and / or,
[0271] When the second gain map is a three-channel gain map, the gain map information includes the encoding information of the gain map for each of the three channels; or, the gain map information includes the encoding information of the image after the gain maps of the three channels are encapsulated; and / or,
[0272] The gain map information includes the gain map bit depth.
[0273] The second reference map can also be described as the source reference map. The second spare map can also be described as the source spare map. The second gain map can also be described as the source gain map.
[0274] The step of encoding the second reference map and the second gain map to obtain reference map information and gain map information respectively may include: encoding the second reference map to obtain reference map information; and encoding the second gain map to obtain gain map information. The reference map information can be used to decode and obtain the first reference map; the gain map information can be used to decode and obtain the first gain map.
[0275] Optionally, the gain map information includes gain map metadata, and the spare map bit depth is stored in the gain map metadata in a binary structure.
[0276] Optionally, the gain map information includes gain map metadata, the gain map metadata includes the gain map bit depth, and the data type of the gain map bit depth is binary metadata;
[0277] or,
[0278] The gain map information includes gain map auxiliary information in image format, and the gain map auxiliary information includes the gain map bit depth.
[0279] Optionally, the encoding information of the gain map of each of the three channels includes: encoding information obtained by encoding the grayscale image of the gain map of each of the three channels respectively;
[0280] or,
[0281] The encoding information of the image after the gain map of the three channels is encapsulated includes: the encoding information obtained by encapsulating the gain map of the three channels and encoding the encapsulated image.
[0282] It should be noted that this embodiment is used as a reference for... Figure 7 The implementation methods of the encoding end devices shown in the embodiments can be found in the following examples. Figure 7 The related descriptions of the embodiments shown are not repeated here to avoid repetition.
[0283] The backup drawing generation method provided in this application can be executed by a backup drawing generation device. This application uses a backup drawing generation device executing the backup drawing generation method as an example to illustrate the backup drawing generation device provided in this application.
[0284] This application provides a backup image generation apparatus. As an example, the backup image generation apparatus may be a communication device or a component within a communication device, such as a chip. The communication device may be a terminal, a network-side device, or a server, etc. Exemplarily, the terminal may include, but is not limited to, the type of terminal 11 listed above, and the network-side device may include, but is not limited to, the type of network-side device 12 listed above. This application does not impose specific limitations.
[0285] The backup image generation device includes a receiving module, a transmitting module, and a processing module. These modules can be implemented in software or hardware. When implemented in hardware, the processing module can be implemented by a processor. For example, the processor can include general-purpose processors, special-purpose processors, such as a Central Processing Unit (CPU), microprocessor, Digital Signal Processor (DSP), Artificial Intelligence (AI) processor, Graphics Processing Unit (GPU), Application Specific Integrated Circuit (ASIC), Network Processor (NP), Field Programmable Gate Array (FPGA), or other programmable logic devices, gate circuits, transistors, discrete hardware components, etc. The receiving and transmitting modules can be implemented by a communication interface, which can include one or more of the following: transceiver, pins, circuits, bus, radio frequency unit, etc.
[0286] For details, see Figure 9 When the backup drawing generation device is a decoding device or a component of a decoding device, the backup drawing generation device 300 includes:
[0287] Processing module 301 is used to decode the reference map information and the gain map information respectively to obtain the first reference map and the first gain map;
[0288] The processing module 301 is further configured to perform a first operation based on the first reference map and the first gain map, and generate a first backup map based on the first operation;
[0289] Wherein, when the first gain map is a gain map of three channels, the gain map information includes the encoding information of the gain map of each of the three channels, or the gain map information includes the encoding information of the image after the gain map of the three channels is encapsulated;
[0290] And / or,
[0291] The first operation satisfies at least one of the following:
[0292] The resolution of the first backup image is determined to be the same as the resolution of the first reference image;
[0293] Obtain the alternative map resolution from the metadata, and apply the first gain map based on the alternative map resolution;
[0294] Obtain the backup image bit depth, and perform backup image conversion based on the backup image bit depth;
[0295] If a color gamut space conversion is determined, the first reference image is converted.
[0296] Obtain the gain map bit depth, and apply the first gain map on the first reference map based on the gain map bit depth.
[0297] Optionally, the processing module is specifically used for:
[0298] Obtain the backup map bit depth from the gain map metadata, wherein the gain map information includes the gain map metadata.
[0299] Optionally, the spare map bit depth is stored in the gain map data in a binary structure.
[0300] Optionally, the processing module is specifically used for:
[0301] If the spare map bit depth is not included in the gain map data, the spare map bit depth is selected according to the maximum bit depth supported by the electronic device, and the gain map information includes the gain map data.
[0302] The selected backup map bit depth is less than or equal to the maximum bit depth supported by the electronic device.
[0303] Optionally, when the first reference image is a standard dynamic range SDR image, the bit depth of the selected backup image is greater than the bit depth of the first reference image; or,
[0304] When the first reference image is a high dynamic range (HDR) image, the bit depth of the selected backup image is less than the bit depth of the first reference image.
[0305] Optionally, the gain map information includes gain map metadata, the gain map metadata includes the gain map bit depth, and the data type of the gain map bit depth is binary metadata;
[0306] or,
[0307] The gain map information includes gain map auxiliary information in image format, and the gain map auxiliary information includes the gain map bit depth.
[0308] Optionally, the processing module is specifically used for:
[0309] When the color gamut space of the gain map is the spare map color gamut space, and the color gamut space of the reference map is different from that of the spare map color gamut space, the first reference map is converted.
[0310] Perform color gamut space conversion on the first reference image after conversion;
[0311] The first gain map is applied to the first reference map after color gamut space conversion to generate the first backup map.
[0312] Optionally, the processing module is specifically used for:
[0313] When the color gamut space of the gain map is the color gamut space of the reference map, and the color gamut space of the reference map is different from that of the spare map, the first reference map is converted.
[0314] The first gain map is applied to the first reference map after the conversion process;
[0315] A color gamut space conversion is performed on the first reference image after applying the first gain image to generate a first backup image.
[0316] Optionally, the conversion process includes at least one of the following:
[0317] Conversion between integers and floating-point numbers;
[0318] Linear transformation, perceptual quantization PQ domain transformation, mixed logarithmic HLG domain transformation, or gamma domain transformation.
[0319] Optionally, the first operation also satisfies any one of the following:
[0320] If the color gamut space used in the gain map is the spare map color gamut space, and the color gamut space of the reference map is different from that of the spare map color gamut space, then the reference map color gamut space will be converted to the spare map color gamut space.
[0321] When the color gamut space of the gain map is the reference map color gamut space, and the reference map color gamut space is different from the spare map color gamut space, it is determined to convert the acquired reconstructed linear spare map color gamut space to the color space indicated by the spare map color gamut space metadata.
[0322] If the color gamut space of the reference image and the color gamut space of the backup image are the same, no color gamut space conversion is performed.
[0323] Optionally, the encoding information of the gain map of each of the three channels includes: encoding information obtained by encoding the grayscale image of the gain map of each of the three channels respectively;
[0324] or,
[0325] The encoding information of the image after the gain map of the three channels is encapsulated includes: the encoding information obtained by encapsulating the gain map of the three channels and encoding the encapsulated image.
[0326] The spare drawing generation device provided in this application embodiment can achieve... Figure 7 The various processes implemented in the method embodiments achieve the same technical effect, and will not be described again here to avoid repetition.
[0327] The encoding method provided in this application can be executed by an encoding device. This application uses an encoding device executing the encoding method as an example to illustrate the encoding device provided in this application.
[0328] This application provides an encoding device. As an example, the encoding device may be a communication device or a component within a communication device, such as a chip. The communication device may be a terminal, a network-side device, or a server, etc. Exemplarily, the terminal may include, but is not limited to, the type of terminal 11 listed above, and the network-side device may include, but is not limited to, the type of network-side device 12 listed above. This application does not impose specific limitations.
[0329] The encoding device includes a receiving module, a transmitting module, and a processing module. These modules can be implemented in software or hardware. When implemented in hardware, the processing module can be implemented by a processor. For example, the processor can include general-purpose processors, special-purpose processors, such as a Central Processing Unit (CPU), microprocessor, Digital Signal Processor (DSP), Artificial Intelligence (AI) processor, Graphics Processing Unit (GPU), Application Specific Integrated Circuit (ASIC), Network Processor (NP), Field Programmable Gate Array (FPGA), or other programmable logic devices, gate circuits, transistors, discrete hardware components, etc. The receiving and transmitting modules can be implemented by a communication interface, which can include one or more of the following: transceiver, pins, circuits, bus, radio frequency unit, etc.
[0330] See Figure 10 When the encoding device is an encoding end device or a component within an encoding end device, the encoding device 400 includes:
[0331] Processing module 401 is used to generate a second gain map based on the second reference map and the second backup map;
[0332] The processing module 401 is further configured to encode the second reference map and the second gain map respectively to obtain reference map information and gain map information;
[0333] Wherein, the gain map information includes the spare map bit depth; and / or,
[0334] When the second gain map is a three-channel gain map, the gain map information includes the encoding information of the gain map for each of the three channels; or, the gain map information includes the encoding information of the image after the gain maps of the three channels are encapsulated; and / or,
[0335] The gain map information includes the gain map bit depth.
[0336] Optionally, the gain map information includes gain map metadata, and the spare map bit depth is stored in the gain map metadata in a binary structure.
[0337] Optionally, the gain map information includes gain map metadata, the gain map metadata includes the gain map bit depth, and the data type of the gain map bit depth is binary metadata;
[0338] or,
[0339] The gain map information includes gain map auxiliary information in image format, and the gain map auxiliary information includes the gain map bit depth.
[0340] Optionally, the encoding information of the gain map of each of the three channels includes: encoding information obtained by encoding the grayscale image of the gain map of each of the three channels respectively;
[0341] or,
[0342] The encoding information of the image after the gain map of the three channels is encapsulated includes: the encoding information obtained by encapsulating the gain map of the three channels and encoding the encapsulated image.
[0343] The spare drawing generation device provided in this application embodiment can achieve... Figure 8 The various processes implemented in the method embodiments achieve the same technical effect, and will not be described again here to avoid repetition.
[0344] like Figure 11 As shown, this application embodiment also provides a communication device 500, including a processor 501 and a memory 502. The memory 502 stores a program or instructions that can run on the processor 501. For example, when the communication device 500 is a terminal, the program or instructions executed by the processor 501 implement the various steps of the above-described backup graph generation method embodiment and achieve the same technical effect. When the communication device 500 is a network-side device, the program or instructions executed by the processor 501 implement the various steps of the above-described encoding method embodiment and achieve the same technical effect. To avoid repetition, further details are omitted here.
[0345] This application embodiment also provides a terminal, including a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement, for example... Figure 7 or Figure 8 The steps in the method embodiment shown are illustrated. This terminal embodiment corresponds to the above-described encoding or decoding device method embodiment. All implementation processes and methods of the above method embodiments can be applied to this terminal embodiment and achieve the same technical effect. The terminal can be... Figure 9 or Figure 10 The apparatus shown. Specifically, Figure 12 A schematic diagram of the hardware structure of a terminal to implement an embodiment of this application.
[0346] The terminal 600 includes, but is not limited to, at least some of the following components: radio frequency unit 601, network module 602, audio output unit 603, input unit 604, sensor 605, display unit 606, user input unit 607, interface unit 608, memory 609, and processor 610.
[0347] Those skilled in the art will understand that the terminal 600 may also include a power supply (such as a battery) for supplying power to various components. The power supply may be logically connected to the processor 610 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. Figure 12 The terminal structure shown does not constitute a limitation on the terminal. The terminal may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.
[0348] It should be understood that, in this embodiment, the input unit 604 may include a graphics processor 6041 and a microphone 6042. The graphics processor 6041 processes image data of still images or videos obtained by an image capture device (such as a camera) in video capture mode or image capture mode. The display unit 606 may include a display panel 6061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, or the like. The user input unit 607 includes at least one of a touch panel 6071 and other input devices 6072. The touch panel 6071 is also called a touch screen. The touch panel 6071 may include two parts: a touch detection device and a touch controller. Other input devices 6072 may include, but are not limited to, a physical keyboard, function keys (such as volume control buttons, power buttons, etc.), a trackball, a mouse, and a joystick, which will not be described in detail here.
[0349] In this embodiment, after receiving downlink data from the network-side device, the radio frequency unit 601 can transmit it to the processor 610 for processing; in addition, the radio frequency unit 601 can send uplink data to the network-side device. Typically, the radio frequency unit 601 includes, but is not limited to, antennas, amplifiers, transceivers, couplers, low-noise amplifiers, duplexers, etc.
[0350] The memory 609 can be used to store software programs or instructions, as well as various data. The memory 609 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory 609 may include volatile memory or non-volatile memory. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory 609 in this embodiment includes, but is not limited to, these and any other suitable types of memory.
[0351] Processor 610 may include one or more processing units; optionally, processor 610 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into processor 610.
[0352] When the terminal is a decoding device:
[0353] The processor 610 is used to decode the reference map information and the gain map information respectively to obtain the first reference map and the first gain map;
[0354] The processor 610 is further configured to perform a first operation based on the first reference map and the first gain map, and generate a first backup map based on the first operation;
[0355] Wherein, when the first gain map is a gain map of three channels, the gain map information includes the encoding information of the gain map of each of the three channels, or the gain map information includes the encoding information of the image after the gain map of the three channels is encapsulated;
[0356] And / or,
[0357] The first operation satisfies at least one of the following:
[0358] The resolution of the first backup image is determined to be the same as the resolution of the first reference image;
[0359] Obtain the alternative map resolution from the metadata, and apply the first gain map based on the alternative map resolution;
[0360] Obtain the backup image bit depth, and perform backup image conversion based on the backup image bit depth;
[0361] If a color gamut space conversion is determined, the first reference image is converted.
[0362] Obtain the gain map bit depth, and apply the first gain map on the first reference map based on the gain map bit depth.
[0363] Optionally, the processor 610 is specifically used for:
[0364] Obtain the backup map bit depth from the gain map metadata, wherein the gain map information includes the gain map metadata.
[0365] Optionally, the spare map bit depth is stored in the gain map data in a binary structure.
[0366] Optionally, the processor 610 is specifically used for:
[0367] If the spare map bit depth is not included in the gain map data, the spare map bit depth is selected according to the maximum bit depth supported by the electronic device, and the gain map information includes the gain map data.
[0368] The selected backup map bit depth is less than or equal to the maximum bit depth supported by the electronic device.
[0369] Optionally, when the first reference image is a standard dynamic range SDR image, the bit depth of the selected backup image is greater than the bit depth of the first reference image; or,
[0370] When the first reference image is a high dynamic range (HDR) image, the bit depth of the selected backup image is less than the bit depth of the first reference image.
[0371] Optionally, the gain map information includes gain map metadata, the gain map metadata includes the gain map bit depth, and the data type of the gain map bit depth is binary metadata;
[0372] or,
[0373] The gain map information includes gain map auxiliary information in image format, and the gain map auxiliary information includes the gain map bit depth.
[0374] Optionally, the processor 610 is specifically used for:
[0375] When the color gamut space of the gain map is the spare map color gamut space, and the color gamut space of the reference map is different from that of the spare map color gamut space, the first reference map is converted.
[0376] Perform color gamut space conversion on the first reference image after conversion;
[0377] The first gain map is applied to the first reference map after color gamut space conversion to generate the first backup map.
[0378] Optionally, the processor 610 is specifically used for:
[0379] When the color gamut space of the gain map is the color gamut space of the reference map, and the color gamut space of the reference map is different from that of the spare map, the first reference map is converted.
[0380] The first gain map is applied to the first reference map after the conversion process;
[0381] A color gamut space conversion is performed on the first reference image after applying the first gain image to generate a first backup image.
[0382] Optionally, the conversion process includes at least one of the following:
[0383] Conversion between integers and floating-point numbers;
[0384] Linear transformation, perceptual quantization PQ domain transformation, mixed logarithmic HLG domain transformation, or gamma domain transformation.
[0385] Optionally, the first operation also satisfies any one of the following:
[0386] If the color gamut space used in the gain map is the spare map color gamut space, and the color gamut space of the reference map is different from that of the spare map color gamut space, then the reference map color gamut space will be converted to the spare map color gamut space.
[0387] When the color gamut space of the gain map is the reference map color gamut space, and the reference map color gamut space is different from the spare map color gamut space, it is determined to convert the acquired reconstructed linear spare map color gamut space to the color space indicated by the spare map color gamut space metadata.
[0388] If the color gamut space of the reference image and the color gamut space of the backup image are the same, no color gamut space conversion is performed.
[0389] Optionally, the encoding information of the gain map of each of the three channels includes: encoding information obtained by encoding the grayscale image of the gain map of each of the three channels respectively;
[0390] or,
[0391] The encoding information of the image after the gain map of the three channels is encapsulated includes: the encoding information obtained by encapsulating the gain map of the three channels and encoding the encapsulated image.
[0392] In the case where the terminal is an encoding device:
[0393] Processor 610 is used to generate a second gain map based on a second reference map and a second backup map;
[0394] The processor 610 is also configured to encode the second reference map and the second gain map respectively to obtain reference map information and gain map information;
[0395] Wherein, the gain map information includes the spare map bit depth; and / or,
[0396] When the second gain map is a three-channel gain map, the gain map information includes the encoding information of the gain map for each of the three channels; or, the gain map information includes the encoding information of the image after the gain maps of the three channels are encapsulated; and / or,
[0397] The gain map information includes the gain map bit depth.
[0398] Optionally, the gain map information includes gain map metadata, and the spare map bit depth is stored in the gain map metadata in a binary structure.
[0399] Optionally, the gain map information includes gain map metadata, the gain map metadata includes the gain map bit depth, and the data type of the gain map bit depth is binary metadata;
[0400] or,
[0401] The gain map information includes gain map auxiliary information in image format, and the gain map auxiliary information includes the gain map bit depth.
[0402] Optionally, the encoding information of the gain map of each of the three channels includes: encoding information obtained by encoding the grayscale image of the gain map of each of the three channels respectively;
[0403] or,
[0404] The encoding information of the image after the gain map of the three channels is encapsulated includes: the encoding information obtained by encapsulating the gain map of the three channels and encoding the encapsulated image.
[0405] It is understood that the implementation process of each implementation method mentioned in this embodiment can be referred to the method embodiment. Figure 7 or Figure 8 The relevant descriptions and the achievement of the same or corresponding technical effects will not be repeated here to avoid duplication.
[0406] This application embodiment also provides a network-side device, including a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement, for example... Figure 7 or Figure 8 The steps of the method embodiment shown are illustrated. This network-side device embodiment corresponds to the above-described encoding or decoding device method embodiment. All implementation processes and methods of the above method embodiments can be applied to this network-side device embodiment and achieve the same technical effects.
[0407] Specifically, embodiments of this application also provide a network-side device, which can be... Figure 9 or Figure 10 The apparatus shown. (As shown) Figure 13 As shown, the network-side device 700 includes: an antenna 701, a radio frequency (RF) device 702, a baseband device 703, a processor 704, and a memory 705. The antenna 701 is connected to the RF device 702. In the uplink direction, the RF device 702 receives information through the antenna 701 and transmits the received information to the baseband device 703 for processing. In the downlink direction, the baseband device 703 processes the information to be transmitted and sends it to the RF device 702. The RF device 702 processes the received information and transmits it through the antenna 701.
[0408] The method executed by the network-side device in the above embodiments can be implemented in the baseband device 703, which includes a baseband processor.
[0409] The baseband device 703 may, for example, include at least one baseband board on which multiple chips are disposed, such as... Figure 13As shown, one of the chips is, for example, a baseband processor, which is connected to the memory 705 via a bus interface to call the program in the memory 705 and execute the network device operations shown in the above method embodiment.
[0410] The network-side device may also include a network interface 706, such as a Common Public Radio Interface (CPRI).
[0411] Specifically, the network-side device 700 in this application embodiment further includes: instructions or programs stored in memory 705 and executable on processor 704, wherein processor 704 calls the instructions or programs in memory 705 to execute. Figure 9 or Figure 10 The methods executed by each module shown achieve the same technical effect, and to avoid repetition, they will not be described in detail here.
[0412] Specifically, embodiments of this application also provide a network-side device. For example... Figure 14 As shown, the network-side device 800 includes: a processor 801, a network interface 802, and a memory 803. This network-side device can be... Figure 12 The alternative diagram generation device is shown. The network interface 802 is, for example, a common public radio interface (CPRI).
[0413] Specifically, the network-side device 800 in this application embodiment further includes: instructions or programs stored in memory 803 and executable on processor 801, wherein processor 801 calls the instructions or programs in memory 803 to execute. Figure 9 or Figure 10 The methods executed by each module shown achieve the same technical effect, and to avoid repetition, they will not be described in detail here.
[0414] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described alternative graph generation method or encoding method embodiments and achieve the same technical effect. To avoid repetition, they will not be described again here.
[0415] The processor mentioned above is the processor in the terminal or network-side device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk. In some examples, the readable storage medium may be a non-transient readable storage medium.
[0416] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above-described alternative graph generation method or encoding method embodiments, and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0417] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.
[0418] This application also provides a computer program / program product, which is stored in a storage medium and executed by at least one processor to implement the various processes of the above-described alternative graph generation method or encoding method embodiments, and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0419] This application also provides a wireless communication system, including: a decoding end device and an encoding end device. The decoding end device can be used to perform the steps of the backup graph generation method as described above, and the encoding end device can be used to perform the steps of the encoding method as described above.
[0420] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0421] From the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of computer software products plus necessary general-purpose hardware platforms, and of course, they can also be implemented by hardware. The computer software product is stored in a storage medium (such as ROM, RAM, magnetic disk, optical disk, etc.) and includes several instructions to cause the terminal or network-side device to execute the methods described in the various embodiments of this application.
[0422] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other implementations under the guidance of this application without departing from the spirit and scope of the claims. All of these implementations are within the protection scope of this application.
Claims
1. A method for generating a backup image, characterized in that, include: The reference map information and the gain map information are decoded respectively to obtain the first reference map and the first gain map; Perform a first operation based on the first reference map and the first gain map, and generate a first backup map based on the first operation; Wherein, when the first gain map is a gain map of three channels, the gain map information includes the encoding information of the gain map of each of the three channels, or the gain map information includes the encoding information of the image after the gain map of the three channels is encapsulated; And / or, The first operation satisfies at least one of the following: The resolution of the first backup image is determined to be the same as the resolution of the first reference image; Obtain the alternative map resolution from the metadata, and apply the first gain map based on the alternative map resolution; Obtain the backup image bit depth, and perform backup image conversion based on the backup image bit depth; If a color gamut space conversion is determined, the first reference image is converted. Obtain the gain map bit depth, and apply the first gain map on the first reference map based on the gain map bit depth.
2. The method according to claim 1, characterized in that, The process of obtaining the backup map bit depth includes: Obtain the backup map bit depth from the gain map metadata, wherein the gain map information includes the gain map metadata.
3. The method according to claim 1 or 2, characterized in that, The spare map bit depth is stored in the gain map data in a binary structure.
4. The method according to claim 1, characterized in that, The process of obtaining the backup map bit depth includes: If the spare map bit depth is not included in the gain map data, the spare map bit depth is selected according to the maximum bit depth supported by the electronic device, and the gain map information includes the gain map data. The selected backup map bit depth is less than or equal to the maximum bit depth supported by the electronic device.
5. The method according to claim 4, characterized in that, When the first reference image is a standard dynamic range SDR image, the selected backup image has a bit depth greater than the bit depth of the first reference image; or, When the first reference image is a high dynamic range (HDR) image, the bit depth of the selected backup image is less than the bit depth of the first reference image.
6. The method according to any one of claims 1-5, characterized in that, The gain map information includes gain map metadata, which includes the gain map bit depth, and the data type of the gain map bit depth is binary metadata; or, The gain map information includes gain map auxiliary information in image format, and the gain map auxiliary information includes the gain map bit depth.
7. The method according to any one of claims 1-6, characterized in that, The step of performing a first operation based on the first reference map and the first gain map, and generating a first backup map based on the first operation, includes: When the color gamut space of the gain map is the spare map color gamut space, and the color gamut space of the reference map is different from that of the spare map color gamut space, the first reference map is converted. Perform color gamut space conversion on the first reference image after conversion; The first gain map is applied to the first reference map after color gamut space conversion to generate the first backup map.
8. The method according to any one of claims 1-6, characterized in that, The step of performing a first operation based on the first reference map and the first gain map, and generating a first backup map based on the first operation, includes: When the color gamut space of the gain map is the color gamut space of the reference map, and the color gamut space of the reference map is different from that of the spare map, the first reference map is converted. The first gain map is applied to the first reference map after the conversion process; A color gamut space conversion is performed on the first reference image after applying the first gain image to generate a first backup image.
9. The method according to any one of claims 1-8, characterized in that, The conversion process includes at least one of the following: Conversion between integers and floating-point numbers; Linear transformation, perceptual quantization PQ domain transformation, mixed logarithmic HLG domain transformation, or gamma domain transformation.
10. The method according to any one of claims 1-9, characterized in that, The first operation also satisfies any one of the following: If the color gamut space used in the gain map is the spare map color gamut space, and the color gamut space of the reference map is different from that of the spare map color gamut space, then the reference map color gamut space will be converted to the spare map color gamut space. When the color gamut space of the gain map is the reference map color gamut space, and the reference map color gamut space is different from the spare map color gamut space, it is determined to convert the acquired reconstructed linear spare map color gamut space to the color space indicated by the spare map color gamut space metadata. If the color gamut space of the reference image and the color gamut space of the backup image are the same, no color gamut space conversion is performed.
11. The method according to any one of claims 1-10, characterized in that, The encoding information of the gain map of each of the three channels includes: encoding information obtained by encoding the grayscale image of the gain map of each of the three channels respectively; or, The encoding information of the image after the gain map of the three channels is encapsulated includes: the encoding information obtained by encapsulating the gain map of the three channels and encoding the encapsulated image.
12. An encoding method, characterized in that, include: A second gain map is generated based on the second baseline map and the second backup map. The second reference map and the second gain map are encoded respectively to obtain reference map information and gain map information; Wherein, the gain map information includes the spare map bit depth; and / or, When the second gain map is a three-channel gain map, the gain map information includes the encoding information of the gain map for each of the three channels; or, the gain map information includes the encoding information of the image after the gain maps of the three channels are encapsulated; and / or, The gain map information includes the gain map bit depth.
13. The method according to claim 12, characterized in that, The gain map information includes gain map metadata, and the spare map bit depth is stored in the gain map metadata in a binary structure.
14. The method according to claim 12 or 13, characterized in that, The gain map information includes gain map metadata, which includes the gain map bit depth, and the data type of the gain map bit depth is binary metadata; or, The gain map information includes gain map auxiliary information in image format, and the gain map auxiliary information includes the gain map bit depth.
15. The method according to any one of claims 12-14, characterized in that, The encoding information of the gain map of each of the three channels includes: encoding information obtained by encoding the grayscale image of the gain map of each of the three channels respectively; or, The encoding information of the image after the gain map of the three channels is encapsulated includes: the encoding information obtained by encapsulating the gain map of the three channels and encoding the encapsulated image.
16. A spare image generation apparatus, characterized in that, include: The processing module is used to decode the reference map information and the gain map information respectively to obtain the first reference map and the first gain map; The processing module is further configured to perform a first operation based on the first reference map and the first gain map, and generate a first backup map based on the first operation; Wherein, when the first gain map is a gain map of three channels, the gain map information includes the encoding information of the gain map of each of the three channels, or the gain map information includes the encoding information of the image after the gain map of the three channels is encapsulated; And / or, The first operation satisfies at least one of the following: The resolution of the first backup image is determined to be the same as the resolution of the first reference image; Obtain the alternative map resolution from the metadata, and apply the first gain map based on the alternative map resolution; Obtain the backup image bit depth, and perform backup image conversion based on the backup image bit depth; If a color gamut space conversion is determined, the first reference image is converted. Obtain the gain map bit depth, and apply the first gain map on the first reference map based on the gain map bit depth.
17. The apparatus according to claim 16, characterized in that, The processing module is specifically used for: Obtain the backup map bit depth from the gain map metadata, wherein the gain map information includes the gain map metadata.
18. The apparatus according to claim 16, characterized in that, The processing module is specifically used for: If the spare map bit depth is not included in the gain map data, the spare map bit depth is selected according to the maximum bit depth supported by the electronic device, and the gain map information includes the gain map data. The selected backup map bit depth is less than or equal to the maximum bit depth supported by the electronic device.
19. The apparatus according to any one of claims 16-18, characterized in that, The processing module is specifically used for: When the color gamut space of the gain map is the spare map color gamut space, and the color gamut space of the reference map is different from that of the spare map color gamut space, the first reference map is converted. Perform color gamut space conversion on the first reference image after conversion; The first gain map is applied to the first reference map after color gamut space conversion to generate the first backup map.
20. The apparatus according to any one of claims 16-18, characterized in that, The processing module is specifically used for: When the color gamut space of the gain map is the color gamut space of the reference map, and the color gamut space of the reference map is different from that of the spare map, the first reference map is converted. The first gain map is applied to the first reference map after the conversion process; A color gamut space conversion is performed on the first reference image after applying the first gain image to generate a first backup image.
21. An encoding device, characterized in that, include: The processing module is used to generate a second gain map based on the second reference map and the second backup map; The processing module is also used to encode the second reference map and the second gain map respectively to obtain reference map information and gain map information; Wherein, the gain map information includes the spare map bit depth; and / or, When the second gain map is a three-channel gain map, the gain map information includes the encoding information of the gain map for each of the three channels; or, the gain map information includes the encoding information of the image after the gain maps of the three channels are encapsulated; and / or, The gain map information includes the gain map bit depth.
22. A communication device, characterized in that, It includes a processor and a memory, the memory storing a program or instructions that can run on the processor, the program or instructions being executed by the processor to implement the steps of the alternative graph generation method as described in any one of claims 1-11, or to implement the steps of the encoding method as described in any one of claims 12-15.
23. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the alternative graph generation method as described in any one of claims 1-11, or the steps of the encoding method as described in any one of claims 12-15.
24. A computer program / program product, characterized in that, When the computer program / program product is executed by at least one processor, it implements the steps of the alternative graph generation method as described in any one of claims 1-11, or the steps of the encoding method as described in any one of claims 12-15.