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

lance.lmwang at gmail.com lance.lmwang at gmail.com
Wed Oct 30 15:20:53 EET 2019


From: Limin Wang <lance.lmwang at gmail.com>

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

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
-- 
2.21.0



More information about the ffmpeg-devel mailing list