Heuristic based caching pictures for video coding
A method includes determining a picture type of a current picture, determining, based on the picture type of the current picture, whether to write the current picture in a dedicated chip memory or whether to write the current picture a non-dedicated system memory, and writing the current picture in the dedicated chip memory or the non-dedicated system memory based on the determining of whether to write the current picture in the dedicated chip memory or whether to write the current picture in the non-dedicated system memory.
1 . A method of processing video data, the method comprising:
determining that a current picture is of a first picture type of a plurality of picture types;
determining that a cached picture stored in a dedicated chip memory is of a second picture type of the plurality of picture types, wherein each picture type of the plurality of picture types is associated with a respective priority level of a plurality of priority levels, the respective priority level being indicative of a likelihood that a picture type, among the plurality of picture types, associated with the respective priority level is to be used as a reference picture;
comparing a first priority level associated with the first picture type to a second priority level associated with the second picture type to determine a comparison;
determining, based on the comparison of the first priority level to the second priority level, whether to write the current picture in the dedicated chip memory or to write the current picture in a non-dedicated system memory; and
writing the current picture in the dedicated chip memory or the non-dedicated system memory based on the determining of whether to write the current picture in the dedicated chip memory or to write the current picture in the non-dedicated system memory.
2 . The method of claim 1 , wherein the first picture type or the second picture type comprises one of an intra-prediction picture type, a uni-direction prediction type, and a bi-prediction type.
3 . The method of claim 1 , wherein one of:
the first priority level is indicative of a higher priority than the second priority level based on the first picture type being an intra-prediction picture type and the second picture type being a uni-direction prediction type;
the first priority level is indicative of a higher priority than the second priority level based on the first picture type being the intra-prediction picture type and the second picture type being a bi-direction prediction type; or
the first priority level is indicative of a higher priority than the second priority level based on the first picture type being the uni-direction prediction type and the second picture type being the bi-direction prediction type.
4 . The method of claim 1 , wherein the current picture is a first picture and the cached picture is a first cached picture, the method further comprising:
determining that a second cached picture stored in the dedicated chip memory is not going to be used for inter-prediction; and
determining to write a third picture in the dedicated chip memory based on the determination that the second cached picture is not going to be used for inter-prediction.
5 . The method of claim 4 , further comprising:
determining that the third picture is going to be used for inter-prediction,
wherein determining to write the third picture comprises determining to write the third picture in the dedicated chip memory based on the determination that the second cached picture is not going to be used for inter-prediction and the third picture is going to be used for inter-prediction.
6 . The method of claim 1 , further comprising:
reconstructing the current picture,
wherein writing the current picture comprises writing the current picture during the reconstructing of the current picture.
7 . The method of claim 6 , wherein writing the current picture comprises writing the current picture during the reconstructing of the current picture as part of a reconstruction loop for video encoding.
8 . A device for processing video data, the device comprising:
a dedicated chip memory; and
processing circuitry coupled to the dedicated chip memory and configured to:
determine that a current picture is of a first picture type of a plurality of picture types;
determine that a cached picture stored in the dedicated chip memory is of a second picture type of the plurality of picture types, wherein each picture type of the plurality of picture types is associated with a respective priority level of a plurality of priority levels, the respective priority level being indicative of a likelihood that a picture type, among the plurality of picture types, associated with the respective priority level is to be used as a reference picture;
compare a first priority level associated with the first picture type to a second priority level associated with the second picture type to determine a comparison;
determine, based on the comparison of the first priority level to the second priority level, whether to write the current picture in the dedicated chip memory or to write the current picture in a non-dedicated system memory; and
write the current picture in the dedicated chip memory or the non-dedicated system memory based on the determination of whether to write the current picture in the dedicated chip memory or to write the current picture in the non-dedicated system memory.
9 . The device of claim 8 , wherein the first picture type or the second picture type comprises one of an intra-prediction picture type, a uni-direction prediction type, and a bi-prediction type.
10 . The device of claim 8 , wherein one of:
the first priority level is indicative of a higher priority than the second priority level based on the first picture type being an intra-prediction picture type and the second picture type being a uni-direction prediction type;
the first priority level is indicative of a higher priority than the second priority level based on the first picture type being the intra-prediction picture type and the second picture type being a bi-direction prediction type; or
the first priority level is indicative of a higher priority than the second priority level based on the first picture type being the uni-direction prediction type and the second picture type being the bi-direction prediction type.
11 . The device of claim 8 , wherein the current picture is a first picture and the cached picture is a first cached picture, and wherein the processing circuitry is configured to:
determine that a second cached picture stored in the dedicated chip memory is not going to be used for inter-prediction; and
determine to write a third picture in the dedicated chip memory based on the determination that the second cached picture is not going to be used for inter-prediction.
12 . The device of claim 11 , wherein the processing circuitry is configured to:
determine that the third picture is going to be used for inter-prediction,
wherein to determine to write the third picture, the processing circuitry is configured to determine to write the third picture in the dedicated chip memory based on the determination that the second cached picture is not going to be used for inter-prediction and the third picture is going to be used for inter-prediction.
13 . The device of claim 8 , wherein the processing circuitry is configured to:
reconstruct the current picture,
wherein to write the current picture, the processing circuitry is configured to write the current picture during the reconstructing of the current picture.
14 . The device of claim 13 , wherein to write the current picture, the processing circuitry is configured to write the current picture during the reconstructing of the current picture as part of a reconstruction loop for video encoding.
15 . One or more non-transitory computer-readable storage media storing instructions thereon that when executed cause one or more processors to:
determine that a current picture is of a first picture type of a plurality of picture types;
determine that a cached picture stored in a dedicated chip memory is of a second picture type of the plurality of picture types, wherein each picture type of the plurality of picture types is associated with a respective priority level of a plurality of priority levels, the respective priority level being indicative of a likelihood that a picture type, among the plurality of picture types, associated with the respective priority level is to be used as a reference picture;
compare a first priority level associated with the first picture type to a second priority level associated with the second picture type to determine a comparison;
determine, based on the comparison of the first priority level to the second priority level, whether to write the current picture in the dedicated chip memory or to write the current picture in a non-dedicated system memory; and
write the current picture in the dedicated chip memory or the non-dedicated system memory based on the determination of whether to write the current picture in the dedicated chip memory or to write the current picture in the non-dedicated system memory.
16 . The one or more non-transitory computer-readable storage media of claim 15 , wherein the first picture type or the second picture type comprises one of an intra-prediction picture type, a uni-direction prediction type, and a bi-prediction type.
17 . The one or more non-transitory computer-readable storage media of claim 15 , wherein one of:
the first priority level is indicative of a higher priority than the second priority level based on the first picture type being an intra-prediction picture type and the second picture type being a uni-direction prediction type;
the first priority level is indicative of a higher priority than the second priority level based on the first picture type being the intra-prediction picture type and the second picture type being a bi-direction prediction type; or
the first priority level is indicative of a higher priority than the second priority level based on the first picture type being the uni-direction prediction type and the second picture type being the bi-direction prediction type.
18 . A device for processing video data, the device comprising:
means for determining that a current picture is of a first picture type of a plurality of picture types;
means for determining that a cached picture stored in a dedicated chip memory is of a second picture type of the plurality of picture types, wherein each picture type of the plurality of picture types is associated with a respective priority level of a plurality of priority levels, the respective priority level being indicative of a likelihood that a picture type, among the plurality of picture types, associated with the respective priority level is to be used as a reference picture;
means for comparing a first priority level associated with the first picture type to a second priority level associated with the second picture type to determine a comparison;
means for determining, based on the comparison of the first priority level to the second priority level, whether to write the current picture in the dedicated chip memory or to write the current picture a non-dedicated system memory; and
means for writing the current picture in the dedicated chip memory or the non-dedicated system memory based on the determining of whether to write the current picture in the dedicated chip memory or to write the current picture in the non-dedicated system memory.