[x265] [PATCH] Fix build error with multilib

Mahesh Pittala mahesh at multicorewareinc.com
Fri Oct 28 06:03:24 UTC 2022


Pushed to master branch

On Wed, Oct 26, 2022 at 3:47 PM Snehaa Giridharan <
snehaa at multicorewareinc.com> wrote:

> From 712761e77261bf7003cd2929fa93c9027a36eea2 Mon Sep 17 00:00:00 2001
> From: Snehaa Giridharan <snehaa at multicorewareinc.com>
> Date: Wed, 26 Oct 2022 12:03:19 +0530
> Subject: [PATCH] Fix build error with multilib
>
> ---
>  source/common/temporalfilter.h | 245 ++++++++++++++++-----------------
>  1 file changed, 121 insertions(+), 124 deletions(-)
>
> diff --git a/source/common/temporalfilter.h
> b/source/common/temporalfilter.h
> index 10f0c52b4..723644633 100644
> --- a/source/common/temporalfilter.h
> +++ b/source/common/temporalfilter.h
> @@ -21,20 +21,16 @@
>  * For more information, contact us at license @ x265.com.
>
>  *****************************************************************************/
>
> -#ifndef X265_TEMPORAL_FILTER
> -#define X265_TEMPORAL_FILTER
> +#ifndef X265_TEMPORAL_FILTER_H
> +#define X265_TEMPORAL_FILTER_H
>
>  #include "x265.h"
>  #include "picyuv.h"
>  #include "mv.h"
> -#include <vector>
> -#include <deque>
>  #include "piclist.h"
>  #include "yuv.h"
>  #include "motion.h"
>
> -using namespace X265_NS;
> -
>  const int s_interpolationFilter[16][8] =
>  {
>      {   0,   0,   0,  64,   0,   0,   0,   0 },   //0
> @@ -63,126 +59,127 @@ const double s_refStrengths[3][4] =
>    {0.30, 0.30, 0.30, 0.30}   // otherwise
>  };
>
> -class OrigPicBuffer
> -{
> -public:
> -    PicList    m_mcstfPicList;
> -    PicList    m_mcstfOrigPicFreeList;
> -    PicList    m_mcstfOrigPicList;
> -
> -    ~OrigPicBuffer();
> -    void addPicture(Frame*);
> -    void addEncPicture(Frame*);
> -    void setOrigPicList(Frame*, int);
> -    void recycleOrigPicList();
> -    void addPictureToFreelist(Frame*);
> -    void addEncPictureToPicList(Frame*);
> -};
> -
> -struct MotionEstimatorTLD
> -{
> -    MotionEstimate  me;
> -
> -    MotionEstimatorTLD()
> +namespace X265_NS {
> +    class OrigPicBuffer
>      {
> -        me.init(X265_CSP_I400);
> -        me.setQP(X265_LOOKAHEAD_QP);
> -    }
> -
> -    ~MotionEstimatorTLD() {}
> -};
> -
> -struct TemporalFilterRefPicInfo
> -{
> -    PicYuv*    picBuffer;
> -    PicYuv*    picBufferSubSampled2;
> -    PicYuv*    picBufferSubSampled4;
> -    MV*        mvs;
> -    MV*        mvs0;
> -    MV*        mvs1;
> -    MV*        mvs2;
> -    uint32_t   mvsStride;
> -    uint32_t   mvsStride0;
> -    uint32_t   mvsStride1;
> -    uint32_t   mvsStride2;
> -    int*       error;
> -    int*       noise;
> -
> -    int16_t    origOffset;
> -    bool       isFilteredFrame;
> -    PicYuv*    compensatedPic;
> -
> -    int*       isSubsampled;
> -
> -    int        slicetype;
> -};
> +    public:
> +        PicList    m_mcstfPicList;
> +        PicList    m_mcstfOrigPicFreeList;
> +        PicList    m_mcstfOrigPicList;
> +
> +        ~OrigPicBuffer();
> +        void addPicture(Frame*);
> +        void addEncPicture(Frame*);
> +        void setOrigPicList(Frame*, int);
> +        void recycleOrigPicList();
> +        void addPictureToFreelist(Frame*);
> +        void addEncPictureToPicList(Frame*);
> +    };
> +
> +    struct MotionEstimatorTLD
> +    {
> +        MotionEstimate  me;
>
> -class TemporalFilter
> -{
> -public:
> -    TemporalFilter();
> -    ~TemporalFilter() {}
> -
> -    void init(const x265_param* param);
> -
> -//private:
> -    // Private static member variables
> -    const x265_param *m_param;
> -    int32_t  m_bitDepth;
> -    int m_range;
> -    uint8_t m_numRef;
> -    double m_chromaFactor;
> -    double m_sigmaMultiplier;
> -    double m_sigmaZeroPoint;
> -    int m_motionVectorFactor;
> -    int m_padding;
> -
> -    // Private member variables
> -
> -    int m_sourceWidth;
> -    int m_sourceHeight;
> -    int m_QP;
> -
> -    int m_internalCsp;
> -    int m_numComponents;
> -    uint8_t m_sliceTypeConfig;
> -
> -    MotionEstimatorTLD* m_metld;
> -    Yuv  predPUYuv;
> -    int m_useSADinME;
> -
> -    int createRefPicInfo(TemporalFilterRefPicInfo* refFrame, x265_param*
> param);
> -
> -    void bilateralFilter(Frame* frame, TemporalFilterRefPicInfo*
> mctfRefList, double overallStrength);
> -
> -    void motionEstimationLuma(MV *mvs, uint32_t mvStride, PicYuv *orig,
> PicYuv *buffer, int bs,
> -        MV *previous = 0, uint32_t prevmvStride = 0, int factor = 1);
> -
> -    void motionEstimationLumaDoubleRes(MV *mvs, uint32_t mvStride, PicYuv
> *orig, PicYuv *buffer, int blockSize,
> -        MV *previous, uint32_t prevMvStride, int factor, int* minError);
> -
> -    int motionErrorLumaSSD(PicYuv *orig,
> -        PicYuv *buffer,
> -        int x,
> -        int y,
> -        int dx,
> -        int dy,
> -        int bs,
> -        int besterror = 8 * 8 * 1024 * 1024);
> -
> -    int motionErrorLumaSAD(PicYuv *orig,
> -        PicYuv *buffer,
> -        int x,
> -        int y,
> -        int dx,
> -        int dy,
> -        int bs,
> -        int besterror = 8 * 8 * 1024 * 1024);
> -
> -    void destroyRefPicInfo(TemporalFilterRefPicInfo* curFrame);
> -
> -    void applyMotion(MV *mvs, uint32_t mvsStride, PicYuv *input, PicYuv
> *output);
> +        MotionEstimatorTLD()
> +        {
> +            me.init(X265_CSP_I400);
> +            me.setQP(X265_LOOKAHEAD_QP);
> +        }
>
> -};
> +        ~MotionEstimatorTLD() {}
> +    };
>
> +    struct TemporalFilterRefPicInfo
> +    {
> +        PicYuv*    picBuffer;
> +        PicYuv*    picBufferSubSampled2;
> +        PicYuv*    picBufferSubSampled4;
> +        MV*        mvs;
> +        MV*        mvs0;
> +        MV*        mvs1;
> +        MV*        mvs2;
> +        uint32_t   mvsStride;
> +        uint32_t   mvsStride0;
> +        uint32_t   mvsStride1;
> +        uint32_t   mvsStride2;
> +        int*       error;
> +        int*       noise;
> +
> +        int16_t    origOffset;
> +        bool       isFilteredFrame;
> +        PicYuv*    compensatedPic;
> +
> +        int*       isSubsampled;
> +
> +        int        slicetype;
> +    };
> +
> +    class TemporalFilter
> +    {
> +    public:
> +        TemporalFilter();
> +        ~TemporalFilter() {}
> +
> +        void init(const x265_param* param);
> +
> +        //private:
> +            // Private static member variables
> +        const x265_param *m_param;
> +        int32_t  m_bitDepth;
> +        int m_range;
> +        uint8_t m_numRef;
> +        double m_chromaFactor;
> +        double m_sigmaMultiplier;
> +        double m_sigmaZeroPoint;
> +        int m_motionVectorFactor;
> +        int m_padding;
> +
> +        // Private member variables
> +
> +        int m_sourceWidth;
> +        int m_sourceHeight;
> +        int m_QP;
> +
> +        int m_internalCsp;
> +        int m_numComponents;
> +        uint8_t m_sliceTypeConfig;
> +
> +        MotionEstimatorTLD* m_metld;
> +        Yuv  predPUYuv;
> +        int m_useSADinME;
> +
> +        int createRefPicInfo(TemporalFilterRefPicInfo* refFrame,
> x265_param* param);
> +
> +        void bilateralFilter(Frame* frame, TemporalFilterRefPicInfo*
> mctfRefList, double overallStrength);
> +
> +        void motionEstimationLuma(MV *mvs, uint32_t mvStride, PicYuv
> *orig, PicYuv *buffer, int bs,
> +            MV *previous = 0, uint32_t prevmvStride = 0, int factor = 1);
> +
> +        void motionEstimationLumaDoubleRes(MV *mvs, uint32_t mvStride,
> PicYuv *orig, PicYuv *buffer, int blockSize,
> +            MV *previous, uint32_t prevMvStride, int factor, int*
> minError);
> +
> +        int motionErrorLumaSSD(PicYuv *orig,
> +            PicYuv *buffer,
> +            int x,
> +            int y,
> +            int dx,
> +            int dy,
> +            int bs,
> +            int besterror = 8 * 8 * 1024 * 1024);
> +
> +        int motionErrorLumaSAD(PicYuv *orig,
> +            PicYuv *buffer,
> +            int x,
> +            int y,
> +            int dx,
> +            int dy,
> +            int bs,
> +            int besterror = 8 * 8 * 1024 * 1024);
> +
> +        void destroyRefPicInfo(TemporalFilterRefPicInfo* curFrame);
> +
> +        void applyMotion(MV *mvs, uint32_t mvsStride, PicYuv *input,
> PicYuv *output);
> +
> +    };
> +}
>  #endif
> --
> 2.37.2.windows.2
>
> *Thanks and Regards,*
>
>
>
>
>
> *Snehaa.GVideo Codec Engineer,Media & AI analytics
> <https://multicorewareinc.com/>*
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20221028/9a142d0e/attachment.html>


More information about the x265-devel mailing list