Since SDL has no audio buffer fullness info, one can get a much precise audio
clock based on the last time of the audio callback and the elapsed time since.
To achieve this I introduced the audio_current_pts and audio_current_pts_drift
variables (similar to video_current_pts and video_current_pts_drift) and
calculate them in the end of the audio callback, when VideoState->audio_clock
is already updated. The reference time I use is from the start of the audio
callback, because this way the amount of time used for audio decoding is not
interfereing with calculation.
I also replaced the audio_write_get_buf_size function with a calculated
variable because when the audio frame decoding is in progress audio_buf_size
and audio_buf_index are not stable, so using them from other threads are not a
good idea.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* qatar/master:
aacenc: Fix number of coefficients used in a LFE channel.
aacenc: Fix a segfault with grouped psymodel.
Merged-by: Michael Niedermayer <michaelni@gmx.at>
In apply_unsharp(), when y is >= height, prevent out-of-buffer reading
from src, read from the last buffer line in src2 instead.
The check was implemented in the original unsharp libmpcodecs code and
lost in the port.
This also fixes output discrepancy between the two filters.
Allow to cache more than one frame (e.g. for filters which return
more than one frame when avfilter_request_frame() is called on them),
and do not discard previously cached frames when a new one is added.
In lavfi_read_header(), use the pad index designated in the inout for
linking an output to a sink, rather than always 0. Fix link creation
for filters with more than one output (e.g. the split filter).
FFmpeg writes data_size as AU_UNKNOWN_SIZE, make demuxer not
fail when data_size is set to this value.
Should fix trac issue #394.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* qatar/master:
swscale: add dithering to yuv2yuvX_altivec_real
rv34: free+allocate buffer instead of reallocating it to preserve alignment
h264: add missing brackets.
swscale: use 15-bit intermediates for 9/10-bit scaling.
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'b2c087871dafc7d030b2d48457ddff597dfd4925':
Move x86util.asm from libavcodec/ to libavutil/.
Move x86inc.asm to libavutil/.
APIchanges: note error_recognition in lavf
lavf: add support for error_recognition, use it in avidec, and bump minor API version
avconv: change semantics of -map
avconv: get rid of new* options.
cmdutils: allow precisely specifying a stream for AVOptions.
configure: add missing CFLAGS to fix building on the HURD
libx264: Include hint for possible values for configuring libx264
cmdutils: allow ':'-separated modifiers in option names.
avconv: make -map_metadata work consistently with the other options
avconv: remove deprecated options.
avconv: make -map_chapters accept only the input file index.
Make a copy of ffmpeg under a new name -- avconv.
ffmpeg: add a warning stating that the program is deprecated.
Add weighted motion compensation for RV40 B-frames
RV3/4: calculate B-frame motion weights once per frame
Move RV3/4-specific DSP functions into their own context
mjpeg: propagate decode errors from ff_mjpeg_decode_sos and ff_mjpeg_decode_dqt
h264: notice memory allocation failure
Conflicts:
.gitignore
Makefile
cmdutils.c
configure
doc/ffplay.texi
doc/ffprobe.texi
doc/ffserver.texi
libavcodec/libx264.c
libavformat/avformat.h
libavformat/avidec.c
libavformat/version.h
tests/lavf-regression.sh
tests/lavfi-regression.sh
Merged-by: Michael Niedermayer <michaelni@gmx.at>
It just does that part in scalar form, I doubt using a vector store
over 2 array would speed it up particularly.
The function should be written to not use a scratch buffer.