Add predictive filtering option for Alpha.
Add predictive filtering option for Alpha plane. Valid range for filter option is [0, 5] corresponding to prediction methods none, horizontal, vertical, gradient & paeth filter. The prediction method 5 will try all the prediction methods (0 to 4) and pick the prediction method that gives best compression. Change-Id: I9244d4a9c5017501a9696c7cec5045f04c16d49b
This commit is contained in:
		@@ -43,6 +43,7 @@ int WebPConfigInitInternal(WebPConfig* const config,
 | 
			
		||||
  config->autofilter = 0;
 | 
			
		||||
  config->partition_limit = 0;
 | 
			
		||||
  config->alpha_compression = 1;
 | 
			
		||||
  config->alpha_filtering = 0;
 | 
			
		||||
  config->alpha_quality = 100;
 | 
			
		||||
 | 
			
		||||
  // TODO(skal): tune.
 | 
			
		||||
@@ -112,6 +113,8 @@ int WebPValidateConfig(const WebPConfig* const config) {
 | 
			
		||||
    return 0;
 | 
			
		||||
  if (config->alpha_compression < 0)
 | 
			
		||||
    return 0;
 | 
			
		||||
  if (config->alpha_filtering < 0)
 | 
			
		||||
    return 0;
 | 
			
		||||
  if (config->alpha_quality < 0 || config->alpha_quality > 100)
 | 
			
		||||
    return 0;
 | 
			
		||||
  return 1;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user