swscale: add 14bit support to the "MMX/SSE2/SSSE3/SSE4 versions for horizontal scaling"
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
		
							parent
							
								
									7700846cf6
								
							
						
					
					
						commit
						1eb8014b49
					
				| @ -411,11 +411,13 @@ SCALE_FUNC %1, %2, X, X8, %3, 7, %4 | |||||||
| SCALE_FUNCS  8, 15, %1, %2 | SCALE_FUNCS  8, 15, %1, %2 | ||||||
| SCALE_FUNCS  9, 15, %1, %3 | SCALE_FUNCS  9, 15, %1, %3 | ||||||
| SCALE_FUNCS 10, 15, %1, %3 | SCALE_FUNCS 10, 15, %1, %3 | ||||||
|  | SCALE_FUNCS 14, 15, %1, %3 | ||||||
| SCALE_FUNCS 16, 15, %1, %4 | SCALE_FUNCS 16, 15, %1, %4 | ||||||
| %endif ; !sse4 | %endif ; !sse4 | ||||||
| SCALE_FUNCS  8, 19, %1, %2 | SCALE_FUNCS  8, 19, %1, %2 | ||||||
| SCALE_FUNCS  9, 19, %1, %3 | SCALE_FUNCS  9, 19, %1, %3 | ||||||
| SCALE_FUNCS 10, 19, %1, %3 | SCALE_FUNCS 10, 19, %1, %3 | ||||||
|  | SCALE_FUNCS 14, 19, %1, %3 | ||||||
| SCALE_FUNCS 16, 19, %1, %4 | SCALE_FUNCS 16, 19, %1, %4 | ||||||
| %endmacro | %endmacro | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -187,10 +187,12 @@ extern void ff_hscale ## from_bpc ## to ## to_bpc ## _ ## filter_n ## _ ## opt( | |||||||
|     SCALE_FUNC(filter_n,  8, 15, opt); \ |     SCALE_FUNC(filter_n,  8, 15, opt); \ | ||||||
|     SCALE_FUNC(filter_n,  9, 15, opt); \ |     SCALE_FUNC(filter_n,  9, 15, opt); \ | ||||||
|     SCALE_FUNC(filter_n, 10, 15, opt); \ |     SCALE_FUNC(filter_n, 10, 15, opt); \ | ||||||
|  |     SCALE_FUNC(filter_n, 14, 15, opt); \ | ||||||
|     SCALE_FUNC(filter_n, 16, 15, opt); \ |     SCALE_FUNC(filter_n, 16, 15, opt); \ | ||||||
|     SCALE_FUNC(filter_n,  8, 19, opt); \ |     SCALE_FUNC(filter_n,  8, 19, opt); \ | ||||||
|     SCALE_FUNC(filter_n,  9, 19, opt); \ |     SCALE_FUNC(filter_n,  9, 19, opt); \ | ||||||
|     SCALE_FUNC(filter_n, 10, 19, opt); \ |     SCALE_FUNC(filter_n, 10, 19, opt); \ | ||||||
|  |     SCALE_FUNC(filter_n, 14, 19, opt); \ | ||||||
|     SCALE_FUNC(filter_n, 16, 19, opt) |     SCALE_FUNC(filter_n, 16, 19, opt) | ||||||
| 
 | 
 | ||||||
| #define SCALE_FUNCS_MMX(opt) \ | #define SCALE_FUNCS_MMX(opt) \ | ||||||
| @ -233,7 +235,10 @@ void ff_sws_init_swScale_mmx(SwsContext *c) | |||||||
|     } else if (c->srcBpc == 10) { \ |     } else if (c->srcBpc == 10) { \ | ||||||
|         hscalefn = c->dstBpc <= 10 ? ff_hscale10to15_ ## filtersize ## _ ## opt2 : \ |         hscalefn = c->dstBpc <= 10 ? ff_hscale10to15_ ## filtersize ## _ ## opt2 : \ | ||||||
|                                      ff_hscale10to19_ ## filtersize ## _ ## opt1; \ |                                      ff_hscale10to19_ ## filtersize ## _ ## opt1; \ | ||||||
|     } else if(c->srcBpc == 16 && !((c->srcFormat==PIX_FMT_PAL8||isAnyRGB(c->srcFormat)) && av_pix_fmt_descriptors[c->srcFormat].comp[0].depth_minus1<15)) { \ |     } else if (c->srcBpc == 14 || ((c->srcFormat==PIX_FMT_PAL8||isAnyRGB(c->srcFormat)) && av_pix_fmt_descriptors[c->srcFormat].comp[0].depth_minus1<15)) { \ | ||||||
|  |         hscalefn = c->dstBpc <= 10 ? ff_hscale14to15_ ## filtersize ## _ ## opt2 : \ | ||||||
|  |                                      ff_hscale14to19_ ## filtersize ## _ ## opt1; \ | ||||||
|  |     } else { /* c->srcBpc == 16 */ \ | ||||||
|         hscalefn = c->dstBpc <= 10 ? ff_hscale16to15_ ## filtersize ## _ ## opt2 : \ |         hscalefn = c->dstBpc <= 10 ? ff_hscale16to15_ ## filtersize ## _ ## opt2 : \ | ||||||
|                                      ff_hscale16to19_ ## filtersize ## _ ## opt1; \ |                                      ff_hscale16to19_ ## filtersize ## _ ## opt1; \ | ||||||
|     } \ |     } \ | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user