Skip to content
Snippets Groups Projects

nav_types: make btni_t not packed

Open Steve Lhomme requested to merge robUx4/libdvdread:btni_t-unpacked into master
  1. Aug 22, 2022
    • Steve Lhomme's avatar
      nav_types: remove the trailing zeros from unpacked structures · b4a415c3
      Steve Lhomme authored
      They are not needed and waste space.
      
      We keep the known sizes in case we know what's inside someday.
      b4a415c3
    • Steve Lhomme's avatar
      nav_types: remove the packing of the other nav structures · 1e3da3a9
      Steve Lhomme authored
      Just like pci_t, dsi_t and its sub structures is read bit by bit, so we don't
      need the packing in memory. This could make the compiled code slightly more
      optimized.
      1e3da3a9
    • Steve Lhomme's avatar
      nav_types: make hli_t and pci_t not packed · a5702da2
      Steve Lhomme authored
      They depends on the packing of btni_t. Since btni_t is no longer packed, they
      cannot be packed anymore.
      
      This is not a problem as they are read bit by bit in navRead_PCI().
      a5702da2
    • Steve Lhomme's avatar
      nav_types: make btin_t not packed · 76a4ad6d
      Steve Lhomme authored
      The use of bitfields of 10 bits makes the use of `unsigned char` impossible.
      That means the compiler might use more bits than expected for the 4*12 bits.
      This is the case with MS-compatible compilers. We cannot guarantee that the
      btin_t will use the same 10 octets as used in the binary blob.
      
      In the end btin_t is not read as a packed structure but bit by bit in
      navRead_PCI().
      76a4ad6d
Loading