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>
10 years ago
Vittorio Giovara
def97856de
lavc: AV-prefix all codec capabilities
...
Express bitfields more simply.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
10 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>
10 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>
10 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>
10 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
11 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_*
13 years ago
Michael Niedermayer
a189475c8e
dvdec: switch to av_assert
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 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
Michael Niedermayer
70d54392f5
lowres2 support.
...
The new lowres support is limited to decoders where lowres decoding
is possible in high quality.
I was not able to measure any speed difference, but if one is found
the 2-3 lines that might affect speed can be made compile time conditional
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Mans Rullgard
2bcbd98459
Remove lowres video decoding
...
This feature is complex, of questionable utility, and slows down
normal decoding.
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Diego Biurrun
a3dbd459ff
dv: Merge dvquant.h into dvdata.c where all other DV tables reside.
13 years ago
Diego Biurrun
05afc5f57d
dv: Move static tables only used in one place to where they are used.
13 years ago
Martin Storsjö
00c3b67b8a
cosmetics: Align codec declarations
...
Also break some long lines, remove codec function placeholder comments
and add spaces in sample/pixel format lists.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Diego Biurrun
c0b34e6148
dvdec: drop unnecessary dv_tablegen.h #include
...
dvdec.c uses nothing from dv_tablegen.h. As a welcome side-effect, this
fixes compilation of that file with hardcoded tables enabled.
13 years ago
Diego Biurrun
d724fe665b
dv: Split off DV video decoder into its own file.
13 years ago