| 
				
				
					
				
				
				 | 
			
			 | 
			@@ -142,6 +142,7 @@ typedef struct EBUR128Context { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    int metadata;                   ///< whether or not to inject loudness results in frames | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    int dual_mono;                  ///< whether or not to treat single channel input files as dual-mono | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    double pan_law;                 ///< pan law value used to calculate dual-mono measurements | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    int target;                     ///< target level in LUFS used to set relative zero LU in visualization | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			} EBUR128Context; | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
  | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			enum { | 
		
		
	
	
		
			
				| 
				
					
				
				
					
				
				
				 | 
			
			 | 
			@@ -168,6 +169,7 @@ static const AVOption ebur128_options[] = { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        { "true",   "enable true-peak mode",   0, AV_OPT_TYPE_CONST, {.i64 = PEAK_MODE_TRUE_PEAKS},    INT_MIN, INT_MAX, A|F, "mode" }, | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    { "dualmono", "treat mono input files as dual-mono", OFFSET(dual_mono), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, A|F }, | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    { "panlaw", "set a specific pan law for dual-mono files", OFFSET(pan_law), AV_OPT_TYPE_DOUBLE, {.dbl = -3.01029995663978}, -10.0, 0.0, A|F }, | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    { "target", "set a specific target level in LUFS (-23 to 0)", OFFSET(target), AV_OPT_TYPE_INT, {.i64 = -23}, -23, 0, V|F }, | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    { NULL }, | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			}; | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
  | 
		
		
	
	
		
			
				| 
				
					
				
				
					
				
				
				 | 
			
			 | 
			@@ -740,8 +742,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples) | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                int x, y, ret; | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                uint8_t *p; | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
  | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                const int y_loudness_lu_graph = lu_to_y(ebur128, loudness_3000 + 23); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                const int y_loudness_lu_gauge = lu_to_y(ebur128, loudness_400  + 23); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                const int y_loudness_lu_graph = lu_to_y(ebur128, loudness_3000 - ebur128->target); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                const int y_loudness_lu_gauge = lu_to_y(ebur128, loudness_400  - ebur128->target); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
  | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                /* draw the graph using the short-term loudness */ | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                p = pic->data[0] + ebur128->graph.y*pic->linesize[0] + ebur128->graph.x*3; | 
		
		
	
	
		
			
				| 
				
					
				
				
				
				 | 
			
			 | 
			
  |