summaryrefslogtreecommitdiff
path: root/scripts/vsp-lib.sh
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>2016-08-17 16:29:49 +0000
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2017-03-03 20:02:53 +0200
commit264b400e43a910f016627e0682d681f3623985a6 (patch)
tree75aba40409d3dc42f1cc518c3309e06f507f5042 /scripts/vsp-lib.sh
parentcddafa5ad2ef1e45a3802b36279b05bb3530f816 (diff)
vsp-lib: Add option to specify histogram type
There are two kinds of histogram that can be generated, HGO and HGT. Let the histogram compare function know which type it should use. Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'scripts/vsp-lib.sh')
-rwxr-xr-xscripts/vsp-lib.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/vsp-lib.sh b/scripts/vsp-lib.sh
index 4f2c54d..fd3ce55 100755
--- a/scripts/vsp-lib.sh
+++ b/scripts/vsp-lib.sh
@@ -188,8 +188,9 @@ reference_histogram() {
local file=$1
local format=$2
local size=$3
+ local type=$4
- $genimage -i $format -f $format -s $size -H $file \
+ $genimage -i $format -f $format -s $size -H $file --histogram-type $type \
frames/frame-reference-1024x768.pnm
}
@@ -322,12 +323,13 @@ compare_histogram() {
compare_histograms() {
local format=$__vsp_wpf_format
+ local type=$__vsp_histo_type
local wpf=$__vsp_wpf_index
local fmt=$(echo $format | tr '[:upper:]' '[:lower:]')
local size=$(vsp1_entity_get_size wpf.$wpf 1)
- reference_histogram ${frames_dir}ref-histogram.bin $format $size
+ reference_histogram ${frames_dir}ref-histogram.bin $format $size $type
local result="pass"
for histo in ${frames_dir}histo-*.bin ; do
@@ -452,6 +454,7 @@ pipe_reset() {
$mediactl -d $mdev -r
__vsp_bru_inputs=
+ __vsp_histo_type=
__vsp_rpf_format=
__vsp_wpf_index=0
__vsp_wpf_format=
@@ -596,6 +599,7 @@ format_rpf_hgo() {
$mediactl -d $mdev -V "'$dev wpf.0':1 [fmt:$format/$size]"
$mediactl -d $mdev -V "'$dev hgo':0 [fmt:$format/$size $crop $compose]"
+ __vsp_histo_type=hgo
__vsp_rpf_format=$1
__vsp_wpf_format=$1
}