Intratemplate matching by inversion

By determining optimal template orientations for template-based prediction in video coding systems, the solution enhances encoding and decoding efficiency, addressing suboptimal compression challenges.

JP2025524451APending Publication Date: 2025-07-30INTERDIGITALCE PATENT HLDG SAS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2024575325
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2022-07-01
Filing Date
2023-06-26
Publication Date
2025-07-30

AI Technical Summary

Technical Problem

Existing video coding systems face challenges in efficiently utilizing template-based prediction for video blocks, leading to suboptimal compression and transmission efficiency.

Method used

A video device determines template orientations for template-based prediction by performing template matching searches in multiple orientations, adjusting the prediction block accordingly, and encoding/decoding based on the selected orientation.

Benefits of technology

Improves video compression efficiency by optimizing template-based prediction, enhancing encoding and decoding processes through refined template matching searches.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025524451000001_ABST
    Figure 2025524451000001_ABST
Patent Text Reader

Abstract

Systems, methods, and means for the field of video encoding and decoding are disclosed herein. In an example, a video decoder or encoder may determine that template-based prediction is valid for a current block. A prediction block and a template orientation for the current block may be determined based on template matching. The decoder or encoder may decode or encode the current block based on the prediction block and the template orientation. In an example, the prediction block may be adjusted (e.g., flipped horizontally, flipped vertically, flipped diagonally, and / or rotated) based on the determined template orientation, and the current block may be decoded or encoded based on the adjusted (e.g., reoriented) prediction block.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] (Cross - reference to Related Applications) This application claims the benefit of European Patent Application No. 22305985.8, filed on July 1, 2022, the disclosure of which is hereby incorporated by reference in its entirety.

Background Art

[0002] Video coding systems can be used to compress digital video signals to reduce, for example, the storage and / or transmission bandwidth required for such signals. Video coding systems can include, for example, block - based, wavelet - based, and / or object - based systems.

Summary of the Invention

[0003] Systems, methods, and means for the field of video encoding and decoding are disclosed herein.

[0004] In an embodiment, a video device such as a video decoder or a video encoder may determine that template - based prediction is effective for a current block. The prediction block and template orientation for the current block may be determined based on template matching. The video decoder may decode the current block based on the prediction block and template orientation. The video encoder may encode the current block based on the prediction block and template orientation. The prediction block may be adjusted (e.g., flipped horizontally, vertically, diagonally, or rotated) based on the determined template orientation, and the current block may be decoded and / or encoded based on the adjusted (e.g., re - oriented) prediction block.

[0005] For example, a plurality of template orientations can be obtained, and the template orientation can be selected from the plurality of template orientations. The template matching search can be performed based on different template orientations, and the template differences corresponding to different orientations can be compared. The template orientation can be selected based on the comparison. In an embodiment, the video device can perform a template matching search in a first template orientation and a second template orientation. The video device can calculate a template difference between the template of the current block and the template of the first predicted block in the first template orientation, and a template difference between the template of the current block and the template of the second predicted block in the second template orientation. The predicted block and the template orientation for the current block can be determined based on the smaller template difference among the template differences.

[0006] The video device can perform a refinement search in a plurality of template orientations. In an embodiment, the video device can determine a matching block based on a first template matching search associated with an upright template orientation. The refinement search area can be determined based on the matching block to perform a second template matching search (e.g., a refinement search in a plurality of template orientations). The predicted block and the template orientation for the current block can be determined based on the second template matching search performed within the refinement search area.

[0007] These embodiments can be executed by a video processing device having a processor. The device can be an encoder or a decoder. These embodiments can be stored in a non-transitory computer-readable medium and can be executed by a computer program product including program code instructions. These embodiments can be executed by a computer program including program code instructions. These embodiments can be executed by a bitstream including information representing a template matching prediction mode.

[0008] The systems, methods, and means described herein may include a decoder. In some embodiments, the systems, methods, and means described herein may include an encoder. In some embodiments, the systems, methods, and means described herein may include signals (e.g., from an encoder and / or received by a decoder). A computer-readable medium may include instructions for causing one or more processors to execute the methods described herein. A computer program product may include instructions that, when executed by one or more processors, may cause the one or more processors to perform the methods described herein. BRIEF DESCRIPTION OF THE DRAWINGS

[0009]

Figure 1A

Figure 1B

Figure 1C

Figure 1D

Figure 2

Figure 3

Figure 4

Figure 5

Figure 6

Figure 7

Figure 8

Figure 9

Figure 10

Best Mode for Carrying Out the Invention

[0010] A more detailed understanding can be obtained from the following description given as an example in conjunction with the accompanying drawings.

[0011] FIG. 1A is a diagram illustrating an exemplary communication system 100 in which one or more of the disclosed embodiments may be implemented. The communication system 100 may be a multi-access system that provides content such as voice, data, video, messaging, broadcast, etc. to a plurality of wireless users. The communication system 100 may enable a plurality of wireless users to access such content through sharing of system resources including wireless bandwidth. For example, the communication system 100 may employ one or more channel access methods such as code division multiple access (CDMA), time division multiple access (TDMA), frequency division multiple access (FDMA), orthogonal FDMA (OFDMA), single-carrier FDMA (SC-FDMA), zero-tail unique-word DFT-Spread OFDM (ZT UW DTS-s OFDM), unique word OFDM (UW-OFDM), resource block filtered OFDM, filter bank multicarrier (FBMC).

[0012] As shown in FIG. 1A, the communication system 100 can include wireless transmit / receive units (WTRUs) 102a, 102b, 102c, 102d, a RAN 104 / 113, a CN 106 / 115, a public switched telephone network (PSTN) 108, the Internet 110, and other networks 112, although it will be understood that the disclosed embodiments contemplate any number of WTRUs, base stations, networks, and / or network elements. Each of the WTRUs 102a, 102b, 102c, 102d can be any type of device configured to operate and / or communicate in a wireless environment. By way of example, the WTRUs 102a, 102b, 102c, 102d, which may all be referred to as “stations” and / or “STAs,” can be configured to transmit and / or receive wireless signals and can be user equipment (UE), mobile stations, fixed or mobile subscriber units, subscription-based units, pagers, cellular telephones, personal digital assistants (PDAs), smartphones, laptops, netbooks, personal computers, wireless sensors, hotspots or Mi-Fi devices, Internet of Things (IoT) devices, watches or other wearables, head-mounted displays (HMDs), vehicles, drones, medical devices and applications (e.g., remote surgery), industrial devices and applications (e.g., robots and / or other wireless devices operating in the context of industrial and / or automated processing chains), home electronics devices, devices operating in commercial and / or industrial wireless networks, etc. Any of the WTRUs 102a, 102b, 102c, and 102d can be interchangeably referred to as a UE.

[0013] The communication system 100 may also include base station 114a and / or base station 114b. Each of base stations 114a, 114b may be any type of device configured to wirelessly interface with at least one of WTRUs 102a, 102b, 102c, 102d to facilitate access to one or more communication networks such as CN106 / 115, the Internet 110, and / or other network 112. By way of example, base stations 114a, 114b may be a base transceiver station (BTS), Node B, eNode B, home Node B, home eNode B, gNB, NR Node B, site controller, access point (AP), wireless router, etc. Although base stations 114a, 114b are each depicted as a single element, it will be understood that base stations 114a, 114b may include any number of interconnected base stations and / or network elements.

[0014] Base station 114a can be part of RAN 104 / 113 and can also include other base stations and / or network elements (not shown) such as a base station controller (BSC), a radio network controller (RNC), a relay node, etc. Base station 114a and / or base station 114b can be configured to transmit and / or receive radio signals at one or more carrier frequencies, which can be referred to as a cell (not shown). These frequencies can be an authorized spectrum, an unlicensed spectrum, or a combination of an authorized spectrum and an unlicensed spectrum. The cell can provide coverage of wireless services to a specific geographic area that can be relatively fixed or can change over time. The cell can be further divided into cell sectors. For example, the cell associated with base station 114a can be divided into three sectors. Thus, in one embodiment, base station 114a can include three transceivers, i.e., one transceiver for each sector of the cell. In one embodiment, base station 114a can employ multiple-input multiple-output (MIMO) technology and can utilize multiple transceivers for each sector of the cell. For example, beamforming can be used to transmit and / or receive signals in a desired spatial direction.

[0015] Base stations 114a, 114b can communicate with one or more of WTRUs 102a, 102b, 102c, 102d via air interface 116, which can be any suitable wireless communication link (e.g., radio frequency (RF), microwave, centimeter wave, micrometer wave, infrared (IR), ultraviolet (UV), visible light, etc.). Air interface 116 can be established using any suitable radio access technology (RAT).

[0016] More specifically, as described above, the communication system 100 can be a multiple access system, and can adopt one or more channel access methods such as CDMA, TDMA, FDMA, OFDMA, SC-FDMA, etc. For example, the base stations 114a within RAN104 / 113, and WTRU102a, 102b, 102c can implement radio technologies such as Universal Mobile Telecommunications System (UMTS) Terrestrial Radio Access (UTRA), which can use wideband CDMA (WCDMA) to establish the air interfaces 115 / 116 / 117. WCDMA can include communication protocols such as High-Speed Packet Access (HSPA) and / or Evolved HSPA (HSPA+). HSPA can include High-Speed Downlink Packet Access (HSDPA) and / or High-Speed UL Packet Access (HSUPA).

[0017] In one embodiment, the base stations 114a and WTRU102a, 102b, 102c can implement radio technologies such as Evolved UMTS Terrestrial Radio Access (E-UTRA), which can use Long Term Evolution (LTE) and / or LTE-Advanced (LTE-A) and / or LTE-Advanced Pro (LTE-A Pro) to establish the air interface 116.

[0018] In one embodiment, the base stations 114a and WTRU102a, 102b, 102c can implement radio technologies such as NR radio access, and this technology can use New Radio (NR) to establish the air interface 116.

[0019] In one embodiment, base station 114a and WTRUs 102a, 102b, 102c may implement multiple radio access technologies. For example, base station 114a and WTRUs 102a, 102b, 102c may implement LTE radio access and NR radio access together, for example, using the dual connectivity (DC) principle. Accordingly, the air interfaces utilized by WTRUs 102a, 102b, 102c may be characterized by transmissions sent between multiple types of radio access technologies and / or multiple types of base stations (e.g., eNBs and gNBs).

[0020] In other embodiments, base station 114a and WTRUs 102a, 102b, 102c may establish wireless technologies such as IEEE 802.11 (i.e., Wireless Fidelity (WiFi)), IEEE 802.16 (i.e., Worldwide Interoperability for Microwave Access (WiMAX)), CDMA2000, CDMA2000 1X, CDMA2000 EV-DO, Interim Standard 2000 (IS-2000), IS-95, IS-856, Global System for Mobile communications (GSM), Enhanced Data rates for GSM Evolution (EDGE), GSM EDGE (GERAN), etc.

[0021] The base station 114b in FIG. 1A can be, for example, a wireless router, a home node B, a home e-node B, or an access point, and can utilize any suitable RAT to facilitate wireless connection in a local area such as, for example, an office, a home, a vehicle, a campus, an industrial facility, an aerial corridor (for use by drones, for example), a road, etc. In one embodiment, the base station 114b and the WTRUs 102c, 102d can implement a wireless technology such as IEEE 802.11 to establish a wireless local area network (WLAN). In one embodiment, the base station 114b and the WTRUs 102c, 102d can implement a wireless technology such as IEEE 802.15 to establish a wireless personal area network (WPAN). In yet another embodiment, the base station 114b, and the WTRUs 102c, 102d can utilize a cellular-based RAT (such as, for example, WCDMA, CDMA2000, GSM, LTE, LTE-A, LTE-A Pro, NR, etc.) to establish a picocell or a femtocell. As shown in FIG. 1A, the base station 114b can have a direct connection to the Internet 110. Thus, the base station 114b may not need to access the Internet 110 via the CN 106 / 115.

[0022] RAN 104 / 113 can communicate with CN 106 / 115, which can be any type of network configured to provide voice, data, applications, and / or voice over internet protocol (VoIP) services to one or more of WTRUs 102a, 102b, 102c, 102d. The data can have various quality of service (QoS) requirements, such as different throughput requirements, latency requirements, error tolerance requirements, reliability requirements, data throughput requirements, mobility requirements, etc. CN 106 / 115 can provide call control, billing services, mobile location-based services, prepaid calls, internet connectivity, video delivery, etc., and / or can implement high-level security functions such as user authentication. Although not shown in Figure 1A, it will be understood that RAN 104 / 113 and / or CN 106 / 115 can communicate directly or indirectly with other RANs that employ the same radio access technology (RAT) as RAN 104 / 113 or a different RAT. For example, in addition to being connected to a RAN 104 / 113 that can utilize New Radio (NR) radio technology, CN 106 / 115 can also communicate with another RAN (not shown) that employs GSM, UMTS, CDMA2000, WiMAX, E-UTRA, or WiFi radio technology.

[0023] CN106 / 115 can also serve as a gateway for WTRU102a, 102b, 102c, 102d to access the PSTN108, the Internet 110, and / or other networks 112. The PSTN108 can include a circuit-switched telephone network that provides a plain old telephone service (POTS). The Internet 110 can include a global system of interconnected computer networks and devices, where these networks and devices use a common communication protocol such as the transmission control protocol (TCP), the user datagram protocol (UDP), and / or the internet protocol (IP) of the TCP / IP internet protocol suite. The network 112 can include a wired communication network and / or a wireless communication network that is owned and / or operated by another service provider. For example, the network 112 can include another CN connected to one or more RANs that may employ the same or a different RAT as the RAN104 / 113.

[0024] Some or all of the WTRU102a, 102b, 102c, 102d in the communication system 100 may include a multimode function (e.g., the WTRU102a, 102b, 102c, 102d may include multiple transceivers for communicating with different wireless networks via different wireless links). For example, the WTRU102c shown in Figure 1A can be configured to communicate with a base station 114a that may employ a cellular-based wireless technology and a base station 114b that may employ IEEE802 wireless technology.

[0025] Figure 1B is a system diagram illustrating an exemplary WTRU102. As shown in Figure 1B, the WTRU102 may include, among other things, a processor 118, a transceiver 120, a transmit / receive element 122, a speaker / microphone 124, a keypad 126, a display / touchpad 128, a non-removable memory 130, a removable memory 132, a power source 134, a global positioning system (GPS) chipset 136, and / or other peripheral devices 138. It will be understood that the WTRU102 may include any partial combination of the foregoing elements while remaining consistent with one embodiment.

[0026] The processor 118 may be a general-purpose processor, a dedicated processor, a conventional processor, a digital signal processor (DSP), a plurality of microprocessors, one or more microprocessors associated with a DSP core, a controller, a microcontroller, an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) circuit, any other type of integrated circuit (IC), a state machine, etc. As proposed above, the processor 118 may include a plurality of processors. The processor 118 may perform signal coding, data processing, power control, input / output processing, and / or any other function that enables the WTRU102 to operate in a wireless environment. The processor 118 may be coupled to a transceiver 120 that may be coupled to a transmit / receive element 122. Although Figure 1B depicts the processor 118 and the transceiver 120 as separate components, it will be understood that the processor 118 and the transceiver 120 may be integrated together in an electronic package or chip.

[0027] The transmit / receive element 122 may be configured to transmit signals to or receive signals from a base station (e.g., base station 114a) via the air interface 116. For example, in one embodiment, the transmit / receive element 122 may be an antenna configured to transmit and / or receive RF signals. In one embodiment, the transmit / receive element 122 may be an emitter / detector configured to transmit and / or receive, for example, IR signals, UV signals, or visible light signals. In yet another embodiment, the transmit / receive element 122 may be configured to transmit and / or receive both RF signals and optical signals. It will be understood that the transmit / receive element 122 may be configured to transmit and / or receive any combination of wireless signals.

[0028] Although the transmit / receive element 122 is depicted in FIG. 1B as a single element, the WTRU 102 may include any number of transmit / receive elements 122. More specifically, the WTRU 102 may employ MIMO technology. Thus, in one embodiment, the WTRU 102 may include two or more transmit / receive elements 122 (e.g., multiple antennas) for transmitting and receiving wireless signals via the air interface 116.

[0029] The transceiver 120 may be configured to modulate signals transmitted by the transmit / receive element 122 and demodulate signals received by the transmit / receive element 122. As noted above, the WTRU 102 may have a multimode function. Thus, the transceiver 120 may include multiple transceivers to enable the WTRU 102 to communicate via multiple RATs such as, for example, NR and IEEE 802.11.

[0030] The processor 118 of the WTRU 102 can be coupled to the speaker / microphone 124, keypad 126, and / or the display / touchpad 128 (e.g., a liquid crystal display (LCD) display unit or an organic light-emitting diode (OLED) display unit) and can receive data input by the user therefrom. The processor 118 can also output user data to the speaker / microphone 124, keypad 126, and / or the display / touchpad 128. In addition, the processor 118 can access information from and store data in any suitable type of memory such as the non-removable memory 130 and / or the removable memory 132. The non-removable memory 130 can include random-access memory (RAM), read-only memory (ROM), a hard disk, or any other type of memory storage device. The removable memory 132 can include a subscriber identity module (SIM) card, a memory stick, a secure digital (SD) memory card, and the like. In other embodiments, the processor 118 can access information from and store data in a memory that is not physically located on the WTRU 102, such as on a server or a home computer (not shown).

[0031] The processor 118 may receive power from the power supply 134 and may be configured to distribute and / or control power to other components in the WTRU 102. The power supply 134 may be any suitable device for supplying power to the WTRU 102. For example, the power supply 134 may include one or more dry batteries (e.g., nickel-cadmium (NiCd), nickel-zinc (NiZn), nickel metal hydride (NiMH), lithium-ion (Li-ion), etc.), solar cells, fuel cells, and the like.

[0032] The processor 118 may also be coupled to the GPS chipset 136, which may be configured to provide location information (e.g., longitude and latitude) regarding the current location of the WTRU 102. In addition to, or instead of, the information from the GPS chipset 136, the WTRU 102 may receive location information from a base station (e.g., base stations 114a, 114b) via the air interface 116 and / or may determine its location based on the timing of signals received from two or more neighboring base stations. It will be understood that the WTRU 102 may obtain location information by any suitable location determination method while remaining consistent with one embodiment.

[0033] Processor 118 may be further coupled to other peripheral devices 138, which may include one or more software and / or hardware modules that provide additional features, functionality, and / or wired or wireless connections. For example, peripheral devices 138 may include an accelerometer, an electronic compass, a satellite transceiver, a digital camera (for photos and / or video), a universal serial bus (USB) port, a vibration device, a television transceiver, a hands-free headset, a Bluetooth® module, a frequency modulated (FM) radio unit, a digital music player, a media player, a video game player module, an Internet browser, a virtual reality and / or augmented reality (VR / AR) device, an activity tracker, etc. Peripheral devices 138 may include one or more sensors, which may be one or more of a gyroscope, an accelerometer, a Hall effect sensor, a magnetometer, an orientation sensor, a proximity sensor, a temperature sensor, a time sensor, a geolocation sensor, an altimeter, a light sensor, a touch sensor, a magnetometer, a barometer, a gesture sensor, a biometric sensor, and / or a humidity sensor.

[0034] WTRU 102 may include a full-duplex radio in which some or all of the transmission and reception of signals associated with a particular subframe (e.g., for both UL (e.g., for transmission) and downlink (e.g., for reception)) may be parallel and / or simultaneous. The full-duplex radio may include an interference management unit for reducing and / or substantially eliminating self-interference either through hardware (e.g., choke) or through signal processing via a processor (e.g., a separate processor (not shown) or via processor 118). In one embodiment, WRTU 102 may include a half-duplex radio for the transmission and reception of any of some or all of the signals associated with a particular subframe (e.g., for either UL (e.g., for transmission) or downlink (e.g., for reception)).

[0035] Figure 1C is a system diagram illustrating RAN 104 and CN 106 according to one embodiment. As described above, RAN 104 may employ E-UTRA radio technology to communicate with WTRUs 102a, 102b, 102c via air interface 116. RAN 104 may also communicate with CN 106.

[0036] RAN 104 may include eNodeBs 160a, 160b, 160c, although it will be understood that RAN 104 may include any number of eNodeBs while remaining consistent with one embodiment. Each of eNodeBs 160a, 160b, 160c may include one or more transceivers for communicating with WTRUs 102a, 102b, 102c via air interface 116. In one embodiment, eNodeBs 160a, 160b, 160c may implement MIMO technology. Thus, eNodeB 160a, for example, may transmit wireless signals to and / or receive wireless signals from WTRU 102a using multiple antennas.

[0037] Each of eNodeBs 160a, 160b, 160c may be associated with a particular cell (not shown) and may be configured to handle radio resource management decisions, handover decisions, user scheduling in UL and / or DL, etc. As shown in Figure 1C, eNodeBs 160a, 160b, 160c may communicate with each other via the X2 interface.

[0038] CN 106 shown in Figure 1C may include a mobility management entity (MME) 162, a serving gateway (SGW) 164, and a packet data network (PDN) gateway (or PGW) 166. Although each of the foregoing elements is depicted as part of CN 106, it will be understood that any of these elements may be owned and / or operated by an entity other than a CN operator.

[0039] The MME 162 can be connected to each of the eNodeBs 162a, 162b, 162c in the RAN 104 via the S1 interface and can function as a control node. For example, the MME 162 can authenticate users of the WTRUs 102a, 102b, 102c, activate / deactivate bearers, select a specific serving gateway during the initial attach of the WTRUs 102a, 102b, 102c, etc. The MME 162 can provide control plane functions for switching between the RAN 104 and other RANs (not shown) that employ other radio technologies such as GSM and / or WCDMA.

[0040] The SGW 164 can be connected to each of the eNodeBs 160a, 160b, 160c in the RAN 104 via the S1 interface. The SGW 164 can generally route and transfer user data packets between the WTRUs 102a, 102b, 102c. The SGW 164 can perform other functions such as the function of anchoring the user plane during handover between eNodeBs, the function of triggering paging when DL data is available to the WTRUs 102a, 102b, 102c, and the function of managing and storing the context of the WTRUs 102a, 102b, 102c.

[0041] The SGW 164 can be connected to the PGW 166, and the PGW 166 can provide the WTRUs 102a, 102b, 102c with access to a packet switched network such as the Internet 110 to facilitate communication between the WTRUs 102a, 102b, 102c and IP-enabled devices.

[0042] CN106 may facilitate communication with other networks. For example, CN106 may provide access to a circuit-switched network such as PSTN108 to WTRU102a, 102b, 102c to facilitate communication between the WTRU102a, 102b, 102c and a conventional landline communication device. For example, CN106 may include or communicate with an IP gateway (e.g., an IP multimedia subsystem (IMS) server) that functions as an interface between CN106 and PSTN108. Additionally, CN106 may provide access to another network 112 to the WTRU102a, 102b, 102c, and the other network 112 may include other wired and / or wireless networks owned and / or operated by other service providers.

[0043] The WTRU is described as a wireless terminal in FIGS. 1A - 1D, but in certain representative embodiments, it is contemplated that such a terminal may use (e.g., temporarily or permanently) a wired communication interface with a communication network.

[0044] In a representative embodiment, the other network 112 may be a WLAN.

[0045] A WLAN in Infrastructure Basic Service Set (BSS) mode may have an access point (AP) of the BSS and one or more stations (STAs) associated with the AP. The AP may have access or an interface to another type of wired / wireless network that carries traffic within and / or outside the Distribution System (DS) or BSS. Traffic originating from outside the BSS may reach and be delivered to the STA through the AP. Traffic originating from the STA to a destination outside the BSS may be sent to the AP to be delivered to their respective destinations. Traffic between STAs within the BSS may be sent, for example, through the AP, where the source STA may send the traffic to the AP and the AP may deliver the traffic to the destination STA. Traffic between STAs within the BSS may be considered and / or referred to as peer-to-peer traffic. Peer-to-peer traffic may be sent between the source STA and the destination STA (e.g., directly between them) using direct link setup (DLS). In one representative embodiment, the DLS may use 802.11e DLS or 802.11z tunneled DLS (TDLS). A WLAN using Independent BSS (IBSS) mode may not have an AP, and STAs within or using the IBSS (e.g., all of the STAs) may communicate directly with each other. The IBSS mode of communication may be referred to herein as the "ad hoc" communication mode.

[0046] When using the 802.11ac infrastructure operation mode or a similar operation mode, the AP may transmit beacons on a fixed channel such as the primary channel. The primary channel can be of a fixed width (e.g., a 20 MHz wide bandwidth) or a width dynamically set via signaling. The primary channel can be the operating channel of the BSS, but can also be used by the STA to establish a connection with the AP. In certain representative embodiments, for example, in an 802.11 system, Carrier Sense Multiple Access with Collision Avoidance (CSMA / CA) can be implemented. In the case of CSMA / CA, STAs including the AP (e.g., all STAs) can sense the primary channel. If the primary channel is sensed / detected and / or determined to be busy by a particular STA, the particular STA can back off. Only one STA (e.g., only one station) can transmit at any given time in a given BSS.

[0047] High Throughput (HT) STAs can use a 40 MHz wide channel for communication, and this 40 MHz wide channel can be formed, for example, through a combination of the primary 20 MHz channel and an adjacent or non - adjacent 20 MHz channel.

[0048] A Very High Throughput (VHT) STA can support channels with widths of 20 MHz, 40 MHz, 80 MHz, and / or 160 MHz. A 40 MHz and / or 80 MHz channel can be formed by combining a plurality of consecutive 20 MHz channels. A 160 MHz channel can be formed by combining eight consecutive 20 MHz channels or by combining two non - consecutive 80 MHz channels, which can be referred to as an 80 + 80 configuration. In the case of the 80 + 80 configuration, after channel encoding, the data can pass through a segment parser that can divide the data into two streams. Inverse Fast Fourier Transform (IFFT) processing and time - domain processing can be performed separately for each stream. The streams can be mapped to two 80 MHz channels, and the data can be transmitted by the transmitting STA. At the receiver of the receiving STA, the operations described above for the 80 + 80 configuration can be reversed, and the combined data can be sent to the Medium Access Control (MAC).

[0049] The sub-1 GHz operating mode is supported by 802.11af and 802.11ah. The channel operating bandwidth and carriers are reduced in 802.11af and 802.11ah compared to those used in 802.11n and 802.11ac. 802.11af supports bandwidths of 5 MHz, 10 MHz, and 20 MHz in the TV White Space (TVWS) spectrum, and 802.11ah supports bandwidths of 1 MHz, 2 MHz, 4 MHz, 8 MHz, and 16 MHz using the non-TVWS spectrum. According to a representative embodiment, 802.11ah may support meter type control / machine type communication, such as MTC devices within a macro coverage area. The MTC device may have limited capabilities, including certain capabilities, such as support for a particular and / or limited bandwidth (e.g., support only for these). The MTC device may include a battery having a battery life exceeding a threshold (e.g., to maintain a very long battery life).

[0050] WLAN systems that can support multiple channels and channel bandwidths, such as 802.11n, 802.11ac, 802.11af, and 802.11ah, include channels that can be designated as primary channels. The primary channel may have a bandwidth equal to the maximum common operating bandwidth supported by all STAs in the BSS. The bandwidth of the primary channel can be set and / or restricted by an STA from among all STAs operating in a BSS that supports a minimum bandwidth operation mode. In an example of 802.11ah, the primary channel is 1 MHz wide for an STA (e.g., an MTC type device) that supports the 1 MHz mode (e.g., supports only this) even when the AP and other STAs in the BSS support 2 MHz, 4 MHz, 8 MHz, 16 MHz, and / or other channel bandwidth operation modes. Carrier sensing and / or Network Allocation Vector (NAV) setting may depend on the status of the primary channel. For example, due to an STA transmitting to an AP (supporting only the 1 MHz operation mode), if the primary channel is busy, the entire available frequency band may be considered busy even if most of the frequency band remains idle and available.

[0051] In the United States, the available frequency band that can be used by 802.11ah is 902 MHz to 928 MHz. In Korea, the available frequency band is 917.5 MHz to 923.5 MHz. In Japan, the available frequency band is 916.5 MHz to 927.5 MHz. The total available bandwidth for 802.11ah is 6 MHz to 26 MHz depending on the country code.

[0052] FIG. 1D is a system diagram illustrating RAN 113 and CN 115 according to one embodiment. As described above, RAN 113 can communicate with WTRUs 102a, 102b, 102c on air interface 116 using NR radio technology. RAN 113 can also communicate with CN 115.

[0053] RAN 113 may include gNBs 180a, 180b, and 180c, but it will be understood that RAN 113 may include any number of gNBs while maintaining consistency with one embodiment. Each of gNBs 180a, 180b, and 180c may include one or more transceivers for communicating with WTRUs 102a, 102b, and 102c via air interface 116. In one embodiment, gNBs 180a, 180b, and 180c may implement MIMO technology. For example, gNBs 180a and 108b may utilize beamforming to transmit signals to and / or receive signals from gNBs 180a, 180b, and 180c. Thus, gNB 180a may transmit and / or receive radio signals to / from WTRU 102a, for example, using multiple antennas. In one embodiment, gNBs 180a, 180b, and 180c may implement carrier aggregation technology. For example, gNB 180a may transmit multiple component carriers to WTRU 102a (not shown). A subset of these component carriers may be on unlicensed spectrum, while the remaining component carriers may be on licensed spectrum. In one embodiment, gNBs 180a, 180b, and 180c may implement coordinated multi-point (CoMP) technology. For example, WTRU 102a may receive coordinated transmissions from gNB 180a and gNB 180b (and / or gNB 180c).

[0054] The WTRUs 102a, 102b, and 102c can communicate with the gNBs 180a, 180b, and 180c using transmissions associated with scalable numerology. For example, the OFDM symbol interval and / or the OFDM sub-carrier interval can vary for different transmissions, different cells, and / or different portions of the radio transmission spectrum. The WTRUs 102a, 102b, and 102c can communicate with the gNBs 180a, 180b, and 180c using sub-frames or transmission time intervals (TTIs) of various or scalable lengths (e.g., including various numbers of OFDM symbols and / or varying durations of absolute time of various lengths).

[0055] gNBs 180a, 180b, and 180c may be configured to communicate with WTRUs 102a, 102b, and 102c in a stand-alone configuration and / or a non-stand-alone configuration. In a stand-alone configuration, WTRUs 102a, 102b, and 102c may communicate with gNBs 180a, 180b, and 180c without accessing other RANs (e.g., eNodeBs 160a, 160b, and 160c, etc.). In a stand-alone configuration, WTRUs 102a, 102b, and 102c may utilize one or more of gNBs 180a, 180b, and 180c as mobility anchor points. In a stand-alone configuration, WTRUs 102a, 102b, and 102c may communicate with gNBs 180a, 180b, and 180c using signals in an unlicensed band. In a non-stand-alone configuration, WTRUs 102a, 102b, and 102c may communicate with and connect to gNBs 180a, 180b, and 180c while also communicating with and connecting to another RAN such as eNodeBs 160a, 160b, and 160c. For example, WTRUs 102a, 102b, and 102c may implement a DC principle to communicate with one or more gNBs 180a, 180b, and 180c and one or more eNodeBs 160a, 160b, and 160c substantially simultaneously. In a non-stand-alone configuration, eNodeBs 160a, 160b, and 160c may function as mobility anchors for WTRUs 102a, 102b, and 102c, and gNBs 180a, 180b, and 180c may provide additional coverage and / or throughput for serving WTRUs 102a, 102b, and 102c.

[0056] Each of gNBs 180a, 180b, and 180c can be associated with a specific cell (not shown) and can be configured to handle radio resource management decision-making, handover decision-making, user scheduling in UL and / or DL, support for network slicing, dual connectivity, interworking between NR and E-UTRA, routing of user plane data to user plane functions (UPFs) 184a, 184b, routing of control plane information to access and mobility management functions (AMFs) 182a, 182b, etc. As shown in FIG. 1D, gNBs 180a, 180b, and 180c can communicate with each other via the Xn interface.

[0057] CN 115 shown in FIG. 1D can include at least one AMF 182a, 182b, at least one UPF 184a, 184b, at least one session management function (SMF) 183a, 183b, and optionally data networks (DNs) 185a, 185b. Although each of the aforementioned elements is depicted as part of CN 115, it should be understood that any of these elements can be owned and / or operated by entities other than the CN operator.

[0058] AMF 182a and 182b can be connected to one or more of gNBs 180a, 180b, and 180c within RAN 113 via the N2 interface and can serve as control nodes. For example, AMF 182a and 182b can be involved in user authentication of WTRUs 102a, 102b, and 102c, support for network slicing (e.g., handling different PDU sessions with different requirements), selection of specific SMFs 183a and 183b, registration area management, termination of NAS signaling, mobility management, etc. Network slices can be used by AMF 182a and 182b to customize the CN support for WTRUs 102a, 102b, and 102c based on the type of service being utilized by WTRUs 102a, 102b, and 102c. For example, different network slices can be established for different use cases such as services that rely on ultra-reliable low latency (URLLC) access, services that rely on enhanced massive mobile broadband (eMBB) access, services for machine type communication (MTC) access, etc. AMF 162 can provide control plane functions for switching between RAN 113 and other RANs (not shown) that employ other radio technologies such as non-3GPP access technologies like LTE, LTE-A, LTE-A Pro, and / or WiFi.

[0059] SMF183a and 183b can be connected to AMF182a and 182b in CN115 via the N11 interface. SMF183a and 183b can also be connected to UPF184a and 184b in CN115 via the N4 interface. SMF183a and 183b can select and control UPF184a and 184b and configure the routing of traffic through UPF184a and 184b. SMF183a and 183b can perform other functions such as managing and allocating UE IP addresses, managing PDU sessions, controlling policy enforcement and QoS, and providing downlink data notifications. The PDU session type can be IP-based, non-IP-based, Ethernet-based, etc.

[0060] UPF184a and 184b can be connected to one or more of gNB180a, 180b, and 180c in RAN113 via the N3 interface, which can provide access to a packet-switched network such as the Internet 110 to WTRU102a, 102b, and 102c and facilitate communication between WTRU102a, 102b, and 102c and IP-corresponding devices. UPF184 and 184b can perform other functions such as routing and forwarding packets, enforcing user plane policies, supporting multi-home PDU sessions, handling user plane QoS, buffering downlink packets, and providing mobility anchoring.

[0061] CN115 may facilitate communication with other networks. For example, CN115 may include or communicate with an IP gateway (e.g., an IP Multimedia Subsystem (IMS) server) that functions as an interface between CN115 and PSTN108. Additionally, CN115 may provide access to other network 112 for WTRU102a, 102b, 102c, and other network 112 may include other wired and / or wireless networks owned and / or operated by other service providers. In one embodiment, WTRU102a, 102b, 102c may be connected to local data network (DN) 185a, 185b through UPF184a, 184b via an N3 interface to UPF184a, 184b and an N6 interface between UPF184a, 184b and DN185a, 185b.

[0062] With reference to FIGS. 1A-1D and the corresponding descriptions of FIGS. 1A-1D, one or more of the functions described herein related to one or more of WTRU102a-d, base stations 114a and b, eNode Bs 160a-c, MME162, SGW164, PGW166, gNBs 180a-c, AMF182a and b, UPF184a and b, SMF183a and b, DNs 185a and b, and / or any other device described herein may be implemented by one or more emulation devices (not shown). An emulation device may be one or more devices configured to emulate one or more or all of the functions described herein. For example, an emulation device may be used to test other devices and / or simulate network and / or WTRU functionality.

[0063] An emulation device can be designed to implement one or more tests of other devices in a laboratory environment and / or an operator network environment. For example, one or more emulation devices can perform one or more or all functions while being fully or partially implemented and / or deployed as part of a wired and / or wireless communication network to test other devices within the communication network. One or more emulation devices can perform one or more or all functions while being temporarily implemented / deployed as part of a wired and / or wireless communication network. An emulation device can be directly coupled to another device for the purpose of testing and / or performing tests using over-the-air wireless communication.

[0064] One or more emulation devices can perform one or more functions including all while not being implemented / deployed as part of a wired and / or wireless communication network. For example, an emulation device can be utilized in a test scenario in a test laboratory and / or in a non-deployed (e.g., for testing) wired and / or wireless communication network to implement tests of one or more components. One or more emulation devices can be test equipment. Direct RF coupling and / or wireless communication via an RF circuit (which can include one or more antennas) can be used by an emulation device to transmit and / or receive data.

[0065] This application describes various aspects including tools, features, examples, models, techniques, etc. Many of these aspects are specifically described and often described in a way that may seem limiting in order to show at least individual characteristics. However, this is for the purpose of clarifying the description and does not limit the application or scope of those aspects. In fact, all of the various aspects can be combined and replaced to provide further aspects. Additionally, those aspects can be combined and replaced with aspects described in previous applications.

[0066] The aspects described and contemplated in this application can be implemented in many different forms. The figures 5-10 described herein may provide some examples, but other examples are also contemplated. The discussion of figures 5-10 does not limit the scope of the implementation forms. At least one of the above aspects generally relates to video encoding and decoding, and at least one other aspect generally relates to transmitting a generated or encoded bitstream. These aspects and other aspects can be implemented as a method, an apparatus, a computer-readable storage medium storing instructions for encoding or decoding video data according to any of the described methods in itself, and / or a computer-readable storage medium storing a bitstream generated according to any of the described methods in itself.

[0067] In this application, the terms "reconstructed" and "decoded" may be used interchangeably, the terms "pixel" and "sample" may be used interchangeably, and the terms "image", "picture", and "frame" may be used interchangeably.

[0068] Various methods are described herein, and each of the methods includes one or more steps or acts for achieving the described method. The order and / or use of specific steps and / or acts can be changed or combined, provided that a specific order of steps or acts is not required for the proper operation of the method. Additionally, terms such as "first", "second", etc. may be used in various embodiments to modify elements, components, steps, acts, such as "first decoding" and "second decoding". The use of such terms does not imply an ordering of the modified acts, unless specifically required. Thus, in this embodiment, the first decoding need not be performed before the second decoding, and may occur, for example, before, during, or overlapping with the second decoding.

[0069] The various methods and other aspects described in this application can be used to modify modules of video encoders 200 and decoders 300, such as the decoding module, as shown in FIGS. 2 and 3. Moreover, the subject matter disclosed herein can be applied to any type, form, or version of video coding, as well as any extension of any such standards and recommendations, whether described in a standard or recommendation, and whether existing or to be developed in the future. Unless otherwise indicated or technically excluded, the aspects described in this application can be used alone or in combination.

[0070] In the examples described in this application, various numerical values are used, such as the number of bits, bit depth, etc. These and other specific values are for illustrative purposes only, and the aspects being described are not limited to these specific values.

[0071] FIG. 2 is a diagram showing an exemplary video encoder. While variations of the exemplary encoder 200 are contemplated, the encoder 200 is described below for purposes of clarity without describing all the expected variations.

[0072] Before encoding, the video sequence can undergo pre-encoding processing (201), such as applying a color conversion to the input color picture (e.g., conversion from RGB4:4:4 to YCbCr4:2:0), or performing remapping of the input picture components (e.g., using histogram equalization of one of the color components) to obtain a more flexible signal distribution for compression. Metadata can be associated with the pre-processing and attached to the bitstream.

[0073] In encoder 200, a picture is encoded by encoder elements as follows. The picture to be encoded is divided (202) and processed, for example, in units of coding units (CUs). Each unit is encoded using, for example, either an intra mode or an inter mode. When a unit is encoded in the intra mode, intra prediction (260) is performed. In the inter mode, motion estimation (275) and motion compensation (270) are performed. The encoder makes a decision (205) as to whether to use the intra mode or the inter mode to encode a unit, and indicates the intra / inter decision, for example, by a prediction mode flag. The prediction residual is calculated, for example, by subtracting the block predicted from the original image block (210).

[0074] Next, the prediction residual is transformed (225) and quantized (230). The quantized transform coefficients, along with motion vectors and other syntax elements, are entropy-coded (245) to output a bitstream. The encoder can skip the transform and apply quantization directly to the untransformed residual signal. The encoder can bypass both the transform and the quantization, i.e., the residual is directly coded without applying the transform process or the quantization process.

[0075] The encoder decodes the encoded block to provide a reference for further prediction. The quantized transform coefficients are inverse quantized (240), inverse transformed (250), and the prediction residual is decoded. The decoded prediction residual and the predicted block are combined (255) to reconstruct the image block. An in-loop filter (265) is applied to the reconstructed picture to perform, for example, deblocking / Sample Adaptive Offset (SAO) filtering to reduce encoding artifacts. The filtered image is stored in a reference picture buffer (280).

[0076] FIG. 3 is a diagram showing an example of a video decoder. In an exemplary decoder 300, a bitstream is decoded by decoder elements as described below. The video decoder 300 generally implements a decoding path that is the reverse of the encoding path described in FIG. 2. Further, the encoder 200 generally performs video decoding as part of the encoding of video data.

[0077] Specifically, the input to the decoder includes a video bitstream, which can be generated by the video encoder 200. The bitstream is first entropy decoded (330) to obtain transform coefficients, motion vectors, and other coded information. Picture partitioning information indicates how a picture is partitioned. Thus, the decoder can partition the picture according to the decoded picture partitioning information (335). The transform coefficients are inverse quantized (340), inverse transformed (350), and the prediction residual is decoded. The decoded prediction residual and the predicted block are combined (355) to reconstruct an image block. The predicted block can be obtained from intra prediction (360) or motion compensated prediction (i.e., inter prediction) (375) (370). An in-loop filter (365) is applied to the reconstructed image. The filtered image is stored in a reference picture buffer (380).

[0078] The decoded picture can further undergo post-decoding processing (385), such as inverse color conversion (e.g., conversion from YCbCr 4:2:0 to RGB 4:4:4), or inverse remapping that performs the reverse of the remapping process performed in pre-encoding processing (201). The post-decoding processing can use metadata derived in pre-encoding processing and signaled in the bitstream. In an example, the decoded image (e.g., after the application of the in-loop filter (365) and / or when post-decoding processing is used, after post-decoding processing (385)) can be sent to a display device for rendering to the user.

[0079] FIG. 4 is a diagram illustrating an example of a system in which various aspects and embodiments described in this specification can be implemented. System 400 can be embodied as a device that includes various components described below and is configured to perform one or more of the aspects described in this specification. Examples of such devices include, but are not limited to, various electronic devices such as personal computers, laptop computers, smartphones, tablet computers, digital multimedia set-top boxes, digital television receivers, personal video recording systems, connected home appliances, and servers. The elements of System 400 can be embodied in a single integrated circuit (IC), multiple ICs, and / or separate components, either alone or in combination. For example, in at least one embodiment, the processing and encoder / decoder elements of System 400 are distributed across multiple ICs and / or separate components. In various embodiments, System 400 is communicatively coupled to one or more other systems or other electronic devices, for example, via a communication bus or through dedicated input and / or output ports. In various embodiments, System 400 is configured to implement one or more of the aspects described in this document.

[0080] System 400 includes, for example, at least one processor 410 configured to execute instructions loaded therein to implement various aspects described herein. The processor 410 can include an embedded memory, an input / output interface, and various other circuits known in the art. System 400 includes at least one memory 420 (e.g., a volatile memory device and / or a non-volatile memory device). System 400 includes a storage device 440, which can include a non-volatile memory and / or a volatile memory, such as electrically erasable programmable read-only memory (EEPROM), read-only memory (ROM), programmable read-only memory (PROM), random access memory (RAM), dynamic random access memory (DRAM), static random access memory (SRAM), flash, magnetic disk drive, and / or optical disk drive, but is not limited thereto. The storage device 440 can include, by way of non-limiting example, an internal storage device, an attached storage device (including removable and non-removable storage devices), and / or a network-accessible storage device.

[0081] System 400 includes, for example, an encoder / decoder module 430 configured to process data to provide encoded video or decoded video, and the encoder / decoder module 430 can include its own processor and memory. The encoder / decoder module 430 represents a module that can be included in a device for implementing an encoding function and / or a decoding function. As is known, a device can include one or both of an encoding module and a decoding module. Additionally, the encoder / decoder module 430 can be implemented as a separate element of System 400 or can be incorporated within the processor 410 as a combination of hardware and software, as is known to those skilled in the art.

[0082] The program code to be loaded into the processor 410 or the encoder / decoder 430 to execute the various aspects described herein can be stored in the storage device 440 and subsequently loaded into the memory 420 for execution by the processor 410. According to various embodiments, one or more of the processor 410, the memory 420, the storage device 440, and the encoder / decoder module 430 can store one or more of the various items during the implementation of the processes described in this document. Such stored items can include, but are not limited to, input video, decoded video, or a portion of the decoded video, bitstreams, matrices, variables, and intermediate or final results from the processing of equations, formulas, operations, and operation logic.

[0083] In some embodiments, the internal memory of the processor 410 and / or the encoder / decoder module 430 is used to store instructions and provide a working memory for the processing required during encoding or decoding. However, in other embodiments, an external memory of the processing device (e.g., the processing device can be either the processor 410 or the encoder / decoder module 430) is used for one or more of these functions. The external memory can be the memory 420 and / or the storage device 440, such as dynamic volatile memory and / or non-volatile flash memory. In some embodiments, an external non-volatile flash memory is used, for example, to store the operating system of a television. In at least one embodiment, a high-speed external dynamic volatile memory such as RAM is used as a working memory for video encoding and decoding operations.

[0084] Inputs to the elements of system 400 can be provided through various input devices as directed by block 445. Such input devices include, but are not limited to, (i) a radio frequency (RF) section that receives, for example, an RF signal transmitted over the airwaves by a broadcast station, (ii) a component (COMP) input terminal (or set of COMP input terminals), (iii) a universal serial bus (USB) input terminal, and / or (iv) a high definition multimedia interface (HDMI) input terminal. Other embodiments include composite video, although not shown in FIG. 4.

[0085] In various embodiments, the input device of block 445 has respective input processing elements associated therewith, as is known in the art. For example, the RF portion may be associated with elements suitable for (i) selecting a desired frequency (also referred to as selecting a signal or band-limiting a signal to a frequency within a band), (ii) down-converting the selected signal, (iii) band-limiting again to a narrower frequency band to select a signal frequency band, which may be referred to as a channel in certain embodiments, for example, (iv) demodulating the down-converted and band-limited signal, and (v) performing error correction, and / or (vi) demultiplexing to select a desired data packet stream. The RF portion of various embodiments may include one or more elements for performing these functions, such as a frequency selector, a signal selector, a band limiter, a channel selector, a filter, a down-converter, a demodulator, an error corrector, and a demultiplexer. The RF section can include a tuner for performing various of these functions, including, for example, down-converting a received signal to a lower frequency (e.g., an intermediate frequency or near baseband frequency) or to baseband. In one set-top box embodiment, the RF portion and its associated input processing elements receive an RF signal transmitted by a wired (e.g., cable) medium and perform frequency selection by filtering, down-converting, and re-filtering to a desired frequency band. Various embodiments may rearrange the order of the (and other) elements described above, remove some of these elements, and / or add other elements to perform similar or different functions. Adding elements can include, for example, inserting elements between existing elements, such as inserting an amplifier and an analog-to-digital converter. In various embodiments, the RF portion includes an antenna.

[0086] The USB terminal and / or the HDMI terminal can each include an interface processor for connecting the system 400 to other electronic devices via a USB connection and / or an HDMI connection. It should be understood that various aspects of input processing, such as Reed-Solomon error correction, can be implemented, for example, as needed, within a separate input processing IC or within the processor 410. Similarly, aspects of USB or HDMI interface processing can be implemented, as needed, within a separate interface IC or within the processor 410. Demodulation, error correction, and the demultiplexed stream are provided to various processing elements, including, for example, the processor 410 and an encoder / decoder 430 that operates in combination with memory and storage elements, to process the data stream required to present to the output device.

[0087] Various elements of the system 400 can be provided within an integrated housing. Within the integrated housing, the various elements can be interconnected using an internal bus known in the art, including a suitable connection device 425, such as an Inter-IC (I2C) bus, wiring, and a printed circuit board, and data can be transmitted between them.

[0088] The system 400 includes a communication interface 450 that enables communication with other devices via a communication channel 460. The communication interface 450 can include, but is not limited to, a transceiver configured to transmit and receive data via the communication channel 460. The communication interface 450 can include, but is not limited to, a modem or a network card, and the communication channel 460 can be implemented within, for example, a wired medium and / or a wireless medium.

[0089] In various embodiments, data is streamed to system 400 or otherwise provided using a Wi-Fi network, such as a wireless network like IEEE 802.11 (where IEEE refers to the Institute of Electrical and Electronics Engineers). The Wi-Fi signals of these embodiments are received via communication channel 460 and communication interface 450 adapted for Wi-Fi communication. The communication channel 460 of these embodiments is typically connected to an access point or router that provides access to an external network, including the Internet, to enable streaming applications and other over-the-top communications. Other embodiments provide streamed data to system 400 using a set-top box that distributes data via the HDMI connection of input block 445. Still other embodiments provide streamed data to system 400 using the RF connection of input block 445. As noted above, various embodiments provide data in a non-streaming fashion. Additionally, various embodiments use wireless networks other than Wi-Fi, such as cellular networks or Bluetooth® networks.

[0090] System 400 can provide output signals to various output devices, including display 475, speaker 485, and other peripheral devices 495. The display 475 in various embodiments includes, for example, one or more of a touch screen display, an organic light emitting diode (OLED) display, a curved display, and / or a foldable display. The display 475 may be for a television, a tablet, a laptop, a mobile phone, or other device. The display 475 can also be integrated with other components (e.g., within a smartphone) or separated (e.g., an external monitor for a laptop). The other peripheral devices 495 include, in various embodiments, one or more of a stand-alone digital video disc (or digital versatile disc) (DVD for both terms), a disc player, a stereo system, and / or a lighting system. Various embodiments use one or more peripheral devices 495 that provide functions based on the output of system 400. For example, a disc player performs the function of playing back the output of system 400.

[0091] In various embodiments, the control signal uses signaling such as AV.Link, Consumer Electronics Control (CEC), or other communication protocols that enable control between devices regardless of the presence or absence of user intervention, to communicate between the system 400 and the display 475, the speaker 485, or other peripheral devices 495. The output devices can be communicatively coupled to the system 400 via dedicated connections through their respective interfaces 470, 480, and 490. Alternatively, the output devices can be connected to the system 400 using the communication channel 460 via the communication interface 450. The display 475 and the speaker 485 may be integrated into a single unit together with other components of the system 400 in an electronic device such as a television. In various embodiments, the display interface 470 includes a display driver such as a timing controller (TCon) chip.

[0092] The display 475 and the speaker 485 can alternatively be separate from one or more of the other components, for example, if the RF portion of the input 445 is part of a separate set-top box. In various examples where the display 475 and the speaker 485 are external components, the output signal can be provided via a dedicated output connection including, for example, an HDMI port, a USB port, or a COMP output.

[0093] These embodiments can be executed by computer software implemented by the processor 410, or by hardware, or by a combination of hardware and software. As a non-limiting example, these embodiments can be implemented by one or more integrated circuits. The memory 420 can be of any type suitable for the technical environment, and as a non-limiting example, can be implemented using any suitable data storage technology such as optical memory devices, magnetic memory devices, semiconductor-based memory devices, built-in memory, and removable memory devices. The processor 410 can be of any type suitable for the technical environment, and as a non-limiting example, can include one or more of a microprocessor, a general-purpose computer, a dedicated computer, and a multi-core architecture-based processor.

[0094] Various implementations involve decoding. "Decoding" as used in this application can include, for example, all or part of the processing performed on the received encoded sequence to generate a final output suitable for display. In various embodiments, such a process typically includes one or more of the processes performed by a decoder, such as entropy decoding, inverse quantization, inverse transformation, and differential decoding. In various embodiments, such processing can further or alternatively include the processing performed by the decoders of the various implementation forms described in this application, such as determining that template-based prediction is valid for the current block, determining a predicted block and a template orientation for the current block based on template matching, and decoding the current block based on the predicted block and the template orientation.

[0095] As a further example, in one embodiment, "decoding" refers only to entropy decoding, in another embodiment, "decoding" refers only to differential decoding, and in another embodiment, "decoding" refers to a combination of entropy decoding and differential decoding. Whether the phrase "decoding process" is intended to specifically refer to a subset of operations or to refer to a more extensive decoding process as a whole will become apparent based on the context of the specific description and is considered to be fully understood by those skilled in the art.

[0096] Various implementations involve encoding. Similar to the above considerations regarding "decoding", "encoding" as used in this application can include, for example, all or part of the processing performed on an input video sequence to generate an encoded bitstream. In various embodiments, such a process typically includes one or more of the processes performed by an encoder, such as splitting, differential encoding, transformation, quantization, and entropy encoding. In various embodiments, such processing can further or alternatively include processing performed by encoders of various implementation forms described in this application, such as determining that template-based prediction is effective for the current block, determining a predicted block and template orientation for the current block based on template matching, and encoding the current block based on the predicted block and template orientation.

[0097] As a further example, in one embodiment, "encoding" refers only to entropy encoding, in another embodiment, "encoding" refers only to differential encoding, and in another embodiment, "encoding" refers to a combination of differential encoding and entropy encoding. Whether the phrase "encoding process" is intended to specifically refer to a subset of operations or to refer to a more extensive encoding process as a whole will become apparent based on the context of the specific description and is considered to be fully understood by those skilled in the art.

[0098] If the figure is presented as a flow chart, it should be understood that the figure also provides the block diagram of the corresponding device. Similarly, if the figure is presented as a block diagram, it should be understood that the figure also provides the flow chart of the corresponding method / process.

[0099] The implementations and aspects described in this specification can be implemented, for example, as a method or process, an apparatus, a software program, a data stream, or a signal. Even if considered only in the context of a single form of implementation (for example, considered only as a method), the implementation of the features considered can also be implemented in other forms (for example, an apparatus or a program). For example, the apparatus can be implemented in appropriate hardware, software, and firmware. The method can be implemented, for example, by a processor that generally refers to a processing device, including a computer, a microprocessor, an integrated circuit, or a programmable logic device. The processor includes, for example, communication devices such as a computer, a mobile phone, a portable / personal digital assistant ("PDA"), and other devices that facilitate the communication of information between end users.

[0100] References to "one example" or "an example" or "one implementation" or "an implementation", and other variations thereof, mean that the specific features, structures, characteristics, etc. described in connection with the example are included in at least one example. Therefore, the phrases "in one example" or "in an example" or "in one implementation" or "in an implementation" that appear in various places throughout this application, and the appearance of any other variations, do not necessarily all refer to the same example.

[0101] Additionally, this application may refer to "determining" various information. Determining information can include, for example, one or more of estimating information, calculating information, predicting information, or retrieving information from memory. Obtaining can include receiving, retrieving, constructing, generating, and / or determining.

[0102] Furthermore, this application may refer to "accessing" various information. Accessing information can include, for example, one or more of receiving information, (e.g., from memory) obtaining information, storing information, moving information, copying information, calculating information, determining information, predicting information, or estimating information.

[0103] Additionally, this application may refer to "receiving" various information. Receiving is intended to be a broad term, similar to "accessing". Receiving information can include, for example, one or more of accessing information or (e.g., from memory) obtaining information. Further, "receiving" typically involves, in some way, during operations such as storing information, processing information, transmitting information, moving information, copying information, deleting information, calculating information, determining information, predicting information, or estimating information.

[0104] For example, in the cases of "A / B", "A and / or B", and "at least one of A and B", it should be understood that any use of the following, namely " / ", "and / or", and "at least one of", is intended to encompass the selection of only the first-listed option (A), or only the second-listed option (B), or the selection of both options (A and B). As a further example, in the cases of "A, B, and / or C" and "at least one of A, B, and C", such expressions are intended to encompass the selection of only the first-listed option (A), or only the second-listed option (B), or only the third-listed option (C), or only the first and second-listed options (A and B), or only the first and third-listed options (A and C), or only the second and third-listed options (B and C), or the selection of all three options (A and B and C). As will be apparent to those skilled in the art of the relevant technical field, this can be extended by the number of listed items.

[0105] Also, as used herein, the term "signaling" means, among other things, indicating something to a corresponding decoder. In this way, in one example, the same parameters are used on both the encoder side and the decoder side. Thus, for example, an encoder can send a particular parameter to a decoder (explicit signaling) so that the decoder can use the same particular parameter. In contrast, if the decoder already has other parameters along with that particular parameter, signaling can be used that does not perform the transmission (implicit signaling) simply to enable the decoder to know and select that particular parameter. By avoiding the transmission of any actual functionality, bit savings are achieved in various embodiments. It will be understood that signaling can be accomplished in a variety of ways. For example, in various embodiments, one or more syntax elements, flags, etc. are used to signal information to a corresponding decoder. The foregoing relates to the verb form of the word "signal", but the word "signal" can also be used as a noun in this specification.

[0106] As will be apparent to those of ordinary skill in the art, implementations can generate various signals that are formatted to carry information that can be stored or transmitted, for example. The information can include, for example, instructions for implementing a method or data generated by one of the described implementations. For example, a signal can be formatted to carry the bitstream of the described example. For example, such a signal can be formatted as an electromagnetic wave (e.g., using the radio frequency portion of the spectrum) or as a baseband signal. Formatting can include, for example, encoding a data stream and modulating a carrier wave with the encoded data stream. The information carried by the signal can be, for example, analog information or digital information. As is known, signals can be transmitted over a variety of different wired or wireless links. A signal can be stored on a processor-readable medium or accessed or received from a processor-readable medium.

[0107] Numerous embodiments are described herein. The features of the embodiments can be provided alone or in any combination across various claim categories and types. Further, the embodiments can include one or more of the features, devices, or aspects described herein, alone or in any combination, across various claim categories and types. For example, the features described herein can be implemented in a bitstream or signal that includes information generated as described herein. The information can enable a decoder to decode the bitstream, encoder, bitstream, and / or decoder according to any of the described embodiments. For example, the features described herein can be implemented by generating and / or transmitting and / or receiving and / or decoding a bitstream or signal. For example, the features described herein can be implemented as a method, process, apparatus, medium storing instructions, medium storing data, or signal. For example, the features described herein can be implemented by a TV, set-top box, mobile phone, tablet, or other electronic device that performs decoding. The TV, set-top box, mobile phone, tablet, or other electronic device can display the resulting image (e.g., an image from the residual reconstruction of a video bitstream) (e.g., using a monitor, screen, or other type of display). The TV, set-top box, mobile phone, tablet, or other electronic device can receive a signal including an encoded image and perform decoding.

[0108] The syntax element values can be predicted from previously coded blocks where the pixels surrounding the template block (e.g., L-shaped pixels) match the current block template. The embodiments described herein can increase coding gain and / or reduce the signaling of syntax elements.

[0109] For example, the encoder may determine whether to use a template-based coding mode for the current block. Based on the decision to use a template-based coding mode for the current block, the encoder can bypass the signaling of at least one syntax element of the current block. The current block may be encoded based on the template-based coding mode. Based on the decision not to use a template-based coding mode for the current block, at least one syntax element of the current block may be included in the bitstream.

[0110] These examples may be performed by a device having at least one processor. The device may be an encoder or a decoder. These examples may be stored on a non-transitory computer-readable medium and may be performed by a computer program product including program code instructions. These examples may be performed by a computer program including program code instructions. These examples may be performed by a bitstream including information representing a template matching prediction mode.

[0111] Examples of intra-template matching prediction (intra-TMP) are provided herein. Intra-TMP may be an intra prediction mode in which the best prediction block can be copied from the reconstructed portion of the current frame where the L-shaped template matches the current template. For a predefined search range, the encoder can search for the template most similar to the current template in the reconstructed portion of the current frame and use the corresponding block as the prediction block. The encoder may signal the use of this mode, and the same prediction operation may be performed on the decoder side.

[0112] FIG. 5 illustrates an example of an intra-template matching search area. The prediction signal may be generated by matching the L-shaped causal neighborhood of the current block with another block within a predefined search area in FIG. 5 that includes the following. R1: Current CTU R2: Upper left CTU R3: Upper CTU R4: Left CTU

[0113] The sum of absolute differences (SAD) can be used as the cost function. Within a region (e.g., within each region), the decoder may search for the template with the minimum SAD for the current template and use the corresponding block as the predicted block. The dimensions of the region (SearchRange_w, SearchRange_h) can be set in proportion to the block dimensions (BlkW, BlkH) such that the SAD comparison per pixel is a constant. It is as follows. SearchRange_w = a * BlkW SearchRange_h = a * BlkH In the formula, "α" can be a constant that controls the trade-off between gain and complexity. For example, "α" may be equal to 5.

[0114] The intra-template matching tool may be effective for CUs having a size with a width and height of 64 or less. This maximum CU size for intra-template matching may be configurable. The intra-template matching prediction mode may be signaled at the CU level through an intra-template matching prediction indication. The intra-template matching prediction mode may be effective at the CU level through a template matching prediction indication when decoder side intra mode derivation (DIMD) is not effective (e.g., DIMD = 0). Examples of intra-template matching are described herein, but the examples herein can also be applied to inter-template matching.

[0115] FIG. 6 illustrates an example of symmetry in a screen content picture. In the example, the intra block copy (IBC) mode may be extended by an inversion operation. The encoder can choose to invert the prediction block obtained by IBC (e.g., invert horizontally, vertically, or diagonally) and signal a syntax element indicating the inversion direction. This may enable some patterns to be repeated in the reverse spatial ordering (e.g., as shown in FIG. 6).

[0116] In the example, the intra-template matching process may allow inversion (e.g., horizontal, vertical, and diagonal inversion), rotation, and / or other reorientations. This may enable some patterns to be repeated in the reverse or other adjusted spatial order. This may involve less signaling since the intra-template matching search may result in an inversion direction.

[0117] FIG. 7 illustrates an example of template matching extended with different template orientations (e.g., inverted directions and / or rotations). To perform template matching with different template orientations, the following may be executed.

[0118] [Table 1]

[0119] In an embodiment, the decoder or encoder may determine that template-based prediction is valid for the current block. The prediction block and template orientation for the current block may be determined for the current block based on template matching. The current block may be decoded or encoded based on the prediction block and template orientation. Template matching prediction (TMP) may be performed by matching a template of the prediction block within a specific range inside the reconstructed area. The template may be composed of L-shaped pixels (e.g., template sample values) surrounding the prediction block in the upward and leftward directions (e.g., as shown in FIG. 7). In an embodiment, the template may be adjusted (e.g., as shown in FIG. 7). The adjusted template may be flipped horizontally, flipped vertically, flipped diagonally, rotated, or adjusted in other ways.

[0120] To find a prediction block for the current block with a given orientation (e.g., no flip, horizontal flip, vertical flip, diagonal flip, rotation, or other orientation adjustment), the decoder or encoder may obtain several template orientations and determine a template orientation for the current block from these template orientations. In an embodiment, the TMP search can be repeated to find the best template orientation. To find the best prediction block with the best template orientation, several template differences between the template of the current block and each of several templates of the prediction block in a given template orientation (e.g., no flip, horizontal flip, vertical flip, diagonal flip, rotation, or other orientation adjustment) may be calculated.

[0121] The best prediction block having the best template orientation can be the one with the minimum of these calculated template differences. The calculated template differences can indicate the sample value differences between each sample in the template of the current block and the samples in the template of the prediction block in a given template orientation. In an example, a first template difference can be calculated between the template of the current block and the template of the first prediction block in a first template orientation. A second template difference can be calculated between the template of the current block and the template of the second prediction block in a second template orientation. The best prediction having the best template orientation for the current block can be the smaller template difference of the first template difference and the second template difference.

[0122] A prediction block (e.g., the best prediction block) can be obtained (e.g., copied) while its orientation is being changed (e.g., while being inverted). The prediction block can be adjusted based on the determined template orientation (e.g., the best template orientation). The current block can be decoded or encoded based on the adjusted prediction block. In an example, the determined template orientation can be a horizontally inverted template orientation, a vertically inverted template orientation, a diagonally inverted template orientation, or a rotated template orientation. The prediction block can be reoriented based on the determined template orientation. The current block can be decoded or encoded based on the reoriented block.

[0123] Examples of template matching using a reduced range with refinement can be performed by a decoder and / or an encoder. In an example, the complexity of the intra-template matching can be multiplied by the number of tested inversion directions (e.g., this is because the search operation can be repeated the number of permitted inversions). Two template matching searches can be applied. In an example, a matching block can be found using a first template matching search (e.g., using a normal TMP associated with an upright template orientation). A refined search area can be determined to perform a second template matching search based on the matching block. In an example, the best template orientation (e.g., the best inversion) can be found around the location of the matching block. The area around the location of the matching block can be the refined search area. The predicted block and template orientation for the current block can be determined based on the second template matching search performed within the refined search area. This can limit the search to a small range around the matching block, potentially reducing the search for the template orientation (e.g., the best inversion). The current block can be decoded and / or encoded based on the predicted block and template orientation found within the refined search area.

[0124] FIG. 8 illustrates an example of search template sharing. Multiple (e.g., two) template matching searches may be performed. Matching blocks may be identified based on a first template matching search. A template difference may be calculated between the template of the current block and the template of the matching block. A candidate template orientation for a second template matching search may be based on the calculated template difference. A decoder and / or an encoder may perform the second template matching search based on the determined candidate template orientation. The calculated template difference may indicate a sample value difference between each sample in the template of the current block and each sample in the template of the matching block in a given template orientation.

[0125] In an example, a first template difference may be calculated based on the upper template of the current block (e.g., A shown in FIG. 8) and the upper template of the matching block, a second template difference may be calculated based on the left template of the current block (e.g., B shown in FIG. 8) and the left template of the matching block, and a third template difference may be calculated based on both the upper template and the left template of the current block and both the upper template and the left template of the matching block.

[0126] Based on the first template difference being the smallest among the first, second, and third template differences, the vertically flipped template orientation can be determined to be a candidate template orientation for the second template matching search (e.g., the vertically flipped version of the upper block, A+D shown in FIG. 8). In an embodiment, the diagonally flipped version of the upper block (e.g., A+C shown in FIG. 8) can also be used. Based on the second template difference being the smallest among the first, second, and third template differences, the horizontally flipped template orientation can be determined to be a candidate template orientation for the second template matching search (e.g., the horizontally flipped version of the left block, B+F shown in FIG. 8). In an embodiment, the diagonally flipped version of the left block (e.g., B+E shown in FIG. 8) can also be used. Based on the third template difference being the smallest among the first, second, and third template differences, the upright template orientation of the current block can be determined to be a candidate template orientation for the second template matching search (e.g., A+B shown in FIG. 8).

[0127] In embodiments using search template sharing, the flipped versions of the upper block and / or the left block can be inspected only if necessary. In an embodiment, the search template sharing example can be used when the template size is 1 (e.g., the template sizes of the matching block and the current block are equal). In an embodiment, the flipped versions of the upper block and / or the left may be inspected only up to a plurality of times.

[0128] In an embodiment, the candidate template orientation can be based on the minimum template difference between two of the first, second, and third template differences. In an embodiment, the second template matching search can be performed based on using only the inverted version of the upper block (e.g., in the vertical or diagonal direction) as a candidate orientation, the inverted version of the left block (e.g., in the horizontal or diagonal direction) as a candidate orientation, or the upright version of the current block as a candidate orientation. This may require only one or two additional calculations to be further added to the TMP calculation.

[0129] The encoder may include an indication in the video data to indicate whether to perform a multi-template orientation search (e.g., for a coding block). The encoder may determine whether the template matching search should be performed in multiple template orientations and may indicate that determination in the video data. The decoder may receive an indication of whether to perform a multi-template orientation search for a second coding block. Based on the multi-template orientation search indication, the decoder may determine whether to perform the multi-template orientation search. Based on an indication indicating to enable the multi-template orientation search, the decoder may obtain multiple template orientations. The template orientation of a coding block may be determined from multiple template orientations (e.g., as described herein). Based on an indication indicating to disable the multi-template orientation search for a coding block, the decoder may perform a template matching search based on a default template orientation (e.g., the upright orientation).

[0130] The multi-template orientation search indication (e.g., a flag) or an associated indication may be signaled at the CU level. In some embodiments, a higher level indication may be used to indicate whether inversion is permitted for the current slice (e.g., slice indication), the current picture (e.g., picture header indication), or the entire sequence (e.g., SPS indication).

[0131] FIG. 9 illustrates an exemplary decoding process by template matching search in different template orientations. As shown in FIG. 9, it can be determined that template-based prediction is valid for the current block. The prediction block and the template orientation can be determined for the current block based on template matching (e.g., based on the determination that template-based prediction is valid). The current block can be decoded based on the prediction block and the template orientation.

[0132] FIG. 10 illustrates an exemplary encoding process by template matching search in different template orientations. As shown in FIG. 10, it can be determined that template-based prediction is valid for the current block. The prediction block and the template orientation can be determined for the current block based on template matching (e.g., based on the determination that template-based prediction is valid). The current block can be encoded based on the prediction block and the template orientation.

[0133] The features and elements are described above in specific combinations, but one of ordinary skill in the art will understand that each feature or element can be used alone or in any combination with other features and elements. Additionally, the methods described herein can be implemented in a computer program, software, or firmware incorporated into a computer-readable medium for execution by a computer or processor. Examples of computer-readable media include electronic signals (transmitted via wired or wireless connections) and computer-readable storage media. Examples of computer-readable storage media include, but are not limited to, magnetic media such as read-only memory (ROM), random access memory (RAM), registers, cache memory, semiconductor memory devices, internal hard disks, and removable disks, magneto-optical media, and optical media such as CD-ROM disks and digital versatile disks (DVDs). A processor associated with software can be used to implement a radio frequency transceiver for use in a WTRU, UE, terminal, base station, RNC, or any host computer.

Claims

1. A method for video decoding, comprising: determining that template-based prediction is valid for a current block; determining a prediction block and a template orientation for the current block based on template matching; and decoding the current block based on the prediction block and the template orientation. A method for video decoding.

2. obtaining a plurality of template orientations; and determining the template orientation from the plurality of template orientations. The method according to claim 1, further comprising.

3. calculating a first template difference between a template of the current block and a template of a first prediction block in a first template orientation; calculating a second template difference between the template of the current block and a template of a second prediction block in a second template orientation; and determining the prediction block and the template orientation for the current block based on the smaller of the first template difference and the second template difference. The method according to claim 1, further comprising.

4. wherein the template matching is a second template matching search, and the method comprises: determining a matching block based on a first template matching search associated with an upright template orientation; and determining a refined search area for performing the second template matching search based on the matching block, wherein the prediction block and the template orientation for the current block are determined based on the second template matching search performed within the refined search area. The method according to claim 1.

5. further comprising adjusting the prediction block based on the determined template orientation, wherein the current block is decoded based on the adjusted prediction block. The method according to claim 1.

6. wherein the determined template orientation is a horizontally flipped template orientation, a vertically flipped template orientation, a diagonally flipped template orientation, or a rotated template orientation; The method according to claim 1, further comprising reorienting the prediction block based on the determined template orientation, wherein the current block is decoded based on the reoriented prediction block.

7. Determining a matching block based on a first template matching search; Calculating a first template difference based on the upper template of the current block and the upper template of the matching block, calculating a second template difference based on the left template of the current block and the left template of the matching block, and calculating a third template difference based on the upper template and the left template of the current block and the upper template and the left template of the matching block; Determining a candidate template orientation for a second template matching search based on the first, second, and third template differences, Based on the first template difference being the smallest among the first, second, and third template differences, determining that a vertically flipped template orientation is the candidate template orientation for the second template matching search; Based on the second template difference being the smallest among the first, second, and third template differences, determining that a horizontally flipped template orientation is the candidate template orientation for the second template matching search; The method according to claim 1, further comprising performing the second template matching search based on the determined candidate template orientation.

8. Receiving an instruction indicating whether to perform a multi-template orientation search for a second coding block; Based on the instruction indicating to perform the multi-template orientation search, obtaining a plurality of template orientations and determining the template orientation for the second coding block from the plurality of template orientations; Based on the instruction indicating to disable the multi-template orientation search for the second coding block, determining that the template orientation is upright. The method according to claim 1 further comprises.

9. A device for video decoding, Comprising a processor, the processor Determines that template-based prediction is valid for the current block, Based on template matching, determines a prediction block and a template orientation for the current block, A device configured to decode the current block based on the prediction block and the template orientation.

10. The processor Obtains a plurality of template orientations, The device according to claim 9, further configured to determine the template orientation from the plurality of template orientations.

11. The processor Calculates a first template difference between the template of the current block and the template of the first prediction block in the first template orientation, Calculates a second template difference between the template of the current block and the template of the second prediction block in the second template orientation, The device according to claim 9, further configured to determine the prediction block and the template orientation for the current block based on the smaller of the first template difference and the second template difference.

12. The template matching is a second template matching search, and the processor Determines a matching block based on a first template matching search associated with an upright template orientation, Is further configured to determine a refined search area for performing the second template matching search based on the matching block, and the prediction block and the template orientation for the current block are determined based on the second template matching search performed within the refined search area. The device according to claim 9.

13. The processor Is further configured to adjust the prediction block based on the determined template orientation, and the current block is decoded based on the adjusted prediction block. The device according to claim 9.

14. The determined template orientation is a horizontally inverted template orientation, a vertically inverted template orientation, a diagonally inverted template orientation, or a rotated template orientation, and the processor is further configured to reorient the prediction block based on the determined template orientation, and the current block is decoded based on the reoriented prediction block. The device according to claim 9.

15. The processor determines a matching block based on a first template matching search, calculates a first template difference based on the upper template of the current block and the upper template of the matching block, calculates a second template difference based on the left template of the current block and the left template of the matching block, and calculates a third template difference based on the upper template and the left template of the current block and the upper template and the left template of the matching block, determining a candidate template orientation for a second template matching search based on the first, second, and third template differences, determining that a vertically inverted template orientation is the candidate template orientation for the second template matching search based on the first template difference being the smallest among the first, second, and third template differences, determining that a horizontally inverted template orientation is the candidate template orientation for the second template matching search based on the second template difference being the smallest among the first, second, and third template differences, and further configured to perform the second template matching search based on the determined candidate template orientation. The device according to claim 9.

16. The processor receives an instruction indicating whether to perform a multi-template orientation search for a second coding block. Based on the instruction indicating to perform the multi-template orientation search, obtain a plurality of template orientations, and determine the template orientation for the second coding block from the plurality of template orientations, The device according to claim 9, further configured to determine that the template orientation is upright based on the instruction indicating to disable the multi-template orientation search for the second coding block.

17. A method for video encoding, comprising: determining that template-based prediction is valid for a current block; determining a prediction block and a template orientation for the current block based on template matching; encoding the current block based on the prediction block and the template orientation.

18. obtaining a plurality of template orientations; further comprising determining the template orientation from the plurality of template orientations, the method according to claim 17.

19. calculating a first template difference between the template of the current block and the template of a first prediction block in a first template orientation; calculating a second template difference between the template of the current block and the template of a second prediction block in a second template orientation; further comprising determining the prediction block and the template orientation for the current block based on the smaller of the first template difference and the second template difference, the method according to claim 17.

20. wherein the template matching is a second template matching search, and the method comprises: determining a matching block based on a first template matching search associated with an upright template orientation; determining a refined search area for performing the second template matching search based on the matching block, and the prediction block and the template orientation for the current block are determined based on the second template matching search performed within the refined search area, the method according to claim 17.

21. The method according to claim 17, further comprising adjusting the prediction block based on the determined template orientation, wherein the current block is encoded based on the adjusted prediction block.

22. The determined template orientation is a horizontally inverted template orientation, a vertically inverted template orientation, a diagonally inverted template orientation, or a rotated template orientation, The method according to claim 17, further comprising reorienting the prediction block based on the determined template orientation, wherein the current block is encoded based on the reoriented prediction block.

23. Determining a matching block based on a first template matching search; Calculating a first template difference based on the upper template of the current block and the upper template of the matching block, calculating a second template difference based on the left template of the current block and the left template of the matching block, and calculating a third template difference based on the upper template and the left template of the current block and the upper template and the left template of the matching block; Determining a candidate template orientation for a second template matching search based on the first, second, and third template differences, Based on the first template difference being the smallest among the first, second, and third template differences, determining that a vertically inverted template orientation is the candidate template orientation for the second template matching search; Based on the second template difference being the smallest among the first, second, and third template differences, determining that a horizontally inverted template orientation is the candidate template orientation for the second template matching search; The method according to claim 17, further comprising performing the second template matching search based on the determined candidate template orientation.

24. Signaling an indication of whether to perform a multi-template orientation search for a second coding block. Based on the instruction indicating to perform the multi-template orientation search, obtain a plurality of template orientations, and determine the template orientation for the second coding block from the plurality of template orientations; Based on the instruction indicating to disable the multi-template orientation search for the second coding block, further including determining that the template orientation is upright, the method according to claim 17. **Claim 25** A device for video encoding, comprising a processor, and the processor determines that template-based prediction is valid for the current block, determines a prediction block and a template orientation for the current block based on template matching, A device for video encoding, configured to encode the current block based on the prediction block and the template orientation. **Claim 26** The processor obtains a plurality of template orientations, The device according to claim 25, further configured to determine the template orientation from the plurality of template orientations. **Claim 27** The processor calculates a first template difference between the template of the current block and the template of the first prediction block in the first template orientation, calculates a second template difference between the template of the current block and the template of the second prediction block in the second template orientation, The device according to claim 25, further configured to determine the prediction block and the template orientation for the current block based on the smaller template difference of the first template difference and the second template difference. **Claim 28** The template matching is a second template matching search, and the processor determines a matching block based on a first template matching search associated with an upright template orientation. It is further configured to determine a refined search area for performing the second template matching search based on the matching block, wherein the predicted block and the template orientation for the current block are determined based on the second template matching search executed within the refined search area, the device according to claim 25.

29. The processor is further configured to adjust the predicted block based on the determined template orientation, wherein the current block is encoded based on the adjusted predicted block, the device according to claim 25.

30. The determined template orientation is a horizontally flipped template orientation, a vertically flipped template orientation, a diagonally flipped template orientation, or a rotated template orientation, and the processor is further configured to reorient the predicted block based on the determined template orientation, wherein the current block is encoded based on the reoriented predicted block, the device according to claim 25.

31. The processor is determining a matching block based on a first template matching search, calculating a first template difference based on the upper template of the current block and the upper template of the matching block, calculating a second template difference based on the left template of the current block and the left template of the matching block, and calculating a third template difference based on the upper template and the left template of the current block and the upper template and the left template of the matching block; determining a candidate template orientation for the second template matching search based on the first, second, and third template differences, wherein based on the first template difference being the smallest of the first, second, and third template differences, a vertically flipped template orientation is determined to be the candidate template orientation for the second template matching search, Based on the second template difference being the smallest among the first, second, and third template differences, determining that the horizontally flipped template orientation is the candidate template orientation for the second template matching search, The device according to claim 25, further configured to perform the second template matching search based on the determined candidate template orientation.

32. The processor Signaling an instruction indicating whether to perform a multi-template orientation search for a second coding block, Based on the instruction indicating to perform the multi-template orientation search, obtaining a plurality of template orientations and determining the template orientation for the second coding block from the plurality of template orientations, The device according to claim 25, further configured to determine that the template orientation is upright based on the instruction indicating to disable the multi-template orientation search for the second coding block.

33. A computer program product stored on a non-transitory computer-readable medium and including program code instructions for performing the steps of the method according to at least one of claims 1 to 8 and claims 17 to 24 when executed by at least one processor.

34. A computer-readable medium including program code instructions for performing the steps of the method according to at least one of claims 1 to 8 and claims 17 to 24 when executed by a processor.

35. Video data including information representing an encoded output generated according to one of the methods according to any one of claims 17 to 24.