[x265] [PATCH][MASTER] Support for Decoding-Energy-Rate-Distortion Optimization (DERDO)

Nomis101 Nomis101 at web.de
Sun Nov 1 12:07:16 CET 2020


Am 22.10.20 um 15:07 schrieb Christian Herglotz:
> 
> 
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
> 

I've tried to build x265 with this patches applied, but I've discovered some issues. It applied 
cleanly, but the patches does seem to have some trailing whitespaces.

It failed to build on macOS. I first had to modify /x86/pixel-util.h to make it build without errors.

diff --git a/source/common/x86/pixel-util.h b/source/common/x86/pixel-util.h
index ab5147ddb..c7dc772dd 100644
--- a/source/common/x86/pixel-util.h
+++ b/source/common/x86/pixel-util.h
@@ -30,7 +30,7 @@
      FUNCDEF_TU_S2(void, getResidual_aligned, cpu, const pixel* fenc, const pixel* pred, int16_t* 
residual, intptr_t stride); \
      FUNCDEF_TU_S2(void, transpose, cpu, pixel* dest, const pixel* src, intptr_t stride); \
      FUNCDEF_TU(int, count_nonzero, cpu, const int16_t* quantCoeff); \
-    uint32_t PFX(quant_ ## cpu(const int16_t* coef, const int32_t* quantCoeff, int32_t* deltaU, 
int16_t* qCoef, int qBits, int add, int numCoeff)); \
+    uint32_t PFX(quant_ ## cpu(const int16_t* coef, const int32_t* quantCoeff, int32_t* deltaU, 
int16_t* qCoef, int qBits, int add, int numCoeff, bool countLdVal, uint32_t& ldVal)); \
      uint32_t PFX(nquant_ ## cpu(const int16_t* coef, const int32_t* quantCoeff, int16_t* qCoef, 
int qBits, int add, int numCoeff)); \
      void PFX(dequant_normal_ ## cpu(const int16_t* quantCoef, int16_t* coef, int num, int scale, 
int shift)); \
      void PFX(dequant_scaling_## cpu(const int16_t* src, const int32_t* dequantCoef, int16_t* dst, 
int num, int mcqp_miper, int shift)); \



I assume the same thing is needed for aarch64 and arm.


Then, in 0001-DERDO-Introduce-derdo-flag-to-x265.h.patch it should be int or double, not bool.
And, the activation of derdo is not getting logged. In /common/param.cpp derdo should be included in 
the TOOLOPT part.

After all that it builds and works nicely for me.

Best,
Simon



More information about the x265-devel mailing list