1
mirror of https://github.com/mpv-player/mpv synced 2024-11-18 21:16:10 +01:00
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8041 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
michael 2002-11-02 14:20:05 +00:00
parent 5ec4e44b18
commit 1aaf1516e8
4 changed files with 16 additions and 16 deletions

View File

@ -79,7 +79,7 @@ static int control(sh_video_t *sh,int cmd,void* arg,...){
#ifdef NEW_DECORE #ifdef NEW_DECORE
return 9; // for divx4linux return 9; // for divx4linux
#else #else
return GET_PP_QUALITY_MAX; // for opendivx return PP_QUALITY_MAX; // for opendivx
#endif #endif
case VDCTRL_SET_PP_LEVEL: { case VDCTRL_SET_PP_LEVEL: {
DEC_SET dec_set; DEC_SET dec_set;
@ -88,7 +88,7 @@ static int control(sh_video_t *sh,int cmd,void* arg,...){
if(quality<0 || quality>9) quality=9; if(quality<0 || quality>9) quality=9;
dec_set.postproc_level=quality*10; dec_set.postproc_level=quality*10;
#else #else
if(quality<0 || quality>GET_PP_QUALITY_MAX) quality=GET_PP_QUALITY_MAX; if(quality<0 || quality>PP_QUALITY_MAX) quality=PP_QUALITY_MAX;
dec_set.postproc_level=getPpModeForQuality(quality); dec_set.postproc_level=getPpModeForQuality(quality);
#endif #endif
decore(0x123,DEC_OPT_SETPP,&dec_set,NULL); decore(0x123,DEC_OPT_SETPP,&dec_set,NULL);

View File

@ -22,7 +22,7 @@
struct vf_priv_s { struct vf_priv_s {
int pp; int pp;
pp_mode_t *ppMode[GET_PP_QUALITY_MAX+1]; pp_mode_t *ppMode[PP_QUALITY_MAX+1];
void *context; void *context;
mp_image_t *dmpi; mp_image_t *dmpi;
unsigned int outfmt; unsigned int outfmt;
@ -44,7 +44,7 @@ static int config(struct vf_instance_s* vf,
static void uninit(struct vf_instance_s* vf){ static void uninit(struct vf_instance_s* vf){
int i; int i;
for(i=0; i<=GET_PP_QUALITY_MAX; i++){ for(i=0; i<=PP_QUALITY_MAX; i++){
if(vf->priv->ppMode[i]) if(vf->priv->ppMode[i])
pp_free_mode(vf->priv->ppMode[i]); pp_free_mode(vf->priv->ppMode[i]);
} }
@ -64,7 +64,7 @@ static int query_format(struct vf_instance_s* vf, unsigned int fmt){
static int control(struct vf_instance_s* vf, int request, void* data){ static int control(struct vf_instance_s* vf, int request, void* data){
switch(request){ switch(request){
case VFCTRL_QUERY_MAX_PP_LEVEL: case VFCTRL_QUERY_MAX_PP_LEVEL:
return GET_PP_QUALITY_MAX; return PP_QUALITY_MAX;
case VFCTRL_SET_PP_LEVEL: case VFCTRL_SET_PP_LEVEL:
vf->priv->pp= *((unsigned int*)data); vf->priv->pp= *((unsigned int*)data);
return CONTROL_TRUE; return CONTROL_TRUE;
@ -164,14 +164,14 @@ static int open(vf_instance_t *vf, char* args){
#ifdef EMU_OLD #ifdef EMU_OLD
if(name){ if(name){
#endif #endif
for(i=0; i<=GET_PP_QUALITY_MAX; i++){ for(i=0; i<=PP_QUALITY_MAX; i++){
vf->priv->ppMode[i]= pp_get_mode_by_name_and_quality(name, i); vf->priv->ppMode[i]= pp_get_mode_by_name_and_quality(name, i);
if(vf->priv->ppMode[i]==NULL) return -1; if(vf->priv->ppMode[i]==NULL) return -1;
} }
#ifdef EMU_OLD #ifdef EMU_OLD
}else{ }else{
/* hex mode for compatibility */ /* hex mode for compatibility */
for(i=0; i<=GET_PP_QUALITY_MAX; i++){ for(i=0; i<=PP_QUALITY_MAX; i++){
PPMode *ppMode; PPMode *ppMode;
ppMode= (PPMode*)memalign(8, sizeof(PPMode)); ppMode= (PPMode*)memalign(8, sizeof(PPMode));
@ -191,7 +191,7 @@ static int open(vf_instance_t *vf, char* args){
} }
#endif #endif
vf->priv->pp=GET_PP_QUALITY_MAX; //divx_quality; vf->priv->pp=PP_QUALITY_MAX; //divx_quality;
return 1; return 1;
} }

View File

@ -518,11 +518,6 @@ char *pp_help=
"fq forceQuant <quantizer> Force quantizer\n" "fq forceQuant <quantizer> Force quantizer\n"
; ;
/**
* returns a PPMode struct which will have a non 0 error variable if an error occured
* name is the string after "-pp" on the command line
* quality is a number from 0 to GET_PP_QUALITY_MAX
*/
pp_mode_t *pp_get_mode_by_name_and_quality(char *name, int quality) pp_mode_t *pp_get_mode_by_name_and_quality(char *name, int quality)
{ {
char temp[GET_MODE_BUFFER_SIZE]; char temp[GET_MODE_BUFFER_SIZE];
@ -553,7 +548,7 @@ pp_mode_t *pp_get_mode_by_name_and_quality(char *name, int quality)
for(;;){ for(;;){
char *filterName; char *filterName;
int q= 1000000; //GET_PP_QUALITY_MAX; int q= 1000000; //PP_QUALITY_MAX;
int chrom=-1; int chrom=-1;
char *option; char *option;
char *options[OPTIONS_ARRAY_SIZE]; char *options[OPTIONS_ARRAY_SIZE];

View File

@ -19,7 +19,7 @@
#ifndef NEWPOSTPROCESS_H #ifndef NEWPOSTPROCESS_H
#define NEWPOSTPROCESS_H #define NEWPOSTPROCESS_H
#define GET_PP_QUALITY_MAX 6 #define PP_QUALITY_MAX 6
#define QP_STORE_T int8_t #define QP_STORE_T int8_t
@ -34,7 +34,12 @@ void pp_postprocess(uint8_t * src[3], int srcStride[3],
QP_STORE_T *QP_store, int QP_stride, QP_STORE_T *QP_store, int QP_stride,
pp_mode_t *mode, pp_context_t *ppContext, int pict_type); pp_mode_t *mode, pp_context_t *ppContext, int pict_type);
// name is the stuff after "-pp" on the command line
/**
* returns a pp_mode_t or NULL if an error occured
* name is the string after "-pp" on the command line
* quality is a number from 0 to PP_QUALITY_MAX
*/
pp_mode_t *pp_get_mode_by_name_and_quality(char *name, int quality); pp_mode_t *pp_get_mode_by_name_and_quality(char *name, int quality);
void pp_free_mode(pp_mode_t *mode); void pp_free_mode(pp_mode_t *mode);