avcodec/jpeglsdec: Avoid get_bits_long() where possible
It is possible here, because the values of ff_log2_run used here are actually in the range 0..15 given that run_index is in the range 0..31. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
		
							parent
							
								
									52c1e9e530
								
							
						
					
					
						commit
						ffb000fff8
					
				@ -277,7 +277,7 @@ static inline int ls_decode_line(JLSState *state, MJpegDecodeContext *s,
 | 
			
		||||
            /* decode aborted run */
 | 
			
		||||
            r = ff_log2_run[state->run_index[comp]];
 | 
			
		||||
            if (r)
 | 
			
		||||
                r = get_bits_long(&s->gb, r);
 | 
			
		||||
                r = get_bits(&s->gb, r);
 | 
			
		||||
            if (x + r * stride > w) {
 | 
			
		||||
                r = (w - x) / stride;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user