summaryrefslogtreecommitdiffstats
path: root/libavcodec/mips
Commit message (Collapse)AuthorAgeFilesLines
* all: Make header guard names consistentTimothy Gu2016-01-318-24/+24
|
* amrwbdec_mips: Add missing ff_ prefixTimothy Gu2016-01-282-3/+3
|
* AAC encoder: various fixes in M/S codingClaudio Freire2016-01-131-15/+18
| | | | | | | | | | | | | | | | | | | | 1. Fix sf_idx and band_type addressing to address only the first subwindow in the group (others could hold garbage values) 2. Don't step on ms_mask when is_mask is set. I/S selection already sets the ms_mask properly and shouldn't be overridden. 3. Use mid/sid cb/sf when computing coding error, as should be since those are the cb/sfs that will eventually be set. 4. Fix distortion computation on multi-subwindow groups (was subtracting the bits terms multiple times) 5. Clear ms_mask when one side uses PNS and the other doesn't. When using PNS, ms_mask signals correlated noise, which can be detected just like regular M/S detection, so we don't skip noise bands, but when only one side uses PNS setting the flag can confuse some encoders, so avoid that.
* mips: rename mipsdspr1 to mipsdspVicente Olivert Riera2015-12-043-5/+5
| | | | | Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* AAC encoder: improve SF range utilizationClaudio Freire2015-12-022-92/+158
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch does 4 things, all of which interact and thus it woudln't be possible to commit them separately without causing either quality regressions or assertion failures. Fate comparison targets don't all reflect improvements in quality, yet listening tests show substantially improved quality and stability. 1. Increase SF range utilization. The spec requires SF delta values to be constrained within the range -60..60. The previous code was applying that range to the whole SF array and not only the deltas of consecutive values, because doing so requires smarter code: zeroing or otherwise skipping a band may invalidate lots of SF choices. This patch implements that logic to allow the coders to utilize the full dynamic range of scalefactors, increasing quality quite considerably, and fixing delta-SF-related assertion failures, since now the limitation is enforced rather than asserted. 2. PNS tweaks The previous modification makes big improvements in twoloop's efficiency, and every time that happens PNS logic needs to be tweaked accordingly to avoid it from stepping all over twoloop's decisions. This patch includes modifications of the sort. 3. Account for lowpass cutoff during PSY analysis The closer PSY's allocation is to final allocation the better the quality is, and given these modifications, twoloop is now very efficient at avoiding holes. Thus, to compute accurate thresholds, PSY needs to account for the lowpass applied implicitly during twoloop (by zeroing high bands). This patch makes twoloop set the cutoff in psymodel's context the first time it runs, and makes PSY account for it during threshold computation, making PE and threshold computations closer to the final allocation and thus achieving better subjective quality. 4. Tweaks to RC lambda tracking loop in relation to PNS Without this tweak some corner cases cause quality regressions. Basically, lambda needs to react faster to overall bitrate efficiency changes since now PNS can be quite successful in enforcing maximum bitrates, when PSY allocates too many bits to the lower bands, suppressing the signals RC logic uses to lower lambda in those cases and causing aggressive PNS. This tweak makes PNS much less aggressive, though it can still use some further tweaks. Also update MIPS specializations and adjust fuzz Also in lavc/mips/aacpsy_mips.h: remove trailing whitespace
* avcodec/mips/aaccoder_mips: Sync with the generic codeNedeljko Babic2015-10-131-131/+3
| | | | | | | | | | | | | | | This patch fixes build of AAC encoder optimized for mips that was broken due to some changes in generic code that were not propagated to the optimized code. Also, some functions in the optimized code are basically duplicate of functions from generic code. Since they do not bring enough improvement to the optimized code to justify their existence, they are removed (which improves maintainability of the optimized code). Optimizations disabled in 97437bd are enabled again. Signed-off-by: Nedeljko Babic <nedeljko.babic@imgtec.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mips/aaccoder_mips: Disable ff_aac_coder_init_mips() to prevent ↵Michael Niedermayer2015-10-131-1/+1
| | | | | | build failure Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* AAC encoder: memoize quantize_band_costClaudio Freire2015-10-121-0/+2
| | | | | | | | | | The bulk of calls to quantize_band_cost are replaced by a call to a version that memoizes, greatly improving performance, since during coefficient search there is a great deal of repeat work. Memoization cannot always be applied, so do this in a different function, and leave the original as-is.
* AAC encoder: Extensive improvementsClaudio Freire2015-10-111-90/+293
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This finalizes merging of the work in the patches in ticket #2686. Improvements to twoloop and RC logic are extensive. The non-exhaustive list of twoloop improvments includes: - Tweaks to distortion limits on the RD optimization phase of twoloop - Deeper search in twoloop - PNS information marking to let twoloop decide when to use it (turned out having the decision made separately wasn't working) - Tonal band detection and priorization - Better band energy conservation rules - Strict hole avoidance For rate control: - Use psymodel's bit allocation to allow proper use of the bit reservoir. Don't work against the bit reservoir by moving lambda in the opposite direction when psymodel decides to allocate more/less bits to a frame. - Retry the encode if the effective rate lies outside a reasonable margin of psymodel's allocation or the selected ABR. - Log average lambda at the end. Useful info for everyone, but especially for tuning of the various encoder constants that relate to lambda feedback. Psy: - Do not apply lowpass with a FIR filter, instead just let the coder zero bands above the cutoff. The FIR filter induces group delay, and while zeroing bands causes ripple, it's lost in the quantization noise. - Experimental VBR bit allocation code - Tweak automatic lowpass filter threshold to maximize audio bandwidth at all bitrates while still providing acceptable, stable quality. I/S: - Phase decision fixes. Unrelated to #2686, but the bugs only surfaced when the merge was finalized. Measure I/S band energy accounting for phase, and prevent I/S and M/S from being applied both. PNS: - Avoid marking short bands with PNS when they're part of a window group in which there's a large variation of energy from one window to the next. PNS can't preserve those and the effect is extremely noticeable. M/S: - Implement BMLD protection similar to the specified in ISO-IEC/13818:7-2003, Appendix C Section 6.1. Since M/S decision doesn't conform to section 6.1, a different method had to be implemented, but should provide equivalent protection. - Move the decision logic closer to the method specified in ISO-IEC/13818:7-2003, Appendix C Section 6.1. Specifically, make sure M/S needs less bits than dual stereo. - Don't apply M/S in bands that are using I/S Now, this of course needed adjustments in the compare targets and fuzz factors of the AAC encoder's fate tests, but if wondering why the targets go up (more distortion), consider the previous coder was using too many bits on LF content (far more than required by psy), and thus those signals will now be more distorted, not less. The extra distortion isn't audible though, I carried extensive ABX testing to make sure. A very similar patch was also extensively tested by Kamendo2 in the context of #2686.
* avcodec/mips: build fix for MSA 64bitShivraj Patil2015-10-071-21/+21
| | | | | | | Modified datatype of function argument (pitch from int32_t to ptrdiff_t) Signed-off-by: Shivraj Patil <shivraj.patil@imgtec.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mips: build fix for MSAShivraj Patil2015-10-071-141/+141
| | | | | | | Modified sps and pps access from old HEVCContext(s) structure to newly introduced HEVCParamSets(ps) Signed-off-by: Shivraj Patil <shivraj.patil@imgtec.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* blockdsp: remove high bitdepth parameterChristophe Gisquet2015-10-021-7/+5
| | | | | | | | | It is only (mis-)used to set the dsp fucntions clear_block(s). But these functions always work on 16bits-wide elements, which make the parameter useless and actually harmful, as it causes all content on more than 8-bits to not use accelerated functions. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* AAC encoder: simplify and speed up find_min_bookClaudio Freire2015-09-231-8/+4
| | | | | | Trivial change to simplify the small but hot find_min_book function. The new form is easier to understand and faster.
* avcodec/mpegvideo: Change mpeg2 unquant to work with higher precission qscaleMichael Niedermayer2015-09-181-2/+4
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mips/aaccoder_mips: Remove duplicate includeMichael Niedermayer2015-09-171-1/+0
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* AAC encoder: refactor to resynchronize MIPS portClaudio Freire2015-09-161-341/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch refactors the AAC coders to reuse code between the MIPS port and the regular, portable C code. There were two main functions that had to use hand-optimized versions of quantization code: - search_for_quantizers_twoloop - codebook_trellis_rate Those two were split into their own template header files so they can be inlined inside both the MIPS port and the generic code. In each context, they'll link to their specialized implementations, and thus be optimized by the compiler. This approach I believe is better than maintaining several copies of each function. As past experience has proven, having to keep those in sync was error prone. In this way, they will remain in sync by default. Also, an implementation of the dequantized output argument for the optimized quantize_and_encode functions is included in the patch. While the current implementation of search_for_pred still isn't using it, future iterations of main prediction probably will. It should not imply any measurable performance hit while not being used.
* aaccoder_mips: Fix indentationTimothy Gu2015-09-141-2/+2
|
* avcodec/mips/aaccoder_mips: Sync with generic aaccoder file.Nedeljko Babic2015-09-141-41/+48
| | | | | | | | | | | | | | Code in aaccoder_mips.c was not synced with changes in aaccoder.c for some time. That was cause for some fate-aac tests failing. This patch fixes the problems. Optimizations disabled in 933309a are enabled again. Signed-off-by: Nedeljko Babic <nedeljko.babic@imgtec.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec: loongson delete invalid simple idct put and add optimization周晓勇2015-09-082-20/+1
| | | | | | | | | Change-Id: I23a36c65915f01a1cf20e317c14b8eaaa62958b4 Signed-off-by: ZhouXiaoyong <zhouxiaoyong@loongson.cn> Fixes Decoding of http://loongnix.org/ftp/multimedia/testing/nanocore_720p_24fps_mpeg4_ac3_short.avi Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec: loongson optimize h264dsp idct and loop filter with mmi周晓勇2015-09-073-3/+2303
| | | | | | Change-Id: Ic87fb8f5cd22a502ff9dbbc5a5a8ea97cfc8a1dd Signed-off-by: ZhouXiaoyong <zhouxiaoyong@loongson.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* AAC: MIPS: Add missing codebooks in quantize funcsClaudio Freire2015-09-031-1/+59
| | | | | Add entries on the quantize function tables for the missing codebooks (which all behave like ZERO)
* avcodec: loongson optimize mpeg2 dct unquantize intra and denoise dct周晓勇2015-09-023-0/+148
| | | | | | Change-Id: I2f391ae912a079fb32f0703841dca86358aac72a Signed-off-by: ZhouXiaoyong <zhouxiaoyong@loongson.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mips/aaccoder_mips: disable optimizatios which break fate-aac-pns-encodeMichael Niedermayer2015-09-021-2/+3
| | | | | | These should be re enabled once the issue is fixed Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* aaccoder_mips: update function definitionsRostislav Pehlivanov2015-08-211-106/+108
| | | | | | | | | | | | | This commit updates the function definitions in the aaccoder_mips.c file. This was broken around a month or so ago with the addition of the rounding argument. The previous commit in this series also introduced a separate array to put the quantization error in, this also needed to be updated, albeit non-functional, in the MIPS optimized aaccoder file. Credits for the rounding goes to Claudio Freire. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* avcodec: loongson optimize h264qpel with mmi v1周晓勇2015-08-096-1/+2960
| | | | | Signed-off-by: ZhouXiaoyong <zhouxiaoyong@loongson.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec: loongson optimized h264pred with mmi v2周晓勇2015-08-053-241/+226
| | | | | Signed-off-by: ZhouXiaoyong <zhouxiaoyong@loongson.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for VP8 functionsShivraj Patil2015-08-046-0/+3471
| | | | Signed-off-by: Shivraj Patil <shivraj.patil@imgtec.com>
* mips/hevcdsp: fix string concatenation on macrosJames Almer2015-07-306-15/+15
| | | | | | | | | Needed for old compilers like GCC 4.2 Tested by trac user brad. Fixes ticket #4745 Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for VP9 bilinear functionsShivraj Patil2015-07-273-0/+2157
| | | | | | Signed-off-by: Shivraj Patil <shivraj.patil@imgtec.com> Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for VP9 intra functionsShivraj Patil2015-07-244-1/+619
| | | | | | Signed-off-by: Shivraj Patil <shivraj.patil@imgtec.com> Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mips/vp9_idct_msa: Replace __volatile__ by volatileMichael Niedermayer2015-07-231-2/+2
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for VP9 idct functionsShivraj Patil2015-07-234-1/+2192
| | | | | | Signed-off-by: Shivraj Patil <shivraj.patil@imgtec.com> Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for VP9 lpf functionsShivraj Patil2015-07-234-1/+2659
| | | | | | Signed-off-by: Shivraj Patil <shivraj.patil@imgtec.com> Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec: loongson optimize pixblockdsp with mmi周晓勇2015-07-224-0/+102
| | | | | Signed-off-by: ZhouXiaoyong <zhouxiaoyong@loongson.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec: loongson optimize blockdsp with mmi周晓勇2015-07-214-0/+170
| | | | | Signed-off-by: ZhouXiaoyong <zhouxiaoyong@loongson.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec: loongson optimize xvid idct with mmi周晓勇2015-07-214-0/+330
| | | | | Signed-off-by: ZhouXiaoyong <zhouxiaoyong@loongson.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec: loongson move simple idct functions to a separate file周晓勇2015-07-214-814/+837
| | | | | Signed-off-by: ZhouXiaoyong <zhouxiaoyong@loongson.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec: loongson relocate constants of idctdsp and h264pred周晓勇2015-07-204-43/+36
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec: loongson constants redefined with macros周晓勇2015-07-202-52/+52
| | | | | Signed-off-by: ZhouXiaoyong <zhouxiaoyong@loongson.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for VP9 MC functionsShivraj Patil2015-07-164-0/+2574
| | | | | | | | This patch adds MSA (MIPS-SIMD-Arch) optimizations for VP9 MC functions in new file vp9_mc_msa.c Signed-off-by: Shivraj Patil <shivraj.patil@imgtec.com> Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec: loongson optimized idctdsp with mmi周晓勇2015-07-164-0/+1039
| | | | | Signed-off-by: ZhouXiaoyong <zhouxiaoyong@loongson.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec: loongson add constant definition周晓勇2015-07-163-0/+110
| | | | | Signed-off-by: ZhouXiaoyong <zhouxiaoyong@loongson.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mips/mpegvideo_mmi: Use av_assert2()Michael Niedermayer2015-07-151-4/+4
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec: loongson optimized mpegvideo dct unquantize with mmiZhouXiaoyong2015-07-154-0/+353
| | | | | Signed-off-by: ZhouXiaoyong <zhouxiaoyong@loongson.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec: loongson optimized h264pred with mmi周晓勇2015-07-154-0/+911
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for idctdsp functionsShivraj Patil2015-07-075-0/+816
| | | | | | | This patch adds MSA (MIPS-SIMD-Arch) optimizations for idctdsp functions in new file idctdsp_msa.c and simple_idct_msa.c Signed-off-by: Shivraj Patil <shivraj.patil@imgtec.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* use mmi instead of loongson3 as simd-optimization flag周晓勇2015-07-073-10/+10
| | | | | Signed-off-by: ZhouXiaoyong <zhouxiaoyong@loongson.cn> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avcodec: loongson remove useless macros in mipsfpu optimization周晓勇2015-07-064-16/+2
| | | | | | | Loongson has disabled all mipsfpu optimization as fate-test faild. Signed-off-by: ZhouXiaoyong <zhouxiaoyong@loongson.cn> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for me_cmp functionsShivraj Patil2015-07-064-0/+804
| | | | | | | This patch adds MSA (MIPS-SIMD-Arch) optimizations for me_cmp functions in new file me_cmp_msa.c Signed-off-by: Shivraj Patil <shivraj.patil@imgtec.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for mpegvideoencdsp functionsShivraj Patil2015-07-063-0/+104
| | | | | | | This patch adds MSA (MIPS-SIMD-Arch) optimizations for mpegvideoencdsp functions in new file mpegvideoencdsp_msa.c Signed-off-by: Shivraj Patil <shivraj.patil@imgtec.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
OpenPOWER on IntegriCloud