ISVP-SDK  3.12.0
Ingenic Smart Video Platform SDK
imp_encoder.h
Go to the documentation of this file.
1 /*
2  * IMP Encoder func header file.
3  *
4  * Copyright (C) 2014 Ingenic Semiconductor Co.,Ltd
5  */
6 
7 #ifndef __IMP_ENCODER_H__
8 #define __IMP_ENCODER_H__
9 
10 #include <stdint.h>
11 #include <stdbool.h>
12 
13 #ifdef __cplusplus
14 #if __cplusplus
15 extern "C"
16 {
17 #endif
18 #endif /* __cplusplus */
19 
57 typedef enum {
64 
70 typedef struct {
71  uint32_t frmRateNum;
72  uint32_t frmRateDen;
74 
78 typedef struct {
79  uint32_t qp;
81 
85 typedef struct {
86  uint32_t maxQp;
87  uint32_t minQp;
88  uint32_t outBitRate;
89  int iBiasLvl;
90  uint32_t frmQPStep;
91  uint32_t gopQPStep;
92  bool adaptiveMode;
93  bool gopRelation;
95 
99 typedef struct {
100  uint32_t maxQp;
101  uint32_t minQp;
102  uint32_t staticTime;
103  uint32_t maxBitRate;
104  int32_t iBiasLvl;
105  uint32_t changePos;
106  uint32_t qualityLvl;
107  uint32_t frmQPStep;
108  uint32_t gopQPStep;
109  bool gopRelation;
111 
115 typedef struct {
116  uint32_t maxQp;
117  uint32_t minQp;
118  uint32_t staticTime;
119  uint32_t maxBitRate;
120  int32_t iBiasLvl;
121  uint32_t changePos;
122  uint32_t qualityLvl;
123  uint32_t frmQPStep;
124  uint32_t gopQPStep;
125  bool gopRelation;
127 
131 typedef struct {
132  bool enable;
133  bool isAutoMode;
134  int demaskCnt;
137 
141 typedef struct {
142  bool enable;
143  int dnType;
144  int dnIQp;
145  int dnPQp;
147 
151 typedef enum {
156 
160 typedef struct {
161  bool enable;
163  uint32_t frmUsedTimes;
165 
166 typedef enum {
174 } IMPSkipType;
175 
176 typedef enum {
181 } IMPRefType;
182 
186 typedef struct {
188  int m;
189  int n;
194 
198 typedef struct {
202 
206 typedef struct {
208  union {
213  };
215 
219 typedef struct {
221  uint32_t maxGop;
228 
232 typedef enum {
245 
249 typedef union {
252 
256 typedef struct {
257  uint32_t phyAddr;
258  uint32_t virAddr;
259  uint32_t length;
260  int64_t timestamp;
261  bool frameEnd;
264 
268 typedef struct {
270  uint32_t packCount;
271  uint32_t seq;
272  union {
274  };
276 
280 typedef struct {
281  bool enable;
282  uint32_t x;
283  uint32_t y;
284  uint32_t w;
285  uint32_t h;
287 
291 typedef struct {
292  uint32_t maxUserDataCnt;
293  uint32_t maxUserDataSize;
295 
299 typedef struct {
301  uint32_t bufSize;
302  uint32_t profile;
303  uint32_t picWidth;
304  uint32_t picHeight;
308 
312 typedef struct {
316 
320 typedef struct {
321  bool registered;
322  uint32_t leftPics;
323  uint32_t leftStreamBytes;
324  uint32_t leftStreamFrames;
325  uint32_t curPacks;
326  uint32_t work_done;
328 
332 typedef struct {
333  bool enable;
335 
339 typedef struct {
340  bool enable;
342 
346 typedef struct {
347  int gopsize;
349 
353 typedef struct {
354  uint32_t u32Index;
355  bool bEnable;
356  bool bRelatedQp;
357  int s32Qp;
360 
364 typedef enum {
368  IMP_RC_SUPERFRM_BUTT = 3,
370 
374 typedef enum {
378  IMP_RC_PRIORITY_BUTT = 3,
380 
384 typedef struct {
386  uint32_t superIFrmBitsThr;
387  uint32_t superPFrmBitsThr;
388  uint32_t superBFrmBitsThr;
391 
395 typedef struct {
396  uint32_t intraTransMode;
397  uint32_t interTransMode;
399  uint8_t interScalingList8X8[64];
400  uint8_t intraScalingList8X8[64];
403 
407 typedef struct {
409  uint8_t qmem_table[256];
411 
426 int IMP_Encoder_CreateGroup(int encGroup);
427 
442 int IMP_Encoder_DestroyGroup(int encGroup);
443 
458 int IMP_Encoder_CreateChn(int encChn, const IMPEncoderCHNAttr *attr);
459 
473 int IMP_Encoder_DestroyChn(int encChn);
474 
486 int IMP_Encoder_GetChnAttr(int encChn, IMPEncoderCHNAttr * const attr);
487 
504 int IMP_Encoder_RegisterChn(int encGroup, int encChn);
524 int IMP_Encoder_UnRegisterChn(int encChn);
525 
541 int IMP_Encoder_StartRecvPic(int encChn);
542 
559 int IMP_Encoder_StopRecvPic(int encChn);
560 
572 int IMP_Encoder_Query(int encChn, IMPEncoderCHNStat *stat);
573 
626 int IMP_Encoder_GetStream(int encChn, IMPEncoderStream *stream, bool blockFlag);
627 
648 int IMP_Encoder_ReleaseStream(int encChn, IMPEncoderStream *stream);
649 
664 int IMP_Encoder_PollingStream(int encChn, uint32_t timeoutMsec);
665 
680 int IMP_Encoder_SetMaxStreamCnt(int encChn, int nrMaxStream);
681 
693 int IMP_Encoder_GetMaxStreamCnt(int encChn, int *nrMaxStream);
694 
707 int IMP_Encoder_RequestIDR(int encChn);
708 
721 int IMP_Encoder_FlushStream(int encChn);
722 
737 int IMP_Encoder_SetChnColor2Grey(int encChn, const IMPEncoderColor2GreyCfg *pstColor2Grey);
738 
753 int IMP_Encoder_GetChnColor2Grey(int encChn, IMPEncoderColor2GreyCfg *pstColor2Grey);
754 
772 int IMP_Encoder_SetChnAttrRcMode(int encChn, const IMPEncoderAttrRcMode *pstRcModeCfg);
773 
789 int IMP_Encoder_GetChnAttrRcMode(int encChn, IMPEncoderAttrRcMode *pstRcModeCfg);
790 
806 int IMP_Encoder_SetChnFrmRate(int encChn, const IMPEncoderFrmRate *pstFps);
807 
823 int IMP_Encoder_GetChnFrmRate(int encChn, IMPEncoderFrmRate *pstFps);
824 
840 int IMP_Encoder_SetChnROI(int encChn, const IMPEncoderROICfg *pstVencRoiCfg);
841 
857 int IMP_Encoder_GetChnROI(int encChn, IMPEncoderROICfg *pstVencRoiCfg);
858 
872 int IMP_Encoder_GetGOPSize(int encChn, IMPEncoderGOPSizeCfg *pstGOPSizeCfg);
873 
887 int IMP_Encoder_SetGOPSize(int encChn, const IMPEncoderGOPSizeCfg *pstGOPSizeCfg);
888 
902 int IMP_Encoder_SetChnDemask(int encChn, const IMPEncoderAttrDemask *pdemaskAttr);
903 
917 int IMP_Encoder_GetChnDemask(int encChn, IMPEncoderAttrDemask *pdemaskAttr);
918 
932 int IMP_Encoder_SetChnFrmUsedMode(int encChn, const IMPEncoderAttrFrmUsed *pfrmUsedAttr);
933 
947 int IMP_Encoder_GetChnFrmUsedMode(int encChn, IMPEncoderAttrFrmUsed *pfrmUsedAttr);
948 
962 int IMP_Encoder_SetChnDenoise(int encChn, const IMPEncoderAttrDenoise *pdenoiseAttr);
963 
979 int IMP_Encoder_GetChnDenoise(int encChn, IMPEncoderAttrDenoise *pdenoiseAttr);
980 
999 int IMP_Encoder_SetChnHSkip(int encChn, const IMPEncoderAttrHSkip *phSkipAttr);
1000 
1014 int IMP_Encoder_GetChnHSkip(int encChn, IMPEncoderAttrHSkip *phSkipAttr);
1015 
1030 int IMP_Encoder_SetChnHSkipBlackEnhance(int encChn, const int bBlackEnhance);
1031 
1055 int IMP_Encoder_InsertUserData(int encChn, void *userData, uint32_t userDataLen);
1056 
1072 int IMP_Encoder_SetFisheyeEnableStatus(int encChn, int enable);
1073 
1087 int IMP_Encoder_GetFisheyeEnableStatus(int encChn, int *enable);
1088 
1102 int IMP_Encoder_SetChangeRef(int encChn, int bEnable);
1103 
1117 int IMP_Encoder_GetChangeRef(int encChn, int *bEnable);
1118 
1132 int IMP_Encoder_SetMbRC(int encChn, int bEnable);
1133 
1147 int IMP_Encoder_GetMbRC(int encChn, int *bEnable);
1148 
1163 int IMP_Encoder_SetSuperFrameCfg(int encChn, const IMPEncoderSuperFrmCfg *pstSuperFrmParam);
1164 
1179 int IMP_Encoder_GetSuperFrameCfg(int encChn, IMPEncoderSuperFrmCfg *pstSuperFrmParam);
1180 
1197 int IMP_Encoder_SetH264TransCfg(int encChn, const IMPEncoderH264TransCfg *pstH264TransCfg);
1198 
1213 int IMP_Encoder_GetH264TransCfg(int encChn, IMPEncoderH264TransCfg *pstH264TransCfg);
1214 
1229 int IMP_Encoder_SetJpegeQl(int encChn, const IMPEncoderJpegeQl *pstJpegeQl);
1230 
1245 int IMP_Encoder_GetJpegeQl(int encChn, IMPEncoderJpegeQl *pstJpegeQl);
1246 
1251 #ifdef __cplusplus
1252 #if __cplusplus
1253 }
1254 #endif
1255 #endif /* __cplusplus */
1256 
1257 #endif /* __IMP_ENCODER_H__ */
int dnIQp
I slice quantization parameter.
Definition: imp_encoder.h:144
int iBiasLvl
I proportional frame support (-3~3), 7 levels.
Definition: imp_encoder.h:89
bool gopRelation
whether GOP has relationship
Definition: imp_encoder.h:93
super frame threshold first
Definition: imp_encoder.h:377
uint32_t changePos
adjust qp position avriation when bitrate exceeds changepos*maxBitRate, range:[50, 100]
Definition: imp_encoder.h:121
int IMP_Encoder_SetChnROI(int encChn, const IMPEncoderROICfg *pstVencRoiCfg)
Set encoder channel ROI attribute.
int IMP_Encoder_SetChnColor2Grey(int encChn, const IMPEncoderColor2GreyCfg *pstColor2Grey)
set color to grey attribute
Coded slice data partition B.
Definition: imp_encoder.h:236
IMPEncoderH264NaluType
H264 stream NAL unit type codes.
Definition: imp_encoder.h:232
int IMP_Encoder_GetGOPSize(int encChn, IMPEncoderGOPSizeCfg *pstGOPSizeCfg)
Get encoder channel GOP attribute.
int s32Qp
the absolute or relative qp in roi region
Definition: imp_encoder.h:357
int IMP_Encoder_GetChnROI(int encChn, IMPEncoderROICfg *pstVencRoiCfg)
Get encoder channel roi attribute.
int64_t timestamp
timestamp,unit:us
Definition: imp_encoder.h:260
int IMP_Encoder_ReleaseStream(int encChn, IMPEncoderStream *stream)
release the bitstream buffer
bool gopRelation
gop是否关联
Definition: imp_encoder.h:109
IMPEncoderAttr encAttr
encoder attribute
Definition: imp_encoder.h:313
int n
base frame interval
Definition: imp_encoder.h:189
Define the channel ratecontroller attribute.
Definition: imp_encoder.h:219
IMPEncoderCropCfg crop
crop attribute, only for h264 protocol
Definition: imp_encoder.h:305
bool gopRelation
whether GOP has relationship
Definition: imp_encoder.h:125
Frame loss mode.
Definition: imp_encoder.h:154
int32_t iBiasLvl
I proportional frame support (-3~3), 7 levels.
Definition: imp_encoder.h:120
uint32_t superPFrmBitsThr
super P frame threadhold, default:super I frame threshold divide by 1.4
Definition: imp_encoder.h:387
int IMP_Encoder_SetChnHSkipBlackEnhance(int encChn, const int bBlackEnhance)
Set encode channel'bBlackEnhance in high skip reference attribute.
int32_t iBiasLvl
I proportional frame support (-3~3), 7 levels.
Definition: imp_encoder.h:104
uint32_t interTransMode
inter-frame prediction transform mode 0:support 4x4,8x8 , high profile; 1:support 4x4 ...
Definition: imp_encoder.h:397
IMPSkipType maxHSkipType
must used max skip type
Definition: imp_encoder.h:200
uint32_t bufSize
Configure buffer size,shouldn't be less than width*height*3/2.
Definition: imp_encoder.h:301
bool enable
variable to enable color to grey, 0: no, 1: yes
Definition: imp_encoder.h:333
IMPEncoderPack * pack
bitstream packet
Definition: imp_encoder.h:269
IMPRefType
Definition: imp_encoder.h:176
Define the bitstream structure of one frame.
Definition: imp_encoder.h:268
uint32_t superBFrmBitsThr
super B frame threadhold, default:super P frame threshold divide by 1.3
Definition: imp_encoder.h:388
IMPEncoderAttrH264FixQP attrH264FixQp
the FixQp ratecontrol attribute
Definition: imp_encoder.h:209
EncFrmUsedMode frmUsedMode
input frame usage mode variable
Definition: imp_encoder.h:162
uint32_t maxQp
max encoder Quantization parameter,range:[0-51]
Definition: imp_encoder.h:116
Define the VBR ratecontrol attribute of h264 channel.
Definition: imp_encoder.h:99
Access unit delimiter.
Definition: imp_encoder.h:242
int IMP_Encoder_GetH264TransCfg(int encChn, IMPEncoderH264TransCfg *pstH264TransCfg)
Get H.264 encode channel transform and quantization attribute.
high skip frame reference mode:1M open skip frame
Definition: imp_encoder.h:172
uint32_t curPacks
Number of packets in current frame.
Definition: imp_encoder.h:325
Coded slice of an IDR picture.
Definition: imp_encoder.h:238
int IMP_Encoder_GetSuperFrameCfg(int encChn, IMPEncoderSuperFrmCfg *pstSuperFrmParam)
Get video coded supper frame configuration.
uint32_t leftStreamFrames
Number of Stream buffer remaining frames.
Definition: imp_encoder.h:324
int dnType
denoise type,0:NONE-no denoise, 1:IP-loss info most, 2:II-loss info less
Definition: imp_encoder.h:143
bool enable
whether denoise function is enabled/disabled , 0:disable, 1:enable
Definition: imp_encoder.h:142
uint32_t minQp
min encoder Quantization parameter,range:[0-maxQp]
Definition: imp_encoder.h:117
bool enable
whether enable/disable crop, false:disable, true: enable
Definition: imp_encoder.h:281
uint32_t virAddr
bitstream packet virtual address
Definition: imp_encoder.h:258
int IMP_Encoder_UnRegisterChn(int encChn)
unregister encode channel from group
Define the input frame usage mode attribute of h264 channel.
Definition: imp_encoder.h:160
int IMP_Encoder_GetChangeRef(int encChn, int *bEnable)
get whether allow change base skip frame's reference or not
IMPEncoderRcAttr rcAttr
ratecontrol attribute
Definition: imp_encoder.h:314
IMPEncoderUserDataCfg userData
insert userdata attribute, only for h264
Definition: imp_encoder.h:306
bool enable
whether demask func is enabled/ disabled
Definition: imp_encoder.h:132
IMPPayloadType enType
encode protocal type
Definition: imp_encoder.h:300
IMPEncoderRcPriority rcPriority
priority of ratecontrol, default: RDO
Definition: imp_encoder.h:389
Define the Enalbe IDR parameter.
Definition: imp_encoder.h:339
uint32_t leftStreamBytes
Number of Stream buffer remaining byte.
Definition: imp_encoder.h:323
IMPPayloadType
Encoding and decoding protocol type.
Definition: imp_common.h:82
Coded slice of a non-IDR picture.
Definition: imp_encoder.h:234
Smart method.
Definition: imp_encoder.h:61
int gopsize
IDR parameters.
Definition: imp_encoder.h:347
Define the Smart ratecontrol attribute of h264 channel.
Definition: imp_encoder.h:115
bool adaptiveMode
adaptive mode
Definition: imp_encoder.h:92
int IMP_Encoder_StopRecvPic(int encChn)
stop encode channel to receive frames
uint32_t frmQPStep
Inter frames QP variation.
Definition: imp_encoder.h:107
reencoder super frame (supported), default
Definition: imp_encoder.h:367
IMPEncoderRcMode
Define h264 channel ratecontrol method.
Definition: imp_encoder.h:57
int IMP_Encoder_SetChangeRef(int encChn, int bEnable)
set whether allow change base skip frame's reference or not
int IMP_Encoder_GetJpegeQl(int encChn, IMPEncoderJpegeQl *pstJpegeQl)
Get JPEG encode channel quantization table set param.
IMPEncoderRcPriority
Define priority type of ratecontrol.
Definition: imp_encoder.h:374
int IMP_Encoder_SetChnHSkip(int encChn, const IMPEncoderAttrHSkip *phSkipAttr)
Set encode channel high skip reference attribute.
int IMP_Encoder_GetChnAttrRcMode(int encChn, IMPEncoderAttrRcMode *pstRcModeCfg)
Get encode channel rate controller mode attribute(s)
uint32_t frmQPStep
Inter frames QP variation.
Definition: imp_encoder.h:90
VBR method.
Definition: imp_encoder.h:60
int IMP_Encoder_DestroyGroup(int encGroup)
destroy the encoding Group
Define H.264 encoder channel transform quantization struct.
Definition: imp_encoder.h:395
uint32_t phyAddr
bitstream packet physical address
Definition: imp_encoder.h:257
IMPEncoderRcMode rcMode
ratecontrol mode
Definition: imp_encoder.h:207
IMPEncoderAttrHSkip hSkipAttr
high skip frame type attr
Definition: imp_encoder.h:199
Coded slice data partition C.
Definition: imp_encoder.h:237
bool bEnable
whether enable/disable ROI func to the region
Definition: imp_encoder.h:355
uint32_t changePos
adjust qp position avriation when bitrate exceeds changepos*maxBitRate, range:[50, 100]
Definition: imp_encoder.h:105
IMPEncoderSuperFrmMode
Define process strategy of ratecontrol super frame.
Definition: imp_encoder.h:364
uint32_t length
bitstram packet length
Definition: imp_encoder.h:259
IMPSkipType skipType
skip type
Definition: imp_encoder.h:187
uint32_t w
the width of crop region
Definition: imp_encoder.h:284
uint32_t profile
encode profile, 0: baseline; 1:MP; 2:HP
Definition: imp_encoder.h:302
Define encode channel state attribute structure.
Definition: imp_encoder.h:320
Define color to grey parameter.
Definition: imp_encoder.h:332
IMPEncoderAttrInitHSkip attrHSkip
high skip frame type attribute
Definition: imp_encoder.h:226
uint32_t x
the left-top x-coordinate of crop region
Definition: imp_encoder.h:282
IMPEncoderSuperFrmMode superFrmMode
super frame process strategy, default: SUPERFRM_REENCODE
Definition: imp_encoder.h:385
int IMP_Encoder_GetMbRC(int encChn, int *bEnable)
get the status whether open mb ratecontrol or not
invalidate method
Definition: imp_encoder.h:62
int demaskThresd
demask threshold
Definition: imp_encoder.h:135
int IMP_Encoder_SetChnFrmRate(int encChn, const IMPEncoderFrmRate *pstFps)
Set encode channel framerate controlled attribute.
repeat use of a frame mode
Definition: imp_encoder.h:153
int maxSameSceneCnt
one scene over gop num, only effect to H1M skip type, when set more than 1, m no effect ...
Definition: imp_encoder.h:190
uint32_t maxUserDataSize
User's Maximum size of insert data cache, range:16-1024.
Definition: imp_encoder.h:293
Supplemental enhancement information(SEI)
Definition: imp_encoder.h:239
Sequential full use mode - default mode.
Definition: imp_encoder.h:152
uint32_t qualityLvl
Video quality level, range:[0-6];the higher the value, the higher the quality and the biger the bits...
Definition: imp_encoder.h:122
high skip frame reference mode:N1 open skip frame
Definition: imp_encoder.h:170
uint32_t picWidth
frame width, must be 16 aligned,shouldn't less than 256
Definition: imp_encoder.h:303
int m
enhance frame interval
Definition: imp_encoder.h:188
uint32_t frmRateDen
the tick num in one frame, the denominator of framerate
Definition: imp_encoder.h:72
Define the CBR ratecontrol attribute of h264 channel.
Definition: imp_encoder.h:85
int IMP_Encoder_RequestIDR(int encChn)
Requst IDR frame.
int IMP_Encoder_GetFisheyeEnableStatus(int encChn, int *enable)
get enabled status of ingenic fisheye correction algorithm
uint32_t frmUsedTimes
the frame interval (repeat or skip mode)
Definition: imp_encoder.h:163
Define high skip frame type init structure of h264 channel.
Definition: imp_encoder.h:198
bool enable
Configuration of EnableIDR, 0:disable, 1:enable.
Definition: imp_encoder.h:340
uint32_t gopQPStep
QP variation among GOPs.
Definition: imp_encoder.h:108
uint32_t superIFrmBitsThr
super I frame threshold, default: w*h*3/2*8/ratio, ratio: mainres-6, subres-3
Definition: imp_encoder.h:386
the long base(p) frame in high skip frame reference mode
Definition: imp_encoder.h:178
int IMP_Encoder_SetChnFrmUsedMode(int encChn, const IMPEncoderAttrFrmUsed *pfrmUsedAttr)
Set encoder channel input frame usage mode attribute.
uint32_t y
the left-top y-coordinate of crop region
Definition: imp_encoder.h:283
uint32_t gopQPStep
QP variation among GOPs.
Definition: imp_encoder.h:91
int IMP_Encoder_FlushStream(int encChn)
flush old bitstream of encoder and start with idr frame to encode
Define the FixQp ratecontrol attribute of h264 channel.
Definition: imp_encoder.h:78
Define encoder channel attribute structure.
Definition: imp_encoder.h:312
Filler data.
Definition: imp_encoder.h:243
int IMP_Encoder_GetChnFrmUsedMode(int encChn, IMPEncoderAttrFrmUsed *pfrmUsedAttr)
Get encoder channel input frame usage mode attribute.
IMPEncoderAttrH264CBR attrH264Cbr
the CBR ratecontrol attribute
Definition: imp_encoder.h:210
IMPRefType refType
bitstream sequence number, frame number obtained by frame, according to the packet to obtain packet n...
Definition: imp_encoder.h:273
uint32_t seq
packet frame sequence code
Definition: imp_encoder.h:271
int IMP_Encoder_SetChnDemask(int encChn, const IMPEncoderAttrDemask *pdemaskAttr)
Set encoder channel demask attribute.
uint32_t maxBitRate
max bitrate in one second, unit:kbps
Definition: imp_encoder.h:119
high skip frame reference mode:N1 close skip frame
Definition: imp_encoder.h:171
int bBlackEnhance
be made to use black coded bitstream to enhance frame?
Definition: imp_encoder.h:192
uint32_t leftPics
Number of images to be encoded.
Definition: imp_encoder.h:322
IMPEncoderAttrH264VBR attrH264Vbr
the VBR ratecontrol attribute
Definition: imp_encoder.h:211
IMPEncoderFrmRate outFrmRate
h264 output framerate, (frame output shouldn't be bigger than input framerate)
Definition: imp_encoder.h:220
Fixqp method.
Definition: imp_encoder.h:58
int IMP_Encoder_GetChnDemask(int encChn, IMPEncoderAttrDemask *pdemaskAttr)
Get encoder channel demask attribute.
int IMP_Encoder_SetGOPSize(int encChn, const IMPEncoderGOPSizeCfg *pstGOPSizeCfg)
Set encoder channel gop attribute.
Define JPEG encoder channel quantization table set param struct.
Definition: imp_encoder.h:407
uint32_t maxGop
gop value,suggested to be an integer multiple of the framerate
Definition: imp_encoder.h:221
Define ROI parameters.
Definition: imp_encoder.h:353
uint32_t frmRateNum
the tick num in one second, the numerator of framerate
Definition: imp_encoder.h:71
Define the encoder crop attribute(crop first, scaler second)
Definition: imp_encoder.h:280
IMPEncoderAttrRcMode attrRcMode
rate control mode attribute
Definition: imp_encoder.h:222
Sequence parameter set.
Definition: imp_encoder.h:240
rdo priority
Definition: imp_encoder.h:375
Define video encode channel framerate structure frmRateNum and frmRateDen is LCM must be 1 and GCD mu...
Definition: imp_encoder.h:70
uint32_t staticTime
bitstream statistic time, unit:second
Definition: imp_encoder.h:102
IMPRect rect
region coordinate attribute(s)
Definition: imp_encoder.h:358
the enhance(p) frame in high skip frame reference mode
Definition: imp_encoder.h:180
IMPEncoderAttrDenoise attrDenoise
denoise attribute
Definition: imp_encoder.h:225
2 times (skip frame reference)
Definition: imp_encoder.h:168
int IMP_Encoder_SetJpegeQl(int encChn, const IMPEncoderJpegeQl *pstJpegeQl)
Set JPEG encode channel quantization table set param.
no strategy (supported)
Definition: imp_encoder.h:365
IMPEncoderAttrH264Smart attrH264Smart
the Smart ratecontrol attribute
Definition: imp_encoder.h:212
int IMP_Encoder_DestroyChn(int encChn)
destroy encode Channel
Define encoder attribute structure.
Definition: imp_encoder.h:299
int IMP_Encoder_SetChnDenoise(int encChn, const IMPEncoderAttrDenoise *pdenoiseAttr)
Set encode channel denoise attribute.
int IMP_Encoder_CreateGroup(int encGroup)
Create encode Group.
dop super frame (unsupported), users should decide whether drop or not
Definition: imp_encoder.h:366
bool bRelatedQp
0:absolute ROI,1:relative ROI
Definition: imp_encoder.h:356
uint32_t outBitRate
output bitstream rate, unit:kbps
Definition: imp_encoder.h:88
bool bScalingListValid
interScalingList8x8、intraScalingList8x8 valid flag, used in high profile; 0:invalid, 1:valid; now only support config 0
Definition: imp_encoder.h:398
int demaskCnt
demask tracking parameter
Definition: imp_encoder.h:134
uint32_t qualityLvl
Video quality lowest level, range:[0-7];the lower the value, the higher the quality and the biger th...
Definition: imp_encoder.h:106
Paramete of super frame process strategy.
Definition: imp_encoder.h:384
int IMP_Encoder_PollingStream(int encChn, uint32_t timeoutMsec)
Polling bitstream buffer.
uint32_t work_done
work done state,0:running,1,not running
Definition: imp_encoder.h:326
uint32_t intraTransMode
intra-frame prediction transform mode 0:support 4x4,8x8, high profile ; 1:support 4x4 transform...
Definition: imp_encoder.h:396
int IMP_Encoder_GetStream(int encChn, IMPEncoderStream *stream, bool blockFlag)
Get encode bitstream.
bool isAutoMode
whether open auto demask mode, 0:manual,1:auto
Definition: imp_encoder.h:133
int IMP_Encoder_GetMaxStreamCnt(int encChn, int *nrMaxStream)
Get bitstream buffer number.
uint32_t minQp
min Frame level Qp parameter,range:[0-maxQp]
Definition: imp_encoder.h:87
Define the gopsize parameter.
Definition: imp_encoder.h:346
int IMP_Encoder_InsertUserData(int encChn, void *userData, uint32_t userDataLen)
insert userdata
Define the H264E bitstream type.
Definition: imp_encoder.h:249
int IMP_Encoder_GetChnColor2Grey(int encChn, IMPEncoderColor2GreyCfg *pstColor2Grey)
get color to grey attribute
Define the denoise attribute of h264 channel.
Definition: imp_encoder.h:141
Unspecified.
Definition: imp_encoder.h:233
int IMP_Encoder_CreateChn(int encChn, const IMPEncoderCHNAttr *attr)
create encoding channel
uint32_t maxBitRate
max bitrate in one second, unit:kbps
Definition: imp_encoder.h:103
uint32_t qp
Frame level Qp parameter.
Definition: imp_encoder.h:79
int dnPQp
P slice quantization parameter.
Definition: imp_encoder.h:145
int IMP_Encoder_Query(int encChn, IMPEncoderCHNStat *stat)
query encode channel state
Coded slice data partition A.
Definition: imp_encoder.h:235
the idr frame in high skip frame reference mode
Definition: imp_encoder.h:177
int chroma_qp_index_offset
refer to H.264 prococol, system default value is 0; range:[-12, 12]
Definition: imp_encoder.h:401
CBR method.
Definition: imp_encoder.h:59
uint32_t gopQPStep
QP variation among GOPs.
Definition: imp_encoder.h:124
int IMP_Encoder_GetChnDenoise(int encChn, IMPEncoderAttrDenoise *pdenoiseAttr)
Get encode channel denoise attribute.
Define high skip frame type structure of h264 channel.
Definition: imp_encoder.h:186
1 time (skip frame reference)
Definition: imp_encoder.h:167
uint32_t packCount
packet count related to one frame
Definition: imp_encoder.h:270
int IMP_Encoder_GetChnFrmRate(int encChn, IMPEncoderFrmRate *pstFps)
Get encode channel framerate controlled attribute.
int IMP_Encoder_GetChnHSkip(int encChn, IMPEncoderAttrHSkip *phSkipAttr)
Get encode channel high skip reference attribute.
int IMP_Encoder_SetH264TransCfg(int encChn, const IMPEncoderH264TransCfg *pstH264TransCfg)
Set H.264 encode channel transform and quantization attribute.
bool frameEnd
frame end mark
Definition: imp_encoder.h:261
EncFrmUsedMode
Define the input frame usage mode of h264 channel.
Definition: imp_encoder.h:151
IMPEncoderDataType dataType
bitstream nal unit type
Definition: imp_encoder.h:262
IMPEncoderH264NaluType h264Type
H264E stream NAL unit type code.
Definition: imp_encoder.h:250
uint32_t picHeight
frame height, shouldn't less than 16
Definition: imp_encoder.h:304
IMPEncoderAttrFrmUsed attrFrmUsed
input frame usage mode attribute
Definition: imp_encoder.h:223
IMPEncoderAttrDemask attrDemask
demask attribute
Definition: imp_encoder.h:224
int IMP_Encoder_SetChnAttrRcMode(int encChn, const IMPEncoderAttrRcMode *pstRcModeCfg)
Set encoding channel rate controller mode attribute(s)
uint32_t staticTime
bitstream statistic time, unit:second
Definition: imp_encoder.h:118
uint32_t maxQp
max Frame level Qp parameter,range:[0-51]
Definition: imp_encoder.h:86
uint32_t minQp
min encoder Quantization parameter,range:[0-maxQp]
Definition: imp_encoder.h:101
uint32_t h
the height of crop region
Definition: imp_encoder.h:285
int IMP_Encoder_GetChnAttr(int encChn, IMPEncoderCHNAttr *const attr)
get encode channel attribute
uint32_t frmQPStep
Inter frames QP variation.
Definition: imp_encoder.h:123
the short base(p) frame in high skip frame reference mode
Definition: imp_encoder.h:179
int bEnableScenecut
is enable scenecut? 0: not, 1: yes, only effect to H1M Skip type
Definition: imp_encoder.h:191
Define frame bitstream packet structure.
Definition: imp_encoder.h:256
int IMP_Encoder_RegisterChn(int encGroup, int encChn)
register encode channel to Group
bool registered
registered to group variable, 0:no,1:yes
Definition: imp_encoder.h:321
bool user_ql_en
0:use default quantization table; 1:use user's quantization table
Definition: imp_encoder.h:408
uint32_t maxQp
max encoder Quantization parameter,range:[0-51]
Definition: imp_encoder.h:100
IMPSkipType
Definition: imp_encoder.h:166
Define the demask attribute of h264 channel, it is suggested not to use it.
Definition: imp_encoder.h:131
Picture parameter set.
Definition: imp_encoder.h:241
Define the channel ratecontroller mode attribute.
Definition: imp_encoder.h:206
uint32_t u32Index
ROI region index value,range:[0-7].
Definition: imp_encoder.h:354
bool enable
whether enale/disable input frame usage mode
Definition: imp_encoder.h:161
target frame rate first
Definition: imp_encoder.h:376
Define insert user data attribute of h264 channel.
Definition: imp_encoder.h:291
high skip frame reference mode:1M close skip frame
Definition: imp_encoder.h:173
int IMP_Encoder_SetMaxStreamCnt(int encChn, int nrMaxStream)
Set bitstream buffer number.
int IMP_Encoder_StartRecvPic(int encChn)
start encode channel to receive frames
4 times (skip frame reference)
Definition: imp_encoder.h:169
int IMP_Encoder_SetMbRC(int encChn, int bEnable)
set whether open mb ratecontrol or not
IMP Rectangle area information.
Definition: imp_common.h:160
int IMP_Encoder_SetSuperFrameCfg(int encChn, const IMPEncoderSuperFrmCfg *pstSuperFrmParam)
Set video coded supper frame configuration.
int IMP_Encoder_SetFisheyeEnableStatus(int encChn, int enable)
set enabled status of ingenic fisheye correction algorithm
uint32_t maxUserDataCnt
User's Maximum number of insert data cache, range:0-2.
Definition: imp_encoder.h:292