This disclosure relates to video coding and more particularly to techniques for adaptively clipping sample values of video data.
Digital video capabilities can be incorporated into a wide range of devices, including digital televisions, laptop or desktop computers, tablet computers, digital recording devices, digital media players, video gaming devices, cellular telephones, including so-called smartphones, medical imaging devices, and the like. Digital video may be coded according to a video coding standard. Video coding standards may incorporate video compression techniques. Examples of video coding standards include ISO/IEC MPEG-4 Visual and ITU-T H.264 (also known as ISO/IEC MPEG-4 AVC) and High-Efficiency Video Coding (HEVC). HEVC is described in High Efficiency Video Coding (HEVC), Rec. ITU-T H.265 April 2015, which is incorporated by reference, and referred to herein as ITU-T H.265. Extensions and improvements for ITU-T H.265 are currently being considered for development of next generation video coding standards. For example, the ITU-T Video Coding Experts Group (VCEG) and ISO/IEC (Moving Picture Experts Group (MPEG) (collectively referred to as the Joint Video Exploration Team (JVET)) are studying the potential need for standardization of future video coding technology with a compression capability that significantly exceeds that of the current HEVC standard. The Joint Exploration Model 3 (JEM 3), Algorithm Description of Joint Exploration Test Model 3 (JEM 3), ISO/IEC JTC1/SC29/WG11 Document: JVET-C1001v3, May 2016, Geneva, CH, which is incorporated by reference herein, describes the coding features that are under coordinated test model study by the JVET as potentially enhancing video coding technology beyond the capabilities of ITU-T H.265. It should be noted that the coding features of JEM 3 are implemented in JEM reference software maintained by the Fraunhofer research organization. Currently, the updated JEM reference software version 3 (JEM 3.0) is available. As used herein, the term JEM is used to collectively refer to algorithm descriptions of JEM 3 and implementations of JEM reference software.
Video compression techniques enable data requirements for storing and transmitting video data to be reduced. Video compression techniques may reduce data requirements by exploiting the inherent redundancies in a video sequence. Video compression techniques may sub-divide a video sequence into successively smaller portions (i.e., groups of frames within a video sequence, a frame within a group of frames, slices within a frame, coding tree units (e.g., macroblocks) within a slice, coding blocks within a coding tree unit, etc.). Intra prediction coding techniques (e.g., intra-picture (spatial)) and inter prediction techniques (i.e., inter-picture (temporal)) may be used to generate difference values between a unit of video data to be coded and a reference unit of video data. The difference values may be referred to as residual data. Residual data may be coded as quantized transform coefficients. Syntax elements may relate residual data and a reference coding unit (e.g., intra-prediction mode indices, motion vectors, and block vectors). Residual data and syntax elements may be entropy coded. Entropy encoded residual data and syntax elements may be included in a compliant bitstream.
In general, this disclosure describes various techniques for coding video data. In particular, this disclosure describes techniques for adaptively clipping sample values. It should be noted that although techniques of this disclosure are described with respect to ITU-T H.264, ITU-T H.265, and JEM, the techniques of this disclosure are generally applicable to video coding. For example, the coding techniques described herein may be incorporated into video coding systems, (including video coding systems based on future video coding standards) including block structures, intra prediction techniques, inter prediction techniques, transform techniques, filtering techniques, and/or entropy coding techniques other than those included in ITU-T H.265 and JEM. Thus, reference to ITU-T H.264, ITU-T H.265, and/or JEM is for descriptive purposes and should not be construed to limit the scope of the techniques described herein. Further, it should be noted that incorporation by reference of documents herein is for descriptive purposes and should not be construed to limit or create ambiguity with respect to terms used herein. For example, in the case where an incorporated reference provides a different definition of a term than another incorporated reference and/or as the term is used herein, the term should be interpreted in a manner that broadly includes each respective definition and/or in a manner that includes each of the particular definitions in the alternative.
An aspect of the invention is a method of clipping sample values, the method comprising: receiving sample values for a component of video data; for one or more sub-divisions of the video data, determining a sample value limit; setting a bound of a clipping function based on the determined sample value limit; and modifying reconstructed video blocks based on the clipping function.
An aspect of the invention is a method of clipping video sample values, the method comprising: receiving reconstructed video blocks for a component of video data; determining a bound of a clipping function; and modifying reconstructed video blocks based on the clipping function.
Video content typically includes video sequences comprised of a series of frames. A series of frames may also be referred to as a group of pictures (GOP). Each video frame or picture may include a plurality of slices or tiles, where a slice or tile includes a plurality of video blocks. As used herein, the term video block may generally refer to an area of a picture, including one or more video components, or may more specifically refer to the largest array of pixel/sample values that may be predictively coded, sub-divisions thereof, and/or corresponding structures. Further, the term current video block may refer to an area of a picture being encoded or decoded. A video block may be defined as an array of pixel values (also referred to as samples) that may be predictively coded. Video blocks may be ordered according to a scan pattern (e.g., a raster scan). A video encoder may perform predictive encoding on video blocks and sub-divisions thereof. Video blocks and sub-divisions thereof may be referred to as nodes. ITU-T H.264 specifies a macroblock including 16×16 luma samples. ITU-T H.265 specifies an analogous Coding Tree Unit (CTU) structure where a picture may be split into CTUs of equal size and each CTU may include Coding Tree Blocks (CTB) having 16×16, 32×32, or 64×64 luma samples. In ITU-T H.265, the CTBs of a CTU may be partitioned into Coding Blocks (CB) according to a corresponding quadtree block structure. According to ITU-T H.265, one luma CB together with two corresponding chroma CBs (e.g., Cr and Cb chroma components) and associated syntax elements are referred to as a coding unit (CU). In ITU-T H.265, a minimum allowed size of a CB may be signaled. In ITU-T H.265, the smallest minimum allowed size of a luma CB is 8×8 luma samples. A CU is associated with a prediction unit (PU) structure defining one or more prediction units (PU) for the CU, where a PU is associated with corresponding reference samples. That is, in ITU-T H.265, the decision to code a picture area using intra prediction or inter prediction is made at the CU level. In ITU-T H.265, a PU may include luma and chroma prediction blocks (PBs), where square PBs are supported for intra prediction and rectangular PBs are supported for inter prediction. Intra prediction data (e.g., intra prediction mode syntax elements) or inter prediction data (e.g., motion data syntax elements) may associate PUs with corresponding reference samples.
JEM specifies a CTU having a maximum size of 256×256 luma samples. In JEM, CTUs may be further partitioned according a quadtree plus binary tree (QTBT) block structure. In JEM, the QTBT structure enables quadtree leaf nodes to be further partitioned by a binary tree structure. In JEM, the binary tree structure enables quadtree leaf nodes to be divided vertically or horizontally. Thus, the binary tree structure in JEM enables square and rectangular leaf nodes, where each leaf node includes a Coding Block (CB) for each component of video data. In JEM, CBs may be used for prediction without any further partitioning. Further, in JEM, luma and chroma components may have separate QTBT structures. That is, chroma CBs may be independent of luma partitioning. In JEM, separate QTBT structures are enabled for slices of video data coded using intra prediction techniques.
A video sampling format, which may also be referred to as a chroma format, may define the number of chroma samples included in a CU with respect to the number of luma samples included in a CU. For example, for the 4:2:0 format, the sampling rate for the luma component is twice that of the chroma components for both the horizontal and vertical directions. As a result, for a CU formatted according to the 4:2:0 format, the width and height of an array of samples for the luma component are twice that of each array of samples for the chroma components. As described above, a CU is typically defined according to the number of horizontal and vertical luma samples. Thus, a 16×16 CU formatted according to the 4:2:0 sample format includes 16×16 samples of luma components and 8×8 samples for each chroma component. Similarly, for a CU formatted according to the 4:2:2 format, the width of an array of samples for the luma component is twice that of the width of an array of samples for each chroma component, but the height of the array of samples for the luma component is equal to the height of an array of samples for each chroma component. Further, for a CU formatted according to the 4:4:4 format, an array of samples for the luma component has the same width and height as an array of samples for each chroma component.
The difference between sample values included in a current CU, or another type of picture area structure, and associated reference samples (e.g., those generated using a prediction) may be referred to as residual data. Residual data may include respective arrays of difference values corresponding to each component of video data (e.g., luma (Y) and chroma (Cb and Cr). Residual data may be in the pixel domain. It should be noted that associated reference samples may be generated in some cases by simply inheriting sample values identified using a prediction (e.g., using corresponding sample values from a reference picture) and in some cases associated reference samples may be generated by modifying sample values identified using a prediction (e.g., weighted sample values) or modifying default sample values (e.g., when predictive data is not available). In some cases, the modification of sample values may result in reference sample values having values outside the bounds provided by a bit-depth specified for a component of video data. For example, if a bit-depth of 10 is specified for a luma component of video data, the range of possible values for samples is 0 to 1023 (i.e., 210=1024). In this example, if an associated reference sample value is generated by adding an offset to a referenced sample value, the resulting associated reference sample value may be greater than the maximum sample value provided by the bit-depth. For example, if a sample value is 1000 and an offset is 56, the associated reference sample value would be 1056, which would be greater than the value of 1023 provided by a bit-depth of 10. ITU-T H.265 and JEM provide where reference sample values outside of the range provided by a bit-depth may be clipped as follows:
S′=Clip(Min,Max,S);
where,
ITU-T H.265 and JEM, Min is equal to 0 and Max is equal to 2bit-depth−1.
A transform, such as, a discrete cosine transform (DCT), a discrete sine transform (DST), an integer transform, a wavelet transform, or a conceptually similar transform, may be applied to pixel difference values to generate transform coefficients. It should be noted that in ITU-T H.265, CUs may be further sub-divided into Transform Units (TUs). That is, in ITU-T H.265, an array of pixel difference values may be sub-divided for purposes of generating transform coefficients (e.g., four 8×8 transforms may be applied to a 16×16 array of residual values), for each component of video data, such sub-divisions may be referred to as Transform Blocks (TBs). Currently in JEM, when a QTBT partitioning structure is used, residual values corresponding to a CB are used to generate transform coefficients without further partitioning. That is, in JEM a QTBT leaf node may be analogous to both a PB and TB in ITU-T H.265. Thus, JEM enables rectangular CB predictions for intra and inter predictions. Further, in JEM, a core transform and a subsequent secondary transforms may be applied (in the encoder) to generate transform coefficients. For a video decoder, the order of transforms is reversed. Further, in JEM, whether a secondary transform is applied to generate transform coefficients may be dependent on a prediction mode.
A quantization process may be performed on transform coefficients. Quantization scales transform coefficients in order to vary the amount of data required to send a group of transform coefficients. Quantization may include division of transform coefficients by a quantization scaling factor and any associated rounding functions (e.g., rounding to the nearest integer). Quantized transform coefficients may be referred to as coefficient level values or simply level values. Inverse quantization (or “dequantization”) may include multiplication of coefficient level values by the quantization scaling factor. It should be noted that, as used herein, the term quantization process in some instances may refer to division by a quantization scaling factor to generate level values and multiplication by a quantization scaling factor to recover transform coefficients in some instances. That is, a quantization process may refer to quantization in some cases and inverse quantization in some cases. In ITU-T H.265, the value of a quantization scaling factor (referred to as Qstep in ITU-T H.265) may be determined by a quantization parameter (QP). It should be noted that as used herein the term quantization parameter may be used to refer generally to a parameter used to determining values for quantization (e.g., quantization scaling factors) and/or may be used to more specifically refer to a specific implementation of a quantization parameter (e.g., Qp′ y in ITU-T H.265). In ITU-T H.265, the quantization parameter can take 52 values from 0 to 51 and a change of 1 for the quantization parameter generally corresponds to a change in the value of the Qstep by approximately 12%.
Quantized transform coefficients and related data may be entropy coded according to an entropy encoding technique (e.g., content adaptive variable length coding (CAVLC), context adaptive binary arithmetic coding (CABAC), probability interval partitioning entropy coding (PIPE), etc.). Further, syntax elements, such as, a syntax element indicating a prediction mode, may also be entropy coded. Entropy encoded quantized transform coefficients and corresponding entropy encoded syntax elements may form a compliant bitstream that can be used to reproduce video data. A binarization process may be performed on syntax elements as part of an entropy coding process. Binarization refers to the process of converting a syntax value into a series of one or more bits. These bits may be referred to as “bins.” Binarization is a lossless process and may include one or a combination of the following coding techniques: fixed length coding, unary coding, truncated unary coding, truncated Rice coding, Golomb coding, k-th order exponential Golomb coding, and Golomb-Rice coding. As used herein each of the terms fixed length coding, unary coding, truncated unary coding, truncated Rice coding, Golomb coding, k-th order exponential Golomb coding, and Golomb-Rice coding may refer to general implementations of these techniques and/or more specific implementations of these coding techniques. For example, a Golomb-Rice coding implementation may be specifically defined according to a video coding standard, for example, ITU-T H.265. After binarization, a CABAC entropy encoder may select a context model. For a particular bin, a context model may be selected from a set of available context models associated with the bin. In some examples, a context model may be selected based on a previous bin and/or values of previous syntax elements. For example, a context model may be selected based on the value of a neighboring intra prediction mode. A context model may identify the probability of a bin being a particular value. For instance, a context model may indicate a 0.7 probability of coding a 0-valued bin and a 0.3 probability of coding a 1-valued bin. After selecting an available context model, a CABAC entropy encoder may arithmetically code a bin based on the identified context model. It should be noted that some syntax elements may be entropy encoded using arithmetic encoding without the usage of an explicitly assigned context model, such coding may be referred to as bypass coding.
As described above, residual data may be encoded as an array of quantized transform coefficients. A reciprocal inverse quantization process and an inverse transform may be applied to an array of quantized transform coefficients to generate reconstructed residual data. Reconstructed residual data may be added to a predictive video block to generate a reconstructed video block. The generation of a reconstructed video block may occur during a decoding process or during an encoding process. For example, during encoding, a resulting reconstructed video block may be used to evaluate the encoding quality for a given prediction, transform type, and/or level of quantization and used as predictive video block for subsequently encoded video blocks. In a manner similar to that described above with respect to associated reference sample values, in some cases, the addition of reconstructed residual data to a predictive video block may result in a reconstructed video block having sample values outside of the range provided by a bit-depth. For example, the process of performing a transform and a corresponding inverse transform on residual data may result in artifacts being present in residual data. Artifacts in reconstructed residual data may cause a reconstructed video block to have sample values outside of the range provided by a bit-depth. In ITU-T H.265 and JEM, reconstructed video blocks are clipped to range provided by a bit-depth, i.e., Min is equal to 0 and Max is equal to 2bitdepth−1.
Further, in some cases, reconstructed video data may be filtered. For example, de-blocking (or de-blocking), deblock filtering, or applying a deblocking filter may be used to smooth the boundaries of neighboring reconstructed video blocks (i e, making boundaries less perceptible to a viewer). Smoothing the boundaries of neighboring reconstructed video blocks may include modifying sample values included in rows or columns adjacent to a boundary. Further, Sample Adaptive Offset (SAO) is a nonlinear amplitude mapping that may be used to improve reconstruction by adding an offset to reconstructed video data. The filtering of reconstructed video data may result in a filter (or modified) reconstructed video block having sample values outside of the range provided by a bit-depth. In ITU-T H.265 and JEM, filtered reconstructed video blocks are clipped to range provided by a bit-depth, i.e., Min is equal to 0 and Max is equal to 2bitdepth−1.
F. Galpin, et al., “Adaptive Clipping in JEM 2.0,” 3rd Meeting: Geneva, CH, 26 May-Jun. 1, 2016, Doc. JVET-00040r3 (hereinafter “Galpin”), describes where a video encoder, for each component of each slice of video data, computes the values used to clip sample values (i.e., Min and Max) as the respective minimum and maximum sample values of an input picture. In Galpin, adjustments to Min and Max based on an internal bitdepth (i.e., 0 and 2bitdepth−1) are signaled in the bitstream. In Galpin, the adjustments may be signaled using an intra signaling technique where fixed length adjustment values (i.e., minY, maxY, minCb, maxCb, minCr, and maxCr) are signaled in a Picture Parameter Set (PPS) or a slice header. Further, Galpin provides a predictive signaling technique, where a Variable Length Coded (VLC) value, signaled at a slice level, adjusts reference clipping bounds included in a reference picture with the closest Picture Order Count (POC). Thus, in Galpin, Min and Max may only be adjusted per slice of video data. Further, Galpin provides where in every step of the codec where a clipping is performed between 0 and 2bitdepth−1 adaptive clipping is used. Thus, in Galpin, when the adaptive clipping technique is enabled, for a slice of video data, the lower and upper bounds used for clipping are the same for clipping of reference sample values, sample values in reconstructed video blocks, and sample values in filtered reconstructed video blocks in a slice of video data. Further, the lower and upper bounds are determined as the minimum and maximum values provided in an input picture. Such adaptive clipping may be less than ideal.
Communications medium 110 may include any combination of wireless and wired communication media, and/or storage devices. Communications medium 110 may include coaxial cables, fiber optic cables, twisted pair cables, wireless transmitters and receivers, routers, switches, repeaters, base stations, or any other equipment that may be useful to facilitate communications between various devices and sites. Communications medium 110 may include one or more networks. For example, communications medium 110 may include a network configured to enable access to the World Wide Web, for example, the Internet. A network may operate according to a combination of one or more telecommunication protocols. Telecommunications protocols may include proprietary aspects and/or may include standardized telecommunication protocols. Examples of standardized telecommunications protocols include Digital Video Broadcasting (DVB) standards, Advanced Television Systems Committee (ATSC) standards, Integrated Services Digital Broadcasting (ISDB) standards, Data Over Cable Service Interface Specification (DOCSIS) standards, Global System Mobile Communications (GSM) standards, code division multiple access (CDMA) standards, 3rd Generation Partnership Project (3GPP) standards, European Telecommunications Standards Institute (ETSI) standards, Internet Protocol (IP) standards, Wireless Application Protocol (WAP) standards, and Institute of Electrical and Electronics Engineers (IEEE) standards.
Storage devices may include any type of device or storage medium capable of storing data. A storage medium may include a tangible or non-transitory computer-readable media. A computer readable medium may include optical discs, flash memory, magnetic memory, or any other suitable digital storage media. In some examples, a memory device or portions thereof may be described as non-volatile memory and in other examples portions of memory devices may be described as volatile memory. Examples of volatile memories may include random access memories (RAM), dynamic random access memories (DRAM), and static random access memories (SRAM). Examples of non-volatile memories may include magnetic hard discs, optical discs, floppy discs, flash memories, or forms of electrically programmable memories (EPROM) or electrically erasable and programmable (EEPROM) memories. Storage device(s) may include memory cards (e.g., a Secure Digital (SD) memory card), internal/external hard disk drives, and/or internal/external solid state drives. Data may be stored on a storage device according to a defined file format.
Referring again to
Referring again to
In the example illustrated in
Coefficient quantization unit 206 may be configured to perform quantization of the transform coefficients. As described above, the degree of quantization may be modified by adjusting a quantization scaling factor which may be determined by quantization parameters. Coefficient quantization unit 206 may be further configured to determine quantization values and output QP data that may be used by a video decoder to reconstruct a quantization parameter (and thus a quantization scaling factor) to perform inverse quantization during video decoding. For example, signaled QP data may include QP delta values. In ITU-T H.265, the degree of quantization applied to a set of transform coefficients may depend on slice level parameters, parameters inherited from a previous coding unit, and/or optionally signaled CU level delta values.
As illustrated in
As described above, a video block may be coded using an intra prediction. Intra prediction processing unit 212 may be configured to select an intra prediction mode for a video block to be coded. Intra prediction processing unit 212 may be configured to evaluate a frame and/or an area thereof and determine an intra prediction mode to use to encode a current block. As illustrated in
Inter prediction processing unit 214 may be configured to perform inter prediction coding for a current video block. Inter prediction processing unit 214 may be configured to receive source video blocks and calculate a motion vector for PUs, or the like, of a video block. A motion vector may indicate the displacement of a PU, or the like, of a video block within a current video frame relative to a predictive block within a reference frame. Inter prediction coding may use one or more reference pictures. Further, motion prediction may be uni-predictive (use one motion vector) or bi-predictive (use two motion vectors). Inter prediction processing unit 214 may be configured to select a predictive block by calculating a pixel difference determined by, for example, sum of absolute difference (SAD), sum of square difference (SSD), or other difference metrics. A motion vector and associated data may describe, for example, a horizontal component of the motion vector, a vertical component of the motion vector, a resolution for the motion vector (e.g., one-quarter pixel precision), a prediction direction and/or a reference picture index value. Further, a coding standard, such as, for example ITU-T H.265, may support motion vector prediction. Motion vector prediction enables a motion vector to be specified using motion vectors of neighboring blocks. Examples of motion vector prediction include advanced motion vector prediction (AMVP), temporal motion vector prediction (TMVP), so-called “merge” mode, and “skip” and “direct” motion inference.
Further, JEM supports advanced temporal motion vector prediction (ATMVP), spatial-temporal motion vector prediction (STMVP), and advanced motion vector resolution (AMVR) mode. Further, JEM supports overlapped block motion compensation (OBMC). Thus, JEM utilizes advanced inter prediction modes compared to ITU-T H.265. In JEM OBMC divides a CB into sub-blocks for purposes of determining motion vector information for each sub-block. That is, if a motion vector is provided for a CB, OBMC allows for additional motion vector information to be provided for specific sub-blocks with the CB. For example, a CB having 128×128 samples may be divided into 4×4 sub-blocks and sub-blocks located at the boundary of the CB may include additional motion vector information. In some examples, additional motion vector information may be inherited from neighboring sub-blocks located in another CB. For example, a predictive block for a sub-block may be generated as a weighted average of predictive blocks associated with neighboring sub-blocks. Inter prediction processing unit 214 may be configured to perform motion vector prediction according to one or more of the techniques described above. Inter prediction processing unit 214 may be configured to generate a predictive block using the motion prediction data. For example, inter prediction processing unit 214 may locate a predictive video block within a frame buffer (not shown in
As illustrated in
Referring again to
As described above, artifacts in reconstructed residual data may cause a reconstructed video block to have sample values outside of the range provided by a bit-depth. In ITU-T H.265 and JEM, reconstructed video blocks are clipped to the range provided by a bit-depth. As further described above, Galpin describes where adaptive clipping may be enabled for a slice of video data, where the lower and upper bounds are determined as the minimum and maximum values provided in an input picture. Such clipping techniques may be less than ideal.
Video encoder 200 may be configured to perform adaptive clipping of sample values at one or more stages in a video encoding process according to the techniques described herein. For example, video encoder 200 may be configured to adaptively clip reference sample values, reconstructed sample values, and/or filtered reconstructed sample values. In one example, video encoder 200 may be configured to determine bounds provided by a bit-depth and determine respective bounds at one or more sub-divisions of a sequence of video data. That is, for one or more components of a current portion of video data, video encoder 200 may determine respective minimum and maximum sample values at a particular sub-division. In one example, video encoder 200 may be configured to perform single bound adaptive clipping. That is, one of the minimum bound or the maximum bound may be adaptive clipped. In one example, video encoder 200 may be configured to adaptively clip both the minimum bound and/or the maximum bound. In one example, video encoder 200 may be configured to perform adaptive clipping techniques independently for each component of video data.
Table 1 illustrates examples of minimum and maximum sample values for respective sub-divisions of video data. In the example illustrated in Table 1, the current CU may correspond to a relative bright area of a scene.
In the example illustrated in Table 1, for each respective sub-division, the lower bound increases and the upper bound decreases as each sub-division occurs. However, it should be noted that areas within a picture may have different minimum sample values and maximum sample values. For example, one region of a picture may include a portion of a scene in a shadow and as such, may have a different dynamic range than a portion of a scene not in a shadow. Table 2 illustrates an example where a slice included in the same picture as the slice in Table 1 has different minimum sample value and maximum sample value.
Video encoder 200 may be configured to perform adaptive clipping techniques based on respective bounds at one or more sub-divisions of a sequence of video data. That is, video encoder 200 may determine bounds for one or more sub-divisions of a sequence of video data. Based on the one or more determined bounds, video encoder 200 may enable adaptive clipping for one or more sub-divisions of a sequence of video data. Video encoder 200 may signal whether adaptive clipping is enabled for a sub-division of video data. For example, video encoder 200 may signal one or more of a sequence level flag (e.g., in a Sequence Parameter Set (SPS)), a picture level flag (e.g., in a Picture Parameter Set (PPS)), a slice-level flag (e.g., in a slice header), a CTU level flag and/or a CU (or CB) level flag indicating whether adaptive clipping is enabled. Upon receiving a flag indicating that adaptive clipping is enabled, a video decoder (e.g., video decoder 400) may determine Min and Max for the clipping function.
In one example, video encoder 200 may be configured to signal specific clipping values at a sequence level, a picture level, a slice-level, a CTU level, and/or a CU level. For example, video encoder 200 may be configured to signal Min and Max at a CTU level and signal a flag for each CU in the CTU to indicate whether adaptive clipping should be performed for the CU. In this manner, a video decoder receiving such signaling may determine whether adaptive clipping should be performed for a CU and when adaptive clipping is performed for the CU, determine Min and Max based on the Min and Max values signaled at the CTU level.
Further, in one example, video encoder 200 may be configured to signal Min and Max values at a slice level, signal Min and Max delta values at a CTU level, and signal a flag for each CU in a CTU. In this manner, a video decoder receiving such signaling may determine whether adaptive clipping should be performed for a CU and when adaptive clipping is performed for the CU, determine Min and Max based on the Min and Max values signaled at the slice level and the Min and Max delta values signaled at the CTU level.
In this manner, video encoder 200 may be configured to signal one or more of a sequence level flag, a picture level flag, a slice-level flag, a CTU level flag and/or a CU (or CB) level flag indicating whether adaptive clipping is enabled and/or signal specific clipping values at a sequence level, a picture level, a slice-level, a CTU level, and/or a CU level. For example, video encoder 200 may be configured to signal Min and Max at a slice level and signal a flag for each CTU in the slice to indicate whether adaptive clipping should be performed for the CTU. It should be noted that in some examples, flags at each level may be dependent on one another. For example, in one example, video encoder 200 may signal Min and Max values at one of a sequence, picture, or slice level. Video encoder 200 may also signal a flag at one of a sequence, picture, or slice level indicating whether CTU or CB flags are signaled. In this manner, adaptive clipping at a CTU or CB level may be selective enabled or disabled. Selective enabling or disabling clipping at a CTU or CB level may be useful for enabling low latency (i.e., “real-time”) encoding where clipping values are estimated prior to processing a current picture.
As described above, video encoder 200 may be configured to signal Min and Max delta values. It should be noted that video encoder 200 may be configured such that the Min and Max values may exist as predictive values and/or be updated (e.g., using delta value or local characteristics) at each of a sequence level, a picture level, a slice-level, a CTU level, and/or a CU level. Further, in one example, video encoder 200 may be configured to signal Min and Max values using index values. For example, tables may be defined for signaling Min and Max values. Table 3 illustrates an example of signaling Min and Max values for a bit depth of 10. Table 4 illustrates an example of signal delta values, where Min equals delta+0 and Max equals (2bitdepth−1)−delta.
It should be noted that in one example, a combination of index values may be used to indicate Min and/or Max. For example, a first index value may indicate a predictive Min or Max value and a second index value may indicate a delta value. In this case, Min may equal the predictive value+the delta value and Max may equal the predictive value−the delta value. It should be noted that in some examples whether a delta value is added or subtracted to a predictive value may be signaled. For example, if a predictive value is inherited from a higher sub-division it may not be necessary to signal whether addition or subtraction is performed. However, if a predictive value is inherited for a current CU from a neighboring CU one of addition or subtraction may be signaled. Further, it should be noted that in some examples, index values may be coded using the binarization techniques described above (e.g., k-th order exponential Golomb coding). It should be noted that in some examples, a video decoder may be configured to determine Min and Max based on values used for neighboring CBs and/or local sample value characteristics.
As described above, in some examples, video encoder 200 may be configured such that the Min and Max values may be updated at each of a sequence level, a picture level, a slice-level, a CTU level, and/or a CU level. For example, Min and Max values signaled for a slice may be updated for CTUs in the slice by signaling Min and Max delta values at a CTU level. In some examples, Min and Max delta values may be relative to an internal bit-depth. In other examples, Min and Max delta values may be relative to slice level Min and Max values. In some examples, flags may be used to indicate whether Min and Max delta values are signaled for a CTU. For example, for a first CTU in the slice, it may be desirable to only update a Max value and for a second CTU in a slice it may be desirable to only update a Min value. In one example, for each CTU in the slice, a flag, e.g., Clip_ctu_min_flag, may indicate whether a Min delta value is signaled for the CTU and a flag, e.g., Clip_ctu_max_flag, may indicate whether a Max delta value is signaled for the CTU. Thus, in some examples, the pair of flags Clip_ctu_min_flag and Clip_ctu_max_flag may be signaled for each CTU. In some examples, one of the flags Clip_ctu_min_flag and Clip_ctu_max_flag may be signaled for each CTU. For example, for a bright scene it may only be desirable to update the Max value. In one example, higher level signaling, e.g., slice level signaling may indicate whether the pair of flags (Clip_ctu_min_flag and Clip_ctu_max_flag), a single minimum flag (Clip_ctu_min_flag), or a single maximum flag (Clip_ctu_max_flag) is signaled for each CTU in the slice. As described above, a context model for entropy coding syntax elements may be selected based on a previous bin and/or values of previous syntax elements. In one example, flags Clip_ctu_min_flag and Clip_ctu_max_flag may be context coded and may share a context model.
It should be noted that in some examples, a Max delta value may be signaled as a difference with respect to the Min value (or a Min delta value). For example, in the case where a slice of video data has a Min value of 400 and a Max value of 700 and a current CTU has a Min value of 500 and a Max value of 595, a Min delta value of 100 may be signaled and a Max difference value of 5 may be signaled, where Max delta value=Min delta value+Max difference value. In one example, signaling a Max delta value as a Max difference value may be based on whether a Min delta value (or a Max delta) is greater than a threshold value. For example, in a case where a slice of video data has a Min value of 400 and a Max value of 700 and a current CTU has a Min value of 405 and a Max value of 650, a Min delta value of 5 may be signaled and a Max delta value of 50 may be signaled. In one other examples, signaling using a Max difference value may be based on the Min value and/or the Max value. For example, in a case where a slice of video data has a Min value of 400 and a Max value of 700 and a current CTU has a Min value of 500 and a Max value of 695, a Min delta value of 100 may be signaled and a Max delta value of 5 may be signaled (as opposed to a Max difference value of −95).
As described above, entropy coding may include binarization, the process of converting a syntax value into a series of one or more bits. In one example, the entropy coding and binarization of a Max difference value may be based on one or more of the Min Value, a signaled Min delta value, a Max value, a signaled Max delta value, and/or an internal bit-depth. For example, entropy coding of Max difference value may be based on whether a Min value is greater than the median value provided by an internal bit-depth (e.g., 512 for a bit-depth of 10). Further, in one example, entropy coding of Max difference value may be based on whether a slice level Max value is greater than the median value provided by an internal bit-depth. In other examples, other thresholds and Min values and Max values may be used to determining how entropy coding is performed. In some examples, a fixed length code binarization may be used if a difference value is within a range of 2N. In some examples, a truncated binary code binarization may be used a difference value is outside a range of 2N. In these examples, N may be an integer (e.g., 5, 6, 7, etc.). Further, in some examples, N may be a function of bitdepth. For example, N may equal bitdepth−2. In this case, if bitdepth equal 10, N equals 8 and 2N equals 256. In some examples, an exponential golomb code binarization may be used and the order of the exponential golomb code may be based on whether the difference value is within a range. For example, relatively larger difference value may use relatively larger orders. It should be noted that in other examples, other combinations of binarizations may be performed on a difference value based on ranges. Further, it should be noted that in other examples, Min difference values may be used, e.g., Min delta value=Max delta value+Min difference value.
As illustrated in
Referring again to
Intra prediction processing unit 408 may be configured to receive intra prediction syntax elements and retrieve a predictive video block from reference buffer 416. Reference buffer 416 may include a memory device configured to store one or more frames of video data. Intra prediction syntax elements may identify an intra prediction mode, such as the intra prediction modes described above. In one example, intra prediction processing unit 408 may reconstruct a video block using according to one or more of the intra prediction coding techniques describe herein. Inter prediction processing unit 410 may receive inter prediction syntax elements and generate motion vectors to identify a prediction block in one or more reference frames stored in reference buffer 416. Inter prediction processing unit 410 may produce motion compensated blocks, possibly performing interpolation based on interpolation filters. Identifiers for interpolation filters to be used for motion estimation with sub-pixel precision may be included in the syntax elements. Inter prediction processing unit 410 may use interpolation filters to calculate interpolated values for sub-integer pixels of a reference block. Filter unit 414 may be configured to perform filtering on reconstructed video data according to the techniques described herein. For example, filter unit 414 may be configured to perform deblocking and/or SAO filtering, Further, it should be noted that in some examples, filter unit 414 may be configured to perform proprietary discretionary filter (e.g., visual enhancements). As illustrated in
As described above, a video encoder may be configured to signal syntax elements that allow the Min value and/or Max value used for clipping of sample values to be updated at each of a sequence level, a picture level, a slice-level, a CTU level, and/or a CU level. It should be noted that in some cases, signaling by a video encoder may result in a condition where the Max value is less than the Min value. For example, error in signaling, which may include errors due to quantization of syntax element, of one of the Max value or a Min value may cause the Max value be less than the Min value for a current CTU. For example, in the case where a slice of video data has a Min value of 400 and a Max value of 700 and a current CTU has a Min value of 500 and a Max value of 595, an erroneously signaled Min delta value of 200 may cause video decoder 400 to determine the current CTU has a Min value of 600 and a Max value of 595. In one example, video decoder 400 may be configured to determine whether a determined Min value is greater than or equal to a Max value. In one example, video decoder 400 may be configured to determine whether a determined Min value is within a range of a Max value. For example, video decoder 400 may be configured to determine if the determined Min value is within 2M of the determined Max value, where M is an integer (e.g., 3, etc.). In these cases, where a determined Min value is greater than or equal to a Max value or within a range or the Max value, video decoder 400 may be configured to modify how clipping is performed. For example, in one example, video decoder 400 may be configured to set the Min value and Max value used for clipping to default values (e.g., 2bitdepth−1). In some examples, video decoder 400 may be configured subtract an offset from the determined Min Value and/or add an offset to a determined Max Value. For example, an offset value C may be subtracted from the determined Min Value and added to the determined Max Value and the resulting values may be used for clipping sample values. In one example, an offset value C1 may be subtracted from the determined Min Value and an offset value C2 may be added to the determined Max Value. In some examples, offset values may be based on an internal bit-depth.
In one or more examples, the functions described may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium and executed by a hardware-based processing unit. Computer-readable media may include computer-readable storage media, which corresponds to a tangible medium such as data storage media, or communication media including any medium that facilitates transfer of a computer program from one place to another, e.g., according to a communication protocol. In this manner, computer-readable media generally may correspond to (1) tangible computer-readable storage media which is non-transitory or (2) a communication medium such as a signal or carrier wave. Data storage media may be any available media that can be accessed by one or more computers or one or more processors to retrieve instructions, code and/or data structures for implementation of the techniques described in this disclosure. A computer program product may include a computer-readable medium.
By way of example, and not limitation, such computer-readable storage media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage, or other magnetic storage devices, flash memory, or any other medium that can be used to store desired program code in the form of instructions or data structures and that can be accessed by a computer. Also, any connection is properly termed a computer-readable medium. For example, if instructions are transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. It should be understood, however, that computer-readable storage media and data storage media do not include connections, carrier waves, signals, or other transitory media, but are instead directed to non-transitory, tangible storage media. Disk and disc, as used herein, includes compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk and Blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
Instructions may be executed by one or more processors, such as one or more digital signal processors (DSPs), general purpose microprocessors, application specific integrated circuits (ASICs), field programmable logic arrays (FPGAs), or other equivalent integrated or discrete logic circuitry. Accordingly, the term “processor,” as used herein may refer to any of the foregoing structure or any other structure suitable for implementation of the techniques described herein. In addition, in some aspects, the functionality described herein may be provided within dedicated hardware and/or software modules configured for encoding and decoding, or incorporated in a combined codec. Also, the techniques could be fully implemented in one or more circuits or logic elements.
The techniques of this disclosure may be implemented in a wide variety of devices or apparatuses, including a wireless handset, an integrated circuit (IC) or a set of ICs (e.g., a chip set). Various components, modules, or units are described in this disclosure to emphasize functional aspects of devices configured to perform the disclosed techniques, but do not necessarily require realization by different hardware units. Rather, as described above, various units may be combined in a codec hardware unit or provided by a collection of interoperative hardware units, including one or more processors as described above, in conjunction with suitable software and/or firmware.
Moreover, each functional block or various features of the base station device and the terminal device used in each of the aforementioned embodiments may be implemented or executed by a circuitry, which is typically an integrated circuit or a plurality of integrated circuits. The circuitry designed to execute the functions described in the present specification may comprise a general-purpose processor, a digital signal processor (DSP), an application specific or general application integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gates or transistor logic, or a discrete hardware component, or a combination thereof. The general-purpose processor may be a microprocessor, or alternatively, the processor may be a conventional processor, a controller, a microcontroller or a state machine. The general-purpose processor or each circuit described above may be configured by a digital circuit or may be configured by an analogue circuit. Further, when a technology of making into an integrated circuit superseding integrated circuits at the present time appears due to advancement of a semiconductor technology, the integrated circuit by this technology is also able to be used.
Various examples have been described. These and other examples are within the scope of the following claims.
<Overview>
In one example, a method of clipping sample values comprises receiving sample values for a component of video data, for one or more sub-divisions of the video data, determining a sample value limit, setting a bound of a clipping function based on the determined sample value limit, and modifying reconstructed video blocks based on the clipping function.
In one example, a device for video coding comprises one or more processors configured to receive sample values for a component of video data, for one or more sub-divisions of the video data, determine a sample value limit, set a bound of a clipping function based on the determined sample value limit, and modify reconstructed video blocks based on the clipping function.
In one example, a non-transitory computer-readable storage medium comprises instructions stored thereon that, when executed, cause one or more processors of a device to receive sample values for a component of video data, for one or more sub-divisions of the video data, determine a sample value limit, set a bound of a clipping function based on the determined sample value limit, and modify reconstructed video blocks based on the clipping function.
In one example, an apparatus comprises means for receiving sample values for a component of video data, means for determining a sample value limit for one or more sub-divisions of the video data, means for setting a bound of a clipping function based on the determined sample value limit, and means for modifying reconstructed video blocks based on the clipping function.
The details of one or more examples are set forth in the accompanying drawings and the description below. Unless explicitly stated otherwise, components and functions are optional and may be combined or subdivided, and operations may vary in sequence or may be combined or subdivided. Other features, objects, and advantages will be apparent from the description and drawings, and from the claims.
Number | Date | Country | Kind |
---|---|---|---|
62404190 | Oct 2016 | US | national |
62409836 | Oct 2016 | US | national |
This Nonprovisional application claims priority under 35 U.S.C. § 119 on provisional Application No. 62/409,836 on Oct. 18, 2016, and provisional Application No. 62/404,190 on Oct. 4, 2016, the entire contents of which are hereby incorporated by reference.
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/JP2017/029756 | 8/21/2017 | WO | 00 |