Patent Description:
Geometric partitioning mode is a coding tool in a video coding method. In the geometric partitioning mode, an encoder may select two of a plurality of merge candidates for predicting a block unit in an image frame and provide two merge indices into a bitstream for a decoder to recognize the selected merge candidates.

The encoder and the decoder may split the block unit in the image frame along a partition line to generate a plurality of sub-blocks when the geometric partitioning mode is applied on the block unit. Some of the sub-blocks may be predicted based on only one of the two merge candidates, and other of the sub-blocks may be predicted based on both of the two merge candidates. Therefore, the encoder needs to select a prediction result of the block unit from a plurality of candidate results including a geometric result when the encoder tries a plurality of prediction modes including the geometric partitioning mode for predicting the block unit.

However, it is too complex for the encoder to predict the block unit in the geometric partitioning mode to generate the geometric result by selecting the partition line from a plurality of candidate lines and selecting the two merge candidates from the plurality of merge candidates. Therefore, in order to decrease the complexity of the encoding process, it may be important for the encoder to restrict the usage of the geometric partitioning mode for predicting the block unit. The decoder also needs to know how to determine that the geometric partitioning mode is disabled.

<NPL>, describes to enable/disable TPM and GEO mode depending on constraints on block size.

<CIT>, which is state of the art under Art. <NUM>(<NUM>) EPC, describes a method of video processing, comprising: determining, for a conversion between a current video block of a video and a bitstream representation of the video, an applicability of a geometric partitioning mode based on a rule; and performing the conversion based on the determining, an wherein the rule depends on a block width, a block height, and/or an aspect ratio of the current video block.

The above and other objects are achieved by a method of decoding a bitstream by an electronic device, a method of encoding video data by an electronic device and an electronic device as defined in the independent claims.

While the description generally presents each and every processing step/feature as optional (in particular using "may" formulations), the features of the independent claims, considered together, define the invention and are by no means optional.

Aspects of the present disclosure are best understood from the following detailed disclosure and the corresponding figures. Various features are not drawn to scale and dimensions of various features may be arbitrarily increased or reduced for clarity of discussion.

The following disclosure contains specific information pertaining to example implementations in the present disclosure. The figures and the corresponding detailed disclosure are directed to example implementations. However, the present disclosure is not limited to these example implementations. Other variations and implementations of the present disclosure will occur to those skilled in the art.

Unless noted otherwise, like or corresponding elements among the figures may be indicated by like or corresponding reference designators. The figures and illustrations in the present disclosure are generally not to scale and are not intended to correspond to actual relative dimensions.

For the purpose of consistency and ease of understanding, like features are identified (although, in some examples, not illustrated) by reference designators in the exemplary figures. However, the features in different implementations may differ in other respects and shall not be narrowly confined to what is illustrated in the figures.

The disclosure uses the phrases "in one implementation," or "in some implementations," may refer to one or more of the same or different implementations. The term "coupled" is defined as connected, whether directly or indirectly, through intervening components and is not necessarily limited to physical connections. The term "comprising" means "including, but not necessarily limited to" and specifically indicates open-ended inclusion or membership in the so-described combination, group, series and the equivalent.

For purposes of explanation and non-limitation, specific details such as functional entities, techniques, protocols, and standards are set forth for providing an understanding of the disclosed technology. In other examples, detailed disclosure of well-known methods, technologies, systems and architectures are omitted so as not to obscure the present disclosure with unnecessary details.

Persons skilled in the art will immediately recognize that any disclosed coding function(s) or algorithm(s) described in the present disclosure may be implemented by hardware, software or a combination of software and hardware. Disclosed functions may correspond to modules that are software, hardware, firmware, or any combination thereof.

A software implementation may include a program having computer executable instructions stored on computer readable medium such as memory or other type of storage devices. For example, one or more microprocessors or general-purpose computers with communication processing capability may be programmed with executable instructions and perform the disclosed function(s) or algorithm(s).

The microprocessors or general-purpose computers may be formed of applications specific integrated circuitry (ASIC), programmable logic arrays, and/or using one or more digital signal processors (DSPs). Although some of the disclosed implementations are oriented to software installed and executing on computer hardware, alternative implementations implemented as firmware or as hardware or combination of hardware and software are well within the scope of the present disclosure. The computer readable medium includes but is not limited to random-access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), flash memory, compact disc read-only memory (CD ROM), magnetic cassettes, magnetic tape, magnetic disk storage, or any other equivalent medium capable of storing computer-readable instructions.

<FIG> illustrates a block diagram of a system configured to encode and decode video data according to an example implementation of the present disclosure. The system <NUM> includes a first electronic device <NUM>, a second electronic device <NUM>, and a communication medium <NUM>.

The first electronic device <NUM> may be a source device including any device configured to encode video data and transmit encoded video data to the communication medium <NUM>. The second electronic device <NUM> may be a destination device including any device configured to receive encoded video data via the communication medium <NUM> and to decode encoded video data.

In at least one implementation, the first electronic device <NUM> may communicate via wire or wirelessly with the second electronic device <NUM> via the communication medium <NUM>. The first electronic device <NUM> may include a source module <NUM>, an encoder module <NUM>, and a first interface <NUM>. The second electronic device <NUM> may include a display module <NUM>, a decoder module <NUM>, and a second interface <NUM>. The first electronic device <NUM> may be a video encoder and the second electronic device <NUM> may be a video decoder.

In at least one implementation, the first electronic device <NUM> and/or the second electronic device <NUM> may be a mobile phone, a tablet, a desktop, a notebook, or other electronic devices. <FIG> illustrates one example of the first electronic device <NUM> and the second electronic device <NUM>. The first electronic device <NUM> and second electronic device <NUM> may include more or less components than illustrated or have a different configuration of the various illustrated components.

In at least one implementation, the source module <NUM> may include a video capture device to capture new video, a video archive to store previously captured video, and/or a video feed interface to receive video from a video content provider. The source module <NUM> may generate computer graphics-based data as the source video or generate a combination of live video, archived video, and computer-generated video as the source video. The video capture device may be a charge-coupled device (CCD) image sensor, a complementary metal-oxide-semiconductor (CMOS) image sensor, or a camera.

In at least one implementation, the encoder module <NUM> and the decoder module <NUM> may each be implemented as any of a variety of suitable encoder/decoder circuitry such as one or more microprocessors, a central processing unit (CPU), a graphic processing unit (GPU), a system on chip (SoC), digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), discrete logic, software, hardware, firmware or any combinations thereof. When implemented partially in software, a device may store the program having instructions for the software in a suitable, non-transitory computer-readable medium and execute the instructions in hardware using one or more processors to perform the disclosed methods. In at least one implementation, each of the encoder module <NUM> and the decoder module <NUM> may be included in one or more encoders or decoders, any of which may be integrated as part of a combined encoder/decoder (CODEC) in a device.

In at least one implementation, the first interface <NUM> and the second interface <NUM> may utilize customized protocols or follow existing standards or de facto standards including, but not limited to, Ethernet, IEEE <NUM> or IEEE <NUM> series, Wireless USB or telecommunication standards including, but not limited to, Global System for Mobile Communications (GSM), Code-Division Multiple Access <NUM> (CDMA2000), Time Division Synchronous Code Division Multiple Access (TD-SCDMA), Worldwide Interoperability for Microwave Access (WiMAX), Third Generation Partnership Project Long-Term Evolution (3GPP-LTE) or Time-Division LTE (TD-LTE). In at least one implementation, the first interface <NUM> and the second interface <NUM> may each include any device configured to transmit and/or store a compliant video bitstream via the communication medium <NUM> and to receive the compliant video bitstream via the communication medium130.

In at least one implementation, the first interface <NUM> and the second interface <NUM> may include a computer system interface that enables a compliant video bitstream to be stored on a storage device or to be received from the storage device. For example, the first interface <NUM> and the second interface <NUM> may include a chipset supporting Peripheral Component Interconnect (PCI) and Peripheral Component Interconnect Express (PCIe) bus protocols, proprietary bus protocols, Universal Serial Bus (USB) protocols, I2C, or any other logical and physical structure that may be used to interconnect peer devices.

In at least one implementation, the display module <NUM> may include a display using liquid crystal display (LCD) technology, plasma display technology, organic light emitting diode (OLED) display technology, or light emitting polymer display (LPD) technology with other display technologies used in other implementations. The display module <NUM> may include a high-definition display or an ultra-high-definition display.

<FIG> illustrates a block diagram of the decoder module <NUM> of the second electronic device <NUM> illustrated in <FIG> according to an example implementation of the present disclosure. The decoder module <NUM> includes an entropy decoder (e.g., entropy decoding unit <NUM>), a prediction processor (e.g., prediction process unit <NUM>), an inverse quantization/inverse transform processor (e.g., inverse quantization/inverse transform unit <NUM>), a summer (e.g., summer <NUM>), a filter (e.g., filtering unit <NUM>), and a decoded picture buffer (e.g., decoded picture buffer <NUM>). The prediction process unit <NUM> further includes an intra prediction processor (e.g., intra prediction unit <NUM>) and an inter prediction processor (e.g., inter prediction unit <NUM>). The decoder module <NUM> receives a bitstream and decodes the bitstream to output decoded video.

The entropy decoding unit <NUM> may receive the bitstream including a plurality of syntax elements from the second interface <NUM> in <FIG> and perform a parsing operation on the bitstream to extract syntax elements from the bitstream. As part of the parsing operation, the entropy decoding unit <NUM> may entropy decode the bitstream to generate quantized transform coefficients, quantization parameters, transform data, motion vectors, intra modes, partition information, and other syntax information.

In at least one implementation, the entropy decoding unit <NUM> may perform context adaptive variable length coding (CAVLC), context adaptive binary arithmetic coding (CABAC), syntax-based context-adaptive binary arithmetic coding (SBAC), probability interval partitioning entropy (PIPE) coding or another entropy coding technique to generate the quantized transform coefficients. In at least one implementation, the entropy decoding unit <NUM> may provide the quantized transform coefficients, the quantization parameters, and the transform data to the inverse quantization/inverse transform unit <NUM> and provide the motion vectors, the intra modes, the partition information, and other syntax information to the prediction process unit <NUM>.

In at least one implementation, the prediction process unit <NUM> may receive syntax elements such as motion vectors, intra modes, partition information, and other syntax information from the entropy decoding unit <NUM>. The prediction process unit <NUM> may receive the syntax elements including the partition information and divide image frames according to the partition information.

In at least one implementation, each of the image frames may be divided into at least one image block according to the partition information. The at least one image block may include a luminance block for reconstructing a plurality of luminance samples and at least one chrominance block for reconstructing a plurality of chrominance samples. The luminance block and the at least one chrominance block may be further divided to generate macroblocks, coding tree units (CTUs), coding blocks (CBs), sub-divisions thereof, and/or another equivalent coding unit.

In at least one implementation, during the decoding process, the prediction process unit <NUM> may receive predicted data including the intra mode or the motion vector for a current image block of a specific one of the image frames. The current image block may be the luminance block or one of the chrominance blocks in the specific image frame.

In at least one implementation, the intra prediction unit <NUM> may perform intra-predictive coding of a current block unit relative to one or more neighboring blocks in the same frame as the current block unit based on syntax elements related to the intra mode in order to generate a predicted block. The intra mode may specify the location of reference samples selected from the neighboring blocks within the current frame. In at least one implementation, the intra prediction unit <NUM> may reconstruct a plurality of chroma components of the current block unit based on a plurality of luma components of the current block unit when the chroma components are reconstructed by the prediction process unit <NUM>.

In at least one implementation, the intra prediction unit <NUM> may reconstruct a plurality of chroma components of the current block unit based on the plurality of luma components of the current block unit when the luma components of the current block are reconstructed by the prediction process unit <NUM>.

In at least one implementation, the inter prediction unit <NUM> may perform inter-predictive coding of the current block unit relative to one or more blocks in one or more reference image blocks based on syntax elements related to the motion vector in order to generate the predicted block.

In at least one implementation, the motion vector may indicate a displacement of the current block unit within the current image block relative to a reference block unit within the reference image block. The reference block unit is a block determined to closely match the current block unit.

In at least one implementation, the inter prediction unit <NUM> may receive the reference image block stored in the decoded picture buffer <NUM> and reconstruct the current block unit based on the received reference image blocks.

In at least one implementation, the inverse quantization/inverse transform unit <NUM> may apply inverse quantization and inverse transformation to reconstruct the residual block in the pixel domain. The inverse quantization/inverse transform unit <NUM> may apply inverse quantization to the residual quantized transform coefficient to generate a residual transform coefficient and then apply inverse transformation to the residual transform coefficient to generate the residual block in the pixel domain.

In at least one implementation, the inverse transformation may be inversely applied by the transformation process such as discrete cosine transform (DCT), discrete sine transform (DST), adaptive multiple transform (AMT), mode-dependent non-separable secondary transform (MDNSST), hypercube-givens transform (HyGT), signal dependent transform, Karhunen-Loéve transform (KLT), wavelet transform, integer transform, sub-band transform or a conceptually similar transform.

In at least one implementation, the inverse transformation may convert the residual information from a transform domain, such as a frequency domain, back to the pixel domain. In at least one implementation, the degree of inverse quantization may be modified by adjusting a quantization parameter. The summer <NUM> adds the residual block to the predicted block from the prediction process unit <NUM> to produce a reconstructed block.

In at least one implementation, the summer <NUM> adds the reconstructed residual block to the predicted block provided from the prediction process unit <NUM> to produce a reconstructed block.

In at least one implementation, the filtering unit <NUM> may include a deblocking filter, a sample adaptive offset (SAO) filter, a bilateral filter, and/or an adaptive loop filter (ALF) to remove blocking artifacts from the reconstructed block. Additional filters (in loop or post loop) may also be used in addition to the deblocking filter, the SAO filter, the bilateral filter and the ALF. Such filters are not explicitly illustrated for brevity but may filter the output of the summer <NUM>.

The filtering unit <NUM> may output the decoded video to the display module <NUM> or other video receiving unit after the filtering unit <NUM> performs the filtering process for the reconstructed blocks of the specific image frame.

In at least one implementation, the decoded picture buffer <NUM> may be a reference picture memory that stores the reference block for use by the prediction process unit <NUM> in decoding the bitstream (in inter coding modes). The decoded picture buffer <NUM> may be formed by any of a variety of memory devices such as dynamic random-access memory (DRAM), including synchronous DRAM (SDRAM), magneto-resistive RAM (MRAM), resistive RAM (RRAM), or other types of memory devices.

In at least one implementation, the decoded picture buffer <NUM> may be on-chip with other components of the decoder module <NUM> or off-chip relative to those components.

<FIG> illustrates a flowchart of a method <NUM> for encoding and decoding video data by an electronic device according to an example implementation of the present disclosure. The method <NUM> is an example only as there are a variety of ways to perform the method.

The method <NUM> for decoding a bitstream and reconstructing a block unit may be performed using the configurations illustrated in <FIG> and <FIG> and various elements of these figures are referenced with regard to the method <NUM>. Each block illustrated in <FIG> may represent one or more processes, methods, or subroutines performed.

The order of blocks in <FIG> is illustrative only and may change. Additional blocks may be added or less blocks may be utilized without departing from the present disclosure.

At block <NUM>, the decoder module <NUM> receives an image frame of video data. The video data may be a bitstream.

With reference to <FIG> and <FIG>, the second electronic device <NUM> may receive the bitstream from an encoder, such as the first electronic device <NUM>, or other video providers via the second interface <NUM>. The second interface <NUM> may provide the bitstream to the decoder module <NUM>.

In at least one implementation, the entropy decoding unit <NUM> may decode the bitstream to determine a plurality of prediction indications and a plurality of partitioning indications for the image frame and the decoder module <NUM> may further reconstruct the image frame based on the prediction indications and the partitioning indications. The prediction indications and the partitioning indications may include a plurality of flags and a plurality of indices.

At block <NUM>, the decoder module <NUM> determines a block unit having a block width and a block height from the received video data. With further reference to <FIG> and <FIG>, the decoder module <NUM> may divide the image frame to determine the block unit according to the partition indications included in the bitstream. For example, the decoder module <NUM> may divide the image frames to generate a plurality of coding tree units and may further divide one of the coding tree units to determine the block unit according to the partition indications (e.g., based on a video coding standard).

<FIG> are schematic illustrations of a block unit having different block sizes according to example implementations of the present disclosure. In at least one implementation, a block size of the block unit may include a block height Hb and a block width Wb. For example, the block size of the block unit <NUM> includes the block height H410 and the block width W410, the block size of the block unit <NUM> includes the block height H430 and the block width W430, and the block size of the block unit <NUM> includes the block height H450 and the block width W450. In the implementation, the block height H410 may be equal to the block width W410, the block width W430 may be equal to <NUM> × H430 and the block height H450 may be equal to <NUM> × W450.

At block <NUM>, the decoder module <NUM> determines a comparison between the block width and the block height. With further reference to <FIG> and <FIG>, the decoder module <NUM> may determine the comparison between the block width and the block height based on an inequality.

For example, a ratio value R between the block width Wb and the block height Hb may be greater than or equal to a threshold value T (i.e., R ≥ T). In one implementation, the ratio value R between the width Wb and the block height Hb may be less than the threshold value T (i.e., R < T). In another implementation, the ratio value R between the width Wb and the block height Hb may be greater than the threshold value T (i.e., R > T). In the other implementation, the ratio value R between the width Wb and the block height Hb may be less than or equal to the threshold value T (i.e., R < T).

In at least one implementation, the decoder module <NUM> may determine a ratio parameter RP computed based on the block width Wb and the block height Hb. In at least one implementation, a first ratio parameter RP1 may be computed based on division. In one implementation, the first ratio parameter RP1 may be computed by dividing the block width Wb by the block height Hb (i.e., RP1 = Wb / Hb) when the block width Wb is greater than or equal to the block height Hb. The first ratio parameter RP1 may be computed by dividing the block height Hb by the block width Wb (i.e., RP1 = Hb / Wb) when the block width Wb is less than the block height Hb. In other implementation, the first ratio parameter RP1 may be computed by dividing the block width Wb by the block height Hb, when the block width Wb is greater than the block height Hb. Therefore, the first ratio parameter RP1 may be computed by dividing the block height Hb by the block width Wb, when the block width Wb is less than or equal to the block height Hb.

In at least one implementation, the second ratio parameter RP2 may be computed based on the block width Wb and the block height Hb by a logarithmic equation. In the implementation, one of the first ratio parameter RP1 and the second ratio parameter RP2 computed by different formulas may be set as the ratio parameter RP of the block unit. In at least one implementation, the second ratio parameter RP2 may be equal to an absolute value of a difference value generated by subtracting a base-<NUM> logarithm of the block height from a base-<NUM> logarithm of the block width (i.e., RP2 = abs (log2 Wb - log2 Hb)). In other words, the second ratio parameter RP2 may be equal to the absolute value of a base-<NUM> logarithm of a quotient value, and the quotient value is generated by dividing the block width Wb by the block height Hb or dividing the block height Hb by the block width Wb (i.e., RP2 = abs (log2 Wb - log2 Hb) = abs (log2 (Wb/Hb)) = abs (log2 (Hb/Wb))). The first ratio parameter RP1 may be equal to two to the power of the second ratio parameter RP2.

In at least one implementation, the decoder module <NUM> may compare the ratio parameter RP with a ratio threshold RT. The decoder module <NUM> may determine that the comparison indicates that the ratio value R is greater than the threshold value T when the ratio parameter RP is greater than the ratio threshold RT. The decoder module <NUM> may determine that the comparison indicates that the ratio value R is equal to the threshold value T when the ratio parameter RP is equal to the ratio threshold RT. The decoder module <NUM> may determine that the comparison indicates that the ratio value R is less than the threshold value T when the ratio parameter RP is less than the ratio threshold RT.

In at least one implementation, the decoder module <NUM> may compare the ratio parameter RP with a first ratio threshold RT1 when the first ratio parameter RP1 is set as the ratio parameter RP. In one implementation, the decoder module <NUM> may determine that the comparison indicates that the ratio value R is greater than or equal to the threshold value T when the first ratio parameter RP1 is greater than or equal to the first ratio threshold RT1. The decoder module <NUM> may determine that the comparison indicates that the ratio value R is less than the threshold value T when the first ratio parameter RP1 is less than the first ratio threshold RT1. In other implementation, the decoder module <NUM> may determine that the comparison indicates that the ratio value R is less than or equal to the threshold value T when the first ratio parameter RP1 is less than or equal to the first ratio threshold RT1. In at least one implementation, the first ratio threshold RT1 may be a positive integer.

In at least one implementation, the first ratio threshold RT1 may be equal to two to the power of n, and the number n is a positive integer. The first ratio threshold RT1 may be preset to <NUM>, <NUM>, <NUM> or <NUM>. For example, the first ratio parameter RP1 of the block unit <NUM> equal to <NUM> and the first ratio parameter RP1 = H450 / W450 of the block unit <NUM> equal to <NUM> are less than the first ratio threshold RT1 when the first ratio threshold RT1 is equal to <NUM>. The first ratio parameter RP1 = W430 / H430 of the block unit <NUM> equal to <NUM> is not less than the first ratio threshold RT1 when the first ratio threshold RT1 is equal to <NUM>.

In at least one implementation, the decoder module <NUM> may compare the ratio parameter RP with a second ratio threshold RT2 when the second ratio parameter RP2 is set as the ratio parameter RP. The decoder module <NUM> may determine that the comparison indicates that the ratio value R is greater than or equal to the threshold value T when the second ratio parameter RP2 is greater than or equal to the second ratio threshold RT2. The decoder module <NUM> may determine that the comparison indicates that the ratio value R is less than the threshold value T when the second ratio parameter RP2 is less than the second ratio threshold RT2. The decoder module <NUM> may determine that the comparison indicates that the ratio value R is less than or equal to the threshold value T when the second ratio parameter RP2 is less than or equal to the second ratio threshold RT2.

In at least one implementation, the second ratio threshold RT2 may be a positive integer. The second ratio threshold RT2 may be preset to <NUM>, <NUM>, <NUM> or <NUM>. For example, the second ratio parameter RP2 of the block unit <NUM> equal to <NUM> and the second ratio parameter RP2 of the block unit <NUM> equal to <NUM> are less than the second ratio threshold RT2 when the second ratio threshold RT2 is equal to <NUM>. The second ratio parameter RP2 of the block unit <NUM> equal to <NUM> is not less than the second ratio threshold RT2 when the second ratio threshold RT2 is equal to <NUM>.

In at least one implementation, the first ratio threshold RT1 may be equal to two to the power of the second ratio threshold RT2 since the first ratio parameter RP1 is equal to two to the power of the second ratio parameter RP2. Therefore, the result of the comparison may be unchanged when the decoder module <NUM> changes the comparison from a first inequality RP1 < RT1 to a second inequality RP2 < RT2.

The decoder module <NUM> compares the block width Wb with a first magnified value N1 generated from the block height Hb and compare the block height Hb with a second magnified value N2 generated from the block width Wb when the decoder module <NUM> determines the comparison between the block width Wb and the block height Hb. The first magnified value N1 is computed by multiplying the block height Hb by the threshold value T, and the second magnified value N2 is computed by multiplying the block width Wb by the threshold value T (i.e., N1 = T× Hb and N2 = T× Wb).

In at least one implementation, the decoder module <NUM> may determine the comparison indicates that the ratio value R is less than the threshold value T when the block width Wb is less than the first magnified value N1 and the block height Hb is less than the second magnified value N2. The decoder module <NUM> may determine the comparison indicates that the ratio value R is greater than or equal to the threshold value T when the block width Wb is greater than or equal to the first magnified value N1. The decoder module <NUM> may determine the comparison indicates that the ratio value R is greater than or equal to the threshold value T when the block height Hb is greater than or equal to the second magnified value N2.

In at least one implementation, the threshold value T may be equal to the first ratio threshold RT1 when the decoder module <NUM> determines the comparison based on the first magnified value N1 and the second magnified value N2. The decoder module <NUM> may determine the comparison based on a third inequality Wb < N1 = RT1× Hb and a fourth inequality Hb < N2 = RT1 × Wb.

In at least one implementation, the first ratio threshold RT1 may be preset to <NUM>, <NUM>, <NUM> or <NUM>. Therefore, the threshold value T is preset to <NUM> when the decoder module <NUM> determines the comparison based on the first magnified value N1 and the second magnified value N2. In at least one implementation, a first division value Hb/Wb may be less than <NUM> when the block width Wb is greater than the block height Hb. Therefore, the first division value Hb/Wb is also less than the threshold value T and the fourth inequality Hb < RT1 × Wb is true when the block width Wb is greater than the block height Hb.

In other words, the comparison may only be influenced by the third inequality Wb < RT1× Hb when the block width Wb is greater than the block height Hb. Therefore, the comparison determined based on the first inequality RP1 = Wb / Hb < RT1 is identical to the comparison determined based on the third inequality Wb < N1 = RT1× Hb and the fourth inequality Hb < N2 = RT1 × Wb when the block width Wb is greater than the block height Hb.

In another implementation, a second division value Wb/Hb may be less than <NUM> when the block width Wb is less than the block height Hb. Therefore, the second division value Wb/Hb is also less than the threshold value T and the third inequality Wb < RT1 × Hb is true when the block width Wb is less than the block height Hb and the threshold value T is preset to <NUM>, <NUM>, <NUM> or <NUM>.

In other words, the comparison may only be influenced by the fourth inequality Hb < RT1× Wb when the block width Wb is less than the block height Hb. Therefore, the comparison determined based on the first inequality RP1 = Hb / Wb < RT1 is identical to the comparison determined based on the third inequality Wb < N1 = RT1× Hb and the fourth inequality Hb < N2 = RT1 × Wb when the block width Wb is less than the block height Hb.

In other implementation, the first division value and the second division value may be equal to <NUM> when the block width Wb is equal to the block height Hb. Therefore, the first division value and the second division value is less than the threshold value T and the third inequality and the fourth inequality is true when the block width Wb is equal to the block height Hb and the threshold value T is preset to <NUM>, <NUM> or <NUM>. Thus, the comparison determined based on the first inequality RP1 = Hb / Wb < RT1 is identical to the comparison determined based on the third inequality Wb < N1 = RT1× Hb and the fourth inequality Hb < N2 = RT1 × Wb when the block width Wb is equal to the block height Hb and the threshold value T is preset to <NUM>, <NUM> or <NUM>.

At block <NUM>, the decoder module <NUM> determines whether a geometric partitioning mode is disabled for the block unit based on the comparison. The method <NUM> may proceed to block <NUM> when the decoder module <NUM> determines that the geometric partitioning mode is disabled for the block unit. The method may proceed to block <NUM> when the decoder module <NUM> determines the geometric partitioning mode is enabled for the block unit.

With further reference to <FIG> and <FIG>, the decoder module <NUM> may determine that the geometric partitioning mode is disabled for the block unit when the comparison indicates that the ratio value R between the block width Wb and the block height Hb is greater than or equal to the threshold value T. The decoder module <NUM> may determine that the geometric partitioning mode is enabled for the block unit when the comparison indicates that the ratio value R between the block width Wb and the block height Hb is less than the threshold value T.

In at least one implementation, the decoder module <NUM> may determine the comparison between the block width and the block height to restrict the usage of the geometric partitioning mode. When the block unit is too narrow, the prediction results of different neighboring partition lines may be similar to each other. The block unit may be further divided along a horizontal direction or a vertical direction to generate two block units to be predicted respectively when the block unit is too narrow.

Therefore, the geometric partitioning mode may be disabled when the block unit is too narrow. For example, the geometric partitioning mode may be disabled when the block width is greater than or equal to T times the block height, or the block height is greater than or equal to T times the block width. In at least one implementation, the threshold value T may be equal to <NUM>, <NUM> or <NUM>.

In at least one implementation, the geometric partitioning mode may be disabled for the block unit when the decoder module <NUM> determines that the first ratio parameter RP1 is greater than or equal to the first ratio threshold RT1. The geometric partitioning mode may be enabled for the block unit when the decoder module <NUM> determines that the first ratio parameter RP1 is less than the first ratio threshold RT1.

For example, the first ratio threshold RT1 may be equal to eight. Therefore, the geometric partitioning mode may be disabled for the block unit when the first ratio parameter RP1 of the block unit is greater than or equal to <NUM>.

In a general geometric partitioning mode, the block width Wb and the block height Hb are greater than or equal to <NUM>. Therefore, the geometric partitioning mode may not be applied on the block unit having the block size <NUM>×<NUM> or <NUM>×<NUM> when the first ratio threshold RT1 is equal to eight. The geometric partitioning mode may not be applied on the block unit having the block size <NUM>×<NUM>, <NUM>×<NUM>, <NUM>×<NUM>, <NUM>×<NUM>, <NUM>×<NUM> or <NUM>×<NUM> when the first ratio threshold RT1 is equal to four.

In at least one implementation, the geometric partitioning mode may be disabled for the block unit when the decoder module <NUM> determines that the second ratio parameter RP2 is greater than or equal to the second ratio threshold RT2. The geometric partitioning mode may be enabled for the block unit when the decoder module <NUM> determines that the second ratio parameter RP2 is less than the second ratio threshold RT2.

For example, the geometric partitioning mode may not be applied on the block unit having the block size <NUM>×<NUM> or <NUM>×<NUM> when the second ratio threshold RT2 is equal to three. The geometric partitioning mode may not be applied on the block unit having the block size <NUM>×<NUM>, <NUM>×<NUM>, <NUM>×<NUM>, <NUM>×<NUM>, <NUM>×<NUM> or <NUM>×<NUM> when the second ratio threshold RT2 is equal to two.

In at least one implementation, the geometric partitioning mode may be disabled for the block unit when the decoder module <NUM> determines that the block width Wb is greater than or equal to the first magnified value N1. In another implementation, the geometric partitioning mode may be disabled for the block unit when the decoder module <NUM> determines that the block height Hb is greater than or equal to the second magnified value N2. The geometric partitioning mode may be enabled for the block unit when the block width Wb is less than the first magnified value N1 and the block height Hb is less than the second magnified value N2.

For example, the geometric partitioning mode may not be applied on the block unit having the block size <NUM>×<NUM> or <NUM>×<NUM> when the threshold value T is equal to eight. In other words, the geometric partitioning mode may not be applied on the block unit having the block size <NUM>×<NUM> or <NUM>×<NUM> when the block width Wb is greater than or equal to the first magnified value <NUM>×Hb or block height Hb is greater than or equal to the second magnified value <NUM>×Wb. The geometric partitioning mode may not be applied on the block unit having the block size <NUM>×<NUM>, <NUM>×<NUM>, <NUM>×<NUM>, <NUM>×<NUM>, <NUM>×<NUM> or <NUM>×<NUM> when the block width Wb is greater than or equal to the first magnified value <NUM>×Hb or block height Hb is greater than or equal to the second magnified value <NUM>×Wb.

At block <NUM>, the decoder module <NUM> predicts the block unit by using a first prediction mode different from the geometric partitioning mode to generate a predicted block. With further reference to <FIG> and <FIG>, the decoder module <NUM> may select the first prediction mode and predict the block unit based on the first prediction mode to generate the predicted block when the geometric partitioning mode is disabled for the block unit. The decoder module <NUM> may predict the block unit based on the first prediction mode to generate the predicted block when the comparison indicates that the ratio value R between the block width Wb and the block height Hb is greater than or equal to the threshold value T.

In at least one implementation, the first prediction mode may be selected from a plurality of option modes. Each of the option modes is different from the geometric partitioning mode.

In at least one implementation, the option modes may be determined for selecting the first prediction mode by a first merge index. Therefore, the first prediction mode may be the one of the option modes selected based on the first merge index.

In the implementation, the first merge index may indicate the first prediction mode included in a merge candidate list. In at least one implementation, the option modes may be a plurality of merge candidate modes in the merge candidate list determined from a plurality of spatial motion prediction modes of a plurality of neighboring blocks neighboring the block unit, a plurality of temporal motion prediction modes of a plurality of collocated blocks, history-based motion prediction modes stored in a first-in-first-out (FIFO) table, a plurality of pair-wise average motion prediction modes, and a zero motion mode.

In at least one implantation, the first prediction mode may indicate first motion information having a first reference frame and a first reference vector V0. The first reference frame may be selected from a plurality of reference lists. In at least one implementation, the first motion information may include a first list flag for determining one of the reference lists to select the first reference frame. In at least one implementation, a plurality of block components in the block unit may be predicted based on the first reference vector V0 and the first reference frame.

At block <NUM>, the decoder module <NUM> predicts the block unit by using a second prediction mode selected from a plurality of candidate modes including the geometric partitioning mode to generate the predicted block. With further reference to <FIG> and <FIG>, the decoder module <NUM> may select the second prediction mode and predict the block unit based on the second prediction mode to generate the predicted block when the geometric partitioning mode is enabled for the block unit. The decoder module <NUM> may predict the block unit based on the second prediction mode to generate the predicted block when the comparison indicates the ratio value R is less than the threshold value T.

In at least one implementation, the second prediction mode may be selected from the candidate modes. In the implementation, the candidate modes may include the geometric partitioning mode. In one implementation, the candidate modes may include the option modes and the geometric partitioning mode.

In at least one implementation, the decoder module <NUM> may determine a partition index, a second merge index and a third merge index of the block unit from the bitstream when the geometric partitioning mode is applied on the block unit for predicting the block unit. <FIG> are schematic illustrations of a block unit having different sub-blocks separated based on a partition line, according to example implementations of the present disclosure. The decoder module <NUM> may divide the block unit <NUM> to generate a first sub-block <NUM>, a second sub-block <NUM> and a third sub-block <NUM> based on a partition line <NUM> determined from the partition index.

In at least one implementation, the partition index may indicate the partition line <NUM> of the block unit <NUM>. In at least one implementation, the partition index may indicate a partition angle index and a partition distance index. The partition angle index may indicate a split angle of the partition line, and the partition distance index may indicate a split distance between the partition line and a center point of the block unit.

Therefore, the decoder module <NUM> may determine the partition line based on the split angle and the split distance indicated by the partition index. The bitstream may directly include the partition angle index and the partition distance index.

In at least one implementation, the decoder module <NUM> may predict the plurality of sub-blocks <NUM>, <NUM> and <NUM> based on second motion information and third motion information determined from the merge candidate modes by the second merge index and the third merge index. In at least one implementation, the second motion information indicated by the second merge index may be one of the merge candidate modes included in the merge candidate list, and the third motion information indicated by the third merge index may also be one of the merge candidate modes included in the merge candidate list. In at least one implantation, the second motion information may indicate a second reference frame and a second reference vector V1, and the third motion information may indicate a third reference frame and a third reference vector V2.

The second reference frame and the third reference frame may be selected from the plurality of reference lists. In one implementation, the second reference frame and the third reference frame may be selected from the same one of the reference lists. In other implementations, the second reference frame and the third reference frame may be selected from different reference lists. In at least one implementation, the reference lists may be set as L0 and L1 when the number of the reference lists may be equal to <NUM>.

In at least one implementation, the second motion information may include a second list flag for selecting the second reference frame and the third motion information may include a third list flag for selecting the third motion information. In at least one implementation, the second reference frame and the third reference frame may be selected from the same reference list when the second list flag is equal to the third list flag. The second reference frame and the third reference frame may be selected from different reference lists when the second list flag is different from the third list flag.

In at least one implementation, a plurality of first sub-block components in the first sub-block <NUM> may be predicted based on the second reference vector V1 and the second reference frame. A plurality of second sub-block components in the second sub-block <NUM> may be predicted based on the third reference vector V2 and the third reference frame. In addition, a plurality of third sub-block components in the third sub-block <NUM> may be predicted based on the second reference vector V1, the third reference vector V2, the second reference frame and the third reference frame. The third sub-block components in the third sub-block <NUM> may be predicted by deriving a plurality of first reference samples determined based on the second reference vector V1 and the second reference frame and a plurality of second reference samples determined based on the third reference vector V2 and the third reference frame and merging the second reference samples and the third reference samples based on a plurality of blending weights. In at least one implementation, the blending weights may be derived based on a plurality of component distances between the partition line <NUM> and the third sub-block components in the third prediction area <NUM>.

At block <NUM>, the decoder module <NUM> reconstructs the block unit based on the predicted block. With further reference to <FIG> and <FIG>, the decoder module <NUM> may determine a plurality of residual components from the bitstream for the block unit, and add the residual components into the predicted block to reconstruct the block unit. The decoder module <NUM> may reconstruct all of the other block units in the image frame for reconstructing the image frame and the video.

<FIG> illustrates a block diagram of the encoder module <NUM> of the first electronic device illustrated in <FIG> according to an example implementation of the present disclosure. The encoder module <NUM> may include a prediction processor (e.g., prediction process unit <NUM>), at least a first summer (e.g., first summer <NUM>) and a second summer (e.g., second summer <NUM>), a transform/quantization processor (e.g., transform/quantization unit <NUM>), an inverse quantization/inverse transform processor (e.g., inverse quantization/inverse transform unit <NUM>), a filter (e.g., filtering unit <NUM>), a decoded picture buffer (e.g., decoded picture buffer <NUM>), and an entropy encoder (e.g., entropy encoding unit <NUM>). The prediction process unit <NUM> of the encoder module <NUM> may further include a partition processor (e.g., partition unit <NUM>), an intra prediction processor (e.g., intra prediction unit <NUM>), and an inter prediction processor (e.g., inter prediction unit <NUM>).

The encoder module <NUM> may receive the source video and encode the source video to output a bitstream. The encoder module <NUM> may receive source video including a plurality of image frames and then divide the image frames according to a coding structure. Each of the image frames may be divided into at least one image block.

The at least one image block may include a luminance block having a plurality of luminance samples and at least one chrominance block having a plurality of chrominance samples. The luminance block and the at least one chrominance block may be further divided to generate macroblocks, coding tree units (CTUs), coding blocks (CBs), sub-divisions thereof, and/or another equivalent coding unit.

In at least one implementation, the encoder module <NUM> may perform additional sub-divisions of the source video. It should be noted that the disclosed implementations are generally applicable to video coding regardless of how the source video is partitioned prior to and/or during the encoding.

In at least one implementation, during the encoding process, the prediction process unit <NUM> may receive a current image block of a specific one of the image frames. The current image block may be the luminance block or one of the chrominance blocks in the specific image frame.

The partition unit <NUM> may divide the current image block into multiple block units. The intra prediction unit <NUM> may perform intra-predictive coding of a current block unit relative to one or more neighboring blocks in the same frame as the current block unit in order to provide spatial prediction. The inter prediction unit <NUM> may perform inter-predictive coding of the current block unit relative to one or more blocks in one or more reference image blocks to provide temporal prediction.

In at least one implementation, the prediction process unit <NUM> may select one of the coding results generated by the intra prediction unit <NUM> and the inter prediction unit <NUM> based on a mode selection method, such as a cost function. The mode selection method may be a rate-distortion optimization (RDO) process.

The prediction process unit <NUM> may determine the selected coding result and provide a predicted block corresponding to the selected coding result to the first summer <NUM> for generating a residual block and to the second summer <NUM> for reconstructing the encoded block unit. The prediction process unit <NUM> may further provide syntax elements such as motion vectors, intra mode indicators, partition information, and other syntax information to the entropy encoding unit <NUM>.

In at least one implementation, the intra prediction unit <NUM> may intra predict the current block unit. The intra prediction unit <NUM> may determine an intra prediction mode directed toward a reconstructed sample neighboring the current block unit in order to encode the current block unit.

In at least one implementation, the intra prediction unit <NUM> may encode the current block unit using various intra prediction modes. The intra prediction unit <NUM> or the prediction process unit <NUM> may select an appropriate intra prediction mode from the selected modes. The intra prediction unit <NUM> may encode the current block unit using a cross component prediction mode to predict one of the two chroma components of the current block unit based on the luma components of the current block unit. The intra prediction unit <NUM> may predict a first one of the two chroma components of the current block unit based on the second of the two chroma components of the current block unit.

In at least one implementation, the inter prediction unit <NUM> may inter predict the current block unit as an alternative to the intra prediction performed by the intra prediction unit <NUM>. The inter prediction unit <NUM> may perform motion estimation to estimate motion of the current block unit for generating a motion vector.

The motion vector may indicate a displacement of the current block unit within the current image block relative to a reference block unit within a reference image block. The inter prediction unit <NUM> may receive at least one reference image block stored in the decoded picture buffer <NUM> and estimate the motion based on the received reference image blocks to generate the motion vector.

In at least one implementation, the first summer <NUM> may generate the residual block by subtracting the prediction block determined by the prediction process unit <NUM> from the original current block unit. The first summer <NUM> may represent the component or components that perform this subtraction.

In at least one implementation, the transform/quantization unit <NUM> may apply a transform to the residual block in order to generate a residual transform coefficient and then quantize the residual transform coefficients to further reduce bit rate. The transform may be one of a DCT, DST, AMT, MDNSST, HyGT, signal dependent transform, KLT, wavelet transform, integer transform, sub-band transform or a conceptually similar transform.

In at least one implementation, the transform may convert the residual information from a pixel value domain to a transform domain, such as a frequency domain. The degree of quantization may be modified by adjusting a quantization parameter.

In at least one implementation, the transform/quantization unit <NUM> may perform a scan of the matrix including the quantized transform coefficients. Alternatively, the entropy encoding unit <NUM> may perform the scan.

In at least one implementation, the entropy encoding unit <NUM> may receive a plurality of syntax elements from the prediction process unit <NUM> and the transform/quantization unit <NUM> including a quantization parameter, transform data, motion vectors, intra modes, partition information, and other syntax information. The entropy encoding unit <NUM> may encode the syntax elements into the bitstream.

In at least one implementation, the entropy encoding unit <NUM> may entropy encode the quantized transform coefficients by performing CAVLC, CABAC, SBAC, PIPE coding or another entropy coding technique to generate an encoded bitstream. The encoded bitstream may be transmitted to another device (i.e., the second electronic device <NUM> in <FIG>) or archived for later transmission or retrieval.

In at least one implementation, the inverse quantization/inverse transform unit <NUM> may apply inverse quantization and inverse transformation to reconstruct the residual block in the pixel domain for later use as a reference block. The second summer <NUM> may add the reconstructed residual block to the prediction block provided from the prediction process unit <NUM> in order to produce a reconstructed block for storage in the decoded picture buffer <NUM>.

In at least one implementation, the filtering unit <NUM> may include a deblocking filter, a SAO filter, a bilateral filter, and/or an ALF to remove blocking artifacts from the reconstructed block. Additional filters (in loop or post loop) may be used in addition to the deblocking filter, the SAO filter, the bilateral filter and the ALF. Such filters are not illustrated for brevity and may filter the output of the second summer <NUM>.

In at least one implementation, the decoded picture buffer <NUM> may be a reference picture memory that stores the reference block for use by the encoder module <NUM> to encode video, such as in intra or inter coding modes. The decoded picture buffer <NUM> may include a variety of memory devices such as DRAM, including SDRAM, MRAM, RRAM, or other types of memory devices. The decoded picture buffer <NUM> may be on-chip with other components of the encoder module <NUM> or off-chip relative to those components.

In at least one implementation, the encoder module <NUM> may perform the method <NUM> for encoding a video and reconstructing a block unit as illustrated in <FIG>. The method <NUM> may be performed using the configurations illustrated in <FIG> and FIG. <NUM> and various elements of these figures are referenced with regard to the method <NUM>. Each block illustrated in <FIG> may represent one or more processes, methods, or subroutines performed.

At block <NUM>, an encoder module <NUM> receives an image frame of video data. The video data may be video. With reference to <FIG> and <FIG>, the first electronic device <NUM> may receive the video via the source module <NUM>. The encoder module <NUM> may determine the image frame from the video.

At block <NUM>, an encoder module <NUM> determines a block unit having a block width and a block height from the received video data. With reference to <FIG> and <FIG>, the encoder module <NUM> may divide the image frame to determine the block unit. In at least one implementation, the prediction process unit <NUM> of the first electronic device <NUM> may determine the block unit from the video via the partition unit <NUM> and the encoder module <NUM> may provide a plurality of partition indications into a bitstream based on a partition result of the partition unit <NUM>. In the implementation, the encoder module <NUM> may divide the image frames to generate a plurality of coding tree units and may further divide one of the coding tree units to determine the block unit (e.g., based on a video coding standard). With reference to <FIG>, the block height H410 is equal to the block width W410, the block width W430 is equal to <NUM> × H430 and the block height H450 is equal to <NUM> × W450.

At block <NUM>, the encoder module <NUM> determines a comparison between the block width and the block height. With reference to <FIG> and <FIG>, the encoder module <NUM> may determine the comparison between the block width and the block height based on an inequality. For example, a ratio value R between the block width Wb and the block height Hb is greater than or equal to a threshold value T (i.e., R ≥ T). The ratio value R between the width Wb and the block height Hb may be less than the threshold value T (i.e., R < T).

In at least one implementation, the encoder module <NUM> may determine a ratio parameter RP computed based on the block width Wb and the block height Hb. In at least one implementation, a first ratio parameter RP1 may be computed based on the block width Wb and the block height Hb by division. In one implementation, the first ratio parameter RP1 may be computed by dividing the block width Wb by the block height Hb (i.e., RP1 = Wb / Hb) when the block width Wb is greater than or equal to the block height Hb. In the implementation, the first ratio parameter RP1 may be computed by dividing the block height Hb by the block width Wb (i.e., RP1 = Hb / Wb) when the block width Wb is less than the block height Hb.

In at least one implementation, the second ratio parameter RP2 may be computed based on the block width Wb and the block height Hb by a logarithmic equation. In the implementation, one of the first ratio parameter RP1 and the second ratio parameter RP2 computed by different formulas may be set as the ratio parameter RP of the block unit. In at least one implementation, the second ratio parameter RP2 may be equal to an absolute value of a difference value generated by subtracting a base-<NUM> logarithm of the block height from a base-<NUM> logarithm of the block width (i.e., RP2 = abs (log2 Wb - log2 Hb)). In the implementation, the first ratio parameter RP1 may be equal to two to the power of the second ratio parameter RP2.

In at least one implementation, the encoder module <NUM> may compare the ratio parameter RP with a ratio threshold RT. In the implementation, the encoder module <NUM> may determine that the comparison indicates that the ratio value R is greater than or equal to the threshold value T when the ratio parameter RP is greater than or equal to the ratio threshold RT. The encoder module <NUM> may determine that the comparison indicates that the ratio value R is less than the threshold value T when the ratio parameter RP is less than the ratio threshold RT.

In at least one implementation, the encoder module <NUM> may compare the ratio parameter RP with a first ratio threshold RT1 when the first ratio parameter RP1 is set as the ratio parameter RP. In at least one implementation, the encoder module <NUM> may compare the ratio parameter RP with a second ratio threshold RT2 when the second ratio parameter RP2 is set as the ratio parameter RP.

In one implementation, the encoder module <NUM> may determine that the comparison indicates that the ratio value R is greater than or equal to the threshold value T when the first ratio parameter RP1 is greater than or equal to the first ratio threshold RT1 or the second ratio parameter RP2 is greater than or equal to the second ratio threshold RT2. The encoder module <NUM> may determine that the comparison indicates that the ratio value R is less than the threshold value T when the first ratio parameter RP1 is less than the first ratio threshold RT1 or the second ratio parameter RP2 is less than the second ratio threshold RT2.

In at least one implementation, the first ratio threshold RT1 and the second ratio threshold RT2 may be a positive integer. In at least one implementation, the first ratio threshold RT1 may be equal to two to the power of n, and the number n is a positive integer. The first ratio threshold RT1 may be preset to <NUM>, <NUM>, <NUM> or <NUM>, and the second ratio threshold RT2 may be preset to <NUM>, <NUM>, <NUM> or <NUM>.

In at least one implementation, the first ratio threshold RT1 may be equal to two to the power of the second ratio threshold RT2 since the first ratio parameter RP1 is equal to two to the power of the second ratio parameter RP2. Therefore, the result of the comparison may be unchanged when the encoder module <NUM> changes the comparison from a first inequality RP1 < RT1 to a second inequality RP2 < RT2.

In at least one implementation, the encoder module <NUM> may compare the block width Wb with a first magnified value N1 computed by multiplying the block height Hb by the threshold value T and compare the block height Hb with a second magnified value N2 computed by multiplying the block width Wb by the threshold value T when the encoder module <NUM> determines the comparison between the block width Wb and the block height Hb.

In at least one implementation, the encoder module <NUM> may determine the comparison indicates that the ratio value R is less than the threshold value T when the block width Wb is less than the first magnified value N1 and the block height Hb is less than the second magnified value N2. In another implementation, the encoder module <NUM> may determine the comparison indicates that the ratio value R is greater than or equal to the threshold value T when the block width Wb is greater than or equal to the first magnified value N1 or the block height Hb is greater than or equal to the second magnified value N2.

In at least one implementation, the threshold value T may be equal to the first ratio threshold RT1 when the encoder module <NUM> determines the comparison based on the first magnified value N1 and the second magnified value N2. The encoder module <NUM> may determine the comparison based on a third inequality Wb < N1 = RT1× Hb and a fourth inequality Hb < N2 = RT1 × Wb.

In at least one implementation, the comparison determined based on the first inequality RP1 = Wb / Hb < RT1 may be identical to the comparison determined based on the third inequality Wb < N1 = RT1× Hb and the fourth inequality Hb < N2 = RT1 × Wb when the block width Wb is greater than the block height Hb. The comparison determined based on the first inequality RP1 = Hb / Wb < RT1 may also be identical to the comparison determined based on the third inequality Wb < N1 = RT1× Hb and the fourth inequality Hb < N2 = RT1 × Wb when the block width Wb is less than the block height Hb.

At block <NUM>, the encoder module <NUM> determines whether a geometric partitioning mode is disabled for the block unit based on the comparison. The method <NUM> may proceed to block <NUM> when the encoder module <NUM> determines that the geometric partitioning mode is disabled for the block unit. The method may proceed to block <NUM> when the encoder module <NUM> determines the geometric partitioning mode is enabled for the block unit.

With further reference to <FIG> and <FIG>, the encoder module <NUM> determines that the geometric partitioning mode is disabled for the block unit when the comparison indicates that the ratio value R is greater than or equal to the threshold value T. The encoder module <NUM> determines that the geometric partitioning mode is enabled for the block unit when the comparison indicates that the ratio value R is less than the threshold value T.

At block <NUM>, the encoder module <NUM> predicts the block unit by using a first prediction mode different from the geometric partitioning mode to generate a predicted block. With further reference to <FIG> and <FIG>, the encoder module <NUM> may generate a plurality of coding results generated by the intra prediction unit <NUM> and the inter prediction unit <NUM>. Then, the encoder module <NUM> may select one of the coding results based on a mode selection method, such as a cost function. The mode selection method may be a rate-distortion optimization (RDO) process.

In at least one implementation, the encoder module <NUM> may select the first prediction mode from a plurality of option modes when the geometric partitioning mode is disabled for the block unit. In the implementation, the encoder module <NUM> may predict the block unit based on the first prediction mode to generate the predicted block when the comparison indicates that the ratio value R is greater than or equal to the threshold value T. Each of the option modes is different from the geometric partitioning mode. In at least one implementation, the option modes may include a plurality of merge candidate modes in a merge candidate list.

At block <NUM>, the encoder module <NUM> predicts the block unit by using a second prediction mode selected from a plurality of candidate modes including the geometric partitioning mode to generate the predicted block. With further reference to <FIG> and <FIG>, the encoder module <NUM> may generate the coding results generated by the intra prediction unit <NUM> and the inter prediction unit <NUM>. Then, the encoder module <NUM> may select one of the coding results based on the mode selection method.

In at least one implementation, the encoder module <NUM> may select the second prediction mode from a plurality of candidate modes when the geometric partitioning mode is enabled for the block unit. In the implementation, the encoder module <NUM> may predict the block unit based on the second prediction mode to generate the predicted block when the comparison indicates that the ratio value R is less than the threshold value T. In at least one implementation, the candidate modes may include the option modes and the geometric partitioning modes.

At block <NUM>, the encoder module <NUM> reconstructs the block unit based on the predicted block. In at least one implementation, the block unit may include a plurality of block elements. In the implementation, each of the block elements may be a pixel element. With further reference to <FIG> and <FIG>, the encoder module <NUM> may determine a plurality of residual components by subtracting the predicted block from the block elements and provide the bitstream including a plurality of coefficients corresponding to the residual components. The encoder module <NUM> may return the residual components based on the coefficients, and add the returned residual components into the predicted block to generate a reconstructed block units.

Claim 1:
A method of decoding a bitstream by an electronic device (<NUM>), the method comprising:
receiving (<NUM>) an image frame of the bitstream;
determining (<NUM>) a block unit having a block width and a block height from the received image frame;
determining (<NUM>) whether a geometric partitioning mode is disabled for the block unit based on a comparison between the block width and the block height, wherein:
the geometric partitioning mode is disabled for the block unit when the comparison indicates that a ratio value between the block width and the block height is greater than or equal to a threshold value,
the geometric partitioning mode is not disabled when the comparison indicates that the ratio value is less than the threshold value,
the block width is compared with a first magnified value generated by multiplying the block height by the threshold value,
the block height is compared with a second magnified value generated by multiplying the block width by the threshold value, wherein the threshold value used to generate the first magnified value and the second magnified value is equal to <NUM>,
the comparison indicates that the ratio value is less than the threshold value when the block width is less than the first magnified value and the block height is less than the second magnified value,
the comparison indicates that the ratio value is greater than or equal to the threshold value when the block width is greater than or equal to the first magnified value,
the comparison indicates that the ratio value is greater than or equal to the threshold value when the block height is greater than or equal to the second magnified value, and
the block unit is divided to generate a plurality of sub-blocks predicted by different merge candidates of the block unit when the geometric partitioning mode is applied on the block unit;
generating a predicted block by predicting (<NUM>) the block unit based on a prediction mode different from the geometric partitioning mode when the geometric partitioning mode is disabled for the block unit; and
reconstructing (<NUM>) the block unit based on the predicted block.