diff options
author | wm4 <wm4@nowhere> | 2020-04-21 22:56:45 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2020-04-23 13:24:35 +0200 |
commit | 7cb83593c2a032e91f82a90d0a9de8cf4d0fb158 (patch) | |
tree | df0b9ef5c444acc4372877062dd0521d49bded09 /video/img_format.h | |
parent | 90737ec77d71ff9adbb953ac47f3d6b797bddf54 (diff) | |
download | mpv-7cb83593c2a032e91f82a90d0a9de8cf4d0fb158.tar.bz2 mpv-7cb83593c2a032e91f82a90d0a9de8cf4d0fb158.tar.xz |
img_format: add format description table for mpv-only formats
Make this slightly less ad-hoc. Also correct the missing alpha flag for
yap8/yap16.
Despite reduced redundancy, the LOC is going up anyway... whatever.
Diffstat (limited to 'video/img_format.h')
-rw-r--r-- | video/img_format.h | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/video/img_format.h b/video/img_format.h index b5f42148ad..4080e2f2fb 100644 --- a/video/img_format.h +++ b/video/img_format.h @@ -155,10 +155,6 @@ enum mp_imgfmt { IMGFMT_Y8, IMGFMT_Y16, - // Planar gray/alpha. - IMGFMT_YAP8, - IMGFMT_YAP16, - // Packed YUV formats (components are byte-accessed) IMGFMT_UYVY, // U Y0 V Y1 @@ -190,27 +186,37 @@ enum mp_imgfmt { // Accessed with bit-shifts after endian-swapping the uint16_t pixel IMGFMT_RGB565, // 5r 6g 5b (MSB to LSB) - // Accessed with bit-shifts, uint32_t units. - IMGFMT_RGB30, // 2pad 10r 10g 10b (MSG to LSB) - // AV_PIX_FMT_PAL8 IMGFMT_PAL8, // Hardware accelerated formats. Plane data points to special data // structures, instead of pixel data. IMGFMT_VDPAU, // VdpVideoSurface - IMGFMT_VDPAU_OUTPUT, // VdpOutputSurface - IMGFMT_VAAPI, // plane 0: ID3D11Texture2D // plane 1: slice index casted to pointer IMGFMT_D3D11, IMGFMT_DXVA2, // IDirect3DSurface9 (NV12/P010/P016) IMGFMT_MMAL, // MMAL_BUFFER_HEADER_T - IMGFMT_VIDEOTOOLBOX, // CVPixelBufferRef IMGFMT_MEDIACODEC, // AVMediaCodecBuffer IMGFMT_DRMPRIME, // AVDRMFrameDescriptor IMGFMT_CUDA, // CUDA Buffer + // Not an actual format; base for mpv-specific descriptor table. + // Some may still map to AV_PIX_FMT_*. + IMGFMT_CUST_BASE, + + // Planar gray/alpha. + IMGFMT_YAP8, + IMGFMT_YAP16, + + // Accessed with bit-shifts, uint32_t units. + IMGFMT_RGB30, // 2pad 10r 10g 10b (MSG to LSB) + + // Hardware accelerated formats (again). + IMGFMT_VDPAU_OUTPUT, // VdpOutputSurface + IMGFMT_VAAPI, + IMGFMT_VIDEOTOOLBOX, // CVPixelBufferRef + // Generic pass-through of AV_PIX_FMT_*. Used for formats which don't have // a corresponding IMGFMT_ value. IMGFMT_AVPIXFMT_START, |