[MPlayer-dev-eng] unneded? hack on vd_raw makes rgb16 fail [PATCH]
Reynaldo H. Verdejo Pinochet
reynaldo at opendot.cl
Sun Oct 22 08:53:16 CEST 2006
On Sat, Oct 14, 2006 at 01:50:58PM -0400, Reynaldo H. Verdejo Pinochet wrote:
> Need some help here, turns out that this line on vd_raw.c:
>
> // workaround bitcount==16 => bgr15 case for avi files:
> case 16:
> sh->bih->biCompression=(sh->format)?IMGFMT_BGR16:IMGFMT_BGR15;
> break;
>
> makes the lavf mtv demuxer unusable with mplayer, data (usually
> 16bpp rgb) gets treated as bgr15, is that correct? doesnt
> this hack (if needed) belongs to demux_avi ratter than vd_raw?
>
> I havent checked througly but i can imagine this is not only an rgb565
> on mtv issue but a more general one. On libavcodec's raw demuxer
> PIX_FMT for rgb colorspace gets chosen by looking at the bpp value,
> there is no codec_tag/id for those (!sh->format) so either that hack
> gets reworked or i dont see how raw rgb16 data passed to libmpcodec's
> vd_raw trough ffmpeg's libavformat could posibly work.
>
Im here proposing the idea of simply remove this hack, patch attached
, id happily (not really true) work on a cleaner fix ON THE AVI DEMUXER
if this turns out to be needed for some (weird) sample out there and
if and once someone provide such material.
going to commit unless someone has good reasons to do otherwise and
a sample thats worth the ugly hack herein discussed.
Best regards
Reynaldo
-------------- next part --------------
Index: libmpcodecs/vd_raw.c
===================================================================
--- libmpcodecs/vd_raw.c (revision 20332)
+++ libmpcodecs/vd_raw.c (working copy)
@@ -35,8 +35,7 @@
case 4: sh->bih->biCompression=IMGFMT_BGR4; break;
case 8: sh->bih->biCompression=IMGFMT_BGR8; break;
case 15: sh->bih->biCompression=IMGFMT_BGR15; break;
- // workaround bitcount==16 => bgr15 case for avi files:
- case 16: sh->bih->biCompression=(sh->format)?IMGFMT_BGR16:IMGFMT_BGR15; break;
+ case 16: sh->bih->biCompression=IMGFMT_BGR16; break;
case 24: sh->bih->biCompression=IMGFMT_BGR24; break;
case 32: sh->bih->biCompression=IMGFMT_BGR32; break;
default:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20061022/388d5a0c/attachment.pgp>
More information about the MPlayer-dev-eng
mailing list