You've already forked FFmpeg
							
							
				mirror of
				https://github.com/FFmpeg/FFmpeg.git
				synced 2025-10-30 23:18:11 +02:00 
			
		
		
		
	swscale/la: Add output_lasx.c file.
ffmpeg -i 1_h264_1080p_30fps_3Mbps.mp4 -f rawvideo -s 640x480 -pix_fmt rgb24 -y /dev/null -an before: 150fps after: 183fps Signed-off-by: Hao Chen <chenhao@loongson.cn> Reviewed-by: yinshiyou-hf@loongson.cn Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
		
				
					committed by
					
						 Michael Niedermayer
						Michael Niedermayer
					
				
			
			
				
	
			
			
			
						parent
						
							74d09b068d
						
					
				
				
					commit
					925ac0da32
				
			| @@ -2,4 +2,5 @@ OBJS-$(CONFIG_SWSCALE)      += loongarch/swscale_init_loongarch.o | ||||
| LASX-OBJS-$(CONFIG_SWSCALE) += loongarch/swscale_lasx.o \ | ||||
|                                loongarch/input_lasx.o   \ | ||||
|                                loongarch/yuv2rgb_lasx.o \ | ||||
|                                loongarch/rgb2rgb_lasx.o | ||||
|                                loongarch/rgb2rgb_lasx.o \ | ||||
|                                loongarch/output_lasx.o | ||||
|   | ||||
							
								
								
									
										1982
									
								
								libswscale/loongarch/output_lasx.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1982
									
								
								libswscale/loongarch/output_lasx.c
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -28,6 +28,7 @@ av_cold void ff_sws_init_swscale_loongarch(SwsContext *c) | ||||
| { | ||||
|     int cpu_flags = av_get_cpu_flags(); | ||||
|     if (have_lasx(cpu_flags)) { | ||||
|         ff_sws_init_output_loongarch(c); | ||||
|         if (c->srcBpc == 8) { | ||||
|             if (c->dstBpc <= 14) { | ||||
|                 c->hyScale = c->hcScale = ff_hscale_8_to_15_lasx; | ||||
| @@ -47,6 +48,8 @@ av_cold void ff_sws_init_swscale_loongarch(SwsContext *c) | ||||
|             } | ||||
|             break; | ||||
|         } | ||||
|         if (c->dstBpc == 8) | ||||
|             c->yuv2planeX = ff_yuv2planeX_8_lasx; | ||||
|     } | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -69,4 +69,10 @@ void ff_interleave_bytes_lasx(const uint8_t *src1, const uint8_t *src2, | ||||
|                               uint8_t *dest, int width, int height, | ||||
|                               int src1Stride, int src2Stride, int dstStride); | ||||
|  | ||||
| av_cold void ff_sws_init_output_loongarch(SwsContext *c); | ||||
|  | ||||
| void ff_yuv2planeX_8_lasx(const int16_t *filter, int filterSize, | ||||
|                           const int16_t **src, uint8_t *dest, int dstW, | ||||
|                           const uint8_t *dither, int offset); | ||||
|  | ||||
| #endif /* SWSCALE_LOONGARCH_SWSCALE_LOONGARCH_H */ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user