Opened 11 years ago

Closed 10 years ago

#1042 closed defect (fixed)

defect of function initSigLastScan in TLibCommon/TComRom.cpp

Reported by: luofl1992 Owned by: Falei Luo
Priority: minor Milestone: HM-13.0
Component: HM Version: HM-10.0
Keywords: initSigLastScan, compiler diffs Cc: ndk-build, to, armeabi, fbossen, ksuehring, davidf, jct-vc@…

Description

When I was compiling the source files with ndk-buildhttp://developer.android.com/tools/sdk/ndk/index.html, I found a problem of function initSigLastScan in TCommon/TComRom.cpp by keeping logs.

  if( iWidth > 4 )
  {
    UInt uiNumBlkSide = iWidth >> 2;
    UInt uiNumBlks    = uiNumBlkSide * uiNumBlkSide;
// Uint log2Blk default(-1) + 1 -> 0, but it becomes 256 in my compiler.
// So I suggest that log2Blk's type be fixed as Char.
// My Android app broke down because of this.
    Char log2Blk      = g_aucConvertToBit[ uiNumBlkSide ] + 1;

Change History (5)

comment:1 Changed 11 years ago by DefaultCC Plugin

  • Cc fbossen ksuehring davidf jct-vc@… added

comment:2 Changed 11 years ago by luofl1992

And the codes in about line 410

while( iPrimDim >= 4 )   {
    iScndDim++;  iPrimDim--;
}

can be modified as

if ( iPrimDim > 3 ) {
    iScndDim += iPrimDim - 3;	iPrimDim = 3;
}

comment:3 Changed 11 years ago by luofl1992

Worrying about this problem would appear again, I suggested that the typedef of Char be revised as "typedef signed char Char;" in file "TLibCommon/Typedef.h".
At the same time, other typedefs like this was suggested to be added with signed, avoidding problems in platforms like ARM.

comment:4 Changed 11 years ago by ksuehring

Changing the Char typedef was suggested already in #206 to avoid problems on ARM. But we never got feedback on the suggestion.

Also changing the typedef causes loads of type conversion compile issues on Windows (tested with Visual Studio 2008). So changing this would require a larger patch.

comment:5 Changed 10 years ago by fbossen

  • Milestone changed from HM-10.1 to HM-13.0
  • Resolution set to fixed
  • Status changed from new to closed

Fixed in r3771

Note: See TracTickets for help on using tickets.

This list contains all users that will be notified about changes made to this ticket.

These roles will be notified: Reporter, Owner, Subscriber, Participant

  • David Flynn(Subscriber)
  • Falei Luo(Reporter, Participant)
  • Frank Bossen(Subscriber, Participant)
  • jct-vc@…(Subscriber)
  • karl.sharman@…(Always)
  • Karsten Suehring(Subscriber, Participant, Always)