History

[Processing] Relax downsample buffer size requirement

AFAICT, it is sufficient that the sample buffer has space for half the source width/height. With the current sample buffer size, this enables its use for resolutions up to 3840x2176.

Sindre Aamås committed 10 years ago

Commit 5a9c6db1 parent 68a59101 file · +1 −1Browse files

Showing the changes to codec/processing/src/downsample (1 of 1 file). Show all

Unified · Split

codec/processing/src/downsample/downsample.cpp+1−1
@@ -149,7 +149,7 @@ EResult CDownsampling::Process (int32_t iType, SPixMap* pSrcPixMap, SPixMap* pDs · 148 unmodified lines
149 if (iSrcWidthY <= iDstWidthY || iSrcHeightY <= iDstHeightY) {149 if (iSrcWidthY <= iDstWidthY || iSrcHeightY <= iDstHeightY) {
150 return RET_INVALIDPARAM;150 return RET_INVALIDPARAM;
151 }151 }
152 if (iSrcWidthY > MAX_SAMPLE_WIDTH || iSrcHeightY > MAX_SAMPLE_HEIGHT || m_bNoSampleBuffer) {152 if ((iSrcWidthY >> 1) > MAX_SAMPLE_WIDTH || (iSrcHeightY >> 1) > MAX_SAMPLE_HEIGHT || m_bNoSampleBuffer) {
153 if ((iSrcWidthY >> 1) == iDstWidthY && (iSrcHeightY >> 1) == iDstHeightY) {153 if ((iSrcWidthY >> 1) == iDstWidthY && (iSrcHeightY >> 1) == iDstHeightY) {
154 // use half average functions154 // use half average functions
155 DownsampleHalfAverage ((uint8_t*)pDstPixMap->pPixel[0], pDstPixMap->iStride[0],155 DownsampleHalfAverage ((uint8_t*)pDstPixMap->pPixel[0], pDstPixMap->iStride[0],

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t