Andreas Rheinhardt
a247ac640d
avcodec: Constify AVCodecs
...
Given that the AVCodec.next pointer has now been removed, most of the
AVCodecs are not modified at all any more and can therefore be made
const (as this patch does); the only exceptions are the very few codecs
for external libraries that have a init_static_data callback.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
4 years ago
Andreas Rheinhardt
b143f8c26a
avcodec/cljrdec: Mark decoder as init-threadsafe
...
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Diego Biurrun
a25dac976a
Use bitstream_init8() where appropriate
8 years ago
Alexandra Hájková
e561146611
cljrdec: Convert to the new bitstream reader
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 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
5320b34b98
avcodec/cljrdec: remove unneeded include
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Nidhi Makhijani
373a6dda54
cljr: split decoder and encoder
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
11 years ago
Michael Niedermayer
ec1ed64506
avcodec/cljr: require (v)strict -1 to use width %4 != 0
...
Suggested-by: kurosu
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
6dc709f0f5
avcodec/cljr: support width%4 encoding
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
59a70422b1
avcodec/cljr: remove coded_frame code
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Anton Khirnov
845020ed89
cljr: use the AVFrame API properly.
11 years ago
Diego Biurrun
b2bed9325d
cosmetics: Group .name and .long_name together in codec/format declarations
11 years ago
Carl Eugen Hoyos
0915b531bc
Rename "AVClass class" as "AVClass component_class".
...
The aix header math.h defines "extern int class()" for C.
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
Anton Khirnov
7c8fceef6c
cljr: return a meaningful error code.
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
Paul B Mahol
efbe162f7d
cljr: use meaningful error code
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
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
Paul B Mahol
ae2c33b0c2
cosmetics: remove superfluous curly brackets
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
ca6a3448e9
cljrenc: switch to ff_alloc_packet2()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Anton Khirnov
3dffa1b46c
cljr: implement encode2.
13 years ago
Anton Khirnov
177bb4bf50
cljr: set the properties of the coded_frame, not input frame.
13 years ago
Michael Niedermayer
7e5cbb3c2d
cljrdec: improve scaling somewhat
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
a1ca45317d
cljrenc: fix scaling
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Paul B. Mahol
2e7905eee8
cljr: fix buf_size sanity check
...
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
13 years ago
Shitiz Garg
652d81b2c2
cljr: Check if width and height are positive integers
...
Width and height might get passed as 0 and would cause floating point
exceptions in decode_frame.
Fixes bugzilla #149
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
13 years ago
Shitiz Garg
4af0262f7d
cljr: Check if width or height are positive integers
...
width and height might get passed as 0 and would cause floating point
exceptions in decode_frame.
Fixes bugzilla #149
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Paul B Mahol
65c1011404
cljr: remove unused code
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
13 years ago
Michael Niedermayer
523da37f4c
cljrenc: 2x2 ordered dither support.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
74d9b21340
cljrenc: add AVOption to disable dither
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
43a36ad2ee
cljrenc: Add dither to avoid the banding artifcats caused by the very low
...
number of bits used to represent brightness levels.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Diego Biurrun
6b60a4c9c9
cljr: K&R cosmetics
13 years ago
Diego Biurrun
1c45c64c9d
cljr: return a more sensible value when encountering invalid headers
13 years ago
Diego Biurrun
163682fab3
cljr: drop unnecessary emms_c() calls without MMX code
13 years ago
Mans Rullgard
bbc10185ee
cljr: remove useless casts
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Mans Rullgard
baf3b6e594
cljr: group encode/decode parts under single ifdefs
...
This groups the encode/decode parts under single ifdefs and
eliminates the encode_init() function as it merely calls
common_init(). Also fix whitespace in moved code.
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Mans Rullgard
9a1420bfda
cljr: remove stray semicolon
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Paul B Mahol
ca52bae6ec
cljr: add missing return statement in decode_end()
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Paul B Mahol
e93947b7d8
cljr: add encoder
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
13 years ago
Paul B. Mahol
04a5eaa1a5
cljr: release picture at end of decoding
...
Otherwise after transcoding from cljr we get: Found 1 unreleased buffers!
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
13 years ago
Paul B. Mahol
fc9489f6ad
cljr: simplify CLJRContext
...
There is no need to have delta, offset and gb in CLJRContext.
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
13 years ago
Anton Khirnov
9f51c682ee
lavc: use avpriv_ prefix for ff_copy_bits and align_put_bits.
...
They are used in lavf.
13 years ago
Alex Converse
0c1f5b93d9
cljr: init_get_bits size in bits instead of bytes
13 years ago
Diego Biurrun
fed6c90b68
cosmetics: remove some stray comments from AVCodec declarations
13 years ago
Anton Khirnov
ec6402b7c5
lavc: use designated initialisers for all codecs.
...
It's more readable and less prone to breakage.
13 years ago
Stefano Sabatini
01042d4123
lavc: set defaults in internal codec frames
...
This is required specifically for setting frame->format to -1,
otherwise it will be set to 0 = PIX_FMT_YUV420P and code reading
the format from the output decoded frame will get misled.
In particular fix regressions occurring with the pending vsrc_buffer
patch.
14 years ago
Stefano Sabatini
ce5e49b0c2
replace deprecated FF_*_TYPE symbols with AV_PICTURE_TYPE_*
14 years ago