Sample identification for intra block copy in video coding
A method of video processing includes maintaining, for a conversion between a current video block of a current picture of a visual media data and a bitstream representation of the visual media data, a buffer comprising reference samples from the current picture for a derivation of prediction samples of the current video block. One or more reference samples in the buffer that are marked unavailable for the derivation have values outside of a pixel value range.
1. A method of processing video data, comprising:
determining, for a conversion between a current video block of a current picture of a video and a bitstream of the video, that a prediction mode is applied on the current video block;
maintaining, for the current video block, a buffer comprising reference samples derived from blocks of sample values of a same video region of the current video block in the current picture;
generating, for the current video block, prediction samples based on the determining; and
performing the conversion between the current video block and the bitstream,
wherein in the prediction mode, the reference samples determined by a block vector in the buffer are used for a derivation of prediction samples of the current video block,
wherein a specific reference block in the buffer that is marked unavailable for the derivation have values outside of a pixel value range, and
wherein values of reference samples in the specific reference block marked unavailable are set to a predetermined value of −1 that is indicative of unavailability of the samples.
2. The method of claim 1 , wherein a location and a size of the specific reference block marked unavailable are determined based on one or more of: a size of the current video block, a size of a virtual unit, or a size of a coding tree block including the current video block.
3. The method of claim 2 , wherein the location of the specific reference block marked unavailable is determined based on (x0, y0),
where (x0% Vsize) is equal to 0 and (y0% Vsize) is equal to 0,
where % denotes a remainder operation,
where Vsize denotes the size of the virtual unit and Vsize=min(ctbSize, 64), and
where ctbSize denotes a width or a height of the coding tree block.
4. The method of claim 2 , wherein the size of the specific reference block marked unavailable is determined based on the size of the virtual unit if the size of the current video block is smaller than the size of the virtual unit.
5. The method of claim 2 , wherein the size of the specific reference block marked unavailable is determined based on the size of the current video block if the size of the current video block is larger than the size of the virtual unit.
6. The method of claim 1 , wherein the buffer is reset before coding a picture or a slice.
7. The method of claim 1 , wherein a bitstream conformance constraint satisfied by the bitstream comprises that the reference samples determined by the block vector in the buffer do not have values equal to a predetermined value indicative of unavailability of the samples.
8. The method of claim 1 , wherein the pixel value range is expressed as [0, 1<<(bit_depth) −1], where bit_depth is a positive integer.
9. The method of claim 8 , wherein bit_depth is a precision used for processing the sample.
10. The method of claim 1 , wherein the conversion includes encoding the current video block into the bitstream.
11. The method of claim 1 , wherein the conversion includes decoding the current video block from the bitstream.
12. An apparatus for processing video data comprising a processor and a non-transitory memory with instructions thereon, wherein the instructions upon execution by the processor, cause the processor to:
determine, for a conversion between a current video block of a current picture of a video and a bitstream of the video, that a prediction mode is applied on the current video block;
maintain, for the current video block, a buffer comprising reference samples derived from blocks of sample values of a same video region of the current video block in the current picture;
generate, for the current video block, prediction samples based on the determining; and
perform the conversion between the current video block and the bitstream,
wherein in the prediction mode, the reference samples determined by a block vector in the buffer are used for a derivation of prediction samples of the current video block,
wherein a specific reference block in the buffer that is marked unavailable for the derivation have values outside of a pixel value range, and
wherein values of reference samples in the specific reference block marked unavailable are set to a predetermined value of −1 that is indicative of unavailability of the samples.
13. The apparatus of claim 12 , wherein a location and a size of the specific reference block marked unavailable are determined based on one or more of: a size of the current video block, a size of a virtual unit, or a size of a coding tree block including the current video block.
14. The apparatus of claim 13 , wherein the location of the specific reference block marked unavailable is determined based on (x0, y0),
where (x0% Vsize) is equal to 0 and (y0% Vsize) is equal to 0,
where % denotes a remainder operation,
where Vsize denotes the size of the virtual unit and Vsize=min(ctbSize, 64), and
where ctbSize denotes a width or a height of the coding tree block.
15. The apparatus of claim 13 , wherein the size of the specific reference block marked unavailable is determined based on the size of the virtual unit if the size of the current video block is smaller than the size of the virtual unit.
16. The apparatus of claim 13 , wherein the size of the specific reference block marked unavailable is determined based on the size of the current video block if the size of the current video block is larger than the size of the virtual unit.
17. The apparatus of claim 12 , wherein the buffer is reset before coding a picture or a slice.
18. The apparatus of claim 12 , wherein a bitstream conformance constraint satisfied by the bitstream comprises that the reference samples determined by the block vector in the buffer do not have values equal to a predetermined value indicative of unavailability of the samples.
19. A non-transitory computer-readable storage medium storing instructions that cause a processor to:
determine, for a conversion between a current video block of a current picture of a video and a bitstream of the video, that a prediction mode is applied on the current video block;
maintain, for the current video block, a buffer comprising reference samples derived from blocks of sample values of a same video region of the current video block in the current picture;
generate, for the current video block, prediction samples based on the determining; and
perform the conversion between the current video block and the bitstream,
wherein in the prediction mode, the reference samples determined by a block vector in the buffer are used for a derivation of prediction samples of the current video block,
wherein a specific reference block in the buffer that is marked unavailable for the derivation have values outside of a pixel value range, and
wherein values of reference samples in the specific reference block marked unavailable are set to a predetermined value of −1 that is indicative of unavailability of the samples.
20. A method of storing a bitstream of a video, comprising:
determining, that a prediction mode is applied on a current video block of a current picture of the video;
maintaining, for the current video block, a buffer comprising reference samples derived from blocks of sample values of a same video region of the current video block in the current picture;
generating, for the current video block, prediction samples based on the determining; and
generating the bitstream based on the prediction samples,
wherein in the prediction mode, the reference samples determined by a block vector in the buffer are used for a derivation of prediction samples of the current video block,
wherein a specific reference block in the buffer that is marked unavailable for the derivation have values outside of a pixel value range, and
wherein values of reference samples in the specific reference block marked unavailable are set to a predetermined value of −1 that is indicative of unavailability of the samples.