Skip to content

Commit

Permalink
Use rectangular test clips for the rotation test. (KhronosGroup#3284)
Browse files Browse the repository at this point in the history
Square ones don't expose all the possible issues that can occur with rotation.

Associated with http://crbug.com/1136205 .

Fixes: KhronosGroup#3283
  • Loading branch information
dalecurtis authored May 15, 2021
1 parent 4295495 commit 837205c
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions sdk/tests/conformance/textures/misc/video-rotation.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,32 +105,36 @@
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);

// These files were created by converting exif-orientation-test-1-normal.jpg to mp4
// These files were created by converting exif-orientation-test.psd to mp4
// files, rotating them using the transpose filter, and adding rotate metadata, all
// using the ffmpeg command-line tool.
//
// From sdk/tests/resources/ directory:
//
// 0:
// ffmpeg -noautorotate -i exif-orientation-test-1-normal.jpg -pix_fmt yuv420p -y temp.mp4 &&
// ffmpeg -noautorotate -i exif-orientation-originals\exif-orientation-test.psd -vf scale=128x96 -pix_fmt yuv420p -y temp.mp4
// ffmpeg -i temp.mp4 -c copy -metadata:s:v:0 rotate=0 video-rotation-0.mp4
// ffmpeg -noautorotate -i exif-orientation-test-1-normal.jpg -pix_fmt yuv420p -crf 0 -vcodec libvpx-vp9 -y temp.mp4 &&
// ffmpeg -noautorotate -i exif-orientation-originals\exif-orientation-test.psd -vf scale=128x96 -pix_fmt yuv420p -crf 0 -vcodec libvpx-vp9 -y temp.mp4
// ffmpeg -i temp.mp4 -c copy -metadata:s:v:0 rotate=0 video-rotation-0.vp9.mp4
//
// 90:
// ffmpeg -noautorotate -i exif-orientation-test-1-normal.jpg -vf "transpose=2" -pix_fmt yuv420p -y temp.mp4 &&
// ffmpeg -noautorotate -i exif-orientation-originals\exif-orientation-test.psd -vf scale=128x96,transpose=2 -pix_fmt yuv420p -y temp.mp4
// ffmpeg -i temp.mp4 -c copy -metadata:s:v:0 rotate=270 video-rotation-90.mp4
// ffmpeg -noautorotate -i exif-orientation-test-1-normal.jpg -vf "transpose=2" -pix_fmt yuv420p -crf 0 -vcodec libvpx-vp9 -y temp.mp4 &&
// ffmpeg -noautorotate -i exif-orientation-originals\exif-orientation-test.psd -vf scale=128x96,transpose=2 -pix_fmt yuv420p -crf 0 -vcodec libvpx-vp9 -y temp.mp4
// ffmpeg -i temp.mp4 -c copy -metadata:s:v:0 rotate=270 video-rotation-90.vp9.mp4
//
// 180:
// ffmpeg -noautorotate -i exif-orientation-test-1-normal.jpg -vf "transpose=2,transpose=2" -pix_fmt yuv420p -y temp.mp4 &&
// ffmpeg -noautorotate -i exif-orientation-originals\exif-orientation-test.psd -vf scale=128x96,transpose=2,transpose=2 -pix_fmt yuv420p -y temp.mp4
// ffmpeg -i temp.mp4 -c copy -metadata:s:v:0 rotate=180 video-rotation-180.mp4
// ffmpeg -noautorotate -i exif-orientation-test-1-normal.jpg -vf "transpose=2,transpose=2" -pix_fmt yuv420p -crf 0 -vcodec libvpx-vp9 -y temp.mp4 &&
// ffmpeg -noautorotate -i exif-orientation-originals\exif-orientation-test.psd -vf scale=128x96,transpose=2,transpose=2 -pix_fmt yuv420p -crf 0 -vcodec libvpx-vp9 -y temp.mp4
// ffmpeg -i temp.mp4 -c copy -metadata:s:v:0 rotate=180 video-rotation-180.vp9.mp4
//
// 270:
// ffmpeg -noautorotate -i exif-orientation-test-1-normal.jpg -vf "transpose=1" -pix_fmt yuv420p -y temp.mp4 &&
// ffmpeg -noautorotate -i exif-orientation-originals\exif-orientation-test.psd -vf scale=128x96,transpose=1 -pix_fmt yuv420p -y temp.mp4
// ffmpeg -i temp.mp4 -c copy -metadata:s:v:0 rotate=90 video-rotation-270.mp4
// ffmpeg -noautorotate -i exif-orientation-test-1-normal.jpg -vf "transpose=1" -pix_fmt yuv420p -crf 0 -vcodec libvpx-vp9 -y temp.mp4 &&
// ffmpeg -noautorotate -i exif-orientation-originals\exif-orientation-test.psd -vf scale=128x96,transpose=1 -pix_fmt yuv420p -crf 0 -vcodec libvpx-vp9 -y temp.mp4
// ffmpeg -i temp.mp4 -c copy -metadata:s:v:0 rotate=90 video-rotation-270.vp9.mp4

const filenames = [
"video-rotation-0",
"video-rotation-90",
Expand Down
Binary file modified sdk/tests/resources/video-rotation-0.mp4
Binary file not shown.
Binary file modified sdk/tests/resources/video-rotation-0.vp9.mp4
Binary file not shown.
Binary file modified sdk/tests/resources/video-rotation-180.mp4
Binary file not shown.
Binary file modified sdk/tests/resources/video-rotation-180.vp9.mp4
Binary file not shown.
Binary file modified sdk/tests/resources/video-rotation-270.mp4
Binary file not shown.
Binary file modified sdk/tests/resources/video-rotation-270.vp9.mp4
Binary file not shown.
Binary file modified sdk/tests/resources/video-rotation-90.mp4
Binary file not shown.
Binary file modified sdk/tests/resources/video-rotation-90.vp9.mp4
Binary file not shown.

0 comments on commit 837205c

Please sign in to comment.