Michael Niedermayer
d73f062706
avcodec/dvdec: Use av_clip_uint8 instead of ff_crop_tab
...
Fixes: out of array access
Fixes: 18788/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DVVIDEO_fuzzer-6254863113781248
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Baptiste Coudurier <baptiste.coudurier@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years ago
Andreas Rheinhardt
b25b6432a7
avcodec/dvdec: Don't use restrict directly to fix build on MSVC
...
004ebd4b
added a function with a parameter that was declared as restrict
and not av_restrict. This is not supported by MSVC as several FATE-boxes
that now fail to build show. So use av_restrict.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Tested-by: Matthias Troffaes <matthias.troffaes@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years ago
Baptiste Coudurier
004ebd4b37
avcodec/dvdec: correctly decode bottom mb row in 1080i field mode
5 years ago
Baptiste Coudurier
33203a08e0
avcodec/dvdec: correctly set interlaced and tff
5 years ago
Paul B Mahol
833ae5f4bf
avcodec/dvdec: add frame threads
6 years ago
Clément Bœsch
549045254c
Fix all -Wformat warnings raised by DJGPP
8 years ago
Luca Barbato
9c2d36fcaf
dv: Convert to the new bitstream reader
8 years ago
Diego Biurrun
c454dfcff9
Use ISO C printf conversion specifiers where appropriate
8 years ago
Diego Biurrun
1263b2039e
Adjust printf conversion specifiers to match variable signedness
8 years ago
Diego Biurrun
2ec9fa5ec6
idct: Change type of array stride parameters to ptrdiff_t
...
ptrdiff_t is the correct type for array strides and similar.
8 years ago
Michael Niedermayer
93ac72a98d
avcodec/dvdec: Fix "left shift of negative value -254"
...
Fixes: dvdec_left_shift.avi
Found-by: Piotr Bandurski <ami_stuff@o2.pl>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Vittorio Giovara
cab63a8b59
dv: Mark internal frame reference as const
...
Silence a warning due to frame assignment in dvenc. All uses of the
reference in dvdec are read only, except the ones in the main decoding
function, so use the frame pointer directly there.
9 years ago
Vittorio Giovara
059a934806
lavc: Consistently prefix input buffer defines
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Vittorio Giovara
def97856de
lavc: AV-prefix all codec capabilities
...
Express bitfields more simply.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Michael Niedermayer
38490e0724
avcodec/dvdec: only attempt to conceal errors based on STA inconsistencies when error_concealment is set
...
This allows the user to disable it in the hypothetical case that STA values are wrong
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
dee551bbd2
avcodec/dvdec: skip 3rd stage ac decoding when the headers indicates that the data is inconsistent
...
Fixes Ticket1589
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
daf6bce71b
avcodec/dvdec: Retry decoding seemingly damaged MBs while skiping likely damaged parts
...
Improves decoding of Ticket1589
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Vittorio Giovara
6a85dfc830
lavc: Replace av_dlog and tprintf with internal macros
10 years ago
Michael Niedermayer
bf6102044d
avcodec/dvdec: Make dv_iweight_720_c static
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Luca Barbato
74d7db586a
dv: Drop a spurious check
...
The buffer is always valid.
Bug-Id: CID 700682
10 years ago
Christophe Gisquet
05da586fef
dv: move inverse weight tables to decoder
...
The encoder has its own tables and does not access the idct_factor
member of the DVVideoContext structure.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Anton Khirnov
7ea1b3472a
lavc: deprecate the use of AVCodecContext.time_base for decoding
...
When decoding, this field holds the inverse of the framerate that can be
written in the headers for some codecs. Using a field called 'time_base'
for this is very misleading, as there are no timestamps associated with
it. Furthermore, this field is used for a very different purpose during
encoding.
Add a new field, called 'framerate', to replace the use of time_base for
decoding.
10 years ago
James Almer
6edd6a4f00
avcodec/dv_profile: deprecate internal function that shouldn't be public
...
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
10 years ago
Gabriel Dume
ee0ebd3c14
dv: K&R formatting cosmetics
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
10 years ago
Diego Biurrun
b574e1e97e
get_bits: Add OPEN_READER macro variant w/o size_plus8
...
This avoids a trillion warnings from MSVC.
10 years ago
Diego Biurrun
7835c24e19
dv: Update DV-profile-related functions to current public API
10 years ago
Anton Khirnov
f6ee61fb05
lavc: export DV profile API used by muxer/demuxer as public
11 years ago
Michael Niedermayer
5307fa00a4
avcodec/dvdec: remove redundant null check
...
Fixes CID700682 again
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Diego Biurrun
e3fcb14347
dsputil: Split off IDCT bits into their own context
11 years ago
Diego Biurrun
e63b818dbe
dv: Properly split decoder and encoder initialization
11 years ago
Justin Ruggles
9e500efdbe
Add av_image_check_sar() and use it to validate SAR
11 years ago
Anton Khirnov
650dee63c8
dv: get rid of global non-const tables
...
Instead, store them in the context and compute on each parameter change.
11 years ago
Anton Khirnov
d4f1188d1a
dv: use AVFrame API properly
11 years ago
Diego Biurrun
3cbe112653
dv: Split DV data table declarations into their own header
...
This is necessary to avoid target config settings bleeding into the host
compilation process with hardcoded tables and the DV VLC tables no longer
present as static tables in a header file.
11 years ago
Anton Khirnov
caeed8deeb
dvdec: stop using deprecated avcodec_set_dimensions
11 years ago
Michael Niedermayer
f0b26bf0f5
avcodec/dvdec: dont try to decode ac when theres no input
...
fixes reading out of an empty bitstream
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Diego Biurrun
b2bed9325d
cosmetics: Group .name and .long_name together in codec/format declarations
11 years ago
Michael Niedermayer
ac126a98e5
dvdec: fix lowres=3 with yuv 4:1:1
...
Fixes Ticket2390
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Clément Bœsch
1ec94b0f06
lavc: factorize ff_{thread_,re,}get_buffer error messages.
...
Coccinelle profile used:
@@
expression r, ctx, f, loglevel, str, flags;
@@
-if ((r = ff_get_buffer(ctx, f, flags)) < 0) {
- av_log(ctx, loglevel, str);
- return r;
-}
+if ((r = ff_get_buffer(ctx, f, flags)) < 0)
+ return r;
@@
expression r, ctx, f, loglevel, str;
@@
-if ((r = ff_reget_buffer(ctx, f)) < 0) {
- av_log(ctx, loglevel, str);
- return r;
-}
+if ((r = ff_reget_buffer(ctx, f)) < 0)
+ return r;
@@
expression r, ctx, f, loglevel, str, flags;
@@
-if ((r = ff_thread_get_buffer(ctx, f, flags)) < 0) {
- av_log(ctx, loglevel, str);
- return r;
-}
+if ((r = ff_thread_get_buffer(ctx, f, flags)) < 0)
+ return r;
...along with some manual patches for the remaining ones.
12 years ago
Anton Khirnov
759001c534
lavc decoders: work with refcounted frames.
12 years ago
Diego Biurrun
218aefce44
dsputil: Move LOCAL_ALIGNED macros to libavutil
12 years ago
Diego Biurrun
88bd7fdc82
Drop DCTELEM typedef
...
It does not help as an abstraction and adds dsputil dependencies.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
12 years ago
Anton Khirnov
df9b956751
lavc: fix decode_frame() third parameter semantics for video decoders
...
It's got_frame, not data size
12 years ago
Anton Khirnov
594d4d5df3
lavc: add a wrapper for AVCodecContext.get_buffer().
...
It will be useful in the upcoming transition to refcounted AVFrames.
12 years ago
Tomas Härdin
7b383bd9d7
dvdec: Set top_field_first from FS flag
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Tomas Härdin
2b4bbd12c2
dvdec: Move the VSC pack parsing to before avctx->execute()
...
This allows the next commit to parse the FS flag.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
716d413c13
Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat
12 years ago
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
12 years ago
Michael Niedermayer
a189475c8e
dvdec: switch to av_assert
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
b2e92e946c
dvdec: drop const qualifier from variable to eliminate a warning
...
libavcodec/dvdec.c:344:12: warning: assignment discards ‘const’ qualifier from pointer target type
13 years ago