octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #58451] [octave forge] (video) Unit test Video


From: Rafael Laboissiere
Subject: [Octave-bug-tracker] [bug #58451] [octave forge] (video) Unit test VideoWriter fails on ppc64el
Date: Wed, 27 May 2020 07:03:26 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36

URL:
  <https://savannah.gnu.org/bugs/?58451>

                 Summary: [octave forge] (video) Unit test VideoWriter fails
on ppc64el
                 Project: GNU Octave
            Submitted by: rlaboiss
            Submitted on: Wed 27 May 2020 11:03:24 AM UTC
                Category: Octave Forge Package
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Unexpected Error
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
                 Release: other
         Discussion Lock: Any
        Operating System: GNU/Linux

    _______________________________________________________

Details:

The unit test of function VideoWriter of package video fails on a ppc64el
system.  This is probably due a MP4 compression problem, as written in lines
253 and 254 of VideoWriter.m:


%!   # this doesn't work well due to compression...
%!   # FIXME: a better idea to test write/read roundtrip


I tested the code below in both amd64 and ppc64el systems (it is essentially
the same as in the failing unit test):


fn = fullfile (tempdir(), sprintf ("rainbow-%s.mp4", uname ().machine));
width = 200;
height = 150;
nframes = 120;
p = permute (rainbow (width), [3 1 2]);
raw_video = zeros (height, width, 3, nframes);
w = VideoWriter (fn);
for k=1:nframes
  ps = circshift (p, k * 6);
  img = uint8 (255 * repmat (ps, height, 1));
  raw_video (:, :, :, k) = img;
  writeVideo (w, img);
endfor
close (w)
r = VideoReader (fn);
max_rel_err = -Inf;
for k=1:size (raw_video, 4)
  img = readFrame (r);
  d = double (img) - raw_video(:,:,:,k);
  rel_err = sum (abs(d(:)))/numel(d)/255;
  if rel_err > max_rel_err
    max_rel_err = rel_err;
  endif
endfor
close (r);
max_rel_err


It yields the following:

On amd64:


max_rel_err =  0.0081331


On ppc64el:


max_rel_err =  0.046289


The resulting rainbow-*.mp4 are attached to this bug report.

I think that the threshold 0.015 for the assert test should be increased.




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Wed 27 May 2020 11:03:24 AM UTC  Name: rainbow-x86_64.mp4  Size: 12KiB  
By: rlaboiss

<http://savannah.gnu.org/bugs/download.php?file_id=49179>
-------------------------------------------------------
Date: Wed 27 May 2020 11:03:24 AM UTC  Name: rainbow-ppc64le.mp4  Size: 44KiB 
 By: rlaboiss

<http://savannah.gnu.org/bugs/download.php?file_id=49180>

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?58451>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]