diff options
author | wm4 <wm4@nowhere> | 2016-04-29 22:38:54 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-04-29 22:38:54 +0200 |
commit | bda111018c2440e0af70b462d24c757beb37b11f (patch) | |
tree | dbe1ecbeec1cbc5acf69dedbbf498e48fd636899 /video | |
parent | 0ed206abd94641ab44f4693169fbbbd8a33fa121 (diff) | |
download | mpv-bda111018c2440e0af70b462d24c757beb37b11f.tar.bz2 mpv-bda111018c2440e0af70b462d24c757beb37b11f.tar.xz |
video: add IMGFMT_P010 alias
Gets rid of some silliness, and might be useful in the future.
Diffstat (limited to 'video')
-rw-r--r-- | video/decode/d3d.c | 3 | ||||
-rw-r--r-- | video/fmt-conversion.c | 4 | ||||
-rw-r--r-- | video/img_format.h | 3 |
3 files changed, 8 insertions, 2 deletions
diff --git a/video/decode/d3d.c b/video/decode/d3d.c index f4dd9259f6..7a47ad2aa7 100644 --- a/video/decode/d3d.c +++ b/video/decode/d3d.c @@ -146,8 +146,7 @@ struct d3d_decoder_fmt d3d_select_decoder_mode( return fmt; int depth = IMGFMT_RGB_DEPTH(sw_img_fmt); - int p010 = mp_imgfmt_find(1, 1, 2, 10, MP_IMGFLAG_YUV_NV); - int mpfmt_decoded = depth <= 8 ? IMGFMT_NV12 : p010; + int mpfmt_decoded = depth <= 8 ? IMGFMT_NV12 : IMGFMT_P010; for (int i = 0; i < MP_ARRAY_SIZE(d3dva_modes); i++) { const struct d3dva_mode *mode = &d3dva_modes[i]; diff --git a/video/fmt-conversion.c b/video/fmt-conversion.c index 53342060b1..0a64bae83b 100644 --- a/video/fmt-conversion.c +++ b/video/fmt-conversion.c @@ -116,6 +116,10 @@ static const struct { {IMGFMT_MMAL, AV_PIX_FMT_MMAL}, #endif +#ifdef AV_PIX_FMT_P010 + {IMGFMT_P010, AV_PIX_FMT_P010}, +#endif + {0, AV_PIX_FMT_NONE} }; diff --git a/video/img_format.h b/video/img_format.h index 605dc920bd..73c06787b1 100644 --- a/video/img_format.h +++ b/video/img_format.h @@ -157,6 +157,9 @@ enum mp_imgfmt { IMGFMT_NV12, IMGFMT_NV21, + // Like IMGFMT_NV12, but with 16 bits per component + IMGFMT_P010, + // RGB/BGR Formats // Byte accessed (low address to high address) |