Michael Niedermayer
6a92598e14
avcodec/mpeg12dec: Redesign index checks for mpeg2_fast_decode_block_intra
...
This fixes the speed regression from 20626f53e9
and still checks sufficiently to prevent out of allocated memory accesses
due to the index
Before:
1681 decicycles in mpeg2_fast_decode_block_intra, 4194238 runs, 66 skips
After:
1658 decicycles in mpeg2_fast_decode_block_intra, 4194248 runs, 56 skips
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
20626f53e9
Merge commit '6d93307f8df81808f0dcdbc064b848054a6e83b3'
...
* commit '6d93307f8df81808f0dcdbc064b848054a6e83b3':
mpeg12: check scantable indices in all decode_block functions
Benchmarks
Before:
1878 decicycles in mpeg2_decode_block_non_intra, 8388487 runs, 121 skips
1700 decicycles in mpeg2_decode_block_intra, 4194239 runs, 65 skips
1808 decicycles in mpeg2_fast_decode_block_non_intra, 8388492 runs, 116 skips
1669 decicycles in mpeg2_fast_decode_block_intra, 4194248 runs, 56 skips
--
2056 decicycles in mpeg1_decode_block_inter, 65535 runs, 1 skips
2346 decicycles in mpeg1_decode_block_intra, 32768 runs, 0 skips
2011 decicycles in mpeg1_fast_decode_block_inter, 65533 runs, 3 skips
----------------
After:
1858 decicycles in mpeg2_decode_block_non_intra, 8388490 runs, 118 skips
1691 decicycles in mpeg2_decode_block_intra, 4194233 runs, 71 skips
1823 decicycles in mpeg2_fast_decode_block_non_intra, 8388493 runs, 115 skips
1681 decicycles in mpeg2_fast_decode_block_intra, 4194238 runs, 66 skips
--
2010 decicycles in mpeg1_decode_block_inter, 65535 runs, 1 skips
2322 decicycles in mpeg1_decode_block_intra, 32766 runs, 2 skips
1995 decicycles in mpeg1_fast_decode_block_inter, 65535 runs, 1 skips
All benchmarks are the best scores of several runs
Merged-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
3e6088f732
avutil/internal.h: add timer.h back
...
Without this a developer would have to add a include every time he
wants to benchmark some code, this is a moderate inconvenience.
This reverts the specific hunk from fb0c9d41d6
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
965fa6b0d9
Merge commit 'fb0c9d41d685abb58575c5482ca33b8cd457c5ec'
...
* commit 'fb0c9d41d685abb58575c5482ca33b8cd457c5ec':
avutil: remove timer.h include from internal.h
Conflicts:
libavcodec/ffv1dec.c
libavutil/internal.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
53167ecfdb
avcodec/huffyuv: support AV_PIX_FMT_YUV(A)4XYP16 and GRAY16
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Janne Grunau
6d93307f8d
mpeg12: check scantable indices in all decode_block functions
...
Add checks to the fast functions used with CODEC_FLAGS2_FAST and move
the check for all other functions to before the invalid memory is
accessed. Fixes https://trac.videolan.org/vlc/ticket/9713 with
CODEC_FLAGS2_FAST.
CC: libav-stable@libav.org
11 years ago
Janne Grunau
fb0c9d41d6
avutil: remove timer.h include from internal.h
...
Added libavutil/timer.h include to all files with {START,STOP}_TIMER.
11 years ago
Michael Niedermayer
214a3b8bf9
avfilter/vf_scale: simplify alignment code
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
1e48c39ece
avfilter/vf_scale: do aspect ratio and scale factor compensation together
...
Fixes rounding error
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
682ddb89cf
Merge branch 'scale-filter-factor' of https://github.com/lkiesow/FFmpeg
...
* 'scale-filter-factor' of https://github.com/lkiesow/FFmpeg :
Documentation for scale filter factor
Documentation for scale filter factor
Fixed factor for scale filter
Factors for scale filter
Merged-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
018e2b57ca
avcodec/libx264: also consider ticks per frame for fps/timebase setup
...
Setting fps = 1/timebase is not correct
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Clément Bœsch
5f4d04d084
x86/lossless_videodsp: silly one-line cosmetic.
11 years ago
Lars Kiesow
c49b036096
Documentation for scale filter factor
11 years ago
Lars Kiesow
69b1d1d99b
Documentation for scale filter factor
11 years ago
Lars Kiesow
e395f8de5a
Fixed factor for scale filter
11 years ago
Lars Kiesow
7fc4c18463
Factors for scale filter
11 years ago
Clément Bœsch
5267e85056
x86/lossless_videodsp: use common macro for add and diff int16 loop.
11 years ago
Clément Bœsch
cddbfd2a95
x86/lossless_videodsp: simplify and explicit aligned/unaligned flags
11 years ago
Ramiro Polla
78a9f185eb
lavfi/drawtext: add option for drawing border around text
...
Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Ramiro Polla
222fb8276d
lavfi/drawtext: get bitmap from glyph in a separate step
...
This change makes it possible to transform the glyph or get its border before
turning it into a bitmap.
Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
5554c6dd45
Merge remote-tracking branch 'rbultje/vp9-simd'
...
* rbultje/vp9-simd:
vp9: fix memory corruption if header decoding fails after size change.
vp9/x86: use explicit register for relative stack references.
vp9/x86: iwht4x4 (lossless) mmx.
vp9/x86: 4x4 iadst SIMD (ssse3) variants.
vp9/x86: 8x8 iadst SIMD (ssse3/avx) variants.
Merged-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
4b84a69ebb
Merge remote-tracking branch 'qatar/master'
...
* qatar/master:
dxtory: compressed RGB555/RGB565 decoding support
Conflicts:
libavcodec/dxtory.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
2d0d1f7eb3
Merge commit '0e1ad2f591b87e944550c15b54e54f8189743289'
...
* commit '0e1ad2f591b87e944550c15b54e54f8189743289':
dxtory: add more compressed and uncompressed modes
Conflicts:
libavcodec/dxtory.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Ronald S. Bultje
4147b337c1
vp9: fix memory corruption if header decoding fails after size change.
11 years ago
Ronald S. Bultje
c9e6325ed9
vp9/x86: use explicit register for relative stack references.
...
Before this patch, we explicitly modify rsp, which isn't necessarily
universally acceptable, since the space under the stack pointer might
be modified in things like signal handlers. Therefore, use an explicit
register to hold the stack pointer relative to the bottom of the stack
(i.e. rsp). This will also clear out valgrind errors about the use of
uninitialized data that started occurring after the idct16x16/ssse3
optimizations were first merged.
11 years ago
Ronald S. Bultje
97474d527f
vp9/x86: iwht4x4 (lossless) mmx.
11 years ago
Ronald S. Bultje
d43efa68bd
vp9/x86: 4x4 iadst SIMD (ssse3) variants.
...
Cycle measurements for intra itxfm_4x4_add on ped1080p.webm:
idct_idct: 66 -> 67 cycles (noise measurement)
idct_iadst: 199 -> 79 cycles
iadst_idct: 165 -> 70 cycles
iadst_iadst: 183 -> 82 cycles
11 years ago
Ronald S. Bultje
baf47020cd
vp9/x86: 8x8 iadst SIMD (ssse3/avx) variants.
...
Cycle measurements for intra itxfm_8x8_add on ped1080p.webm:
idct_idct: 133 -> 135 cycles (noise measurement)
idct_iadst: 900 -> 241 cycles
iadst_idct: 864 -> 215 cycles
iadst_iadst: 973 -> 310 cycles
11 years ago
Michael Niedermayer
cf812d8129
avcodec/dvbsubdec: Remove unused display_list_size
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Wim Vander Schelden
af09be4f4b
Fixed a memory leak in dvbsubenc.c: sub->num_rects was reduced without freeing the associated rects.
...
Signed-off-by: Wim Vander Schelden <lists@fixnum.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
James Darnley
2efdccac87
lavf/avienc: cosmetic indent
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
James Darnley
fa20babb46
lavf/avienc: use metadata_header_padding
...
The muxer will write at least the number of bytes requested and possibly
up to 3 bytes more. This is because the muxer writes 32-bit integers
and the format requires 4-byte alignment anyway.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
James Darnley
67270ccd3a
lavf/id3v2enc: update comment about minimum padding
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
James Darnley
0de03fd6a1
lavf/id3v2enc: use metadata_header_padding
...
As with the change to flacenc this allows the user to control the amount
of padding they want added to the file.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
James Darnley
c14b011a97
lavf/flacenc: fix comment after previous change
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
James Darnley
72eeb18468
lavf/flacenc: use metadata_header_padding
...
Allows a user to control the amount, if any, of padding they want added
to the file. If set to zero the block will not be written at all. If
set to some positive number four more bytes will be added to the file
due to the small header required for the block.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
James Darnley
86bee7984e
AVFormatContext: add metadata_header_padding field
...
This field is used to store the number of bytes that should be written
as padding to a metadata header of a file. For example:
- The FLAC format's METADATA_BLOCK_PADDING [1]
- The ID3v2 tag format's padding [2]
[1] http://xiph.org/flac/format.html#metadata_block_padding
[2] http://id3.org/id3v2.3.0#ID3v2_overview
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Serhii Marchuk
1d07385053
mpegts demuxer: store PMT values of DVB teletext to extradata
...
* Using extradata by TS demuxer to store values from PMT
* Support of multiple languages in one DVB teletext stream:
comma separated language codes in metadata "language" field
Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Serhii Marchuk
2ebee19e1e
mpegts muxer: restore PMT table of DVB teletext from extradata
...
* Using extradata by TS muxer to correctly restore PMT table
* PES_header_data_length should be always 0x24 for DVB teletext,
according to DVB standard
Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Serhii Marchuk
f8051bd31a
mpegts muxer: Change the default subtitle language to "und"
...
Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
João Bernardo
290326711b
avutil/opt: Better print representation of number limits
...
Signed-off-by: João Bernardo Oliveira <jbvsmo@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Kostya Shishkov
28e1eed3c2
dxtory: compressed RGB555/RGB565 decoding support
11 years ago
Kostya Shishkov
0e1ad2f591
dxtory: add more compressed and uncompressed modes
11 years ago
Michael Niedermayer
934bb11ad7
avcodec/mpeg12dec: fix mis-indented line
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
5f54756f7e
avcodec/mpeg12dec: Disable the checked bitstream reader
...
Mpeg1/2 should not need it
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
76b5e99ce9
avcodec/mpeg12dec: Check for overread in mpeg_decode_slice()
...
This is needed in case the checked bitstream reader is disabled
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
d82eccea2b
avcodec/mpeg12dec: check block index in mpeg2_fast_decode_block_non_intra()
...
Prevents some overreads at the cost of 1 cpu cycle
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
0c8e5fb211
avcodec/mpeg12dec: Optimize mpeg1_decode_block_intra()
...
sandybridge i7 274->260 cycles
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
0a59055167
avcodec/mpeg12dec: check for overread in mpeg1_fast_decode_block_inter()
...
No speedloss meassured
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
746350ea0f
avcodec/mpeg12dec: Make mpeg2_fast_decode_block_intra() more robust by breaking out on invalid vlcs
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago