mirror of
https://github.com/mpv-player/mpv
synced 2024-11-18 21:16:10 +01:00
cleanup
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8041 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
5ec4e44b18
commit
1aaf1516e8
@ -79,7 +79,7 @@ static int control(sh_video_t *sh,int cmd,void* arg,...){
|
||||
#ifdef NEW_DECORE
|
||||
return 9; // for divx4linux
|
||||
#else
|
||||
return GET_PP_QUALITY_MAX; // for opendivx
|
||||
return PP_QUALITY_MAX; // for opendivx
|
||||
#endif
|
||||
case VDCTRL_SET_PP_LEVEL: {
|
||||
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;
|
||||
dec_set.postproc_level=quality*10;
|
||||
#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);
|
||||
#endif
|
||||
decore(0x123,DEC_OPT_SETPP,&dec_set,NULL);
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
struct vf_priv_s {
|
||||
int pp;
|
||||
pp_mode_t *ppMode[GET_PP_QUALITY_MAX+1];
|
||||
pp_mode_t *ppMode[PP_QUALITY_MAX+1];
|
||||
void *context;
|
||||
mp_image_t *dmpi;
|
||||
unsigned int outfmt;
|
||||
@ -44,7 +44,7 @@ static int config(struct vf_instance_s* vf,
|
||||
|
||||
static void uninit(struct vf_instance_s* vf){
|
||||
int i;
|
||||
for(i=0; i<=GET_PP_QUALITY_MAX; i++){
|
||||
for(i=0; i<=PP_QUALITY_MAX; i++){
|
||||
if(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){
|
||||
switch(request){
|
||||
case VFCTRL_QUERY_MAX_PP_LEVEL:
|
||||
return GET_PP_QUALITY_MAX;
|
||||
return PP_QUALITY_MAX;
|
||||
case VFCTRL_SET_PP_LEVEL:
|
||||
vf->priv->pp= *((unsigned int*)data);
|
||||
return CONTROL_TRUE;
|
||||
@ -164,14 +164,14 @@ static int open(vf_instance_t *vf, char* args){
|
||||
#ifdef EMU_OLD
|
||||
if(name){
|
||||
#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);
|
||||
if(vf->priv->ppMode[i]==NULL) return -1;
|
||||
}
|
||||
#ifdef EMU_OLD
|
||||
}else{
|
||||
/* 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*)memalign(8, sizeof(PPMode));
|
||||
@ -191,7 +191,7 @@ static int open(vf_instance_t *vf, char* args){
|
||||
}
|
||||
#endif
|
||||
|
||||
vf->priv->pp=GET_PP_QUALITY_MAX; //divx_quality;
|
||||
vf->priv->pp=PP_QUALITY_MAX; //divx_quality;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -518,11 +518,6 @@ char *pp_help=
|
||||
"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)
|
||||
{
|
||||
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(;;){
|
||||
char *filterName;
|
||||
int q= 1000000; //GET_PP_QUALITY_MAX;
|
||||
int q= 1000000; //PP_QUALITY_MAX;
|
||||
int chrom=-1;
|
||||
char *option;
|
||||
char *options[OPTIONS_ARRAY_SIZE];
|
||||
|
@ -19,7 +19,7 @@
|
||||
#ifndef NEWPOSTPROCESS_H
|
||||
#define NEWPOSTPROCESS_H
|
||||
|
||||
#define GET_PP_QUALITY_MAX 6
|
||||
#define PP_QUALITY_MAX 6
|
||||
|
||||
#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,
|
||||
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);
|
||||
void pp_free_mode(pp_mode_t *mode);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user