Predicting filter coefficients from fixed filters for video coding
An example device for filtering a decoded block of video data includes one or more processing units configured to construct a plurality of filters for classes of blocks of a current picture of video data. To construct the plurality of filters for each of the classes, the processing units are configured to determine a value of a flag that indicates whether a fixed filter is used to predict a set of filter coefficients of the class, and in response to the fixed filter being used to predict the set of filter coefficients, determine an index value into a set of fixed filters and predict the set of filter coefficients of the class using a fixed filter of the set of fixed filters identified by the index value.
1. A method of filtering a decoded block of video data, the method comprising:
constructing a plurality of filters for classes of blocks of a current picture of video data, wherein the classes of blocks include a first class of block having a first directionality of a first gradient of pixels of the first class of block and a second class of block having a second directionality of a second gradient of pixels of the second class of block, and wherein constructing the plurality of filters comprises, for each of the classes:
determining whether a fixed filter is used to predict a set of filter coefficients of the class; and
in response to determining that the fixed filter is used to predict the set of filter coefficients, determining an index value into a set of fixed filters of the class and predicting the set of filter coefficients of the class using the fixed filter of the set of fixed filters identified by the index value;
decoding a current block of a current picture of the video data;
determining a class for the current block;
selecting a filter of the plurality of filters that corresponds to the class for the current block; and
filtering at least one pixel of the current block using the selected filter.
2. The method of claim 1 , wherein determining, for each of the classes, whether the fixed filter is used to predict the set of filter coefficients comprises determining, for each of the classes, a value of a flag that indicates whether the fixed filter is used to predict the set of filter coefficients for the class.
3. The method of claim 1 , wherein constructing the plurality of filters further comprises, for each of the classes that the fixed filter is used to predict the set of filter coefficients:
determining offset values to be applied to the predicted set of filter coefficients of the class; and
applying the offset values to the predicted set of filter coefficients of the class to construct the filter for the class.
4. The method of claim 1 , wherein constructing the plurality of filters further comprises determining a value representing one of:
that none of the sets of filter coefficients for any of the classes are predicted from any of the fixed filters;
that all of the sets of filter coefficients for all of the classes are predicted from at least one of the fixed filters; or
that some of the sets of filter coefficients of the classes are predicted from one or more of the fixed filters and the remaining sets of filter coefficients are not predicted from any of the fixed filters.
5. The method of claim 4 , further comprising, when the value represents that none of the sets of filter coefficients for any of the classes are predicted from any of the fixed filters, preventing determination of the index value representing the fixed filter of the one or more fixed filters.
6. The method of claim 4 , further comprising, when the value represents that none of the sets of filter coefficients for any of the classes are predicted from any of the fixed filters, preventing coding of a flag that indicates whether a fixed filter is used to predict a set of filter coefficients of each class.
7. The method of claim 4 , further comprising, when the value represents that all of the sets of filter coefficients for all of the classes are predicted from at least one of the fixed filters, determining index values for each of the classes representing the one of the fixed filters from which the set of filter coefficients for the corresponding class is predicted.
8. The method of claim 4 , further comprising, when the value represents that all of the sets of filter coefficients for all of the classes are predicted from at least one of the fixed filters, preventing coding of a flag that indicates whether a fixed filter is used to predict a set of filter coefficients of each class.
9. The method of claim 4 , further comprising, when the value represents that some of the sets of filter coefficients of the classes are predicted from one or more of the fixed filters:
determining which of the classes correspond to sets of filter coefficients that are predicted from one or more of the fixed filters; and
for each of the sets of filter coefficients that are predicted from one or more of the fixed filters, determining the index value representing the fixed filter of the one or more fixed filters from which the corresponding set of filter coefficients is predicted.
10. The method of claim 1 , further comprising encoding the current block prior to decoding the current block.
11. The method of claim 1 , further comprising determining that a common set of differences between filter coefficients and the fixed filter for at least a first class and a second class of the classes are the same, that the first class is predicted from a first fixed filter, and that the second class is predicted from a second fixed filter, the second fixed filter being different than the first fixed filter.
12. The method of claim 1 , the method being executable on a wireless communication device, wherein the device comprises:
a memory configured to store the video data;
a processor configured to execute instructions to process the video data stored in the memory; and
a receiver configured to receive the video data and store the video data to the memory.
13. The method of claim 12 , wherein the wireless communication device is a cellular telephone and the video data is received by a receiver and modulated according to a cellular communication standard.
14. A device for filtering a decoded block of video data, the device comprising:
a memory configured to store the video data; and
one or more processing units implemented in circuitry configured to:
construct a plurality of filters for classes of blocks of a current picture of video data, wherein the classes of blocks include a first class of block having a first directionality of a first gradient of pixels of the first class of block and a second class of block having a second directionality of a second gradient of pixels of the second class of block, and wherein to construct the plurality of filters for each of the classes, the one or more processing units are configured to:
determine whether a fixed filter is used to predict a set of filter coefficients of the class; and
in response to determining that the fixed filter is used to predict the set of filter coefficients, determine an index value into a set of fixed filters of the class and predict the set of filter coefficients of the class using the fixed filter of the set of fixed filters identified by the index value;
decode a current block of a current picture of the video data;
determine a class for the current block;
select a filter of the plurality of filters that corresponds to the class for the current block; and
filter at least one pixel of the current block using the selected filter.
15. The device of claim 14 , wherein to determine, for each of the classes, whether the fixed filter is used to predict the set of filter coefficients, the one or more processing units are configured to determine, for each of the classes, a value of a flag that indicates whether the fixed filter is used to predict the set of filter coefficients for the class.
16. The device of claim 14 , wherein to construct the plurality of filters, the one or more processing units are configured to:
determine offset values to be applied to the predicted set of filter coefficients of the class; and
apply the offset values to the predicted set of filter coefficients of the class to construct the filter for the class.
17. The device of claim 14 , wherein to construct the plurality of filters, the one or more processing units are further configured to determine a value representing one of:
that none of the sets of filter coefficients for any of the classes are predicted from any of the fixed filters;
that all of the sets of filter coefficients for all of the classes are predicted from at least one of the fixed filters; or
that some of the sets of filter coefficients of the classes are predicted from one or more of the fixed filters and the remaining sets of filter coefficients are not predicted from any of the fixed filters.
18. The device of claim 17 , wherein the one or more processing units are further configured to, when the value represents that none of the sets of filter coefficients for any of the classes are predicted from any of the fixed filters, prevent determination of the index value representing a fixed filter of the one or more fixed filters.
19. The device of claim 17 , wherein the one or more processing units are further configured to, when the value represents that none of the sets of filter coefficients for any of the classes are predicted from any of the fixed filters, prevent coding of a flag that indicates whether a fixed filter is used to predict a set of filter coefficients of each class.
20. The device of claim 17 , wherein the one or more processing units are further configured to, when the value represents that all of the sets of filter coefficients for all of the classes are predicted from at least one of the fixed filters, determine index values for each of the classes representing the one of the fixed filters from which the set of filter coefficients for the corresponding class is predicted.
21. The device of claim 17 , wherein the one or more processing units are further configured to, when the value represents that all of the sets of filter coefficients for all of the classes are predicted from at least one of the fixed filters, prevent coding of a flag that indicates whether a fixed filter is used to predict a set of filter coefficients of each class.
22. The device of claim 17 , wherein the one or more processing units are further configured to, when the value represents that some of the sets of filter coefficients of the classes are predicted from one or more of the fixed filters:
determine which of the classes correspond to sets of filter coefficients that are predicted from one or more of the fixed filters; and
for each of the sets of filter coefficients that are predicted from one or more of the fixed filters, determine the index value representing the fixed filter of the one or more fixed filters from which the corresponding set of filter coefficients is predicted.
23. The device of claim 14 , wherein the one or more processing units are further configured to determine that a common set of differences between filter coefficients and the fixed filter for at least a first class and a second class of the classes are the same, that the first class is predicted from a first fixed filter and that the second class is predicted from a second fixed filter, the second fixed filter being different than the first fixed filter.
24. The device of claim 14 , wherein the device is a wireless communication device, further comprising:
a receiver configured to receive video data including the current picture.
25. The device of claim 24 , wherein the wireless communication device is a cellular telephone and the video data is received by the receiver and modulated according to a cellular communication standard.
26. A device for filtering a decoded block of video data, the device comprising:
means for constructing a plurality of filters for classes of blocks of a current picture of video data, wherein the classes of blocks include a first class of block having a first directionality of a first gradient of pixels of the first class of block and a second class of block having a second directionality of a second gradient of pixels of the second class of block, and wherein the means for constructing the plurality of filters comprises:
means for determining whether a fixed filter is used to predict a set of filter coefficients of each of the classes; and
means for determining an index value into a set of fixed filters and means for predicting the set of filter coefficients of the class using the fixed filter of the set of fixed filters of the class identified by the index value in response to determining that the fixed filter is used to predict the set of filter coefficients;
means for decoding a current block of a current picture of the video data;
means for determining a class for the current block;
means for selecting a filter of the plurality of filters that corresponds to the class for the current block; and
means for filtering at least one pixel of the current block using the selected filter.
27. The device of claim 26 , wherein the means for determining whether the fixed filter is used to predict the set of filter coefficients of each of the classes comprises means for determining, for each of the classes, a value of a flag that indicates whether the fixed filter is used to predict the set of filter coefficients for the class.
28. The device of claim 26 , wherein the means for constructing the plurality of filters further comprises:
means for determining offset values to be applied to the predicted set of filter coefficients for each of the classes that the flag indicates that the fixed filter is used to predict the set of filter coefficients; and
means for applying the offset values to the predicted set of filter coefficients of the class to construct the filter for each of the classes that the flag indicates that the fixed filter is used to predict the set of filter coefficients.
29. The device of claim 26 , wherein the means for constructing the plurality of filters further comprises means for determining a value representing one of:
that none of the sets of filter coefficients for any of the classes are predicted from any of the fixed filters;
that all of the sets of filter coefficients for all of the classes are predicted from at least one of the fixed filters; or
that some of the sets of filter coefficients of the classes are predicted from one or more of the fixed filters and the remaining sets of filter coefficients are not predicted from any of the fixed filters.
30. The device of claim 29 , further comprising means for preventing determination of the index value representing a fixed filter of the one or more fixed filters when the value represents that none of the sets of filter coefficients for any of the classes are predicted from any of the fixed filters.
31. The device of claim 29 , further comprising means for preventing coding of a flag that indicates whether a fixed filter is used to predict a set of filter coefficients of each class when the value represents that none of the sets of filter coefficients for any of the classes are predicted from any of the fixed filters.
32. The device of claim 29 , further comprising means for determining index values for each of the classes representing the one of the fixed filters from which the set of filter coefficients for the corresponding class is predicted when the value represents that all of the sets of filter coefficients for all of the classes are predicted from at least one of the fixed filters.
33. The device of claim 29 , further comprising means for preventing coding of a flag that indicates whether a fixed filter is used to predict a set of filter coefficients of each class when the value represents that all of the sets of filter coefficients for all of the classes are predicted from at least one of the fixed filters.
34. The device of claim 29 , further comprising:
means for determining which of the classes correspond to sets of filter coefficients that are predicted from one or more of the fixed filters when the value represents that some of the sets of filter coefficients of the classes are predicted from one or more of the fixed filters; and
means for determining the index value representing the fixed filter of the one or more fixed filters from which the corresponding set of filter coefficients is predicted for each of the sets of filter coefficients that are predicted from one or more of the fixed filters.
35. The device of claim 26 , further comprising means for encoding the current block prior to decoding the current block.
36. The device of claim 26 , further comprising means for determining that a common set of differences between filter coefficients and the fixed filter for at least a first class and a second class of the classes are the same, that the first class is predicted from a first fixed filter, and that the second class is predicted from a second fixed filter, the second fixed filter being different than the first fixed filter.
37. A non-transitory computer-readable storage medium having stored therein instructions that, when executed, cause a processor to:
construct a plurality of filters for classes of blocks of a current picture of video data, wherein the classes of blocks include a first class of block having a first directionality of a first gradient of pixels of the first class of block and a second class of block having a second directionality of a second gradient of pixels of the second class of block, and wherein the instructions that cause the processor to construct the plurality of filters comprise instructions that cause the processor to, for each of the classes:
determine whether a fixed filter is used to predict a set of filter coefficients of the class; and
in response to determining that the fixed filter is used to predict the set of filter coefficients, determine an index value into a set of fixed filters of the class and predict the set of filter coefficients of the class using the fixed filter of the set of fixed filters identified by the index value;
decode a current block of a current picture of the video data;
determine a class for the current block;
select a filter of the plurality of filters that corresponds to the class for the current block; and
filter at least one pixel of the current block using the selected filter.
38. The non-transitory computer-readable storage medium of claim 37 , wherein the instructions that cause the processor to determine, for each of the classes, whether the fixed filter is used to predict the set of filter coefficients comprise instructions that cause the processor to determine, for each of the classes, a value of a flag that indicates whether the fixed filter is used to predict the set of filter coefficients for the class.
39. The non-transitory computer-readable storage medium of claim 37 , wherein the instructions that cause the processor to construct the plurality of filters further comprise instructions that cause the processor to, for each of the classes that the fixed filter is used to predict the set of filter coefficients:
determine offset values to be applied to the predicted set of filter coefficients of the class; and
apply the offset values to the predicted set of filter coefficients of the class to construct the filter for the class.
40. The non-transitory computer-readable storage medium of claim 37 , wherein the instructions that cause the processor to construct the plurality of filters further comprise instructions that cause the processor to determine a value representing one of:
that none of the sets of filter coefficients for any of the classes are predicted from any of the fixed filters;
that all of the sets of filter coefficients for all of the classes are predicted from at least one of the fixed filters; or
that some of the sets of filter coefficients of the classes are predicted from one or more of the fixed filters and the remaining sets of filter coefficients are not predicted from any of the fixed filters.
41. The non-transitory computer-readable storage medium of claim 40 , further comprising instructions that cause the processor to, when the value represents that none of the sets of filter coefficients for any of the classes are predicted from any of the fixed filters, prevent determination of the index value representing a fixed filter of the one or more fixed filters.
42. The non-transitory computer-readable storage medium of claim 40 , further comprising instructions that cause the processor to, when the value represents that none of the sets of filter coefficients for any of the classes are predicted from any of the fixed filters, prevent coding of a flag that indicates whether a fixed filter is used to predict a set of filter coefficients of each class.
43. The non-transitory computer-readable storage medium of claim 40 , further comprising instructions that cause the processor to, when the value represents that all of the sets of filter coefficients for all of the classes are predicted from at least one of the fixed filters, determine index values for each of the classes representing the one of the fixed filters from which the set of filter coefficients for the corresponding class is predicted.
44. The non-transitory computer-readable storage medium of claim 40 , further comprising instructions that cause the processor to, when the value represents that all of the sets of filter coefficients for any of the classes are predicted from at least one of the fixed filters, prevent coding of a flag that indicates whether a fixed filter is used to predict a set of filter coefficients of each class.
45. The non-transitory computer-readable storage medium of claim 40 , further comprising instructions that cause the processor to, when the value represents that some of the sets of filter coefficients of the classes are predicted from one or more of the fixed filters:
determine which of the classes correspond to sets of filter coefficients that are predicted from one or more of the fixed filters; and
for each of the sets of filter coefficients that are predicted from one or more of the fixed filters, determine the index value representing the fixed filter of the one or more fixed filters from which the corresponding set of filter coefficients is predicted.
46. The non-transitory computer-readable storage medium of claim 37 , further comprising instructions that cause the processor to encode the current block prior to decoding the current block.
47. The non-transitory computer-readable storage medium of claim 37 , further comprising instructions that cause the processor to determine that a common set of differences between filter coefficients and the fixed filter for at least a first class and a second class of the classes are the same, that the first class is predicted from a first fixed filter, and that the second class is predicted from a second fixed filter, the second fixed filter being different than the first fixed filter.