diff options
author | wm4 <wm4@nowhere> | 2014-06-14 10:03:04 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-06-14 10:03:04 +0200 |
commit | a9538e17ad8b66112239fab1b63c88de745d2134 (patch) | |
tree | 8d0072bf9f678604833330dfd0184ad836daf261 /video/img_format.c | |
parent | 6ab72f976035f094406584795f680d2de8761c2b (diff) | |
download | mpv-a9538e17ad8b66112239fab1b63c88de745d2134.tar.bz2 mpv-a9538e17ad8b66112239fab1b63c88de745d2134.tar.xz |
video: synchronize mpv rgb pixel format names with ffmpeg names
This affects packed RGB formats up to 16 bits per pixel. The old mplayer
names used LSB-to-MSB order, while FFmpeg (and some other libraries) use
MSB-to-LSB.
Nothing should change with this commit, i.e. no bit order or endian bugs
should be added or fixed. In some cases, the name stays the same, even
though the byte order changes, e.g. RGB8->BGR8 and BGR8->RGB8, and this
affects the user-visible names too; this might cause confusion.
Diffstat (limited to 'video/img_format.c')
-rw-r--r-- | video/img_format.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/video/img_format.c b/video/img_format.c index 3802e1b58e..0b20b92dfb 100644 --- a/video/img_format.c +++ b/video/img_format.c @@ -44,20 +44,6 @@ struct mp_imgfmt_entry { static const struct mp_imgfmt_entry mp_imgfmt_list[] = { // not in ffmpeg FMT("vdpau_output", IMGFMT_VDPAU_OUTPUT) - // these names are weirdly different from FFmpeg's - FMT_ENDIAN("rgb12", IMGFMT_RGB12) - FMT_ENDIAN("rgb15", IMGFMT_RGB15) - FMT_ENDIAN("rgb16", IMGFMT_RGB16) - FMT_ENDIAN("bgr12", IMGFMT_BGR12) - FMT_ENDIAN("bgr15", IMGFMT_BGR15) - FMT_ENDIAN("bgr16", IMGFMT_BGR16) - // the MPlayer derived names have components in reverse order - FMT("rgb8", IMGFMT_RGB8) - FMT("bgr8", IMGFMT_BGR8) - FMT("rgb4_byte", IMGFMT_RGB4_BYTE) - FMT("bgr4_byte", IMGFMT_BGR4_BYTE) - FMT("rgb4", IMGFMT_RGB4) - FMT("bgr4", IMGFMT_BGR4) // FFmpeg names have an annoying "_vld" suffix FMT("vda", IMGFMT_VDA) FMT("vaapi", IMGFMT_VAAPI) @@ -183,7 +169,7 @@ struct mp_imgfmt_desc mp_imgfmt_get_desc(int mpfmt) // Packed RGB formats are the only formats that have less than 8 bits per // component, and still require endian dependent access. if (pd->comp[0].depth_minus1 + 1 <= 8 && - !(mpfmt >= IMGFMT_RGB12_LE && mpfmt <= IMGFMT_BGR16_BE)) + !(mpfmt >= IMGFMT_RGB444_LE && mpfmt <= IMGFMT_BGR565_BE)) { desc.flags |= MP_IMGFLAG_LE | MP_IMGFLAG_BE; } else { |