mirror of
https://github.com/nyanmisaka/mpp.git
synced 2026-01-24 02:40:39 +01:00
fix: Clean QAC Rule-21.2 and 8.2
Change-Id: Ia1e09ce5875095651fcca7c767b9b7db9279c81e Signed-off-by: Xiaoxu Chen <xiaoxu.chen@rock-chips.com>
This commit is contained in:
parent
04591fa711
commit
bb3f298036
6 changed files with 31 additions and 39 deletions
|
|
@ -862,11 +862,11 @@ typedef struct h264_old_slice_par_t {
|
|||
#define SYNTAX_BUF_SIZE (5)
|
||||
typedef struct h264d_dxva_ctx_t {
|
||||
RK_U8 cfgBitstrmRaw;
|
||||
struct _DXVA_PicParams_H264_MVC pp;
|
||||
struct _DXVA_Qmatrix_H264 qm;
|
||||
struct DXVA_PicParams_H264_MVC_t pp;
|
||||
struct DXVA_Qmatrix_H264_t qm;
|
||||
RK_U32 max_slice_size;
|
||||
RK_U32 slice_count;
|
||||
struct _DXVA_Slice_H264_Long *slice_long; //!< MAX_SLICES
|
||||
struct DXVA_Slice_H264_Long_t *slice_long; //!< MAX_SLICES
|
||||
RK_U8 *bitstream;
|
||||
RK_U32 max_strm_size;
|
||||
RK_U32 strm_offset;
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
/* H.264/AVC-specific structures */
|
||||
|
||||
/* H.264/AVC picture entry data structure */
|
||||
typedef struct _DXVA_PicEntry_H264 {
|
||||
typedef struct DXVA_PicEntry_H264_t {
|
||||
union {
|
||||
struct {
|
||||
RK_U8 Index7Bits : 7;
|
||||
|
|
@ -36,7 +36,7 @@ typedef struct _DXVA_PicEntry_H264 {
|
|||
} DXVA_PicEntry_H264, *LPDXVA_PicEntry_H264; /* 1 byte */
|
||||
|
||||
/* H.264/AVC picture parameters structure */
|
||||
typedef struct _DXVA_PicParams_H264 {
|
||||
typedef struct DXVA_PicParams_H264_t {
|
||||
RK_U16 wFrameWidthInMbsMinus1;
|
||||
RK_U16 wFrameHeightInMbsMinus1;
|
||||
DXVA_PicEntry_H264 CurrPic; /* flag is bot field flag */
|
||||
|
|
@ -104,27 +104,24 @@ typedef struct _DXVA_PicParams_H264 {
|
|||
RK_U8 Reserved8BitsB;
|
||||
|
||||
RK_U16 slice_group_change_rate_minus1;
|
||||
|
||||
//RK_U8 SliceGroupMap[810]; /* 4b/sgmu, Size BT.601 */
|
||||
|
||||
} DXVA_PicParams_H264, *LPDXVA_PicParams_H264;
|
||||
|
||||
/* H.264/AVC quantization weighting matrix data structure */
|
||||
typedef struct _DXVA_Qmatrix_H264 {
|
||||
typedef struct DXVA_Qmatrix_H264_t {
|
||||
RK_U8 bScalingLists4x4[6][16];
|
||||
RK_U8 bScalingLists8x8[6][64];
|
||||
|
||||
} DXVA_Qmatrix_H264, *LPDXVA_Qmatrix_H264;
|
||||
|
||||
/* H.264/AVC slice control data structure - short form */
|
||||
typedef struct _DXVA_Slice_H264_Short {
|
||||
typedef struct DXVA_Slice_H264_Short_t {
|
||||
RK_U32 BSNALunitDataLocation; /* type 1..5 */
|
||||
RK_U32 SliceBytesInBuffer; /* for off-host parse */
|
||||
RK_U16 wBadSliceChopping; /* for off-host parse */
|
||||
} DXVA_Slice_H264_Short, *LPDXVA_Slice_H264_Short;
|
||||
|
||||
/* H.264/AVC picture entry data structure - long form */
|
||||
typedef struct _DXVA_Slice_H264_Long {
|
||||
typedef struct DXVA_Slice_H264_Long_t {
|
||||
RK_U32 BSNALunitDataLocation; /* type 1..5 */
|
||||
RK_U32 SliceBytesInBuffer; /* for off-host parse */
|
||||
RK_U16 wBadSliceChopping; /* for off-host parse */
|
||||
|
|
@ -166,7 +163,7 @@ typedef struct _DXVA_Slice_H264_Long {
|
|||
} DXVA_Slice_H264_Long, *LPDXVA_Slice_H264_Long;
|
||||
|
||||
/* H.264/AVC macro block control command data structure */
|
||||
typedef struct _DXVA_MBctrl_H264 {
|
||||
typedef struct DXVA_MBctrl_H264_t {
|
||||
union {
|
||||
struct {
|
||||
RK_U32 bSliceID : 8; /* 1 byte */
|
||||
|
|
@ -220,7 +217,7 @@ typedef struct _DXVA_MBctrl_H264 {
|
|||
} DXVA_MBctrl_H264, *LPDXVA_MBctrl_H264;
|
||||
|
||||
/* H.264/AVC IndexA and IndexB data structure */
|
||||
typedef struct _DXVA_DeblockIndexAB_H264 {
|
||||
typedef struct DXVA_DeblockIndexAB_H264_t {
|
||||
RK_U8 bIndexAinternal; /* 6b - could get from MB CC */
|
||||
RK_U8 bIndexBinternal; /* 6b - could get from MB CC */
|
||||
|
||||
|
|
@ -239,7 +236,7 @@ typedef struct _DXVA_DeblockIndexAB_H264 {
|
|||
/* 10 bytes in struct */
|
||||
|
||||
/* H.264/AVC deblocking filter control data structure */
|
||||
typedef struct _DXVA_Deblock_H264 {
|
||||
typedef struct DXVA_Deblock_H264_t {
|
||||
RK_U16 CurrMbAddr; /* dup info */ /* 2 bytes so far */
|
||||
union {
|
||||
struct {
|
||||
|
|
@ -276,7 +273,7 @@ typedef struct _DXVA_Deblock_H264 {
|
|||
} DXVA_Deblock_H264, *LPDXVA_Deblock_H264;/* 48 bytes */
|
||||
|
||||
/* H.264/AVC film grain characteristics data structure */
|
||||
typedef struct _DXVA_FilmGrainCharacteristics {
|
||||
typedef struct DXVA_FilmGrainCharacteristics_t {
|
||||
|
||||
RK_U16 wFrameWidthInMbsMinus1;
|
||||
RK_U16 wFrameHeightInMbsMinus1;
|
||||
|
|
@ -311,7 +308,7 @@ typedef struct _DXVA_FilmGrainCharacteristics {
|
|||
} DXVA_FilmGrainChar_H264, *LPDXVA_FilmGrainChar_H264;
|
||||
|
||||
/* H.264/AVC status reporting data structure */
|
||||
typedef struct _DXVA_Status_H264 {
|
||||
typedef struct DXVA_Status_H264_t {
|
||||
RK_U32 StatusReportFeedbackNumber;
|
||||
DXVA_PicEntry_H264 CurrPic; /* flag is bot field flag */
|
||||
RK_U8 field_pic_flag;
|
||||
|
|
@ -323,7 +320,7 @@ typedef struct _DXVA_Status_H264 {
|
|||
} DXVA_Status_H264, *LPDXVA_Status_H264;
|
||||
|
||||
/* H.264 MVC picture parameters structure */
|
||||
typedef struct _DXVA_PicParams_H264_MVC {
|
||||
typedef struct DXVA_PicParams_H264_MVC_t {
|
||||
RK_U16 wFrameWidthInMbsMinus1;
|
||||
RK_U16 wFrameHeightInMbsMinus1;
|
||||
DXVA_PicEntry_H264 CurrPic; /* flag is bot field flag */
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ typedef struct DXVA_PicEntry_VP8_t {
|
|||
RK_U8 bPicEntry;
|
||||
};
|
||||
} DXVA_PicEntry_VP8;
|
||||
typedef struct _segmentation_Vp8 {
|
||||
typedef struct DXVA_segmentation_Vp8_t {
|
||||
union {
|
||||
struct {
|
||||
RK_U8 segmentation_enabled : 1;
|
||||
|
|
|
|||
|
|
@ -121,11 +121,8 @@ typedef enum ReOsdPltType_e {
|
|||
#define RKV_ENC_MODE RKVENC_LINKTABLE_DISABLE //2
|
||||
#define RKVE_LINKTABLE_FRAME_NUM 1 //2
|
||||
|
||||
#if RKV_ENC_MODE == RKVENC_LINKTABLE_START
|
||||
#define RKVE_LINKTABLE_EACH_NUM RKVE_LINKTABLE_FRAME_NUM
|
||||
#else
|
||||
#define RKVE_LINKTABLE_EACH_NUM 1
|
||||
#endif
|
||||
|
||||
#define RKVE_LINKTABLE_MAX_SIZE 256
|
||||
|
||||
#define RKVE_RC_TEXTURE_THR_SIZE 16
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ extern "C" {
|
|||
|
||||
typedef struct MppListNode_t MppListNode;
|
||||
// desctructor of list node
|
||||
typedef void *(*node_destructor)(void *);
|
||||
typedef void *(*node_destructor)(void *arg);
|
||||
|
||||
struct MppListNode_t {
|
||||
MppListNode *prev;
|
||||
|
|
@ -131,9 +131,9 @@ struct list_head {
|
|||
&pos->member != (head); \
|
||||
pos = n, n = list_prev_entry(n, type, member))
|
||||
|
||||
static __inline void __list_add(struct list_head * _new,
|
||||
struct list_head * prev,
|
||||
struct list_head * next)
|
||||
static __inline void list_add_(struct list_head * _new,
|
||||
struct list_head * prev,
|
||||
struct list_head * next)
|
||||
{
|
||||
next->prev = _new;
|
||||
_new->next = next;
|
||||
|
|
@ -143,15 +143,15 @@ static __inline void __list_add(struct list_head * _new,
|
|||
|
||||
static __inline void list_add(struct list_head *_new, struct list_head *head)
|
||||
{
|
||||
__list_add(_new, head, head->next);
|
||||
list_add_(_new, head, head->next);
|
||||
}
|
||||
|
||||
static __inline void list_add_tail(struct list_head *_new, struct list_head *head)
|
||||
{
|
||||
__list_add(_new, head->prev, head);
|
||||
list_add_(_new, head->prev, head);
|
||||
}
|
||||
|
||||
static __inline void __list_del(struct list_head * prev, struct list_head * next)
|
||||
static __inline void list_del_(struct list_head * prev, struct list_head * next)
|
||||
{
|
||||
next->prev = prev;
|
||||
prev->next = next;
|
||||
|
|
@ -159,34 +159,34 @@ static __inline void __list_del(struct list_head * prev, struct list_head * next
|
|||
|
||||
static __inline void list_del_init(struct list_head *entry)
|
||||
{
|
||||
__list_del(entry->prev, entry->next);
|
||||
list_del_(entry->prev, entry->next);
|
||||
|
||||
INIT_LIST_HEAD(entry);
|
||||
}
|
||||
|
||||
static __inline void list_move(struct list_head *list, struct list_head *head)
|
||||
{
|
||||
__list_del(list->prev, list->next);
|
||||
list_del_(list->prev, list->next);
|
||||
list_add(list, head);
|
||||
}
|
||||
|
||||
static __inline void list_move_tail(struct list_head *list, struct list_head *head)
|
||||
{
|
||||
__list_del(list->prev, list->next);
|
||||
list_del_(list->prev, list->next);
|
||||
list_add_tail(list, head);
|
||||
}
|
||||
|
||||
static __inline int list_is_last(const struct list_head *list, const struct list_head *head)
|
||||
{
|
||||
return list->next == head;
|
||||
return (list->next == head) ? 1 : 0;
|
||||
}
|
||||
|
||||
static __inline int list_empty(struct list_head *head)
|
||||
{
|
||||
return head->next == head;
|
||||
return (head->next == head) ? 1 : 0;
|
||||
}
|
||||
|
||||
typedef rk_s32 (*ListCmpFunc)(void *, const struct list_head *, const struct list_head *);
|
||||
typedef rk_s32 (*ListCmpFunc)(void *arg, const struct list_head *list1, const struct list_head *list2);
|
||||
|
||||
void list_sort(void *priv, struct list_head *head, ListCmpFunc cmp);
|
||||
|
||||
|
|
|
|||
|
|
@ -9,9 +9,7 @@
|
|||
#include <unistd.h>
|
||||
#include <semaphore.h>
|
||||
#include <pthread.h>
|
||||
#include <sys/time.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "rk_type.h"
|
||||
|
|
@ -30,7 +28,7 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef void *(*MppThreadFunc)(void *);
|
||||
typedef void *(*MppThreadFunc)(void *arg);
|
||||
|
||||
typedef enum MppThreadStatus_e {
|
||||
MPP_THREAD_UNINITED,
|
||||
|
|
@ -149,7 +147,7 @@ typedef struct MppSThdCtx_t {
|
|||
void *ctx;
|
||||
} MppSThdCtx;
|
||||
|
||||
typedef void *(*MppSThdFunc)(MppSThdCtx *);
|
||||
typedef void *(*MppSThdFunc)(MppSThdCtx *ctx);
|
||||
|
||||
MppSThd mpp_sthd_get(const char *name);
|
||||
void mpp_sthd_put(MppSThd thd);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue