From 22bb3774e1ea29426e603292e0920100180d11eb Mon Sep 17 00:00:00 2001 From: yang_hongliang Date: Thu, 24 Feb 2022 17:02:29 +0800 Subject: [PATCH] code format Signed-off-by: yang_hongliang --- hardware/display/include/display_common.h | 2 +- .../display/src/display_device/hdi_layer.cpp | 10 +++---- .../display/src/display_gfx/display_gfx.c | 16 +++++------ .../src/display_gralloc/display_gralloc_gbm.c | 4 +-- hardware/gpu/include/gbm.h | 6 ++-- hardware/mpp/include/mpi_enc_utils.h | 2 +- hardware/mpp/include/mpp_list.h | 5 ++-- hardware/mpp/include/mpp_log.h | 16 +++++------ hardware/mpp/include/mpp_thread.h | 12 ++++---- hardware/mpp/include/rk_venc_cmd.h | 3 +- hardware/mpp/include/vpu_api.h | 9 ++---- hardware/mpp/src/mpi_enc_utils.c | 2 +- hardware/rga/include/GrallocOps.h | 2 +- hardware/rga/include/RgaApi.h | 4 +-- hardware/rga/include/RgaSingleton.h | 15 +++++----- hardware/rga/include/RockchipRga.h | 17 ++++++----- hardware/rga/include/drmrga.h | 4 +-- hardware/rga/include/im2d.h | 3 +- hardware/rga/include/platform_gralloc4.h | 7 ++--- hardware/rga/include/rga.h | 28 +++++++++---------- .../src/pipeline_core/node/rk_codec_node.cpp | 3 +- 21 files changed, 83 insertions(+), 87 deletions(-) diff --git a/hardware/display/include/display_common.h b/hardware/display/include/display_common.h index 22f6271..ae6fefa 100644 --- a/hardware/display/include/display_common.h +++ b/hardware/display/include/display_common.h @@ -117,4 +117,4 @@ extern "C" { } #endif -#endif /* DISP_COMMON_H */ \ No newline at end of file +#endif /* DISP_COMMON_H */ diff --git a/hardware/display/src/display_device/hdi_layer.cpp b/hardware/display/src/display_device/hdi_layer.cpp index 51f4c95..20808a9 100644 --- a/hardware/display/src/display_device/hdi_layer.cpp +++ b/hardware/display/src/display_device/hdi_layer.cpp @@ -15,7 +15,7 @@ #include "hdi_layer.h" #include -#include +#include namespace OHOS { namespace HDI { @@ -89,8 +89,8 @@ int32_t HdiLayer::Init() int32_t HdiLayer::SetLayerSize(IRect *rect) { DISPLAY_CHK_RETURN((rect == nullptr), DISPLAY_NULL_PTR, DISPLAY_LOGE("in rect is nullptr")); - DISPLAY_DEBUGLOG(" displayRect x: %{public}d y : %{public}d w : %{public}d h : %{public}d", rect->x, rect->y, rect->w, - rect->h); + DISPLAY_DEBUGLOG(" displayRect x: %{public}d y : %{public}d w : %{public}d h : %{public}d", rect->x, rect->y, + rect->w, rect->h); mDisplayRect = *rect; return DISPLAY_SUCCESS; } @@ -98,8 +98,8 @@ int32_t HdiLayer::SetLayerSize(IRect *rect) int32_t HdiLayer::SetLayerCrop(IRect *rect) { DISPLAY_CHK_RETURN((rect == nullptr), DISPLAY_NULL_PTR, DISPLAY_LOGE("in rect is nullptr")); - DISPLAY_DEBUGLOG("id : %{public}d crop x: %{public}d y : %{public}d w : %{public}d h : %{public}d", mId, rect->x, - rect->y, rect->w, rect->h); + DISPLAY_DEBUGLOG("id : %{public}d crop x: %{public}d y : %{public}d w : %{public}d h : %{public}d", mId, + rect->x, rect->y, rect->w, rect->h); mCrop = *rect; return DISPLAY_SUCCESS; } diff --git a/hardware/display/src/display_gfx/display_gfx.c b/hardware/display/src/display_gfx/display_gfx.c index a821aad..346ca63 100644 --- a/hardware/display/src/display_gfx/display_gfx.c +++ b/hardware/display/src/display_gfx/display_gfx.c @@ -38,7 +38,7 @@ int32_t rkDeinitGfx() RgaSURF_FORMAT colorSpaceModeChange(PixelFormat color, uint8_t *isYuv) { RgaSURF_FORMAT rkFormat; - switch(color) { + switch (color) { case PIXEL_FMT_RGB_565: /**< RGB565 format */ rkFormat = RK_FORMAT_RGB_565; *isYuv = 0; @@ -178,7 +178,7 @@ int32_t rkFillRect(ISurface *iSurface, IRect *rect, uint32_t color, GfxOpt *opt) DISPLAY_LOGE("source iSurface address error"); return DISPLAY_PARAM_ERR; } - DISPLAY_LOGE("gfx vir %{public}p phy 0x%{public}x fd %{public}d",dst.vir_addr, (int32_t)dst.phy_addr, dst.fd); + DISPLAY_LOGE("gfx vir %{public}p phy 0x%{public}x fd %{public}d", dst.vir_addr, (int32_t)dst.phy_addr, dst.fd); dst.width = iSurface->width; dst.height = iSurface->height; dst.wstride = ALIGN_UP(iSurface->width, 16); @@ -189,7 +189,6 @@ int32_t rkFillRect(ISurface *iSurface, IRect *rect, uint32_t color, GfxOpt *opt) if (opt->enGlobalAlpha) dst.global_alpha = opt->globalAlpha; ret = imfill(dst, imRect, color); - if (ret != IM_STATUS_SUCCESS) return DISPLAY_FAILURE; else @@ -199,7 +198,7 @@ int32_t rkFillRect(ISurface *iSurface, IRect *rect, uint32_t color, GfxOpt *opt) int32_t blendTypeChange(BlendType blendType) { int32_t rkBlendType; - switch(blendType) { + switch (blendType) { case BLEND_SRC: /**< SRC blending */ rkBlendType = IM_ALPHA_BLEND_SRC; break; @@ -228,7 +227,7 @@ int32_t blendTypeChange(BlendType blendType) // BLEND_AKS: /**< AKS blending */ // BLEND_AKD: /**< AKD blending */ // BLEND_BUTT: /**< Null operation */ - rkBlendType = IM_STATUS_NOT_SUPPORTED; + rkBlendType = IM_STATUS_NOT_SUPPORTED; break; } return rkBlendType; @@ -237,7 +236,7 @@ int32_t blendTypeChange(BlendType blendType) int32_t TransformTypeChange(TransformType type) { int32_t rkRotateType; - switch(type) { + switch (type) { case ROTATE_90: /**< Rotation by 90 degrees */ rkRotateType = IM_HAL_TRANSFORM_ROT_90; break; @@ -257,7 +256,7 @@ int32_t TransformTypeChange(TransformType type) int32_t mirrorTypeChange(MirrorType type) { int32_t rkMirrorType; - switch(type) { + switch (type) { case MIRROR_LR: /**< Left and right mirrors */ rkMirrorType = IM_HAL_TRANSFORM_FLIP_H; break; @@ -493,6 +492,7 @@ int32_t GfxInitialize(GfxFuncs **funcs) errno_t eok = memset_s((void *)gfxFuncs, sizeof(GfxFuncs), 0, sizeof(GfxFuncs)); if (eok != EOK) { DISPLAY_LOGE("memset_s failed"); + free(gfxFuncs); return false; } gfxFuncs->InitGfx = rkInitGfx; @@ -511,4 +511,4 @@ int32_t GfxUninitialize(GfxFuncs *funcs) free(funcs); DISPLAY_LOGI("%s: gfx uninitialize success", __func__); return DISPLAY_SUCCESS; -} \ No newline at end of file +} diff --git a/hardware/display/src/display_gralloc/display_gralloc_gbm.c b/hardware/display/src/display_gralloc/display_gralloc_gbm.c index d1eda98..2dad8c1 100644 --- a/hardware/display/src/display_gralloc/display_gralloc_gbm.c +++ b/hardware/display/src/display_gralloc/display_gralloc_gbm.c @@ -21,11 +21,11 @@ #include #include #include -#include #include #include #include #include +#include #include "wayland_drm_auth_client.h" #include "drm_fourcc.h" #include "hisilicon_drm.h" @@ -48,7 +48,7 @@ typedef struct { const char *str; } ValueStrMap; -static GrallocManager *GetGrallocManager() +static GrallocManager *GetGrallocManager(void) { if (g_grallocManager == NULL) { g_grallocManager = (GrallocManager *)malloc(sizeof(GrallocManager)); diff --git a/hardware/gpu/include/gbm.h b/hardware/gpu/include/gbm.h index 3380dde..1e8bc46 100644 --- a/hardware/gpu/include/gbm.h +++ b/hardware/gpu/include/gbm.h @@ -60,7 +60,7 @@ union gbm_bo_handle { /** Format of the allocated buffer */ enum gbm_bo_format { /** RGB with 8 bits per channel in a 32 bit value */ - GBM_BO_FORMAT_XRGB8888, + GBM_BO_FORMAT_XRGB8888, /** ARGB with 8 bits per channel in a 32 bit value */ GBM_BO_FORMAT_ARGB8888 }; @@ -71,7 +71,7 @@ enum gbm_bo_format { * re-namespaced. New GBM formats must not be added, unless they are * identical ports from drm_fourcc. */ -#define __gbm_fourcc_code(a,b,c,d) ((uint32_t)(a) | ((uint32_t)(b) << 8) | \ +#define __gbm_fourcc_code(a, b, c, d) ((uint32_t)(a) | ((uint32_t)(b) << 8) | \ ((uint32_t)(c) << 16) | ((uint32_t)(d) << 24)) #define GBM_FORMAT_BIG_ENDIAN (1<<31) /* format is big endian instead of little endian */ @@ -352,4 +352,4 @@ void gbm_iSurface_destroy(struct gbm_iSurface *iSurface); } #endif -#endif \ No newline at end of file +#endif diff --git a/hardware/mpp/include/mpi_enc_utils.h b/hardware/mpp/include/mpi_enc_utils.h index 9c93663..7510250 100644 --- a/hardware/mpp/include/mpi_enc_utils.h +++ b/hardware/mpp/include/mpi_enc_utils.h @@ -38,7 +38,7 @@ typedef struct { // base flow context MppCtx ctx; MppApi *mpi; - MppEncCfg cfg; + MppEncCfg cfg; // input / output MppBufferGroup buf_grp; diff --git a/hardware/mpp/include/mpp_list.h b/hardware/mpp/include/mpp_list.h index f01315e..db24eef 100644 --- a/hardware/mpp/include/mpp_list.h +++ b/hardware/mpp/include/mpp_list.h @@ -31,8 +31,7 @@ typedef void *(*node_destructor)(void *); struct mpp_list_node; -class mpp_list : public MppMutexCond -{ +class mpp_list : public MppMutexCond { public: mpp_list(node_destructor func = NULL); ~mpp_list(); @@ -191,4 +190,4 @@ static __inline int list_empty(struct list_head *head) #endif -#endif /* __MPP_LIST_H__ */ \ No newline at end of file +#endif /* __MPP_LIST_H__ */ diff --git a/hardware/mpp/include/mpp_log.h b/hardware/mpp/include/mpp_log.h index 5b15d8f..f868f8e 100644 --- a/hardware/mpp/include/mpp_log.h +++ b/hardware/mpp/include/mpp_log.h @@ -32,10 +32,10 @@ #define mpp_err(fmt, ...) _mpp_err(MODULE_TAG, fmt, NULL, ## __VA_ARGS__) #define _mpp_dbg(debug, flag, fmt, ...) \ - do { \ - if (debug & flag) \ - mpp_log(fmt, ## __VA_ARGS__); \ - } while (0) + do { \ + if (debug & flag) \ + mpp_log(fmt, ## __VA_ARGS__); \ + } while (0) #define mpp_dbg(flag, fmt, ...) _mpp_dbg(mpp_debug, flag, fmt, ## __VA_ARGS__) @@ -45,10 +45,10 @@ #define mpp_log_f(fmt, ...) _mpp_log(MODULE_TAG, fmt, __FUNCTION__, ## __VA_ARGS__) #define mpp_err_f(fmt, ...) _mpp_err(MODULE_TAG, fmt, __FUNCTION__, ## __VA_ARGS__) #define _mpp_dbg_f(debug, flag, fmt, ...) \ - do { \ - if (debug & flag) \ - mpp_log_f(fmt, ## __VA_ARGS__); \ - } while (0) + do { \ + if (debug & flag) \ + mpp_log_f(fmt, ## __VA_ARGS__); \ + } while (0) #define mpp_dbg_f(flag, fmt, ...) _mpp_dbg_f(mpp_debug, flag, fmt, ## __VA_ARGS__) diff --git a/hardware/mpp/include/mpp_thread.h b/hardware/mpp/include/mpp_thread.h index e612d27..a4df83c 100644 --- a/hardware/mpp/include/mpp_thread.h +++ b/hardware/mpp/include/mpp_thread.h @@ -77,12 +77,12 @@ public: class Autolock { public: inline Autolock(Mutex* mutex, RK_U32 enable = 1) : - mEnabled(enable), - mLock(*mutex) - { - if (mEnabled) + mEnabled(enable), + mLock(*mutex) + { + if (mEnabled) mLock.lock(); - } + } inline ~Autolock() { if (mEnabled) @@ -312,4 +312,4 @@ private: #endif -#endif /* __MPP_THREAD_H__ */ \ No newline at end of file +#endif /* __MPP_THREAD_H__ */ diff --git a/hardware/mpp/include/rk_venc_cmd.h b/hardware/mpp/include/rk_venc_cmd.h index 92af6e0..ee2594a 100644 --- a/hardware/mpp/include/rk_venc_cmd.h +++ b/hardware/mpp/include/rk_venc_cmd.h @@ -862,7 +862,6 @@ typedef struct MppEncH265CuCfg_t { RK_U32 strong_intra_smoothing_enabled_flag; /* INTRA_SMOOTH */ RK_U32 pcm_enabled_flag; /* default: 0, enable ipcm */ RK_U32 pcm_loop_filter_disabled_flag; - } MppEncH265CuCfg; typedef struct MppEncH265RefCfg_t { @@ -1213,4 +1212,4 @@ typedef struct MppEncUserDataSet_t { MppEncUserDataFull *datas; } MppEncUserDataSet; -#endif /* __RK_VENC_CMD_H__ */ \ No newline at end of file +#endif /* __RK_VENC_CMD_H__ */ diff --git a/hardware/mpp/include/vpu_api.h b/hardware/mpp/include/vpu_api.h index 28ca787..19bb60a 100644 --- a/hardware/mpp/include/vpu_api.h +++ b/hardware/mpp/include/vpu_api.h @@ -208,7 +208,6 @@ typedef struct EncoderOut { RK_S32 size; RK_S64 timeUs; RK_S32 keyFrame; - } EncoderOut_t; /* @@ -269,13 +268,12 @@ typedef enum VPU_API_ERR { typedef enum VPU_FRAME_ERR { VPU_FRAME_ERR_UNKNOW = 0x0001, VPU_FRAME_ERR_UNSUPPORT = 0x0002, - } VPU_FRAME_ERR; typedef struct EncParameter { RK_S32 width; RK_S32 height; - RK_S32 rc_mode; /* 0 - CQP mode; 1 - CBR mode; 2 - FIXQP mode*/ + RK_S32 rc_mode; /* 0 - CQP mode; 1 - CBR mode; 2 - FIXQP mode */ RK_S32 bitRate; /* target bitrate */ RK_S32 framerate; RK_S32 qp; @@ -327,7 +325,6 @@ typedef struct VpuCodecContext { */ RK_S32 decoder_err; - /** * Allocate and initialize an VpuCodecContext. * @@ -427,7 +424,7 @@ RK_S32 vpu_close_context(struct VpuCodecContext **ctx); RK_S32 (*put_used)(vpu_display_mem_pool *p, void *hdl); \ RK_S32 (*reset)(vpu_display_mem_pool *p); \ RK_S32 (*get_unused_num)(vpu_display_mem_pool *p); \ - RK_S32 buff_size;\ + RK_S32 buff_size; \ float version; \ RK_S32 res[18]; @@ -468,4 +465,4 @@ void release_vpu_memory_pool_allocator(vpu_display_mem_pool *ipool); } #endif -#endif /* __VPU_API_H__ */ \ No newline at end of file +#endif /* __VPU_API_H__ */ diff --git a/hardware/mpp/src/mpi_enc_utils.c b/hardware/mpp/src/mpi_enc_utils.c index e190305..db15bba 100644 --- a/hardware/mpp/src/mpi_enc_utils.c +++ b/hardware/mpp/src/mpi_enc_utils.c @@ -362,7 +362,7 @@ static MPP_RET test_mpp_enc_cfg_setup(MpiEncTestData *p) MppCtx ctx; MppEncCfg cfg; - if (NULL == p) + if (p == NULL) return MPP_ERR_NULL_PTR; mpi = p->mpi; diff --git a/hardware/rga/include/GrallocOps.h b/hardware/rga/include/GrallocOps.h index 2533da2..4c5ca52 100755 --- a/hardware/rga/include/GrallocOps.h +++ b/hardware/rga/include/GrallocOps.h @@ -18,4 +18,4 @@ #ifndef _rk_graphic_buffer_h_ #define _rk_graphic_buffer_h_ -#endif //_rk_graphic_buffer_h_ \ No newline at end of file +#endif // _rk_graphic_buffer_h_ diff --git a/hardware/rga/include/RgaApi.h b/hardware/rga/include/RgaApi.h index b505090..6dc96f5 100755 --- a/hardware/rga/include/RgaApi.h +++ b/hardware/rga/include/RgaApi.h @@ -44,11 +44,11 @@ extern "C"{ * compatibility with the old C interface, so please do * not use ctx, because it is usually a NULL. */ -#define RgaInit(ctx) ({ \ +#define RgaInit(ctx) ( { \ int ret = 0; \ ret = c_RkRgaInit(); \ c_RkRgaGetContext(ctx); \ - ret;\ + ret; \ }) #define RgaDeInit(ctx) { \ (void)(ctx); /* unused */ \ diff --git a/hardware/rga/include/RgaSingleton.h b/hardware/rga/include/RgaSingleton.h index 5c8232b..ff371f1 100755 --- a/hardware/rga/include/RgaSingleton.h +++ b/hardware/rga/include/RgaSingleton.h @@ -28,8 +28,9 @@ template class Singleton { - public: - static TYPE& getInstance() { +public: + static TYPE& getInstance() + { Mutex::Autolock _l(sLock); TYPE* instance = sInstance; if (instance == nullptr) { @@ -38,17 +39,17 @@ class Singleton { } return *instance; } - - static bool hasInstance() { + static bool hasInstance() + { Mutex::Autolock _l(sLock); return sInstance != nullptr; } - protected: +protected: ~Singleton() { } Singleton() { } - private: +private: Singleton(const Singleton&); Singleton& operator = (const Singleton&); static Mutex sLock; @@ -65,4 +66,4 @@ class Singleton { template<> TYPE* ::Singleton< TYPE >::sInstance(nullptr); /* NOLINT */ \ template class ::Singleton< TYPE >; -#endif //_LIBS_RGA_SINGLETON_H \ No newline at end of file +#endif //_LIBS_RGA_SINGLETON_H diff --git a/hardware/rga/include/RockchipRga.h b/hardware/rga/include/RockchipRga.h index 459cd33..5c14222 100755 --- a/hardware/rga/include/RockchipRga.h +++ b/hardware/rga/include/RockchipRga.h @@ -38,8 +38,8 @@ ////////////////////////////////////////////////////////////////////////////////// #include "RgaSingleton.h" -class RockchipRga :public Singleton { - public: +class RockchipRga : public Singleton { +public: static inline RockchipRga& get() { return getInstance(); @@ -62,21 +62,24 @@ class RockchipRga :public Singleton { int RkRgaCollorFill(rga_info *dst); int RkRgaCollorPalette(rga_info *src, rga_info *dst, rga_info *lut); int RkRgaFlush(); - void RkRgaSetLogOnceFlag(int log) { + void RkRgaSetLogOnceFlag(int log) + { mLogOnce = log; } - void RkRgaSetAlwaysLogFlag(bool log) { + void RkRgaSetAlwaysLogFlag(bool log) + { mLogAlways = log; } void RkRgaLogOutRgaReq(struct rga_req rgaReg); int RkRgaLogOutUserPara(rga_info *rgaInfo); - inline bool RkRgaIsReady() { + inline bool RkRgaIsReady() + { return mSupportRga; } RockchipRga(); ~RockchipRga(); - private: +private: bool mSupportRga; int mLogOnce; int mLogAlways; @@ -84,4 +87,4 @@ class RockchipRga :public Singleton { friend class Singleton; }; -#endif \ No newline at end of file +#endif diff --git a/hardware/rga/include/drmrga.h b/hardware/rga/include/drmrga.h index 0a638cf..2bfc3f2 100755 --- a/hardware/rga/include/drmrga.h +++ b/hardware/rga/include/drmrga.h @@ -23,7 +23,7 @@ /* flip source image horizontally (around the vertical axis) */ #define HAL_TRANSFORM_FLIP_H 0x01 -/* flip source image vertically (around the horizontal axis)*/ +/* flip source image vertically (around the horizontal axis) */ #define HAL_TRANSFORM_FLIP_V 0x02 /* rotate source image 90 degrees clockwise */ #define HAL_TRANSFORM_ROT_90 0x04 @@ -186,4 +186,4 @@ static inline void rga_set_rotation(rga_info_t *info, int angle) } /*****************************************************************************/ -#endif \ No newline at end of file +#endif diff --git a/hardware/rga/include/im2d.h b/hardware/rga/include/im2d.h index 1112e24..02f140d 100755 --- a/hardware/rga/include/im2d.h +++ b/hardware/rga/include/im2d.h @@ -69,7 +69,6 @@ typedef enum { IM_NN_QUANTIZE = 1 << 23, IM_ROP = 1 << 24, IM_ALPHA_BLEND_PRE_MUL = 1 << 25, - } IM_USAGE; typedef enum { @@ -909,4 +908,4 @@ IM_API IM_STATUS imsync(void); #ifdef __cplusplus } #endif -#endif /* _im2d_h_ */ \ No newline at end of file +#endif /* _im2d_h_ */ diff --git a/hardware/rga/include/platform_gralloc4.h b/hardware/rga/include/platform_gralloc4.h index 8c5c48d..2f3ae79 100755 --- a/hardware/rga/include/platform_gralloc4.h +++ b/hardware/rga/include/platform_gralloc4.h @@ -23,7 +23,7 @@ * < 习语 和 缩略语 > : * * ----------------------------------------------------------------------------------- - * Usage: + * Usage: * * Note: * @@ -32,7 +32,7 @@ * Log: * init. ----Fri Aug 28 10:10:14 2020 - * + * * -------------------------------------------------------------------------------------------------------- */ @@ -101,7 +101,6 @@ void freeBuffer(buffer_handle_t handle); * Inline Functions Implementation * --------------------------------------------------------------------------------------------------------- */ - } -#endif /* __PLATFORM_GRALLOC4_H__ */ \ No newline at end of file +#endif /* __PLATFORM_GRALLOC4_H__ */ diff --git a/hardware/rga/include/rga.h b/hardware/rga/include/rga.h index 6a573b8..a8540d8 100755 --- a/hardware/rga/include/rga.h +++ b/hardware/rga/include/rga.h @@ -86,11 +86,11 @@ enum { yuv2yuv_601_limit_2_709_limit = 0x3 << 8, yuv2yuv_601_limit_2_709_full = 0x4 << 8, yuv2yuv_709_limit_2_601_limit = 0x5 << 8, - yuv2yuv_709_limit_2_601_full = 0x6 << 8, //not support + yuv2yuv_709_limit_2_601_full = 0x6 << 8, // not support yuv2yuv_601_full_2_709_limit = 0x7 << 8, - yuv2yuv_601_full_2_709_full = 0x8 << 8, //not support - yuv2yuv_709_full_2_601_limit = 0x9 << 8, //not support - yuv2yuv_709_full_2_601_full = 0xa << 8, //not support + yuv2yuv_601_full_2_709_full = 0x8 << 8, // not support + yuv2yuv_709_full_2_601_limit = 0x9 << 8, // not support + yuv2yuv_709_full_2_601_full = 0xa << 8, // not support full_csc_mask = 0xf00, }; @@ -201,7 +201,7 @@ typedef struct rga_img_info_t { unsigned int uv_addr; /* cb/cr mem addr */ unsigned int v_addr; /* cr mem addr */ #endif - unsigned int format; //definition by RK_FORMAT + unsigned int format; // definition by RK_FORMAT unsigned short act_w; unsigned short act_h; unsigned short x_offset; @@ -210,7 +210,7 @@ typedef struct rga_img_info_t { unsigned short vir_w; unsigned short vir_h; - unsigned short endian_mode; //for BPP + unsigned short endian_mode; // for BPP unsigned short alpha_swap; } rga_img_info_t; @@ -260,7 +260,7 @@ typedef struct MMU { #else unsigned int base_addr; #endif - unsigned int mmu_flag; /* [0] mmu enable [1] src_flush [2] dst_flush [3] CMD_flush [4~5] page size*/ + unsigned int mmu_flag; /* [0] mmu enable [1] src_flush [2] dst_flush [3] CMD_flush [4~5] page size */ } MMU; @@ -276,7 +276,7 @@ typedef struct COLOR_FILL { short gr_x_r; short gr_y_r; - //u8 cp_gr_saturation; + // u8 cp_gr_saturation; } COLOR_FILL; @@ -329,7 +329,7 @@ struct rga_req { #endif RECT clip; /* dst clip window default value is dst_vir */ - /* value from [0, w-1] / [0, h-1]*/ + /* value from [0, w-1] / [0, h-1] */ int sina; /* dst angle default value 0 16.16 scan from table */ int cosa; /* dst angle default value 0 16.16 scan from table */ @@ -364,15 +364,15 @@ struct rga_req { unsigned char alpha_global_value; /* global alpha value */ - unsigned short rop_code; /* rop2/3/4 code scan from rop code table*/ + unsigned short rop_code; /* rop2/3/4 code scan from rop code table */ - unsigned char bsfilter_flag; /* [2] 0 blur 1 sharp / [1:0] filter_type*/ + unsigned char bsfilter_flag; /* [2] 0 blur 1 sharp / [1:0] filter_type */ - unsigned char palette_mode; /* (enum) color palatte 0/1bpp, 1/2bpp 2/4bpp 3/8bpp*/ + unsigned char palette_mode; /* (enum) color palatte 0/1bpp, 1/2bpp 2/4bpp 3/8bpp */ unsigned char yuv2rgb_mode; /* (enum) BT.601 MPEG / BT.601 JPEG / BT.709 */ - unsigned char endian_mode; /* 0/big endian 1/little endian*/ + unsigned char endian_mode; /* 0/big endian 1/little endian */ unsigned char rotate_mode; /* (enum) rotate mode */ /* 0x0, no rotate */ @@ -655,4 +655,4 @@ int RGA_get_dst_fence( } #endif -#endif /*_RK29_IPP_DRIVER_H_*/ \ No newline at end of file +#endif /*_RK29_IPP_DRIVER_H_*/ diff --git a/rk3568/camera/src/pipeline_core/node/rk_codec_node.cpp b/rk3568/camera/src/pipeline_core/node/rk_codec_node.cpp index 9143b40..455b93d 100644 --- a/rk3568/camera/src/pipeline_core/node/rk_codec_node.cpp +++ b/rk3568/camera/src/pipeline_core/node/rk_codec_node.cpp @@ -56,7 +56,7 @@ RetCode RKCodecNode::Flush(const int32_t streamId) } void RKCodecNode::encodeJpegToMemory(unsigned char* image, int width, int height, - const char* comment, size_t* jpegSize, unsigned char** jpegBuf) + const char* comment, size_t* jpegSize, unsigned char** jpegBuf) { struct jpeg_compress_struct cInfo; struct jpeg_error_mgr jErr; @@ -154,7 +154,6 @@ void RKCodecNode::SerchIFps(unsigned char* buf, size_t bufSize, std::shared_ptr< CAMERA_LOGI("ForkNode::ForkBuffers SetEsKeyFrame == 0 nalu == 0x%{public}x idx = %{public}d\n", nalType, idx); } - } void RKCodecNode::Yuv420ToRGBA8888(std::shared_ptr& buffer) -- Gitee