opendlv icon indicating copy to clipboard operation
opendlv copied to clipboard

Fixing BPP from 24 to 3 to fix segfault in proxy-camera/memcpy

Open chrberger opened this issue 8 years ago • 8 comments

The configuration file needs to be adjusted by replacing 24 (assumed bits) with 3 (bytes representing the bytes per pixel):

  • https://github.com/chalmers-revere/opendlv/blob/experiment.idiada/config/configuration#L47
  • https://github.com/chalmers-revere/opendlv/blob/experiment.idiada/config/configuration#L60
  • https://github.com/chalmers-revere/opendlv/blob/experiment.idiada/config/configuration#L73
  • https://github.com/chalmers-revere/opendlv/blob/experiment.idiada/config/configuration#L86

Adjust detectvehicle by removing /8:

  • https://github.com/chalmers-revere/opendlv/blob/experiment.idiada/code/system/application/perception/src/detectvehicle/detectvehicle.cpp#L97

Activate mySharedImg.getBytesPerPixel():

  • https://github.com/chalmers-revere/opendlv/blob/experiment.idiada/code/system/application/perception/src/detectlane/detectlane.cpp#L89

chrberger avatar Apr 01 '16 18:04 chrberger

Doesn't 'bpp' really translate to "bits per pixel"?

olbender avatar Apr 12 '16 08:04 olbender

Is this solved?

bjornborg avatar Feb 03 '17 14:02 bjornborg

At least it's very old :) I do not remember the details, but things are working now so perhaps close?

olbender avatar Feb 06 '17 11:02 olbender

As far as I know, it's working but slight confusing if the bpp stands for bytes per pixel or bits per pixel.

bjornborg avatar Feb 06 '17 12:02 bjornborg

It should be "bits per pixel", I think it might be dangerous to mix this up. Bytes per pixel seems to be a quite odd format, we could perhaps write that as "bytesPerPixel" just to be clear. Perhaps we should also have "bpp" in the config, and then divide by 8 in the code.

olbender avatar Feb 06 '17 12:02 olbender

Actually by looking at https://github.com/chalmers-revere/opendlv.core/blob/master/code/core/system/proxy-camera-axis/src/Camera.cpp#L50 , it seems to be bytes per pixel... :) I hope we didn't mix this up hard...

bjornborg avatar Feb 06 '17 16:02 bjornborg

To use "setBytesPerPixel" is fine, but we should not use "BPP" since that could be confusing.

olbender avatar Feb 07 '17 08:02 olbender

@chrberger Should we do anything with this, or close it?

olbender avatar Mar 25 '17 18:03 olbender