changeset 8040:5241f95b5ec4

cleanup
author michael
date Sat, 02 Nov 2002 14:20:05 +0000
parents b9b758651741
children b5ff8f269bca
files libmpcodecs/vd_odivx.c libmpcodecs/vf_pp.c postproc/postprocess.c postproc/postprocess.h
diffstat 4 files changed, 16 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vd_odivx.c	Sat Nov 02 14:01:41 2002 +0000
+++ b/libmpcodecs/vd_odivx.c	Sat Nov 02 14:20:05 2002 +0000
@@ -79,7 +79,7 @@
 #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 @@
 	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);
--- a/libmpcodecs/vf_pp.c	Sat Nov 02 14:01:41 2002 +0000
+++ b/libmpcodecs/vf_pp.c	Sat Nov 02 14:20:05 2002 +0000
@@ -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 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 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 @@
 #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 @@
     }
 #endif
     
-    vf->priv->pp=GET_PP_QUALITY_MAX; //divx_quality;
+    vf->priv->pp=PP_QUALITY_MAX; //divx_quality;
     return 1;
 }
 
--- a/postproc/postprocess.c	Sat Nov 02 14:01:41 2002 +0000
+++ b/postproc/postprocess.c	Sat Nov 02 14:20:05 2002 +0000
@@ -518,11 +518,6 @@
 "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 @@
 
 	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];
--- a/postproc/postprocess.h	Sat Nov 02 14:01:41 2002 +0000
+++ b/postproc/postprocess.h	Sat Nov 02 14:20:05 2002 +0000
@@ -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 @@
                  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);