diff options
author | Bradley Sepos <[email protected]> | 2019-11-05 18:26:53 -0500 |
---|---|---|
committer | Bradley Sepos <[email protected]> | 2019-11-09 11:41:44 -0500 |
commit | b9bb051bba17ea0c9497bc489bdf65a79c0be695 (patch) | |
tree | fe566a160e52367b32758f933d6056627ad0846f /contrib/x265_8bit | |
parent | fdb82e94afb69e0db862800de474e493503ab21e (diff) |
contrib: Update to x265 3.2.1.
Diffstat (limited to 'contrib/x265_8bit')
-rw-r--r-- | contrib/x265_8bit/A00-fix-aq-slowdown.patch | 73 | ||||
-rw-r--r-- | contrib/x265_8bit/A01-fix-zones-crash.patch | 30 | ||||
-rw-r--r-- | contrib/x265_8bit/module.defs | 10 |
3 files changed, 5 insertions, 108 deletions
diff --git a/contrib/x265_8bit/A00-fix-aq-slowdown.patch b/contrib/x265_8bit/A00-fix-aq-slowdown.patch deleted file mode 100644 index b0321f303..000000000 --- a/contrib/x265_8bit/A00-fix-aq-slowdown.patch +++ /dev/null @@ -1,73 +0,0 @@ -# HG changeset patch -# User [email protected] -# Date 1568357212 -19800 -# Branch Release_3.2 -# Node ID cdd80b53c90d224fd9281ad13de3ca9a1b6e1d39 -# Parent 329345aea40f95dc94aedf3c7cdb098bbb6d34f1 -Fix: AQ mode 4 commit (21db162) introduces slowdown even is not used AQ mode 4. - -diff --git a/source/encoder/slicetype.cpp b/source/encoder/slicetype.cpp ---- a/source/encoder/slicetype.cpp -+++ b/source/encoder/slicetype.cpp -@@ -480,17 +480,24 @@ - { - #define AQ_EDGE_BIAS 0.5 - #define EDGE_INCLINATION 45 -- uint32_t numCuInHeight = (maxRow + param->maxCUSize - 1) / param->maxCUSize; -- int maxHeight = numCuInHeight * param->maxCUSize; -- intptr_t stride = curFrame->m_fencPic->m_stride; -- pixel *edgePic = X265_MALLOC(pixel, stride * (maxHeight + (curFrame->m_fencPic->m_lumaMarginY * 2))); -- pixel *gaussianPic = X265_MALLOC(pixel, stride * (maxHeight + (curFrame->m_fencPic->m_lumaMarginY * 2))); -- pixel *thetaPic = X265_MALLOC(pixel, stride * (maxHeight + (curFrame->m_fencPic->m_lumaMarginY * 2))); -- memset(edgePic, 0, stride * (maxHeight + (curFrame->m_fencPic->m_lumaMarginY * 2)) * sizeof(pixel)); -- memset(gaussianPic, 0, stride * (maxHeight + (curFrame->m_fencPic->m_lumaMarginY * 2)) * sizeof(pixel)); -- memset(thetaPic, 0, stride * (maxHeight + (curFrame->m_fencPic->m_lumaMarginY * 2)) * sizeof(pixel)); -+ -+ pixel *edgePic = NULL; -+ pixel *gaussianPic = NULL; -+ pixel *thetaPic = NULL; -+ - if (param->rc.aqMode == X265_AQ_EDGE) -+ { -+ uint32_t numCuInHeight = (maxRow + param->maxCUSize - 1) / param->maxCUSize; -+ int maxHeight = numCuInHeight * param->maxCUSize; -+ intptr_t stride = curFrame->m_fencPic->m_stride; -+ edgePic = X265_MALLOC(pixel, stride * (maxHeight + (curFrame->m_fencPic->m_lumaMarginY * 2))); -+ gaussianPic = X265_MALLOC(pixel, stride * (maxHeight + (curFrame->m_fencPic->m_lumaMarginY * 2))); -+ thetaPic = X265_MALLOC(pixel, stride * (maxHeight + (curFrame->m_fencPic->m_lumaMarginY * 2))); -+ memset(edgePic, 0, stride * (maxHeight + (curFrame->m_fencPic->m_lumaMarginY * 2)) * sizeof(pixel)); -+ memset(gaussianPic, 0, stride * (maxHeight + (curFrame->m_fencPic->m_lumaMarginY * 2)) * sizeof(pixel)); -+ memset(thetaPic, 0, stride * (maxHeight + (curFrame->m_fencPic->m_lumaMarginY * 2)) * sizeof(pixel)); - edgeFilter(curFrame, edgePic, gaussianPic, thetaPic, stride, maxRow, maxCol); -+ } - - int blockXY = 0, inclinedEdge = 0; - double avg_adj_pow2 = 0, avg_adj = 0, qp_adj = 0; -@@ -507,8 +514,8 @@ - energy = acEnergyCu(curFrame, blockX, blockY, param->internalCsp, param->rc.qgSize); - if (param->rc.aqMode == X265_AQ_EDGE) - { -- pixel *edgeImage = edgePic + curFrame->m_fencPic->m_lumaMarginY * stride + curFrame->m_fencPic->m_lumaMarginX; -- pixel *edgeTheta = thetaPic + curFrame->m_fencPic->m_lumaMarginY * stride + curFrame->m_fencPic->m_lumaMarginX; -+ pixel *edgeImage = edgePic + curFrame->m_fencPic->m_lumaMarginY * curFrame->m_fencPic->m_stride + curFrame->m_fencPic->m_lumaMarginX; -+ pixel *edgeTheta = thetaPic + curFrame->m_fencPic->m_lumaMarginY * curFrame->m_fencPic->m_stride + curFrame->m_fencPic->m_lumaMarginX; - edgeDensity = edgeDensityCu(curFrame, edgeImage, edgeTheta, avgAngle, blockX, blockY, param->rc.qgSize); - if (edgeDensity) - { -@@ -542,9 +549,13 @@ - else - strength = param->rc.aqStrength * 1.0397f; - -- X265_FREE(edgePic); -- X265_FREE(gaussianPic); -- X265_FREE(thetaPic); -+ if (param->rc.aqMode == X265_AQ_EDGE) -+ { -+ X265_FREE(edgePic); -+ X265_FREE(gaussianPic); -+ X265_FREE(thetaPic); -+ } -+ - blockXY = 0; - for (int blockY = 0; blockY < maxRow; blockY += loopIncr) - { diff --git a/contrib/x265_8bit/A01-fix-zones-crash.patch b/contrib/x265_8bit/A01-fix-zones-crash.patch deleted file mode 100644 index 55b98d9fa..000000000 --- a/contrib/x265_8bit/A01-fix-zones-crash.patch +++ /dev/null @@ -1,30 +0,0 @@ -# HG changeset patch -# User Pooja Venkatesan <[email protected]> -# Date 1571043796 -19800 -# Branch Release_3.2 -# Node ID a3a088a7262fcc02560bc8b71d0a3cf5b9c69fe3 -# Parent 0f89afaddc5cd36cc1d1677060ef81dedd0f50e0 -Fix encoder crash with zones and add test for zones - -diff --git a/source/encoder/api.cpp b/source/encoder/api.cpp ---- a/source/encoder/api.cpp -+++ b/source/encoder/api.cpp -@@ -108,6 +108,7 @@ - int zoneCount = p->rc.zonefileCount ? p->rc.zonefileCount : p->rc.zoneCount; - param->rc.zones = x265_zone_alloc(zoneCount, !!p->rc.zonefileCount); - latestParam->rc.zones = x265_zone_alloc(zoneCount, !!p->rc.zonefileCount); -+ zoneParam->rc.zones = x265_zone_alloc(zoneCount, !!p->rc.zonefileCount); - } - - x265_copy_params(param, p); -diff --git a/source/test/regression-tests.txt b/source/test/regression-tests.txt ---- a/source/test/regression-tests.txt -+++ b/source/test/regression-tests.txt -@@ -156,6 +156,7 @@ - 720p50_parkrun_ter.y4m,--preset medium --bitrate 400 --hme - ducks_take_off_420_720p50.y4m,--preset medium --aq-mode 4 --crf 22 --no-cutree - ducks_take_off_420_1_720p50.y4m,--preset medium --selective-sao 4 --sao --crf 20 -+Kimono1_1920x1080_24_400.yuv,--preset superfast --qp 28 --zones 0,139,q=32 - - # Main12 intraCost overflow bug test - 720p50_parkrun_ter.y4m,--preset medium diff --git a/contrib/x265_8bit/module.defs b/contrib/x265_8bit/module.defs index a000d853e..743d54250 100644 --- a/contrib/x265_8bit/module.defs +++ b/contrib/x265_8bit/module.defs @@ -2,11 +2,11 @@ __deps__ := $(eval $(call import.MODULE.defs,X265_8,x265_8,$(__deps__),x265)) $(eval $(call import.CONTRIB.defs,X265_8)) -X265_8.FETCH.url = https://download.handbrake.fr/contrib/x265_3.2.tar.gz -X265_8.FETCH.url += https://bitbucket.org/multicoreware/x265/downloads/x265_3.2.tar.gz -X265_8.FETCH.url += https://download.videolan.org/pub/videolan/x265/x265_3.2.tar.gz -X265_8.FETCH.sha256 = 364d79bcd56116a9e070fdeb1d9d2aaef1a786b4970163fb56ff0991a183133b -X265_8.EXTRACT.tarbase = x265_3.2 +X265_8.FETCH.url = https://download.handbrake.fr/contrib/x265_3.2.1.tar.gz +X265_8.FETCH.url += https://bitbucket.org/multicoreware/x265/downloads/x265_3.2.1.tar.gz +X265_8.FETCH.url += https://download.videolan.org/pub/videolan/x265/x265_3.2.1.tar.gz +X265_8.FETCH.sha256 = fb9badcf92364fd3567f8b5aa0e5e952aeea7a39a2b864387cec31e3b58cbbcc +X265_8.EXTRACT.tarbase = x265_3.2.1 X265_8.build_dir = 8bit X265_8.CONFIGURE.exe = cmake |