hi_osd

Description

OSD parameter.

Prototype

hi_osd = {"rect": hi_rect,
          "pixel_format": hi_pixel_format,
          "picture_address": picture_address,
          "stride": stride,
          "bg_alpha": bg_alpha,
          "fg_alpha": fg_alpha,
          "osd_inverted_color": hi_osd_inverted_color}

Members

Member

Description

rect

Dictionary, OSD region coordinates.

pixel_format

Int, OSD image format.

The following formats are supported:

HI_PIXEL_FORMAT_ARGB_8888 = 14,    // ARGB8888
HI_PIXEL_FORMAT_ARGB_1555 = 33,    // ARGB1555 A:1bit R:5bit G:6bit B:5bit
HI_PIXEL_FORMAT_ARGB_4444 = 25,    //ARGB4444 A:4bit R:4bit G:4bit B:4bit
HI_PIXEL_FORMAT_ARGB_CLUT2 = 41,   // ARGB Color Lookup Table 2bit
HI_PIXEL_FORMAT_ARGB_CLUT4 = 42,     // ARGB Color Lookup Table 4bit

picture_address

Int, OSD image address.

stride

Int, OSD image stride.

  • For the HI_PIXEL_FORMAT_ARGB_8888 format, the stride value is four times of rect["width"].
  • For the HI_PIXEL_FORMAT_ARGB_1555 or HI_PIXEL_FORMAT_ARGB_4444 format, the value of stride is twice the value of rect["width"].
  • For the HI_PIXEL_FORMAT_ARGB_CLUT2 format, the stride value is one fourth of rect["width"].
  • For the HI_PIXEL_FORMAT_ARGB_CLUT4 format, the stride value is half of rect["width"].

bg_alpha

Int, background alpha.

Value range: [0, 255]

This parameter is mandatory only when the OSD image format is HI_PIXEL_FORMAT_ARGB_1555.

fg_alpha

Int, foreground alpha.

Value range: [0, 255]

This parameter is mandatory only when the OSD image format is HI_PIXEL_FORMAT_ARGB_1555.

osd_inverted_color

Int, color inversion type.