APTR handle = AllocVideoBitMap(int width, int height, ULONG flags, struct hwTagList *tags);
HWSDAFLAGS_DOUBLEBUFFERADAPTERflag accordingly. See Bitmap information for details.
Hollywood will pass a taglist which contains further parameters for the operation
AllocVideoBitMap(). Your implementation must be able to deal with the following
pDatamember of this tag item will be set to an object that should be used to initialize the video bitmap's pixels. This tag will always be provided because there is no way to set the video bitmap's pixel data at a later stage. That is why the pixel data for the video bitmap is already provided by Hollywood at allocation time. If the
HWAVBMFLAGS_BITMAPDATAflag is set, then
pDatawill contain a handle to another video bitmap. This means that the new video bitmap should copy all pixels from this video bitmap handle. It is guaranteed that the video bitmap handle provided here matches the size of the new video bitmap that is to be allocated. If
HWAVBMFLAGS_BITMAPDATAis not set, then
pDatacontains a pointer to a 32-bit ARGB pixel array that contains the raw pixels that should be used to initialize the new video bitmap. This 32-bit ARGB array will always be of the size
width * height * 4. No row padding is applied to this buffer.
HWAVBMTAG_MATRIX2Dtag is not passed, then the width value passed in parameter 1 is to be interpreted as a scaled value while the width passed in this tag's
iDatamember contains the width of the source pixel data that is passed in
HWAVBMTAG_DATA. This means that your implementation has to scale the source pixel data provided in
HWAVBMTAG_DATAto the dimensions passed in parameters 1 and 2. It also has to take the scale mode into account that is passed in
HWAVBMTAG_SCALEMODE. Hollywood uses this tag to offer hardware-accelerated scaling of video bitmaps. Please note that
HWAVBMTAG_SRCWIDTHwill only ever be passed to
AllocVideoBitMap()if your plugin has explicitly declared that it supports video bitmap scaling by setting the
HWAVBMTAG_MATRIX2Dare both passed, then you have to apply a transformation matrix to the source pixel data. See the documentation of
HWAVBMTAG_MATRIX2Dbelow for more information.
HWAVBMTAG_SRCWIDTH. See above for a description on what this tag is used for.
HWAVBM_MATRIX2Dare set, this tag will also be provided to tell you about the scale mode that Hollywood wants you to use. Currently, only 0 and 1 are supported here. A value of 0 in
iDatameans that you should do hard scaling without any interpolation whereas a value of 1 means that Hollywood wants you to do use anti-alias interpolation. See above in the description of
HWAVBM_SRCWIDTHfor more information.
HWAVBMTAG_DATAand store the transformation's resulting pixels in the new video bitmap that is to be allocated. Hollywood has already calculated the dimensions for the new video bitmap and passed them to this function in parameters 1 and 2. To get to know about the dimensions of the source pixel data, you have to examine the tags
HWAVBM_SRCHEIGHTwhich are always passed if
HWAVBMTAG_MATRIX2Dis set. The
pDatamember of this tag item will be set to a pointer to a
struct hwMatrix2Dthat contains all parameters for the transformation. Note that your implementation also has to take the scale mode that is passed in
HWAVBMTAG_SCALEMODEinto account. Hollywood uses this tag to offer hardware-accelerated transformation of video bitmaps. Please note that
HWAVBMTAG_MATRIX2Dwill only ever be passed to
AllocVideoBitMap()if your plugin has explicitly declared that it supports video bitmap transformation by setting the
HWSDAFLAGS_TIEDVIDEOBITMAPflag when installing your display adapter using hw_SetDisplayAdapter() then this tag will always be provided and its
pDatamember will be set to a handle to the display that this video bitmap should be allocated for. This will always be a handle returned by your OpenDisplay() implementation.
In addition to the taglist items described above, Hollywood can also set the following flags and your plugin has to be prepared to handle them:
HWAVBMTAG_DATAcontains alpha channel transparency information and your plugin is expected to do the alpha blending with this data whenever it draws this bitmap. Note that the alpha channel data is always non-premultiplied.
HWAVBMTAG_DATAis a handle to another video bitmap which Hollywood wants you to use as the pixel data source. If this flag isn't set, then
HWAVBMTAG_DATAcontains a pointer to a 32-bit ARGB pixel array. See the documentation of
HWAVBMTAG_DATAabove for more information.
SmoothScaletag has been set to
CopyBrush()commands, this flag will be set. (V8.0)
AllocVideoBitMap() is an optional API and must only be implemented if
has been passed to hw_SetDisplayAdapter(). See hw_SetDisplayAdapter for details.
NULLin case of an error