Skip to content
Snippets Groups Projects
Commit 235b1660 authored by Peter Chuang's avatar Peter Chuang
Browse files

JVET-Q0179: Scaling window size constraint for constraining worst case memory bandwidth

parent 8dd20977
No related branches found
No related tags found
1 merge request!1312JVET-Q0179: Scaling window size constraint for constraining worst case memory bandwidth
......@@ -50,6 +50,8 @@
#include <assert.h>
#include <cassert>
#define JVET_Q0179_SCALING_WINDOW_SIZE_CONSTRAINT 1 // JVET-Q0179: Scaling window size constraint for constraining worst case memory bandwidth
#define JVET_Q0504_PLT_NON444 1 // JVET-Q0504: enable palette mode for non 444 color format
#define JVET_Q0089_SLICE_LOSSLESS_CODING_CHROMA_BDPCM 1 // JVET-Q0089: RRC slice-level switch for lossless coding and one SPS flag for luma and chroma BDPCM.
......
......@@ -123,6 +123,17 @@ bool CU::getRprScaling( const SPS* sps, const PPS* curPPS, Picture* refPic, int&
xScale = ( ( refPicWidth << SCALE_RATIO_BITS ) + ( curPicWidth >> 1 ) ) / curPicWidth;
yScale = ( ( refPicHeight << SCALE_RATIO_BITS ) + ( curPicHeight >> 1 ) ) / curPicHeight;
#if JVET_Q0179_SCALING_WINDOW_SIZE_CONSTRAINT
int curSeqMaxPicWidthY = sps->getMaxPicWidthInLumaSamples(); // pic_width_max_in_luma_samples
int curSeqMaxPicHeightY = sps->getMaxPicHeightInLumaSamples(); // pic_height_max_in_luma_samples
int curPicWidthY = curPPS->getPicWidthInLumaSamples(); // pic_width_in_luma_samples
int curPicHeightY = curPPS->getPicHeightInLumaSamples(); // pic_height_in_luma_samples
int max8MinCbSizeY = std::max((int)8, (1<<sps->getLog2MinCodingBlockSize())); // Max(8, MinCbSizeY)
CHECK((curPicWidth * curSeqMaxPicWidthY) < refPicWidth * (curPicWidthY - max8MinCbSizeY), "(curPicWidth * curSeqMaxPicWidthY) should be greater than or equal to refPicWidth * (curPicWidthY - max8MinCbSizeY))");
CHECK((curPicHeight * curSeqMaxPicHeightY) < refPicHeight * (curPicHeightY - max8MinCbSizeY), "(curPicHeight * curSeqMaxPicHeightY) should be greater than or equal to refPicHeight * (curPicHeightY - max8MinCbSizeY))");
#endif
#if JVET_Q0487_SCALING_WINDOW_ISSUES
return refPic->isRefScaled( curPPS );
#else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment