summaryrefslogtreecommitdiffstats
path: root/video/mp_image.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2020-05-17 14:57:13 +0200
committerwm4 <wm4@nowhere>2020-05-18 01:54:59 +0200
commitcaee8748da5c25b928f699bfa9f1ac4a5f3ae0ce (patch)
tree492d46f6ab40eee4c5b3e17b3666d21843db4166 /video/mp_image.h
parent00ac63c37b18ef3e7fbe5c227eb10073b264a26a (diff)
downloadmpv-caee8748da5c25b928f699bfa9f1ac4a5f3ae0ce.tar.bz2
mpv-caee8748da5c25b928f699bfa9f1ac4a5f3ae0ce.tar.xz
video: clean up some imgfmt related stuff
Remove the vaguely defined plane_bits and component_bits fields from struct mp_imgfmt_desc. Add weird replacements for existing uses. Remove the bytes[] field, replace uses with bpp[]. Fix some potential alignment issues in existing code. As a compromise, split mp_image_pixel_ptr() into 2 functions, because I think it's a bad idea to implicitly round, but for some callers being slightly less strict is convenient. This shouldn't really change anything. In fact, it's a 100% useless change. I'm just cleaning up what I started almost 8 years ago (see commit 00653a3eb052). With this I've decided to keep mp_imgfmt_desc, just removing the weird parts, and keeping the saner parts.
Diffstat (limited to 'video/mp_image.h')
-rw-r--r--video/mp_image.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/video/mp_image.h b/video/mp_image.h
index f111d35129..5b7eada496 100644
--- a/video/mp_image.h
+++ b/video/mp_image.h
@@ -186,6 +186,7 @@ void memset_pic(void *dst, int fill, int bytesPerLine, int height, int stride);
void memset16_pic(void *dst, int fill, int unitsPerLine, int height, int stride);
void *mp_image_pixel_ptr(struct mp_image *img, int plane, int x, int y);
+void *mp_image_pixel_ptr_ny(struct mp_image *img, int plane, int x, int y);
size_t mp_image_plane_bytes(struct mp_image *img, int plane, int x0, int w);
#endif /* MPLAYER_MP_IMAGE_H */