You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-11-23 21:54:53 +02:00
avcodec/decode: treat orientation 1 as valid displaymatrix
Since 9dc79241d9 we now always pop the
orientation off of the IFD and use a display matrix instead. This means
we should not produce a warning and refuse if the orientation field
indicates a default orientation (i.e. 1).
Signed-off-by: Leo Izen <leo.izen@gmail.com>
Reported-by: Ramiro Polla <ramiro.polla@gmail.com>
This commit is contained in:
@@ -2337,7 +2337,7 @@ static int attach_displaymatrix(AVCodecContext *avctx, AVFrame *frame, int orien
|
||||
int32_t *matrix;
|
||||
int ret;
|
||||
/* invalid orientation */
|
||||
if (orientation < 2 || orientation > 8)
|
||||
if (orientation < 1 || orientation > 8)
|
||||
return AVERROR_INVALIDDATA;
|
||||
ret = ff_frame_new_side_data(avctx, frame, AV_FRAME_DATA_DISPLAYMATRIX, sizeof(int32_t) * 9, &sd);
|
||||
if (ret < 0) {
|
||||
|
||||
@@ -34,7 +34,6 @@ alpha_mode=unspecified
|
||||
TAG:ImageDescription=
|
||||
TAG:Make=Canon
|
||||
TAG:Model=Canon PowerShot SX200 IS
|
||||
TAG:Orientation= 1
|
||||
TAG:XResolution= 180:1
|
||||
TAG:YResolution= 180:1
|
||||
TAG:ResolutionUnit= 2
|
||||
@@ -199,7 +198,16 @@ TAG:ExifIFD/WhiteBalance= 0
|
||||
TAG:ExifIFD/DigitalZoomRatio= 4000:4000
|
||||
TAG:ExifIFD/SceneCaptureType= 0
|
||||
[SIDE_DATA]
|
||||
side_data_type=3x3 displaymatrix
|
||||
displaymatrix=
|
||||
00000000: 65536 0 0
|
||||
00000001: 0 65536 0
|
||||
00000002: 0 0 1073741824
|
||||
|
||||
rotation=0
|
||||
[/SIDE_DATA]
|
||||
[SIDE_DATA]
|
||||
side_data_type=EXIF metadata
|
||||
size=3297
|
||||
size=3285
|
||||
[/SIDE_DATA]
|
||||
[/FRAME]
|
||||
|
||||
@@ -43,7 +43,6 @@ TAG:0x010A= 1
|
||||
TAG:0x010D=image_small.tiff
|
||||
TAG:StripOffsets= 8, 7808, 15608, 23408, 31208, 39008, 46808, 54608
|
||||
62408
|
||||
TAG:Orientation= 1
|
||||
TAG:SamplesPerPixel= 3
|
||||
TAG:RowsPerStrip= 13
|
||||
TAG:StripByteCounts= 7800, 7800, 7800, 7800, 7800, 7800, 7800, 7800
|
||||
@@ -54,7 +53,16 @@ TAG:PlanarConfiguration= 1
|
||||
TAG:ResolutionUnit= 3
|
||||
TAG:Software=ImageMagick 6.5.8-0 2010-02-09 Q16 http://www.imagemagick.org
|
||||
[SIDE_DATA]
|
||||
side_data_type=3x3 displaymatrix
|
||||
displaymatrix=
|
||||
00000000: 65536 0 0
|
||||
00000001: 0 65536 0
|
||||
00000002: 0 0 1073741824
|
||||
|
||||
rotation=0
|
||||
[/SIDE_DATA]
|
||||
[SIDE_DATA]
|
||||
side_data_type=EXIF metadata
|
||||
size=403
|
||||
size=391
|
||||
[/SIDE_DATA]
|
||||
[/FRAME]
|
||||
|
||||
@@ -34,7 +34,6 @@ alpha_mode=unspecified
|
||||
TAG:ImageDescription=
|
||||
TAG:Make=Canon
|
||||
TAG:Model=Canon PowerShot SX200 IS
|
||||
TAG:Orientation= 1
|
||||
TAG:XResolution= 180:1
|
||||
TAG:YResolution= 180:1
|
||||
TAG:ResolutionUnit= 2
|
||||
@@ -199,7 +198,16 @@ TAG:ExifIFD/WhiteBalance= 0
|
||||
TAG:ExifIFD/DigitalZoomRatio= 4000:4000
|
||||
TAG:ExifIFD/SceneCaptureType= 0
|
||||
[SIDE_DATA]
|
||||
side_data_type=3x3 displaymatrix
|
||||
displaymatrix=
|
||||
00000000: 65536 0 0
|
||||
00000001: 0 65536 0
|
||||
00000002: 0 0 1073741824
|
||||
|
||||
rotation=0
|
||||
[/SIDE_DATA]
|
||||
[SIDE_DATA]
|
||||
side_data_type=EXIF metadata
|
||||
size=9718
|
||||
size=3285
|
||||
[/SIDE_DATA]
|
||||
[/FRAME]
|
||||
|
||||
Reference in New Issue
Block a user