Repository: xbmc/xbmc
File: xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodec.h (C/C++)

Code before:
  AVColorSpace color_space;
  unsigned int color_range        : 1;  //< 1 indicate if we have a full range of color
  AVChromaLocation chroma_position;
  AVColorPrimaries color_primaries; // heuristics applied when original is AVCOL_PRI_UNSPECIFIED
  AVColorPrimaries m_originalColorPrimaries;
  AVColorTransferCharacteristic color_transfer;
  unsigned int colorBits = 8;
  std::string stereoMode;

  int8_t* qp_table;                //< Quantization parameters, primarily used by filters
  int qstride;
  int qscale_type;
  int pict_type;

  StreamHdrType hdrType;

  bool hasDisplayMetadata = false;
  AVMasteringDisplayMetadata displayMetadata;
  bool hasLightMetadata = false;
  AVContentLightMetadata lightMetadata;

  AVPixelFormat pixelFormat; //< source pixel format

  unsigned int iWidth;
  unsigned int iHeight;
  unsigned int xOffset = {0};
  unsigned int yOffset = {0};
  unsigned int iDisplayWidth;           //< width of the picture without black bars
  unsigned int iDisplayHeight;          //< height of the picture without black bars

private:
  VideoPicture(VideoPicture const&);
  VideoPicture& operator=(VideoPicture const&);
};

#define DVP_FLAG_TOP_FIELD_FIRST    0x00000001
#define DVP_FLAG_REPEAT_TOP_FIELD   0x00000002  //< Set to indicate that the top field should be repeated
#define DVP_FLAG_INTERLACED         0x00000008  //< Set to indicate that this frame is interlaced
#define DVP_FLAG_DROPPED            0x00000010  //< indicate that this picture has been dropped in decoder stage, will have no data

#define DVD_CODEC_CTRL_SKIPDEINT    0x01000000  //< request to skip a deinterlacing cycle, if possible
#define DVD_CODEC_CTRL_NO_POSTPROC  0x02000000  //< see GetCodecStats
#define DVD_CODEC_CTRL_HURRY        0x04000000  //< see GetCodecStats
#define DVD_CODEC_CTRL_DROP         0x08000000  //< drop in decoder or set DVP_FLAG_DROPPED, no render of frame
#define DVD_CODEC_CTRL_DROP_ANY     0x10000000  //< drop some non-reference frame
#define DVD_CODEC_CTRL_DRAIN        0x20000000  //< squeeze out pictured without feeding new packets
#define DVD_CODEC_CTRL_ROTATE       0x40000000  //< rotate if renderer does not support it

// DVP_FLAG 0x00000100 - 0x00000f00 is in use by libmpeg2!

#define DVP_QSCALE_UNKNOWN          0

Review comment (suggestion):
I know this is annoying as hell but current code guidelines specify `m_` prefix for members and different default initialisation scheme. Should be:

```
unsigned int m_xOffset{0};
unsigned int m_yOffset{0};
```

Unfortunately not all the time it is easy/possible to infer the style from the current codebase as we carry a lot of legacy code done before the guidelines have been published.
Sorry and hopefully this doesn't push you back since this kind of monkey work it's far from fun.

Code after:
  AVColorSpace color_space;
  unsigned int color_range        : 1;  //< 1 indicate if we have a full range of color
  AVChromaLocation chroma_position;
  AVColorPrimaries color_primaries; // heuristics applied when original is AVCOL_PRI_UNSPECIFIED
  AVColorPrimaries m_originalColorPrimaries;
  AVColorTransferCharacteristic color_transfer;
  unsigned int colorBits = 8;
  std::string stereoMode;

  int8_t* qp_table;                //< Quantization parameters, primarily used by filters
  int qstride;
  int qscale_type;
  int pict_type;

  StreamHdrType hdrType;

  bool hasDisplayMetadata = false;
  AVMasteringDisplayMetadata displayMetadata;
  bool hasLightMetadata = false;
  AVContentLightMetadata lightMetadata;

  AVPixelFormat pixelFormat; //< source pixel format

  unsigned int iWidth;
  unsigned int iHeight;
  unsigned int m_xOffset{0};
  unsigned int m_yOffset{0};
  unsigned int iDisplayWidth;           //< width of the picture without black bars
  unsigned int iDisplayHeight;          //< height of the picture without black bars

private:
  VideoPicture(VideoPicture const&);
  VideoPicture& operator=(VideoPicture const&);
};

#define DVP_FLAG_TOP_FIELD_FIRST    0x00000001
#define DVP_FLAG_REPEAT_TOP_FIELD   0x00000002  //< Set to indicate that the top field should be repeated
#define DVP_FLAG_INTERLACED         0x00000008  //< Set to indicate that this frame is interlaced
#define DVP_FLAG_DROPPED            0x00000010  //< indicate that this picture has been dropped in decoder stage, will have no data

#define DVD_CODEC_CTRL_SKIPDEINT    0x01000000  //< request to skip a deinterlacing cycle, if possible
#define DVD_CODEC_CTRL_NO_POSTPROC  0x02000000  //< see GetCodecStats
#define DVD_CODEC_CTRL_HURRY        0x04000000  //< see GetCodecStats
#define DVD_CODEC_CTRL_DROP         0x08000000  //< drop in decoder or set DVP_FLAG_DROPPED, no render of frame
#define DVD_CODEC_CTRL_DROP_ANY     0x10000000  //< drop some non-reference frame
#define DVD_CODEC_CTRL_DRAIN        0x20000000  //< squeeze out pictured without feeding new packets
#define DVD_CODEC_CTRL_ROTATE       0x40000000  //< rotate if renderer does not support it

// DVP_FLAG 0x00000100 - 0x00000f00 is in use by libmpeg2!

#define DVP_QSCALE_UNKNOWN          0