Filtering strength control value indication in NNPF SEI messages

By determining slice-specific filtering strength control values for NNPFs, the method addresses suboptimal video quality and bandwidth issues in VVC, enhancing video processing efficiency and quality.

WO2026151756A1PCT designated stage Publication Date: 2026-07-16BYTEDANCE INC

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
BYTEDANCE INC
Filing Date
2026-01-07
Publication Date
2026-07-16

AI Technical Summary

Technical Problem

Existing video coding standards, such as Versatile Video Coding (VVC), lack the ability to efficiently apply different filtering strengths for neural-network post-processing filters (NNPFs) across slices, leading to suboptimal video quality and bandwidth utilization.

Method used

Implementing a method to determine a filtering strength control value for neural-network post-processing filters (NNPFs) specific to slices other than the first slice, enabling dynamic adjustment of filtering strength based on slice-specific requirements.

Benefits of technology

Enhances video quality by optimizing filtering strength across slices, reducing bandwidth demand, and improving overall video processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure US2026010421_16072026_PF_FP_ABST
    Figure US2026010421_16072026_PF_FP_ABST
Patent Text Reader

Abstract

A mechanism for processing video data is disclosed. The mechanism includes determining a filtering strength control value for a neural-network post-processing filter (NNPF) is related to a slice other than a first slice. A conversion is performed between a visual media data and a bitstream based on the filtering strength control value.
Need to check novelty before this filing date? Find Prior Art

Description

Filtering Strength Control Value Indication In NNPF SEI MessagesCROSS-REFERENCE TO RELATED APPLICATIONS

[0001] This application claims the priority to and benefits of U. S. Provisional Patent Application No. 63 / 742,607 filed on January' 7, 2025. All the aforementioned patent applications are hereby incorporated by reference in their entireties.TECHNICAL FIELD

[0002] This patent document relates to generation, storage, and consumption of digital audio video media information in a file format.BACKGROUND

[0003] Digital video accounts for the largest bandwidth used on the Internet and other digital communication networks. As the number of connected user devices capable of receiving and displaying video increases, the bandwidth demand for digital video usage is likely to continue to grow.SUMMARY

[0004] A first aspect relates to a method for processing video data comprising: determining a filtering strength control value for a neural-network post-processing filter (NNPF) is related to a slice other than a first slice; and performing a conversion between a visual media data and a bitstream based on the filtering strength control value.

[0005] A second aspect relates to an apparatus for processing video data comprising: a processor; and a non-transitory memory with instructions thereon, wherein the instructions upon execution by the processor, cause the processor to perform any of the preceding aspects.

[0006] A third aspect relates to non-transitory computer readable medium comprising a computer program product for use by a video coding device, the computer program product comprising computer executable instructions stored on the non-transitory computer readable medium such that when executed by a processor cause the video coding device to perform the method of any of the preceding aspects.

[0007] A fourth aspect relates to a non-transitory computer-readable recording medium storing a bitstream of a video which is generated by a method performed by a video processing apparatus, wherein the method comprises: determining a filtering strength control value for a neural-network post-processing filter (NNPF) is related to a slice other than a first slice; and generating a bitstream based on the determining.

[0008] A fifth aspect relates to a method for storing bitstream of a video comprising: determining a filtering strength control value for a neural-network post-processing filter (NNPF) is related to a slice other than a first slice; generating a bitstream based on the determining; and storing the bitstream in a non-transitory computer-readable recording medium.

[0009] For the purpose of clarity, any one of the foregoing embodiments may be combined with any one or more of the other foregoing embodiments to create a new embodiment within the scope of the present disclosure.

[0010] These and other features will be more clearly understood from the following detailed description taken in conjunction with the accompanying drawings and claims.BRIEF DESCRIPTION OF THE DRAWINGS

[0011] For a more complete understanding of this disclosure, reference is now made to the following brief description, taken in connection with the accompanying drawings and detailed description, wherein like reference numerals represent like parts.

[0012] FIG. 1 illustrates an example of deriving the four luma channels (right) from the luma component (left) when impfc inp order idc is equal to 3.

[0013] FIG. 2 is a block diagram showing an example video processing system.

[0014] FIG. 3 is a block diagram of an example video processing apparatus.

[0015] FIG. 4 is a flowchart for an example method of video processing.

[0016] FIG. 5 is a block diagram that illustrates an example video coding sy stem.

[0017] FIG. 6 is a block diagram that illustrates an example encoder.

[0018] FIG. 7 is a block diagram that illustrates an example decoder.

[0019] FIG. 8 is a schematic diagram of an example encoder.DETAILED DESCRIPTION

[0020] It should be understood at the outset that although an illustrative implementation of one or more embodiments are provided below, the disclosed systems and / or methods may be implemented using any number of techniques, whether currently known or yet to be developed. The disclosure should in no way be limited to the illustrative implementations, drawings, and techniques illustrated below, including the exemplary designs and implementations illustrated and described herein, but may be modified within the scope of the appended claims along with their full scope of equivalents.

[0021] Section headings are used in the present document for ease of understanding and do not limit the applicability of techniques and embodiments disclosed in each section only to that section. Furthermore. H.266 terminology is used in some description only for ease of understanding and not for limiting scope of the disclosed techniques. As such, the techniques described herein are applicable to other video codec protocols and designs also. In the present document, editing changes are shown to text by bold italics indicating cancelled text and bold indicating added text, with respect to the Versatile Video Coding (WC) specification.1. Initial discussion

[0022] This document is related to image / video coding technologies. Specifically, this disclosure is related to use of neural-network post-processing filter (NNPF) supplemental enhancement information (SEI) messages with the ability to apply a different filtering strength control value (e.g., StrengthControlVal) from the one derived from the coded video bitstream. The ideas may be applied individually or in various combinations, for video bitstreams coded by any codec, e.g., the versatile video coding (WC) standard and / or the versatile supplemental enhancement information (VSEI) messages for coded video bitstreams standard.2. Abbreviations

[0023] Adaptation parameter set (APS), access unit (AU), coded layer video sequence (CLVS), coded layer video sequence start (CLVSS), cyclic redundancy check (CRC), coded video sequence (CVS), finite impulse response (FIR), intra random access point (IRAP), network abstraction layer (NAL), neural-network post-processing filter (NNPF), neural-network post-fdter activation (NNPF A), neural-network post-filter characteristics (NNPFC), picture parameter set (PPS), picture unit (PU), random access skipped leading (RASL) picture, supplemental enhancement information (SEI), step-wise temporal sublayer access (STSA), uniform resource identifier (URI), video coding layer (VCL), versatile supplemental enhancement information as described in Rec. ITU-T H.274 | ISO / IEC 23002-7 (VSEI), video usability information (VUI). versatile video coding as described in Rec. ITU-T H.266 | ISO / IEC 23090-3 (WC) 3. Further discussion3.1 Video coding standards

[0024] Video coding standards have evolved primarily through the development of International Telecommunication Union (ITU) telecommunication standardization sector (ITU-T) and International Organization for Standardization (ISO) / International Electrotechnical Commission (IEC) standards. The ITU-T produced H.261 and H.263, ISO / IEC produced motion picture experts group (MPEG)-1 and MPEG-4 Visual, and the two organizations jointly produced the H.262 / MPEG-2 Video and H.264 / MPEG-4 Advanced Video Coding (AVC) and H.265 / high efficiency video coding (HEVC) [1] standards. Since H.262, the video coding standards are based on the hybrid video coding structure wherein temporal prediction plus transform coding are utilized. To explore video coding technologies beyond high efficiency video coding (HEVC), the Joint Video Exploration Team (JVET) was founded by video coding experts group (VCEG) and motion picture experts group (MPEG). Further, methods have been adopted by JVET and put into the reference software named Joint Exploration Model (JEM) [2], The JVET was later renamed to be the Joint Video Experts Team (JVET) when the Versatile Video Coding (WC) project officially started. WC [3] is a coding standard targeting at 50% bitrate reduction as compared to HEVC.

[0025] The Versatile Video Coding (WC) standard (ITU-T H.266 | ISO / IEC 23090-3) [3] and the associated Versatile Supplemental Enhancement Information for coded video bitstreams (VSEI) standard (ITU-T H.274 | ISO / IEC 23002-7) [4] are designed for use in a maximally broad range of applications, including both the simple uses such as television broadcast, video conferencing, or playback from storage media, and also more advanced use cases such as adaptive bit rate streaming, video region extraction, composition and merging of content from multiple coded video bitstreams, multivicw video, scalable layered coding, and view port-adaptive 360° immersive media.

[0026] The Essential Video Coding (EVC) standard (ISO / IEC 23094-1) is another video coding standard under development by MPEG.3.2 SEI messages in general and in WC and VSEI

[0027] SEI messages assist in processes related to decoding, display or other purposes. However, SEI messages are not required for constructing the luma or chroma samples by the decoding process. Conforming decoders are not required to process this information for output order conformance. Some SEI messages are required for checkingbitstream conformance and for output timing decoder conformance. Other SEI messages are not required for check bitstream conformance.

[0028] Annex D of WC specifies syntax and semantics for SEI message payloads for some SEI messages, and specifies the use of the SEI messages and VUI parameters for which the syntax and semantics are specified in ITU-T H.274 | ISO / IEC 23002-7.3.3. Neural-network post-processing filters SEI messages and their usages

[0029] JVET-AJ2006 [5] includes the specification of SEI messages for signalling of neural-network post-filters. The neural-network post-filter characteristics SEI is as follows.8.28.1 Neural-network post-filter characteristics SEI message8.28.1.1 Neural-network post-filter characteristics SEI message syntaxnn_post_filter_characteristics( payloadSize ) { Descriptor nnpfc_purpose u(16) nnpfc id ue(v) nnpfc base flag u(l) nnpfc mode idc ue(v) if( nnpfc mode idc = = 1 ) {while(!byte_aligned( ) )nnpfc alignment zero bit a f(l) nnpfc tag uri st(v) nnpfc uri st(v) }nnpfc_property_present_flag u(l) if( nnpfc_property_present_flag ) { / * input and output formatting * / nnpfc num input pics minusl ue(v) if( nnpfc_num_input_pics_minusl > 0 ) {for( i = 0; i <= nnpfc_num_input_pics_minusl; i++ )nnpfc_input_pic_filtering_flag| i ] u(l) nnpfc absent input pic zero flag u(l) }if( ChromaUpsamplingFlag )nnpfc out sub c flag u(l) if( ColourizationFlag )nnpfc out colour format idc u(2) if( ResolutionResamplingFlag ) {nnpfc_pic_width_num_minusl ue(v) nnpfc pic width denom minusl ue(v) nnpfc_pic_height_num_minusl ue(v) nnpfc_pic_height_denom_minusl ue(v) }if( PictureRateUpsamplingFlag )for( i = 0; i < nnpfc_num_input_pics_minusl; i++ )nnpfc interpolated picsL i J ue(v) if( TemporalExtrapolationFlag )nnpfc extrapolated pics minusl ue(v) if( SpatialExtrapolationFlag ) {nnpfc spatial extrapolation left offset sc(v) nnpfc spatial extrapolation right offset se(v) nnpfc spatial extrapolation top offset se(v) nnpfc spatial extrapolation bottom offset se(v) }nnpfc component last flag u(l) nnpfc inp format idc ue(v) nnpfc auxiliary inp idc ue(v) if( ( nnpfc auxiliary inp idc & 2 ) > 0 ) {nnpfc_inband_prompt_flag u(l) if( nnpfc_inband_prompt_flag ) {while(!byte_aligned( ) )nnpfc alignment zero bit c f(l) nnpfc prompt st(v) }}nnpfc inp order idc ue(v) if( nnpfc inp format idc = = 1 ) {if( nnpfc inp order idc!= 1 )nnpfc inp tensor luma bitdepth minus8 ue(v) if( nnpfc inp order idc > 0 )nnpfc_inp_tensor_chroma_bitdepth_minus8 ue(v) }nnpfc out format idc ue(v)nnpfc out order idc ue(v) if( nnpfc out fonnat idc = = 1 ) {if( nnpfc out order idc!= 1 )nnpfc_out_tensor_luma_bitdepth_minus8 ue(v) if( nnpfc out order idc!= 0 )nnpfc_out_tensor_chroma_bitdepth_minus8 ue(v) }nnpfc_separate_colour_description_present_flag u(l) if( nnpfc_separate_colour_description_present_flag ) {nnpfc_colour_primaries u(8) nnpfc transfer characteristics u(8) if( nnpfc out fonnat idc = = 1 ) {nnpfc matrix coeffs u(8) nnpfc full range flag u(l) }}if( nnpfc out order idc > 0 )nnpfc chroma loc info present flag u(l) if( nnpfc_chroma_loc_info_present_flag )nnpfc chroma samplc loc typc frame uc(v) if(! SpatialExtrapolationFlag ) {nnpfc overlap ue(v) nnpfc constant patch size flag u(l) }if( nnpfc_constant_patch_size_flag ) {nnpfc patch width minusl ue(v) nnpfc_patch_height_minusl ue(v) } else {nnpfc_extended_patch_width_cd_delta_minusl ue(v) nnpfc_extended_patch_height_cd_delta_minusl ue(v) }nnpfc_padding_type ue(v) if( nnpfc_padding_type = = 4 ) {if( nnpfc inp order idc!= 1 )nnpfc luma padding val ue(v)if( nnpfc inp order idc!= () ) {nnpfc_cb_padding_val ue(v) nnpfc_cr_padding_val ue(v) }}nnpfc_complexity_info_p resent flag u(l) if( nnpfc_complexity_info_present flag ) {nnpfc parameter type idc u(2) if( nnpfc_parameter_type_idc!= 2 )nnpfc_log2_parameter_bit_length_minus3 u(2) nnpfc_num_parameters_idc u(6) nnpfc num kmac operations idc uc(v) nnpfc total kilobyte size ue(v) }nnpfc num metadata extension bits ue(v) if( nnpfc num metadata extension bits > 0 ) {if( nnpfc_purpose = = 0 ) {nnpfc application purpose tag iiri present flag u(l) if( nnpfc_application_purpose_tag_uri_present flag ) {whilc(!bytc_aligncd( ) )nnpfc metadata alignment zero bit f(l) nnpfc application purpose tag uri st(v) }}if( SpatialExtrapolationFlag ResolutionResamplingFlag )nnpfc scan type idc u(2) nnpfc_for_human_viewing_idc u(2) nnpfc for machine analysis idc u(2) nnpfc reserved metadata extension u(v) }} / * ISO / IEC 15938-17 bitstream * / if( nnpfc mode idc = = 0 ) {while(!byte_aligned( ) )nnpfc alignment zero bit b f(l)for( i = 0; more_data_in_payload( ); i++ )nnpfc_payload_byte[ i ] b(8) }}8.28.1.2 Neural-network post-filter characteristics SEI message semantics

[0030] The neural-network post-filter characteristics (NNPFC) SEI message specifies a neural netw ork that max’ be used as a post-processing filter. The use of specified neural-network post-processing filters (NNPFs) for specific pictures is indicated with neural-network post-filter activation (NNPFA) SEI messages.

[0031] Use of this SEI message requires the definition of the following variables:Input picture width and height in units of luma samples, denoted herein by CroppedWidth and CroppedHeight, respectively.Luma sample array CroppedYPic[ idx ] and chroma sample arrays CroppedCbPic[ idx ] and CroppedCrPic[ idx ], when present, of the input pictures with index idx in the range of 0 to numlnputPics - 1, inclusive, that are used as input for tire NNPF.- Bit depth BitDepthY for the luma sample array of the input pictures.- Bit depth BitDepthC for the chroma sample arrays, if any, of the input pictures.- A chroma format indicator, denoted herein by ChromaFormatldc, as described in clause 7.3.- When rmpfc auxiliary inp idc is equal to 1, a filtering strength control value array StrengthControlVal[ idx ] that shall contain real numbers in the range of 0 to 1, inclusive, of the input pictures with index idx in the range of 0 to numlnputPics - 1, inclusive.

[0032] Input picture with index 0 corresponds to the picture for which the NNPF defined by this NNPFC SEI message is activated by an NNPFA SEI message. Input picture with index i in the range of 1 to numlnputPics - 1, inclusive, precedes the input picture with index i - 1 in output order.

[0033] The variables SubWidthC and SubHeightC are derived from ChromaFormatldc as specified by Table 2.

[0034] NOTE 1 - More than one NNPFC SEI message can be present for die same picture. When more than one NNPFC SEI message with different values of impfc id is present or activated for the same picture, they can have the same value or different values of nnpfc_purpose and the same value or different values of nnpfc mode idc.

[0035] impfc_purpose indicates the purpose of the NNPF as specified in Table 20, where ( nnpfc_purpose & bitMask ) not equal to 0 indicates that the NNPF has the purpose associated with the bitMask value in Table 20. When nnpfc_purpose is greater tiian 0 and ( nnpfc_purpose & bitMask ) is equal to 0, the purpose associated with the bitMask value is not applicable to the NNPF. When nnpfc_pupose is equal to 0, the NNPF max' be used as determined by the application and as specified by the mipfc_application_purpose_tag_uri.

[0036] All NNPFC SEI messages with a particular value of mipfc id within a CLVS shall have the same value of nnpfc_purpose.

[0037] The value of nnpfc_purpose shall be in the range of 0 to 255, inclusive, in bitstreams conforming to this version of this Specification. Values of 256 to 65 535, inclusive, for impfc_purpose are reserved for future use by ITU-T | ISO / IEC and shall not be present in bitstreams conforming to this version of this Specification. Decoders conforming to this version of this Specification shall ignore NNPFC SEI messages with impfc_purpose in the range of 256 to 65 535, inclusive.Table 20 - Definition of nnpfc purposebitMask Interpretation0x01 General visual quality improvementChroma upsampling (from the 4:2:0 chroma format to the 4:2:2 or 4:4:4 chroma format, or 0x02from the 4:2:2 chroma format to the 4:4:4 chroma format)0x04 Resolution resampling (increasing or decreasing the width or height)0x08 Picture rate upsampling0x10 Bit depth upsampling (increasing the luma bit depth or the chroma bit depth)0x20 Colourization0x40 Temporal extrapolation (i.e., generating one or more future pictures)Spatial extrapolation (i.e., generating content outside of the spatial area of the input pictures), 0x80possibly also with removal (i.e. remove partial content from the input pictures)

[0038] The variables ChromaUpsamplingFlag, ResolutionResamplingFlag, PictureRateUpsamplingFlag, BitDepthUpsamplingFlag, ColourizationFlag, and TemporalExtrapolationFlag, specifying whether nnpfc_purpose indicates the purpose of the NNPF to include chroma upsampling, resolution resampling, picture rate upsampling, bit depth upsampling, colourization, and temporal extrapolation, respectively, are derived as follows:ChromaUpsamplingFlag = ( ( nnpfc_purpose & 0x02 ) > 0 )? 1: 0ResolutionResamplingFlag = ( ( nnpfc_purpose & 0x04 ) > 0 )? 1: 0PictureRateUpsamplingFlag = ( ( nnpfc_purpose & 0x08 ) > 0 )? 1: 0 (75) BitDepthUpsamplingFlag = ( ( nnpfc_purpose & 0x10 ) > 0 )? 1: 0ColourizationFlag = ( ( mipfc_purpose & 0x20 ) > 0 )? 1: 0TemporalExtrapolationFlag = ( ( impfc_purpose & 0x40 ) > 0 )? 1: 0SpatialExtrapolationFlag = ( ( nnpfc_purpose & 0x80 ) > 0 )? 1: 0

[0039] NOTE 2 - When a reserved value of nnpfc_purpose is taken into use in the future by ITU-T | ISO / IEC, the syntax of this SEI message could be extended with syntax elements whose presence is conditioned by nnpfc_purpose being equal to that value or any one of a set of values including that value.

[0040] When ChromaFormatIdc is equal to 3, ChromaUpsamplingFlag shall be equal to 0.

[0041] When ChromaUpsamplingFlag is equal to 1, ColourizationFlag shall be equal to 0.

[0042] When PictureRateUpsamplingFlag or TemporalExtrapolationFlag is equal to 1 and the input picture with index 0 is associated with a frame packing arrangement SEI message with fp arrangement type equal to 5, all inputpictures are associated with a frame packing arrangement SEI message with fp arrangement type equal to 5 and the same value of fp_current_frame_is_frame()_flag.

[0043] When TemporalExtrapolationFlag is equal to 1, the extrapolated pictures generated by the NNPF follow all input pictures of the NNPF in output order. When TemporalExtrapolationFlag is equal to 1 and there is a decoded output picture that follows, in output order, the current picture for which the NNPF is activated, the extrapolated pictures generated by the NNPF precede that decoded output picture in output order.

[0044] impfc id contains an identifying number that may be used to identify an NNPF. The value of nnpfc id shall be in the range of 0 to 232- 2, inclusive. Values of nnpfc id from 256 to 511, inclusive, and from 231to 232- 2, inclusive, are reserved for future use by ITU-T | ISO / IEC. Decoders conforming to this version of this Specification encountering an NNPFC SEI message with nnpfc id in the range of 256 to 511, inclusive, or in the range of 231to 232- 2, inclusive, shall ignore the SEI message.

[0045] When an NNPFC SEI message is the first NNPFC SEI message, in decoding order, that has a particular impfc id value within the current CLVS, the following applies:- This SEI message specifies a base NNPF.- This SEI message pertains to the current decoded picture and all subsequent decoded pictures of the current layer, in output order, until die end of the current CLVS.

[0046] impfc base flag equal to 1 specifies that the SEI message specifies the base NNPF. impfe base flag equal to 0 specifies that the SEI message specifies an update relative to the base NNPF.

[0047] The following constraints apply to the value of nnpfe base flag:- When an NNPFC SEI message is the first NNPFC SEI message, in decoding order, that has a particular nnpfc id value within the current CLVS, the value of nnpfe base flag shall be equal to 1.- All NNPFC SEI messages in a CLVS that have a particular nnpfc id value and nnpfe base flag equal to 1 shall have identical SEI payload content.

[0048] When nnpfe base flag is equal to 0, the following applies:- This SEI message defines an update relative to the preceding base NNPF in decoding order with the same impfc id value. Updates are not cumulative but ratiier each update is applied on the base NNPF, which is the NNPF specified by the first NNPFC SEI message, in decoding order, that has a particular nnpfc id value witiiin the current CLVS. The NNPF defined by this SEI message is obtained by applying the update defined by this SEI message relative to the base NNPF with the same nnpfc id value.This SEI message pertains to the current decoded picture and all subsequent decoded pictures of the current layer, in output order, until the end of the current CLVS or up to but excluding the decoded picture that follows the current decoded picture in output order within the current CLVS and is associated with a subsequent NNPFC SEI message, in decoding order, having nnpfe base flag equal to 0 and that particular nnpfc id value within the current CLVS, whichever is earlier.

[0049] nnpfe mode ide, when equal to 0, indicates that the neural network information is contained in the NNPFC SEI message, and the neural network information is in the format of an ISO / IEC 15938-17 bitstream.nnpfc mode idc equal to 1 indicates that the neural network information is identified by the URI indicated by nnpfc uri with the format identified by the tag URI nnpfc tag uri.

[0050] The value of nnpfc mode idc shall be in the range of 0 to 255, inclusive. Values of 2 to 255, inclusive, for nnpfc mode idc are reserved for future use by ITU-T | ISO / IEC and shall not be present in bitstreams conforming to this version of this Specification. Decoders conforming to this version of this Specification shall ignore NNPFC SEI messages with nnpfc mode idc in die range of 2 to 255, inclusive.

[0051] impfc alignment zero bit a shall be equal to 0.

[0052] nnpfc tag uri contains a tag URI with syntax and semantics as specified in IETF RFC 4151 identifying the format and associated information about the neural network used as a base NNPF or an update relative to the base NNPF with the same nnpfc id value specified by nnpfc uri.

[0053] NOTE 3 - nnpfc tag uri enables uniquely identifying the format of neural network data specified by nnpfc uri without needing a central registration authority.

[0054] nnpfc tag uri equal to "tag:iso.org,2023: 15938-17" indicates that the neural network data identified by nnpfc uri conforms to ISO / IEC 15938-17.

[0055] nnpfc uri contains a URI with syntax and semantics as specified in IETF Internet Standard 66 identifying the neural network used as a base NNPF or an update relative to the base NNPF with the same nnpfc id value.

[0056] nnpfc_property_present_flag equal to 1 specifies that syntax elements related to the filter properties including purpose, input formatting, output formatting, and complexity are present. nnpfc_property _present_flag equal to 0 specifies that no syntax elements related to the filter properties are present.

[0057] When nnpfc base flag is equal to 1. nnpfc_property_present_flag shall be equal to 1.

[0058] When nnpfc_property_present_flag is equal to 0, the values of all syntax elements that may be present only when nnpfc_property_present flag is equal to 1 are inferred to be equal to their corresponding syntax elements, respectively, in the NNPFC SEI message that contains the base NNPF for which this SEI message provides an update.

[0059] When an NNPFC SEI message nnpfcCurr is not the first NNPFC SEI message, in decoding order, that has a particular nnpfc id value within the current CLVS, is not a repetition of the first NNPFC SEI message with that particular nnpfc id value (in this case the value of nnpfc base flag is equal to 0), and the value of nnpfc_property_present_flag is equal to 1, the following constraints apply:- The values of syntax elements following nnpfc_property_present_flag and preceding nnpfc_complexity_info_present_flag, in decoding order, in the NNPFC SEI message shall be the same as the values of corresponding sy ntax elements in the first NNPFC SEI message, in decoding order, that has that particular nnpfc id value within the current CLVS.Either nnpfc_complexity_info_present_flag shall be equal to 0 or both nnpfc_complexity_info_present_flag shall be equal to 1 in the first NNPFC SEI message, in decoding order, that has that particular nnpfc id value within the current CLVS (denoted as nnpfcBase below) and all the following constraints apply: nnpfc_parameter_type_idc in nnpfcCurr shall be equal to nnpfc_parameter_type_idc in nnpfcBase.nnpfc_log2_parameter_bit_length_minus3 in nnpfcCurr, when present, shall be less than or equal to nnpfc_log2_parameter_bit_length_minus3 in nnpfcBase.- If nnpfc_num_parameters_idc in nnpfcBase is equal to 0, nnpfc_num_parameters_idc in nnpfcCurr shall be equal to 0.- Otherwise (nnpfc_num_parameters_idc in nnpfcBase is greater than 0), nnpfc_num_parameters_idc in nnpfcCurr shall be greater than 0 and less than or equal to nnpfc_num_parameters_idc in nnpfcBase.- If nnpfc num kmac operations idc in nnpfcBase is equal to 0, nnpfc num kmac operations idc in nnpfcCurr shall be equal to 0.- Otherwise (nnpfc num kmac operations idc in nnpfcBase is greater than 0), nnpfc num kmac operations idc in nnpfcCurr shall be greater than 0 and less than or equal to nnpfc num kmac operations idc in nnpfcBase. If nnpfc total kilobyte size in nnpfcBase is equal to 0, nnpfc total kilobyte size in nnpfcCurr shall be equal to 0.Otherwise (nnpfc total kilobyte size in nnpfcBase is greater than 0), nnpfc total kilobyte size in nnpfcCurr shall be greater than 0 and less than or equal to nnpfc total kilobyte size in nnpfcBase.

[0060] nnpfc_num_input_pics_minusl plus 1 specifies the number of pictures used as input for the NNPF. The value of nnpfc_num_input_pics_minusl shall be in the range of 0 to 63, inclusive. When PictureRateUpsamplingFlag is equal to 1, the value of nnpfc_num_input_pics_minusl shall be greater than 0.

[0061] The variable numlnputPics, specifying the number of pictures used as input for the NNPF, is derived as follows:numlnputPics = nnpfc_num_input_pics_minus 1 + 1 (76)

[0062] nnpfc input_pic filtering flag [ i ] equal to 1 indicates that for the i-th input picture the NNPF generates a corresponding output picture. nnpfc_input_pic_filtering_flag[ i ] equal to 0 indicates that for the i-th input picture the NNPF does not generate a corresponding output picture. Each NNPF -generated picture is stored in the output tensor of the NNPF. When nnpfc_num_input_pics_minusl is equal to 0, nnpfc_input_pic_filtering_flag

[0000] is inferred to be equal to 1. When PictureRateUpsamplingFlag is equal to 0 and nnpfc_num_input_pics_minusl is greater than 0, nnpfc_input_pic_filtering_flag[ i ] shall be equal to 1 for at least one value of i in the range of 0 to nnpfc_num_input_pics_minus1, inclusive.

[0063] nnpfc_absent_input_pic_zero_flag equal to 1 indicates that the NNPF expects an input picture that is not present in the bitstream to be represented by sample arrays widi sample values equal to 0. nnpfc_absent_input_pic_zero_flag equal to 0 indicates that the NNPF expects an input picture inputPicA that is not present in the bitstream to be represented by the input picture inputPicB that is the closest to inputPicA in output order and is present in the bitstream.

[0064] nnpfc out sub c flag specifies the values of the variables outSubWidthC and outSubHeightC when ChromaUpsamplingFlag is equal to 1. nnpfc out sub c flag equal to 1 specifies that outSubWidthC is equal to 1 and outSubHeightC is equal to 1. nnpfc out sub c flag equal to 0 specifies that outSubWidthC is equal to 2 andoutSubHeightC is equal to 1. When ChromaFormatldc is equal to 2 and nnpfc_out_sub_c_flag is present, the value of nnpfc out sub c flag shall be equal to 1.

[0065] nnpfc out colour format idc, when ColourizationFlag is equal to 1, specifies the colour format of the NNPF-generated pictures and consequently the values of the variables outSubWidthC and outSubHeightC. nnpfc out colour format idc equal to 1 specifies that the colour format of the NNPF-generated pictures is the 4:2:0 format and outSubWidthC and outSubHeightC are both equal to 2. nnpfc out colour format idc equal to 2 specifies that the colour format of the NNPF-generated pictures is the 4:2:2 format and outSubWidthC is equal to 2 and outSubHeightC is equal to 1. nnpfc out colour format idc equal to 3 specifies that the colour format of the NNPF-generated pictures is the 4:4:4 format and outSubWidthC and outSubHeightC are both equal to 1. The value of nnpfc out colour format idc shall not be equal to 0.

[0066] When ChromaUpsamplingFlag and ColourizationFlag are both equal to 0, outSubWidthC and outSubHeightC are inferred to be equal to SubWidthC and SubHeightC, respectively.

[0067] nnpfc_pic width num minusl plus 1 and nnpfc_pic_width_denom_minusl plus 1 specify the numerator and denominator, respectively, for the resampling ratio of the width of the NNPF-generated pictures relative to CroppcdWidth. Both nnpfc_pic_width_num_minusl and nnpfc_pic_width_denom_minus1 shall be in the range of 0 to 65 535, inclusive.

[0068] The value of ( nnpfc_pic_width_num_minusl + 1 ) ( nnpfc_pic_width_denom_minusl + 1 ) shall be in the range of 1 ∕ 16 to 16, inclusive. When nnpfc_pic_width_num_minusl and nnpfc_pic_width_denom_minusl are not present, the values of nnpfc pic width num minus 1 and nnpfc_pic width denom minus 1 are both inferred to be equal to 0.

[0069] The variables nnpfcOutputPicWidth and nnpfcOutputPicHeight respectively represent the width and height of the luma sample arrays of the NNPF-generated pictures when SpatialExtrapolationFlag is equal to 0.

[0070] The variables nnpfcOutputPicWidth1 and nnpfcOutputPicHeight1 respectively represent the width and height of the luma sample arrays of the NNPF-generated pictures when SpatialExtrapolationFlag is equal to 1.

[0071] The variable nnpfcOutputPicWidth is derived as follows:nnpfcOutputPicWidth = Ceil( CroppedWidth * (77)( nnpfc_pic_width_num_minus1 + 1 ) ÷ ( nnpfc_pic_width_denom_minus1 + 1 ) )

[0072] When SpatialExtrapolation is equal to 1, nnpfcOutputPicWidth 1 is derived as follows:nnpfcOutputPicWidth1 = nnpfcOutputPicWidth + outSubWidthC * (nnpfc spatial extrapolation left offset + nnpfc spatial extrapolation right offset) (78)

[0073] It is a requirement of bitstream conformance that when SpatialExtrapolation is equal to 0 nnpfcOutputPicWidth shall be greater than 0 and nnpfcOutputPicWidth % outSubWidthC shall be equal to 0.

[0074] It is a requirement of bitstream conformance that when SpatialExtrapolation is equal to 1 nnpfcOutputPicWidth 1 shall be greater than 0 and nnpfcOutputPicWidth 1 % outSubWidthC shall be equal to 0.

[0075] nnpfc_pic_height_num_minus1 plus 1 and nnpfc_pic_height_denom_minus1 plus 1 specify the numerator and denominator, respectively, for the resampling ratio of the height of the NNPF-generated pictures relativeto CroppedHeight. Both nnpfc_pic_height_num_minusl and nnpfc_pic_height_denom_minusl shall be in the range of 0 to 65535, inclusive.

[0076] The value of ( nnpfc_pic_height_num_minusl + 1 ) ( nnpfc_pic_height_denom_minusl + 1 ) shall be in the range of 1 ∕ 16 to 16, inclusive. When nnpfc_pic_height_num_minusl and nnpfc_pic_height_denom_minus1 are not present, the values of nnpfc_pic_height_num_minus1 and nnpfc_pic_height_denom_minus1 are both inferred to be equal to 0.

[0077] The variable nnpfcOutputPicHeight is derived as follows:nnpfcOutputPicHeight = Ceil( CroppedHeight * (78)( nnpfc_pic_height_num_minus1 + 1 ) ÷ ( nnpfc_pic_height_denom_minus1 + 1 ) )

[0078] When SpatialExtrapolation is equal to 1, nnpfcOutputPicHeightl is derived as follows:nnpfcOutputPicHeight 1 = nnpfcOutputPicHeight + outSubHeightC *( nnpfc spatial extrapolation top offset + nnpfc spatial extrapolation bottom offset ) (78)

[0079] It is a requirement of bitstream conformance that when SpatialExtrapolation is equal to 0 nnpfcOutputPicHeight shall be greater than 0 and nnpfcOutputPicHeight % outSubHeightC shall be equal to 0.

[0080] It is a requirement of bitstream conformance that when SpatialExtrapolation is equal to 1 nnpfcOutputPicHeightl shall be greater than 0 and nnpfcOutputPicHeightl % outSubHeightC shall be equal to 0.

[0081] When ResolutionResamplingFlag is equal to 1, at least one the following conditions shall be true:- The value of nnpfcOutputPicWidth is not equal to CroppedWidth.- The value of nnpfcOutputPicHeight is not equal to CroppedHeight.- SpatialExtrapolationFlag is equal to 1.

[0082] nnpfc_interpolated_pics [ i ] specifies the number of interpolated pictures generated by tire NNPF between the i-th and the ( i + 1 )-th input picture for the NNPF. The value of nnpfc_interpolated_pics[ i ] shall be in the range of 0 to 63, inclusive. When the nnpfc_interpolated_pics[ i ] syntax elements are present, the value of nnpfc_interpolated_pics[ i ] shall be greater than 0 for at least one value of i in the range of 0 to nnpfc_num_input_pics_minusl - 1, inclusive.

[0083] NOTE 4 - When PictureRateUpsamplingFlag is equal to 1 for an NNPF and the NNPFA SEI message that activated this NNPF has nnpfa_persistence_flag equal to 1, only for a single value of i in the range of 0 to numlnputPics - 1, inclusive, the value of nnpfc_interpolated_pics[ i ] is greater than 0.

[0084] mipfc_extrapolated_pics_minusl plus 1 specifies the number of extrapolated pictures generated by the NNPF subsequent to all input pictures for die NNPF in output order. The value of nnpfc_extrapolated_pics_minusl shall be in the range of 0 to 62, inclusive.

[0085] The variables NumlnpPicsInOutputTensor, specifying the number of pictures that have a corresponding input picture and are present in the output tensor of the NNPF, Inpldx[ idx ]. specifying the input picture index, to the list of input pictures in reverse output order, of the idx-th picture that is present in the output tensor of the NNPF and has a corresponding input picture, and numPicsInOutputTensor, specifying the total number of pictures present in the output tensor of the NNPF, are derived as follows:for( i = 0, numPicsInOutputTensor = 0; i < nmnlnputPics; i++ )if( nnpfc_input_pic_filtering_flag[ i ] ) {InpTdx[ numPicsInOutputTensor ] = inumPicsInOutputTensor++} (79) NumlnpPicsInOutputTensor = numPicsInOutputTensorif( PictureRateUpsamplingFlag )fbr( i = 0; i <= numlnputPics - 2; i++ )numPicsInOutputTensor += nnpfc_interpolated_pics[ i ]if( TemporalExtrapolationFlag )numPicsInOutputTensor += nnpfc_extrapolated_pics + 1

[0086] nnpfc spatial extrapolation left offset, impfc spatial extrapolation right offset, nnpfc_spatial_ extrapolation top offset, and nnpfc spatial extrapolation bottom offset specify the spatial extrapolation area. When nnpfc spatial extrapolation left offset, nnpfc spatial extrapolation right offset, nnpfc spatial extrapolation top offset, and nnpfc spatial extrapolation bottom offset are each greater than or equal to 0, the luma samples with horizontal picture coordinates from outSubWidthC * nnpfc spatial extrapolation left offset to nnpfcOutputPicWidth1 - ( outSubWidthC * nnpfc spatial extrapolation right offset ) and vertical picture coordinates from outSubHeightC * nnpfc spatial extrapolation top offset to nnpfcOutputPicHeight1 - ( outSubHeightC * nnpfc spatial extrapolation bottom offset ) correspond to the spatial area of the input picture. The value of nnpfc spatial extrapolation left offset, nnpfc spatial extrapolation right offset, nnpfc_spatial_ extrapolation top offset and nnpfc spatial extrapolation bottom offset shall be in the range of -65 536 to 65 536, inclusive. At least one of nnpfc spatial extrapolation left offset, nnpfc spatial extrapolation right offset, nnpfc spatial extrapolation top offset and nnpfc spatial extrapolation bottom offset shall be greater than 0.

[0087] nnpfc component last flag equal to 1 indicates that the last dimension in the input tensor inputTensor to the NNPF and the output tensor outputTensor of the NNPF is used for a current channel, nnpfc component last flag equal to 0 indicates that the third dimension in the input tensor inputTensor to the NNPF and the output tensor outputTensor of the NNPF is used for a current channel.

[0088] NOTE 5 - The first dimension in the input tensor and in the output tensor is used for the batch index, which is a common practice in some neural network frameworks. While the equations in the semantics of this SEI message use the batch size corresponding to the batch index equal to 0, it is up to the post-processing implementation to determine the batch size used as the input to the neural network inference process.

[0089] NOTE 6 - For example, when nnpfc inp order ide is equal to 3 and nnpfc auxiliary inp ide is equal to 1, there are 7 channels in the input tensor, including four luma matrices, tw o chroma matrices, and one auxiliary input matrix. In this case, the process DeriveInputTensors( ) would derive each of these 7 channels of the input tensor one byone, and when a particular channel of these channels is processed, that channel is referred to as the current channel during the process.

[0090] nnpfc inp format idc indicates the method of converting a sample value of the input picture to an input value to the NNPF. The value of nnpfc inp format idc shall be in the range of 0 to 255, inclusive. Values of nnpfc inp fonnat idc in the range of 2 to 255, inclusive, are reserved for future specification by ITU-T | ISO / IEC and shall not be present in bitstreams conforming to this version of this Specification. Decoders conforming to this version of this Specification shall ignore NNPFC SEI messages with nnpfc inp format idc in the range of 2 to 255, inclusive.

[0091] When nnpfc inp format idc is equal to 0, the input values to the NNPF are real numbers and the functions InpY( ) and InpC( ) are specified as follows:InpY ( x ) = x -^ ( ( 1 « BitDepthy ) - 1 ) (80) InpC( x ) = x ÷ ( ( 1 « BitDepthc ) - 1 ) (81)

[0092] When nnpfc inp format idc is equal to 1, the input values to the NNPF are unsigned integer numbers and the functions InpY( ) and InpC( ) are specified as follows:shiftY = BitDepthy - inpTensorBitDepthyif( inpTensorBitDepthy >= BitDepthy)InpY( x ) = x « ( inpTensorBitDepthy - BitDepthy ) (82) elseInpY( x ) = Clip3(0, ( 1 « inpTensorBitDepthy ) - l, ( x + ( l « ( shiftY - 1 ) ) ) » shiftY ) shiftC = BitDepthc - inpTensorBitDepthcif( inpTensorBitDepthc >= BitDepthc )InpC( x ) = x « ( inpTensorBitDepthc - BitDepthc ) (83) elseInpC( x ) = Clip3(0, ( 1 « inpTensorBitDepthc ) - l, (x + ( l « ( shiftC - 1 ) ) ) » shiftC )

[0093] The variable inpTensorBitDepthY is derived from the syntax element nnpfc_inp_tensor_luma_bitdepth_minus8 as specified below. The variable inpTensorBitDepthc is derived from the syntax element nnpfc_inp_tensor_chroma_bitdepth_minus8 as specified below.

[0094] impfe auxiliary inp idc greater than 0 indicates that auxiliary input data is present in the input tensor of the NNPF. nnpfc auxiliary inp idc equal to 0 indicates that auxiliary input data is not present in the input tensor, nnpfc auxiliary inp idc equal to 1, 2 or 3 specifies that auxiliary input data is derived as specified in Equation 95.

[0095] When nnpfc auxiliary inp idc is equal to 2 or 3, nnpfc_spatial_extrapolation_prompt_present_flag shall be equal to 1.

[0096] The value of nnpfc auxiliary inp idc shall be in the range of 0 to 255, inclusive. Values of 2 to 255, inclusive, for nnpfc auxiliary inp idc are reserved for future use by ITU-T | ISO / IEC and shall not be present in bitstreams conforming to this version of this Specification. Decoders conforming to this version of this Specification shall ignore NNPFC SEI messages with nnpfc auxiliary inp idc in the range of 4 to 255, inclusive.

[0097] When nnpfc auxiliary inp idc is equal to 1 the auxiliary input data consists of strength ControlScaledVal[ i ].

[0098] When nnpfc auxiliary inp idc is equal to 2 die auxiliary’ input data consists of nnpfc_prompt character values.

[0099] When nnpfc auxiliary inp idc is equal to 3, the auxiliary input data consists of strengthControlScaledVal[ i ] and nnpfc_prompt character values.

[0100] nnpfc_inband_prompt_flag equal to 1 specifies that the text prompt string to be included in the input tensor is included in this NNPFC SEI message or in an NNPFA SEI message activating the NNPF defined by this NNPFC SEI message. nnpfc_inband_prompt_flag equal to 0 specifies that the text prompt string to be included in the input tensor is provided to the decoding system by external means.

[0101] nnpfc alignment zero bit c shall be equal to 0.

[0102] nnpfc_prompt specifies the text string prompt used as input for an NNPF, for example for generating the contents of the spatial extrapolation image area. When nnpfc_prompt is present, nnpfc_prompt shall not be a null string.

[0103] The variable nnpfcPrompt, specifying the text prompt string to be provided in the input tensor for a particular picture picA for which the NNPF is activated, is derived as follows:- If nnpfc_inband_prompt_flag is equal to 1 and nnpfa_prompt_update_flag is equal to 1, nnpfcPrompt is set equal to nnpfa_prompt.- Otherwise, if nnpfc_inband_prompt_flag is equal to 1 and nnpfa_prompt_update_flag is equal to 0, nnpfcPrompt is set equal to nnpfc_prompt.- Otherwise, if nnpfc_inband_prompt_flag is equal to 0 and a text prompt string is provided by external means, nnpfcPrompt is set equal to drat text prompt string.- Otherwise (nnpfc_inband_prompt_flag is equal to 0 and no text prompt string is provided by external means), nnpfcPrompt is set equal to a null string.

[0104] nnpfc inp order idc indicates the method of ordering the sample arrays of an input picture to form an input tensor to the NNPF.

[0105] The value of nnpfc inp order idc shall be in the range of 0 to 255, inclusive. Values of 4 to 255, inclusive, for nnpfc inp order idc are reserved for future use by ITU-T | ISO / IEC and shall not be present in bitstreams conforming to this version of this Specification. Decoders conforming to this version of this Specification shall ignore NNPFC SEI messages with nnpfc inp order idc in the range of 4 to 255, inclusive.

[0106] When ChromaFormatIdc is not equal to 1, nnpfc inp order idc shall not be equal to 3.

[0107] When ChromaFormatIdc is equal to 0, nnpfc inp order idc shall be equal to 0.

[0108] When ChromaUpsamplingFlag is equal to 1, nnpfc inp order idc shall not be equal to 0.

[0109] Table 21 contains an informative description of nnpfc inp order idc values.P2501263950IWO1; G25N27994W; 4824-72201Table 21 - Description of nnpfc inp order idc valuesnnpfc_inp_ Descriptionorder idc0 If nnpfc auxiliary inp idc is equal to 0, one luma matrix is present in the input tensor for each input picture, and the number of channels is 1. Otherwise, when nnpfc auxiliary inp idc is equal to 1 or 2, one luma matrix and one auxiliary7input matrix are present, and the number of channels is 2. Otherwise, when nnpfc auxiliary inp idc is equal to 3, one luma matrix and two auxiliary input matrices are present, and tire number of channels is 3.1 If nnpfc auxiliary inp idc is equal to 0, two chroma matrices are present in the input tensor, and the number of channels is 2. Otherwise, when nnpfc auxiliary inp idc is equal to 1 or 2, two chroma matrices and one auxiliary input matrix are present, and the number of channels is 3. Otherwise, when nnpfc auxiliary inp idc is equal to 3, two chroma matrices and two auxiliary input matrices are present, and the number of channels is 4.2 If nnpfc auxiliary inp idc is equal to 0, one luma and two chroma matrices are present in tire input tensor, and the number of channels is 3. Otherwise, w hen nnpfc auxiliary inp idc is equal to 1 or 2, one luma matrix, two chroma matrices and one auxiliaiy input matrix are present, and the number of channels is 4. Otherw ise, when nnpfc auxiliary inp idc is equal to 3, one luma matrix, two chroma matrices and two auxiliary input matrices are present, and the number of channels is 5.3 If nnpfc auxiliary inp idc is equal to 0, four luma matrices and two chroma matrices are present in the input tensor, and the number of channels is 6. Otherwise, when nnpfc auxiliary inp idc is equal to 1 or 2. four luma matrices, two chroma matrices, and one auxiliary input matrix are present in the input tensor, and the number of channels is 7. Otherwise, when nnpfc auxiliaiy inp idc is equal to 3, four luma matrices, two chroma matrices, and tw o auxiliary7input matrices are present in the input tensor, and the number of channels is 8. The luma channels are derived in an interleaved manner as illustrated in Figure 12. This nnpfc inp order idc can only be used when tire input chroma format is 4:2:0.4..255 Reserved

[0110] FIG. 1 illustrates an example of deriving the four luma channels (right) from the luma component (left) when nnpfc inp order idc is equal to 3.

[0111] nnpfc_inp_tensor_luma_bitdepth_minus8 plus 8 specifies the bit depth of luma sample values in the input integer tensor. The value of inpTensorBitDepthY is derived as follows:inpTensorBitDepthy = nnpfc_inp_tensor_luma_bitdepth_minus8 + 8 (84)

[0112] It is a requirement of bitstream conformance that the value of nnpfc_inp_tensor_luma_bitdepth_minus8 shall be in the range of 0 to 24, inclusive.

[0113] nnpfc_inp_tensor_chroma_bitdepth_minus8 plus 8 specifies the bit depth of chroma sample values in the input integer tensor. The value of inpTensorBitDepthC is derived as follows:inpTensorBitDepthc = nnpfc_inp_tensor_chroma_bitdepth_minus8 + 8 (85)

[0114] It is a requirement of bitstream conformance that the value of nnpfc_inp_tensor_chroma_bitdepth_minus8 shall be in the range of 0 to 24, inclusive.

[0115] nnpfc out format idc equal to 0 indicates that the sample values output by the NNPF are real numbers where the value range of 0 to 1, inclusive, maps linearly to the unsigned integer value range of 0 to ( 1 « bitDepth ) - 1, inclusive, for any desired bit depth bitDepth for subsequent post-processing or displaying.

[0116] nnpfc out format idc equal to 1 indicates that the luma sample values output by the NNPF are unsigned integer numbers in the range of 0 to ( 1 « outTensorBitDepthY ) - 1, inclusive, and the chroma sample values output by the NNPF are unsigned integer numbers in the range of 0 to ( 1 « outTensorBitDepthC ) - 1, inclusive.

[0117] The value of nnpfc out format idc shall be in the range of 0 to 255, inclusive. Values of 2 to 255, inclusive, for nnpfc out format idc are reserved for future specification by ITU-T | ISO / IEC and shall not be present in bitstreams conforming to this version of this Specification. Decoders conforming to this version of this Specification shall ignore NNPFC SEI messages with nnpfc out format idc in the range of 2 to 255, inclusive.

[0118] nnpfc out order idc indicates the output order of samples resulting from the NNPF.

[0119] The value of nnpfc out order idc shall be in the range of 0 to 255, inclusive. Values of 4 to 255, inclusive, for nnpfc out order idc are reserved for future use by ITU-T | ISO / IEC and shall not be present in bitstreams conforming to this version of this Specification. Decoders conforming to this version of this Specification shall ignore NNPFC SEI messages with nnpfc out order idc in the range of 4 to 255, inclusive.

[0120] When ChromaUpsamplingFlag is equal to 1, nnpfc out order idc shall not be equal to 0 or 3.

[0121] When ColourizationFlag is equal to 1, nnpfc out order idc shall not be equal to 0.

[0122] Table 22 contains an informative description of nnpfc out order idc values.Table 22 - Description of nnpfe out order ide valuesnnpfc_out_ Descriptionorder idc0 Only the luma matrix is present in the output tensor, thus the number of channels is 1.1 Only the chroma matrices are present in the output tensor, thus the number of channels is 2.2 The luma and chroma matrices are present in the output tensor, thus the number of channels is 3. 3 Four luma matrices and two chroma matrices are present in the output tensor, thus the number of channels is 6. This nnpfc out order idc can only be used when the output chroma format is 4:2:0.4..255 Reserved

[0123] nnpfc_out_tensor_luma_bitdepth_minus8 plus 8 specifies the bit depth of luma sample values in the output integer tensor. The value of nnpfc_out_tensor_luma_bitdepth_minus8 shall be in the range of 0 to 24, inclusive. The value of outTensorBitDepthY is derived as follows:outTensorBitDepthy = nnpfc_out_tensor_luma_bitdepth_minus8 + 8 (86)

[0124] nnpfc_out_tensor_chroma_bitdepth_minus8 plus 8 specifies the bit depth of chroma sample values in die output integer tensor. The value of nnpfc_out_tensor_chroma_bitdepth_minus8 shall be in the range of 0 to 24, inclusive. The value of outTensorBitDepthC is derived as follows:outTensorBitDepthc = nnpfc_out_tensor_chroma_bitdepth_minus8 + 8 (87)

[0125] When BitDepthUpsamplingFlag is equal to 1, the value of nnpfc out format idc shall be equal to 1 and at least one of the following conditions shall be true:- nnpfc_out_tensor_luma_bitdepth_minus8 is present and outTensorBitDepthY is greater than BitDepthY.- nnpfc_out_tensor_chroma_bitdepth_minus8 is present and outTensorBitDepthC is greater than BitDepthC.

[0126] When nnpfc_inp_tensor_luma_bitdepth_minus8, nnpfc_inp_tensor_chroma_bitdepth_minus8, nnpfc_out_tensor_luma_bitdepth_minus8, and nnpfc_out_tensor_chroma_bitdepth_minus8 are present and outTensorBitDepthy is greater than inpTensorBitDepthY, outTensorBitDepthc shall not be less than inpTensorBitDepthC. When nnpfc_inp_tensor_luma_bitdepth_minus8, nnpfc_inp_tensor_chroma_bitdepth_minus8, nnpfc_out_tensor_luma_bitdepth_minus8, and nnpfc_out_tensor_chroma_bitdepth_minus8 are present and outTensorBitDepthc is greater than inpTensorBitDepthC, outTensorBitDepthy shall not be less than inpTensorBitDepthY.

[0127] nnpfc_separate_colour_description_present_flag equal to 1 indicates that a distinct combination of colour primaries, transfer characteristics, matrix coefficients, and scaling and offset values applied in association with the matrix coefficients for the picture resulting from the NNPF is specified in the SEI message syntax structure. nnpfc_separate_colour_description_present_flag equal to 0 indicates that the combination of colour primaries, transfer characteristics, matrix coefficients, and scaling and offset values applied in association with the matrix coefficients for the picture resulting from the NNPF is the same as implied by the VUI parameters vui_colour_primaries, vui_transfer_characteristics, vui_matrix_coeffs, and vui_full_range_flag that are indicated or inferred for the CLVS.

[0128] nnpfc_colour_primaries has the same semantics as specified in clause 7.3 for the vui_colour_primaries syntax element, except as follows:- nnpfc_colour_primaries specifies the colour primaries of the picture resulting from applying the NNPF specified in the SEI message, rather than the colour primaries used for the CLVS.- When nnpfc_colour_primaries is not present in the NNPFC SEI message, the value of nnpfc_colour_primaries is inferred to be equal to vui_colour_primaries.

[0129] nnpfc transfer characteristics has the same semantics as specified in clause 7.3 for the vui_transfer_characteristics syntax element, except as follows:- nnpfc transfer characteristics specifies the transfer characteristics of the picture resulting from applying the NNPF specified in the SEI message, rather than the transfer characteristics used for the CLVS.- When nnpfc transfer characteristics is not present in the NNPFC SEI message, the value of nnpfc transfer characteristics is inferred to be equal to vui transfer characteristics.

[0130] nnpfc matrix coeffs describes the equations used in deriving luma and chroma signals from the green, blue, and red, or Y, Z, and X primaries. Its semantics apply to the pictures resulting from applying the NNPF specified in this SEI message and are as specified for MatrixCoefficients in Rec. ITU-T H.273 | ISO / IEC 23091-2 with BitDepthY and BitDepthC being equal to outTensorBitDepthY and outTensorBitDepthC, respectively’.

[0131] When nnpfc matrix coeffs is not present in the NNPFC SEI message, the value of nnpfc matrix coeffs is inferred to be equal to vui matrix coeffs.

[0132] nnpfc matrix coeffs shall not be equal to 0 unless both of the following conditions are true:- nnpfc_out_tensor_chroma_bitdepth_minus8 is equal to nnpfc_out_tensor_luma_bitdepth_minus8.- nnpfc out order idc is equal to 2, outSubHeightC is equal to 1, and outSubWidthC is equal to 1.

[0133] nnpfc matrix coeffs shall not be equal to 8 unless one of the following conditions is true:- nnpfc_out_tensor_chroma_bitdepth_minus8 is equal to nnpfc_out_tensor_luma_bitdepth_minus8.- mrpfc_out_tensor_chroma_bitdepth_minus8 is equal to nnpfc_out_tensor_luma_bitdepth_minus8 + 1, nnpfc out order idc is equal to 2, outSubHeightC is equal to 1, and outSubWidthC is equal to 1.

[0134] impfc full range flag indicates the scaling and offset values applied in association with the matrix coefficients as specified by nnpfc matrix coeffs. Its semantics are as specified for the VideoFullRangeFlag parameter in Rec. ITU-T H.273 | ISO / IEC 23091-2. When not present, the value of nnpfc full range flag is inferred to be equal to 0.

[0135] nnpfc_chroma_loc_info_present_flag equal to 1 indicates the presence of the nnpfc chroma sample loc type frame syntax element in the NNPFC SEI message. nnpfc_chroma_loc_info_present_flag equal to 0 indicates the absence of the impfc chroma sample loc type frame syntax element in the NNPFC SEI message. When nnpfc_chroma_loc_info_present_flag is not present, its value is inferred to be equal to 0. When ColourizationFlag is equal to 0 or mipfc out colour format idc is not equal to 1, the value of nnpfc_chroma_loc_info_present_flag shall be equal to 0.

[0136] nnpfc chroma sample loc type frame, when not equal to 6 and nnpfc out colour format ide is equal to 1, specifies the location of chroma samples of the output pictures, as shown in Figure 1. nnpfc chroma sample loc type frame equal to 6 and mipfc out colour format idc equal to 1 indicates that the location of the chroma samples is unknown or unspecified or specified by other means not specified in this Specification. The value of nnpfc chroma sample loc type frame shall be in the range of 0 to 6, inclusive.

[0137] nnpfe overlap indicates tire overlapping horizontal and vertical sample counts of adjacent input tensors of the NNPF. The value of nnpfe overlap shall be in the range of 0 to 16383, inclusive. When SpatialExtrapolationFlag is equal to 1, nnpfe overlap is inferred to be equal to 0.

[0138] impfc_constant_patch_size_flag equal to 1 indicates that the NNPF accepts exactly the patch size indicated by nnpfc_patch_width_minusl and impfc_patch_height_minusl as input. rmpfc_constant_patch_size_flag equal to 0 indicates that the NNPF accepts as input any patch size with width inpPatchWidth and height inpPatchHeight such thatthe width of an extended patch (i.e., a patch plus the overlapping area), which is equal to inpPatchWidth + 2 * nnpfc overlap, is a positive integer multiple of nnpfc_extended_patch_width_cd_delta_minusl + 1 + 2 * nnpfc overlap, and the height of the extended patch, which is equal to inpPatchHeight + 2 * nnpfc overlap, is a positive integer multiple of nnpfc_extended_patch_height_cd_delta_minus1 + 1 + 2 * nnpfc overlap. When SpatialExtrapolationFlag is equal to 1, nnpfc_constant_patch_size_flag is inferred to be equal to 1.

[0139] rmpfc_patch width minusl plus 1, when mipfc_constant_patch_size_flag equal to 1, indicates the horizontal sample counts of the patch size required for die input to the NNPF. The value of nnpfc_patch_width_minusl shall be in the range of 0 to Min( 32 766, CroppedWidth - 1 ). inclusive.

[0140] impfc_patch_height_minusl plus 1, when nnpfc_constant_patch_size_flag equal to 1, indicates the vertical sample counts of the patch size required for the input to the NNPF. The value of nnpfc_patch_height_minusl shall be in the range of 0 to Min( 32766, CroppedHeight - 1 ), inclusive.

[0141] nnpfc_extended_patch_width_cd_delta_minusl plus 1 plus 2 * nnpfc overlap, when impfc_constant_patch_size flag equal to 0, indicates a common divisor of all allowed values of the width of an extended patch required for the input to the NNPF. The value of nnpfc_extended_patch_width_cd_delta_minusl shall be in the range of 0 to Min( 32766, CroppedWidth - 1 ), inclusive.

[0142] impfc_extended_patch_height_cd_delta_minusl plus 1 plus 2 * nnpfc overlap, when nnpfc_constant_patch_size_flag equal to 0, indicates a common divisor of all allowed values of the height of an extended patch required for the input to the NNPF. The value of nnpfc_extended_patch_height_cd_delta_minusl shall be in the range of 0 to Min( 32766, CroppedHeight - 1 ). inclusive.

[0143] Let the variables inpPatchWidth and inpPatchHeight be the patch size width and the patch size height, respectively.

[0144] If mipfc_constant_patch_sizc_flag is equal to 0, the following applies:- The values of inpPatchWidth and inpPatchHeight are either provided by external means not specified in this Specification or set by the post-processor itself.- The value of inpPatchWidth + 2 * nnpfc overlap shall be a positive integer multiple of impfc_extended_patch_width_cd_delta_minusl + 1 + 2 * nnpfc overlap and inpPatchWidth shall be less than or equal to CroppedWidth. The value of inpPatchHeight + 2 * nnpfc overlap shall be a positive integer multiple of nnpfc_extended_patch_height_cd_delta_minusl + 1 + 2 * nnpfc overlap and inpPatchHeight shall be less than or equal to CroppedHeight.

[0145] Otherwise (nnpfc_constant_patch_size_flag is equal to 1), the value of inpPatchWidth is set equal to impfc_patch_width_minusl + 1 and the value of inpPatchHeight is set equal to nnpfc_patch_height_minusl + 1.

[0146] The variables outPatchWidth, outPatchHeight, horCScaling, verCScaling, outPatchCWidth, and outPatchCHeight are derived as follows:outPatchWidth = ( nnpfcOutputPicWidth * inpPatchWidth ) / CroppedWidth (88) outPatchHeight = ( nnpfcOutputPicHeight * inpPatchHeight ) / CroppedHeight (89) horCScaling = SubWidthC / outSubWidthC (90)verCScaling = SubHeightC / outSubHeightC (91) outPatchCWidth = outPatchWidth * horCScaling (92) outPatchCHeight = outPatchHeight * verCScaling (93)

[0147] It is a requirement of bitstream conformance that when SpatialExtrapolation is equal to 0 outPatchWidth * CroppedWidth shall be equal to nnpfcOutputPicWidth * inpPatchWidth and outPatchHeight * CroppedHeight shall be equal to nnpfcOutputPicHeight * inpPatchHeight.

[0148] It is a requirement of bitstream conformance that when SpatialExtrapolation is equal to 1 outPatchWidth * CroppedWidth shall be equal to nnpfcOutputPicWidth1 * inpPatchWidth and outPatchHeight * CroppedHeight shall be equal to nnpfcOutputPicHeight 1 * inpPatchHeight.

[0149] nnpfc_padding_type indicates the process of padding when referencing sample locations outside the boundaries of tire input picture as described in Table 23. The value of nnpfc_padding_type shall be in the range of 0 to 15, inclusive. Values of 5 to 15, inclusive, for nnpfc padding type are reserved for future use by ITU-T | ISO / IEC and shall not be present in bitstreams conforming to this version of this Specification. Decoders conforming to this version of this Specification shall ignore NNPFC SEI messages with nnpfc_padding_type in the range of 5 to 15, inclusive.Table 23 – Informative description of nnpfc padding type values nnpfc padding type Description0 Zero padding1 Replication padding2 Reflection padding3 Wrap-around padding4 Fixed padding5..15 reserved

[0150] nnpfc_luma_padding_val indicates the luma value to be used for padding when nnpfc_padding_type is equal to 4. The value of nnpfc_luma_padding_val shall be in the range of 0 to ( 1 « BitDepthY ) - 1, inclusive.

[0151] nnpfc_cb_padding_val indicates the Cb value to be used for padding when nnpfc_padding_type is equal to 4. The value of nnpfc_cb_padding_val shall be in the range of 0 to ( 1 « BitDepthC ) - 1, inclusive.

[0152] nnpfc_cr_padding_val indicates the Cr value to be used for padding when nnpfc padding type is equal to 4. The value of nnpfc_cr_padding_val shall be in the range of 0 to ( 1 « BitDepthC ) - 1, inclusive.

[0153] The function InpSampleVal( y, x, picHeight, picWidth, croppedPic, cldx ) with inputs being a vertical sample location y, a horizontal sample location x, a picture height picHeight, a picture width picWidth, sample array croppedPic, and component index cldx (equal to 0 for luma, 1 for Cb, and 2 for Cr) returns the value of sampleVal derived as follows:

[0154] NOTE 7 -For the inputs to the function InpSampleVal( ), the vertical location is listed before the horizontal location for compatibility with input tensor conventions of some inference engines.if( nnpfc_padding_type = = 0 )if( y < 0 | | x < 0 | | y >= picHeight | | x >= picWidth )sampleVal = 0elsesampleVal = croppedPic[ x ] [ y ] (94) else if( nnpfc_padding_type = = 1 )sampleVal = croppedPic[ Clip3( 0, picWidth - 1, x ) ][ Clip3( 0, picHeight - 1, y ) ] else if( nnpfc_padding_type = = 2 )sampleVal = croppedPic[ Reflect( picWidth - 1, x ) ][ Reflect( picHeight - 1, y ) ] else if( nnpfc_padding_type = = 3 )if( y >= 0 && y < picHeight )sampleVal = croppedPic[ Wrap( picWidth - 1, x ) ][ y ]else if( nnpfc_padding_type = = 4 )if( y < 0 | | x < 0 | | y >= picHeight | | x >= picWidth )sampleVal = ( cldx = = 0? nnpfc_luma_padding_val:( cldx = = 1? nnpfc_cb_padding_val: nnpfc_cr_padding_val ) )elsesampleVal = croppedPic[ x ][ y ]When nnpfc auxiliary inp idc is equal to 1, the variable strengthControlScaledVal is derived as follows:for( i = 0; i < numlnputPics; i++ )if( nnpfc inp format idc = = 1 ) (95) if( nnpfc_inp_order_idc = = 0 | | nnpfc_inp_order_idc = = 2 | |nnpfc inp order idc = = 3 )strengthControlScaledVal) i ] =Floor ( StrengthControlVal) i ] * ( ( 1 « inpTcnsorBit Depth, ) - 1 ) ) else if( nnpfc_inp_order_idc = = 1 )strengthControlScaledVal) i ] =Floor ( StrengthControlValf i ] * ( ( 1 « inpTensorBitDepthc ) - 1 ) ) elsestrengthControlScaledVal) i ] = StrengthControlVal) i ]

[0155] A patch is a rectangular array of samples from a component (e.g., a luma or chroma component) of a picture.

[0156] The process DeriveInputTensors( ), for deriving the input tensor inputTensor for a given vertical sample coordinate cTop and a horizontal sample coordinate cLeft specifying the top-left sample location for the patch of samples included in the input tensor, is specified as follows:for( i = 0; i < numlnputPics; i++ ) {if( nnpfc inp order idc = = 0 )for( yP = -nnpfc overlap; yP < inpPatchHeight + nnpfc_overlap; yP++)fbr( xP = -nnpfc overlap; xP < inpPatchWidth + nnpfc overlap; xP++ ) {inpVal = InpY( InpSampleVal( cTop +yP, cLeft + xP, CroppedHeight,CroppedWidth, CroppedYPic[ i ], 0 ) )yPovlp = yP + nnpfc overlapxPovlp = xP + nnpfc_overlapif( !nnpfc component last flag )inputTensor

[0000] [ i ]

[0000] [ yPovlp ][ xPovlp ] = inpValelseinputTensor

[0000] [ i ][ yPovlp ][ xPovlp ]

[0000] = inpValif( nnpfc_auxiliary_inp_idc = = 1 | | nnpfc auxiliary inp idc = = 3)if( !nnpfc component last flag )inputTensor

[0000] [ i ]

[0001] [ yPovlp ][ xPovlp ] = strengthControlScaledVal[ i ] elseinputTensor

[0000] [ i ][ yPovlp ][ xPovlp ]

[0001] = strengthControlScaledVal[ i ] if( nnpfc auxiliary inp idc = = 2 | | nnpfc auxiliary inp idc = = 3) { promptCharVal = utf8ToUInt( nnpfcPrompt )if( !nnpfc component last flag )inputTensor

[0000] [ i ][ nnpfc auxiliary inp idc - 1 ][ yPovlp ][ xPovlp ] = promptCharVal elseinputTensor

[0000] [ i ] [ yPovlp ] [ xPovlp ] [ nnpfc auxiliary inp idc - 1 ] = promptCharVal }}else if( nnpfc_inp_order_idc = = 1 )(96)for( yP = -nnpfc overlap; yP < inpPatchHeight + nnpfc overlap; yP++)for( xP = -nnpfc overlap; xP < inpPatchWidth + nnpfc overlap; xP++ ) {inpCbVal = InpC( InpSampleVal( cTop + yP, cLeft + xP, CroppedHeight / SubHeightC,CroppedWidth / SubWidthC, CroppedCbPic[ i ], 1 ) ) inpCrVal = InpC( InpSampleVal( cTop + yP, cLeft + xP, CroppedHeight / SubHeightC,CroppedWidth / SubWidthC, CroppedCrPic[ i ], 2 ) ) yPovlp = yP + nnpfc overlapxPovlp = xP + nnpfc_overlapif( !nnpfc component last flag ) {inputTensor

[0000] [ i ]

[0000] [ yPovlp ][ xPovlp ] = inpCbValinputTensor

[0000] [ i ]

[0001] [ yPovlp ][ xPovlp ] = inpCrVal} else {inputT ensor

[0000] [ i ] [ yPovlp ] [ xPovlp ]

[0000] = inpCbV alinputT ensor

[0000] [ i ] [ yPovlp ] [ xPovlp ]

[0001] = inpCrV al}if( nnpfc auxiliary inp idc = = 1 | | nnpfc auxiliary inp idc = = 3)if( !nnpfc component last flag )inputTensor

[0000] [ i ]

[0002] [ yPovlp ][ xPovlp ] = strengthControlScaledVal[ i ] elseinputTensor

[0000] [ i ][ yPovlp ][ xPovlp ]

[0002] = strengthControlScaledVal[ i ] if( nnpfc_auxiliary_inp_idc = = 2 | | nnpfc auxiliary inp idc = = 3) { promptCharVal = utf8ToUInt( nnpfcPrompt )if( !nnpfc component last flag )inputTensor

[0000] [ i ][ nnpfc auxiliary inp idc ][ yPovlp ][ xPovlp ] = promptCharVal elseinputTensor

[0000] [ i ] [ yPovlp ] [ xPovlp ] [ nnpfc auxiliary inp idc ] = promptCharVal }}else if( nnpfc_inp_order_idc = = 2 )for( yP = -nnpfc o verlap; yP < inpPatchHeight + nnpfc overlap; yP++)for( xP = -nnpfc overlap; xP < inpPatchWidth + nnpfc overlap; xP++ ) {yY = cTop +yPxY = cLeft + xPyC = y Y / SubHeightCxC = xY / SubWidthCinpYVal = InpY( InpSampleVal( yY, xY, CroppedHeight,CroppedWidth, CroppedYPic[ i ], 0 ) )inpCbVal = InpC( InpSampleVal( yC, xC, CroppedHeight / SubHeightC,CroppedWidth / SubWidthC, CroppedCbPic[ i ], 1 ) )inpCrVal = InpC( InpSampleVal( yC, xC, CroppedHeight / SubHeightC,CroppedWidth / SubWidthC, CroppedCrPicf i ], 2 ) )yPovlp = yP + nnpfc overlapxPovlp = xP + nnpfc_overlapif( !nnpfc component last flag ) {inputTensorf 0 ] [ i ]

[0000] [ yPovlp ] [ xPovlp ] = inpYValinputTensor

[0000] [ i ]

[0001] [ yPovlp ][ xPovlp ] = inpCbValinputTensor

[0000] [ i ]

[0002] [ yPovlp ][ xPovlp ] = inpCrVal} else {inputTensor

[0000] [ i ] [ yPovlp ] [ xPovlp ]

[0000] = inpYValinputTensor

[0000] [ i ][ yPovlp ][ xPovlp ]

[0001] = inpCbValinputTensor

[0000] [ i ][ yPovlp ][ xPovlp ]

[0002] = inpCrVal}if( nnpfc auxiliary inp idc = = 1 | | nnpfc auxiliary inp idc = = 3)if( !nnpfc component last flag )inputTensor

[0000] [ i ]

[0003] [ yPovlp ][ xPovlp ] = strengthControlScaledVal[ i ] elseinputTensor

[0000] [ i ][ yPovlp ][ xPovlp ]

[0003] = strengthControlScaledVal[ i ] if( nnpfc auxiliary inp idc = = 2 | | nnpfc auxiliary inp idc = = 3) { promptCharVal = utf8ToUInt( nnpfcPrompt )if( !nnpfc component last flag )inputTensor

[0000] [ i ][ nnpfc auxiliary inp idc + 1 ][ yPovlp ][ xPovlp ] = promptCharVal elseinputTensor

[0000] [ i ][ yPovlp ][ xPovlp ][ nnpfc auxiliary inp idc + 1 ] = promptCharVal }}else if( nnpfc_inp_order_idc = = 3 )for( yP = -nnpfc ovcrlap; yP < inpPatchHcight + nnpfc ovcrlap; yP++)for( xP = -nnpfc overlap; xP < inpPatchWidth + nnpfc overlap; xP++ ) {yTL = cTop + yP * 2xTL = cLeft+ xP * 2yBR = yTL + 1xBR = xTL + 1yC = cTop / 2 + yPxC = cLeft / 2 + xPinpTLVal = InpY( InpSampleVal( yTL, xTL, CroppedHeight,CroppedWidth, CroppedYPic[ i ], 0 ) )inpTRVal = InpY( InpSampleVal( yTL, xBR, CroppedHeight,CroppedWidth, Cropped YPic[ i ], 0 ) )inpBLVal = InpY( InpSampleVal( yBR, xTL, CroppedHeight,CroppedWidth, CroppedYPic[ i ], 0 ) )inpBRVal = InpY( InpSampleVal( yBR, xBR, CroppedHeight,CroppedWidth, CroppedYPic[ i ], 0 ) )inpCbVal = InpC( InpSampleVal( yC, xC, CroppedHeight / 2,CroppedWidth / 2, CroppedCbPic[ i ], 1 ) )inpCrVal = InpC( InpSampleVal( yC, xC, CroppedHeight / 2,CroppedWidth / 2, CroppedCrPic[ i ], 2 ) )yPovlp = yP + nnpfc overlapxPovlp = xP + nnpfc_overlapif(!nnpfc_component_last_flag ) {inputTensor

[0000] [ i ]

[0000] [ yPovlp ][ xPovlp ] = inpTLValinputTensor

[0000] [ i ]

[0001] [ yPovlp ][ xPovlp ] = inpTRValinputTensor

[0000] [ i ]

[0002] [ yPovlp ][ xPovlp ] = inpBLValinputTensor

[0000] [ i ]

[0003] [ yPovlp ][ xPovlp ] = inpBRValinputTensor

[0000] [ i ]

[0004] [ yPovlp ][ xPovlp ] = inpCbValinputTensor

[0000] [ i ]

[0005] [ yPovlp ][ xPovlp ] = inpCrVal} else {inputTensor

[0000] [ i ][ yPovlp ][ xPovlp ]

[0000] = inpTLValinputTensor

[0000] [ i ] [ yPovlp ] [ xPovlp ]

[0001] = inpTRValinputTensor

[0000] [ i ] [ yPovlp ] [ xPovlp ]

[0002] = inpBLValinputTensor

[0000] [ i ] [ yPovlp ] [ xPovlp ]

[0003] = inpBRValinputTensor

[0000] [ i ] [ yPovlp ] [ xPovlp ]

[0004] = inpCbValinputTensor

[0000] [ i ][ yPovlp ][ xPovlp ]

[0005] = inpCrVal}if( nnpfc auxiliary inp idc = = 1 | | nnpfc auxiliary inp idc = = 3)if(!nnpfc_component_last_flag )inputTensor

[0000] [ i ]

[0006] [ yPovlp ][ xPovlp ] = strengthControlScaledVal[ i ] elseinputTensor

[0000] [ i ][ yPovlp ][ xPovlp ]

[0006] = strengthControlScaledVal[ i ] if( nnpfc auxiliary inp idc = = 2 | | nnpfc auxiliary inp idc = = 3) { promptCharVal = utf8ToUInt( nnpfcPrompt )if(!nnpfc_component_last_flag )inputTensor

[0000] [ i ][ nnpfc auxiliary inp idc + 4 ][ yPovlp ][ xPovlp ] = promptCharVal elseinputTensor

[0000] [ i ][ yPovlp ][ xPovlp ][ nnpfc auxiliary inp idc + 4 ] = promptCharValutf8ToUInt( x ) {result = 0len = 0 / * Check end of text prompt string * / if( x = = null )return 0 / * Determine the number of bytes in the UTF-8 character * / if( (x

[0000] & 0x80 ) = = 0 )len =1 / * I -byte character * / else if( (x

[0000] & OxEO ) = = OxCO )len = 2 / * 2-byte character * / else if( (x

[0000] & OxFO ) = = OxEO )len = 3 / * 3 -byte character * / else if( (x

[0000] & 0xF8 ) = = OxFO )len = 4 / * 4-byte character * / elselen = 0 / * Invalid UTF-8 character; this case shall not occur in bitstreams. * / for( i = 0; i < len; i++ ) / * Construct an integer from the bytes * / result = ( result « 8 ) | x[ i ]x = x + len / * Modifies the input variable, which is a syntax element * / return result}

[0157] The process StoreOutputTensors( ), for deriving sample values in the sample arrays FilteredYPic, FilteredCbPic, and FilteredCrPic, for the NNPF-generated pictures, from the output tensor outputTensor for a given vertical sample coordinate cTop and a horizontal sample coordinate cLeft specifying the top-left sample location for the patch of samples included in the input tensor, is specified as follows:for( i = 0; i < numPicsInOutputTensor; i++ ) {if( nnpfc_out_order_idc = = 0 )for( yP = 0; vP < outPatchHeight; yP++ )for( xP = 0; xP < outPatchWidth; xP++ ) {yY = cTop * outPatchHeight / inpPatchHeight + yPxY = cLeft * outPatchWidth / inpPatchWidth + xPif( yY < nnpfcOutputPicHeight && xY < rmpfcOutputPicWidth )if(!nnpfc_component_last_flag )FilteredYPic[ i ][ xY ][ yY ] = outputTensor

[0000] [ i ]

[0000] [ yP ][ xP ]elseFilteredYPic[ i ] [ xY ] [ yY ] = outputTensor

[0000] [ i ] [ yP ] [ xP ]

[0000] }else if( nnpfc out order idc = = 1 )(97)fbr( yP = 0; yP < outPatchCHeight; yP++ )fbr( xP = 0; xP < outPatchCWidth; xP++ ) {xSrc = cLeft * horCScaling + xPySrc = cTop * verCScaling + yPif( ySrc < nnpfcOutputPicHeight / outSubHeightC &&xSrc < nnpfcOutputPicWidth / outSubWidthC ) if(!nnpfc_component_last_flag ) {FilteredCbPic[ i ][ xSrc ][ ySrc ] = outputTensor

[0000] [ i ]

[0000] [ yP ][ xP ] FilteredCrPic[ i ][ xSrc ][ ySrc ] = outputTensor

[0000] [ i ]

[0001] [ yP ][ xP ] } else {FilteredCbPic[ i ][ xSrc ][ ySrc ] = outputTensor

[0000] [ i ][ yP ][ xP ]

[0000] FilteredCrPic[ i ] [ xSrc ] [ ySrc ] = outputTensor

[0000] [ i ] [ yP ] [ xP ]

[0001] }}else if( nnpfc out order idc = = 2 )for( yP = 0; yP < outPatchHeight; yP++ )for( xP = 0; xP < outPatchWidth; xP++ ) {yY = cTop * outPatchHeight / inpPatchHeight + yPxY = cLeft * outPatchWidth / inpPatchWidth + xPyC = y Y / outSubHeightCxC = xY / outSubWidthCyPc = ( yP / outSubHeightC ) * outSubHeightCxPc = ( xP / outSubWidthC ) * outSubWidthCif( yY < nnpfcOutputPicHeight && xY < nnpfcOutputPicWidth ) if(!nnpfc_component_last_flag ) {FilteredYPic[ i ] [ xY ] [ y Y ] = outputTensor

[0000] [ i ]

[0000] [ yP ] [ xP ] FilteredCbPic[ i ][ xC ][ yC ] = outputTensor

[0000] [ i ]

[0001] [ yPc ][ xPc ] FilteredCrPic[ i ][ xC ][ yC ] = outputTensor

[0000] [ i ]

[0002] [ yPc ][ xPc ] } else {FilteredYPic[ i ] [ xY ] [ yY ] = outputTensor

[0000] [ i ] [ yP ] [ xP ]

[0000] FilteredCbPic[ i ][xC ][yC ] = outputTensor

[0000] [ i ][yPc ][xPc ]

[0001] FilteredCrPic[ i ][ xC ][ yC ] = outputTensor

[0000] [ i ][ yPc ][ xPc ]

[0002] }}else if( nnpfc out order idc = = 3 )fbr( yP = 0; yP < outPatchHeight; yP++ )fbr( xP = 0; xP < outPatchWidth; xP++ ) {ySrc = cTop / 2 * outPatchHeight / inpPatchHeight + yPxSrc = cLeft / 2 * outPatchWidth / inpPatchWidth + xPif( ySrc < nnpfcOutputPicHcight / 2 &&xSrc < rmpfcOutputPicWidth / 2 )if(!niipfc_component_last_flag ) {FilteredYPic[ i ] [ xSrc * 2 ] [ y Src * 2 ] = outputTensor

[0000] [ i ]

[0000] [ yP ] [ xP ] FilteredYPic[ i ][ xSrc * 2 + 1 ][ ySrc * 2 ] = outputTensor

[0000] [ i ]

[0001] [ yP ][ xP ] FilteredYPic[ i ][ xSrc * 2 ][ ySrc * 2 + 1 ] = outputTensor

[0000] [ i ]

[0002] [ yP ][ xP ] FilteredYPic[ i ][ xSrc * 2 + 1][ ySrc * 2 + 1 ] = outputTensor

[0000] [ i ]

[0003] [ yP ][ xP ] FilteredCbPic[ i ][ xSrc ][ ySrc ] = outputTensor

[0000] [ i ]

[0004] [ yP ][ xP ] FilteredCrPic[ i ][ xSrc ][ ySrc ] = outputTensor

[0000] [ i ]

[0005] [ yP ][ xP ] } else {FilteredYPic[ i ][ xSrc * 2 ][ySrc * 2 ] = outputTensor

[0000] [ i ][yP ][xP ]

[0000] FilteredYPic[ i ][ xSrc * 2 + 1 ][ ySrc * 2 ] = outputTensor

[0000] [ i ][ yP ][ xP ]

[0001] FilteredYPic[ i ][ xSrc * 2 ][ySrc * 2 + 1 ] = outputTensor

[0000] [ i ][ yP ][ xP ]

[0002] FilteredYPic[ i ][ xSrc * 2 + 1][ ySrc * 2 + 1 ] = outputTensor

[0000] [ i ][ yP ][ xP ]

[0003] FilteredCbPic[ i ][ xSrc ][ ySrc ] = outputTensor

[0000] [ i ][ yP ][ xP ]

[0004] FilteredCrPic[ i ] [ xSrc ] [ ySrc ] = outputTensor

[0000] [ i ] [ yP ] [ xP ]

[0005] [00158J An NNPF PostProcessingFilter( ) is the target NNPF as derived in the semantics of the NNPFA SEI message. The following example process may be used, with the NNPF PostProcessingFilter( ), to generate, in a patchwise manner, the filtered and / or interpolated picture(s), which contain Y, Cb, and Cr sample arrays FilteredYPic, FilteredCbPic, and FilteredCrPic, respectively, as indicated by nnpfc out order idc:if( impfc inp order idc = = 0 | | nnpfc inp order idc = = 2 )for( cTop = 0; cTop < CroppedHeight; cTop += inpPatchHeight)for( cLeft = 0; cLeft < CroppedWidth; cLeft += inpPatchWidth ) {if( SpatialExtrapolationFlag ) {if( cTop = = 0 )outPatchHeight += (outSubHeightC * nnpfc spatial extrapolation top offset)if( cLeft = = 0 )outPatchWidth += (outSubWidthC * nnpfc spatial extrapolation left offset) if( cTop = = (CroppedHeight-inpPatchHeight) )outPatchHeight += (outSubHeightC * nnpfc spatial extrapolation bottom offset) if( cLeft = = (CroppedWidth-inpPatchWidth) )outPatchWidth += (outSubWidthC * rmpfc spatial extrapolation right offset) }inputTensor = DeriveInputTensors( )outputTensor = PostProcessingFilter( inputTensor )StoreOutpufTensors( outputTensor )}else if( nnpfc_inp_order_idc = = 1 )for( cTop = 0; cTop < CroppedHeight / SubHeightC; cTop += inpPatchHeight )for( cLeft = 0; cLeft < CroppedWidth / SubWidthC; cLeft += inpPatchWidth ) j (98) if( SpatialExtrapolationFlag ) {if( cTop = = 0 )outPatchHeight += (outSubHeightC * nnpfc spatial extrapolation top offset) if( cLeft = = 0 )outPatchWidth += (outSubWidthC * nnpfc spatial extrapolation left offset) if( cTop = = ((CroppedHeight / SubHeightQ-inpPatchHeight) )outPatchHeight += (outSubHeightC * nnpfc spatial extrapolation bottom offset) if( cLeft = = ((CroppedWidth / SubWidthC)-inpPatchWidth) )outPatchWidth += (outSubWidthC * nnpfc spatial extrapolation right offset) }inputTensor = DeriveInputTensors( )outputTensor = PostProcessingFilter( inputTensor )StoreOutputTensors( outputTensor )}else if( nnpfc_inp_order_idc = = 3 )for( cTop = 0; cTop < CroppedHeight; cTop += inpPatchHeight * 2 )for( cLeft = 0; cLeft < CroppedWidth; cLeft += inpPatchWidth * 2 ) {if( SpatialExtrapolationFlag ) {if( cTop = = 0 )outPatchHeight += (outSubHeightC * nnpfc spatial extrapolation top offset) if( cLeft = = 0 )outPatchWidth += (outSubWidthC * nnpfc spatial extrapolation left offset)if( cTop = = (CroppedHeight-2*inpPatchHeight) )outPatchHeight += (outSubHeightC * nnpfc spatial extrapolation bottom offset) if( cLeft = = (CroppedWidth-2*inpPatchWidth) )outPatchWidth += (outSubWidthC * nnpfc spatial extrapolation right offset)}inputTensor = DeriveInputTensors( )outputTensor = PostProcessingFilter( inputTensor )StoreOutputTensors( outputTensor )}

[0159] NOTE 4 - For some NNPF purposes (e.g. spatial extrapolation, temporal extrapolation, colourization) the independent processing of patches may result in inconsitency of filtered results across patches, especially at patch boundaries. Thus patch sizes should be set based on the NNPF’s ability to achieve consistency across patches.

[0160] It is a requirement of bitstream conformance that outPatchWidth is > 0. It is a requirement of bitstream conformance that outPatchHeight is > 0.

[0161] An NNPF-generated picture with index i contains sample arrays FilteredYPic[ i ], FilteredCbPic[ i ], and FilteredCrPic[ i ], when present, that are derived by Equation 98. An NNPF-generated picture does not include the overlap regions.

[0162] The NNPF process consists of the process defined by Equation 98 followed by outputting NNPF-generated pictures in their increasing index order, where all NNPF-generated pictures that were interpolated by the NNPF are output and those NNPF-generated pictures that correspond to any input pictures to the NNPF are output as specified in the semantics of the NNPFA SEI message.

[0163] nnpfc_complexity_info_present_flag equal to 1 specifies that one or more syntax elements that indicate the complexity of the NNPF associated with the nnpfc id are present. nnpfc_complexity_info_present_flag equal to 0 specifies that no syntax elements that indicates the complexity of the NNPF associated with the nnpfc id are present.

[0164] nnpfc_parameter_type_idc equal to 0 indicates that the neural network uses only integer parameters. nnpfc_parameter_type_idc equal to 1 indicates that the neural network may use floating point or integer parameters. nnpfc_parameter_type_idc equal to 2 indicates that the neural network uses only binary parameters. nnpfc_parameter_type_idc equal to 3 is reserved for future use by ITU-T 11 SO / I EC and shall not be present in bitstreams conforming to this version of this Specification. Decoders conforming to this version of this Specification shall ignore NNPFC SEI messages with nnpfc_parameter_type_idc equal to 3.

[0165] nnpfc_log2_parameter_bit_length_minus3 equal to 0, 1, 2, and 3 indicates that the neural network does not use parameters of bit length greater than 8, 16, 32, and 64, respectively. When nnpfc_parameter_type_idc is present and nnpfc_log2_parameter_bit_length_minus3 is not present, the neural network does not use parameters of bit length greater than 1.

[0166] nnpfc_num_parameters_idc indicates the maximum number of neural network parameters for the NNPF in units of a power of 2048. nnpfc_num_parameters_idc equal to 0 indicates that the maximum number of neuralnetwork parameters is unknown. The value nnpfc_num_parameters_idc shall be in the range of 0 to 52, inclusive. Values of nnpfc_num_parameters_idc greater than 52 are reserved for future use by ITU-T | ISO / IEC and shall not be present in bitstreams conforming to this version of this Specification. Decoders conforming to this version of this Specification shall ignore NNPFC SEI messages with nnpfc_num_parameters_idc greater than 52.

[0167] If the value of nnpfc_num_parameters_idc is greater than zero, the variable maxNumParameters is derived as follows:maxNumParameters = ( 2048 « rmpfc_num_parameters_idc ) - 1 (99)

[0168] It is a requirement of bitstream conformance that the number of neural network parameters of the NNPF shall be less than or equal to maxNumParameters.

[0169] nnpfc num kmac operations idc greater than 0 indicates that the maximum number of multiply-accumulate operations per sample of the NNPF is less than or equal to nnpfc num kmac operations idc * 1 000. nnpfc num kmac operations idc equal to 0 indicates that the maximum number of multiply-accumulate operations of the network is unknown. The value of nnpfc num kmac operations idc shall be in the range of 0 to 232- 2, inclusive.

[0170] nnpfc total kilobyte size greater than 0 indicates a total size in kilobytes required to store the uncompressed parameters for the neural network. The total size in bits is a number equal to or greater than the sum of bits used to store each parameter, nnpfc total kilobyte size is the total size in bits divided by 8000, rounded up. nnpfc total kilobyte size equal to 0 indicates that the total size required to store the parameters for the neural network is unknown. The value of nnpfc total kilobyte size shall be in the range of 0 to 232- 2, inclusive.

[0171] nnpfc num metadata extension bits equal to 0 specifies that nnpfc_application_purpose_tag_uri_present_flag, nnpfc metadata alignment zero bit, nnpfc_application_purpose_tag_uri, nnpfc scan type idc, nnpfc for human viewing idc, nnpfc for machine analysis idc and nnpfc reserved metadata extension are not present. When nnpfc num metadata extension bits is greater than 0, let the variable numSpecifiedMetadataExtensionBits be the number of bits representing all syntax elements between nnpfc num metadata extension bits and nnpfc reserved metadata extension. nnpfc num metadata extension bits greater than 0 specifies the sum of numSpecifiedMetadataExtensionBits and the length, in bits, of nnpfc reserved metadata extension.

[0172] The value of nnpfc num metadata extension bits shall be in the range of numSpecifiedMetadataExtensionBits to 2048, inclusive. Values in the range of numSpecifiedMetadataExtensionBits + 1 to 2048, inclusive, for nnpfc num metadata extension bits are reserved for future use by ITU-T | ISO / IEC and shall not be present in bitstreams conforming to this version of this Specification. Decoders conforming to this version of this Specification shall allow any value of nnpfc num metadata extension bits in the range of 0 to numSpecifiedMetadataExtensionBits + 1 to 2048, inclusive.

[0173] nnpfc_application_purpose_tag_uri_present_flag equal to 1 indicates that the nnpfc_application_purpose_tag_uri syntax element is present in this NNPFC SEI message. nnpfc_application_purpose_tag_uri_present_flag equal to 0 indicates that the nnpfc_application_purpose_tag_urisyntax element is not present in this NNPFC SEI message. When not present nnpfc_application_purpose_tag_uri_present_flag is inferred to be equal to 0.

[0174] nnpfc metadata alignment zero bit shall be equal to 0.

[0175] nnpfc_application_purpose_tag_uri specifies a tag URI with syntax and semantics as specified in IETF RFC 4151 identifying the application determined purpose of the NNPF, when nnpfc_purpose is equal to 0.

[0176] NOTE 5 - nnpfc_application_purpose_tag_uri enables uniquely identifying the application determined purpose of NNPF without needing a central registration authority.

[0177] nnpfc scan type idc equal to 0 indicates that the preferred display method for the pictures output by the NNPF is unknown or unspecified or specified by external means, nnpfc scan type idc equal to 1 indicates that the pictures output by the NNPF are suitable for display using overscan, nnpfc scan type idc equal to 2 indicates that the pictures output by the NNPF contain visually important information in the entire region out to the edges of the picture, such that the pictures output by the NNPF should not be displayed using overscan. Instead, they should be displayed using either an exact match betw een the display’ area and the edges, or using underscan. As used in this paragraph, the term "overscan" refers to display processes in which some parts near the borders of the pictures are not visible in the display area. The term "underscan" describes display processes in which tire entire pictures are visible in the display¬ area, but they do not cover the entire display area. For display processes that neither use overscan nor underscan, the display area exactly matches the area of the pictures. The value of nnpfc scan type idc shall not be equal to 2. When not present, the value of nnpfc scan type idc is inferred to be equal to 0.

[0178] nnpfc for human viewing idc equal to 3 specifies that the intended optimal usage of the video resulting from the NNPF process includes human viewing, nnpfc for human viewing idc equal to 2 specifies that the video resulting from the NNPF process is suitable but not specifically optimized for human viewing, nnpfc for human viewing idc equal to 1 specifies that the video resulting by the NNPF process is unsuitable for human viewing, nnpfc for human viewing idc equal to 0 specifies that it is unknown if the video resulting by the NNPF process is suitable for human viewing. When not present, nnpfc for human viewing idc is inferred to be equal to 0.

[0179] nnpfc for machine analysis idc equal to 3 specifies that the intended optimal usage of the video resulting from the NNPF process includes machine analysis, nnpfc for machine analysis idc equal to 2 specifies that the video resulting from the NNPF process is suitable but not specifically optimized for machine analysis, nnpfc for machine analysis idc equal to 1 specifies that the video resulting from the NNPF process is unsuitable for machine analysis, nnpfc for machine analysis idc equal to 0 specifies that it is unknown if the video resulting from the NNPF process is suitable for machine analysis. When not present, nnpfc for machine analysis idc is inferred to be equal to 0.

[0180] It is a requirement of bitstream conformance that the value of nnpfc for human viewing idc and nnpfc for machine analysis idc shall not be both equal to 1.

[0181] NOTE 6 - When a decoding system displays the video for human viewing, any NNPF that has nnpfc for human viewing idc equal to 1 is suggested to be omitted. When a decoding system performs machine analysis, any NNPF that has nnpfc for machine analysis idc equal to 1 is suggested to be omitted.

[0182] nnpfc reserved metadata extension shall not be present in bitstreams conforming to this version of this Specification. However, decoders conforming to this version of this Specification shall ignore the presence and value of nnpfc reserved metadata extension. When present, the length, in bits, of nnpfc reserved metadata extension is equal to nnpfc num metadata extension bits - numSpecifiedMetadataExtensionBits.

[0183] nnpfc alignment zero bit b shall be equal to 0.

[0184] nnpfc_payload_byte[ i ] contains the i-th byte of a bitstream conforming to ISO / IEC 15938-17. The byte sequence nnpfc_payload_byte[ i ] for all present values of i shall be a complete bitstream that conforms to ISO / IEC 15938-17.

[0185] The neural-network post-filter characteristics (NNPFC) SEI message specifies a neural network that may be used as a post-processing filter. The use of specified neural-network post-processing filters (NNPFs) for specific pictures is indicated with neural-network post-filter activation (NNPF A) SEI messages.

[0186] Use of this SEI message requires the definition of the following variables:Input picture width and height in units of luma samples, denoted herein by CroppedWidth and CroppedHeight, respectively.- Luma sample array CroppedYPic[ idx ] and chroma sample arrays CroppedCbPicf idx ] and CroppedCrPicf idx ], when present, of the input pictures with index idx in the range of 0 to numlnputPics - 1, inclusive, that are used as input for the NNPF.- Bit depth BitDepthY for the luma sample array of the input pictures.- Bit depth BitDepthC for the chroma sample arrays, if any, of the input pictures.- A chroma format indicator, denoted herein by ChromaFormatldc, as described in clause 7.3.- When nnpfc auxiliary inp idc is equal to 1, a filtering strength control value array StrengthControlValf idx ] that shall contain real numbers in the range of 0 to 1, inclusive, of the input pictures with index idx in the range of 0 to numlnputPics - 1, inclusive.

[0187] Input picture with index 0 corresponds to the picture for which the NNPF defined by this NNPFC SEI message is activated by an NNPFA SEI message. Input picture with index i in the range of 1 to numlnputPics - 1, inclusive, precedes the input picture with index i - 1 in output order.

[0188] The variables SubWidthC and SubHeightC are derived from ChromaFormatldc as specified by Table 2.

[0189] NOTE 1 - More than one NNPFC SEI message can be present for die same picture. When more than one NNPFC SEI message with different values of nnpfc id is present or activated for the same picture, they can have the same value or different values of nnpfc_purpose and the same value or different values of nnpfc mode idc.

[0190] nnpfc_purpose indicates the purpose of the NNPF as specified in Table 20, where ( nnpfc_purpose & bitMask ) not equal to 0 indicates that the NNPF has the purpose associated with the bitMask value in Table 20. When nnpfc_purpose is greater than 0 and ( nnpfc_purpose & bitMask ) is equal to 0, the purpose associated with the bitMaskvalue is not applicable to the NNPF. When nnpfc_purpose is equal to 0, the NNPF may be used as determined by the application and as specified by the nnpfc_application_purpose_tag_uri.

[0191] All NNPFC SEI messages with a particular value of nnpfc id within a CLVS shall have the same value of nnpfc_purpose.

[0192] The value of nnpfc_purpose shall be in the range of 0 to 127, inclusive, in bitstreams conforming to this version of this Specification. Values of 128 to 65 535, inclusive, for nnpfc_purpose are reserved for future use by ITU-T | ISO / IEC and shall not be present in bitstreams conforming to this version of this Specification. Decoders conforming to this version of this Specification shall ignore NNPFC SEI messages with nnpfc_purpose in the range of 128 to 65 535, inclusive.Table 20 - Definition of nnpfc purposebitMask Interpretation0x01 General visual quality improvementChroma upsampling (from the 4:2:0 chroma format to the 4:2:2 or 4:4:4 chroma format, or 0x02from the 4:2:2 chroma format to the 4:4:4 chroma format)0x04 Resolution resampling (increasing or decreasing the width or height)0x08 Picture rate upsampling0x10 Bit depth upsampling (increasing the luma bit depth or the chroma bit depth)0x20 Colourization0x40 Temporal extrapolation (i.e., generating one or more future pictures)

[0193] The variables ChromaUpsamplingFlag, ResolutionResamplingFlag, PictureRateUpsamplingFlag, BitDepthUpsamplingFlag, ColourizationFlag, and TemporalExtrapolationFlag, specifying whether nnpfc_purpose indicates die purpose of the NNPF to include chroma upsampling, resolution resampling, picture rate upsampling, bit depth upsampling, colourization, and temporal extrapolation, respectively, are derived as follows:ChromaUpsamplingFlag = ( ( nnpfc_purpose & 0x02 ) > 0 )? 1: 0ResolutionResamplingFlag = ( ( nnpfc_purpose & 0x04 ) > 0 )? 1: 0PictureRateUpsamplingFlag = ( ( nnpfc_purpose & 0x08 ) > 0 )? 1: 0 (75) BitDepthUpsamplingFlag = ( ( nnpfc_purpose & 0x10 ) > 0 )? 1: 0ColourizationFlag = ( ( nnpfc_purpose & 0x20 ) > 0 )? 1: 0TemporalExtrapolationFlag = ( ( nnpfc_purpose & 0x40 ) > 0 )? 1: 0

[0194] NOTE 2 - When a reserved value of nnpfc_purpose is taken into use in the future by ITU-T | ISO / IEC, the syntax of this SEI message could be extended with syntax elements whose presence is conditioned by nnpfc_purpose being equal to that value or any one of a set of values including that value.

[0195] When ChromaFormatIdc is equal to 3, ChromaUpsamplingFlag shall be equal to 0.

[0196] When ChromaUpsamplingFlag is equal to 1. ColourizationFlag shall be equal to 0.

[0197] When PictureRateUpsamplingFlag or TemporalExtrapolationFlag is equal to 1 and the input picture with index 0 is associated with a frame packing arrangement SEI message with fp arrangement type equal to 5, all input pictures are associated with a frame packing arrangement SEI message with fp arrangement type equal to 5 and the same value of fp current frame is frameO flag.

[0198] When TemporalExtrapolationFlag is equal to 1, the extrapolated pictures generated by the NNPF follow all input pictures of the NNPF in output order. When TemporalExtrapolationFlag is equal to 1 and there is a decoded output picture that follows, in output order, the current picture for which the NNPF is activated, the extrapolated pictures generated by the NNPF precede that decoded output picture in output order.

[0199] nnpfc id contains an identifying number that may be used to identify an NNPF. The value of nnpfc id shall be in the range of 0 to 232- 2, inclusive. Values of nnpfc id from 256 to 511, inclusive, and from 231to 232- 2, inclusive, are reserved for future use by ITU-T | ISO / IEC. Decoders conforming to this version of this Specification encountering an NNPFC SEI message with nnpfc id in the range of 256 to 511, inclusive, or in the range of 231to 232- 2, inclusive, shall ignore the SEI message.

[0200] When an NNPFC SEI message is the first NNPFC SEI message, in decoding order, that has a particular nnpfc id value within the current CLVS, the following applies:This SEI message specifies a base NNPF.This SEI message pertains to the current decoded picture and all subsequent decoded pictures of the current layer, in output order, until the end of the current CLVS.

[0201] nnpfc base flag equal to 1 specifies that the SEI message specifies the base NNPF. nnpfc base flag equal to 0 specifies that the SEI message specifies an update relative to the base NNPF.

[0202] The following constraints apply to the value of nnpfc base flag:- When an NNPFC SEI message is the first NNPFC SEI message, in decoding order, that has a particular nnpfc id value within the current CLVS, die value of nnpfc base flag shall be equal to 1.- All NNPFC SEI messages in a CLVS that have a particular nnpfc id value and nnpfc base flag equal to 1 shall have identical SEI payload content.

[0203] When nnpfc base flag is equal to 0. the following applies:This SEI message defines an update relative to the preceding base NNPF in decoding order with the same nnpfc id value. Updates are not cumulative but rather each update is applied on the base NNPF, which is the NNPF specified by the first NNPFC SEI message, in decoding order, that has a particular nnpfc id value within the current CLVS. The NNPF defined by this SEI message is obtained by applying the update defined by this SEI message relative to the base NNPF with the same nnpfc id value.- This SEI message pertains to the current decoded picture and all subsequent decoded pictures of the current layer, in output order, until the end of the current CLVS or up to but excluding the decoded picture that follows the current decoded picture in output order within the current CLVS and is associated with a subsequent NNPFC SEI message, in decoding order, having nnpfc base flag equal to 0 and that particular nnpfc id value within the current CLVS, whichever is earlier.

[0204] nnpfc mode idc, when equal to 0, indicates that the neural network information is contained in the NNPFC SEI message, and the neural network information is in the format of an ISO / IEC 15938-17 bitstream, nnpfc mode idc equal to 1 indicates that the neural network information is identified by the URI indicated by nnpfc uri with the format identified by the tag URI nnpfc tag uri.

[0205] The value of nnpfc mode idc shall be in the range of 0 to 255, inclusive. Values of 2 to 255, inclusive, for nnpfc mode idc are reserved for future use by ITU-T | ISO / IEC and shall not be present in bitstreams conforming to this version of this Specification. Decoders conforming to this version of this Specification shall ignore NNPFC SEI messages with nnpfc mode idc in the range of 2 to 255, inclusive.

[0206] nnpfc alignment zero bit a shall be equal to 0.

[0207] nnpfc tag uri contains a tag URI with syntax and semantics as specified in IETF RFC 4151 identifying the format and associated information about the neural network used as a base NNPF or an update relative to the base NNPF with the same nnpfc id value specified by nnpfc uri.

[0208] NOTE 3 - nnpfc tag uri enables uniquely identifying the format of neural network data specified by nnpfc uri without needing a central registration authority.

[0209] nnpfc tag uri equal to "tag:iso.org,2023:15938-17" indicates that the neural network data identified by nnpfc uri conforms to ISO / IEC 15938-17.

[0210] nnpfc uri contains a URI with syntax and semantics as specified in IETF Internet Standard 66 identifying the neural network used as a base NNPF or an update relative to the base NNPF with the same nnpfc id value.

[0211] nnpfc_property_present_flag equal to 1 specifies that syntax elements related to the filter properties including purpose, input formatting, output formatting, and complexity are present. nnpfc_property_present_flag equal to 0 specifies that no syntax elements related to the filter properties are present.

[0212] When nnpfc base flag is equal to 1. nnpfc_property_present flag shall be equal to 1.

[0213] When nnpfc_property_present_flag is equal to 0, the values of all syntax elements that may be present only when nnpfc_property_present_flag is equal to 1 are inferred to be equal to their corresponding syntax elements, respectively, in the NNPFC SEI message that contains the base NNPF for which this SEI message provides an update.

[0214] When an NNPFC SEI message nnpfcCurr is not the first NNPFC SEI message, in decoding order, that has a particular nnpfc id value within the current CLVS, is not a repetition of the first NNPFC SEI message with that particular nnpfc id value (in this case the value of nnpfc base flag is equal to 0), and the value of nnpfc_property_present_flag is equal to 1, the following constraints apply:The values of syntax elements following nnpfc_property_present_flag and preceding nnpfc complexity info present flag, in decoding order, in the NNPFC SEI message shall be the same as the values of corresponding syntax elements in the first NNPFC SEI message, in decoding order, that has that particular nnpfc id value within the current CLVS.Either nnpfc_complexity_info_present_flag shall be equal to 0 or both nnpfc_complexity_info_present_flag shall be equal to 1 in the first NNPFC SEI message, in decoding order, that has that particular nnpfc id value within the current CLVS (denoted as nnpfcBase below) and all the following constraints apply:nnpfc_parameter_type_idc in nnpfcCurr shall be equal to nnpfc_parameter_type_idc in nnpfcBase. nnpfc_log2_parameter_bit_length_minus3 in nnpfcCurr, when present, shall be less than or equal to nnpfc_log2_parameter_bit_length_minus3 in nnpfcBase.- If nnpfc_num_parameters_idc in nnpfcBase is equal to 0, nnpfc_num_parameters_idc in nnpfcCurr shall be equal to 0.- Otherwise (nnpfc_num_parameters_idc in nnpfcBase is greater than 0), nnpfc_num_parameters_idc in nnpfcCurr shall be greater than 0 and less than or equal to nnpfc_num_parameters_idc in nnpfcBase.- If nnpfc num kmac operations idc in nnpfcBase is equal to 0, nnpfc num kmac operations idc in nnpfcCurr shall be equal to 0.- Otherwise (nnpfc num kmac operations idc in nnpfcBase is greater than 0), nnpfc num kmac operations idc in nnpfcCurr shall be greater than 0 and less than or equal to nnpfc num kmac operations idc in nnpfcBase. If nnpfc total kilobyte size in nnpfcBase is equal to 0, nnpfc total kilobyte size in nnpfcCurr shall be equal to 0.Otherwise (nnpfc total kilobyte size in nnpfcBase is greater than 0), nnpfc total kilobyte size in nnpfcCurr shall be greater than 0 and less than or equal to nnpfc total kilobyte size in nnpfcBase.

[0215] nnpfc_num_input_pics_minus1 plus 1 specifies the number of pictures used as input for the NNPF. The value of nnpfc_num_input_pics_minus1 shall be in the range of 0 to 63, inclusive. When PictureRateUpsamplingFlag is equal to 1, the value of nnpfc_num_input_pics_minusl shall be greater than 0.

[0216] The variable numlnputPics, specifying the number of pictures used as input for die NNPF, is derived as follows:numlnputPics = nnpfc_num_input_pics_minusl + 1 (76)

[0217] nnpfc_input_pic_filtering_flag[ i ] equal to 1 indicates that for the i-th input picture the NNPF generates a corresponding output picture. nnpfc_input_pic_filtering_flag[ i ] equal to 0 indicates that for the i-th input picture the NNPF does not generate a corresponding output picture. Each NNPF -generated picture is stored in the output tensor of the NNPF. When nnpfc_num_input_pics_minusl is equal to 0, nnpfc_input_pic_filtering_flag

[0000] is inferred to be equal to 1. When PictureRateUpsamplingFlag is equal to 0 and nnpfc_num_input_pics_minusl is greater than 0, nnpfc_input_pic_filtering_flag[ i ] shall be equal to 1 for at least one value of i in the range of 0 to nnpfc_num_input_pics_minus1, inclusive.

[0218] nnpfc_absent_input_pic_zero_flag equal to 1 indicates that the NNPF expects an input picture that is not present in the bitstream to be represented by sample arrays with sample values equal to 0. nnpfc_absent_input_pic_zero_flag equal to 0 indicates that the NNPF expects an input picture inputPicA that is not present in the bitstream to be represented by the input picture inputPicB that is the closest to inputPicA in output order and is present in the bitstream.

[0219] nnpfc out sub c flag specifies the values of the variables outSubWidthC and outSubHeightC when ChromaUpsamplingFlag is equal to 1. nnpfc out sub c flag equal to 1 specifies that outSubWidthC is equal to 1 and outSubHeightC is equal to 1. nnpfc out sub c flag equal to 0 specifies that outSubWidthC is equal to 2 andoutSubHeightC is equal to 1. When ChromaFormatldc is equal to 2 and nnpfc_out_sub_c_flag is present, the value of nnpfc out sub c flag shall be equal to 1.

[0220] nnpfc out colour format idc, when ColourizationFlag is equal to 1, specifies the colour format of the NNPF-generated pictures and consequently the values of the variables outSubWidthC and outSubHeightC. nnpfc out colour format idc equal to 1 specifies that the colour format of the NNPF-generated pictures is the 4:2:0 format and outSubWidthC and outSubHeightC are both equal to 2. nnpfc out colour format idc equal to 2 specifies that the colour format of the NNPF-generated pictures is the 4:2:2 format and outSubWidthC is equal to 2 and outSubHeightC is equal to 1. nnpfc out colour format idc equal to 3 specifies that the colour format of the NNPF-generated pictures is the 4:4:4 format and outSubWidthC and outSubHeightC are both equal to 1. The value of nnpfc out colour format idc shall not be equal to 0.

[0221] When ChromaUpsamplingFlag and ColourizationFlag are both equal to 0, outSubWidthC and outSubHeightC are inferred to be equal to SubWidthC and SubHeightC, respectively.

[0222] nnpfc_pic width num minusl plus 1 and nnpfc_pic_width_denom_minusl plus 1 specify the numerator and denominator, respectively, for the resampling ratio of the width of the NNPF-generated pictures relative to CroppcdWidth. Both nnpfc_pic_width_num_minusl and nnpfc_pic_width_denom_minus1 shall be in the range of 0 to 65 535, inclusive.

[0223] The value of ( nnpfc_pic_width_num_minusl + 1 ) ( nnpfc_pic_width_denom_minusl + 1 ) shall be in the range of 1 ∕ 16 to 16, inclusive. When nnpfc_pic_width_num_minusl and nnpfc_pic_width_denom_minusl are not present, the values of nnpfc pic width num minus 1 and nnpfc_pic width denom minus 1 are both inferred to be equal to 0.

[0224] The variable nnpfcOutputPicWidth, representing the width of the luma sample arrays of the NNPF-generated pictures, is derived as follows:nnpfcOutputPicWidth = Ceil( CroppedWidth * (77)( nnpfc_pic_width_num_minusl + 1 ) ( nnpfc_pic_width_denom_minus1 + 1 ) )

[0225] It is a requirement of bitstream conformance that the value of nnpfcOutputPicWidth % outSubWidthC shall be equal to 0.

[0226] nnpfc_pic_height_num_minusl plus 1 and nnpfc_pic_height_denom_minusl plus 1 specify the numerator and denominator, respectively, for the resampling ratio of the height of the NNPF-generated pictures relative to CroppedHeight. Both nnpfc_pic_height_num_minusl and nnpfc_pic_height_denom_minusl shall be in the range of 0 to 65 535, inclusive.

[0227] The value of ( nnpfc_pic_height_num_minusl + 1 ) ( nnpfc_pic_height_denom_minusl + 1 ) shall be in the range of 1 / 16 to 16, inclusive. When nnpfc_pic_height_num_minusl and nnpfc_pic_height_denom_minus1 are not present, the values of nnpfc_pic_height_num_minusl and nnpfc_pic_height_denom_minus1 are both inferred to be equal to 0.

[0228] The variable nnpfcOutputPicHeight, representing the height of the luma sample arrays of the NNPF-generated pictures, is derived as follows:nnpfcOutputPicHeight = Ceil( CroppedHeight * (78)( nnpfc_pic_height_num_minusl + 1 ) ( nnpfc_pic_height_denom_minusl + 1 ) )

[0229] It is a requirement of bitstream conformance that the value of nnpfcOutputPicHeight % outSubHeightC shall be equal to 0.

[0230] When ResolutionResamplingFlag is equal to 1. at least one of the following conditions shall be true:- The value of nnpfcOutputPicWidth is not equal to CroppedWidth.The value of nnpfcOutputPicHeight is not equal to CroppedHeight.

[0231] nnpfc_interpolated_pics[ i ] specifies the number of interpolated pictures generated by the NNPF between the i-th and the ( i + 1 )-th input picture for the NNPF. The value of nnpfc_interpolated_pics[ i ] shall be in the range of 0 to 63, inclusive. When the nnpfc_interpolated_pics[ i ] syntax elements are present, the value of nnpfc_interpolated_pics[ i ] shall be greater than 0 for at least one value of i in the range of 0 to nnpfc_num_input_pics_minusl - 1, inclusive.

[0232] NOTE 4 - When PictureRateUpsamplingFlag is equal to 1 for an NNPF and the NNPFA SEI message that activated this NNPF has nnpfa_persistence_flag equal to 1, only for a single value of i in the range of 0 to numInputPics - 1, inclusive, the value of nnpfc_interpolated_pics[ i ] is greater than 0.

[0233] nnpfc_extrapolated_pics_minusl plus 1 specifies the number of extrapolated pictures generated by the NNPF subsequent to all input pictures for the NNPF in output order. The value of nnpfc_extrapolated_pics_minus1 shall be in the range of 0 to 62, inclusive.

[0234] The variables NumlnpPicsInOutputTensor, specifying the number of pictures that have a corresponding input picture and are present in the output tensor of the NNPF, InpIdx[ idx ], specifying the input picture index, to the list of input pictures in reverse output order, of die idx-th picture that is present in the output tensor of the NNPF and has a corresponding input picture, and numPicsInOutputTensor, specifying the total number of pictures present in the output tensor of the NNPF, are derived as follows:for( i = 0, numPicsInOutputTensor = 0; i < numlnputPics; i++ )if( nnpfc_input_pic_filtering_flag[ i ] ) {InpIdx[ numPicsInOutputTensor ] = inumPicsInOutputTensor++} (79) NumlnpPicsInOutputTensor = numPicsInOutputTensorif( PictureRateUpsamplingFlag )for( i = 0; i <= numlnputPics - 2; i++ )numPicsInOutputTensor += nnpfc_interpolated_pics[ i ]if( TemporalExtrapolationFlag )numPicsInOutputTensor += nnpfc_extrapolated_pics + 1

[0235] nnpfc_component_last_flag equal to 1 indicates that the last dimension in the input tensor inputTensor to the NNPF and the output tensor outputTensor of the NNPF is used for a current channel, nnpfc_component_last_flagequal to 0 indicates that the third dimension in the input tensor inputTensor to the NNPF and the output tensor outputTensor of the NNPF is used for a current channel.

[0236] NOTE 5 - The first dimension in the input tensor and in the output tensor is used for the batch index, which is a common practice in some neural network frameworks. While the equations in the semantics of this SEI message use the batch size corresponding to the batch index equal to 0, it is up to the post-processing implementation to determine the batch size used as the input to the neural network inference process.

[0237] NOTE 6 - For example, when nnpfc inp order idc is equal to 3 and nnpfc auxiliary inp idc is equal to 1, there are 7 channels in the input tensor, including four luma matrices, two chroma matrices, and one auxiliary input matrix. In this case, the process DeriveInputTensors( ) would derive each of these 7 channels of the input tensor one by one, and when a particular channel of these channels is processed, that channel is referred to as the current channel during the process.

[0238] nnpfc inp format idc indicates the method of converting a sample value of the input picture to an input value to the NNPF. The value of nnpfc inp format idc shall be in the range of 0 to 255, inclusive. Values of nnpfc inp format idc in the range of 2 to 255, inclusive, are reserved for future specification by ITU-T | ISO / IEC and shall not be present in bitstreams conforming to this version of this Specification. Decoders conforming to this version of this Specification shall ignore NNPFC SEI messages with nnpfc inp format idc in the range of 2 to 255, inclusive.

[0239] When nnpfc inp format idc is equal to 0, the input values to the NNPF are real numbers and the functions InpY( ) and InpC( ) are specified as follows:InpY( x ) = x ÷ ( ( 1 « BitDepthY ) - 1 ) (80) InpC( x )= x- ( ( l « BitDepthc ) - 1 ) (81)

[0240] When nnpfc inp format idc is equal to 1, the input values to the NNPF are unsigned integer numbers and the functions InpY( ) and InpC( ) are specified as follows:shiftY = BitDepthy - inpTensorBitDepthyif( inpTensorBitDepthy >= BitDepthy)InpY( x ) = x « ( inpTensorBitDepthy - BitDepthy ) (82) elseInpY( x ) = Clip3(0, ( 1 « inpTensorBitDepthy ) - l, ( x + ( l « ( shiftY - 1 ) ) ) » shiftY ) shiftC = BitDepthc - inpTensorBitDepthcif( mpTensorBitDepthc >= BitDepthc )InpC( x ) = x « ( mpTensorBitDepthc - BitDepthc ) (83) elseInpC( x ) = Clip3(0, ( 1 « mpTensorBitDepthc ) - l, (x + ( l « ( shiftC - 1 ) ) ) » shiftC )

[0241] The variable inpTensorBitDepthY is derived from the syntax element nnpfc_inp_tensor_luma_bitdepth_minus8 as specified below. The variable inpTensorBitDepthC is derived from the syntax element nnpfc_inp_tensor_chroma_bitdepth_minus8 as specified below.

[0242] nnpfc auxiliary inp idc greater than 0 indicates that auxiliary input data is present in the input tensor of the NNPF. nnpfc auxiliary inp idc equal to 0 indicates that auxiliary input data is not present in the input tensor, nnpfc auxiliary inp idc equal to 1 specifies that auxiliary input data is derived as specified in Equation 95.

[0243] The value of nnpfc auxiliary inp idc shall be in the range of 0 to 255, inclusive. Values of 2 to 255, inclusive, for nnpfc auxiliary inp idc are reserved for future use by ITU-T | ISO / IEC and shall not be present in bitstreams conforming to this version of this Specification. Decoders conforming to this version of this Specification shall ignore NNPFC SEI messages with nnpfc auxiliary inp idc in the range of 2 to 255, inclusive.

[0244] nnpfc inp order idc indicates the method of ordering the sample arrays of an input picture to form an input tensor to the NNPF.

[0245] The value of nnpfc inp order idc shall be in the range of 0 to 255, inclusive. Values of 4 to 255, inclusive, for nnpfc inp order idc are reserved for future use by ITU-T | ISO / IEC and shall not be present in bitstreams conforming to this version of this Specification. Decoders conforming to this version of this Specification shall ignore NNPFC SEI messages with nnpfc inp order idc in the range of 4 to 255, inclusive.

[0246] When ChromaFormatldc is not equal to 1, nnpfc inp order idc shall not be equal to 3.

[0247] When ChromaFormatldc is equal to 0, nnpfc inp order idc shall be equal to 0.

[0248] When ChromaUpsamplingFlag is equal to 1, nnpfc inp order idc shall not be equal to 0.

[0249] Table 21 contains an informative description of nnpfc inp order idc values.Tabic 21 - Description of nnpfc inp order idc valuesnnpfc_inp_ Descriptionorder idc0 If nnpfc auxiliary inp idc is equal to 0, one luma matrix is present in the input tensor for each input picture, and the number of channels is 1. Otherwise, when nnpfc auxiliary inp idc is equal to 1, one luma matrix and one auxiliary input matrix are present, and the number of channels is 2.1 If nnpfc auxiliary inp idc is equal to 0, two chroma matrices are present in the input tensor, and the number of channels is 2. Otherwise, when nnpfc auxiliary inp idc is equal to 1, tw o chroma matrices and one auxiliary’ input matrix are present, and the number of channels is 3.2 If nnpfc auxiliary inp idc is equal to 0, one luma and two chroma matrices are present in tire input tensor, and the number of channels is 3. Otherw ise, when nnpfc auxiliary inp idc is equal to 1, one luma matrix, two chroma matrices and one auxiliary input matrix are present, and the number of channels is 4.3 If nnpfc auxiliary inp idc is equal to 0, four luma matrices and two chroma matrices are present in the input tensor, and the number of channels is 6. Otherwise, when nnpfc auxiliary inp idc is equal to 1, four luma matrices, two chroma matrices, and oneauxiliary input matrix are present in the input tensor, and the number of channels is 7. The luma channels are derived in an interleaved manner as illustrated in Error! Reference source not found.. This nnpfc_inp_order_idc can only be used when the input chroma format is 4:2:0.4..255 Reserved

[0250] impfc_inp_tensor_luma_bitdepth_minus8 plus 8 specifies the bit depth of luma sample values in the input integer tensor. The value of inpTensorBitDepthY is derived as follows:inpTensorBitDepthY = nnpfc_inp_tensor_luma_bitdepth_minus8 + 8 (84)

[0251] It is a requirement of bitstream conformance that the value of nnpfc_inp_tensor_luma_bitdepth_minus8 shall be in the range of 0 to 24, inclusive.

[0252] mipfc_inp_tensor_chroma_bitdepth_minus8 plus 8 specifies the bit depth of chroma sample values in the input integer tensor. The value of inpTensorBitDepthC is derived as follows:inpTensorBitDepthc = nnpfc_inp_tensor_chroma_bitdepth_minus8 + 8 (85)

[0253] It is a requirement of bitstream conformance that the value of nnpfc_inp_tensor_chroma_bitdepth_minus8 shall be in the range of 0 to 24, inclusive.

[0254] nnpfc out format idc equal to 0 indicates that the sample values output by the NNPF are real numbers where the value range of 0 to 1, inclusive, maps linearly to the unsigned integer value range of 0 to ( 1 « bitDepth ) - 1, inclusive, for any desired bit depth bitDepth for subsequent post-processing or displaying.

[0255] nnpfc out format idc equal to 1 indicates that the luma sample values output by the NNPF are unsigned integer numbers in the range of 0 to ( 1 « outTensorBitDepthY ) - 1, inclusive, and the chroma sample values output by the NNPF are unsigned integer numbers in the range of 0 to ( 1 « outTensorBitDepthC ) - 1, inclusive.

[0256] The value of nnpfc out format idc shall be in the range of 0 to 255, inclusive. Values of 2 to 255, inclusive, for nnpfc_out_format_idc are reserved for future specification by ITU-T | ISO / IEC and shall not be present in bitstreams conforming to this version of this Specification. Decoders conforming to this version of this Specification shall ignore NNPFC SEI messages with nnpfc out format idc in the range of 2 to 255, inclusive.

[0257] nnpfc out order idc indicates the output order of samples resulting from the NNPF.

[0258] The value of nnpfc out order idc shall be in the range of 0 to 255, inclusive. Values of 4 to 255, inclusive, for nnpfc out order idc are reserved for future use by ITU-T | ISO / IEC and shall not be present in bitstreams conforming to this version of this Specification. Decoders conforming to this version of this Specification shall ignore NNPFC SEI messages with nnpfc out order idc in the range of 4 to 255, inclusive.

[0259] When ChromaUpsamplingFlag is equal to 1, nnpfc out order idc shall not be equal to 0 or 3.

[0260] When ColourizationFlag is equal to 1, nnpfc out order idc shall not be equal to 0.

[0261] Table 22 contains an informative description of nnpfc_out_order_idc values.Table 22 - Description of nnpfc out order idc valuesnnpfc_out_ Descriptionorder idc0 Only the luma matrix is present in the output tensor, thus the number of channels is 1.1 Only the chroma matrices are present in the output tensor, thus the number of channels is 2.2 The luma and chroma matrices are present in die output tensor, thus the number of channels is 3. 3 Four luma matrices and two chroma matrices are present in the output tensor, thus the number of channels is 6. This nnpfc out order idc can only be used when the output chroma fonnat is 4:2:0.4..255 Reserved

[0262] rmpfc_out_tensor_luma_bitdepth_minus8 plus 8 specifies the bit depth of luma sample values in the output integer tensor. The value of nnpfc_out_tensor_luma_bitdepth_mmus8 shall be in the range of 0 to 24, inclusive. The value of outTensorBitDepthY is derived as follows:outTensorBitDepthy = nnpfc_out_tcnsor_luma_bitdcpth_minus8 + 8 (86)

[0263] nnpfc_out_tensor_chroma_bitdepth_minus8 plus 8 specifies the bit depth of chroma sample values in the output integer tensor. The value of nnpfc_out_tensor_chroma_bitdepth_minus8 shall be in the range of 0 to 24, inclusive. The value of outTensorBitDepthC is derived as follows:outTensorBitDepthC = nnpfc_out_tensor_chroma_bitdepth_minus8 + 8 (87)

[0264] When BitDepthUpsamplingFlag is equal to 1, the value of nnpfc out format idc shall be equal to 1 and at least one of the following conditions shall be true:- nnpfc_out_tensor_luma_bitdepth_minus8 is present and outTensorBitDepthY is greater than BitDepthY.- nnpfc_out_tensor_chroma_bitdepth_minus8 is present and outTensorBitDepthC is greater than BitDepthC.

[0265] When nnpfc_inp_tensor_luma_bitdepth_minus8, nnpfc_inp_tensor_chroma_bitdepth_minus8, nnpfc_out_tensor_luma_bitdepth_minus8, and nnpfc_out_tensor_chroma_bitdepth_minus8 are present and outTensorBitDepthy is greater than inpTensorBitDepthY, outTensorBitDepthc shall not be less than inpTensorBitDepthC. When nnpfc_inp_tensor_luma_bitdepth_minus8, nnpfc_inp_tensor_chroma_bitdepth_minus8, nnpfc out tensor luma bitdepth minus8, and nnpfc out tensor chroma bitdepth minus 8 are present and outTensorBitDepthc is greater than inpTensorBitDepthC, outTensorBitDepthy shall not be less than inpTensorBitDepthY.

[0266] nnpfc_separate_colour_description_present_flag equal to 1 indicates that a distinct combination of colour primaries, transfer characteristics, matrix coefficients, and scaling and offset values applied in association with the matrix coefficients for the picture resulting from the NNPF is specified in die SEI message syntax structure. nnpfc_separate_colour_description_present_flag equal to 0 indicates that the combination of colour primaries, transfer characteristics, matrix coefficients, and scaling and offset values applied in association with the matrix coefficients for the picture resulting from the NNPF is the same as implied by the VUI parameters vui_colour_primaries, vui_transfer_characteristics, vui_matrix_coeffs, and vui_full_range_flag that are indicated or inferred for the CL VS.

[0267] nnpfc_colour_primaries has the same semantics as specified in clause 7.3 for the vui_colour_primaries syntax element, except as follows:- nnpfc_colour_primaries specifies the colour primaries of the picture resulting from applying the NNPF specified in the SEI message, rather than the colour primaries used for the CLVS.- When nnpfc_colour_primaries is not present in the NNPFC SEI message, the value of nnpfc_colour_primaries is inferred to be equal to vui_colour_primaries.

[0268] impfc transfer characteristics has the same semantics as specified in clause 7.3 for the vui transfer characteristics syntax element, except as follows:- impfc transfer characteristics specifies the transfer characteristics of the picture resulting from applying the NNPF specified in the SEI message, rather than the transfer characteristics used for the CLVS.- When nnpfc transfer characteristics is not present in the NNPFC SEI message, the value of impfc transfer characteristics is inferred to be equal to vui transfer characteristics.

[0269] nnpfc matrix coeffs describes the equations used in deriving luma and chroma signals from the green, blue, and red, or Y, Z, and X primaries. Its semantics apply to the pictures resulting from applying the NNPF specified in this SEI message and are as specified for MatrixCoefficients in Rec. ITU-T H.273 | ISO / IEC 23091-2 with BitDepthY and BitDepthC being equal to outTensorBitDepthY and outTensorBitDepthC, respectively.

[0270] When nnpfc matrix coeffs is not present in the NNPFC SEI message, the value of nnpfc matrix coeffs is inferred to be equal to vui matrix eoeffs.

[0271] nnpfc matrix coeffs shall not be equal to 0 unless both of the following conditions are true:- nnpfc_out_tensor_chroma_bitdepth_minus8 is equal to nnpfc_out_tensor_luma_bitdepth_minus8.- nnpfc_out_order_idc is equal to 2, outSubHeightC is equal to 1, and outSubWidthC is equal to 1.

[0272] nnpfc matrix coeffs shall not be equal to 8 unless one of the following conditions is true:- nnpfc_out_tensor_chroma_bitdepth_minus8 is equal to nnpfc_out_tensor_luma_bitdepth_minus8.- nnpfc_out_tensor_chroma_bitdepth_minus8 is equal to nnpfc_out_tensor_luma_bitdepth_minus8 + 1, nnpfc_out_order_idc is equal to 2, outSubHeightC is equal to 1, and outSubWidthC is equal to 1.

[0273] nnpfc full range flag indicates the scaling and offset values applied in association with the matrix coefficients as specified by nnpfc matrix coeffs. Its semantics are as specified for the VideoFullRangeFlag parameter in Rec. ITU-T H.273 | ISO / IEC 23091-2. When not present, the value of nnpfc full range flag is inferred to be equal to 0.

[0274] nnpfc_chroma_loc_info_present_flag equal to 1 indicates the presence of the nnpfc_chroma_sample_loc_type_frame syntax element in the NNPFC SEI message. nnpfc_chroma_loc_info_present_flag equal to 0 indicates the absence of the nnpfc chroma sample loc type frame syntax element in the NNPFC SEI message. When nnpfc_chroma_loc_info_present_flag is not present, its value is inferred to be equal to 0. When ColourizationFlag is equal to 0 or nnpfc_out_colour_format_idc is not equal to 1, the value of nnpfc_chroma_loc_info_present_flag shall be equal to 0.

[0275] nnpfc_chroma_sample_loc_type_frame, when not equal to 6 and nnpfc_out_colour_format_idc is equal to 1, specifies the location of chroma samples of the output pictures, as shown in FIG. 1. nnpfc_chroma_sample_loc_type_frame equal to 6 and nnpfc_out_colour_format_idc equal to 1 indicates that the location of the chroma samples is unknown or unspecified or specified by other means not specified in this Specification. The value of nnpfc_chroma_sample_loc_type_frame shall be in the range of 0 to 6, inclusive.

[0276] nnpfc_overlap indicates the overlapping horizontal and vertical sample counts of adjacent input tensors of the NNPF. The value of nnpfc overlap shall be in the range of 0 to 16383, inclusive.

[0277] nnpfc_constant_patch_size_flag equal to 1 indicates that the NNPF accepts exactly the patch size indicated by nnpfc_patch_width_minusl and nnpfc_patch_height_minusl as input. nnpfc_constant_patch_size flag equal to 0 indicates that the NNPF accepts as input any patch size with width inpPatchWidth and height inpPatchHeight such that the width of an extended patch (i.e., a patch plus the overlapping area), which is equal to inpPatchWidth + 2 * nnpfc_overlap, is a positive integer multiple of nnpfc_extended_patch_width_cd_delta_minusl + 1 + 2 * nnpfc_overlap, and the height of the extended patch, which is equal to inpPatchHeight + 2 * nnpfc_overlap, is a positive integer multiple of nnpfc_extended_patch_height_cd_delta_minusl + 1 + 2 * nnpfc_overlap.

[0278] nnpfc_patch_width_minusl plus 1, when nnpfc_constant_patch_size_flag equal to 1, indicates the horizontal sample counts of the patch size required for the input to the NNPF. The value of nnpfc_patch_width_minusl shall be in the range of 0 to Min( 32766, CroppedWidth - 1 ), inclusive.

[0279] nnpfc_patch_height_minusl plus 1, when nnpfc_constant_patch_size_flag equal to 1, indicates the vertical sample counts of the patch size required for the input to the NNPF. The value of nnpfc_patch_height_minusl shall be in the range of 0 to Min( 32766, CroppedHeight - 1 ), inclusive.

[0280] nnpfc_extended_patch_width_cd_delta_minusl plus 1 plus 2 * nnpfc_overlap, when nnpfc_constant_patch_size_flag equal to 0, indicates a common divisor of all allowed values of the width of an extended patch required for the input to the NNPF. The value of nnpfc_extended_patch_width_cd_delta_minusl shall be in the range of 0 to Min( 32766, CroppedWidth - 1 ), inclusive.

[0281] nnpfc_extended_patch_height_cd_delta_minusl plus 1 plus 2 * nnpfc overlap, when nnpfc constant patch size flag equal to 0, indicates a common divisor of all allowed values of the height of an extended patch required for the input to the NNPF. The value of nnpfc_extended_patch_height_cd_delta_minusl shall be in the range of 0 to Min( 32766, CroppedHeight - 1 ), inclusive.

[0282] Let the variables inpPatchWidth and inpPatchHeight be the patch size width and the patch size height, respectively.

[0283] If mipfc_constant_patch_size_flag is equal to 0, the following applies:- The values of inpPatchWidth and inpPatchHeight are either provided by external means not specified in this Specification or set by the post-processor itself.The value of inpPatchWidth + 2 * nnpfc overlap shall be a positive integer multiple of nnpfc_extended_patch_width_cd_delta_minusl + 1 + 2 * nnpfc overlap and inpPatchWidth shall be less than or equal to CroppedWidth. The value of inpPatchHeight + 2 * nnpfc overlap shall be a positive integer multiple ofnnpfc_extended_patch_height_cd_delta_minusl + 1 + 2 * nnpfc overlap and inpPatchHeight shall be less than or equal to CroppedHeight.

[0284] Otherwise (nnpfc_constant_patch_size flag is equal to 1), the value of inpPatchWidth is set equal to nnpfc_patch_width_minusl + 1 and the value of inpPatchHeight is set equal to nnpfc_patch_height_minusl + 1.

[0285] The variables outPatchWidth, outPatchHeight, horCScaling, verCScaling, outPatchCWidth, and outPatchCHeight are derived as follows:outPatchWidth = ( nnpfcOutputPicWidth * inpPatchWidth ) / CroppedWidtli (88) outPatchHeight = ( nnpfcOutputPicHeight * inpPatchHeight ) / CroppedHeight (89) horCScaling = SubWidthC / outSubWidthC (90) verCScaling = SubHeightC / outSubHeightC (91) outPatchCWidth = outPatchWidth * horCScaling (92) outPatchCHeight = outPatchHeight * verCScaling (93)

[0286] It is a requirement of bitstream conformance that outPatchWidth * CroppedWidth shall be equal to nnpfcOutputPicWidth * inpPatchWidth and outPatchHeight * CroppedHeight shall be equal to nnpfcOutputPicHeight * inpPatchHeight.

[0287] nnpfc_padding_type indicates the process of padding when referencing sample locations outside the boundaries of the input picture as described in Table 23. The value of nnpfc _padding_type shall be in the range of 0 to 15, inclusive. Values of 5 to 15, inclusive, for nnpfc_padding_type are reserved for future use by ITU-T | ISO / IEC and shall not be present in bitstreams conforming to this version of this Specification. Decoders conforming to this version of this Specification shall ignore NNPFC SEI messages with nnpfc_padding_type in the range of 5 to 15, inclusive.Table 23 - Informative description of nnpfc_padding_type values nnpfc_padding_type Description0 Zero padding1 Replication padding2 Reflection padding3 Wrap-around padding4 Fixed padding5..15 reserved

[0288] nnpfc_luma_padding_val indicates the luma value to be used for padding when nnpfc padding type is equal to 4. The value of nnpfc_hima_padding_val shall be in the range of 0 to ( 1 « BitDepthY ) - 1, inclusive.

[0289] nnpfc_cb_padding_val indicates the Cb value to be used for padding when nnpfc_padding_type is equal to 4. The value of nnpfc_cb_padding_val shall be in the range of 0 to ( 1 « BitDepthC ) - 1, inclusive.

[0290] nnpfc_cr_padding_val indicates the Cr value to be used for padding when nnpfc_padding_type is equal to 4. The value of nnpfc_cr_padding_val shall be in the range of 0 to ( 1 « BitDepthC ) - 1, inclusive.

[0291] The function InpSampleVal( y, x, picHeight, picWidth, croppedPic, cldx ) with inputs being a vertical sample location y, a horizontal sample location x, a picture height picHeight, a picture width picWidth, sample array croppedPic, and component index cldx (equal to 0 for luma, 1 for Cb, and 2 for Cr) returns the value of sampleVal derived as follows:

[0292] NOTE 7 -For the inputs to the function InpSampleVal( ), the vertical location is listed before the horizontal location for compatibility with input tensor conventions of some inference engines.if( nnpfc_padding_type = = 0 )if( y < 0 | | x < 0 | | y >= picHeight | | x >= picWidth )sampleVal = 0elsesampleVal = croppedPic[ x ][ y ] (94) else if( nnpfc_padding_type = = 1 )sampleVal = croppedPic[ Clip3( 0, picWidth - 1, x ) ][ Clip3( 0, picHeight - 1, y ) ] else if( impfc_padding_type = = 2 )sampleVal = croppedPicf Reflect( picWidth - 1, x ) ][ Reflect( picHeight - 1, y ) ]else if( nnpfc padding type = = 3 )if( y >= 0 && y < picHeight )sampleVal = croppedPic[ Wrap( picWidth - 1, x ) ][ y ]else if( nnpfc_padding_type = = 4 )if( y < 0 | | x < 0 | | y >= picHeight | | x >= picWidth )sampleVal = ( cldx = = 0? nnpfc_luma_padding_val:( cldx = = 1? nnpfc_cb_padding_val: nnpfc_cr_padding_val ) )elsesampleVal = croppedPic[ x ][ y ]

[0293] When nnpfc auxiliary inp idc is equal to 1, the variable strengthControlScaledVal is derived as follows:for( i = 0; i < numlnputPics; i++ )if( nnpfc inp format idc = = 1 ) (95) if( nnpfc_inp_order_idc = = 0 | | nnpfc_inp_order_idc = = 2 | |nnpfc_inp_order_idc == 3 )strengthControlScaledValf i ] =Floor ( StrengthControlValf i ] * ( ( 1 « inpTensorBitDepthy ) - 1 ) ) else if( nnpfc_inp_order_idc = = 1 )strengthControlScaledValf i ] =Floor ( StrengthControlValf i ] * ( ( 1 « inpTensorBitDepthc ) - 1 ) ) elsestrengthControlScaledVal[ i ] = StrengthControlVal[ i ]

[0294] A patch is a rectangular array of samples from a component (e.g., a luma or chroma component) of a picture.

[0295] The process DeriveInputTensors( ), for deriving the input tensor inputTensor for a given vertical sample coordinate cTop and a horizontal sample coordinate cLeft specifying the top-left sample location for the patch of samples included in the input tensor, is specified as follows:for( i = 0; i < numlnputPics; i++ ) {if( nnpfc_inp_order_idc = = 0 )for( yP = -nnpfe overlap; yP < mpPatchHeight + nnpfe overlap; yP++)for( xP = -nnpfe overlap; xP < inpPatchWidth + nnpfe overlap; xP++ ) {inpVal = InpY( InpSampleVal( cTop +yP, cLeft + xP, CroppedHeight,CroppedWidth, Cropped YPic[ i ], 0 ) )yPovlp = yP + nnpfc_overlapxPovlp = xP + nnpfc_overlapif(!nnpfc_component_last_flag )inputTensor

[0000] [ i ]

[0000] [ yPovlp ][ xPovlp ] = inpValelseinputTensor

[0000] [ i ] [ yPovlp ] [ xPovlp ]

[0000] = inpValif( nnpfc_auxiliary_inp_idc = = 1 )if(!nnpfc_component_last_flag )inputTensor

[0000] [ i ]

[0001] [ yPovlp ][ xPovlp ] = strengthControlScaledVal[ i ]elseinputTensor

[0000] [ i ][ yPovlp ][ xPovlp ]

[0001] = strengthControlScaledVal[ i ]}else if( nnpfc_inp_order_idc = = 1 ) (96) for( yP = -nnpfe overlap; yP < inpPatchHeight + nnpfe overlap; yP++)for( xP = -nnpfe overlap; xP < inpPatchWidth + nnpfe overlap; xP++ ) {inpCbVal = InpC( InpSampleVal( cTop + yP, cLeft + xP, CroppedHeight / SubHeightC,CroppedWidth / SubWidthC, CroppedCbPicf i ], 1 ) )inpCrVal = InpC( InpSampleVal( cTop + yP, cLeft +xP, CroppedHeight / SubHeightC,CroppedWidth / SubWidthC, CroppedCrPic[ i ], 2 ) )yPovlp = yP + nnpfc_overlapxPovlp = xP + nnpfc_overlapif(!nnpfc_component_last_flag ) {inputTensor

[0000] [ i ]

[0000] [ yPovlp ][ xPovlp ] = inpCbValinputTensor

[0000] [ i ]

[0001] [ yPovlp ][ xPovlp ] = inpCrVal} else {inputTensor

[0000] [ i ] [ yPovlp ] [ xPovlp ]

[0000] = inpCbValinputTensor

[0000] [ i ] [ yPovlp ] [ xPovlp ]

[0001] = inpCrVal}if( nnpfc_auxiliary_inp_idc = = 1 )if(!nnpfc_component_last_flag )inputTensor

[0000] [ i ]

[0002] [ yPovlp ][ xPovlp ] = strengthControlScaledVal[ i ] elseinputTensor

[0000] [ i ][yPovlp ][ xPovlp ]

[0002] = strcngtliControlScalcdVal[ i ] }else if( nnpfc_inp_order_idc = = 2 )for( yP = -nnpfc overlap; yP < inpPatchHeight + nnpfc overlap; yP++) for( xP = -nnpfc overlap; xP < inpPatchWidth + nnpfc overlap; xP++ ) { yY = cTop +yPxY = cLeft + xPyC = yY / SubHeightCxC = xY / SubWidthCinpYVal = InpY( InpSampleVal(yY, xY, CroppedHeight,CroppedWidth, CroppedYPic[ i ], 0 ) )inpCbVal = InpC( InpSampleVal( yC, xC, CroppedHeight / SubHeightC, CroppedWidth / SubWidthC, CroppedCbPic[ i ], 1 ) ) inpCrVal = InpC( InpSampleVal( yC, xC, CroppedHeight / SubHeightC, CroppedWidth / SubWidthC, CroppedCrPic[ i ], 2 ) )yPovlp = yP + nnpfc_overlapxPovlp = xP + nnpfc_overlapif(!nnpfc_component_last_flag ) {inputTensor

[0000] [ i ]

[0000] [ yPovlp ] [ xPovlp ] = inpYValinputTensor

[0000] [ i ]

[0001] [ yPovlp ][ xPovlp ] = inpCbValinputTensor

[0000] [ i ]

[0002] [ yPovlp ][ xPovlp ] = inpCrVal} else {inputTensor

[0000] [ i ] [ yPovlp ] [ xPovlp ]

[0000] = inpYValinputTensor

[0000] [ i ][ yPovlp ][ xPovlp ]

[0001] = inpCbValinputTensor

[0000] [ i ][ yPovlp ][ xPovlp ]

[0002] = inpCrVal}if( nnpfc_auxiliary_inp_idc = = 1 )if(!nnpfc_component_last_flag )inputTensor

[0000] [ i ]

[0003] [ yPovlp ][ xPovlp ] = strengthControlScaledVal[ i ]elseinputTensor

[0000] [ i ][yPovlp ][ xPovlp ]

[0003] = strengthControlScaledVal[ i ] }else if( nnpfc_inp_order_idc = = 3 )fbr( yP = -nnpfc overlap; yP < inpPatchHeight + nnpfc overlap; yP++) fbr( xP = -nnpfc overlap; xP < inpPatchWidth + nnpfc overlap; xP++ ) { yTL = cTop + yP * 2xTL = cLeft+ xP * 2yBR = yTL + 1xBR = xTL + 1yC = cTop / 2 + yPxC = cLeft / 2 + xPinpTLVal = InpY( InpSampleVal( yTL, xTL, CroppedHeight,CroppedWidth, CroppedYPic[ i ], 0 ) )inpTRVal = InpY( InpSampleVal( yTL, xBR, CroppedHeight,CroppedWidth, Cropped YPic[ i ], 0 ) )inpBLVal = InpY( InpSampleVal(yBR, xTL, CroppedHeight,CroppedWidth, CroppedYPic[ i ], 0 ) )inpBRVal = InpY( InpSampleVal( yBR, xBR, CroppedHeight,CroppedWidth, Cropped YPic[ i ], 0 ) )inpCbVal = InpC( InpSampleVal( yC, xC, CroppedHeight / 2,CroppedWidth / 2, CroppcdCbPic[ i ], 1 ) )inpCrVal = InpC( InpSampleVal( yC, xC, CroppedHeight / 2,CroppedWidth / 2, CroppedCrPic[ i ], 2 ) )yPovlp = yP + nnpfc overlapxPovlp = xP + nnpfc_overlapif(!nnpfc_component_last_flag ) {inputTensor

[0000] [ i ]

[0000] [ yPovlp ][ xPovlp ] = inpTLValinputTensor

[0000] [ i ]

[0001] [ yPovlp ][ xPovlp ] = inpTRValinputTensor

[0000] [ i ]

[0002] [ yPovlp ][ xPovlp ] = inpBLValinputTensor

[0000] [ i ]

[0003] [ yPovlp ][ xPovlp ] = inpBRValinputTensor

[0000] [ i ]

[0004] [ yPovlp ][ xPovlp ] = inpCbValinputTensor

[0000] [ i ]

[0005] [ yPovlp ][ xPovlp ] = inpCrVal} else {inputTensor

[0000] [ i ] [ yPovlp ] [ xPovlp ]

[0000] = inpTLVal inputTensor

[0000] [ i ] [ yPovlp ] [ xPovlp ]

[0001] = inpTRValinputTensor

[0000] [ i ] [ yPovlp ] [ xPovlp ]

[0002] = inpBLValinputTensor

[0000] [ i ][ yPovlp ][ xPovlp ]

[0003] = inpBRValinputTensor

[0000] [ i ][ yPovlp ][ xPovlp ]

[0004] = inpCbValinputTensor

[0000] [ i ][ yPovlp ][ xPovlp ]

[0005] = inpCrVal}if( nnpfc_auxiliary_inp_idc = = 1 )if(!nnpfc_component_last_flag )inputTensor

[0000] [ i ]

[0006] [ yPovlp ][ xPovlp ] = strcngdiControlScalcdVal[ i ]elseinputTensor

[0000] [ i ][ yPovlp ][ xPovlp ]

[0006] = strengthControlScaledVal[ i ]}}

[0296] The process StoreOutputTensors( ), for deriving sample values in the sample arrays FilteredYPic, FilteredCbPic, and FilteredCrPic, for the NNPF-generated pictures, from the output tensor outputTensor for a given vertical sample coordinate cTop and a horizontal sample coordinate cLeft specifying the top-left sample location for the patch of samples included in the input tensor, is specified as follows:for( i = 0; i < numPicsInOutputTensor; i++ ) {if( nnpfc_out_order_idc = = 0 )for( yP = 0; yP < outPatchHeight; yP++)for( xP = 0; xP < outPatchWidth; xP++ ) {yY = cTop * outPatchHeight / inpPatchHeight + yPxY = cLeft * outPatchWidth / inpPatchWidth + xPif ( Y < nnpfcOutputPicHeight && xY < nnpfcOutputPicWidth )if( !nnpfc_component_last_flag )FilteredYPic[ i ][ xY ][ yY ] = outputTensor

[0000] [ i ]

[0000] [ yP ][ xP ]elseFilteredYPic[ i ] [ xY ] [ yY ] = outputTensor

[0000] [ i ] [ yP ] [ xP ]

[0000] }else if( nnpfc out order idc = = 1 ) (97) for( yP = 0; yP < outPatchCHeight; yP++)for( xP = 0; xP < outPatchCWidth; xP++ ) {xSrc = cLeft * horCScaling + xPySrc = cTop * verCScaling + yPif ( ySrc < nnpfcOutputPicHeight / outSubHeightC &&xSrc < nnpfcOutputPicWidth / outSubWidtliC )if( !nnpfc_component_last_flag ) {FilteredCbPic[ i ][ xSrc ][ ySrc ] = outputTensor

[0000] [ i ]

[0000] [ yP ][ xP ] FilteredCrPic[ i ][ xSrc ][ ySrc ] = outputTensor

[0000] [ i ]

[0001] [ yP ][ xP ] } else {FilteredCbPic[ i ][ xSrc ][ ySrc ] = outputTensor

[0000] [ i ][ yP ][ xP ]

[0000] FilteredCrPic[ i ] [ xSrc ] [ ySrc ] = outputTensor

[0000] [ i ] [ yP ] [ xP ]

[0001] }}else if( nnpfc_out_order_idc = = 2 )fbr( yP = 0; yP < outPatchHeight; yP++)for( xP = 0; xP < outPatchWidth; xP++ ) {yY = cTop * outPatchHeight / inpPatchHeight + yPxY = cLeft * outPatchWidth / inpPatchWidth + xPyC = yY / outSubHeightCxC = xY / outSubWidthCyPc = ( yP / outSubHeightC ) * outSubHeightCxPc = ( xP / outSubWidthC ) * outSubWidthCif ( vY < nnpfcOutputPicHeight && xY < nnpfcOutputPicWidth ) if(!nnpfc_component_last_flag ) {FilteredYPic[ i ] [ xY ] [ yY ] = outputTensor

[0000] [ i ]

[0000] [ yP ] [ xP ]FilteredCbPic[ i ][ xC ][ yC ] = outputTensor

[0000] [ i ]

[0001] [ yPc ][ xPc ]FilteredCrPic[ i ][ xC ][ yC ] = outputTensor

[0000] [ i ]

[0002] [ yPc ][ xPc ]} else {FilteredYPic[ i ] [ xY ] [ yY ] = outputTensor

[0000] [ i ] [ yP ] [ xP ]

[0000] FilteredCbPic[ i ][ xC ][ yC ] = outputTensor

[0000] [ i ][ yPc ][ xPc ]

[0001] FilteredCrPic[ i ][ xC ][ yC ] = outputTensor

[0000] [ i ][ yPc ][ xPc ]

[0002] }}else if( nnpfc_out_order_idc = = 3 )for( yP = 0; yP < outPatchHeight; yP++ )for( xP = 0; xP < outPatchWidth; xP++ ) {ySrc = cTop / 2 * outPatchHeight / inpPatchHeight + yPxSrc = cLeft / 2 * outPatchWidth / inpPatchWidth + xPif ( ySrc < nnpfcOutputPicHeight / 2 &&xSrc < nnpfcOutputPicWidth / 2 )if( !nnpfc component last flag ) {FilteredYPic[ i ] [ xSrc * 2 ] [ y Src * 2 ] = outputTensor

[0000] [ i ]

[0000] [ yP ] [ xP ]FilteredYPic[ i ][ xSrc * 2 + 1 ][ ySrc * 2 ] = outputTensor

[0000] [ i ]

[0001] [ yP ][ xP ] FilteredYPic[ i ][ xSrc * 2 ][ ySrc * 2 + 1 ] = outputTensor

[0000] [ i ]

[0002] [ yP ][ xP ] FilteredYPic[ i ][ xSrc * 2 + 1][ ySrc * 2 + 1 ] = outputTensor

[0000] [ i ]

[0003] [ yP ][ xP ] FilteredCbPic[ i ][ xSrc ][ ySrc ] = outputTensor

[0000] [ i ]

[0004] [ yP ][ xP ] FilteredCrPic[ i ][ xSrc ][ ySrc ] = outputTensor

[0000] [ i ]

[0005] [ yP ][ xP ] } else {FilteredYPic[ i ][ xSrc * 2 ][ySrc * 2 ] = outputTensor

[0000] [ i ][yP ][xP ]

[0000] FilteredYPic[ i ][ xSrc * 2 + 1 ][ ySrc * 2 ] = outputTensor

[0000] [ i ][ yP ][ xP ]

[0001] FilteredYPic[ i ][xSrc * 2 ][ySrc * 2 + 1 ] = outputTensor

[0000] [ i ][ yP ][ xP ]

[0002] FilteredYPic[ i ][ xSrc * 2 + 1][ ySrc * 2 + 1 ] = outputTensor

[0000] [ i ][ yP ][ xP ]

[0003] FilteredCbPic[ i ][ xSrc ][ ySrc ] = outputTensor

[0000] [ i ][ yP ][ xP ]

[0004] FilteredCrPic[ i ] [ xSrc ] [ ySrc ] = outputTensor

[0000] [ i ] [ yP ] [ xP ]

[0005] }}}

[0297] An NNPF PostProcessingFilter( ) is the target NNPF as derived in the semantics of the NNPFA SEI message. The following example process may be used, with the NNPF PostProcessingFilter( ), to generate, in a patchwise manner, the filtered and / or interpolated picture(s), which contain Y, Cb, and Cr sample arrays FilteredYPic, FilteredCbPic, and FilteredCrPic, respectively, as indicated by nnpfc out order idc:if( nnpfc_inp_order_idc = = 0 || nnpfc_inp_order_idc = = 2 )for( cTop = 0; cTop < CroppedHeight; cTop += inpPatchHeight )for( cLeft = 0; cLeft < CroppedWidth; cLeft += inpPatchWidth ) {inputTensor = DeriveInputTensors( )outputTensor = PostProcessingFilter( inputTensor )StoreOutputTensors( outputTensor )else if( nnpfc_inp_order_idc = = 1 )for( cTop = 0; cTop < CroppedHeight / SubHeightC; cTop += inpPatchHeight )for( cLeft = 0; cLeft < CroppedWidth / SubWidthC; cLeft += inpPatchWidth ) { (98) inputTensor = DeriveInputTensors( )outputTensor = PostProcessingFilter( inputTensor )StoreOutputTensors( outputTensor )}else if( nnpfc_inp_order_idc = = 3 )for( cTop = 0; cTop < CroppedHeight; cTop += inpPatchHeight * 2 )for( cLeft = 0; cLeft < CroppedWidth; cLeft += inpPatchWidth * 2 ) {inputTensor = DeriveInputTensors( )outputTensor = PostProcessingFilter( inputTensor )StoreOutputTensors( outputTensor )}

[0298] An NNPF-generated picture with index i contains sample arrays FilteredYPic[ i ], FilteredCbPic[ i ], and FilteredCrPic[ i ], when present, that are derived by Equation 98. An NNPF-generated picture does not include the overlap regions.

[0299] The NNPF process consists of the process defined by Equation 98 followed by outputting NNPF-generated pictures in their increasing index order, where all NNPF-generated pictures that were interpolated by the NNPF are output and those NNPF-generated pictures that correspond to any input pictures to the NNPF are output as specified in the semantics of the NNPFA SEI message.

[0300] nnpfc_complexity_info_present flag equal to 1 specifies that one or more syntax elements that indicate the complexity of the NNPF associated with the nnpfc id are present. nnpfc_complexity_info_present_flag equal to 0 specifies that no syntax elements that indicates the complexity of the NNPF associated with the nnpfc id are present.

[0301] nnpfc_parameter_type_idc equal to 0 indicates that the neural network uses only integer parameters. nnpfc_parameter_type_idc equal to 1 indicates that the neural network may use floating point or integer parameters. nnpfc_parameter_type_idc equal to 2 indicates that the neural network uses only binary parameters, nnpfc_parameter_type_idc equal to 3 is reserved for future use by ITU-T | ISO / IEC and shall not be present in bitstreams conforming to this version of this Specification. Decoders conforming to this version of this Specification shall ignore NNPFC SEI messages with nnpfc_parameter_type_idc equal to 3.

[0302] nnpfc_log2_parameter_bit_length_minus3 equal to 0, 1, 2, and 3 indicates that the neural network does not use parameters of bit length greater than 8, 16, 32, and 64, respectively. When nnpfc_parameter_type_idc is present and nnpfc_log2_parameter_bit_length_minus3 is not present, the neural network does not use parameters of bit length greater than 1.

[0303] nnpfc_num_parameters_idc indicates the maximum number of neural network parameters for the NNPF in units of a power of 2048. nnpfc_num_parameters_idc equal to 0 indicates that the maximum number of neural network parameters is unknown. The value nnpfc_num_parameters_idc shall be in the range of 0 to 52, inclusive. Values of nnpfc_num_parameters_idc greater than 52 are reserved for future use by ITU-T | ISO / IEC and shall not be present in bitstreams conforming to this version of this Specification. Decoders conforming to this version of this Specification shall ignore NNPFC SEI messages with nnpfc_num_parameters_idc greater than 52.

[0304] If the value of nnpfc_num_parameters_idc is greater than zero, the variable maxNumParameters is derived as follows:maxNumParameters = ( 2048 « nnpfc_num_parameters_idc ) - 1 (99)

[0305] It is a requirement of bitstream conformance that the number of neural network parameters of the NNPF shall be less than or equal to maxNumParameters.

[0306] nnpfc_num_kmac_operations_idc greater than 0 indicates that the maximum number of multiply-accumulate operations per sample of the NNPF is less than or equal to nnpfc_num_kmac_operations_idc * 1000. nnpfc_num_kmac_operations_idc equal to 0 indicates that the maximum number of multiply-accumulate operations of the network is unknown. The value of nnpfc num kmac operations idc shall be in the range of 0 to 232- 2, inclusive.

[0307] nnpfc_total_kilobyte_size greater than 0 indicates a total size in kilobytes required to store the uncompressed parameters for the neural network. The total size in bits is a number equal to or greater than the sum of bits used to store each parameter, nnpfc_total_kilobyte_size is the total size in bits divided by 8000, rounded up. nnpfc_total_kilobyte_size equal to 0 indicates that the total size required to store the parameters for the neural network is unknown. The value of nnpfc_total_kilobyte_size shall be in the range of 0 to 232- 2, inclusive.

[0308] nnpfc num metadata extension bits equal to 0 specifies that nnpfc reserved metadata extension is not present. nnpfc num metadata extension bits greater than 0 specifies the length, in bits, of nnpfc_reserved_metadata_extension.

[0309] The value of nnpfc num metadata extension bits shall be in the range of 0 to 2048, inclusive in this edition of this document when nnpfc_purpose is not equal to 0 and in the range of 1 to 2048 when nnpfc_purpose is equal to 0. Values in the range of 2049 to 4096, inclusive, for nnpfc num metadata extension bits are reserved for future use by ITU-T | ISO / IEC and shall not be present in bitstreams conforming to this version of this Specification. Decoders conforming to this version of this Specification shall allow any value of nnpfc num metadata extension bits in the range of 0 to 4096, inclusive.

[0310] nnpfc_application_purpose_tag_uri_present_flag equal to 1 indicates that the nnpfc_application_purpose_tag_uri syntax element is present in this NNPFC SEI message. nnpfc_application_purpose_tag_uri_present_flag equal to 0 indicates that the nnpfc_application_purpose_tag_uri syntax element is not present in this NNPFC SEI message. When not present nnpfc_application_purpose_tag_uri_present_flag is inferred to be equal to 0.

[0311] nnpfc_application_purpose_tag_uri specifies a tag URI with syntax and semantics as specified in Internet Engineering Task Force (IETF) Request For Comment (RFC) 4151 identifying the application determined purpose of the NNPF, when nnpfc_purpose is equal to 0.

[0312] NOTE 4 - nnpfc_application_purpose_tag_uri enables uniquely identifying the application determined purpose of NNPF without needing a central registration authority.

[0313] nnpfc reserved metadata extension shall not be present in bitstreams conforming to this version of this Specification. However, decoders conforming to this version of this Specification shall ignore the presence and value of nnpfc reserved metadata extension. When present, and when nnpfc_purpose is equal to 0 and nnpfc_application_purpose_tag_uri_present_flag is equal to 1 the length, in bits, of nnpfc_reserved_metadata_extension is equal to nnpfc_num_metadata_extension_bits - Length of (nnpfc_application_purpose_tag_uri) - 1. When present and when nnpfc_purpose is equal to 0 and nnpfc_application_purpose_tag_uri_present_flag is equal to 0 the length, in bits, of nnpfc_reserved_metadata_extension is equal to nnpfc_num_metadata_extension_bits - 1 bits. When present and whennnpfc_purpose is not equal to 0 the length, in bits, of nnpfc reserved metadata extension is equal to nnpfc num metadata extension bits.

[0314] nnpfc_alignment_zero_bit shall be equal to 0.

[0315] nnpfc_payload_byte[ i ] contains the i-th byte of a bitstream conforming to ISO / IEC 15938-17. The byte sequence nnpfc_payload_byte[ i ] for all present values of i shall be a complete bitstream that conforms to ISO / IEC 15938-17.8.28.2 Neural-network post-filter activation SEI message8.28.2.1 Neural-network post-filter activation SEI message syntaxnn_post_filter_activation( payloadSize ) { Descriptornnpfa_target_id ue(v)nnpfa_cancel_flag u(1)if( !nnpfa_cancel_flag ) {nnpfa_persistence_flag u(1) nnpfa_target_base_flag u(1) nnpfa_no_prev_clvs_flag u(1) if( nnpfa_persistence_flag )nnpfa no foll clvs flagnnpfa num output entries ue(v) for( i = 0; i < nnpfa num output entries; i++ )nnpfa_output_flag[ i ] u(1)if( more_data_in_payload( ) ) {nnpfa_prompt_update_flag u(1) if( nnpfa_prompt_update_flag ) {while( !byte_aligned( ) )nnpfa_alignment_zero_bit u(1) nnpfa prompt st(v) }nnpfa num input pic shift ue(v) }}}8.28.2.2 Neural-network post-filter activation SEI message semantics

[0316] The neural-network post-filter activation (NNPFA) SEI message activates or de-activates the possible use of the target neural-network post-processing filter (NNPF), identified by nnpfa target id and nnpfa target base flag,for post-processing filtering of a set of pictures. For a particular picture for which the NNPF is activated, the target NNPF is derived as follows:- If nnpfa target base flag is equal to 1, the target NNPF is the base NNPF with nnpfc id equal to nnpfa target id. - Otherwise (nnpfa target base flag is equal to 0), the target NNPF is the NNPF specified by the last NNPFC SEI message with nnpfc id equal to nnpfa target id that precedes the first VCL NAL unit of the current picture in decoding order and is not a repetition of the NNPFC SEI message that contains the base NNPF.

[0317] NOTE 1 - There can be several NNPFA SEI messages present for the same picture, for example, when the NNPFs are meant for different purposes or for filtering of different colour components.

[0318] nnpfa target id indicates the nnpfc id of the target NNPF, which is specified by one or more NNPFC SEI messages that pertain to the current picture and have nnpfc id equal to nnpfa target id. The value of nnpfa target id shall be in the range of 0 to 232- 2, inclusive.

[0319] An NNPFA SEI message with a particular value of nnpfa target id shall not be present in a current PU unless one or both of the following conditions are true:- Within the current CLVS there is an NNPFC SEI message with nnpfc id equal to the particular value of nnpfa target id present in a PU preceding the current PU in decoding order.- There is an NNPFC SEI message with nnpfc id equal to the particular value of nnpfa target id in die current PU.

[0320] When a PU contains both an NNPFC SEI message with a particular value of nnpfc id and an NNPFA SEI message with nnpfa target id equal to the particular value of nnpfc id, the NNPFC SEI message shall precede the NNPFA SEI message in decoding order.

[0321] nnpfa cancel flag equal to 1 indicates that the persistence of the target NNPF established by any previous NNPFA SEI message with the same nnpfa target id as the current SEI message is cancelled, i.e., the target NNPF is no longer used unless it is activated by another NNPFA SEI message with the same nnpfa target id as the current SEI message and nnpfa cancel flag equal to 0. nnpfa cancel flag equal to 0 indicates that die mipfa_persistence_flag, nnpfa target base flag, nnpfa_no_prev_clvs_flag, nnpfa_no_foll_clvs_flag (when nnpfa_persistence_flag is equal to 1), and nnpfa_num_output_entries follow.

[0322] nnpfa_persistence_flag specifies die persistence of the target NNPF for the current layer.

[0323] nnpfa_persistence_flag equal to 0 specifies that the target NNPF may be used for post-processing filtering for the current picture only.

[0324] nnpfa_persistence_flag equal to 1 specifies that the target NNPF may be used for post-processing filtering for die current picture and all subsequent pictures of the current layer in output order until one or more of the follow ing conditions are true:- A new CLVS of the current layer begins.- The bitstream ends.- A picture in the current layer associated with an NNPFA SEI message widi the same nnpfa target id as the current SEI message is output that follows the current picture in output order.NOTE 2 - The target NNPF is not applied for this subsequent picture in the current layer associated with an NNPFA SEI message with the same nnpfa target id as the current SEI message.

[0325] Let the nnpfcTargetPictures be the set of pictures to which the NNPFC SEI message corresponding to the target NNPF pertains. Let nnpfaTargetPictures be the set of pictures for which the target NNPF is activated by the current NNPFA SEI message. It is a requirement of bitstream conformance that any picture included in nnpfaTargetPictures shall also be included in nnpfcTargetPictures.

[0326] impfa target base flag equal to 1 specifies that the target NNPF is the base NNPF with nnpfc id equal to nnpfa target id. impfa target base flag equal to 0 specifies that the target NNPF is the NNPF specified by the last NNPFC SEI message with nnpfc id equal to nnpfa target id that precedes the first VCL NAL unit of the current picture in decoding order and is not a repetition of the NNPFC SEI message that contains the base NNPF.

[0327] NOTE 3 - An NNPFA message can activate a base NNPF with a particular nnpfc id value when an update of the base NNPF is active, which switches the target NNPF from the updated NNPF to the base NNPF.

[0328] When mipfa target base flag in an NNPFA SEI message is equal to 0, there shall be at least one NNPFC SEI message with nnpfc id equal to nnpfa target id and nnpfc base flag equal to 0 that precedes the NNPFA SEI message in decoding order.

[0329] impfa_no_prev_clvs_flag equal to 1 specifies that the input pictures for the NNPF do not originate from a previous CLVS. nnpfa_no_prev_clvs_flag equal to 0 specifies that the input pictures for the NNPF may or may not originate from a previous CLVS.

[0330] NOTE 4 - The value of nnpfa_no_prev_clvs_flag can be changed from 0 to 1, when the current CLVS is spliced from another bitstream next to the previous CLVS and this NNPFA SEI message would cause one or more input pictures to be selected from one or more previous CLVSs and therefore is likely to impact the output of the target NNPF negatively.

[0331] impfa no foll clvs flag equal to 1 specifies that when this NNPFA SEI message persists for the last PU of a CLVS in output order, the NNPFA SEI message is treated like it persisted for the last PU, in output order, of the current layer within the bitstream. When this NNPFA SEI message does not persist for the last PU, in output order, of a CLVS in output order or nnpfa_no_foll_clvs_flag is equal to 0, the value of nnpfa_no_foll_clvs_flag causes no specific impact.

[0332] NOTE 5 - The value of nnpfa no foll clvs flag can be changed from 0 to 1 for a picture-rate-upsampling NNPF, when the following CLVS is spliced from a different bitstream next to the current CLVS. Consequently, the NNPF process interpolates pictures up to the end of the current CLVS using input pictures originating from the current CLVS only.

[0333] mipfa num output entries specifies the number of nnpfa_output_flag[ i ] syntax elements present in the NNPFA SEI message. The value of mipfa num output entries shall be in the range of 0 to NumlnpPicsInOutpufTensor, inclusive. When PictureRateUpsamplingFlag is equal to 0 and mipfa num output entries is equal to NumlnpPicsInOutpufTensor, nnpfa_output_flag[ i ] shall be equal to 1 for at least one value of i in the range of 0 to nnpfa num output entries - 1. inclusive.

[0334] nnpfa_output_flag[ i ] equal to 1 specifies that the NNPF-generated picture that corresponds to the input picture having index Inpldx[ i ] is output by the NNPF process activated by this NNPFA SEI message, where the NNPF process is specified in the semantics of the NNPFC SEI message. nnpfa_output_flag[ i ] equal to 0 specifies that the NNPF-generated picture that corresponds to the input picture having index Inpldx[ i ] is not output by the NNPF process activated by this NNPFA SEI message. When impfa num output entries is less than NumlnpPicsInOutputTensor, impfa output flagf i ] is inferred to be equal to 1 for each value of i in the range of nnpfa num output entries to NumlnpPicsInOutputTensor - 1, inclusive.

[0335] impfa_prompt_update_flag equal to 1 specifies that nnpfa_prompt syntax element is present and nnpfa alignment zero bit syntax element may be present. nnpfa_prompt_update_flag equal to 0 specifies that nnpfa_prompt syntax element and nnpfa alignment zero bit syntax element are not present. When not present, the value of nnpfa_prompt_update_flag is inferred to be equal to 0.

[0336] When nnpfc_prompt_present_flag is equal to 0, the value of nnpfa_prompt_update_flag, if present, shall be equal to 0.

[0337] nnpfa alignment zero bit shall be equal to 0.

[0338] nnpfa_prompt specifies the text string prompt used as input for the target NNPF. When nnpfa_prompt_update flag is equal to 1, nnpfa_prompt shall not be a null string. When nnpfa_prompt is present, nnpfc_prompt text within the process DeriveInputTensors( ) specified in clause 8.28.2.2 is replaced by nnpfa_prompt text.

[0339] nnpfa_num_input_pic_shift specifies the number of input pictures shift in the list of candidate input pictures to get the final input pictures for the target NNPF. When not present, the value of nnpfa_num_input_pic_shift is inferred to be equal to 0. The value of nnpfa_num_input_pic_shift shall be in the range from 0 to 63, inclusive.

[0340] For the above NNPFC and NNPFA SEI messages, their usages are specified in JVET-AJ2005 [6], as follows.D.12.11 Use of the neural network post-filter characteristics SEI message and the neural network post-filter activation SEI message

[0341] Let currPic be the cropped decoded output picture for which the neural-network post-processing filter (NNPF) defined by the neural-network post-filter characteristics (NNPFC) SEI message is activated by a neural-network post-filter activation (NNPFA) SEI message and currLayerld be the nuh layer id value of currPic.

[0342] It is a requirement of bitstream conformance that when a picture unit contains an NNPFA SEI message, the value of ph_pic_output_flag in the picture header contained in that picture unit shall be equal to 1.

[0343] NOTE - Since only cropped decoded output pictures are used as input pictures of the NNPF, the value of ph_pic_output_flag in the picture header of the coded picture corresponding to each input picture of the NNPF is equal to 1.

[0344] The variable pictureRateUpsamplingFlag is set equal to ( ( nnpfc_purpose & 0x08 ) > 0 )? 1: 0.

[0345] The variable numlnputPics is set equal to impfc_num_input_pics_minusl + 1.

[0346] The variable numinferences is derived as follows:- If all of the following conditions are true, the variable numPostRoll is set equal to the value of i such that rmpfc_interpolated_pics[ i ] is greater than 0 and the variable numinferences is set equal to 1 + numPostRoll: - nnpfc_purpose is equal to 8 (i.e., the only purpose for the NNPF is picture rate upsampling).- nnpfa_persistence_flag is equal to 1.- nnpfc_interpolated_pics[ i ] is greater than 0 only for a single value of i that is greater than 0.- Either of the following conditions is true:- currPic is the last picture of the bitstream in output order that has nuh layer id equal to currLayerld. - currPic is the last picture in the CLVS in output order and nnpfa no foll clvs flag is equal to 1.Otherwise, if all of the following conditions are true, the variable numPostRoll is set equal to Inpldx[ i ] for the value of i such that nnpfa_output_flag[ i ] is equal to 1, and the variable numinferences is set equal to 1 + numPostRoll:- pictureRateUpsamplingFlag is equal to 0.- numlnputPics is greater than 1.- nnpfa_persistence_flag is equal to 1.- nnpfa_output_flag[ idx ] is equal to 1 for a single value of idx in the range of 0 to NumlnpPicsInOutputTensor - 1, inclusive, and for that single value of idx, Inpldx[ idx ] is greater than 0. - Either of the following conditions is true:- currPic is the last picture of the bitstream in output order that has nuh layer id equal to currLayerld. - currPic is the last picture in the CLVS in output order and nnpfa no foll clvs flag is equal to 1.- Otherwise, the variable numlnferences is set equal to 1.

[0347] For each value of j in the range of 0 to numinferences - 1, inclusive, the following applies:The variable numCandlnputPics, which indicates the number of candidate input pictures to the NNPF, is derived as follows:numCandlnputPics = numlnputPics + nnpfa_num_input_pic_shift (xx) The arrays cand!nputPic[ i ] and cand!nputPresentFlag[ i ] for i in the range of 0 to numCandlnputPics - 1, inclusive, representing all the candidate input pictures and the presence of candidate input pictures, respectively, are specified as follows:- When j is greater than 0, for each value of k in the range of 0 to j - 1, inclusive, candInputPic[ k ] is set to be currPic and candInputPresentFlag[ k ] is set equal to 0.- The j-th candidate input picture, cand!nputPic[ j ], is set to be currPic and candInputPresentFlag[ j ] is set equal to 1.- When numCandlnputPics is greater than 1, the following applies for each value of i in the range of j + 1 to numCandlnputPics - 1, inclusive, in increasing order of i:- If both of the following conditions are true, cand!nputPic[ i ] is set to be prevPic and cand!nputPresentFlag[ i ] is set equal to 1:- Either of the following conditions is true:pictureRateUpsamplingFlag is equal to 1 and currPic is associated with a frame packing arrangement SEI message with frame_packing_arrangement_type equal to 5 and a particular value of fp current frame is frameO flag, and there is a cropped decoded output picture prevPic that is the last picture in output order among all cropped decoded output pictures that have nuh layer id equal to currLayerld, precede cand!nputPic[ i - 1 ] in output order, and are associated with a frame packing arrangement SEI message with frame_packing_arrangement_type equal to 5 and the same value of fp_current_frame_is_frame0_flag.- pictureRateUpsamplingFlag is equal to 0 or currPic is not associated with a frame packing arrangement SEI message with frame_packing_arrangement_type equal to 5, and there is a cropped decoded output picture prevPic that is the last picture in output order among all cropped decoded output pictures that have nuh layer id equal to currLayerld and precede candInputPic[ i - 1 ] in output order.nnpfa_no_prev_clvs_flag is equal to 0 or the coded picture corresponding to prevPic and the current picture are present in the same CLVS.- Otherwise, the following applies:- candInputPic[ i ] is set to be the same picture as candInputPic[ i - 1 ] and candInputPresentFlag[ i ] is set equal to 0.It is a requirement of bitstream conformance that, when pictureRateUpsamplingFlag is equal to 1, nnpfc_interpolated_pics[ i - 1 ] shall be equal to 0.- The arrays inputPic[ i ] and inputPresentFlag[ i ] for i in the range of 0 to numlnputPics - 1, inclusive, representing all the input pictures and the presence of input pictures, respectively, are specified as follows:for( i = 0, candldx = nnpfa_num_input_pic_shift; i <= impfc_num_input_pics_minusl; i++, candldx++ ) { inputPic[ i ] = cand!nputPic[ candldx ] (xx) inputPresentFlag[ i ] = candInputPresentFlag[ candldx ] }For each value of i in the range 0 to numlnputPics - 1, inclusive, it is a requirement of bitstream conformance that when inputPresentFlag[ i ] is equal to 0 and nnpfc_input_pic_output_flag[ i ] is equal to 1, the value of nnpfa_output_flag[ idx ] shall be equal to 0 for the value of idx such that Inpldx[ idx ] is equal to i.For purposes of interpretation of the NNPFC SEI message, the following variables are specified:- CroppedWidth is set equal to the value of pps_pic_width_in_luma_samples - SubWidthC * ( pps_conf_win_left_offset + pps_conf_win_right_offset ) for currPic.- CroppedHeight is set equal to the value of pps_pic_height_in_luma_samples - SubHeightC * ( pps_conf_win_top_offset + pps_conf_win_bottom_offset ) for currPic.- The luma sample arrays CroppedYPic[ i ] and the chroma sample arrays CroppedCbPic[ i ] and CroppedCrPic[ i ], when present, are derived as follows for each value of i in the range of 0 to numlnputPics - 1, inclusive:- The variable sourcePic is derived as follows:- If inputPresentFlag[ i ] is equal to 1 or nnpfc_absent_input_pic_zero_flag is equal to 0, sourcePic is set to be inputPic[ i ].- Otherwise(inputPresentFlag[ i ] is equal to 0 and nnpfc_absent_input_pic_zero_flag is equal to 1), sourcePic is set to be a picture with a luma sample array of CroppedWidth x CroppedHeight samples equal to 0 and Cb and Cr sample arrays of ( CroppedWidth / SubWidthC ) × ( CroppedHeight / SubHeightC ) samples equal to 0.- The luma sample array CroppedYPic[ i ] and the chroma sample arrays CroppedCbPic[ i ] and CroppedCrPic[ i ], when present, are set to be the 2-dimensional arrays of decoded sample values of the Y, Cb and Cr components, respectively, of sourcePic.- BitDepthy and BitDepthc are both set equal to BitDepth.- ChromaFormatldc is set equal to sps chroma format idc.- The array StrengthControlVal[ i ] for all values of i in the range of 0 to numlnputPics - 1, inclusive, specifying the filtering strength control value for the input pictures for the NNPF, is derived as follows:- StrengthControlVal[ i ] is set equal to the value of ( firstSliceQpy + QpBdOffset ) ( 63 + QpBdOffset ), where firstSliceQpy is equal to SliceQpy of the first slice of inputPic[ i ].

[0348] There shall not be more than two NNPFC SEI messages present in a picture unit with the same value of impfe id. When there are two NNPFC SEI messages present in a picture unit with the same value of nnpfe id, these SEI messages shall have different content. When two NNPFC SEI messages with the same nnpfe id and different content are present in the same picture unit, both of these NNPFC SEI messages shall be in the same SEI NAL unit.4. Technical problems solved by disclosed technical solutions

[0349] An example design for the neural -network post-filters have the following problems:

[0350] First, the filtering strength control value for an NNPF, i.e. StrengthControlVal[ i ], is determined by the initial value of the QpY quantization parameter for the first slice of the input picture. When there are multiple slices, the filtering strength control value may not be suitable. There is no way to adjust the value currently.

[0351] Second, when a rate control system is applied to change the quantization parameters, the filtering strength control value may not be suitable. There is no way to adjust the filtering strength control value in the current design.5. A listing of solutions and embodiments

[0352] To solve the above-described problems, methods as summarized below are disclosed. The aspects should be considered as examples to explain the general concepts and should not be interpreted in a narrow way. Furthermore, these examples can be applied individually or combined in any manner.1) To solve problem 1, the filtering strength control value may be related to other slices than the first slice.a. In one example, the filtering strength control value may be derived from the average value of the initial values of the QPY quantization parameter for all slices in an input picture.b. In one example, the filtering strength control value may be derived from the middian of the initial values of the Qpy quantization parameter for all slices in an input picture.2) To solve problem 2, and also problem 1, one or more syntax elements may be signalled to adjust the filtering strength control value.a. In one example, a filtering strength control value may be indicated in NNPFC and / or NNPFA SEI messages to overwrite the current value.i. Alternatively, in one example, a list of filtering strength control values may be indicated in NNPFC and / or NNPFA SEI messages, each of the list of filtering strength control values may be used to overwrite the current value of an input picture.b. In one example, the difference value from the current filtering strength control value may be indicated in NNPFC and / or NNPFA SEI messages.i. In one example, the filtering strength control value applied is set equal to be the sum of the current value and the difference value, clipped to a valid range.ii. Alternatively, in one example, a list of difference values may be indicated in NNPFC and / or NNPFA SEI messages, each of the list of difference values may be used to derive the applied value of an input picture.c. In one example, the value is coded in se(v).i. Alternatively, in one example, the value is coded in ae(v).ii. Alternatively, in one example, the value is coded in ue(v).iii. Alternatively, in one example, the value is coded with a sign coded in ae(v) or u(l) and an absolute number coded in ue(v).3) To solve problem 2, and also problem 1, in one example, when a filtering strength control value is indicated in an NNPFA SEI message, it is applied to the current picture where the NNPFA SEI message is activated. a. In one example, the value is associated with a picture. When the picture is used in an NNPF, no matter whether it is the current picture or not. the same value applies.i. Alternatively, the value applied to all input pictures when processing the current picture with an NNPF.b. In one example, when a filtering strength control value is indicated in an NNPFA SEI message, it is only applied to the current picture where the NNPFA SEI message is activated.6. Embodiments

[0353] Below are some example embodiments for the aspects summarized in section 5. Most relevant parts that have been added or modified are enclosed in {{}}. and some of the deleted parts are are enclosed in brackets [[[ ]]]. There may be some other changes that are editorial in nature and thus not highlighted.6.1 Embodiment 1

[0354] This embodiment covers the aspects for items 2, 2.b, 2.b.i, 2.c, 3, 3.a.i.8.28.2.1 Neural-network post-filter activation SEI message syntaxnn_post_filter_activation( payloadSize ) { Descriptor impfa target id ue(v) nnpfa cancel flag u(l) if(!nnpfa_cancel_flag ) {nnpfa_persistence flag u(l) nnpfa_target_base_flag u(1) rmpfa_no_prev_clvs_flag u(l) if( nnpfa_persistence_flag )rmpfa no foll clvs flagnnpfa num output entries ue(v) for( i = 0; i < nnpfa num output entries; i++ )rmpfa_output_flag[ i ] u(l) if( morc data in jiayloadl ) ) {rmpfa_prompt_update_flag u(l) if( nnpfa_prompt_update_flag ) {while(!byte_aligned( ) )impfa alignmcnt zcro bit u(l) mipfa_prompt st(v) }rmpfa_num_input_pic_shift ue(v) { {nnpfa delta strength control val} } {{se(v)}} }}}8.28.2.2 Neural-network post-filter activation SEI message semantics

[0355] { {nnpfa delta strength control val specifies the difference value of the filtering strength control value applied to the current picture. The value of nnpfa delta strength control val is in the range of -( 63 + QpBdOffset ) to ( 63 + QpBdOffset ), inclusive. When not present, die value of nnpfa delta strength control val is inferred to be equal to 0. } }D.12.11 Use of the neural network post-filter characteristics SEI message and the neural network post-filter activation SEI message- The array StrengthControlVal[ i ] for all values of i in the range of 0 to numlnputPics - 1, inclusive, specifying the filtering strength control value for the input pictures for the NNPF, is derived as follows:- StrengthControlVal[ i ] is set equal to the value of { {Clip3( 0, 63 + QpBdOffset,}} ( firstSliceQpy {{+ nnpfa delta strength control val}} + QpBdOffset ) {{)}} ^ ( 63 + QpBdOffset ), where firstSliceQpy is equal to SliceQpy of the first slice of inputPic[ i ].6.2 Embodiment 2

[0356] This embodiment covers the aspects for items 2, 2.b, 2.b.i, 2.c, 3, 3. a.8.28.2.1 Neural-network post-filter activation SEI message syntaxnn_post_filter_activation( payloadSize ) { Descriptor nnpfa target id ue(v) nnpfa cancel flag u(l) if(!nnpfa_cancel_flag ) {nnpfa_persistence_flag u(l) mipfa target base flag u(l) nnpfa_no_prev_clvs_flag u(1) if( nnpfa_persistence_flag )nnpfa no foll clvs flagnnpfa num output entries ue(v) for( i = 0; i < nnpfa num output entries; i++ )rmpfa_output_flag[ i ] u(l) if( more_data_in_payload( ) ) {rmpfa_prompt_update flag u(l) if( nnpfa_prompt_update_flag ) {while(!byte_aligned( ) )nnpfa_alignment_zero_bit u(1) nnpfa_prompt st(v) }rmpfa_num_input_pic_shift ue(v) { {nnpfa delta strength control val} } {{se(v) }} }}}8.28.2.2 Neural-network post-filter activation SEI message semantics

[0357] {{nnpfa delta strength control val specifies the difference value of the filtering strength control value applied to the current picture. The value of nnpfa delta strength control val is in the range of -( 63 + QpBdOffset ) to ( 63 + QpBdOffset ), inclusive. When not present, tire value of nnpfa delta strength control val is inferred to be equal to 0. } }D.12.11 Use of the neural network post-filter characteristics SEI message and the neural network post-filter activation SEI message

[0358] Let currPic be the cropped decoded output picture for which the neural-network post-processing filter (NNPF) defined by the neural-network post-filter characteristics (NNPFC) SEI message is activated by a neural-network post-filter activation (NNPFA) SEI message and currLayerld be the nuh layer id value of currPic.

[0359] It is a requirement of bitstream conformance that when a picture unit contains an NNPFA SEI message, the value of ph_pic_output_flag in the picture header contained in that picture unit shall be equal to 1.

[0360] NOTE - Since only cropped decoded output pictures are used as input pictures of the NNPF, the value of ph_pic_output_flag in the picture header of the coded picture corresponding to each input picture of the NNPF is equal to 1.

[0361] The variable pictureRateUpsamplingFlag is set equal to ( ( nnpfc_purpose & 0x08 ) > 0 )? 1: 0.

[0362] The variable numlnputPics is set equal to nnpfc_num_input_pics_minusl + 1.

[0363] { {The variable deltaStrengthControlVal of currPic is set equal to nnpfa delta strength control val. } }

[0364] The variable numlnferences is derived as follows:- The array StrengthControlVal[ i ] for all values of i in the range of 0 to numlnputPics - 1, inclusive, specifying the filtering strength control value for the input pictures for the NNPF, is derived as follows:- StrengthControlVal[ i ] is set equal to the value of {{Clip3( 0, 63 + QpBdOffset, }} ( firstSliceQpy {{+ deltaScv }}+ QpBdOffset ) {{) }} ( 63 + QpBdOffset ), where firstSliceQpy is equal to SliceQpy of the first slice of inputPic[ i ] and {{deltaScv is equal to deltaStrengthControlVal of inputPic[ i ] }}.7. References[1] ITU-T and ISO / IEC, “High efficiency video coding,” Rec. ITU-T H.265 | ISO / IEC 23008-2 (in force edition).[2] J. Chen, E. Alshina, G. J. Sullivan, J.-R. Ohm, J. Boyce, “Algorithm description of Joint Exploration Test Model 7 (JEM7),” JVET-G1001, Aug. 2017.[3] Rec. ITU-T H.266 | ISO / IEC 23090-3, “Versatile Video Coding,” 2022.[4] Rec. ITU-T Rec. H.274 | ISO / IEC 23002-7, “Versatile Supplemental Enhancement Information Messages for Coded Video Bitstreams,” 2022.[5] J. Boyce, J. Chen, S. Deshpande, M. M. Haimuksela, S. McCarthy, G. J. Sullivan, H. Tan and Y.-K. Wang (editors), “Additional SEI messages for VSEI version 4 (Draft 4),” JVET output document JVET-AJ2006, publicly available online herein: https: / / jvet-experts.org / doc_end_user / documents / 36_Kemer / wg11 / JVET-AJ2006-v3.zip[6] G. J. Sullivan, B. Brass, M. M. Hannuksela and Y.-K. Wang(editors), “Additions and corrections for WC version 4 (Draft 10),” JVET output document JVET-AJ2006, publicly available online herein: https: / / jvet- experts.org / doc_end_user / documents / 36_Kemer / wg 11 / JVET -AJ2005-v3.zip

[0365] FIG. 2 is a block diagram showing an example video processing system 4000 in which various techniques disclosed herein may be implemented. Various implementations may include some or all of the components of the system 4000. The sy stem 4000 may include input 4002 for receiving video content. The video content may be received in a raw or uncompressed format, e.g., 8 or 10 bit multi-component pixel values, or may be in a compressed or encoded format. The input 4002 may represent a network interface, a peripheral bus interface, or a storage interface. Examples of network interface include wired interfaces such as Ethernet, passive optical network (PON), etc. and wireless interfaces such as Wi-Fi or cellular interfaces.

[0366] The system 4000 may include a coding component 4004 that may implement the various coding or encoding methods described in the present document. The coding component 4004 may reduce the average bitrate of video from the input 4002 to the output of the coding component 4004 to produce a coded representation of the video. The coding techniques are therefore sometimes called video compression or video transcoding techniques. The output of the coding component 4004 may be either stored, or transmitted via a communication connected, as represented by the component 4006. The stored or communicated bitstream (or coded) representation of the video received at the input 4002 may be used by a component 4008 for generating pixel values or displayable video that is sent to a display interface 4010. The process of generating user-viewable video from the bitstream representation is sometimes called video decompression. Furthermore, while certain video processing operations are referred to as “coding” operations or tools, it will be appreciated that the coding tools or operations are used at an encoder and corresponding decoding tools or operations that reverse the results of the coding will be performed by a decoder.

[0367] Examples of a peripheral bus interface or a display interface may include universal serial bus (USB) or high definition multimedia interface (HDMI) or Displayport, and so on. Examples of storage interfaces include serial advanced technology attachment (SATA), peripheral component interconnect (PCI), integrated drive electronics (IDE) interface, and the like. The techniques described in the present document may be embodied in various electronic devices such as mobile phones, laptops, smartphones or other devices that are capable of performing digital data processing and / or video display.

[0368] FIG. 3 is a block diagram of an example video processing apparatus 4100. The apparatus 4100 may be used to implement one or more of the methods described herein. The apparatus 4100 may be embodied in a smartphone, tablet, computer, Internet of Things (loT) receiver, and so on. The apparatus 4100 may include one or more processors 4102, one or more memories 4104 and video processing circuitry 4106. The processor(s) 4102 may be configured to implement one or more methods described in the present document. The memory (memories) 4104 may be used for storing data and code used for implementing the methods and techniques described herein. The video processing circuitry 4106 may be used to implement, in hardware circuitry, some techniques described in the present document. In some embodiments, the video processing circuitry 4106 may be at least partly included in the processor 4102, e.g., a graphics co-processor.

[0369] FIG. 4 is a flowchart for an example method 4200 of video processing. The method 4200 determines a filtering strength control value for a neural -network post-processing filter (NNPF) is related to a slice other than a first slice at step 4202. A conversion is performed between a visual media data and a bitstream based on the filtering strength control value at step 4204. The conversion may include encoding at an encoder, decoding at a decoder, or combinations thereof.

[0370] It should be noted that the method 4200 can be implemented in an apparatus for processing video data comprising a processor and a non-transitory memory with instructions thereon, such as video encoder 4400, video decoder 4500, and / or encoder 4600. In such a case, the instructions upon execution by the processor, cause the processor to perform the method 4200. Further, the method 4200 can be performed by a non-transitory computer readable medium comprising a computer program product for use by a video coding device. The computer program product comprises computer executable instructions stored on the non-transitory computer readable medium such that when executed by a processor cause the video coding device to perform the method 4200.

[0371] FIG. 5 is a block diagram that illustrates an example video coding system 4300 that may utilize the techniques of this disclosure. The video coding system 4300 may include a source device 4310 and a destination device 4320. Source device 4310 generates encoded video data which may be referred to as a video encoding device. Destination device 4320 may decode the encoded video data generated by source device 4310 which may be referred to as a video decoding device.

[0372] Source device 4310 may include a video source 4312. a video encoder 4314. and an input / output (I / O) interface 4316. Video source 4312 may include a source such as a video capture device, an interface to receive video data from a video content provider, and / or a computer graphics system for generating video data, or a combination of such sources. The video data may comprise one or more pictures. Video encoder 4314 encodes the video data from video source 4312 to generate a bitstream. The bitstream may include a sequence of bits that form a coded representation of the video data. The bitstream may include coded pictures and associated data. The coded picture is a coded representation of a picture. The associated data may include sequence parameter sets, picture parameter sets, and other syntax structures. I / O interface 4316 may include a modulator / demodulator (modem) and / or a transmitter. The encoded video data may be transmitted directly to destination device 4320 via I / O interface 4316 through network 4330. The encoded video data may also be stored onto a storage medium / server 4340 for access by destination device 4320.

[0373] Destination device 4320 may include an I / O interface 4326, a video decoder 4324, and a display device 4322. I / O interface 4326 may include a receiver and / or a modem. I / O interface 4326 may acquire encoded video data from the source device 4310 or the storage medium / server 4340. Video decoder 4324 may decode the encoded video data. Display device 4322 may display the decoded video data to a user. Display device 4322 may be integrated with the destination device 4320, or may be external to destination device 4320, which can be configured to interface with an external display device.

[0374] Video encoder 4314 and video decoder 4324 may operate according to a video compression standard, such as the High Efficiency Video Coding (HEVC) standard, Versatile Video Coding (WC) standard and other current and / or further standards.

[0375] FIG. 6 is a block diagram illustrating an example of video encoder 4400, which may be video encoder 4314 in the system 4300 illustrated in FIG. 5. Video encoder 4400 may be configured to perform any or all of the techniques of this disclosure. The video encoder 4400 includes a plurality of functional components. The techniques described in this disclosure may be shared among the various components of video encoder 4400. In some examples, a processor may be configured to perform any or all of the techniques described in this disclosure.

[0376] The functional components of video encoder 4400 may include a partition unit 4401. a prediction unit 4402 which may include a mode select unit 4403, a motion estimation unit 4404, a motion compensation unit 4405, an intra prediction unit 4406. a residual generation unit 4407, a transform processing unit 4408, a quantization unit 4409, an inverse quantization unit 4410. an inverse transform unit 4411, a reconstruction unit 4412, a buffer 4413, and an entropy encoding unit 4414.

[0377] In other examples, video encoder 4400 may include more, fewer, or different functional components. In an example, prediction unit 4402 may include an intra block copy (IBC) unit. The IBC unit may perform prediction in an IBC mode in which at least one reference picture is a picture where the current video block is located.

[0378] Furthermore, some components, such as motion estimation unit 4404 and motion compensation unit 4405 may be highly integrated, but are represented in the example of video encoder 4400 separately for purposes of explanation.

[0379] Partition unit 4401 may partition a picture into one or more video blocks. Video encoder 4400 and video decoder 4500 may support various video block sizes.

[0380] Mode select unit 4403 may select one of the coding modes, intra or inter, e.g., based on error results, and provide the resulting intra or inter coded block to a residual generation unit 4407 to generate residual block data and to a reconstruction unit 4412 to reconstruct the encoded block for use as a reference picture. In some examples, mode select unit 4403 may select a combination of intra and inter prediction (CIIP) mode in which the prediction is based on an inter prediction signal and an intra prediction signal. Mode select unit 4403 may also select a resolution for a motion vector (e g., a sub-pixel or integer pixel precision) for the block in the case of inter prediction.

[0381] To perform inter prediction on a current video block, motion estimation unit 4404 may generate motion information for the current video block by comparing one or more reference frames from buffer 4413 to the current video block. Motion compensation unit 4405 may determine a predicted video block for the current video block based on the motion information and decoded samples of pictures from buffer 4413 other than the picture associated with the current video block.

[0382] Motion estimation unit 4404 and motion compensation unit 4405 may perform different operations for a current video block, for example, depending on whether the current video block is in an I slice, a P slice, or a B slice.

[0383] In some examples, motion estimation unit 4404 may perform uni-directional prediction for the current video block, and motion estimation unit 4404 may search reference pictures of list 0 or list 1 for a reference video block for the current video block. Motion estimation unit 4404 may then generate a reference index that indicates the reference picture in list 0 or list 1 that contains the reference video block and a motion vector that indicates a spatial displacement between the current video block and the reference video block. Motion estimation unit 4404 may output the referenceindex, a prediction direction indicator, and the motion vector as the motion information of the current video block. Motion compensation unit 4405 may generate the predicted video block of the current block based on the reference video block indicated by the motion information of the current video block.

[0384] In other examples, motion estimation unit 4404 may perform bi-directional prediction for the current video block, motion estimation unit 4404 may search the reference pictures in list 0 for a reference video block for the current video block and may also search the reference pictures in list 1 for another reference video block for the current video block. Motion estimation unit 4404 may then generate reference indexes that indicate the reference pictures in list 0 and list 1 containing the reference video blocks and motion vectors that indicate spatial displacements between the reference video blocks and the current video block. Motion estimation unit 4404 may output the reference indexes and the motion vectors of the current video block as the motion information of the current video block. Motion compensation unit 4405 may generate the predicted video block of the current video block based on the reference video blocks indicated by the motion information of the current video block.

[0385] In some examples, motion estimation unit 4404 may output a full set of motion information for decoding processing of a decoder. In some examples, motion estimation unit 4404 may not output a full set of motion information for the current video. Rather, motion estimation unit 4404 may signal the motion information of the current video block with reference to the motion information of another video block. For example, motion estimation unit 4404 may determine that the motion information of the current video block is sufficiently similar to the motion information of a neighboring video block.

[0386] In one example, motion estimation unit 4404 may indicate, in a syntax structure associated with the current video block, a value that indicates to the video decoder 4500 that the current video block has the same motion information as another video block.

[0387] In another example, motion estimation unit 4404 may identify, in a syntax structure associated with the current video block, another video block and a motion vector difference (MVD). The motion vector difference indicates a difference betw een the motion vector of the current video block and the motion vector of the indicated video block. The video decoder 4500 may use the motion vector of the indicated video block and the motion vector difference to determine the motion vector of the current video block.

[0388] As discussed above, video encoder 4400 may predictively signal tire motion vector. Two examples of predictive signaling techniques that may be implemented by video encoder 4400 include advanced motion vector prediction (AMVP) and merge mode signaling.

[0389] Intra prediction unit 4406 may perform intra prediction on the current video block. When intra prediction unit 4406 performs intra prediction on the current video block, intra prediction unit 4406 may generate prediction data for the current video block based on decoded samples of other video blocks in the same picture. The prediction data for the current video block may include a predicted video block and various syntax elements.

[0390] Residual generation unit 4407 may generate residual data for the current video block by subtracting the predicted video block(s) of the current video block from the current video block. The residual data of the current videoblock may include residual video blocks that correspond to different sample components of the samples in the current video block.

[0391] In other examples, there may be no residual data for the current video block for the current video block, for example in a skip mode, and residual generation unit 4407 may not perform the subtracting operation.

[0392] Transform processing unit 4408 may generate one or more transform coefficient video blocks for the current video block by applying one or more transforms to a residual video block associated with the current video block.

[0393] After transform processing unit 4408 generates a transform coefficient video block associated with the current video block, quantization unit 4409 may quantize the transform coefficient video block associated with the current video block based on one or more quantization parameter (QP) values associated with the current video block.

[0394] Inverse quantization unit 4410 and inverse transform unit 4411 may apply inverse quantization and inverse transforms to the transform coefficient video block, respectively, to reconstruct a residual video block from the transform coefficient video block. Reconstruction unit 4412 may add the reconstructed residual video block to corresponding samples from one or more predicted video blocks generated by the prediction unit 4402 to produce a reconstructed video block associated with the current block for storage in the buffer 4413.

[0395] After reconstruction unit 4412 reconstructs the video block, the loop filtering operation may be performed to reduce video blocking artifacts in the video block.

[0396] Entropy encoding unit 4414 may receive data from other functional components of the video encoder 4400. When entropy encoding unit 4414 receives the data, entropy encoding unit 4414 may perform one or more entropy encoding operations to generate entropy encoded data and output a bitstream that includes the entropy encoded data.

[0397] FIG. 7 is a block diagram illustrating an example of video decoder 4500 which may be video decoder 4324 in the system 4300 illustrated in FIG. 5. The video decoder 4500 may be configured to perform any or all of the techniques of this disclosure. In the example shown, the video decoder 4500 includes a plurality of functional components. The techniques described in this disclosure may be shared among the various components of the video decoder 4500. In some examples, a processor may be configured to perform any or all of the techniques described in this disclosure.

[0398] In the example shown, video decoder 4500 includes an entropy decoding unit 4501, a motion compensation unit 4502, an intra prediction unit 4503, an inverse quantization unit 4504, an inverse transformation unit 4505, a reconstruction unit 4506, and a buffer 4507. Video decoder 4500 may, in some examples, perform a decoding pass generally reciprocal to the encoding pass described with respect to video encoder 4400.

[0399] Entropy decoding unit 4501 may retrieve an encoded bitstream. The encoded bitstream may include entropy coded video data (e.g., encoded blocks of video data). Entropy decoding unit 4501 may decode the entropy coded video data, and from the entropy decoded video data, motion compensation unit 4502 may determine motion information including motion vectors, motion vector precision, reference picture list indexes, and other motion information. Motion compensation unit 4502 may, for example, determine such information by performing the AMVP and merge mode.

[0400] Motion compensation unit 4502 may produce motion compensated blocks, possibly performing interpolation based on interpolation filters. Identifiers for interpolation filters to be used with sub-pixel precision may be included in the syntax elements.

[0401] Motion compensation unit 4502 may use interpolation filters as used by video encoder 4400 during encoding of the video block to calculate interpolated values for sub-integer pixels of a reference block. Motion compensation unit 4502 may determine the interpolation filters used by video encoder 4400 according to received syntax information and use the interpolation filters to produce predictive blocks.

[0402] Motion compensation unit 4502 may use some of the syntax information to determine sizes of blocks used to encode frame(s) and / or slice(s) of the encoded video sequence, partition information that describes how each macroblock of a picture of the encoded video sequence is partitioned, modes indicating how each partition is encoded, one or more reference frames (and reference frame lists) for each inter coded block, and other information to decode the encoded video sequence.

[0403] Intra prediction unit 4503 may’ use intra prediction modes for example received in the bitstream to form a prediction block from spatially adjacent blocks. Inverse quantization unit 4504 inverse quantizes, i.e., de-quantizes, the quantized video block coefficients provided in the bitstream and decoded by entropy decoding unit 4501. Inverse transform unit 4505 applies an inverse transform.

[0404] Reconstruction unit 4506 may sum the residual blocks with the corresponding prediction blocks generated by motion compensation unit 4502 or intra prediction unit 4503 to form decoded blocks. If desired, a deblocking filter may also be applied to filter the decoded blocks in order to remove blockiness artifacts. The decoded video blocks are then stored in buffer 4507, which provides reference blocks for subsequent motion compensation / intra prediction and also produces decoded video for presentation on a display device.

[0405] FIG. 8 is a schematic diagram of an example encoder 4600. The encoder 4600 is suitable for implementing the techniques of WC. The encoder 4600 includes three in-loop filters, namely a deblocking filter (DF) 4602, a sample adaptive offset (SAO) 4604, and an adaptive loop filter (ALF) 4606. Unlike the DF 4602, which uses predefined filters, the SAO 4604 and the ALF 4606 utilize the original samples of the current picture to reduce the mean square errors between the original samples and the reconstructed samples by adding an offset and by applying a finite impulse response (FIR) filter, respectively, with coded side information signaling the offsets and filter coefficients. The ALF 4606 is located at the last processing stage of each picture and can be regarded as a tool trying to catch and fix artifacts created by the previous stages.

[0406] The encoder 4600 further includes an intra prediction component 4608 and a motion estimation / compensation (ME / MC) component 4610 configured to receive input video. The intra prediction component 4608 is configured to perform intra prediction, while the ME / MC component 4610 is configured to utilize reference pictures obtained from a reference picture buffer 4612 to perform inter prediction. Residual blocks from inter prediction or intra prediction arc fed into a transform (T) component 4614 and a quantization (Q) component 4616 to generate quantized residual transform coefficients, which are fed into an entropy coding component 4618. The entropy coding component 4618 entropy codes the prediction results and the quantized transform coefficients and transmits the sametoward a video decoder (not shown). Quantization components output from the quantization component 4616 may be fed into an inverse quantization (IQ) components 4620, an inverse transform component 4622, and a reconstruction (REC) component 4624. The REC component 4624 is able to output images to the DF 4602, the SAO 4604, and the ALF 4606 for filtering prior to those images being stored in the reference picture buffer 4612.

[0407] A listing of solutions preferred by some examples is provided next.

[0408] The following solutions show examples of techniques discussed herein.

[0409] 1. A method for processing media data comprising: determining a filtering strength control value for a neural-network post-processing filter (NNPF) is related to a slice other than a first slice; and performing a conversion between a visual media data and a bitstream based on the filtering strength control value.

[0410] 2. The method of solution 1, wherein the filtering strength control value is derived from an average value of initial values of luma quantization parameters (QpY) quantization parameters for all slices in an input picture.

[0411] 3. The method of any of solutions 1-2, wherein the filtering strength control value is derived from a median value of initial values of QpY quantization parameters for all slices in an input picture.

[0412] 4. The method of any of solutions 1-3. wherein one or more syntax elements are signalled to adjust the filtering strength control value.

[0413] 5. The method of any of solutions 1 -4, wherein the filtering strength control value is indicated in a neural-network post-filter characteristics (NNPFC) supplemental enhancement information (SEI) message, a neural-network post-filter activation (NNPF A) SEI message, or combinations thereof, to overwrite a current value.

[0414] 6. The method of any of solutions 1-5, wherein a list of filtering strength control values are indicated in a NNPFC SEI message, a NNPFA SEI message, or combinations thereof, and wherein each of the list of filtering strength control values are used to overwrite a current value of an input picture.

[0415] 7. The method of any of solutions 1 -6, wherein a difference value from a current filtering strength control value is indicated in a NNPFC SEI message, a NNPFA SEI message, or combinations thereof.

[0416] 8. The method of any of solutions 1-7, wherein the filtering strength control value applied is set equal to a sum of a current value and a difference value as clipped to a valid range.

[0417] 9. The method of any of solutions 1-8, wherein a list of difference values is indicated in a NNPFC SEI message, a NNPFA SEI message, or combinations thereof, and wherein each of the list of difference values are used to derive an applied value of an input picture.

[0418] 10. The method of any of solutions 1-9. wherein the filtering strength control values are coded in signed integer with Exponetial-Golomb coding and variable size (se(v)), context-adaptive arithmetic entropy-coding and variable size (ae(v)), unsigned integer with Exponetial-Golomb coding and variable size (ue(v)), a sign coded in ae(v) and an absolute number coded in ue(v), or a sign coded in unsigned one bit integer (u(l )) and an absolute number coded in ue(v).

[0419] 11. The method of any of solutions 1-10, wherein when a filtering strength control value is indicated in an NNPFA SEI message, the filtering strength control value is applied to a current picture where die NNPFA SEI message is activated.

[0420] 12. The method of any of solutions 1-11, wherein a filtering strength control value is associated with a picture, and wherein when the picture is used in an NNPF the same value applies no matter whether the picture is the current picture or not.

[0421] 13. The method of any of solutions 1-12, wherein the filtering strength control value is applied to all input pictures when processing a current picture with an NNPF.

[0422] 14. The method of any of solutions 1-13, wherein when a filtering strength control value is indicated in an NNPFA SEI message, the filtering strength control value is only applied to the current picture where the NNPFA SEI message is activated.

[0423] 15. The method of any of solutions 1-14, wherein the conversion includes encoding the visual media data into the bitstream.

[0424] 16. The method of any of solutions 1-14, wherein the conversion includes decoding the visual media data from the bitstream.

[0425] 17. An apparatus for processing video data comprising: a processor; and a non-transitory memory with instructions thereon, wherein the instructions upon execution by the processor, cause the processor to perform the method of any of solutions 1-16.

[0426] 18. A non-transitory computer readable medium comprising a computer program product for use by a video coding device, the computer program product comprising computer executable instructions stored on the non-transitory computer readable medium such that when executed by a processor cause the video coding device to perform the method of any of solutions 1-16.

[0427] 19. A non-transitory computer-readable recording medium storing a bitstream of a video which is generated by a method performed by a video processing apparatus, wherein the method comprises: determining a filtering strength control value for a neural -network post-processing filter (NNPF) is related to a slice other than a first slice; and generating a bitstream based on the determining.

[0428] 20. A method for storing bitstream of a video comprising: determining one or more syntax elements signalled to specify a related value of the bit length of a constituent rectangle identifier (ID), an associated rectangle ID, or a group ID; generating a bitstream based on the determining; and storing the bitstream in a non-transitory computer-readable recording medium.

[0429] 21. A method, apparatus, or system described in the present document.

[0430] The following solutions show further examples of techniques discussed herein.

[0431] 1. A method for processing media data comprising: determining a filtering strength control value for a neural-network post-processing filter (NNPF) is related to a slice other than a first slice; and performing a conversion between a visual media data and a bitstream based on the filtering strength control value.

[0432] 2. The method of solution 1, wherein the filtering strength control value is derived from an average value of initial values of luma quantization parameters (QpY) for all slices in an input picture.

[0433] 3. The method of any of solutions 1-2, wherein the filtering strength control value is derived from a median value of initial values of QpY for all slices in an input picture.

[0434] 4. The method of any of solutions 1-3, wherein one or more syntax elements are signalled to adjust the filtering strength control value.

[0435] 5. The method of any of solutions 1 -4, wherein the filtering strength control value is indicated in a neural-network post-filter characteristics (NNPFC) supplemental enhancement information (SEI) message, a neural-network post-filter activation (NNPFA) SEI message, or combinations thereof, and wherein the filtering strength control value is indicated to overwrite a current value.

[0436] 6. The method of any of solutions 1-5, wherein a list of filtering strength control values is indicated in a NNPFC SEI message, a NNPFA SEI message, or combinations thereof, and wherein each of the list of filtering strength control values are used to overwrite a current value of an input picture.

[0437] 7. The method of any of solutions 1 -6, wherein a difference value from a current filtering strength control value is indicated in a NNPFC SEI message, a NNPFA SEI message, or combinations thereof.

[0438] 8. The method of any of solutions 1-7, wherein an applied filtering strength control value is set equal to a sum of a current value and a difference value and is clipped to a valid range.

[0439] 9. The method of any of solutions 1-8, wherein a list of difference values is indicated in a NNPFC SEI message, a NNPFA SEI message, or combinations thereof, and wherein each of the list of difference values are used to derive an applied value of an input picture.

[0440] 10. The method of any of solutions 1-9. wherein the filtering strength control values are coded in signed integer with Exponetial-Golomb coding and variable size (se(v)), context-adaptive arithmetic entropy-coding and variable size (ae(v)), unsigned integer with Exponetial-Golomb coding and variable size (ue(v)), a sign coded in ae(v) and an absolute number coded in ue(v), or a sign coded in unsigned one bit integer (u(l )) and an absolute number coded in ue(v).

[0441] 11. The method of any of solutions 1-10, wherein when the filtering strength control value is indicated in an NNPFA SEI message, the filtering strength control value is applied to a current picture upon w hich the NNPFA SEI message is activated.

[0442] 12. The method of any of solutions 1-11, wherein the filtering strength control value is associated with a picture, and wherein when the picture is used in an NNPF a same value applies no matter whether the picture is the current picture.

[0443] 13. The method of any of solutions 1-12, wherein the filtering strength control value is applied to all input pictures when processing a current picture with an NNPF.

[0444] 14. The method of any of solutions 1-13, wherein when the filtering strength control value is indicated in an NNPFA SEI message, the filtering strength control value is only applied to a current picture upon which the NNPFA SEI message is activated.

[0445] 15. The method of any of solutions 1-14, wherein the conversion includes encoding the visual media data into the bitstream.

[0446] 16. The method of any of solutions 1-14, wherein the conversion includes decoding the visual media data from the bitstream.

[0447] 17. An apparatus for processing video data comprising: a processor; and a non-transitory memory with instructions thereon, wherein the instructions upon execution by the processor, cause the processor to perform the method of any of solutions 1-16.

[0448] 18. A non -transitory computer readable medium comprising a computer program product for use by a video coding device, the computer program product comprising computer executable instructions stored on the non-transitory computer readable medium such that when executed by a processor cause the video coding device to perform the method of any of solutions 1-16.

[0449] 19. A non-transitory computer-readable recording medium storing a bitstream of a video which is generated by a method performed by a video processing apparatus, wherein the method comprises: determining a filtering strength control value for a neural -network post-processing filter (NNPF) is related to a slice other than a first slice; and generating a bitstream based on the determining.

[0450] 20. A method for storing bitstream of a video comprising: determining a filtering strength control value for a neural -network post-processing filter (NNPF) is related to a slice other than a first slice; generating a bitstream based on the determining; and storing the bitstream in a non-transitory computer-readable recording medium.

[0451] In the solutions described herein, an encoder may conform to the format rule by producing a coded representation according to the format rule. In the solutions described herein, a decoder may use the format rule to parse syntax elements in the coded representation with the knowledge of presence and absence of syntax elements according to the format rule to produce decoded video.

[0452] In the present document, the term ‘video processing” may refer to video encoding, video decoding, video compression or video decompression. For example, video compression algorithms may be applied during conversion from pixel representation of a video to a corresponding bitstream representation or vice versa. The bitstream representation of a current video block may, for example, correspond to bits that are either co-located or spread in different places within the bitstream, as is defined by the syntax. For example, a macroblock may be encoded in terms of transformed and coded error residual values and also using bits in headers and other fields in the bitstream. Furthermore, during conversion, a decoder may parse a bitstream with the knowledge that some fields may be present, or absent, based on the determination, as is described in the above solutions. Similarly, an encoder may detennine that certain syntax fields are or are not to be included and generate the coded representation accordingly by including or excluding the syntax fields from the coded representation.

[0453] The disclosed and other solutions, examples, embodiments, modules and the functional operations described in this document can be implemented in digital electronic circuitry, or in computer software, firmware, or hardware, including the structures disclosed in this document and their structural equivalents, or in combinations of one or more of them. The disclosed and other embodiments can be implemented as one or more computer program products, i.e., one or more modules of computer program instructions encoded on a computer readable medium for execution by, or to control the operation of, data processing apparatus. The computer readable medium can be a machine-readable storage device, a machine-readable storage substrate, a memory device, a composition of matter effecting a machine-readable propagated signal, or a combination of one or more them. The term ‘‘data processing apparatus’" encompasses all apparatus, devices, and machines for processing data, including by way of example a programmable processor, a computer, or multiple processors or computers. The apparatus can include, in addition to hardware, code that creates an execution environment for the computer program in question, e.g.. code that constitutes processor firmware, a protocol stack, a database management system, an operating system, or a combination of one or more of them. A propagated signal is an artificially generated signal, e.g., a machine-generated electrical, optical, or electromagnetic signal, that is generated to encode information for transmission to suitable receiver apparatus.

[0454] A computer program (also known as a program, software, software application, script, or code) can be written in any form of programming language, including compiled or interpreted languages, and it can be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment. A computer program does not necessarily correspond to a file in a file system. A program can be stored in a portion of a file that holds other programs or data (e.g., one or more scripts stored in a markup language document), in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files that store one or more modules, sub programs, or portions of code). A computer program can be deployed to be executed on one computer or on multiple computers that are located at one site or distributed across multiple sites and interconnected by a communication network.

[0455] The processes and logic flows described in this document can be performed by one or more programmable processors executing one or more computer programs to perform functions by operating on input data and generating output. The processes and logic flows can also be performed by, and apparatus can also be implemented as, special purpose logic circuitry, e.g., a field programmable gate array (FPGA) or an application specific integrated circuit (ASIC).

[0456] Processors suitable for the execution of a computer program include, by way of example, both general and special purpose microprocessors, and any one or more processors of any kind of digital computer. Generally, a processor will receive instructions and data from a read only memory or a random-access memory or both. The essential elements of a computer are a processor for performing instructions and one or more memory devices for storing instructions and data. Generally, a computer will also include, or be operatively coupled to receive data from or transfer data to, or both, one or more mass storage devices for storing data, e.g., magnetic, magneto optical disks, or optical disks. However, a computer need not have such devices. Computer readable media suitable for storing computer program instructions and data include all forms of non-volatile memory. media and memory devices, including by wayof example semiconductor memory devices, e.g., erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), and flash memory devices; magnetic disks, e.g., internal hard disks or removable disks; magneto optical disks; and compact disc read-only memory (CD ROM) and Digital versatile disc-read only memory (DVD-ROM) disks. The processor and the memory can be supplemented by, or incorporated in, special purpose logic circuitry.

[0457] While this patent document contains many specifics, these should not be construed as limitations on the scope of any subject matter or of what may be claimed, but rather as descriptions of features that may be specific to particular embodiments of particular techniques. Certain features that are described in this patent document in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination. Moreover, although features may be described above as acting in certain combinations and even initially claimed as such, one or more features from a claimed combination can in some cases be excised from the combination, and the claimed combination may be directed to a subcombination or variation of a subcombination.

[0458] Similarly, while operations are depicted in the drawings in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed, to achieve desirable results. Moreover, the separation of various system components in the embodiments described in this patent document should not be understood as requiring such separation in all embodiments.

[0459] Only a few implementations and examples are described and other implementations, enhancements and variations can be made based on what is described and illustrated in this patent document.

[0460] A first component is directly coupled to a second component when there are no intervening components, except for a line, a trace, or another medium between the first component and the second component. The first component is indirectly coupled to the second component when there are intervening components other than a line, a trace, or another medium between the first component and the second component. The term “coupled” and its variants include both directly coupled and indirectly coupled. The use of the term “about” means a range including ±10% of the subsequent number unless otherwise stated.

[0461] While several embodiments have been provided in the present disclosure, it should be understood that the disclosed systems and methods might be embodied in many other specific forms without departing from the spirit or scope of the present disclosure. The present examples are to be considered as illustrative and not restrictive, and the intention is not to be limited to the details given herein. For example, the various elements or components may be combined or integrated in another system or certain features may be omitted, or not implemented.

[0462] In addition, techniques, systems, subsystems, and methods described and illustrated in the various embodiments as discrete or separate may be combined or integrated with other systems, modules, techniques, or methods without departing from the scope of the present disclosure. Other items shown or discussed as coupled may be directly connected or may be indirectly coupled or communicating through some interface, device, or intermediatecomponent whether electrically, mechanically, or otherwise. Other examples of changes, substitutions, and alterations are ascertainable by one skilled in the art and could be made without departing from the spirit and scope disclosed herein.

Claims

CLAIMSWhat is claimed is:

1. A method for processing media data comprising:determining a filtering strength control value for a neural-network post-processing filter (NNPF) is related to a slice other than a first slice; andperforming a conversion between a visual media data and a bitstream based on the filtering strength control value.

2. The method of claim 1, wherein the filtering strength control value is derived from an average value of initial values of luma quantization parameters (Qpv) for all slices in an input picture.

3. The method of any of claims 1 -2, wherein the filtering strength control value is derived from a median value of initial values of Qpy for all slices in an input picture.

4. The method of any of claims 1-3, wherein one or more syntax elements are signalled to adjust the filtering strength control value.

5. The method of any of claims 1-4, wherein the filtering strength control value is indicated in a neural-network post-filter characteristics (NNPFC) supplemental enhancement information (SEI) message, a neural-network post-filter activation (NNPF A) SEI message, or combinations thereof, and wherein the filtering strength control value is indicated to overwrite a current value.

6. The method of any of claims 1-5, wherein a list of filtering strength control values is indicated in a NNPFC SEI message, a NNPFA SEI message, or combinations thereof, and wherein each of the list of filtering strength control values are used to overwrite a current value of an input picture.

7. The method of any of claims 1-6, wherein a difference value from a current filtering strength control value is indicated in a NNPFC SEI message, a NNPFA SEI message, or combinations thereof.

8. The method of any of claims 1-7, wherein an applied filtering strength control value is set equal to a sum of a current value and a difference value and is clipped to a valid range.

9. The method of any of claims 1-8, wherein a list of difference values is indicated in a NNPFC SEI message, a NNPFA SEI message, or combmations thereof, and wherein each of the list of difference values are used to derive an applied value of an input picture.

10. The method of any of claims 1-9, wherein the filtering strength control values are coded in signed integer with Exponetial-Golomb coding and variable size (se(v)), context-adaptive arithmetic entropy-coding and variable size (ae(v)), unsigned integer with Exponetial-Golomb coding and variable size (ue(v)), a sign coded in ae(v) and an absolute number coded in ue(v), or a sign coded in unsigned one bit integer (u(1)) and an absolute number coded in ue(v).

11. The method of any of claims 1-10, wherein when the filtering strength control value is indicated in an NNPFA SEI message, the filtering strength control value is applied to a current picture upon which the NNPFA SEI message is activated.

12. The method of any of claims 1-11, wherein the filtering strength control value is associated with a picture, and wherein when the picture is used in an NNPF a same value applies no matter whether the picture is the current picture.

13. The method of any of claims 1-12, wherein the filtering strength control value is applied to all input pictures when processing a current picture with an NNPF.

14. The method of any of claims 1-13, wherein when the filtering strength control value is indicated in an NNPFA SEI message, the filtering strength control value is only applied to a current picture upon which the NNPFA SEI message is activated.

15. The method of any of claims 1-14, wherein the conversion includes encoding the visual media data into the bitstream.

16. The method of any of claims 1-14, wherein the conversion includes decoding the visual media data from the bitstream.

17. An apparatus for processing video data comprising: a processor; and a non-transitory memory with instructions thereon, wherein the instructions upon execution by the processor, cause the processor to perform the method of any of claims 1-16.

18. A non-transitory computer readable medium comprising a computer program product for use by a video coding device, the computer program product comprising computer executable instructions stored on the non-transitory computer readable medium such that when executed by a processor cause the video coding device to perform the method of any of claims 1-16.

19. A non-transitory computer-readable recording medium storing a bitstream of a video which is generated by a method performed by a video processing apparatus, wherein the method comprises:determining a filtering strength control value for a neural-network post-processing filter (NNPF) is related to a slice other than a first slice; andgenerating a bitstream based on the determining.

20. A method for storing bitstream of a video comprising:determining a filtering strength control value for a neural-network post-processing filter (NNPF) is related to a slice other than a first slice;generating a bitstream based on the determining; andstoring the bitstream in a non-transitory computer-readable recording medium.