在 2015-11-20 19:43:30,"Deepthi Nandakumar" <[email protected]> 写道: On Wed, Nov 18, 2015 at 10:44 PM, Min Chen <[email protected]> wrote: # HG changeset patch # User Min Chen <[email protected]> # Date 1447865926 21600 # Node ID 600706db4e14bd95a5d933418186f86403e897f4 # Parent e160de7083971f21802517691f9a3a0934765952 optimize SAO statistics initialize --- source/encoder/sao.cpp | 52 ++++++++++++++++++++++++----------------------- 1 files changed, 27 insertions(+), 25 deletions(-) diff -r e160de708397 -r 600706db4e14 source/encoder/sao.cpp --- a/source/encoder/sao.cpp Wed Nov 18 10:58:43 2015 -0600 +++ b/source/encoder/sao.cpp Wed Nov 18 10:58:46 2015 -0600 @@ -1156,32 +1156,34 @@ if (allowMerge[1]) m_entropyCoder.codeSaoMerge(0); m_entropyCoder.store(m_rdContexts.temp); + // reset stats Y, Cb, Cr - for (int plane = 0; plane < 3; plane++) + X265_CHECK(sizeof(PerPlane) == (sizeof(int32_t) * (NUM_PLANE * MAX_NUM_SAO_TYPE * MAX_NUM_SAO_CLASS)), "Found Padding space in struct PerPlane"); + + // TODO: Confirm the address space is continuous + memset(m_count, 0, 3 * sizeof(m_count[0])); Now that we're cleaning this up, m_count is confusing. PerClass is a 2D int array, and we're allocating one per plane? Can we clean this up once and for all in the malloc part itself? Pointer and *Pointer is clean, it means size of point to object the confuse on declare of PerClass, maybe we need modify it to more clean.
_______________________________________________ x265-devel mailing list [email protected] https://mailman.videolan.org/listinfo/x265-devel
