mirror of
https://github.com/mpv-player/mpv
synced 2024-12-24 15:52:25 +00:00
divx_quality and equalizer support done
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5004 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
9caad2c29a
commit
154bbcd5b9
@ -1,15 +1,18 @@
|
||||
URGENT:
|
||||
- add common postprocessing filter support (export qscale array)
|
||||
|
||||
TODO:
|
||||
- equalizer support to divx4, dshow
|
||||
- vo_config callbacks to ffmpeg, cinepak
|
||||
- better mpi support to xanim (now it's EXPORT but could be better)
|
||||
- fix initial postprocessing flags (divx_quality)
|
||||
- add common postprocessing filter support (export qscale array)
|
||||
- IP buffering for NUV
|
||||
- finish MPNG (8bpp support)
|
||||
- IPB buffering to libmpeg2
|
||||
- review authors
|
||||
|
||||
DONE:
|
||||
- equalizer support to divx4, dshow
|
||||
- fix initial postprocessing flags (divx_quality)
|
||||
|
||||
#define VFM_CINEPAK 13
|
||||
#define VFM_QTRPZA 20
|
||||
#define VFM_FFMPEG 5
|
||||
|
@ -37,6 +37,7 @@ extern vd_functions_t* mpcodecs_vd_drivers[];
|
||||
#define VDCTRL_QUERY_FORMAT 3 /* test for availabilty of a format */
|
||||
#define VDCTRL_QUERY_MAX_PP_LEVEL 4 /* test for postprocessing support (max level) */
|
||||
#define VDCTRL_SET_PP_LEVEL 5 /* set postprocessing level */
|
||||
#define VDCTRL_SET_EQUALIZER 6 /* set color options (brightness,contrast etc) */
|
||||
|
||||
// callbacks:
|
||||
int mpcodecs_config_vo(sh_video_t *sh, int w, int h, unsigned int preferred_outfmt);
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "config.h"
|
||||
@ -41,6 +42,27 @@ static int control(sh_video_t *sh,int cmd,void* arg,...){
|
||||
decore(0x123,DEC_OPT_SETPP,&dec_set,NULL);
|
||||
return CONTROL_OK;
|
||||
}
|
||||
#ifdef DECORE_VERSION
|
||||
#if DECORE_VERSION >= 20011010
|
||||
case VDCTRL_SET_EQUALIZER: {
|
||||
va_list ap;
|
||||
int value;
|
||||
int option;
|
||||
va_start(ap, arg);
|
||||
value=va_arg(ap, int);
|
||||
va_end(ap);
|
||||
|
||||
if(!strcmp(arg,"Brightness")) option=DEC_GAMMA_BRIGHTNESS;
|
||||
else if(!strcmp(arg, "Contrast")) option=DEC_GAMMA_CONTRAST;
|
||||
else if(!strcmp(arg,"Saturation")) option=DEC_GAMMA_SATURATION;
|
||||
else return CONTROL_FALSE;
|
||||
|
||||
value = (value * 256) / 100 - 128;
|
||||
decore(0x123, DEC_OPT_GAMMA, (void *)option, (void *) value);
|
||||
return CONTROL_OK;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
@ -50,7 +72,7 @@ static int control(sh_video_t *sh,int cmd,void* arg,...){
|
||||
// init driver
|
||||
static int init(sh_video_t *sh){
|
||||
DEC_PARAM dec_param;
|
||||
// DEC_SET dec_set;
|
||||
DEC_SET dec_set;
|
||||
int bits=16;
|
||||
memset(&dec_param,0,sizeof(dec_param));
|
||||
|
||||
@ -76,8 +98,9 @@ static int init(sh_video_t *sh){
|
||||
dec_param.x_dim = sh->disp_w;
|
||||
dec_param.y_dim = sh->disp_h;
|
||||
decore(0x123, DEC_OPT_INIT, &dec_param, NULL);
|
||||
// dec_set.postproc_level = divx_quality;
|
||||
// decore(0x123, DEC_OPT_SETPP, &dec_set, NULL);
|
||||
|
||||
dec_set.postproc_level = divx_quality;
|
||||
decore(0x123, DEC_OPT_SETPP, &dec_set, NULL);
|
||||
|
||||
mp_msg(MSGT_DECVIDEO,MSGL_V,"INFO: DivX4Linux video codec init OK!\n");
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "config.h"
|
||||
#ifdef USE_DIRECTSHOW
|
||||
@ -32,9 +33,17 @@ static int control(sh_video_t *sh,int cmd,void* arg,...){
|
||||
DS_VideoDecoder_SetValue(sh->context,"Quality",*((int*)arg));
|
||||
return CONTROL_OK;
|
||||
|
||||
// TODO: query/set video options (brightness contrast etc)
|
||||
// DS_VideoDecoder_SetValue(ds_vdec,item,value);
|
||||
|
||||
case VDCTRL_SET_EQUALIZER: {
|
||||
va_list ap;
|
||||
int value;
|
||||
va_start(ap, arg);
|
||||
value=va_arg(ap, int);
|
||||
va_end(ap);
|
||||
if(DS_VideoDecoder_SetValue(sh->context,arg,value)==0)
|
||||
return CONTROL_OK;
|
||||
return CONTROL_FALSE;
|
||||
}
|
||||
|
||||
}
|
||||
return CONTROL_UNKNOWN;
|
||||
}
|
||||
@ -61,6 +70,7 @@ static int init(sh_video_t *sh){
|
||||
default:
|
||||
DS_VideoDecoder_SetDestFmt(sh->context,out_fmt&255,0); // RGB/BGR
|
||||
}
|
||||
DS_SetAttr_DivX("Quality",divx_quality);
|
||||
DS_VideoDecoder_StartInternal(sh->context);
|
||||
mp_msg(MSGT_DECVIDEO,MSGL_V,"INFO: Win32/DShow video codec init OK!\n");
|
||||
return 1;
|
||||
|
@ -8,6 +8,8 @@
|
||||
|
||||
#include "vd.h"
|
||||
|
||||
extern int divx_quality;
|
||||
|
||||
// prototypes:
|
||||
//static vd_info_t info;
|
||||
static int control(sh_video_t *sh,int cmd,void* arg,...);
|
||||
|
@ -34,7 +34,7 @@ static int control(sh_video_t *sh,int cmd,void* arg,...){
|
||||
// init driver
|
||||
static int init(sh_video_t *sh){
|
||||
mpeg2_init();
|
||||
picture->pp_options=0; //divx_quality;
|
||||
picture->pp_options=divx_quality;
|
||||
// send seq header to the decoder: *** HACK ***
|
||||
mpeg2_decode_data(NULL,videobuffer,videobuffer+videobuf_len,0);
|
||||
mpeg2_allocate_image_buffers (picture);
|
||||
|
@ -97,7 +97,7 @@ static int control(sh_video_t *sh,int cmd,void* arg,...){
|
||||
// init driver
|
||||
static int init(sh_video_t *sh){
|
||||
DEC_PARAM dec_param;
|
||||
// DEC_SET dec_set;
|
||||
DEC_SET dec_set;
|
||||
memset(&dec_param,0,sizeof(dec_param));
|
||||
#ifdef NEW_DECORE
|
||||
dec_param.output_format=DEC_USER;
|
||||
@ -111,8 +111,9 @@ static int init(sh_video_t *sh){
|
||||
dec_param.x_dim = sh->disp_w;
|
||||
dec_param.y_dim = sh->disp_h;
|
||||
decore(0x123, DEC_OPT_INIT, &dec_param, NULL);
|
||||
// dec_set.postproc_level = divx_quality;
|
||||
// decore(0x123, DEC_OPT_SETPP, &dec_set, NULL);
|
||||
|
||||
dec_set.postproc_level = divx_quality;
|
||||
decore(0x123, DEC_OPT_SETPP, &dec_set, NULL);
|
||||
|
||||
mp_msg(MSGT_DECVIDEO,MSGL_V,"INFO: OpenDivX video codec init OK!\n");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user