diff options
author | Uoti Urpala <uau@mplayer2.org> | 2011-06-29 11:39:06 +0300 |
---|---|---|
committer | Uoti Urpala <uau@mplayer2.org> | 2011-06-29 11:39:06 +0300 |
commit | a77e5f07ed513233314c18f3e45490fdfa11f6ba (patch) | |
tree | a369f5e54f1b91729712272f1f73ad3f0e7d7d66 | |
parent | 9caae9b385a6de3f4dae98bebb1be64a997c1472 (diff) | |
parent | 27b88a09c5319deb62221b8cd0ecc14cd1136e4a (diff) | |
download | mpv-a77e5f07ed513233314c18f3e45490fdfa11f6ba.tar.bz2 mpv-a77e5f07ed513233314c18f3e45490fdfa11f6ba.tar.xz |
Merge branch 'mplayer1_changes'
-rw-r--r-- | DOCS/man/en/mplayer.1 | 8 | ||||
-rw-r--r-- | command.c | 1 | ||||
-rwxr-xr-x | configure | 15 | ||||
-rw-r--r-- | etc/codecs.conf | 16 | ||||
-rw-r--r-- | input/input.c | 20 | ||||
-rw-r--r-- | input/keycodes.h | 24 | ||||
-rw-r--r-- | libao2/ao_pcm.c | 1 | ||||
-rw-r--r-- | libmpcodecs/img_format.c | 89 | ||||
-rw-r--r-- | libmpcodecs/img_format.h | 3 | ||||
-rw-r--r-- | libmpcodecs/mp_image.c | 4 | ||||
-rw-r--r-- | libmpcodecs/vd_ffmpeg.c | 5 | ||||
-rw-r--r-- | libmpcodecs/vf_sab.c | 2 | ||||
-rw-r--r-- | libmpcodecs/vf_smartblur.c | 2 | ||||
-rw-r--r-- | libmpdemux/aviheader.c | 2 | ||||
-rw-r--r-- | libmpdemux/demux_ts.c | 11 | ||||
-rw-r--r-- | libmpdemux/mpeg_hdr.c | 9 | ||||
-rw-r--r-- | libvo/gl_common.c | 6 | ||||
-rw-r--r-- | libvo/gl_common.h | 3 | ||||
-rw-r--r-- | libvo/vo_dfbmga.c | 4 | ||||
-rw-r--r-- | libvo/vo_directfb2.c | 4 | ||||
-rw-r--r-- | libvo/vo_gl.c | 18 | ||||
-rw-r--r-- | libvo/vo_gl2.c | 12 | ||||
-rw-r--r-- | mplayer.c | 11 | ||||
-rw-r--r-- | playtree.c | 9 | ||||
-rw-r--r-- | stream/cache2.c | 14 | ||||
-rw-r--r-- | stream/stream.c | 13 | ||||
-rw-r--r-- | stream/stream_cddb.c | 1 | ||||
-rw-r--r-- | stream/vcd_read_darwin.h | 2 | ||||
-rw-r--r-- | stream/vcd_read_fbsd.h | 2 | ||||
-rw-r--r-- | stream/vcd_read_os2.h | 2 | ||||
-rw-r--r-- | stream/vcd_read_win32.h | 2 | ||||
-rw-r--r-- | sub/subreader.c | 2 |
32 files changed, 209 insertions, 108 deletions
diff --git a/DOCS/man/en/mplayer.1 b/DOCS/man/en/mplayer.1 index dc9a936632..afb12a8027 100644 --- a/DOCS/man/en/mplayer.1 +++ b/DOCS/man/en/mplayer.1 @@ -178,21 +178,21 @@ See the \-input option for ways to customize it. .B keyboard control .PD 0 .RS -.IPs "<\- and \->" +.IPs "LEFT and RIGHT" Seek backward/\:forward 10 seconds. Shift+arrow does a 1 second exact seek (see \-hr\-seek; currently modifier keys like shift only work if used in an X output window). -.IPs "up and down" +.IPs "UP and DOWN" Seek forward/\:backward 1 minute. Shift+arrow does a 5 second exact seek (see \-hr\-seek; currently modifier keys like shift only work if used in an X output window). -.IPs "pgup and pgdown" +.IPs "PGUP and PGDWN" Seek forward/\:backward 10 minutes. .IPs "[ and ]" Decrease/increase current playback speed by 10%. .IPs "{ and }" Halve/double current playback speed. -.IPs "backspace" +.IPs "BACKSPACE" Reset playback speed to normal. .IPs "< and >" Go backward/\:forward in the playlist. @@ -49,6 +49,7 @@ #include "libmpcodecs/dec_video.h" #include "libmpcodecs/dec_audio.h" #include "libmpcodecs/dec_teletext.h" +#include "osdep/strsep.h" #include "sub/vobsub.h" #include "sub/spudec.h" #include "path.h" @@ -3445,7 +3445,8 @@ echores "$_vsscanf" echocheck "swab()" _swab=no -define_statement_check "_XOPEN_SOURCE 600" "unistd.h" 'int a, b; swab(&a, &b, 0)' && _swab=yes +define_statement_check "_XOPEN_SOURCE 600" "unistd.h" 'int a, b; swab(&a, &b, 0)' || + statement_check "string.h" 'int a, b; swab(&a, &b, 0)' && _swab=yes if test "$_swab" = yes ; then def_swab='#define HAVE_SWAB 1' need_swab=no @@ -3849,8 +3850,6 @@ else def_x11='#undef CONFIG_X11' novomodules="x11 $novomodules" res_comment="check if the dev(el) packages are installed" - # disable stuff that depends on X - _xv=no ; _xinerama=no ; _vm=no ; _xf86keysym=no ; _vdpau=no fi echores "$_x11" @@ -3898,7 +3897,7 @@ fi echocheck "Xv" -if test "$_xv" = auto ; then +if test "$_xv" = auto && test "$_x11" = yes ; then _xv=no statement_check_broken X11/Xlib.h X11/extensions/Xvlib.h 'XvGetPortAttribute(0, 0, 0, 0)' -lXv && _xv=yes fi @@ -3915,7 +3914,7 @@ echores "$_xv" echocheck "VDPAU" -if test "$_vdpau" = auto ; then +if test "$_vdpau" = auto && test "$_x11" = yes ; then _vdpau=no if test "$_dl" = yes ; then return_statement_check vdpau/vdpau_x11.h 'vdp_device_create_x11(0, 0, 0, 0)' VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L1 -lvdpau && _vdpau=yes @@ -3933,7 +3932,7 @@ echores "$_vdpau" echocheck "Xinerama" -if test "$_xinerama" = auto ; then +if test "$_xinerama" = auto && test "$_x11" = yes ; then _xinerama=no statement_check X11/extensions/Xinerama.h 'XineramaIsActive(0)' -lXinerama && _xinerama=yes fi @@ -3953,7 +3952,7 @@ echores "$_xinerama" # This check may be useful for future mplayer versions (to change resolution) # If you run into problems, remove '-lXxf86vm'. echocheck "Xxf86vm" -if test "$_vm" = auto ; then +if test "$_vm" = auto && test "$_x11" = yes ; then _vm=no statement_check_broken X11/Xlib.h X11/extensions/xf86vmode.h 'XF86VidModeQueryExtension(0, 0, 0)' -lXxf86vm && _vm=yes fi @@ -3970,7 +3969,7 @@ echores "$_vm" # has nothing to do with xf86vm and XFree 3.x has xf86vm but does NOT # have these new keycodes. echocheck "XF86keysym" -if test "$_xf86keysym" = auto; then +if test "$_xf86keysym" = auto && test "$_x11" = yes ; then _xf86keysym=no return_check X11/XF86keysym.h XF86XK_AudioPause && _xf86keysym=yes fi diff --git a/etc/codecs.conf b/etc/codecs.conf index d5d3d3b9ac..528950723f 100644 --- a/etc/codecs.conf +++ b/etc/codecs.conf @@ -150,6 +150,13 @@ videocodec ffr210 driver ffmpeg dll "r210" +videocodec ffr10k + info "FFmpeg R10k - 10-bit RGB" + status working + fourcc R10k,R10g + driver ffmpeg + dll "r10k" + videocodec blackmagic info "Blackmagic 10-bit" status working @@ -3236,6 +3243,7 @@ videocodec rawyuy2 fourcc YUNV YUY2 fourcc VYUY YUY2 fourcc yuvs YUY2 + fourcc DVOO YUY2 out YUY2 videocodec rawyuv2 @@ -3359,6 +3367,7 @@ videocodec ffrawyuy2 fourcc YUNV,yunv fourcc VYUY,vyuy fourcc yuvs,YUVS + fourcc DVOO driver ffmpeg dll rawvideo @@ -4379,6 +4388,13 @@ audiocodec ffpcmlxf driver ffmpeg dll pcm_lxf +audiocodec ffs302m + info "SMPTE 302M" + status working + fourcc BSSD + driver ffmpeg + dll s302m + ; add every new fourcc also to allocate_parser() ; in libmpdemux/demuxer.c audiocodec ffac3 diff --git a/input/input.c b/input/input.c index b9c51f14e9..94c15f42bb 100644 --- a/input/input.c +++ b/input/input.c @@ -277,6 +277,16 @@ static const mp_key_name_t key_names[] = { { MOUSE_BTN7, "MOUSE_BTN7" }, { MOUSE_BTN8, "MOUSE_BTN8" }, { MOUSE_BTN9, "MOUSE_BTN9" }, + { MOUSE_BTN10, "MOUSE_BTN10" }, + { MOUSE_BTN11, "MOUSE_BTN11" }, + { MOUSE_BTN12, "MOUSE_BTN12" }, + { MOUSE_BTN13, "MOUSE_BTN13" }, + { MOUSE_BTN14, "MOUSE_BTN14" }, + { MOUSE_BTN15, "MOUSE_BTN15" }, + { MOUSE_BTN16, "MOUSE_BTN16" }, + { MOUSE_BTN17, "MOUSE_BTN17" }, + { MOUSE_BTN18, "MOUSE_BTN18" }, + { MOUSE_BTN19, "MOUSE_BTN19" }, { MOUSE_BTN0_DBL, "MOUSE_BTN0_DBL" }, { MOUSE_BTN1_DBL, "MOUSE_BTN1_DBL" }, { MOUSE_BTN2_DBL, "MOUSE_BTN2_DBL" }, @@ -287,6 +297,16 @@ static const mp_key_name_t key_names[] = { { MOUSE_BTN7_DBL, "MOUSE_BTN7_DBL" }, { MOUSE_BTN8_DBL, "MOUSE_BTN8_DBL" }, { MOUSE_BTN9_DBL, "MOUSE_BTN9_DBL" }, + { MOUSE_BTN10_DBL, "MOUSE_BTN10_DBL" }, + { MOUSE_BTN11_DBL, "MOUSE_BTN11_DBL" }, + { MOUSE_BTN12_DBL, "MOUSE_BTN12_DBL" }, + { MOUSE_BTN13_DBL, "MOUSE_BTN13_DBL" }, + { MOUSE_BTN14_DBL, "MOUSE_BTN14_DBL" }, + { MOUSE_BTN15_DBL, "MOUSE_BTN15_DBL" }, + { MOUSE_BTN16_DBL, "MOUSE_BTN16_DBL" }, + { MOUSE_BTN17_DBL, "MOUSE_BTN17_DBL" }, + { MOUSE_BTN18_DBL, "MOUSE_BTN18_DBL" }, + { MOUSE_BTN19_DBL, "MOUSE_BTN19_DBL" }, { JOY_AXIS1_MINUS, "JOY_UP" }, { JOY_AXIS1_PLUS, "JOY_DOWN" }, { JOY_AXIS0_MINUS, "JOY_LEFT" }, diff --git a/input/keycodes.h b/input/keycodes.h index 31a9161826..45e7ec7d4b 100644 --- a/input/keycodes.h +++ b/input/keycodes.h @@ -140,7 +140,17 @@ #define MOUSE_BTN7 (MOUSE_BASE+7) #define MOUSE_BTN8 (MOUSE_BASE+8) #define MOUSE_BTN9 (MOUSE_BASE+9) -#define MOUSE_BTN_END (MOUSE_BASE+10) +#define MOUSE_BTN10 (MOUSE_BASE+10) +#define MOUSE_BTN11 (MOUSE_BASE+11) +#define MOUSE_BTN12 (MOUSE_BASE+12) +#define MOUSE_BTN13 (MOUSE_BASE+13) +#define MOUSE_BTN14 (MOUSE_BASE+14) +#define MOUSE_BTN15 (MOUSE_BASE+15) +#define MOUSE_BTN16 (MOUSE_BASE+16) +#define MOUSE_BTN17 (MOUSE_BASE+17) +#define MOUSE_BTN18 (MOUSE_BASE+18) +#define MOUSE_BTN19 (MOUSE_BASE+19) +#define MOUSE_BTN_END (MOUSE_BASE+20) #define MOUSE_BASE_DBL (0x300|MP_NO_REPEAT_KEY) #define MOUSE_BTN0_DBL (MOUSE_BASE_DBL+0) @@ -153,7 +163,17 @@ #define MOUSE_BTN7_DBL (MOUSE_BASE_DBL+7) #define MOUSE_BTN8_DBL (MOUSE_BASE_DBL+8) #define MOUSE_BTN9_DBL (MOUSE_BASE_DBL+9) -#define MOUSE_BTN_DBL_END (MOUSE_BASE_DBL+10) +#define MOUSE_BTN10_DBL (MOUSE_BASE_DBL+10) +#define MOUSE_BTN11_DBL (MOUSE_BASE_DBL+11) +#define MOUSE_BTN12_DBL (MOUSE_BASE_DBL+12) +#define MOUSE_BTN13_DBL (MOUSE_BASE_DBL+13) +#define MOUSE_BTN14_DBL (MOUSE_BASE_DBL+14) +#define MOUSE_BTN15_DBL (MOUSE_BASE_DBL+15) +#define MOUSE_BTN16_DBL (MOUSE_BASE_DBL+16) +#define MOUSE_BTN17_DBL (MOUSE_BASE_DBL+17) +#define MOUSE_BTN18_DBL (MOUSE_BASE_DBL+18) +#define MOUSE_BTN19_DBL (MOUSE_BASE_DBL+19) +#define MOUSE_BTN_DBL_END (MOUSE_BASE_DBL+20) #endif // AR_DEFINES_ONLY diff --git a/libao2/ao_pcm.c b/libao2/ao_pcm.c index eefe6b9433..f9aef15fd1 100644 --- a/libao2/ao_pcm.c +++ b/libao2/ao_pcm.c @@ -37,6 +37,7 @@ #ifdef __MINGW32__ // for GetFileType to detect pipes #include <windows.h> +#include <io.h> #endif struct priv { diff --git a/libmpcodecs/img_format.c b/libmpcodecs/img_format.c index 09711e5270..c4884f3eca 100644 --- a/libmpcodecs/img_format.c +++ b/libmpcodecs/img_format.c @@ -19,6 +19,7 @@ #include "config.h" #include "img_format.h" #include "stdio.h" +#include "mpbswap.h" const char *vo_format_name(int format) { @@ -117,20 +118,57 @@ const char *vo_format_name(int format) return unknown_format; } -int mp_get_chroma_shift(int format, int *x_shift, int *y_shift) +int mp_get_chroma_shift(int format, int *x_shift, int *y_shift, int *component_bits) { int xs = 0, ys = 0; int bpp; - int bpp_factor = 1; int err = 0; - switch (format) { - case IMGFMT_420P16_LE: - case IMGFMT_420P16_BE: - case IMGFMT_420P10_LE: - case IMGFMT_420P10_BE: - case IMGFMT_420P9_LE: - case IMGFMT_420P9_BE: - bpp_factor = 2; + int bits = 8; + if ((format & 0xff0000f0) == 0x34000050) + format = bswap_32(format); + if ((format & 0xf00000ff) == 0x50000034) { + switch (format >> 24) { + case 0x50: + break; + case 0x51: + bits = 16; + break; + case 0x52: + bits = 10; + break; + case 0x53: + bits = 9; + break; + default: + err = 1; + break; + } + switch (format & 0x00ffffff) { + case 0x00343434: // 444 + xs = 0; + ys = 0; + break; + case 0x00323234: // 422 + xs = 1; + ys = 0; + break; + case 0x00303234: // 420 + xs = 1; + ys = 1; + break; + case 0x00313134: // 411 + xs = 2; + ys = 0; + break; + case 0x00303434: // 440 + xs = 0; + ys = 1; + break; + default: + err = 1; + break; + } + } else switch (format) { case IMGFMT_420A: case IMGFMT_I420: case IMGFMT_IYUV: @@ -143,34 +181,6 @@ int mp_get_chroma_shift(int format, int *x_shift, int *y_shift) xs = 2; ys = 2; break; - case IMGFMT_444P16_LE: - case IMGFMT_444P16_BE: - case IMGFMT_444P10_LE: - case IMGFMT_444P10_BE: - case IMGFMT_444P9_LE: - case IMGFMT_444P9_BE: - bpp_factor = 2; - case IMGFMT_444P: - xs = 0; - ys = 0; - break; - case IMGFMT_422P16_LE: - case IMGFMT_422P16_BE: - case IMGFMT_422P10_LE: - case IMGFMT_422P10_BE: - bpp_factor = 2; - case IMGFMT_422P: - xs = 1; - ys = 0; - break; - case IMGFMT_411P: - xs = 2; - ys = 0; - break; - case IMGFMT_440P: - xs = 0; - ys = 1; - break; case IMGFMT_Y8: case IMGFMT_Y800: xs = 31; @@ -182,9 +192,10 @@ int mp_get_chroma_shift(int format, int *x_shift, int *y_shift) } if (x_shift) *x_shift = xs; if (y_shift) *y_shift = ys; + if (component_bits) *component_bits = bits; bpp = 8 + ((16 >> xs) >> ys); if (format == IMGFMT_420A) bpp += 8; - bpp *= bpp_factor; + bpp *= (bits + 7) >> 3; return err ? 0 : bpp; } diff --git a/libmpcodecs/img_format.h b/libmpcodecs/img_format.h index 52a5ffbe25..2fc9775ee1 100644 --- a/libmpcodecs/img_format.h +++ b/libmpcodecs/img_format.h @@ -227,8 +227,9 @@ const char *vo_format_name(int format); /** * Calculates the scale shifts for the chroma planes for planar YUV * + * \param component_bits bits per component * \return bits-per-pixel for format if successful (i.e. format is 3 or 4-planes planar YUV), 0 otherwise */ -int mp_get_chroma_shift(int format, int *x_shift, int *y_shift); +int mp_get_chroma_shift(int format, int *x_shift, int *y_shift, int *component_bits); #endif /* MPLAYER_IMG_FORMAT_H */ diff --git a/libmpcodecs/mp_image.c b/libmpcodecs/mp_image.c index 4d2892cf81..88702dde60 100644 --- a/libmpcodecs/mp_image.c +++ b/libmpcodecs/mp_image.c @@ -123,9 +123,9 @@ void mp_image_setfmt(mp_image_t* mpi,unsigned int out_fmt){ } mpi->flags|=MP_IMGFLAG_YUV; mpi->num_planes=3; - if (mp_get_chroma_shift(out_fmt, NULL, NULL)) { + if (mp_get_chroma_shift(out_fmt, NULL, NULL, NULL)) { mpi->flags|=MP_IMGFLAG_PLANAR; - mpi->bpp = mp_get_chroma_shift(out_fmt, &mpi->chroma_x_shift, &mpi->chroma_y_shift); + mpi->bpp = mp_get_chroma_shift(out_fmt, &mpi->chroma_x_shift, &mpi->chroma_y_shift, NULL); mpi->chroma_width = mpi->width >> mpi->chroma_x_shift; mpi->chroma_height = mpi->height >> mpi->chroma_y_shift; } diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c index 5460d20fd1..c8463d5c34 100644 --- a/libmpcodecs/vd_ffmpeg.c +++ b/libmpcodecs/vd_ffmpeg.c @@ -389,7 +389,7 @@ static void uninit(sh_video_t *sh){ vd_ffmpeg_ctx *ctx = sh->context; AVCodecContext *avctx = ctx->avctx; - if(sh->opts->lavc_param.vstats){ + if (sh->opts->lavc_param.vstats && avctx->coded_frame) { int i; for(i=1; i<32; i++){ mp_msg(MSGT_DECVIDEO, MSGL_INFO, "QP: %d, count: %d\n", i, ctx->qp_stat[i]); @@ -784,6 +784,9 @@ static struct mp_image *decode(struct sh_video *sh, void *data, int len, AVFrame *pic= avctx->coded_frame; double quality=0.0; + if (!pic) + break; + if(!fvstats) { time_t today2; struct tm *today; diff --git a/libmpcodecs/vf_sab.c b/libmpcodecs/vf_sab.c index 7f05af9249..2773ed3109 100644 --- a/libmpcodecs/vf_sab.c +++ b/libmpcodecs/vf_sab.c @@ -116,7 +116,7 @@ static int config(struct vf_instance *vf, //__asm__ volatile("emms\n\t"); allocStuff(&vf->priv->luma, width, height); - mp_get_chroma_shift(outfmt, &sw, &sh); + mp_get_chroma_shift(outfmt, &sw, &sh, NULL); allocStuff(&vf->priv->chroma, width>>sw, height>>sh); return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt); diff --git a/libmpcodecs/vf_smartblur.c b/libmpcodecs/vf_smartblur.c index 6599c967de..7c54231e40 100644 --- a/libmpcodecs/vf_smartblur.c +++ b/libmpcodecs/vf_smartblur.c @@ -76,7 +76,7 @@ static int config(struct vf_instance *vf, allocStuff(&vf->priv->luma, width, height); - mp_get_chroma_shift(outfmt, &sw, &sh); + mp_get_chroma_shift(outfmt, &sw, &sh, NULL); allocStuff(&vf->priv->chroma, width>>sw, height>>sh); return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt); diff --git a/libmpdemux/aviheader.c b/libmpdemux/aviheader.c index cd2db91726..3f18af28f8 100644 --- a/libmpdemux/aviheader.c +++ b/libmpdemux/aviheader.c @@ -258,7 +258,7 @@ while(1){ s->aIndex[i].dwSize = stream_read_dword_le(demuxer->stream); s->aIndex[i].dwDuration = stream_read_dword_le(demuxer->stream); mp_msg (MSGT_HEADER, MSGL_V, "ODML (%.4s): [%d] 0x%016"PRIx64" 0x%04x %u\n", - (s->dwChunkId), i, + s->dwChunkId, i, (uint64_t)s->aIndex[i].qwOffset, s->aIndex[i].dwSize, s->aIndex[i].dwDuration); } diff --git a/libmpdemux/demux_ts.c b/libmpdemux/demux_ts.c index ebb1709f5a..6658e3b796 100644 --- a/libmpdemux/demux_ts.c +++ b/libmpdemux/demux_ts.c @@ -80,6 +80,7 @@ typedef enum AUDIO_AAC = mmioFOURCC('M', 'P', '4', 'A'), AUDIO_AAC_LATM = mmioFOURCC('M', 'P', '4', 'L'), AUDIO_TRUEHD = mmioFOURCC('T', 'R', 'H', 'D'), + AUDIO_S302M = mmioFOURCC('B', 'S', 'S', 'D'), SPU_DVD = 0x3000000, SPU_DVB = 0x3000001, SPU_TELETEXT = 0x3000002, @@ -260,6 +261,7 @@ static int IS_AUDIO(es_stream_type_t type) case AUDIO_AAC_LATM: case AUDIO_DTS: case AUDIO_TRUEHD: + case AUDIO_S302M: return 1; } return 0; @@ -661,7 +663,7 @@ static int a52_check(char *buf, int len) static off_t ts_detect_streams(demuxer_t *demuxer, tsdemux_init_t *param) { - int video_found = 0, audio_found = 0, sub_found av_unused = 0, i, num_packets = 0, req_apid, req_vpid, req_spid; + int video_found = 0, audio_found = 0, i, num_packets = 0, req_apid, req_vpid, req_spid; int is_audio, is_video, is_sub, has_tables; int32_t p, chosen_pid = 0; off_t pos=0, ret = 0, init_pos, end_pos; @@ -828,7 +830,6 @@ static off_t ts_detect_streams(demuxer_t *demuxer, tsdemux_init_t *param) { param->stype = es.type; param->spid = es.pid; - sub_found = 1; } } @@ -896,6 +897,8 @@ static off_t ts_detect_streams(demuxer_t *demuxer, tsdemux_init_t *param) mp_msg(MSGT_DEMUXER, MSGL_INFO, "AUDIO AAC LATM(pid=%d)", param->apid); else if(param->atype == AUDIO_TRUEHD) mp_msg(MSGT_DEMUXER, MSGL_INFO, "AUDIO TRUEHD(pid=%d)", param->apid); + else if(param->atype == AUDIO_S302M) + mp_msg(MSGT_DEMUXER, MSGL_INFO, "AUDIO S302M(pid=%d)", param->apid); else { audio_found = 0; @@ -2357,6 +2360,10 @@ static int parse_descriptors(struct pmt_es_t *es, uint8_t *ptr) { es->type = VIDEO_DIRAC; } + else if(d[0] == 'B' && d[1] == 'S' && d[2] == 'S' && d[3] == 'D') + { + es->type = AUDIO_S302M; + } else es->type = UNKNOWN; mp_msg(MSGT_DEMUX, MSGL_DBG2, "FORMAT %s\n", es->format_descriptor); diff --git a/libmpdemux/mpeg_hdr.c b/libmpdemux/mpeg_hdr.c index 2a00727e3a..0c368aa7a2 100644 --- a/libmpdemux/mpeg_hdr.c +++ b/libmpdemux/mpeg_hdr.c @@ -45,7 +45,7 @@ static float frameratecode2framerate[16] = { int mp_header_process_sequence_header (mp_mpeg_header_t * picture, const unsigned char * buffer) { - int width av_unused, height; + int height; if ((buffer[6] & 0x20) != 0x20){ fprintf(stderr, "missing marker bit!\n"); @@ -54,11 +54,8 @@ int mp_header_process_sequence_header (mp_mpeg_header_t * picture, const unsigne height = (buffer[0] << 16) | (buffer[1] << 8) | buffer[2]; - picture->display_picture_width = (height >> 12); - picture->display_picture_height = (height & 0xfff); - - width = ((height >> 12) + 15) & ~15; - height = ((height & 0xfff) + 15) & ~15; + picture->display_picture_width = height >> 12; + picture->display_picture_height = height & 0xfff; picture->aspect_ratio_information = buffer[3] >> 4; picture->frame_rate_code = buffer[3] & 15; diff --git a/libvo/gl_common.c b/libvo/gl_common.c index ad6fc99a64..cee413d3b3 100644 --- a/libvo/gl_common.c +++ b/libvo/gl_common.c @@ -183,7 +183,7 @@ static const struct gl_name_map_struct gl_name_map[] = { MAP(GL_R3_G3_B2), MAP(GL_RGB4), MAP(GL_RGB5), MAP(GL_RGB8), MAP(GL_RGB10), MAP(GL_RGB12), MAP(GL_RGB16), MAP(GL_RGBA2), MAP(GL_RGBA4), MAP(GL_RGB5_A1), MAP(GL_RGBA8), MAP(GL_RGB10_A2), - MAP(GL_RGBA12), MAP(GL_RGBA16), MAP(GL_LUMINANCE8), + MAP(GL_RGBA12), MAP(GL_RGBA16), MAP(GL_LUMINANCE8), MAP(GL_LUMINANCE16), // format MAP(GL_RGB), MAP(GL_RGBA), MAP(GL_RED), MAP(GL_GREEN), MAP(GL_BLUE), @@ -254,7 +254,7 @@ int glFindFormat(uint32_t fmt, int *bpp, GLint *gl_texfmt, if (!gl_format) gl_format = &dummy2; if (!gl_type) gl_type = &dummy2; - if (mp_get_chroma_shift(fmt, NULL, NULL)) { + if (mp_get_chroma_shift(fmt, NULL, NULL, NULL)) { // reduce the possible cases a bit if (IMGFMT_IS_YUVP16_LE(fmt)) fmt = IMGFMT_420P16_LE; @@ -282,7 +282,7 @@ int glFindFormat(uint32_t fmt, int *bpp, GLint *gl_texfmt, break; case IMGFMT_420P16: supported = 0; // no native YUV support - *gl_texfmt = 1; + *gl_texfmt = GL_LUMINANCE16; *bpp = 16; *gl_format = GL_LUMINANCE; *gl_type = GL_UNSIGNED_SHORT; diff --git a/libvo/gl_common.h b/libvo/gl_common.h index ddf0856956..fa0cffaf74 100644 --- a/libvo/gl_common.h +++ b/libvo/gl_common.h @@ -266,6 +266,9 @@ #ifndef GL_FLOAT_RGB32_NV #define GL_FLOAT_RGB32_NV 0x8889 #endif +#ifndef GL_LUMINANCE16 +#define GL_LUMINANCE16 0x8042 +#endif #ifndef GL_UNPACK_CLIENT_STORAGE_APPLE #define GL_UNPACK_CLIENT_STORAGE_APPLE 0x85B2 #endif diff --git a/libvo/vo_dfbmga.c b/libvo/vo_dfbmga.c index 76ae4a46f9..57b798040e 100644 --- a/libvo/vo_dfbmga.c +++ b/libvo/vo_dfbmga.c @@ -1335,7 +1335,7 @@ draw_image( mp_image_t *mpi ) } static int -set_equalizer( char *data, int value ) +set_equalizer( const char *data, int value ) { DFBResult res; DFBColorAdjustment ca; @@ -1375,7 +1375,7 @@ set_equalizer( char *data, int value ) } static int -get_equalizer( char *data, int *value ) +get_equalizer( const char *data, int *value ) { DFBResult res; DFBColorAdjustment ca; diff --git a/libvo/vo_directfb2.c b/libvo/vo_directfb2.c index de44b2ea51..ae15918b53 100644 --- a/libvo/vo_directfb2.c +++ b/libvo/vo_directfb2.c @@ -980,7 +980,7 @@ static void uninit(void) } -static uint32_t directfb_set_video_eq(char *data, int value) //data==name +static uint32_t directfb_set_video_eq(const char *data, int value) //data==name { DFBColorAdjustment ca; @@ -1038,7 +1038,7 @@ if (layer) { } -static uint32_t directfb_get_video_eq(char *data, int *value) // data==name +static uint32_t directfb_get_video_eq(const char *data, int *value) // data==name { DFBColorAdjustment ca; diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c index e663057beb..bc50e245b3 100644 --- a/libvo/vo_gl.c +++ b/libvo/vo_gl.c @@ -258,7 +258,7 @@ static void update_yuvconv(void) { gl_conversion_params_t params = {gl_target, yuvconvtype, {colorspace, levelconv, bri, cont, hue, sat, rgamma, ggamma, bgamma}, texture_width, texture_height, 0, 0, filter_strength}; - mp_get_chroma_shift(image_format, &xs, &ys); + mp_get_chroma_shift(image_format, &xs, &ys, NULL); params.chrom_texw = params.texw >> xs; params.chrom_texh = params.texh >> ys; glSetupYUVConversion(¶ms); @@ -568,7 +568,7 @@ static int initGl(uint32_t d_width, uint32_t d_height) { int i; int xs, ys; scale_type = get_scale_type(1); - mp_get_chroma_shift(image_format, &xs, &ys); + mp_get_chroma_shift(image_format, &xs, &ys, NULL); mpglGenTextures(21, default_texs); default_texs[21] = 0; for (i = 0; i < 7; i++) { @@ -670,7 +670,7 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin image_height = height; image_width = width; image_format = format; - is_yuv = mp_get_chroma_shift(image_format, &xs, &ys) > 0; + is_yuv = mp_get_chroma_shift(image_format, &xs, &ys, NULL) > 0; is_yuv |= (xs << 8) | (ys << 16); glFindFormat(format, NULL, &gl_texfmt, &gl_format, &gl_type); @@ -884,7 +884,7 @@ static int draw_slice(uint8_t *src[], int stride[], int w,int h,int x,int y) x, y, w, h, slice_height); if (is_yuv) { int xs, ys; - mp_get_chroma_shift(image_format, &xs, &ys); + mp_get_chroma_shift(image_format, &xs, &ys, NULL); mpglActiveTexture(GL_TEXTURE1); glUploadTex(gl_target, gl_format, gl_type, src[1], stride[1], x >> xs, y >> ys, w >> xs, h >> ys, slice_height); @@ -951,7 +951,7 @@ static uint32_t get_image(mp_image_t *mpi) { if (is_yuv) { // planar YUV int xs, ys; - mp_get_chroma_shift(image_format, &xs, &ys); + mp_get_chroma_shift(image_format, &xs, &ys, NULL); mpi->flags |= MP_IMGFLAG_COMMON_STRIDE | MP_IMGFLAG_COMMON_PLANE; mpi->stride[0] = mpi->width; mpi->planes[1] = mpi->planes[0] + mpi->stride[0] * mpi->height; @@ -1009,7 +1009,7 @@ static uint32_t draw_image(mp_image_t *mpi) { if (force_pbo && !(mpi->flags & MP_IMGFLAG_DIRECT) && !gl_bufferptr && get_image(&mpi2) == VO_TRUE) { int bpp = is_yuv ? 8 : mpi->bpp; int xs, ys; - mp_get_chroma_shift(image_format, &xs, &ys); + mp_get_chroma_shift(image_format, &xs, &ys, NULL); memcpy_pic(mpi2.planes[0], mpi->planes[0], mpi->w * bpp / 8, mpi->h, mpi2.stride[0], mpi->stride[0]); if (is_yuv) { memcpy_pic(mpi2.planes[1], mpi->planes[1], mpi->w >> xs, mpi->h >> ys, mpi2.stride[1], mpi->stride[1]); @@ -1051,7 +1051,7 @@ static uint32_t draw_image(mp_image_t *mpi) { mpi->x, mpi->y, w, h, slice); if (is_yuv) { int xs, ys; - mp_get_chroma_shift(image_format, &xs, &ys); + mp_get_chroma_shift(image_format, &xs, &a |