This patch changes existing mathematical functions with faster
ones. Speeds up encoding more than 10%. Tested on x86 and
MIPS platforms.
Signed-off-by: Bojan Zivkovic <bojan@mips.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* qatar/master:
asf: only set index_read if the index contained entries.
cabac: add overread protection to BRANCHLESS_GET_CABAC().
cabac: increment jump locations by one in callers of BRANCHLESS_GET_CABAC().
cabac: remove unused argument from BRANCHLESS_GET_CABAC_UPDATE().
cabac: use struct+offset instead of memory operand in BRANCHLESS_GET_CABAC().
h264: add overread protection to get_cabac_bypass_sign_x86().
h264: reindent get_cabac_bypass_sign_x86().
h264: use struct offsets in get_cabac_bypass_sign_x86().
h264: fix overreads in cabac reader.
wmall: fix seeking.
lagarith: fix buffer overreads.
dvdec: drop unnecessary dv_tablegen.h #include
build: fix doc generation errors in parallel builds
Replace memset(0) by zero initializations.
faandct: Remove FAAN_POSTSCALE define and related code.
dvenc: print allowed profiles if the video doesn't conform to any of them.
avcodec_encode_{audio,video}: only reallocate output packet when it has non-zero size.
FATE: add a test for vp8 with changing frame size.
fate: add kgv1 fate test.
oggdec: calculate correct timestamps in Ogg/FLAC
Conflicts:
libavcodec/4xm.c
libavcodec/cook.c
libavcodec/dvdata.c
libavcodec/dvdsubdec.c
libavcodec/lagarith.c
libavcodec/lagarithrac.c
libavcodec/utils.c
tests/fate/video.mak
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* qatar/master:
Remove ffmpeg.
aacenc: Simplify windowing
aacenc: Move saved overlap samples to the beginning of the same buffer as incoming samples.
aacenc: Deinterleave input samples before processing.
aacenc: Store channel count in AACEncContext.
aacenc: Move Q^3/4 calculation to it's own table
aacenc: Request normalized float samples instead of converting s16 samples to float.
aacpsy: Replace an if with FFMAX in LAME windowing.
aacenc: cosmetics, replace 'rd' with 'bits' in codebook_trellis_rate to make it more clear what is being calculated.
aacpsy: cosmetics, change a FIXME to a NOTE about subshort comparisons
aacenc: cosmetics: move init() and end() to the bottom of the file.
aacenc: aac_encode_init() cleanup
XWD encoder and decoder
vc1: don't read the interpfrm and bfraction elements for interlaced frames
mxfdec: fix memleak on mxf_read_close()
westwood: split the AUD and VQA demuxers into separate files.
Conflicts:
.gitignore
Changelog
Makefile
configure
doc/ffmpeg.texi
ffmpeg.c
libavcodec/Makefile
libavcodec/aacenc.c
libavcodec/allcodecs.c
libavcodec/avcodec.h
libavcodec/version.h
libavformat/Makefile
libavformat/img2.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* qatar/master:
rational-test: Add proper main() declaration to fix gcc warnings.
configure: Add vdpau and dxva2 to configure results output.
Remove unused, never built libavutil/pca.[ch]
matroskadec: forward parsing errors to caller.
av_find_stream_info: simplify EAGAIN handling.
aacenc: Fix determination of Mid/Side Mode.
psymodel: Remove the single channel analysis function
aacenc: Implement dummy channel group analysis that just calls the single channel analysis for each channel.
psymodel: Add channels and channel groups to the psymodel.
ARM: remove check for PLD instruction
fate: move amr[nw]b test rules into separate files
ogg: fix double free when finding length of small chained oggs.
swscale: implement >8bit scaling support.
build: fix creation of tools dir with make 3.81
build: Mark all-yes Makefile target as phony.
pixfmt: fix YUV422/444 wrong endian comment
build: create output directories as needed
Add new yuv444 pixfmts to avcodec_align_dimensions2
Conflicts:
Makefile
configure
libavutil/pca.c
libavutil/pca.h
libavutil/pixfmt.h
libswscale/swscale.c
libswscale/utils.c
libswscale/x86/swscale_template.c
tests/ref/lavfi/pixdesc
tests/ref/lavfi/pixfmts_copy
tests/ref/lavfi/pixfmts_null
tests/ref/lavfi/pixfmts_scale
tests/ref/lavfi/pixfmts_vflip
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* qatar/master:
Handle unicode file names on windows
rtp: Rename the open/close functions to alloc/free
Lowercase all ff* program names.
Refer to ff* tools by their lowercase names.
NOT Pulled Replace more FFmpeg instances by Libav or ffmpeg.
Replace `` by $() syntax in shell scripts.
patcheck: Allow overiding grep program(s) through environment variables.
NOT Pulled Remove stray libavcore and _g binary references.
vorbis: Rename decoder/encoder files to follow general file naming scheme.
aacenc: Fix whitespace after last commit.
cook: Fix small typo in av_log_ask_for_sample message.
aacenc: Finish 3GPP psymodel analysis for non mid/side cases.
Remove RDFT dependency from AAC decoder.
Add some debug log messages to AAC extradata
Fix mov debug (u)int64_t format strings.
bswap: use native types for av_bwap16().
doc: FLV muxing is supported.
applehttp: Handle AES-128 encrypted streams
Add a protocol handler for AES CBC decryption with PKCS7 padding
doc: Mention that DragonFly BSD requires __BSD_VISIBLE set
Conflicts:
ffplay.c
ffprobe.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
There is still are still a few sections missing relating to TNS (not present)
and mid/side (contains other bugs).
Overall this improves quality, and vastly improves rate-control.
Signed-off-by: Martin Storsjö <martin@martin.st>
3GPP:
Remove ffac from and move min_snr out of AacPsyBand.
Rearrange AacPsyCoeffs to make it easier to implement energy spreading.
Rename the band[] array to bands[]
Copy energies and thresholds at the end of analysis.
LAME:
Use a loop instead of an if chain in LAME windowing.
The 3GPP spec uses the following calculation for high spreading:
thr'_spr = max(thr_scaled, s_h(n) * thr_scaled(n-1))
where, n is defined as the current band, and s_h() is defined as "[...] the
distance of adjacent bands in Bark and a constant slope that is 15 dB/Bark
[...]". This is a little ambiguous as you would assume you want the Bark
width of the previous band for this calculation. However, this assumption
appears to be incorrect, and you really want the Bark width of the current
band. Coincidentally this is exactly what the spec calls for! =P
This noticeably improves Tom's Diner at low bitrates (I tested at 64kbps,
with mid/side disabled).
Patch by: Nathan Caldwell <saintdev@gmail.com>
Originally committed as revision 25622 to svn://svn.ffmpeg.org/ffmpeg/trunk
This greatly improves bitrate handling. You will now get within a few
kbps of your requested bitrate instead of 20-40kbps higher.
There is absolutely no analog to this line in the 3GPP spec, that I
can find.
patch by Nathan Caldwell saintdev (at) gmail
Originally committed as revision 25589 to svn://svn.ffmpeg.org/ffmpeg/trunk
Removing the modification vastly improves quality (at a slight bitrate
cost) for some samples. castanets.wav is a good example. The closest
equivalent I see to the modification in the 3GPP spec is a similar
modification (over a specific frequency range) when TNS is used.
This also changes the threshold-in-quiet calculation to match the
3GPP spec.
patch by Nathan Caldwell saintdev (at) gmail
Originally committed as revision 25588 to svn://svn.ffmpeg.org/ffmpeg/trunk
According to the 3GPP spec:
"Thus the pre-echo control is inactive for the first short window (but
not all short windows in a short frame) after a start block and for
all frames with a stop window sequence."
Currently, pre-echo control is only run when the current frame is not
a short frame, and the previous frame is not a short frame.
patch by Nathan Caldwell saintdev (at) gmail
Originally committed as revision 25587 to svn://svn.ffmpeg.org/ffmpeg/trunk
I used the same loop counter for the inner and outer initalization loops.
This caused initalization to only run for the first channel. This in turn lead
to any channel other than the first using only short blocks.
Patch by Nathan Caldwell, saintdev at gmail
Originally committed as revision 25566 to svn://svn.ffmpeg.org/ffmpeg/trunk
This performs quite a bit better than the current 3GPP-inspired window decision
on all the samples I have tested. On the castanets.wav sample it performs very
similar to iTunes window selection, and seems to perform better than Nero.
On fatboy.wav, it seems to perform at least as good as iTunes, if not better.
Nero performs horribly on this sample.
Patch by: Nathan Caldwell <saintdev@gmail.com>
Originally committed as revision 24892 to svn://svn.ffmpeg.org/ffmpeg/trunk
This allows cleaner implementation of other psymodels using the existing
structs. It also will make it easier to interchange individual parts of
the psymodel to create hybrid models.
Patch by: Nathan Caldwell <saintdev@gmail.com>
Originally committed as revision 24890 to svn://svn.ffmpeg.org/ffmpeg/trunk
Fix the MDCT line to frequency calculation for the first line in each sfb.
Use this value to calculate ATH.
Originally committed as revision 24231 to svn://svn.ffmpeg.org/ffmpeg/trunk
This keeps the encoder from switching away from an wight short sequence
prematurely when attacks are detected two frames in a row. It also allows for
the legal and useful LONG_STOP_SEQUENCE to LONG_START_SEQUENCE transition.
Originally committed as revision 23870 to svn://svn.ffmpeg.org/ffmpeg/trunk