Michael Niedermayer
aa000ddab2
avcodec/svq3: add scaling matrix init that was removed from h264 init
...
This is needed for svq3
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
e6c710600e
avcodec/svq3: add initialization which was removed from h264 init
...
This is needed for the svq3 code to work
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Anton Khirnov
249796e256
svq3: initialize some required H264Context fields.
...
They are no longer initialized in ff_h264_decode_init() since 43fd3dd
,
so svq3 needs to initialize the manually.
Fixes svq3 decoding, broken since 43fd3dd
.
10 years ago
Anton Khirnov
c28ed1d743
h264: move [uv]linesize to the per-slice context
...
While it is a per-frame variable, it is only really used in the
low-level decoding code, so it is more efficient to store it in the
slice context.
10 years ago
Anton Khirnov
36d04801ba
h264: move the scratch buffers into the per-slice context
...
Also change the method for allocating them. Instead of two possible
alloc calls from different places, just ensure they are allocated at the
start of each slice. This should be simpler and less bug-prone than the
previous method.
10 years ago
Anton Khirnov
d4d9068cdf
h264: move mb_{x,y} into the per-slice context
10 years ago
Anton Khirnov
0edbe6faa7
h264: move mb_xy into the per-slice context
10 years ago
Anton Khirnov
07c5ca551b
h264: move is_complex into the per-slice context
10 years ago
Anton Khirnov
47a0d39350
h264: move mb_skip_run into the per-slice context
10 years ago
Anton Khirnov
e7226984ac
h264: move [{top,left}_]cbp into the per-slice context
10 years ago
Anton Khirnov
bf03a878a7
h264: move mb[_{padding,luma_dc}] into the per-slice context
10 years ago
Anton Khirnov
56febc993b
h264: move the slice type variables into the per-slice context
10 years ago
Anton Khirnov
e6287f077c
h264: move {mv,ref}_cache into the per-slice context
10 years ago
Anton Khirnov
f69574cf7a
h264: move non_zero_count_cache into the per-slice context
10 years ago
Anton Khirnov
64c81b2cd0
h264: move *_samples_available into the per-slice context
10 years ago
Anton Khirnov
7d8154edd5
h264: move intra4x4_pred_mode[_cache] into the per-slice context
10 years ago
Anton Khirnov
8b00f4df20
h264: move some neighbour information into the per-slice context
10 years ago
Anton Khirnov
4bd5ac200d
h264: move {chroma,intra16x16}_pred_mode into the per-slice context
10 years ago
Anton Khirnov
d231e84b06
h264: move the quantizers into the per-slice context
10 years ago
Anton Khirnov
92c6c2a605
h264: split weighted pred-related vars into per-slice context
10 years ago
Diego Biurrun
7f9f771eac
avcodec: Don't anonymously typedef structs
10 years ago
Michael Niedermayer
e6f1601d6d
avcodec/svq3: Use av_mallocz_array() for emu_edge_buffer
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
2493558a06
avcodec/svq3: Check av_mallocs return value
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
075a165d27
avcodec/svq3: Dont memcpy AVFrame
...
This avoids out of array accesses
Fixes: asan_heap-uaf_21f42e4_9_asan_heap-uaf_21f42e4_278_gl2.mov
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
89d2fc62db
avcodec/svq3: Fix "incompatible pointer type" warnings
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Diego Biurrun
57f09608e1
dsputil: Move thirdpel-related bits into their own context
11 years ago
Diego Biurrun
cc8163e1a3
avcodec: more correct printf specifiers
11 years ago
Vittorio Giovara
3795ec6858
svq3: directly set pix_fmt and color_range
11 years ago
Vittorio Giovara
d24e9a99a4
h264 does not depend on mpegvideo any more
11 years ago
Vittorio Giovara
e0c16e4e32
mpegvideo: move mpegvideo formats-related defines to mpegutils.h
11 years ago
Vittorio Giovara
9b749c8274
h264: move relevant fields from Picture to H264Picture
11 years ago
Vittorio Giovara
75af13a0e4
mpegvideo: directly use frames in ff_draw_horiz_band()
11 years ago
Diego Biurrun
54b2ce7418
mpeg: Drop unused parameters from ff_draw_horiz_band()
11 years ago
Anton Khirnov
ebfe622bb1
mpegvideo: drop support for real (non-emulated) edges
...
Several decoders disable those anyway and they are not measurably faster
on x86. They might be somewhat faster on other platforms due to missing
emu edge SIMD, but the gain is not large enough (and those decoders
relevant enough) to justify the added complexity.
11 years ago
Michael Niedermayer
c5f7c8f9a9
avcodec/svq3: set last/next frames to defaults before use
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
b2361cfb94
avcodec/svq3: cleanup context in case init fails
...
Fixes memleaks
Fixes: msan_uninit-mem_7ff57193e77e_2715_RAW512K_Stream_004.mov
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Ronald S. Bultje
458446acfa
lavc: Edge emulation with dst/src linesize
...
Allow supporting files for which the image stride is smaller than
the maximum block size + number of subpel mc taps, e.g. a 64x64 VP9
file or a 16x16 VP8 file with -fflags +emu_edge.
11 years ago
Michael Niedermayer
9c7662aeba
avcodec/svq3: Use skip_1stop_8data_bits()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Paul B Mahol
268d0d6e6c
avcodec/svq3: use av_fast_padded_malloc()
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
11 years ago
Diego Biurrun
b2bed9325d
cosmetics: Group .name and .long_name together in codec/format declarations
11 years ago
Ronald S. Bultje
face578d56
Rewrite emu_edge functions to have separate src/dst_stride arguments.
...
This allows supporting files for which the image stride is smaller than
the max. block size + number of subpel mc taps, e.g. a 64x64 VP9 file
or a 16x16 VP8 file with -fflags +emu_edge.
11 years ago
Martin Storsjö
601c2015bc
svq3: Avoid a division by zero
...
If the height is zero, the decompression will probably end up
failing due to not fitting into the allocated buffer later
anyway, so this doesn't need any more elaborate check.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
11 years ago
Martin Storsjö
1115689d54
svq3: Check for any negative return value from ff_h264_check_intra_pred_mode
...
Also pass on any returned error code.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
11 years ago
Diego Biurrun
c4e43560fe
h264data: Move some tables to the only place they are used
11 years ago
Michael Niedermayer
a0c6c8e53e
Revert "Merge commit of 'vdpau: remove old-style decoders'"
...
This reverts commit bf36dc50ea
, reversing
changes made to b7fc2693c7
.
Conflicts:
libavcodec/h264.c
Keeping support for the old VDPAU API has been requested by our VDPAU maintainer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
019eb2c77b
svq3: Fix ff_h264_check_intra_pred_mode() return code check
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Rémi Denis-Courmont
578ea75a9e
vdpau: remove old-style decoders
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
11 years ago
Diego Biurrun
bd8ac88214
avcodec: Add av_cold attributes to end functions missing them
12 years ago
Ronald S. Bultje
2f6bc5f7c1
svq3: Use hpeldsp instead of dsputil for half-pel functions
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Michael Niedermayer
4c8ce750ab
svq3: use memmove to avoid overlap in memcpy.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago