diff -dur MPlayer-1.0pre7/input/input.c MPlayer-1.0pre7-elphel-1/input/input.c --- MPlayer-1.0pre7/input/input.c 2005-04-15 19:52:33.000000000 +0500 +++ MPlayer-1.0pre7-elphel-1/input/input.c 2005-07-21 19:45:17.000000000 +0500 @@ -73,6 +73,7 @@ { MP_CMD_BRIGHTNESS, "brightness",1, { {MP_CMD_ARG_INT,{0}}, {MP_CMD_ARG_INT,{0}}, {-1,{0}} } }, { MP_CMD_HUE, "hue",1, { {MP_CMD_ARG_INT,{0}}, {MP_CMD_ARG_INT,{0}}, {-1,{0}} } }, { MP_CMD_SATURATION, "saturation",1, { {MP_CMD_ARG_INT,{0}}, {MP_CMD_ARG_INT,{0}}, {-1,{0}} } }, + { MP_CMD_LOWRES, "lowres",0, { {MP_CMD_ARG_INT,{-1}}, {-1,{0}} } }, { MP_CMD_FRAMEDROPPING, "frame_drop",0, { { MP_CMD_ARG_INT,{-1} }, {-1,{0}} } }, { MP_CMD_SUB_POS, "sub_pos", 1, { {MP_CMD_ARG_INT,{0}}, {MP_CMD_ARG_INT,{0}}, {-1,{0}} } }, { MP_CMD_SUB_ALIGNMENT, "sub_alignment",0, { {MP_CMD_ARG_INT,{-1}}, {-1,{0}} } }, @@ -358,6 +359,8 @@ { { KEY_XF86_PREV, 0 }, "seek -60" }, { { KEY_XF86_NEXT, 0 }, "seek +60" }, + { { 'W', 0 }, "lowres -1" }, + { { 0 }, NULL } }; diff -dur MPlayer-1.0pre7/input/input.h MPlayer-1.0pre7-elphel-1/input/input.h --- MPlayer-1.0pre7/input/input.h 2005-04-03 19:08:26.000000000 +0500 +++ MPlayer-1.0pre7-elphel-1/input/input.h 2005-07-21 18:55:12.000000000 +0500 @@ -64,6 +64,7 @@ #define MP_CMD_RUN 60 #define MP_CMD_SUB_LOG 61 #define MP_CMD_SWITCH_AUDIO 62 +#define MP_CMD_LOWRES 63 #define MP_CMD_GUI_EVENTS 5000 #define MP_CMD_GUI_LOADFILE 5001 diff -dur MPlayer-1.0pre7/libmpcodecs/dec_video.c MPlayer-1.0pre7-elphel-1/libmpcodecs/dec_video.c --- MPlayer-1.0pre7/libmpcodecs/dec_video.c 2004-02-18 19:23:41.000000000 +0400 +++ MPlayer-1.0pre7-elphel-1/libmpcodecs/dec_video.c 2005-07-21 19:36:20.000000000 +0500 @@ -73,6 +73,11 @@ mpvdec->control(sh_video,VDCTRL_SET_PP_LEVEL, (void*)(&quality)); } +void set_lowres(sh_video_t *sh_video, int v){ + if(mpvdec) + mpvdec->control(sh_video,VDCTRL_SET_LOWRES,&v); +} + int set_video_colors(sh_video_t *sh_video,char *item,int value) { vf_instance_t* vf=sh_video->vfilter; diff -dur MPlayer-1.0pre7/libmpcodecs/dec_video.h MPlayer-1.0pre7-elphel-1/libmpcodecs/dec_video.h --- MPlayer-1.0pre7/libmpcodecs/dec_video.h 2004-02-18 19:23:41.000000000 +0400 +++ MPlayer-1.0pre7-elphel-1/libmpcodecs/dec_video.h 2005-07-21 19:28:05.000000000 +0500 @@ -14,6 +14,7 @@ extern int get_video_quality_max(sh_video_t *sh_video); extern void set_video_quality(sh_video_t *sh_video,int quality); +extern void set_lowres(sh_video_t *sh_video, int v /* 0..3,-1=decr,-2=incr */); extern int get_video_colors(sh_video_t *sh_video,char *item,int *value); extern int set_video_colors(sh_video_t *sh_video,char *item,int value); diff -dur MPlayer-1.0pre7/libmpcodecs/vd_ffmpeg.c MPlayer-1.0pre7-elphel-1/libmpcodecs/vd_ffmpeg.c --- MPlayer-1.0pre7/libmpcodecs/vd_ffmpeg.c 2005-04-08 03:04:08.000000000 +0500 +++ MPlayer-1.0pre7-elphel-1/libmpcodecs/vd_ffmpeg.c 2005-07-21 19:43:33.000000000 +0500 @@ -155,6 +155,22 @@ case VDCTRL_RESYNC_STREAM: avcodec_flush_buffers(avctx); return CONTROL_TRUE; + case VDCTRL_SET_LOWRES: + { + int v = *(int*)arg; + lavc_param_lowres = v&~3 ? (lavc_param_lowres + 3 + v*2)&3 : v; + mp_msg(MSGT_DECVIDEO,MSGL_V,"INFO: reopen codec!\n"); + if (avctx->codec->close(avctx) < 0) + mp_msg(MSGT_DECVIDEO,MSGL_ERR, MSGTR_CantCloseCodec); + memset(avctx->priv_data, 0, avctx->codec->priv_data_size); + avctx->lowres=lavc_param_lowres; + ctx->ip_count= ctx->b_count= 0; + if (avctx->codec->init(avctx) < 0) { + mp_msg(MSGT_DECVIDEO,MSGL_ERR, MSGTR_CantOpenCodec); + return CONTROL_FALSE; + } + } + return CONTROL_TRUE; } return CONTROL_UNKNOWN; } diff -dur MPlayer-1.0pre7/libmpcodecs/vd.h MPlayer-1.0pre7-elphel-1/libmpcodecs/vd.h --- MPlayer-1.0pre7/libmpcodecs/vd.h 2004-02-18 19:23:41.000000000 +0400 +++ MPlayer-1.0pre7-elphel-1/libmpcodecs/vd.h 2005-07-21 19:30:04.000000000 +0500 @@ -24,6 +24,7 @@ #define VDCTRL_SET_EQUALIZER 6 /* set color options (brightness,contrast etc) */ #define VDCTRL_GET_EQUALIZER 7 /* get color options (brightness,contrast etc) */ #define VDCTRL_RESYNC_STREAM 8 /* seeking */ +#define VDCTRL_SET_LOWRES 9 /* set lowres codec option */ // callbacks: int mpcodecs_config_vo(sh_video_t *sh, int w, int h, unsigned int preferred_outfmt); diff -dur MPlayer-1.0pre7/mplayer.c MPlayer-1.0pre7-elphel-1/mplayer.c --- MPlayer-1.0pre7/mplayer.c 2005-04-15 17:14:24.000000000 +0500 +++ MPlayer-1.0pre7-elphel-1/mplayer.c 2005-07-21 19:28:34.000000000 +0500 @@ -3133,6 +3155,9 @@ #endif // USE_OSD } } break; + case MP_CMD_LOWRES : { + set_lowres(sh_video, cmd->args[0].v.i); + } break; case MP_CMD_FRAMEDROPPING : { int v = cmd->args[0].v.i; if(v < 0){