diff options
author | James Almer <[email protected]> | 2025-09-15 00:21:39 -0300 |
---|---|---|
committer | James Almer <[email protected]> | 2025-09-17 02:17:09 +0000 |
commit | c6297b689f1a0ec28d45a9991bc02127e7a2abbd (patch) | |
tree | ccbc12f53ba6d2c4186b73ffce0fcfe3c4dabd47 /tests | |
parent | ca72b2d7123315c30296385871149bd1c78c2e9b (diff) |
tests/fate/image: add Exif rotation metadata tests
Signed-off-by: James Almer <[email protected]>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/fate/image.mak | 7 | ||||
-rw-r--r-- | tests/ref/fate/jpg-exif-autorotate | 64 | ||||
-rw-r--r-- | tests/ref/fate/jpg-exif-noautorotate | 63 | ||||
-rw-r--r-- | tests/ref/fate/jpg-exif-rotation-override | 73 |
4 files changed, 207 insertions, 0 deletions
diff --git a/tests/fate/image.mak b/tests/fate/image.mak index 98c4e0fdcc..3facd8aaa8 100644 --- a/tests/fate/image.mak +++ b/tests/fate/image.mak @@ -360,6 +360,13 @@ fate-jpg-rgb-5: CMD = framecrc -idct simple -i $(TARGET_SAMPLES)/jpg/jpg-8930-5. FATE_JPG_TRANSCODE-$(call TRANSCODE, MJPEG, MJPEG IMAGE_JPEG_PIPE, IMAGE_PNG_PIPE_DEMUXER PNG_DECODER SCALE_FILTER) += fate-jpg-icc fate-jpg-icc: CMD = transcode png_pipe $(TARGET_SAMPLES)/png1/lena-int_rgb24.png mjpeg "-vf scale" "" "-show_frames" +FATE_JPG_TRANSCODE-$(call TRANSCODE, TIFF, IMAGE2 IMAGE_JPEG_PIPE, IMAGE_TIFF_PIPE_DEMUXER MJPEG_DECODER SCALE_FILTER) += fate-jpg-exif-autorotate fate-jpg-exif-rotation-override +fate-jpg-exif-autorotate: CMD = transcode jpeg_pipe $(TARGET_SAMPLES)/jpg/Landscape_5.jpg image2 "-c:v tiff -vf scale" "" "-show_frames" +fate-jpg-exif-rotation-override: CMD = transcode jpeg_pipe $(TARGET_SAMPLES)/jpg/Landscape_5.jpg image2 "-c:v tiff -vf scale" "" "-show_frames" "" "" "-noautorotate -display_rotation 0" + +FATE_JPG_TRANSCODE-$(call TRANSCODE, PNG, IMAGE2 IMAGE_JPEG_PIPE, IMAGE_PNG_PIPE_DEMUXER MJPEG_DECODER SCALE_FILTER) += fate-jpg-exif-noautorotate +fate-jpg-exif-noautorotate: CMD = transcode jpeg_pipe $(TARGET_SAMPLES)/jpg/Landscape_5.jpg image2 "-c:v png -vf scale" "" "-show_frames" "" "-noautorotate" "-noautorotate" + FATE_JPG-$(call FRAMECRC, IMAGE2, MJPEG) += $(FATE_JPG) FATE_IMAGE_FRAMECRC += $(FATE_JPG-yes) FATE_IMAGE_TRANSCODE += $(FATE_JPG_TRANSCODE-yes) diff --git a/tests/ref/fate/jpg-exif-autorotate b/tests/ref/fate/jpg-exif-autorotate new file mode 100644 index 0000000000..07321ee336 --- /dev/null +++ b/tests/ref/fate/jpg-exif-autorotate @@ -0,0 +1,64 @@ +fb7725b8ccdfb537a600d9e16697078e *tests/data/fate/jpg-exif-autorotate.image2 +90658 tests/data/fate/jpg-exif-autorotate.image2 +#tb 0: 1/25 +#media_type 0: video +#codec_id 0: rawvideo +#dimensions 0: 300x200 +#sar 0: 1/1 +0, 0, 0, 1, 90000, 0x458a544e +[FRAME] +media_type=video +stream_index=0 +key_frame=1 +pts=0 +pts_time=0.000000 +pkt_dts=0 +pkt_dts_time=0.000000 +best_effort_timestamp=0 +best_effort_timestamp_time=0.000000 +duration=1 +duration_time=0.040000 +pkt_pos=0 +pkt_size=90658 +width=300 +height=200 +crop_top=0 +crop_bottom=0 +crop_left=0 +crop_right=0 +pix_fmt=yuv420p +sample_aspect_ratio=1:1 +pict_type=I +interlaced_frame=0 +top_field_first=0 +lossless=0 +repeat_pict=0 +color_range=unknown +color_space=unknown +color_primaries=unknown +color_transfer=unknown +chroma_location=unspecified +alpha_mode=unspecified +TAG:0x00FE= 0 +TAG:ImageWidth= 300 +TAG:ImageLength= 200 +TAG:BitsPerSample= 8, 8, 8 +TAG:Compression= 32773 +TAG:PhotometricInterpretation= 6 +TAG:StripOffsets= 8, 8085, 16195, 24339, 32486, 40643, 48791, 56934 + 65084, 73197, 81294, 89409 +TAG:SamplesPerPixel= 3 +TAG:RowsPerStrip= 18 +TAG:StripByteCounts= 8077, 8110, 8144, 8147, 8157, 8148, 8143, 8150 + 8113, 8097, 8115, 897 +TAG:XResolution= 72:1 +TAG:YResolution= 72:1 +TAG:ResolutionUnit= 2 +TAG:YCbCrSubSampling= 2, 2 +TAG:ReferenceBlackWhite= 15:1 , 235:1 , 128:1 , 240:1 + 128:1 , 240:1 +[SIDE_DATA] +side_data_type=EXIF metadata +size=360 +[/SIDE_DATA] +[/FRAME] diff --git a/tests/ref/fate/jpg-exif-noautorotate b/tests/ref/fate/jpg-exif-noautorotate new file mode 100644 index 0000000000..c18cdfff91 --- /dev/null +++ b/tests/ref/fate/jpg-exif-noautorotate @@ -0,0 +1,63 @@ +e3f1a70f55d680145fca061e4a515133 *tests/data/fate/jpg-exif-noautorotate.image2 +93327 tests/data/fate/jpg-exif-noautorotate.image2 +#tb 0: 1/25 +#media_type 0: video +#codec_id 0: rawvideo +#dimensions 0: 200x300 +#sar 0: 1/1 +0, 0, 0, 1, 180000, 0x4c43539a +[FRAME] +media_type=video +stream_index=0 +key_frame=1 +pts=0 +pts_time=0.000000 +pkt_dts=0 +pkt_dts_time=0.000000 +best_effort_timestamp=0 +best_effort_timestamp_time=0.000000 +duration=1 +duration_time=0.040000 +pkt_pos=0 +pkt_size=93327 +width=200 +height=300 +crop_top=0 +crop_bottom=0 +crop_left=0 +crop_right=0 +pix_fmt=rgb24 +sample_aspect_ratio=1:1 +pict_type=I +interlaced_frame=0 +top_field_first=0 +lossless=0 +repeat_pict=0 +color_range=pc +color_space=gbr +color_primaries=unknown +color_transfer=unknown +chroma_location=unspecified +alpha_mode=unspecified +TAG:XResolution= 1:1 +TAG:YResolution= 1:1 +TAG:ResolutionUnit= 1 +TAG:YCbCrPositioning= 1 +TAG:ImageWidth= 200 +TAG:ImageLength= 300 +TAG:ExifIFD/PixelXDimension= 200 +TAG:ExifIFD/PixelYDimension= 300 +[SIDE_DATA] +side_data_type=3x3 displaymatrix +displaymatrix= +00000000: 0 65536 0 +00000001: 65536 0 0 +00000002: 0 0 1073741824 + +rotation=-90 +[/SIDE_DATA] +[SIDE_DATA] +side_data_type=EXIF metadata +size=144 +[/SIDE_DATA] +[/FRAME] diff --git a/tests/ref/fate/jpg-exif-rotation-override b/tests/ref/fate/jpg-exif-rotation-override new file mode 100644 index 0000000000..e76ffb727f --- /dev/null +++ b/tests/ref/fate/jpg-exif-rotation-override @@ -0,0 +1,73 @@ +0fd5facf5235c64ddc984bbd83db6b89 *tests/data/fate/jpg-exif-rotation-override.image2 +90688 tests/data/fate/jpg-exif-rotation-override.image2 +#tb 0: 1/25 +#media_type 0: video +#codec_id 0: rawvideo +#dimensions 0: 200x300 +#sar 0: 1/1 +0, 0, 0, 1, 90000, 0x157a544e +[FRAME] +media_type=video +stream_index=0 +key_frame=1 +pts=0 +pts_time=0.000000 +pkt_dts=0 +pkt_dts_time=0.000000 +best_effort_timestamp=0 +best_effort_timestamp_time=0.000000 +duration=1 +duration_time=0.040000 +pkt_pos=0 +pkt_size=90688 +width=200 +height=300 +crop_top=0 +crop_bottom=0 +crop_left=0 +crop_right=0 +pix_fmt=yuv420p +sample_aspect_ratio=1:1 +pict_type=I +interlaced_frame=0 +top_field_first=0 +lossless=0 +repeat_pict=0 +color_range=unknown +color_space=unknown +color_primaries=unknown +color_transfer=unknown +chroma_location=unspecified +alpha_mode=unspecified +TAG:0x00FE= 0 +TAG:ImageWidth= 200 +TAG:ImageLength= 300 +TAG:BitsPerSample= 8, 8, 8 +TAG:Compression= 32773 +TAG:PhotometricInterpretation= 6 +TAG:StripOffsets= 8, 8464, 16902, 25347, 33787, 42187, 50628, 59079 + 67494, 75928, 84353 +TAG:SamplesPerPixel= 3 +TAG:RowsPerStrip= 28 +TAG:StripByteCounts= 8456, 8438, 8445, 8440, 8400, 8441, 8451, 8415 + 8434, 8425, 5979 +TAG:XResolution= 72:1 +TAG:YResolution= 72:1 +TAG:ResolutionUnit= 2 +TAG:YCbCrSubSampling= 2, 2 +TAG:ReferenceBlackWhite= 15:1 , 235:1 , 128:1 , 240:1 + 128:1 , 240:1 +[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=352 +[/SIDE_DATA] +[/FRAME] |