summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoratmos4 <atmos4@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-02-20 22:45:00 +0000
committeratmos4 <atmos4@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-02-20 22:45:00 +0000
commit14d11ff0fc40fdfa705ab9348fcd99eba0c245ef (patch)
tree3c1fff48528f1555bf979eb2307eb78d554fcbca
parent8337d9c26faa3966da2d558cf6912ea51a3128c2 (diff)
downloadmpv-14d11ff0fc40fdfa705ab9348fcd99eba0c245ef.tar.bz2
mpv-14d11ff0fc40fdfa705ab9348fcd99eba0c245ef.tar.xz
Patch: Improved raw encoding support in mencoder by Fredrik Kuivinen
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4775 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--etc/codecs.conf2
-rw-r--r--libmpdemux/video.c17
2 files changed, 17 insertions, 2 deletions
diff --git a/etc/codecs.conf b/etc/codecs.conf
index 6f63020b35..f52ec0d285 100644
--- a/etc/codecs.conf
+++ b/etc/codecs.conf
@@ -861,6 +861,7 @@ videocodec rawbgr24
driver raw
format 0x0
format 0x20776172
+ format 0x42475218
out BGR24 flip
videocodec rawbgr15
@@ -869,6 +870,7 @@ videocodec rawbgr15
driver raw
format 0x0
format 0x20776172
+ format 0x4247520F
out BGR15 flip
videocodec null
diff --git a/libmpdemux/video.c b/libmpdemux/video.c
index 91253a80a1..07697dcef4 100644
--- a/libmpdemux/video.c
+++ b/libmpdemux/video.c
@@ -19,6 +19,9 @@
#include "parse_es.h"
#include "mpeg_hdr.h"
+/* biCompression constant */
+#define BI_RGB 0L
+
static mp_mpeg_header_t picture;
int video_read_properties(sh_video_t *sh_video){
@@ -28,8 +31,18 @@ demux_stream_t *d_video=sh_video->ds;
switch(d_video->demuxer->file_format){
case DEMUXER_TYPE_AVI:
case DEMUXER_TYPE_ASF: {
- // display info:
- sh_video->format=sh_video->bih->biCompression;
+ // display info:
+
+ if(sh_video->bih->biCompression == BI_RGB &&
+ (sh_video->video.fccHandler == mmioFOURCC('D', 'I', 'B', ' ') ||
+ sh_video->video.fccHandler == mmioFOURCC('R', 'G', 'B', ' ') ||
+ sh_video->video.fccHandler == mmioFOURCC('R', 'A', 'W', ' ') ||
+ sh_video->video.fccHandler == 0)) {
+ sh_video->format = mmioFOURCC(0, 'R', 'G', 'B') | sh_video->bih->biBitCount;
+ }
+ else
+ sh_video->format=sh_video->bih->biCompression;
+
sh_video->disp_w=sh_video->bih->biWidth;
sh_video->disp_h=abs(sh_video->bih->biHeight);