Seems like clang might be miscompiling it and causing a signed integer overflow,
making a FATE test fail.
Doesn't seem to affect performance, it only runs on the ESC codebook.
Reviewed-by: Claudio Freire <klaussfreire@gmail.com>
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Otherwise probing and stream analisys will report a correct coded size
but an empty visible size.
Approved by: kieran
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Note some tests need vsync drop to produce exact timestamps, these seem not to
need it. quite likely many more dont need it either, ive not checked beyond finding
one that needs it and the ones which have it removed
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Original mail and my own followup on ffmpeg-user earlier today:
I have a device sending out a MJPEG/RTP stream on a low quality setting.
Decoding and displaying the video with libavformat results in a washed
out, low contrast, greyish image. Playing the same stream with VLC results
in proper color representation.
Screenshots for comparison:
http://zevv.nl/div/libav/shot-ffplay.jpghttp://zevv.nl/div/libav/shot-vlc.jpg
A pcap capture of a few seconds of video and SDP file for playing the
stream are available at
http://zevv.nl/div/libav/mjpeg.pcaphttp://zevv.nl/div/libav/mjpeg.sdp
I believe the problem might be in the calculation of the quantization
tables in the function create_default_qtables(), the attached patch
solves the issue for me.
The problem is that the argument 'q' is of the type uint8_t. According to the
JPEG standard, if 1 <= q <= 50, the scale factor 'S' should be 5000 / Q.
Because the create_default_qtables() reuses the variable 'q' to store the
result of this calculation, for small values of q < 19, q wil subsequently
overflow and give wrong results in the calculated quantization tables. The
patch below uses a new variable 'S' (same name as in RFC2435) with the proper
range to store the result of the division.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
All tests were in the main method which produces a long main. Now, each test
is in his own method.
I think this produces a more clear code and follows more with the main
priority of FFmpeg "simplicity and small code size"
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
No new reference samples are needed for this as the file already exists
for testing the bitstream filter
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
No idea why in commit 01ecb7172b the
checks were removed; this can lead to NULL pointer dereferences. This
effectively reverts that portion of the commit.
Reviewed-by: Benoit Fouet <benoit.fouet@free.fr>
Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanag@gmail.com>