Film particle area processing method and device and storage medium

By adaptive processing of film particle area during video encoding and decoding, the problems of inflexible definition of film particle area and excessive bit count in the prior art are solved, and flexible definition and efficient encoding and decoding are achieved.

CN120302066APending Publication Date: 2025-07-11ZTE CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410035423.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-09
Publication Date
2025-07-11

AI Technical Summary

Technical Problem

The prior art is difficult to flexibly define film particle schemes in different regions in video encoding and decoding, resulting in excessive bit count and difficulty in efficiently retaining the film particle effect.

Method used

By performing film particle area adaptive processing on the decoding end and the encoding end, the film particle parameters and regions are determined based on the received adaptive indication information, and film particles are synthesized and added to the corresponding area, so as to achieve flexible region definition and low-code rate transmission.

Benefits of technology

It realizes flexible definition of film particle schemes in different regions, reducing bit count occupation, while retaining film particle effect, improving video encoding and decoding efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120302066A_ABST
    Figure CN120302066A_ABST
Patent Text Reader

Abstract

The invention provides a film particle area processing method and device and a storage medium. The film particle area processing method applied to a decoding end comprises the following steps: determining film particle parameter indication information and area indication information according to received film particle area self-adaptive indication information corresponding to a decoded image; determining a film particle region in the decoded image according to the region indication information; synthesizing film particles corresponding to the decoded image according to film particle parameters determined by the film particle parameter indication information; and adding the film particles to a film particle area in the decoded image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technologies, and particularly to a method, device, and storage medium for processing film grain regions. Background Art

[0002] Film grain technology is one of the commonly used technologies in video encoding and decoding. Generally speaking, for different regions of the same frame image, due to different textures or brightness, or due to the difference between the foreground region and the background region, or in immersive videos, the difference between the current viewing angle region and the non-current viewing angle region, different film grain schemes need to be provided, including whether to enable film grain or to enable different film grain models, etc. Describing these different regions usually requires a certain number of bits. At the same time, for the above-mentioned multiple-region scenarios, most different region description methods have been defined currently. If the different regions during the application of film grain exactly adopt the existing defined types of regions, the bits occupied by redefining these regions can be saved. Summary of the Invention

[0003] In view of this, the embodiments of this application provide a method, device, and storage medium for processing film grain regions, achieving the effect of flexibly defining different types of regions without occupying too much bitrate.

[0004] The embodiments of this application provide a method for processing film grain regions, which is applied to a decoding end and includes:

[0005] Determine film grain parameter indication information and region indication information according to the film grain region adaptive indication information corresponding to the received decoded image;

[0006] Determine the film grain region in the decoded image according to the region indication information;

[0007] Synthesize the film grain corresponding to the decoded image according to the film grain parameters determined by the film grain parameter indication information;

[0008] Add the film grain to the film grain region in the decoded image.

[0009] The embodiments of this application provide a method for processing film grain regions, which is applied to an encoding end and includes:

[0010] Perform film grain region adaptive modeling on the source image to generate corresponding film grain parameter indication information and region indication information;

[0011] Generate corresponding film grain region adaptive indication information according to the film grain parameter indication information and the region indication information;

[0012] Write the adaptive indication information of the film grain area into the encoded bitstream corresponding to the source image, and send it to the decoding end.

[0013] An embodiment of the present application provides a communication device, including: a memory, and one or more processors;

[0014] The memory is configured to store one or more programs;

[0015] When the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any of the above embodiments.

[0016] An embodiment of the present application provides a storage medium, and the storage medium stores a computer program, and when the computer program is executed by a processor, the method described in any of the above embodiments is implemented. Description of the Drawings

[0017] Figure 1 is a framework diagram of a film grain system adopted in video coding and decoding provided by the prior art;

[0018] Figure 2 is a flowchart of a method for processing a film grain area provided by an embodiment of the present application;

[0019] Figure 3 is a flowchart of another method for processing a film grain area provided by an embodiment of the present application;

[0020] Figure 4 is a flowchart of a method for decoding a video image bitstream provided by an embodiment of the present application;

[0021] Figure 5 is a flowchart of an implementation for determining a film grain area provided by an embodiment of the present application;

[0022] Figure 6 is a flowchart of a method for encoding a video image bitstream provided by an embodiment of the present application;

[0023] Figure 7 is a block diagram of a structure of a device for processing a film grain area provided by an embodiment of the present application;

[0024] Figure 8 is a block diagram of a structure of another device for processing a film grain area provided by an embodiment of the present application;

[0025] Figure 9 is a schematic diagram of a structure of a communication device provided by an embodiment of the present application. Detailed Embodiments

[0026] The embodiments of the present application will be described below with reference to the accompanying drawings. The present application will be described below in conjunction with the accompanying drawings of the embodiments. The examples given are only used to explain the present application and are not used to limit the scope of the present application.

[0027] Film grain is generated during the physical processes of exposure and development of photographic film (exposure and development of silver halide crystals) and is widely present in movie and television content. However, digital sensors do not undergo the above processes, so the generated digital video is noise-free and does not have film grain. Many content creators, especially in the film industry, generally believe that film grain is a pleasant type of noise that can enhance the natural appearance of video content. Re-adding film noise to the video can improve the visual experience and is usually considered part of the creative intent.

[0028] Since video image compression relies to a large extent on prediction in the temporal, spatial, or cross-component domains, and film grain is inherently random, it is difficult to encode film grain through typical video image coding tools. To retain film grain, one method is to better retain details by using a lower quantization parameter during video compression, but for video applications such as adaptive streaming and broadcasting, a relatively high bitrate is required. Another method is to model the film grain at the encoding end to obtain film grain parameters, and then at the decoding end, use the film grain parameters to synthesize and add the film grain to the decoded video image. This can fully utilize the potential of video image compression technology. For example, in the existing High Efficiency Video Coding (HEVC) and Versatile Video Coding (VVC) schemes, the Film Grain Characteristic (FGC) Supplemental Enhancement Information (SEI) message is used to indicate the film grain parameters used for synthesizing film grain when decoding and rendering video or image data, thereby achieving the purpose of retaining film grain.

[0029] Figure 1 is a framework diagram of a film grain system adopted in video coding and decoding provided by the prior art, as Figure 1As shown in the figure, at the encoding end, the encoder first compresses and encodes the input source video image (simply referred to as the source image) to obtain an encoded video stream. On the other hand, the denoising module preprocesses the input source video image to achieve denoising (the encoder itself can also be used to perform the denoising process), and outputs a sequence of video images after the film grain is removed or attenuated. The film grain modeling process is also the film grain parameterization process. By analyzing the difference between the denoised video and the source video, the parameter values of the film grain model are estimated. The film grain parameters can be transmitted to the decoding end together with the encoded video stream, or provided to the decoding end through some external transmission methods.

[0030] At the decoding end, the film grain parameters are parsed and input into the film grain synthesis process to generate simulated film grains. Before the decoded video is output, the film grains are added to the decoded video to output a decoded reconstructed video with simulated film grains.

[0031] In addition to the film grain system framework as Figure 1 shown, there are also other implementation methods of the film grain system framework. The main difference lies in the encoding end. For example: instead of encoding the source video image sequence to obtain an encoded video bitstream, the encoding end can encode the denoised video image sequence to obtain an encoded video; or when the source video does not contain film grains, the encoding end can transmit the pre-determined film grain parameters to the decoding end for film grain synthesis. In this case, even if there are no film grains in the source video, film grains can be added to the video at the decoder end to achieve a certain effect.

[0032] In one embodiment, Figure 2 is a flowchart of a film grain region processing method provided by an embodiment of the present application. This embodiment is applied to the case of adaptively processing the film grain region. This embodiment can be executed by the decoding end. As Figure 2 shown, the film grain region processing method in this embodiment includes: S210 - S240.

[0033] S210. Determine the film grain parameter indication information and the region indication information according to the film grain region adaptive indication information corresponding to the received decoded image.

[0034] After the decoding end obtains the bitstream sent by the encoding end, it decodes the bitstream to obtain the decoded reconstructed image corresponding to the bitstream as the corresponding decoded image. Parsing the bitstream and obtaining the decoded image can be implemented according to the existing video coding and decoding schemes, which will not be elaborated here. The decoding end obtains the film grain region adaptive indication information corresponding to the decoded image, and determines the film grain parameter indication information and the region indication information according to the film grain region adaptive indication information.

[0035] S220. Determine the film grain region in the decoded image according to the region indication information.

[0036] S230. Synthesize the film grain parameters corresponding to the decoded image according to the film grain parameter indication information.

[0037] S240. Add the film grain to the film grain region in the decoded image.

[0038] Among them, the film grain region refers to the region in the decoded image where the film grain is applied. The decoding end adds the synthesized film grain to the corresponding region in the decoded image where the film grain is applied.

[0039] In one embodiment, determining the film grain region in the decoded image according to the region indication information includes: determining the region type according to the region indication information; obtaining the corresponding region description information from the region indication information based on the region type; and determining the film grain region in the decoded image according to the region description information.

[0040] In one embodiment, the region type includes at least one of the following: externally defined region; internally defined region.

[0041] In one embodiment, the region type is characterized by at least one of the following parameters: at least one boolean parameter; enumerated parameter. The region type can be characterized by one boolean parameter, or by two boolean parameters, or by one enumerated parameter.

[0042] In one embodiment, when the region type is an externally defined region, obtaining the corresponding region description information from the region indication information based on the region type includes: obtaining the external region information source and the external region indication information from the region indication information; and obtaining the corresponding external region description information according to the external region information source and the external region indication information. When the region type is an externally defined region, the region indication information includes at least the external region information source and the external region indication information. The external region information source is used to indicate the source information of the externally defined region; the external region indication information is used to indicate the relevant region information of the externally defined region. For example, the external region indication information includes, but is not limited to, the number of externally defined regions, the existence flag of the region index, and the externally defined region index.

[0043] In one embodiment, when the region type is an internally defined region, obtaining the corresponding region description information from the region indication information based on the region type includes: directly obtaining the corresponding internal region description information from the region indication information.

[0044] In one embodiment, determining the film grain region in the decoded image according to the region indication information includes: obtaining the corresponding region description information according to the region indication information; and determining the film grain region in the decoded image according to the region description information.

[0045] In one embodiment, determining the film grain region in the decoded image according to the region description information includes one of the following:

[0046] The region in the decoded image according to the region description information is defaulted to the region where the film grain is started;

[0047] The region in the decoded image according to the region description information is defaulted to the region where the film grain is not started;

[0048] According to the pre-configured film grain identifier, it indicates whether the film grain function is started in the region of the decoded image corresponding to the region description information.

[0049] In one embodiment, the region indication information includes at least one of the following: region type; external region information source; external region indication information; external region description information.

[0050] In one embodiment, when the external region information source includes an annotation region, the external region indication information includes at least one of the following: number of externally defined regions; region index presence flag; externally defined region index.

[0051] In one embodiment, when the external region information source includes an omnidirectional viewport, the external region indication information includes at least one of the following: viewing angle identifier; number of regions; region index.

[0052] In one embodiment, when the external region information source includes a sub-image or a sub-tile, the external region indication information includes at least one of the following: sub-image index; sub-image identifier; tile index; tile identifier.

[0053] In one embodiment, when the external region information source includes an annotation region, the region description information includes at least: the topmost position of the bounding box; the leftmost position of the bounding box; the width of the bounding box; the height of the bounding box.

[0054] In one embodiment, when the external region information source includes alpha channel information, the region description information includes at least one of the following: alpha channel bit depth; alpha transparency value; alpha opacity value; alpha channel increment flag; alpha channel clip flag; alpha channel clip type flag; and the auxiliary picture sample information corresponding to the alpha channel information SEI message.

[0055] In one embodiment, when the external region information source includes an omnidirectional viewport, the region description information at least includes one of the following: the center of the viewing angle azimuth; the center of the viewing angle elevation; the center of inclination; the horizontal viewing angle range; the vertical viewing angle range.

[0056] In one embodiment, when the external region information source includes a sub-image or a sub-tile, the region description information at least includes one of the following: the size of the sub-image; the position of the sub-image; the size of the sub-tile; the position of the sub-tile.

[0057] In one embodiment, the film grain region adaptive indication information at least includes: film grain region adaptive SEI message enabling information; externally defined region indication information; internally defined region indication information; the number of externally defined regions; the external region information source; the existence flag of the region index; the externally defined region index; the number of internally defined regions; the uppermost position of the internally defined region; the leftmost position of the internally defined region; the width of the internally defined region; the height of the internally defined region; the film grain region adaptive SEI message persistence indication information; the region type indication information; the film grain function enabling information; the number of film grain regions; the film grain parameters.

[0058] In one embodiment, Figure 3 is a flowchart of another film grain region processing method provided by an embodiment of the present application. This embodiment is applied to the case of adaptively processing the film grain region. This embodiment can be executed by an encoding end. As Figure 3 shown, this embodiment includes: S310 - S330.

[0059] S310. Perform film grain region adaptive modeling on the source image to generate corresponding film grain parameter indication information and region indication information.

[0060] S320. Generate corresponding film grain region adaptive indication information according to the film grain parameter indication information and the region indication information.

[0061] S330. Write the film grain region adaptive indication information into the encoding bitstream corresponding to the source image and send it to the decoding end.

[0062] In one embodiment, the image parameters of the source image at least include one of the following: film grain characteristics; image features; image texture;

[0063] Among them, the film grain characteristics at least include one of the following: the intensity of the film grain; the scaling parameter of the film grain.

[0064] In one embodiment, performing film grain region adaptive modeling on the source image to generate corresponding film grain parameter indication information and region indication information includes:

[0065] Perform adaptive modeling on the source image for the film grain area to obtain corresponding area description information, area type, and film grain parameters;

[0066] Generate corresponding area indication information based on the area description information and area type;

[0067] Generate corresponding film grain parameter indication information based on the film grain parameters.

[0068] In one embodiment, the area type includes at least one of the following: externally defined area; internally defined area.

[0069] In one embodiment, when the area type is an externally defined area, generating corresponding area indication information based on the area description information and area type includes:

[0070] Generate corresponding external area information source and external area indication information based on the external area description information;

[0071] Generate corresponding area indication information based on the external area information source and external area indication information.

[0072] In one embodiment, when the area type is an internally defined area, generating corresponding area indication information based on the area description information and area type includes:

[0073] Directly generate corresponding area indication information based on the internal area description information.

[0074] In one embodiment, the area indication information includes at least one of the following: area type; external area information source; external area indication information; external area description information.

[0075] In one embodiment, when the external area information source includes an annotation area, the external area indication information includes at least one of the following: number of externally defined areas; area index existence flag; externally defined area index.

[0076] In one embodiment, when the external area information source includes an omnidirectional viewport, the external area indication information includes at least one of the following: viewing angle identifier; number of areas; area index.

[0077] In one embodiment, when the external area information source includes a sub-image or sub-tile, the external area indication information includes at least one of the following: sub-image index; sub-image identifier; tile index; tile identifier.

[0078] In one embodiment, when the external area information source includes an annotation area, the area description information includes at least: topmost position of the bounding box; leftmost position of the bounding box; width of the bounding box; height of the bounding box.

[0079] In one embodiment, when the external region information source includes alpha channel information, the region description information includes at least one of the following: alpha channel bit depth; alpha transparency value; alpha opacity value; alpha channel increment flag; alpha channel clip flag; alpha channel clip type flag; and auxiliary picture sample information corresponding to the alpha channel information SEI message.

[0080] In one embodiment, when the external region information source includes an omnidirectional viewport, the region description information includes at least one of the following: view azimuth center; view elevation center; tilt center; view horizontal range; view vertical range.

[0081] In one embodiment, when the external region information source includes a sub-image or sub-tile, the region description information includes at least one of the following: sub-image size; sub-image position; sub-tile size; sub-tile position.

[0082] In one embodiment, the film grain region adaptive indication information includes at least: film grain region adaptive SEI message enable information; externally defined region indication information; internally defined region indication information; number of externally defined regions; external region information source; region index presence flag; externally defined region index; number of internally defined regions; topmost position of the internally defined region; leftmost position of the internally defined region; width of the internally defined region; height of the internally defined region; film grain region adaptive SEI message persistence indication information; region type indication information; film grain function enable information; number of film grain regions; film grain parameters.

[0083] In the first embodiment, Figure 4 is a flowchart of a method for decoding a video image bitstream provided by an embodiment of the present application. This embodiment is applied to a device for decoding a video bitstream and adaptively processing a film grain region. The input of the device is a video image bitstream or a media file, and the output is a decoded and reconstructed video image. As Figure 4 shown, the decoding process of the video image bitstream in this embodiment includes the following steps:

[0084] S410. Obtain an encoded bitstream, and decode the encoded bitstream to obtain a corresponding decoded image.

[0085] The decoding end obtains the encoded bitstream, decodes the encoded bitstream, and obtains a decoded and reconstructed image corresponding to the encoded bitstream, that is, a decoded image. Parsing the bitstream to obtain the decoded image can be performed according to the methods specified in the video codec standard corresponding to the bitstream type, and the prior art will not be elaborated here.

[0086] It should be noted that a video itself is composed of a series of consecutive image sequences. The images in the embodiments of the present application can be applied to a single image or a certain frame image in a video sequence. Therefore, concepts such as video, video image, or image mentioned in the following descriptions can be equivalently replaced.

[0087] S420. Obtain the film grain region adaptive indication information corresponding to the decoded image, and determine the film grain parameter indication information and the region indication information according to the film grain region adaptive indication information.

[0088] According to the film grain region adaptive indication information, it can be determined that different regions in the decoded image can correspond to different film grain strategies; different film grain strategies can be adding film grains only to some regions in the decoded image and not adding film grains to the remaining regions, or corresponding different types of film grains to different regions in the decoded image.

[0089] The film grain region adaptive indication information can be a film grain region adaptive flag (denoted as fg_region_adaptive_flag) indicating whether to enable film grain region adaptive processing for the video image. The film grain region adaptive flag can be included in the video parameter set (VPS), sequence parameter set (SPS), picture parameter set (PPS), or adaptive parameter set (APS), or can also be included in a specific SEI message.

[0090] The film grain region adaptive indication information can be a type of SEI message or an SEI message name. According to the SEI message type or the SEI message name, it can be determined to execute the film grain region adaptive strategy for the decoded image. For example, when the decoding end receives a film grain region adaptive supplementary enhancement information message (FilmGrain Region Adaptive SEImessage), then this type of SEI message itself is the film grain adaptive indication information.

[0091] There is no necessary sequence between obtaining the film grain region adaptive indication information corresponding to the decoded image and obtaining the decoded image by parsing the code stream in S410. They can be carried out simultaneously, or first parse the code stream to obtain the decoded image and then obtain the film grain region adaptive indication information, or first obtain the film grain region adaptive indication information and then parse the code stream to obtain the decoded image.

[0092] The film grain region adaptive indication information can be included in the code stream or obtained through other pre-configured methods. The following embodiments will mainly be described based on different positions included in the code stream.

[0093] S430. Determine the film grain region in the decoded image according to the region indication information.

[0094] Determine the area in the decoded image where film grains are applied according to the area indication information, including: determining one or more of the number of areas, area positions, area shapes, area sizes, area indexes, etc. in the decoded image where film grains are applied.

[0095] The area indication information includes at least one or more of the area type, external area information source, external area indication information, and area description information. The area type can be used to indicate an externally defined area and / or an internally defined area. An internally defined area means that the area description information corresponding to this area is included in the SEI message corresponding to the film grain area adaptive indication information. Correspondingly, an externally defined area means that the area description information corresponding to this area is not included in the SEI message corresponding to the film grain area adaptive indication information. When the area type includes an externally defined area, the area indication information further includes at least the external area information source. The area description information of the external area can be obtained according to the external area information source, so as to determine the area in the decoded image where film grains are applied; when the area type includes an internally defined area, the area indication information further includes at least the internal area description information, and the area in the decoded image where film grains are applied is determined according to the internal area description information.

[0096] S440. Determine the film grain parameters according to the film grain parameter indication information, and synthesize film grains according to the film grain parameters.

[0097] The film grain parameters include, but are not limited to, film grain model parameters and film grain processing parameters corresponding to the film grain processing method indicated by the film grain model parameters. The film grain model parameters can be film grain model identifiers, and the film grain processing parameters can also be referred to as film grain synthesis parameters or film grain modeling parameters.

[0098] The determined film grain parameters can be a set of film grain parameters or multiple sets of film grain parameters. When multiple sets of film grain parameters are determined, the corresponding multiple sets of film grains are synthesized respectively according to each set of film grain parameters.

[0099] There is no necessary sequence between S430 and S440. In practical applications, the processing sequences of S430 and S440 can be exchanged, or S430 and S440 can be processed simultaneously.

[0100] S450. Add the synthesized film grains to the film grain area in the decoded image.

[0101] The method of adding film grains to the decoded image can adopt an addition mode, a multiplication mode, or any other existing calculation method. The method of adding film grains to the decoded image can be determined by the film grain parameters in S440 or decided by the decoding end according to the pre-configured parameters.

[0102] When multiple sets of film grain parameters are determined in S440, the synthesized multiple sets of film grains are respectively added to the regions corresponding to the film grain parameters.

[0103] In the second embodiment, Figure 5 It is a flowchart of an implementation for determining the film grain region provided by an embodiment of the present application. Specific examples of determining the region indication information according to the film grain region adaptive indication information and determining the region in the decoded image where the film grains are applied according to the region indication information. As Figure 5 shown, this embodiment includes the following steps:

[0104] S510. Determine the region indication information in the film grain region adaptive indication information.

[0105] Refer to S410 and S420 in the above first embodiment to determine the region indication information in the film grain region adaptive indication information.

[0106] S520. Determine the region type according to the region indication information.

[0107] The region type includes an internally defined region and an externally defined region. The internally defined region means that the region description information is included in the film grain region adaptive indication information; the externally defined region means that the region description information is not included in the film grain region adaptive indication information and the region description information needs to be further obtained from other places.

[0108] The region type parameter used to characterize the region type can be a boolean parameter RegionType. When RegionType = 0, it indicates that the region type is an externally defined region; when RegionType = 1, it indicates that the region type is an internally defined region.

[0109] The region type parameter used to characterize the region type can also be an enumeration type parameter RegionType, which includes multiple values. For example, when RegionType = 0, it indicates that the region type is an externally defined region; when RegionType = 1, it indicates that the region type is an internally defined region; when RegionType = 2, it indicates that the region type includes both an externally defined region and an internally defined region.

[0110] The region type parameters used to characterize the region type can also be two boolean parameters, region_external_flag and region_internal_flag, which respectively indicate whether the region contains internally defined regions or whether it contains externally defined parameters. For example: when the value of region_external_flag is 1, it means that the region type contains external regions; when the value of region_external_flag is 0, it means that the region type does not contain external regions. When the value of region_internal_flag is 1, it means that the region type contains internal regions; when the value of region_internal_flag is 0, it means that the region type does not contain internal regions.

[0111] It should be noted that the above are all just exemplary descriptions, and in actual applications, the region type parameters are not limited to the cases shown here.

[0112] S530. Determine whether it only contains externally defined regions or internal regions based on the region type parameters. If it only contains external regions, execute S540; if it only contains internal regions, execute S560. If it contains both external regions and internal regions, then execute S540 and S560 respectively.

[0113] S540. Determine the source of the externally defined region indication information and / or the corresponding external region indication information.

[0114] Determine the external region information source RegionSource and the corresponding external region indication information according to the region indication information in the film grain region adaptive indication information. There may be one or more external region information sources. In the existing solutions, the region division methods in the video image frame have been defined, and various description methods are used to identify each region after division. These existing and various region division description information that may be formulated in the future can all be used as the external region information source in the solution of this application. The following table gives an example of an external region information source:

[0115] Table 1 Mapping relationship table between external region information source and different values

[0116] Value Description information of external region information source 0 annotated regions 1 alpha channel infomation 2 Omnidirectional viewport 3 subpictures / tiles 4...5 Reserved

[0117] For different external region information sources, the corresponding external region indication information may be different. Or for some types of external region information sources, when the external region information source is determined and the external region description information can be determined, there may be no corresponding external region indication information. The external region indication information may include at least one or more of the following information: the number of externally defined regions, the existence flag of the region index, the externally defined region index, the externally defined region identifier, etc.

[0118] For example, when the value of the external region information source RegionSource is 0, it means that the externally defined region information comes from annotated regions, and the corresponding external region indication information may include at least one or more of the following: the number of regions (num_regions), the region index (region_index);

[0119] When the value of the external region information source RegionSource is 1, it means that the externally defined region information comes from the alpha channel, and at this time there is no need to have external region indication information;

[0120] When the value of the external region information source RegionSource is 2, it means that the externally defined region information comes from the Omnidirectional viewport, and the corresponding external region indication information may include at least one or more of the following: the viewport identifier (viewport_id), the number of regions (num_regions), the region index (region_index);

[0121] When the value of the external region information source RegionSource is 3, it means that the externally defined region information comes from subpictures / tiles, and the corresponding external region indication information may include at least one or more of the following: the number of regions (num_regions), the index or identifier of the subpicture, the index or identifier of the Tile;

[0122] S550. Obtain the external region description information according to the external region information source and / or the corresponding external region indication information.

[0123] The specific information included in the external region description information is determined according to the external region information source, and the external region description information corresponding to different external region information sources may be different. For example:

[0124] When the externally defined region information comes from annotated regions, obtain the corresponding Annotated regions SEI message, and then obtain the externally defined region description information of the corresponding quantity according to the number of externally defined regions (num_regions), the region index presence flag (region_index_present_flag), and the externally defined region index (region_index) in the externally defined region indication information. When the values of the object index (object_idx) and the externally defined region index (region_index) in the Annotated regions SEI message are the same, the region description information corresponding to the object index is the externally defined region description information to be obtained. Each externally defined region description information may include the top position of the bounding box (bounding_box_top), the leftmost position of the bounding box (bounding_box_left), the width of the bounding box (bounding_box_width), and the height of the bounding box (bounding_box_height).

[0125] When the externally defined region information comes from Alpha channel information, obtain the corresponding Alpha channel information SEI message. The externally defined region description information may include some or all of the following information: alpha channel bit depth (alpha_channel_bit_depth), alpha transparent value (alpha_transparent_value), alpha opaque value (alpha_opaque_value), alpha channel increment flag (alpha_channel_incr_flag), alpha channel clip flag (alpha_channel_clip_flag), alpha channel clip type flag (alpha_channel_clip_type_flag), and the sample information of the auxiliary coded picture corresponding to the Alpha channel information SEI message.

[0126] When the external defined region information comes from an Omnidirectional viewport, obtain the corresponding Omnidirectional viewport SEI message. Then, according to the number of regions (num_regions) and region index (region_index) in the region indication information, obtain the corresponding number of region description information. Each external region description information in the Omnidirectional viewport SEI message may include the viewport azimuth centre, viewport elevation centre, viewport tilt centre, viewport horizontal range, and viewport vertical range.

[0127] When the external defined region information comes from a subpicture or subTile, obtain the corresponding number of external region description information according to the number of regions (num_regions) and region index (region_index) in the region indication information. The region index may be the serial number of the subpicture or the serial number of the Tile; the region description information may include the size and position of the subpicture and Tile, etc.

[0128] It should be noted that obtaining the external region description information from the corresponding SEI message according to the source of the external region information is only taken as an example. In actual applications, the obtained external region description information may come from any type of region indication information.

[0129] S560. Obtain the internal region description information according to the region indication information.

[0130] Obtain the internal region description information according to the region indication information in the film grain region adaptive indication information. Here, the internal region description information corresponds to the internally defined region.

[0131] The region description information is used to indicate the region where the film grain parameters are applied in the decoded image. The region indication information can be described by the region position and size. For example, the upper right vertex position and length and width can determine a rectangular region, or it can be described by the size and serial number of the block. For example, the position of the 8th 8*8 adaptive processing block, and the size of the adaptive processing block can be preset or determined by other means. For example, several optional sizes and orders of the adaptive processing blocks are determined, and the size of the adaptive block adopted can be known through the given serial number, etc.

[0132] S570. Determine the film grain region in the decoded image according to internal or external region description information.

[0133] The region description information is used to indicate the position region where the film grain parameters are applied in the decoded image. First, determine the corresponding region in the decoded image according to the region description information, and further determine the region where the film grain is applied in the decoded image. Among them, the region corresponding to the region description information in the decoded image belongs to the prior art. The solutions for the region description information to determine the region where the film grain is applied in the decoded image include, but are not limited to: the region corresponding to the region description information in the decoded image is default to be the region where the film grain is enabled; or the region corresponding to the region description information in the decoded image is default to be the region where the film grain is not enabled; it is also possible to set a film grain identifier for each region to indicate whether the film grain function is enabled in the region determined according to the region description information through the film grain identifier.

[0134] In the third embodiment, the embodiment of the present application gives an example of an SEI message for realizing the adaptive processing of the film grain region, and the syntax structure and semantic information (as shown in the following table) can correspond to the combined examples of various situations described in the first embodiment and the second embodiment.

[0135] For better illustration, here we first supplement the description of the SEI message parsing process and the content related to SEI message encapsulation. Before obtaining the SEI message, the decoding end first obtains the Network Abstract Layer unit (NAL unit) from the bitstream. The NAL unit is the most basic syntax structure in the bitstream, and each NAL unit contains a header information (nal_unti_header) and RBSP (Raw Byte Sequence Payload) information. The NAL unit header information further contains the NAL unit type information (nal_unti_type). When the value of nal_unit_type is 23, it indicates that the NAL unit is a PREFIX_SEI_NUT, that is, the prefixed SEI information. When the value of nal_unit_type is 24, it indicates that the NAL unit is a SUFFIX_SEI_NUT, that is, the postfixed SEI information. In the solution of this application, we do not limit the film grain adaptive region SEI message to be PREFIX_SEI_NUT or SUFFIX_SEI_NUT. When it is determined that a certain NAL unit type is an SEI message, the RBSP data in the NAL unit is parsed according to the RBSP syntax structure corresponding to the SEI message (as shown in Table 2). One SEI RBSP can include one or more SEI messages (sei_message).

[0136] Table 2 Schematic table of the syntax structure of an SEI RBSP

[0137]

[0138] The syntax structure of sei_message() is shown in the following table (Table 3), which contains the syntax element payload_type, indicating the type of the SEI message.

[0139] Table 3 Schematic table of the syntax structure of the SEI message

[0140]

[0141]

[0142] After determining the type of the SEI message, according to the sei_payload() syntax structure corresponding to the SEI message of this type (as shown in Table 3), the parameter information to be transmitted by the SEI message can be further parsed.

[0143] Table 4 Schematic table of the syntax structure of sei_payload()

[0144]

[0145] For the embodiments of the present application, it is sufficient that the value of the payloadType of the film_grain_adaptive_region SEI message is different from the values of the payloadType of other existing SEI information (for example, it can take the value of 8). Through the above parsing, the decoding end can determine that this SEI message is a film_grain_adaptive_region SEI message, that is, it can be used as the region adaptation indication information in the first embodiment or the second embodiment.

[0146] The payload syntax structure of the film_grain_adaptive_region SEI message can be shown in the following table:

[0147] Table 5 Schematic table of the payload() syntax structure of a film grain region adaptive SEI message

[0148]

[0149]

[0150] The following is the semantic information corresponding to each syntax element in the film_grain_adaptive_region SEI message:

[0151] Film grain region adaptive SEI message enable information fga_region_cancel_flag: When the value is equal to 1, it means that the film grain region adaptive SEI message cancels the persistence of any previous film grain region adaptive SEI message and does not use the related SEI function. Conversely, when the value is equal to 0, it means that the film grain adaptive region information follows.

[0152] When this syntax element does not exist, it means that fga_region_cancel_flag is equal to 0.

[0153] External defined region indication information fga_region_external_flag: When the value is equal to 1, it means that there is an externally defined region; when the value is equal to 0, it means that there is no externally defined region;

[0154] Internal defined region indication information fga_region_internal_flag: When the value is equal to 1, it means that there is an internally defined region; when the value is equal to 0, it means that there is no internally defined region;

[0155] The number of externally defined regions fga_num_regions_external_minus1: plus 1 indicates the number of externally defined regions;

[0156] The source of externally defined region information fga_regions_source[i]: indicates the source of the i-th externally defined region, and the values can refer to S540 in Embodiment 2.

[0157] When the value of the region index presence flag fga_region_index_present_flag is equal to 1, it indicates the presence of an externally defined region index; when the value is equal to 0, it indicates the absence of an externally defined region index;

[0158] The externally defined region index fga_region_external_index[i]: indicates the i-th externally defined region index, and the region location of the i-th externally defined region can be determined according to the externally defined region index and the source of the externally defined region;

[0159] The number of internally defined regions fga_num_regions_internal_minus1: plus 1 indicates the number of internally defined regions;

[0160] The uppermost position of the internally defined region fga_region_internal_top[i]: indicates the uppermost position of the i-th internally defined region;

[0161] The leftmost position of the internally defined region fga_region_internal_left[i]: indicates the leftmost position of the i-th internally defined region;

[0162] The width of the internally defined region fga_region_internal_width[i]: indicates the width of the i-th internally defined region;

[0163] The height of the internally defined region fga_region_internal_height[i]: indicates the height of the i-th internally defined region;

[0164] Film grain area adaptive SEI message persistence indication information fga_region_persistent_flag: It is used to indicate the persistence of the current film grain area adaptive SEI message. When the value of the persistence flag bit (fga_region_persistent_flag) is equal to 0, it indicates that the film grain area adaptive SEI message is only applicable to the currently decoded (sub) image. When the value of the persistence flag bit (fga_region_persistent_flag) is equal to 1, it indicates that the film grain area adaptive SEI message is not only applicable to the currently decoded (sub) image, but also continuously applicable to the subsequent decoded (sub) images within the persistence range (peisistence_scope). For example, the persistence range (peisistence_scope) of the film grain area adaptive SEI message can be an access unit (AccessUnite, AU), a coded video sequence (codedvideosequence, CVS), or unspecified. The embodiments of the present application do not make specific limitations on this. When this syntax element does not exist, it means that fga_region_persistent_flag is equal to 0.

[0165] In the fourth embodiment, the embodiments of the present application give another example of an SEI message for implementing film grain area adaptive processing, and the syntax structure and semantic information (as shown in the following table) can correspond to a combined example of various situations described in the first embodiment and the second embodiment.

[0166] Table 6 Schematic table of the payload() syntax structure of another film grain area adaptive SEI message

[0167]

[0168]

[0169] The following are the semantic information corresponding to each syntax element in the film grain adaptive SEI message:

[0170] fga_region_cancel_flag: Refer to the description in the third embodiment.

[0171] Region type indication information fga_region_type: Equal to 1 indicates an internally defined region; equal to 0 indicates an externally defined region.

[0172] Film grain function enabling information fga_region_enabled_flag: Equal to 1 indicates that the film grain function is enabled for the internally defined region or externally defined region; equal to 0 indicates that the film grain function is not enabled for the internally defined region or externally defined region.

[0173] Number of film grain regions fga_num_regions_minus1: Adding 1 is equal to the number of regions where film grain is applied, and the number of regions cannot exceed 4;

[0174] Film grain parameters fga_characteristic_parameters()[i]: Indicate the film grain parameters applied to the i-th region; here, the actual indication method of the film grain parameters is not limited. All film grain parameters can be directly included in the current SEI message, or the corresponding film grain parameters can be determined through a given film grain model, or an identifier of a film grain SEI message can be given to obtain the film grain parameters in the film grain SEI message, etc.

[0175] fga_regions_source: Refer to the description in the third embodiment.

[0176] When regionsource is not equal to 1 (AlphaChannelInformation), region index information needs to be further provided;

[0177] fga_region_external_index[i]: Refer to the description in the third embodiment;

[0178] fga_region_internal_top[i]: Refer to the description in the third embodiment;

[0179] fga_region_internal_left[i]: Refer to the description in the third embodiment;

[0180] fga_region_internal_width[i]: Refer to the description in the third embodiment;

[0181] fga_region_internal_height[i]: Refer to the description in the third embodiment;

[0182] fga_region_persistent_flag: Refer to the description in the third embodiment.

[0183] In the fifth embodiment, Figure 6The figure is a flowchart of a method for encoding a video image bitstream according to an embodiment of the present application. This embodiment is applied to a device for encoding an input video image and adaptively processing a film grain region. The input of the device is a source video image (referred to as the source image for short), and the output is a video image bitstream or a media file. As Figure 6 shown, the process of encoding the source image in this embodiment includes the following steps:

[0184] S610. Encode the source image to generate an encoded bitstream.

[0185] The image can be a single image or a certain frame image in a video sequence. There are various existing technologies for encoding an image to generate a bitstream. Here, there is no limitation on using any encoding standard to encode the image, so no more details will be given.

[0186] S620. Perform adaptive modeling of the film grain region according to the film grain characteristics in the source image or the source image.

[0187] The film grain characteristics can be based on the film grain characteristics in the entire image or the film grain characteristics in different regions of the image; the film grain characteristics include but are not limited to the intensity of the film grain, the scaling parameter of the film grain, etc.

[0188] The region-adaptive film grain modeling can be to perform film grain modeling only on some regions according to the film grain characteristics in different regions of the image, or to perform film grain modeling separately according to the film grain characteristics in different regions of the image. The film grain modeling methods used in different regions can be the same or different. When the same film grain modeling method is used in different regions, the film grain parameters corresponding to different regions can be not completely the same;

[0189] For an original image that does not contain film grains, film grains can be added to the image first and then region-adaptive modeling can be performed according to the added film grain characteristics, or the method of region-adaptive modeling of the film grain region can be directly determined according to the features or textures of the image.

[0190] S630. Determine the film grain region adaptive indication information, which at least includes film grain parameter indication information and region indication information.

[0191] Determine the film grain region adaptive indication information corresponding to the image according to the region-adaptive film grain modeling process in S620. The film grain region adaptive indication information at least includes film grain parameter indication information and region indication information.

[0192] S640. Write the film grain region adaptive indication information into the corresponding encoded bitstream.

[0193] The bitstream may be an image bitstream or a transport stream or media file containing an image bitstream.

[0194] In one embodiment, Figure 7 is a structural block diagram of a film grain area processing device provided by an embodiment of the present application. This embodiment is applied to the decoding end. As Figure 7 shown, the film grain area processing device in this embodiment includes: a first determination module 710, a second determination module 720, a synthesis module 730, and an addition module 740.

[0195] The first determination module 710 is configured to determine film grain parameter indication information and area indication information according to the film grain area adaptive indication information corresponding to the received decoded image.

[0196] The second determination module 720 is configured to determine the film grain area in the decoded image according to the area indication information.

[0197] The synthesis module 730 is configured to synthesize the film grains corresponding to the decoded image according to the film grain parameters determined by the film grain parameter indication information.

[0198] The addition module 740 is configured to add the film grains to the film grain area in the decoded image.

[0199] In one embodiment, the second determination module 720 includes:

[0200] A first determination unit configured to determine the area type according to the area indication information;

[0201] A first acquisition unit configured to acquire the corresponding area description information from the area indication information based on the area type;

[0202] A second determination unit configured to determine the film grain area in the decoded image according to the area description information.

[0203] In one embodiment, the area type includes at least one of the following: externally defined area; internally defined area.

[0204] In one embodiment, the area type is characterized by at least one of the following parameters: at least one boolean parameter; an enumeration parameter.

[0205] In one embodiment, when the area type is an externally defined area, the first acquisition unit includes:

[0206] A first acquisition subunit configured to acquire the external area information source and the external area indication information from the area indication information;

[0207] The second acquisition subunit is configured to acquire corresponding external region description information according to an external region information source and external region indication information.

[0208] In one embodiment, when the region type is an internally defined region, the first acquisition unit is configured to directly acquire corresponding internal region description information from the region indication information.

[0209] In one embodiment, the second determination module includes:

[0210] The second acquisition unit is configured to acquire corresponding region description information according to the region indication information;

[0211] The third determination unit is configured to determine a film grain region in the decoded image according to the region description information.

[0212] In one embodiment, the third determination unit is configured as one of the following:

[0213] The region in the decoded image according to the region description information is defaulted to the region where the film grain is started;

[0214] The region in the decoded image according to the region description information is defaulted to the region where the film grain is not started;

[0215] According to the pre-configured film grain identifier, it indicates whether to start the film grain function for the region in the decoded image according to the region description information.

[0216] In one embodiment, the region indication information includes at least one of the following: region type; external region information source; external region indication information; external region description information.

[0217] In one embodiment, when the external region information source includes an annotation region, the external region indication information includes at least one of the following: the number of externally defined regions; the existence flag of the region index; the externally defined region index.

[0218] In one embodiment, when the external region information source includes an omnidirectional viewport, the external region indication information includes at least one of the following: view angle identifier; number of regions; region index.

[0219] In one embodiment, when the external region information source includes a sub-image or a sub-tile, the external region indication information includes at least one of the following: sub-image index; sub-image identifier; tile index; tile identifier.

[0220] In one embodiment, when the external region information source includes an annotation region, the region description information includes at least: the uppermost position of the bounding box; the leftmost position of the bounding box; the width of the bounding box; the height of the bounding box.

[0221] In one embodiment, when the external region information source includes alpha channel information, the region description information includes at least one of the following: alpha channel bit depth; alpha transparency value; alpha opacity value; alpha channel increment identifier; alpha channel clip identifier; alpha channel clip type identifier; and auxiliary picture sample information corresponding to the alpha channel information SEI message.

[0222] In one embodiment, when the external region information source includes an omnidirectional viewport, the region description information includes at least one of the following: viewing azimuth center; viewing elevation center; tilt center; viewing horizontal range; viewing vertical range.

[0223] In one embodiment, when the external region information source includes a sub-image or sub-tile, the region description information includes at least one of the following: sub-image size; sub-image position; sub-tile size; sub-tile position.

[0224] In one embodiment, the film grain region adaptive indication information includes at least: film grain region adaptive SEI message enabling information; externally defined region indication information; internally defined region indication information; number of externally defined regions; external region information source; region index existence flag; externally defined region index; number of internally defined regions; topmost position of the internally defined region; leftmost position of the internally defined region; width of the internally defined region; height of the internally defined region; film grain region adaptive SEI message persistence indication information; region type indication information; film grain function enabling information; number of film grain regions; film grain parameters.

[0225] The film grain region processing device provided in this embodiment is configured to implement Figure 2 the film grain region processing method applied to the decoding end in the shown embodiment. The implementation principle and technical effects of the film grain region processing device provided in this embodiment are similar and will not be elaborated here.

[0226] In one embodiment, Figure 8 is a structural block diagram of another film grain region processing device provided in an embodiment of the present application. This embodiment is applied to the encoding end. As Figure 8 shown, the film grain region processing device in this embodiment includes: a first generation module 810, a second generation module 820, and a sending module 830.

[0227] The first generation module 810 is configured to perform film grain region adaptive modeling on the source image to generate corresponding film grain parameter indication information and region indication information.

[0228] The second generation module 820 is configured to generate corresponding film grain region adaptive indication information according to the film grain parameter indication information and the region indication information.

[0229] A sending module 830, configured to write the film grain area adaptive indication information into the encoded bitstream corresponding to the source image and send it to the decoding end.

[0230] In one embodiment, the image parameters of the source image include at least one of the following: film grain characteristics; image features; image texture;

[0231] Among them, the film grain characteristics include at least one of the following: the intensity of the film grain; the scaling parameter of the film grain.

[0232] In one embodiment, the first generation module 810 includes:

[0233] A modeling unit, configured to perform film grain area adaptive modeling on the source image to obtain corresponding area description information, area type, and film grain parameters;

[0234] A first generation unit, configured to generate corresponding area indication information based on the area description information and the area type;

[0235] A second generation unit, configured to generate corresponding film grain parameter indication information based on the film grain parameters.

[0236] In one embodiment, the area type includes at least one of the following: externally defined area; internally defined area.

[0237] In one embodiment, when the area type is an externally defined area, the first generation unit includes:

[0238] A first generation subunit, configured to generate corresponding external area information source and external area indication information based on the external area description information;

[0239] A second generation subunit, configured to generate corresponding area indication information based on the external area information source and the external area indication information.

[0240] In one embodiment, when the area type is an internally defined area, the first generation unit is configured to directly generate corresponding area indication information based on the internal area description information.

[0241] In one embodiment, the area indication information includes at least one of the following: area type; external area information source; external area indication information; external area description information.

[0242] In one embodiment, when the external area information source includes an annotation area, the external area indication information includes at least one of the following: the number of externally defined areas; the area index existence flag; the externally defined area index.

[0243] In one embodiment, when the external region information source includes an omnidirectional viewport, the external region indication information includes at least one of the following: viewing angle identifier; number of regions; region index.

[0244] In one embodiment, when the external region information source includes a sub-image or a sub-tile, the external region indication information includes at least one of the following: sub-image index; sub-image identifier; tile index; tile identifier.

[0245] In one embodiment, when the external region information source includes an annotation region, the region description information includes at least: the topmost position of the bounding box; the leftmost position of the bounding box; the width of the bounding box; the height of the bounding box.

[0246] In one embodiment, when the external region information source includes alpha channel information, the region description information includes at least one of the following: alpha channel bit depth; alpha transparency value; alpha opacity value; alpha channel increment identifier; alpha channel clip identifier; alpha channel clip type identifier; and auxiliary picture sample information corresponding to the alpha channel information SEI message.

[0247] In one embodiment, when the external region information source includes an omnidirectional viewport, the region description information includes at least one of the following: viewing angle azimuth center; viewing angle elevation center; tilt center; viewing angle horizontal range; viewing angle vertical range.

[0248] In one embodiment, when the external region information source includes a sub-image or a sub-tile, the region description information includes at least one of the following: sub-image size; sub-image position; sub-tile size; sub-tile position.

[0249] In one embodiment, the film grain region adaptive indication information includes at least: film grain region adaptive SEI message enabling information; externally defined region indication information; internally defined region indication information; number of externally defined regions; external region information source; region index existence flag; externally defined region index; number of internally defined regions; topmost position of the internally defined region; leftmost position of the internally defined region; width of the internally defined region; height of the internally defined region; film grain region adaptive SEI message persistence indication information; region type indication information; film grain function enabling information; number of film grain regions; film grain parameters.

[0250] The film grain region processing device provided in this embodiment is configured to implement Figure 3 the film grain region processing method applied to the encoding end in the shown embodiment. The implementation principle and technical effects of the film grain region processing device provided in this embodiment are similar and will not be elaborated here.

[0251] In one embodiment, Figure 9It is a schematic structural diagram of a communication device provided by an embodiment of the present application. As Figure 9 shown, the device provided by the present application includes: a processor 910, a memory 920, and a communication module 930. The number of processors 910 in the device may be one or more, Figure 9 and one processor 910 is taken as an example herein. The number of memories 920 in the device may be one or more, Figure 9 and one memory 920 is taken as an example herein. The processor 910, the memory 920, and the communication module 930 of the device may be connected by a bus or other means, Figure 9 and connected by a bus is taken as an example herein.

[0252] The memory 920, as a computer-readable storage medium, can be set to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the device in any embodiment of the present application (for example, the first determination module 710, the second determination module 720, the synthesis module 730, and the addition module 740 in the film grain area processing method device). The memory 920 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created according to the use of the device, etc. In addition, the memory 920 may include high-speed random access memory, and may further include non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices. In some instances, the memory 920 may further include a memory remotely set relative to the processor 910, and these remote memories may be connected to the device through a network. Examples of the above network include but are not limited to the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.

[0253] In the case where the communication device is a decoding end, the above-provided device can be set to execute the film grain area processing method applied to the decoding end provided in any of the above embodiments, and has corresponding functions and effects.

[0254] In the case where the communication device is an encoding end, the above-provided device can be set to execute the film grain area processing method applied to the encoding end provided in any of the above embodiments, and has corresponding functions and effects.

[0255] The embodiments of the present application further provide a storage medium containing computer-executable instructions, which are used to execute a method for processing a film grain region applied to a decoding end when executed by a computer processor. The method includes: determining film grain parameter indication information and region indication information according to the received film grain region adaptive indication information corresponding to the decoded image; determining the film grain region in the decoded image according to the region indication information; synthesizing the film grains corresponding to the decoded image according to the film grain parameters determined by the film grain parameter indication information; and adding the film grains to the film grain region in the decoded image.

[0256] The embodiments of the present application further provide a storage medium containing computer-executable instructions, which are used to execute a method for processing a film grain region applied to an encoding end when executed by a computer processor. The method includes: performing adaptive modeling on a source image for a film grain region to generate corresponding film grain parameter indication information and region indication information; generating corresponding film grain region adaptive indication information according to the film grain parameter indication information and the region indication information; and writing the film grain region adaptive indication information into the encoded bitstream corresponding to the source image and sending it to the decoding end.

[0257] Those skilled in the art should understand that the term user equipment covers any suitable type of wireless user equipment, such as a mobile phone, a portable data processing device, a portable web browser, or an in-vehicle mobile station.

[0258] Generally, various embodiments of the present application can be implemented in hardware or dedicated circuits, software, logic, or any combination thereof. For example, some aspects can be implemented in hardware, while other aspects can be implemented in firmware or software that can be executed by a controller, a microprocessor, or other computing devices, although the present application is not limited thereto.

[0259] The embodiments of the present application can be implemented by a data processor of a mobile device executing computer program instructions, for example, in a processor entity, or by hardware, or by a combination of software and hardware. The computer program instructions can be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages.

[0260] Any block diagram of a logic flow in the accompanying drawings of the present application may represent program steps, or may represent interconnected logic circuits, modules and functions, or may represent a combination of program steps and logic circuits, modules and functions. A computer program may be stored in a memory. The memory may have any type suitable for the local technical environment and may be implemented using any suitable data storage technology, such as but not limited to Read-Only Memory (ROM), Random Access Memory (RAM), optical memory devices and systems (Digital Video Disc (DVD) or Compact Disk (CD)), etc. The computer-readable medium may include non-transitory storage media. The data processor may be any type suitable for the local technical environment, such as but not limited to general-purpose computers, special-purpose computers, microprocessors, Digital Signal Processing (DSP), Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FGPA), and processors based on multi-core processor architectures.

[0261] The above are only the preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A method for processing a film grain region, characterized in that, Applied to the decoding end, including: Determine the film grain parameter indication information and region indication information according to the received film grain region adaptive indication information corresponding to the decoded image; Determine the film grain region in the decoded image according to the region indication information; Synthesize the film grain corresponding to the decoded image according to the film grain parameters determined by the film grain parameter indication information; Add the film grain to the film grain region in the decoded image.

2. The method according to claim 1, wherein The determining the film grain region in the decoded image according to the region indication information includes: Determine the region type according to the region indication information; Obtain the corresponding region description information from the region indication information based on the region type; Determine the film grain region in the decoded image according to the region description information.

3. The method according to claim 2, wherein The region type includes at least one of the following: externally defined region; internally defined region.

4. The method according to claim 2, wherein The region type is characterized by at least one of the following parameters: at least one boolean parameter; enumerated parameter.

5. The method according to claim 2, wherein When the region type is an externally defined region, the obtaining the corresponding region description information from the region indication information based on the region type includes: Obtain the external region information source and external region indication information from the region indication information; Obtain the corresponding external region description information according to the external region information source and the external region indication information.

6. The method according to claim 2, wherein When the region type is an internally defined region, the obtaining the corresponding region description information from the region indication information based on the region type includes: Directly obtain the corresponding internal region description information from the region indication information.

7. The method according to claim 1, characterized in that The determining the film grain region in the decoded image according to the region indication information includes: Obtain the corresponding region description information according to the region indication information; Determine the film grain region in the decoded image according to the region description information.

8. The method according to claim 2 or 7, characterized in that The determining the film grain region in the decoded image according to the region description information includes one of the following: The region in the decoded image according to the region description information is defaulted to the region where the film grain is started; The region in the decoded image according to the region description information is defaulted to the region where the film grain is not started; According to the pre-configured film grain identifier, indicate whether the film grain function is started in the region of the region description information in the decoded image.

9. The method according to claim 1, wherein The region indication information includes at least one of the following: region type; external region information source; external region indication information; region description information.

10. The method according to claim 9, characterized in that, When the external region information source includes an annotation region, the external region indication information includes at least one of the following: number of externally defined regions; region index existence flag; externally defined region index.

11. The method according to claim 9, wherein When the external region information source includes an omnidirectional viewport, the external region indication information includes at least one of the following: viewing angle identifier; number of regions; region index.

12. The method according to claim 9, wherein When the external region information source includes a sub-image or sub-tile, the external region indication information includes at least one of the following: sub-image index; sub-image identifier; tile index; tile identifier.

13. The method according to claim 9, characterized in that, When the external region information source includes an annotation region, the region description information at least includes: the topmost position of the bounding box; the leftmost position of the bounding box; the width of the bounding box; the height of the bounding box.

14. The method according to claim 9, wherein When the external region information source includes alpha channel information, the region description information at least includes one of the following: alpha channel bit depth; alpha transparency value; alpha opacity value; alpha channel increment flag; alpha channel clip flag; alpha channel clip type flag; and auxiliary picture sample information corresponding to the alpha channel information SEI message.

15. The method according to claim 9, wherein When the external region information source includes an omnidirectional viewport, the region description information at least includes one of the following: azimuth center of view; elevation center of view; tilt center; horizontal view range; vertical view range.

16. The method according to claim 9, wherein When the external region information source includes a sub-image or a sub-tile, the region description information at least includes one of the following: sub-image size; sub-image position; sub-tile size; sub-tile position.

17. The method according to claim 9, wherein The film grain region adaptive indication information at least includes at least one of the following: film grain region adaptive SEI message enable information; externally defined region indication information; internally defined region indication information; number of externally defined regions; externally defined region information source; region index presence flag; externally defined region index; number of internally defined regions; topmost position of the internally defined region; leftmost position of the internally defined region; width of the internally defined region; height of the internally defined region; film grain region adaptive SEI message persistence indication information; region type indication information; film grain function enable information; number of film grain regions; film grain parameters.

18. A method for processing a film grain region, characterized in that, Applied to the encoding end, it includes: Performing film grain region adaptive modeling on the source image to generate corresponding film grain parameter indication information and region indication information; Generating corresponding film grain region adaptive indication information according to the film grain parameter indication information and the region indication information; Writing the film grain region adaptive indication information into the encoding bitstream corresponding to the source image and sending it to the decoding end.

19. The method according to claim 18, wherein The image parameters of the source image at least include one of the following: film grain characteristics; image features; image texture; Among them, the film grain characteristics at least include one of the following: the intensity of the film grain; the scaling parameter of the film grain.

20. The method according to claim 18, wherein The performing film grain region adaptive modeling on the source image to generate corresponding film grain parameter indication information and region indication information includes: Performing film grain region adaptive modeling on the source image to obtain corresponding region description information, region type, and film grain parameters; Generating corresponding region indication information based on the region description information and the region type; Generating corresponding film grain parameter indication information based on the film grain parameters.

21. The method according to claim 20, wherein The region type includes at least one of the following: externally defined region; internally defined region.

22. The method according to claim 20, wherein When the region type is an externally defined region, the generating corresponding region indication information based on the region description information and the region type includes: Generate corresponding external region information sources and external region indication information based on external region description information; Generate corresponding region indication information based on the external region information sources and the external region indication information.

23. The method according to claim 20, wherein When the region type is an internally defined region, the generating corresponding region indication information based on the region description information and the region type includes: Directly generate corresponding region indication information based on the internal region description information.

24. The method according to claim 20, wherein The region indication information includes at least one of the following: region type; external region information source; external region indication information; region description information.

25. A communication device, characterized in that, Includes: A memory, and one or more processors; The memory is configured to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1-17 or 18-24 above.

26. A storage medium, characterized in that, The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1-17 or 18-24 above is implemented.