This disclosure relates generally to video coding, and, more particularly, to color space prediction for video coding.
Many systems include a video encoder to implement video coding standards and compress video data for transmission over a channel with limited bandwidth and/or limited storage capacity. These video coding standards can include multiple coding stages such as intra prediction, transform from spatial domain to frequency domain, inverse transform from frequency domain to spatial domain, quantization, entropy coding, motion estimation, and motion compensation, in order to more effectively encode frames.
Traditional digital High Definition (HD) content can be represented in a format described by video coding standard International Telecommunication Union Radiocommunication Sector (ITU-R) Recommendation BT.709, which defines a resolution, a color gamut, a gamma, and a quantization bit-depth for video content. With an emergence of higher resolution video standards, such as ITU-R Ultra High Definition Television (UHDTV), which, in addition to having a higher resolution, can have wider color gamut and increased quantization bit-depth compared to BT.709, many legacy systems based on lower resolution HD content may be unable to utilize compressed UHDTV content. One of the current solutions to maintain the usability of these legacy systems includes separately simulcasting both compressed HD content and compressed UHDTV content. Although a legacy system receiving the simulcasts has the ability to decode and utilize the compressed HD content, compressing and simulcasting multiple bitstreams with the same underlying content can be an inefficient use of processing, bandwidth, and storage resources.
The foregoing and other objectives, features, and advantages of the invention will be more readily understood upon consideration of the following detailed description of the invention, taken in conjunction with the accompanying drawings.
The UHDTV video stream 102 can have a different resolution, different quantization bit-depth, and represent different color gamut compared to the BT.709 video stream 104. For example, a UHDTV or BT.2020 video standard has a format recommendation that can support a 4k (3840×2160 pixels) or an 8k (7680×4320 pixels) resolution and a 10 or 12 bit quantization bit-depth. The BT.709 video standard has a format recommendation that can support a 2k (1920×1080 pixels) resolution and an 8 or 10 bit quantization bit-depth. The UHDTV format recommendation also can support a wider color gamut than the BT.709 format recommendation. Embodiments of the color gamut difference between the UHDTV video standard and the BT.709 video standard will be shown and described below in greater detail with reference to
The video encoder 300 can include an enhancement layer encoder 302 and a base layer encoder 304. The base layer encoder 304 can implement video encoding for High Definition (HD) content, for example, with a codec implementing a Moving Picture Experts Group (MPEG)-2 standard, or the like. The enhancement layer encoder 302 can implement video encoding for UHDTV content. In some embodiments, the enhancement layer encoder 302 can encode an UHDTV video frame by generating a prediction of at least a portion of the UHDTV image frame using a motion compensation prediction, an intra-frame prediction, and a scaled color prediction from a BT.709 image frame encoded in the base layer encoder 302. The video encoder 300 can utilize the prediction to generate a prediction residue, for example, a difference between the prediction and the UHDTV image frame, and encode the prediction residue in the encoded video stream 112.
In some embodiments, when the video encoder 300 utilizes a scaled color prediction from the BT.709 image frame, the video encoder 300 can transmit color prediction parameters 114 to the video decoder 500. The color prediction parameters 114 can include parameters utilized by the video encoder 300 to generate the scaled color prediction. For example, the video encoder 300 can generate the scaled color prediction through an independent color channel prediction or an affine matrix-based color prediction, each having different parameters, such as a gain parameter per channel or a gain parameter and an offset parameter per channel. The color prediction parameters 114 can include parameters corresponding to the independent color channel prediction or the affine matrix-based color prediction utilized by the video encoder 300. In some embodiments, the encoder 300 can include the color prediction parameters 114 in a normative portion of the encoded video stream 112, for example, in a Sequence Parameter Set (SPS), a Picture Parameter Set (PPS), or another lower level section of the normative portion of the encoded video stream 112. In some embodiments, the video encoder 300 can utilize default color prediction parameters 114, which may be preset in the video decoder 500, alleviating the video encoder 300 from having to transmit color prediction parameters 114 to the video decoder 500. Embodiments of video encoder 300 will be described below in greater detail.
The video decoder 500 can include an enhancement layer decoder 502 and a base layer decoder 504. The base layer decoder 504 can implement video decoding for High Definition (HD) content, for example, with a codec implementing a Moving Picture Experts Group (MPEG)-2 standard, or the like, and decode the encoded video stream 112 to generate a decoded BT.709 video stream 124. The enhancement layer decoder 502 can implement video decoding for UHDTV content and decode the encoded video stream 112 to generate a decoded UHDTV video stream 122.
In some embodiments, the enhancement layer decoder 502 can decode at least a portion of the encoded video stream 112 into the prediction residue of the UHDTV video frame. The enhancement layer decoder 502 can generate a same or a similar prediction of the UHDTV image frame that was generated by the video encoder 300 during the encoding process, and then combine the prediction with the prediction residue to generate the decoded UHDTV video stream 122. The enhancement layer decoder 502 can generate the prediction of the UHDTV image frame through motion compensation prediction, intra-frame prediction, or scaled color prediction from a BT.709 image frame decoded in the base layer decoder 504. Embodiments of video encoder 400 will be described below in greater detail.
Although
The enhancement layer encoder 302 can include a video input 310 to receive a UHDTV video stream 102 having UHDTV image frames. The enhancement layer encoder 302 can generate a prediction of the UHDTV image frames and utilize the prediction to generate a prediction residue, for example, a difference between the prediction and the UHDTV image frames determined with a combination function 315. In some embodiments, the combination function 315 can include weighting, such as linear weighting, to generate the prediction residue from the prediction of the UHDTV image frames. The enhancement layer encoder 302 can transform and quantize the prediction residue with a transform and quantize function 320. An entropy encoding function 330 can encode the output of the transform and quantize function 320, and provide an entropy encoded stream to the output interface 380. The output interface 380 can multiplex the entropy encoded streams from the entropy encoding functions 366 and 330 to generate the encoded video stream 112.
The enhancement layer encoder 302 can include a color space predictor 400, a motion compensation prediction function 354, and an intra predictor 356, each of which can generate a prediction of the UHDTV image frames. The enhancement layer encoder 302 can include a prediction selection function 350 to select a prediction generated by the color space predictor 400, the motion compensation prediction function 354, and/or the intra predictor 356 to provide to the combination function 315.
In some embodiments, the motion compensation prediction function 354 and the intra predictor 356 can generate their respective predictions based on UHDTV image frames having previously been encoded and decoded by the enhancement layer encoder 302. For example, after a prediction residue has been transformed and quantized, the transform and quantize function 320 can provide the transformed and quantized prediction residue to a scaling and inverse transform function 322, the result of which can be combined in a combination function 325 with the prediction utilized to generate the prediction residue and generate a decoded UHDTV image frame. The combination function 325 can provide the decoded UHDTV image frame to a deblocking function 351, and the deblocking function 351 can store the decoded UHDTV image frame in a reference buffer 340, which holds the decoded UHDTV image frame for use by the motion compensation prediction function 354 and the intra predictor 356. In some embodiments, the deblocking function 351 can filter the decoded UHDTV image frame, for example, to smooth sharp edges in the image between macroblocks corresponding to the decoded UHDTV image frame.
The motion compensation prediction function 354 can receive one or more decoded UHDTV image frames from the reference buffer 340. The motion compensation prediction function 354 can generate a prediction of a current UHDTV image frame based on image motion between the one or more decoded UHDTV image frames from the reference buffer 340 and the UHDTV image frame.
The intra predictor 356 can receive a first portion of a current UHDTV image frame from the reference buffer 340. The intra predictor 356 can generate a prediction corresponding to a first portion of a current UHDTV image frame based on at least a second portion of the current UHDTV image frame having previously been encoded and decoded by the enhancement layer encoder 302.
The color space predictor 400 can generate a prediction of the UHDTV image frames based on BT.709 image frames having previously been encoded by the base layer encoder 304. In some embodiments, the reference buffer 368 in the base layer encoder 304 can provide the reconstructed BT.709 image frame to a resolution upscaling function 370, which can scale the resolution of the reconstructed BT.709 image frame to a resolution that corresponds to the UHDTV video stream 102. The resolution upscaling function 370 can provide an upscaled resolution version of the reconstructed BT.709 image frame to the color space predictor 400. The color space predictor can generate a prediction of the UHDTV image frame based on the upscaled resolution version of the reconstructed BT.709 image frame. In some embodiments, the color space predictor 400 can scale a YUV color space of the upscaled resolution version of the reconstructed BT.709 image frame to correspond to the YUV representation supported by the UHDTV video stream 102. In some embodiments, the upscaling and color prediction are done jointly. The reference buffer 368 in the base layer encoder 304 can provide reconstructed BT.709 images frames to the joint upscaler color predictor. The joint upscaler color predictor 375 generates an upscaled and color prediction of the UHDTV image frame. The combined upscaler and color prediction functions enable reduced complexity as well as avoiding loss of precision resulting from limited bit-depth between the separate upscaler and the color prediction modules.
There are several ways for the color space predictor 400 to scale the color space supported by BT.709 video coding standard to a color space supported by the UHDTV video stream 102, such as independent channel prediction and affine mixed channel prediction. Independent channel prediction can include converting each portion of the YUV color space for the BT.709 image frame separately into the prediction of the UHDTV image frame. The Y portion or luminance can be scaled according to Equation 1:
Y
UHDTV
=g
1
·Y
BT.709
+o
1
The U portion or one of the chrominance portions can be scaled according to Equation 2:
U
UHDTV
=g
2
·U
BT.709
+o
2
The V portion or one of the chrominance portions can be scaled according to Equation 3:
V
UHDTV
=g
3
·V
BT.709
+o
3
The gain parameters g1, g2, and g3 and the offset parameters o1, o2, and o3 can be based on differences in the color space supported by the BT.709 video coding standard and the UHDTV video standard, and may vary depending on the content of the respective BT.709 image frame and UHDTV image frame. The enhancement layer encoder 304 can output the gain parameters g1, g2, and g3 and the offset parameters o1, o2, and o3 utilized by the color space predictor 400 to generate the prediction of the UHDTV image frame to the video decoder 500 as the color prediction parameters 114, for example, via the output interface 380.
In some embodiments, the independent channel prediction can include gain parameters g1, g2, and g3, and zero parameters. The Y portion or luminance can be scaled according to Equation 4:
Y
UHDTV
=g
1·(YBT.709−YzeroBT.709)+YzeroUHDTV
The U portion or one of the chrominance portions can be scaled according to Equation 5:
U
UHDTV
=g
2·(UBT.709−UzeroBT.709)+UzeroUHDTV
The V portion or one of the chrominance portions can be scaled according to Equation 6:
V
UHDTV
=g
3·(VBT.709−VzeroBT.709)+VzeroUHDTV
The gain parameters g1, g2, and g3 can be based on differences in the color space supported by the BT.709 video coding standard and the UHDTV video standard, and may vary depending on the content of the respective BT.709 image frame and UHDTV image frame. The enhancement layer encoder 304 can output the gain parameters g1, g2, and g3 utilized by the color space predictor 400 to generate the prediction of the UHDTV image frame to the video decoder 500 as the color prediction parameters 114, for example, via the output interface 380. Since the video decoder 500 can be pre-loaded with the zero parameters, the video encoder 300 can generate and transmit fewer color prediction parameters 114, for example, three instead of six, to the video decoder 500.
In some embodiments, the zero parameters used in Equations 4-6 can be defined based on the bit-depth of the relevant color space and color channel. For example, in Table 1, the zero parameters can be defined as follows:
The affine mixed channel prediction can include converting the YUV color space for a BT.709 image frame by mixing the YUV channels of the BT.709 image frame to generate a prediction of the UHDTV image frame, for example, through a matrix multiplication function. In some embodiments, the color space of the BT.709 can be scaled according to Equation 7:
The matrix parameters m11, m12, m13, m21, m22, m23, m31, m32, and m33 and the offset parameters o1, o2, and o3 can be based on the difference in color space supported by the BT.709 video format recommendation and the UHDTV video format recommendation, and may vary depending on the content of the respective BT.709 image frame and UHDTV image frame. The enhancement layer encoder 304 can output the matrix and offset parameters utilized by the color space predictor 400 to generate the prediction of the UHDTV image frame to the video decoder 500 as the color prediction parameters 114, for example, via the output interface 380.
In some embodiments, the color space of the BT.709 can be scaled according to Equation 8:
The matrix parameters m11, m12, m13, m22, and m33 and the offset parameters o1, o2, and o3 can be based on the difference in color space supported by the BT.709 video coding standard and the UHDTV video standard, and may vary depending on the content of the respective BT.709 image frame and UHDTV image frame. The enhancement layer encoder 304 can output the matrix and offset parameters utilized by the color space predictor 400 to generate the prediction of the UHDTV image frame to the video decoder 500 as the color prediction parameters 114, for example, via the output interface 380.
By replacing the matrix parameters m21, m23, m31, and m32 with zero, the luminance channel Y of the UHDTV image frame prediction can be mixed with the color channels U and V of the BT.709 image frame, but the color channels U and V of the UHDTV image frame prediction may not be mixed with the luminance channel Y of the BT.709 image frame. The selective channel mixing can allow for a more accurate prediction of the luminance channel UHDTV image frame prediction, while reducing a number of prediction parameters 114 to transmit to the video decoder 500.
In some embodiments, the color space of the BT.709 can be scaled according to Equation 9:
The matrix parameters m11, m12, m13, m22, m23, m32, and m33 and the offset parameters o1, o2, and o3 can be based on the difference in color space supported by the BT.709 video standard and the UHDTV video standard, and may vary depending on the content of the respective BT.709 image frame and UHDTV image frame. The enhancement layer encoder 304 can output the matrix and offset parameters utilized by the color space predictor 400 to generate the prediction of the UHDTV image frame to the video decoder 500 as the color prediction parameters 114, for example, via the output interface 380.
By replacing the matrix parameters m21 and m31 with zero, the luminance channel Y of the UHDTV image frame prediction can be mixed with the color channels U and V of the BT.709 image frame. The U and V color channels of the UHDTV image frame prediction can be mixed with the U and V color channels of the BT.709 image frame, but not the luminance channel Y of the BT.709 image frame. The selective channel mixing can allow for a more accurate prediction of the luminance channel UHDTV image frame prediction, while reducing a number of prediction parameters 114 to transmit to the video decoder 500.
The color space predictor 400 can generate the scaled color space predictions for the prediction selection function 350 on a per sequence (inter-frame), a per frame, or a per slice (intra-frame) basis, and the video encoder 300 can transmit the prediction parameter 114 corresponding to the scaled color space predictions on a per sequence (inter-frame), a per frame, or a per slice (intra-frame) basis. In some embodiments, the granularity for generating the scaled color space predictions can be preset or fixed in the color space predictor 400 or dynamically adjustable by the video encoder 300 based on encoding function or the content of the UHDTV image frames.
The video encoder 300 can transmit the color prediction parameters 114 in a normative portion of the encoded video stream 112, for example, in a Sequence Parameter Set (SPS), a Picture Parameter Set (PPS), or another lower level section of the normative portion of the encoded video stream 112. In some embodiments, the color prediction parameters 114 can be inserted into the encoded video stream 112 with a syntax that allows the video decoder 500 to identify that the color prediction parameters 114 are present in the encoded video stream 112, to identify a precision or size of the parameters, such as a number of bits utilized to represent each parameter, and identify a type of color space prediction the color space predictor 400 of the video encoder 300 utilized to generate the color space prediction.
In some embodiments, the normative portion of the encoded video stream 112 can include a flag (use_color_space_prediction), for example, one or more bits, which can annunciate an inclusion of color space parameters 114 in the encoded video stream 112. The normative portion of the encoded video stream 112 can include a size parameter (color_predictor_num_fraction_bits_minus—1), for example, one or more bits, which can identify a number of bits or precision utilized to represent each parameter. The normative portion of the encoded video stream 112 can include a predictor type parameter (color_predictor_idc), for example, one or more bits, which can identify a type of color space prediction utilized by the video encoder 300 to generate the color space prediction. The types of color space prediction can include independent channel prediction, affine prediction, their various implementations, or the like. The color prediction parameters 114 can include gain parameters, offset parameters, and/or matrix parameters depending on the type of prediction utilized by the video encoder 300.
Referring to
In some embodiments, the reference buffer 368 in the base layer encoder 304 can provide the encoded BT.709 image frame to the color space predictor 400. The color space predictor can scale a YUV color space of the encoded BT.709 image frame to correspond to the YUV representation supported by the UHDTV video format. The color space predictor 400 can provide the color space prediction to a resolution upscaling function 370, which can scale the resolution of the color space prediction of the encoded BT.709 image frame to a resolution that corresponds to the UHDTV video format. The resolution upscaling function 370 can provide a resolution upscaled color space prediction to the prediction selection function 350.
The independent color channel prediction function 420 can scale YUV components of the encoded BT.709 video stream 402 separately, for example, as shown above in Equations 1-6. The affine prediction function 430 can scale YUV components of the reconstructed BT.709 video frame 402 with a matrix multiplication, for example, as shown above in Equation 7. The cross-color prediction function 440 can scale YUV components of the encoded BT.709 video stream 402 with a modified matrix multiplication that can eliminate mixing of a Y component from the encoded BT.709 video stream 402 when generating the U and V components of the UHDTV image frame, for example, as shown above in Equations 8 or 9.
In some embodiments, the color space predictor 400 can include a selection device 450 to select an output from the independent color channel prediction function 420, the affine prediction function 430, and the cross-color prediction function 440. The selection device 450 also can output the color prediction parameters 114 utilized to generate the color space prediction 406. The color prediction control device 410 can control the timing of the generation of the color space prediction 406 and the type of operation performed to generate the color space prediction 406, for example, by controlling the timing and output of the selection device 450. In some embodiments, the color prediction control device 410 can control the timing of the generation of the color space prediction 406 and the type of operation performed to generate the color space prediction 406 by selectively providing the encoded BT.709 video stream 402 to at least one of the independent color channel prediction function 420, the affine prediction function 430, and the cross-color prediction function 440.
The enhancement layer decoder 502 can include an entropy decoding function 522, a inverse quantization function 524, an inverse transform function 526, and a combination function 528 to decode the encoded UHDTV image data received from the interface 510. A deblocking function 541 can filter the decoded UHDTV image frame, for example, to smooth sharp edges in the image between macroblocks corresponding to the decoded UHDTV image frame, and store the decoded UHDTV video stream 122 in a reference buffer 530. In some embodiments, the encoded UHDTV image data can correspond to a prediction residue, for example, a difference between a prediction and a UHDTV image frame as determined by the video encoder 300. The enhancement layer decoder 502 can generate a prediction of the UHDTV image frame, and the combination function 528 can add the prediction of the of the UHDTV image frame to encoded UHDTV image data having undergone entropy decoding, inverse quantization, and an inverse transform to generate the decoded UHDTV video stream 122. In some embodiments, the combination function 528 can include weighting, such as linear weighting, to generate the decoded UHDTV video stream 122.
The enhancement layer decoder 502 can include a color space predictor 600, a motion compensation prediction function 542, and an intra predictor 544, each of which can generate the prediction of the UHDTV image frame. The enhancement layer decoder 502 can include a prediction selection function 540 to select a prediction generated by the color space predictor 600, the motion compensation prediction function 542, and/or the intra predictor 544 to provide to the combination function 528.
In some embodiments, the motion compensation prediction function 542 and the intra predictor 544 can generate their respective predictions based on UHDTV image frames having previously been decoded by the enhancement layer decoder 502 and stored in the reference buffer 530. The motion compensation prediction function 542 can receive one or more decoded UHDTV image frames from the reference buffer 530. The motion compensation prediction function 542 can generate a prediction of a current UHDTV image frame based on image motion between the one or more decoded UHDTV image frames from the reference buffer 530 and the UHDTV image frame.
The intra predictor 544 can receive a first portion of a current UHDTV image frame from the reference buffer 530. The intra predictor 544 can generate a prediction corresponding to a first portion of a current UHDTV image frame based on at least a second portion of the current UHDTV image frame having previously been decoded by the enhancement layer decoder 502.
The color space predictor 600 can generate a prediction of the UHDTV image frames based on BT.709 image frames decoded by the base layer decoder 504. In some embodiments, the reference buffer 556 in the base layer decoder 504 can provide a portion of the decoded BT.709 video stream 124 to a resolution upscaling function 570, which can scale the resolution of the encoded BT.709 image frame to a resolution that corresponds to the UHDTV video format. The resolution upscaling function 570 can provide an upscaled resolution version of the encoded BT.709 image frame to the color space predictor 600. The color space predictor can generate a prediction of the UHDTV image frame based on the upscaled resolution version of the encoded BT.709 image frame. In some embodiments, the color space predictor 600 can scale a YUV color space of the upscaled resolution version of the encoded BT.709 image frame to correspond to the YUV representation supported by the UHDTV video format.
In some embodiments, the upscaling and color prediction are done jointly. The reference buffer 556 in the base layer decoder 504 can provide reconstructed BT.709 images frames to the joint upscaler color predictor 575. The joint upscaler color predictor generates an upscaled and color prediction of the UHDTV image frame. The combined upscaler and color prediction functions enable reduced complexity as well as avoiding loss of precision resulting from limited bit-depth between the separate upscaler and the color prediction modules. An example of the combination of upscaling and color prediction may be defined by a sample set of equations. Conventional upsampling implemented by separable filter calculations followed by an independent color prediction. Example calculations are shown below in three steps by equations 10, 11 and 12.
The input samples xi,j are filtered in one direction by taps ak to give intermediates yi,j. An offset, o1, is added and the result is right shifted by the value s1 as in Equation 10:
The intermediate samples yi,j are then filtered by taps bk to give samples zi,j and a second offset, o2, is added and the result is right shifted by a second value, s2 as in Equation 11:
The results of the upsampling process zi,j are then processed by the color predition to generate prediction samples pi,j. A gain is applied then an offset, o3, is added before a final shift by s3. The color prediction process described in Equation 12:
p
i,j=(gain·zi,j+o3)>>s3
The complexity may be reduced by combining the color prediction calculation with the second separable filter calculation. The filter taps bk of Equation 11 are combined with the gain of Equation 12 to produce new taps ck=gain·bk the shift values of Equations 11 and Equation 12 are combined to give a new shift value s4=s2+s3. The offset of Equation 12 is modified to o4=o3<<s2. The individual calculations of Equation 11 and Equation 12 are defined in a single result Equation 13:
The combined calculation of Equation 13 has the advantage compared to Equations 11 and Equation 12 of reducing computation by using a single shift rather than two separate shifts and reducing the number of multiplies by premultiplying the filter taps by the gain value.
In some embodiments, it may be desirable to implement the separable filter calculations with equal taps so that ak=bk in Equation 10 and Equation 11. Direct application of the combined upscaling and color prediction removes this equality of taps since the values bk are replaced with the combined values ck An alternate embodiment will maintain this equality of taps. The gain is represented as a the square of a value r shifted by a factor e in the form gain=(r·r)<<e. Where the value r is represented with m bits.
The results of Equations 10 and Equation 13 may be replaced by the pair of Equation 14 and Equation 15:
The offsets and shifts used in Equation 15 and Equation 16 are derived from the values in Equations 10 and Equation 13 and the representation of the gain value as shown in Equation 16:
o
5
=o
1
<<m
s
5
=s
1
+m
o
6
=o
4<<(m+e)
s
6
=s
4
+m+e
The filter calculations in Equation 15 and Equation 16 use equal tap values r·ak. The use of the exponent factor e allows large gain values to be approximated with small values of r by increasing the value of e.
The color space predictor 600 can operate similarly to the color space predictor 400 in the video encoder 300, by scaling the color space supported by BT.709 video coding standard to a color space supported by the UHDTV video format, for example, with independent channel prediction, affine mixed channel prediction, or cross-color channel prediction. The color space predictor 600, however, can select a type of color space prediction to generate based, at least in part, on the color prediction parameters 114 received from the video encoder 300. The color prediction parameters 114 can explicitly identify a particular a type of color space prediction, or can implicitly identify the type of color space prediction, for example, by a quantity and/or arrangement of the color prediction parameters 114.
As discussed above, in some embodiments, the normative portion of the encoded video stream 112 can include a flag (use_color_space_prediction), for example, one or more bits, which can annunciate an inclusion of color space parameters 114 in the encoded video stream 112. The normative portion of the encoded video stream 112 can include a size parameter (color_predictor_num_fraction_bits_minus—1), for example, one or more bits, which can identify a number of bits or precision utilized to represent each parameter. The normative portion of the encoded video stream 112 can include a predictor type parameter (color_predictor_idc), for example, one or more bits, which can identify a type of color space prediction utilized by the video encoder 300 to generate the color space prediction. The types of color space prediction can include independent channel prediction, affine prediction, their various implementations, or the like. The color prediction parameters 114 can include gain parameters, offset parameters, and/or matrix parameters depending on the type of prediction utilized by the video encoder 300.
The color space predictor 600 identify whether the video encoder 300 utilize color space prediction in generating then encoded video stream 112 based on the flag (use_color_space_prediction). When color prediction parameters 114 are present in the encoded video stream 112, the color space predictor 600 can parse the color prediction parameters 114 to identify a type of color space prediction utilized by the video encoded based on the predictor type parameter (color_predictor_idc), and a size or precision of the parameters (color_predictor_num_fraction_bits_minus—1), and locate the color space parameters to utilize to generate a color space prediction.
For example, the video decoder 500 can determine whether the color prediction parameters 114 are present in the encoded video stream 112 and parse the color prediction parameters 114 based on the following example code in Table 2:
The example code in Table 2 can allow the video decoder 500 to identify whether color prediction parameters 114 are present in the encoded video stream 112 based on the use_color_space prediction flag. The video decoder 500 can identify the precision or size of the color space parameters based on the size parameter (color_predictor_num_fraction_bits_minus—1), and can identify a type of color space prediction utilized by the video encoder 300 based on the type parameter (color_predictor_idc). The example code in Table 2 can allow the video decoder 500 to parse the color space parameters from the encoded video stream 112 based on the identified size of the color space parameters and the identified type color space prediction utilized by the video encoder 300, which can identify the number, semantics, and location of the color space parameters. Although the example code in Table 2 shows the affine prediction including 9 matrix parameters and 3 offset parameters, in some embodiments, the color prediction parameters 114 can include fewer matrix and/or offset parameters, for example, when the matrix parameters are zero, and the example code can be modified to parse the color prediction parameters 114 accordingly.
An alternate method for signaling the color prediction parameters is described here. The structure of the Picture Parameter Set (PPS) of HEVC is shown in the table below:
Additional fields to carry color prediction data are added when the pps_extension_flag is set.
In extension data signal the following:
A flag to use color prediction on the current picture
Indicator of color prediction model used to signal gain and offset values.
For each model the following values are signaled or derived: number_gain_fraction_bits, gain[ ] and offset[ ] values for each color component.
Bit Increment (BI) model: the number of fraction bits is zero, the gain values are equal and based on the difference in bit-depth between base and enhancement layer i.e. 1<<(bit_depth_EL-bit-depth_BL), all offset values are zero.
Fixed Gain Offset model: an index is signaled indicating the use of a set of parameters signaled previously for instance out of band or through a predefined table of parameter values. This index indicates a previously define set of values including: number of fraction bits, gain and offset values for all components. These values are not signaled but reference to a predefined set. If only a single set of parameters is predefined, an index is not sent and this set is used when the Fixed Gain Offset model is used.
Picture Adaptive Gain Offset Offset model: parameter values are signaled in the bitstream through the following fields. Number of fraction bits is signaled as an integer in a predefined range i.e. 0-5. For each channel gain and offset values are signaled as integers. An optional method is to signal the difference between the Fixed Gain Offset model and the parameter values of the Dynamic Gain Offset model.
Each layer will may have independently specified color space for instance using the HEVC Video Usability Information (VUI) with colour_description_present_flag indicating the presence of colour information. As an example, separate VUI fields can be specified for each layer through different Sequence Parameter Sets.
The color space predictor 600 can generate color space predictions for the prediction selection function 540 on a per sequence (inter-frame), a per frame, or a per slice (intra-frame) basis. In some embodiments, the color space predictor 600 can generate the color space predictions with a fixed or preset timing or dynamically in response to a reception of the color prediction parameters 114 from the video encoder 300.
Referring to
In some embodiments, the reference buffer 556 in the base layer decoder 504 can provide the portions of the decoded BT.709 video stream 124 to the color space predictor 600. The color space predictor 600 can scale a YUV color space of the portions of the decoded BT.709 video stream 124 to correspond to the YUV representation supported by the UHDTV video standard. The color space predictor 600 can provide the color space prediction to a resolution upscaling function 570, which can scale the resolution of the color space prediction to a resolution that corresponds to the UHDTV video standard. The resolution upscaling function 570 can provide a resolution upscaled color space prediction to the prediction selection function 540.
The independent color channel prediction function 620 can scale YUV components of the decoded BT.709 video stream 122 separately, for example, as shown above in Equations 1-6. The affine prediction function 630 can scale YUV components of the decoded BT.709 video stream 122 with a matrix multiplication, for example, as shown above in Equation 7. The cross-color prediction function 640 can scale YUV components of the decoded BT.709 video stream 122 with a modified matrix multiplication that can eliminate mixing of a Y component from the decoded BT.709 video stream 122 when generating the U and V components of the UHDTV image frame, for example, as shown above in Equations 8 or 9.
In some embodiments, the color space predictor 600 can include a selection device 650 to select an output from the independent color channel prediction function 620, the affine prediction function 630, and the cross-color prediction function 640. The color prediction control device 610 can control the timing of the generation of the color space prediction 606 and the type of operation performed to generate the color space prediction 606, for example, by controlling the timing and output of the selection device 650. In some embodiments, the color prediction control device 610 can control the timing of the generation of the color space prediction 606 and the type of operation performed to generate the color space prediction 606 by selectively providing the decoded BT.709 video stream 122 to at least one of the independent color channel prediction function 620, the affine prediction function 630, and the cross-color prediction function 640.
At a block 720, the video encoder 300 can scale a color space of the first image from the first image format into a color space corresponding to a second image format. In some embodiments, the video encoder 300 can scale the color space between the BT.709 video standard and an Ultra High Definition Television (UHDTV) video standard corresponding to the second image format.
There are several ways for the video encoder 300 to scale the color space supported by BT.709 video coding standard to a color space supported by the UHDTV video format, such as independent channel prediction and affine mixed channel prediction. For example, the independent color channel prediction can scale YUV components of encoded BT.709 image frames separately, for example, as shown above in Equations 1-6. The affine mixed channel prediction can scale YUV components of the encoded BT.709 image frames with a matrix multiplication, for example, as shown above in Equations 7-9.
In some embodiments, the video encoder 300 can scale a resolution of the first image from the first image format into a resolution corresponding to the second image format. For example, the UHDTV video standard can support a 4k (3840×2160 pixels) or an 8k (7680×4320 pixels) resolution and a 10 or 12 bit quantization bit-depth. The BT.709 video standard can support a 2k (1920×1080 pixels) resolution and an 8 or 10 bit quantization bit-depth. The video encoder 300 can scale the encoded first image from a resolution corresponding to the BT.709 video standard into a resolution corresponding to the UHDTV video standard.
At a block 730, the video encoder 300 can generate a color space prediction based, at least in part, on the scaled color space of the first image. The color space prediction can be a prediction of a UHDTV image frame (or portion thereof) from a color space of a corresponding encoded BT.709 image frame. In some embodiments, the video encoder 300 can generate the color space prediction based, at least in part, on the scaled resolution of the first image.
At a block 740, the video encoder 300 can encode a second image having the second image format based, at least in part, on the color space prediction. The video encoder 300 can output the encoded second image and color prediction parameters utilized to scale the color space of the first image to a video decoder.
At a block 820, the video decoder 500 can scale a color space of the first image corresponding to the first image format into a color space corresponding to a second image format. In some embodiments, the video decoder 500 can scale the color space between the BT.709 video standard and an Ultra High Definition Television (UHDTV) video standard corresponding to the second image format.
There are several ways for the video decoder 500 to scale the color space supported by BT.709 video coding standard to a color space supported by the UHDTV video standard, such as independent channel prediction and affine mixed channel prediction. For example, the independent color channel prediction can scale YUV components of the encoded BT.709 image frames separately, for example, as shown above in Equations 1-6. The affine mixed channel prediction can scale YUV components of the encoded BT.709 image frames with a matrix multiplication, for example, as shown above in Equations 7-9.
The video decoder 500 can select a type of color space scaling to perform, such as independent channel prediction or one of the varieties of affine mixed channel prediction based on channel prediction parameters the video decoder 500 receives from the video encoder 300. In some embodiments, the video decoder 500 can perform a default or preset color space scaling of the decoded BT.709 image frames.
In some embodiments, the video decoder 500 can scale a resolution of the first image from the first image format into a resolution corresponding to the second image format. For example, the UHDTV video standard can support a 4k (3840×2160 pixels) or an 8k (7680×4320 pixels) resolution and a 10 or 12 bit quantization bit-depth. The BT.709 video standard can support a 2k (1920×1080 pixels) resolution and an 8 or 10 bit quantization bit-depth. The video decoder 500 can scale the decoded first image from a resolution corresponding to the BT.709 video standard into a resolution corresponding to the UHDTV video standard.
At a block 830, the video decoder 500 can generate a color space prediction based, at least in part, on the scaled color space of the first image. The color space prediction can be a prediction of a UHDTV image frame (or portion thereof) from a color space of a corresponding decoded BT.709 image frame. In some embodiments, the video decoder 500 can generate the color space prediction based, at least in part, on the scaled resolution of the first image.
At a block 840, the video decoder 500 can decode the encoded video stream into a second image having the second image format based, at least in part, on the color space prediction. In some embodiments, the video decoder 500 can utilize the color space prediction to combine with a portion of the encoded video stream corresponding to a prediction residue from the video encoder 300. The combination of the color space prediction and the decoded prediction residue can correspond to a decoded UHDTV image frame or portion thereof.
At a block 920, the video decoder 500 can scale a color space of the first residual frame corresponding to the first format into a color space corresponding to a second format. In some embodiments, the video decoder 500 can scale the color space between the BT.709 video standard and an Ultra High Definition Television (UHDTV) video standard corresponding to the second format.
There are several ways for the video decoder 500 to scale the color space supported by BT.709 video coding standard to a color space supported by the UHDTV video standard, such as independent channel prediction and affine mixed channel prediction. For example, the independent color channel prediction can scale YUV components of the encoded BT.709 image frames separately, for example, as shown above in Equations 1-6. The affine mixed channel prediction can scale YUV components of the encoded BT.709 image frames with a matrix multiplication, for example, as shown above in Equations 7-9.
The video decoder 500 can select a type of color space scaling to perform, such as independent channel prediction or one of the varieties of affine mixed channel prediction based on channel prediction parameters the video decoder 500 receives from the video encoder 300. In some embodiments, the video decoder 500 can perform a default or preset color space scaling of the decoded BT.709 image frames.
In some embodiments, the video decoder 500 can scale a resolution of the first residual frame from the first format into a resolution corresponding to the second format. For example, the UHDTV video standard can support a 4k (3840×2160 pixels) or an 8k (7680×4320 pixels) resolution and a 10 or 12 bit quantization bit-depth. The BT.709 video standard can support a 2k (1920×1080 pixels) resolution and an 8 or 10 bit quantization bit-depth. The video decoder 500 can scale the decoded first residual frame from a resolution corresponding to the BT.709 video standard into a resolution corresponding to the UHDTV video standard.
At a block 930, the video decoder 500 can generate a color space prediction based, at least in part, on the scaled color space of the first residual frame. The color space prediction can be a prediction of a UHDTV image frame (or portion thereof) from a color space of a corresponding decoded BT.709 image frame. In some embodiments, the video decoder 500 can generate the color space prediction based, at least in part, on the scaled resolution of the first residual frame.
At a block 940, the video decoder 500 can decode the encoded video stream into a second image having the second format based, at least in part, on the color space prediction. In some embodiments, the video decoder 500 can utilize the color space prediction to combine with a portion of the encoded video stream corresponding to a prediction residue from the video encoder 300. The combination of the color space prediction and the decoded prediction residue can correspond to a decoded UHDTV image frame or portion thereof.
The system and apparatus described above may use dedicated processor systems, micro controllers, programmable logic devices, microprocessors, or any combination thereof, to perform some or all of the operations described herein. Some of the operations described above may be implemented in software and other operations may be implemented in hardware. Any of the operations, processes, and/or methods described herein may be performed by an apparatus, a device, and/or a system substantially similar to those as described herein and with reference to the illustrated figures.
The processing device may execute instructions or “code” stored in memory. The memory may store data as well. The processing device may include, but may not be limited to, an analog processor, a digital processor, a microprocessor, a multi-core processor, a processor array, a network processor, or the like. The processing device may be part of an integrated control system or system manager, or may be provided as a portable electronic device configured to interface with a networked system either locally or remotely via wireless transmission.
The processor memory may be integrated together with the processing device, for example RAM or FLASH memory disposed within an integrated circuit microprocessor or the like. In other examples, the memory may comprise an independent device, such as an external disk drive, a storage array, a portable FLASH key fob, or the like. The memory and processing device may be operatively coupled together, or in communication with each other, for example by an I/O port, a network connection, or the like, and the processing device may read a file stored on the memory. Associated memory may be “read only” by design (ROM) by virtue of permission settings, or not. Other examples of memory may include, but may not be limited to, WORM, EPROM, EEPROM, FLASH, or the like, which may be implemented in solid state semiconductor devices. Other memories may comprise moving parts, such as a known rotating disk drive. All such memories may be “machine-readable” and may be readable by a processing device.
Operating instructions or commands may be implemented or embodied in tangible forms of stored computer software (also known as “computer program” or “code”). Programs, or code, may be stored in a digital memory and may be read by the processing device. “Computer-readable storage medium” (or alternatively, “machine-readable storage medium”) may include all of the foregoing types of memory, as well as new technologies of the future, as long as the memory may be capable of storing digital information in the nature of a computer program or other data, at least temporarily, and as long at the stored information may be “read” by an appropriate processing device. The term “computer-readable” may not be limited to the historical usage of “computer” to imply a complete mainframe, mini-computer, desktop or even laptop computer. Rather, “computer-readable” may comprise storage medium that may be readable by a processor, a processing device, or any computing system. Such media may be any available media that may be locally and/or remotely accessible by a computer or a processor, and may include volatile and non-volatile media, and removable and non-removable media, or any combination thereof.
A program stored in a computer-readable storage medium may comprise a computer program product. For example, a storage medium may be used as a convenient means to store or transport a computer program. For the sake of convenience, the operations may be described as various interconnected or coupled functional blocks or diagrams. However, there may be cases where these functional blocks or diagrams may be equivalently aggregated into a single logic device, program or operation with unclear boundaries.
One of skill in the art will recognize that the concepts taught herein can be tailored to a particular application in many other ways. In particular, those skilled in the art will recognize that the illustrated examples are but one of many alternative implementations that will become apparent upon reading this disclosure.
Although the specification may refer to “an”, “one”, “another”, or “some” example(s) in several locations, this does not necessarily mean that each such reference is to the same example(s), or that the feature only applies to a single example.
The terms and expressions which have been employed in the foregoing specification are used therein as terms of description and not of limitation, and there is no intention, in the use of such terms and expressions, of excluding equivalents of the features shown and described or portions thereof, it being recognized that the scope of the invention is defined and limited only by the claims which follow.
This application claims the benefit of U.S. Provisional Patent Application No. 61/704,776, filed Sep. 24, 2012, U.S. Provisional Patent Application No. 61/739,907 filed Dec. 20, 2013, and U.S. Provisional Patent Application No. 61/760,634 filed Feb. 4, 2013, all of which is incorporated by reference herein in their entirety.
Number | Date | Country | |
---|---|---|---|
61704776 | Sep 2012 | US | |
61739907 | Dec 2012 | US | |
61760634 | Feb 2013 | US |