mirror of
				https://github.com/nyanmisaka/ffmpeg-rockchip.git
				synced 2025-11-01 04:53:04 +08:00 
			
		
		
		
	sws: rgb has no range, avoid random results if the user tries to mess with it anyway.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
		| @@ -789,11 +789,17 @@ int sws_setColorspaceDetails(struct SwsContext *c, const int inv_table[4], | |||||||
|     memcpy(c->srcColorspaceTable, inv_table, sizeof(int) * 4); |     memcpy(c->srcColorspaceTable, inv_table, sizeof(int) * 4); | ||||||
|     memcpy(c->dstColorspaceTable, table, sizeof(int) * 4); |     memcpy(c->dstColorspaceTable, table, sizeof(int) * 4); | ||||||
|  |  | ||||||
|  |     if(!isYUV(c->dstFormat) && !isGray(c->dstFormat)) | ||||||
|  |         dstRange = 0; | ||||||
|  |     if(!isYUV(c->srcFormat) && !isGray(c->srcFormat)) | ||||||
|  |         srcRange = 0; | ||||||
|  |  | ||||||
|     c->brightness = brightness; |     c->brightness = brightness; | ||||||
|     c->contrast   = contrast; |     c->contrast   = contrast; | ||||||
|     c->saturation = saturation; |     c->saturation = saturation; | ||||||
|     c->srcRange   = srcRange; |     c->srcRange   = srcRange; | ||||||
|     c->dstRange   = dstRange; |     c->dstRange   = dstRange; | ||||||
|  |  | ||||||
|     if (isYUV(c->dstFormat) || isGray(c->dstFormat)) |     if (isYUV(c->dstFormat) || isGray(c->dstFormat)) | ||||||
|         return -1; |         return -1; | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Michael Niedermayer
					Michael Niedermayer