[FFmpeg-devel,v2,2/5] tests/fate-run: add pixel format endian mode parameter for pixfmts function

Submitted by lance.lmwang@gmail.com on Oct. 30, 2019, 1:20 p.m.

Details

Message ID 20191030132056.21150-2-lance.lmwang@gmail.com
State New
Headers show

Commit Message

lance.lmwang@gmail.com Oct. 30, 2019, 1:20 p.m.
From: Limin Wang <lance.lmwang@gmail.com>

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
---
 tests/fate-run.sh | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/tests/fate-run.sh b/tests/fate-run.sh
index aec12c16a3..6ea0ab4f3c 100755
--- a/tests/fate-run.sh
+++ b/tests/fate-run.sh
@@ -385,6 +385,8 @@  pixfmts(){
     filter_args=$1
     prefilter_chain=$2
     nframes=${3:-1}
+    # be,le
+    endian_mode=$4
 
     showfiltfmts="$target_exec $target_path/libavfilter/tests/filtfmts${EXECSUF}"
     scale_exclude_fmts=${outfile}_scale_exclude_fmts
@@ -402,8 +404,13 @@  pixfmts(){
 
     outertest=$test
     for pix_fmt in $pix_fmts; do
-        test=$pix_fmt
-        video_filter "${prefilter_chain}format=$pix_fmt,$filter=$filter_args" -pix_fmt $pix_fmt -frames:v $nframes
+        if [ "$endian_mode" = "le" ]; then
+            output_pix_fmt=`echo $pix_fmt | sed "s/\(.*\)be/\1le/"`
+        else
+            output_pix_fmt=$pix_fmt
+        fi
+        test=$output_pix_fmt
+        video_filter "${prefilter_chain}format=$pix_fmt,$filter=$filter_args" -pix_fmt $output_pix_fmt -frames:v $nframes
     done
 
     rm $in_fmts $scale_in_fmts $scale_out_fmts $scale_exclude_fmts