#1341 closed defect (fixed)some variables with Flag suffix declared as other than Bool
Description
There are a few member variables that are named *Flag but not declared as Bool. For consistency these should be changed to type Bool and associated code should also be changed. For example, some code might use 1-fooFlag. Change History (7)comment:1 Changed 10 years ago by DefaultCC Plugin
comment:2 Changed 10 years ago by ksuehringcomment:3 Changed 10 years ago by dthoang
You did a thorough search.
I only found two instances of local variables in TDecCAVLC.cpp with the same name.
UInt subLayerOrderingInfoPresentFlag; comment:4 Changed 10 years ago by ksuehring
The problem with these is that xReadFlag() and xWriteFlag() expect a UInt parameter. For writing it should not be a big problem to change that to Bool, but for reading we usually read into a local temporary variable (parameter by reference).
In many places a UInt variable is used for both flags and values. This would require to introduce another Bool variable for flags, and using it whenever a flag is read.
Another option would be to make the xRead*() functions return the read value, so that local variables could be completely avoided. But that would also mean changing all HLS code, which I don't think is desirable.
Maybe it's easier to just keep these two temporary variables. comment:5 Changed 10 years ago by dthoang
Agreed. comment:6 Changed 10 years ago by ksuehring
Closing as fixed comment:7 Changed 10 years ago by ksuehring
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
|
r4180 I have committed the ones that I found using a simple search on the code and which were not critical
Please point to other occurrences, which you think are important, and/or provide cleanup patches based on HM-dev.
I will close the ticket as fixed, if there is no further response.