Skip to content

Commit 64edec4

Browse files
committed
lib: vc8000nanoe: fix build warnings
Fix build warnings. Signed-off-by: Hugues Fruchet <[email protected]>
1 parent 55d3dfa commit 64edec4

File tree

6 files changed

+8
-6
lines changed

6 files changed

+8
-6
lines changed

lib/vc8000nanoe/source/common/encasiccontroller_v2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ i32 EncAsicMemAlloc_V2(asicData_s * asic, u32 width, u32 height,
167167
regs->internalImageChrBaseR[0] = asic->internalImageChroma[1].busAddress;
168168

169169
/* Optional scaled image output */
170-
if(scaledWidth*scaledHeight) {
170+
if(scaledWidth*scaledHeight > 0) {
171171
if (EWLMallocRefFrm(asic->ewl, scaledWidth*scaledHeight*2,
172172
&asic->scaledImage) != EWL_OK)
173173
{

lib/vc8000nanoe/source/common/encpreprocess.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -410,8 +410,8 @@ void EncPreProcess(asicData_s * asic, preProcess_s * preProcess)
410410

411411
/* Scaling ratio for down-scaling, fixed point 1.16, calculate from
412412
rotated dimensions. */
413-
if (preProcess->scaledWidth*preProcess->scaledHeight &&
414-
preProcess->scaledOutput) {
413+
if ((preProcess->scaledWidth*preProcess->scaledHeight > 0) &&
414+
(preProcess->scaledOutput > 0)) {
415415
u32 width16 = (width+15)/16*16;
416416
u32 height16 = (height+15)/16*16;
417417

lib/vc8000nanoe/source/h264/H264CodeFrame.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ static i32 float2fixpoint8(float data)
174174
}
175175

176176
pow2 *= 2;
177-
base = 1.0/pow2;
177+
base = 1.0f/pow2;
178178

179179
}
180180
return result;

lib/vc8000nanoe/source/h264/H264EncApi.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3047,7 +3047,9 @@ void H264SupplyPrefixForSvctMutiSlice(H264EncInst inst, const H264EncIn *pEncIn,
30473047
/* 2.update H264EncOut pEncInst state. */
30483048
for(j = 0; j < num_prefix_to_supply; j++)
30493049
{
3050+
#if 0 /** PATCH: fix build warnings */
30503051
ASSERT(&pEncOut->pNaluSizeBuf[num_nalus - 1 + num_prefix_to_supply -j*2]);
3052+
#endif
30513053
pEncOut->pNaluSizeBuf[num_nalus-1+num_prefix_to_supply-j*2 ] = pEncOut->pNaluSizeBuf[num_nalus-1-j];
30523054
pEncOut->pNaluSizeBuf[num_nalus - 1 + num_prefix_to_supply - j*2 - 1] = prefix_length;
30533055
pEncOut->streamSize += prefix_length;

lib/vc8000nanoe/source/h264/H264Init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@ bool_e SetParameter(h264Instance_s *inst, const H264EncConfig *pEncCfg)
682682
inst->preProcess.scaledWidth = inst->preProcess.scaledHeight = 0;
683683

684684
inst->preProcess.scaledOutput =
685-
(inst->preProcess.scaledWidth * inst->preProcess.scaledHeight ? 1 : 0);
685+
((inst->preProcess.scaledWidth * inst->preProcess.scaledHeight > 0) ? 1 : 0);
686686
inst->preProcess.adaptiveRoi = 0;
687687
inst->preProcess.adaptiveRoiColor = 0;
688688
inst->preProcess.adaptiveRoiMotion = -5;

lib/vc8000nanoe/source/h264/H264RateControl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ FILE *fpRcTrc = NULL;
7878
#define INITIAL_BUFFER_FULLNESS 60 /* Decoder Buffer in procents */
7979
#define MIN_PIC_SIZE 50 /* Procents from picPerPic */
8080

81-
#define DIV(a, b) ((b) ? ((a) + (SIGN(a) * (b)) / 2) / (b) : (a))
81+
#define DIV(a, b) ((b > 0) ? ((a) + (SIGN(a) * (b)) / 2) / (b) : (a))
8282
#define DSCY 32 /* n * 32 */
8383
#define DSCBITPERMB 128 /* bitPerMb scaler */
8484
#define I32_MAX 2147483647 /* 2 ^ 31 - 1 */

0 commit comments

Comments
 (0)