Opened 10 years ago

Closed 9 years ago

Last modified 9 years ago

#1341 closed defect (fixed)

some variables with Flag suffix declared as other than Bool

Reported by: dthoang Owned by:
Priority: trivial Milestone: HM-16.3
Component: HM Version: HM-16.2
Keywords: Cc: ksuehring, davidf, karlsharman, jct-vc@…

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

  • Cc ksuehring davidf karlsharman jct-vc@… added

comment:2 Changed 10 years ago by ksuehring

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.

comment: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 9 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 9 years ago by dthoang

Agreed.

comment:6 Changed 9 years ago by ksuehring

  • Resolution set to fixed
  • Status changed from new to closed

Closing as fixed

comment:7 Changed 9 years ago by ksuehring

  • Milestone set to HM-16.3
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)
  • Dzung Hoang(Reporter, Participant)
  • jct-vc@…(Subscriber)
  • Karl Sharman(Subscriber)
  • karl.sharman@…(Always)
  • Karsten Suehring(Subscriber, Participant, Always)