diff options
author | wm4 <wm4@nowhere> | 2012-10-03 18:25:41 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-10-16 07:26:31 +0200 |
commit | cadff3eec75bdd81fb0d18cd0ac029faa3c318d2 (patch) | |
tree | c48914d7a76984db394117c364b8660088181c41 /libvo/bitmap_packer.h | |
parent | 8f8f6e6d9d27eef37640b363214a775647a0f2f4 (diff) | |
download | mpv-cadff3eec75bdd81fb0d18cd0ac029faa3c318d2.tar.bz2 mpv-cadff3eec75bdd81fb0d18cd0ac029faa3c318d2.tar.xz |
vo_gl3: move OSD code to gl_osd.c
Other OpenGL-using VOs can use this.
gl_osd.c includes some code for vo_gl.c. The next commit actually
makes use of it.
Diffstat (limited to 'libvo/bitmap_packer.h')
-rw-r--r-- | libvo/bitmap_packer.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libvo/bitmap_packer.h b/libvo/bitmap_packer.h index 99c7b514b4..b86c3ec4f9 100644 --- a/libvo/bitmap_packer.h +++ b/libvo/bitmap_packer.h @@ -43,6 +43,7 @@ void packer_set_size(struct bitmap_packer *packer, int size); * Write input sizes in packer->in. * Resulting packing will be written in packer->result. * w and h will be increased if necessary for successful packing. + * There is a strong guarantee that w and h will be powers of 2 (or set to 0). * Return value is -1 if packing failed because w and h were set to max * values but that wasn't enough, 1 if w or h was increased, and 0 otherwise. */ @@ -55,4 +56,13 @@ int packer_pack(struct bitmap_packer *packer); int packer_pack_from_subbitmaps(struct bitmap_packer *packer, struct sub_bitmaps *b); +// Copy the (already packed) sub-bitmaps from b to the image in data. +// data must point to an image that is at least (packer->w, packer->h) big. +// The image has the given stride (bytes between (x, y) to (x, y + 1)), and the +// pixel format used by both the sub-bitmaps and the image uses pixel_stride +// bytes per pixel (bytes between (x, y) to (x + 1, y)). +// If packer->padding is set, the padding borders are cleared with 0. +void packer_copy_subbitmaps(struct bitmap_packer *packer, struct sub_bitmaps *b, + void *data, int pixel_stride, int stride); + #endif |