bugGNU Octave - Bugs: bug #58451, [octave forge] (video) Unit test...


bug #58451: [octave forge] (video) Unit test VideoWriter fails on ppc64el

Submitted by:  Rafael Laboissiere <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 or Warning
Status:  None Assigned to:  None
Originator Name:  Open/Closed:  Open
Release:  other Operating System:  GNU/Linux

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Wed 27 May 2020 11:03:24 AM UTC, original submission:  

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);
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;
close (r);

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.

Rafael Laboissiere <rlaboiss>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

Attached Files
file #49179:  rainbow-x86_64.mp4 added by rlaboiss (12KiB - video/mp4)
file #49180:  rainbow-ppc64le.mp4 added by rlaboiss (44KiB - video/mp4)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by rlaboiss (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.




    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-05-27 rlaboiss Attached File- => Added rainbow-x86_64.mp4, #49179
        Attached File- => Added rainbow-ppc64le.mp4, #49180

    Back to the top

    Powered by Savane 3.5