Paul B Mahol
26a7d6a301
avcodec/qdrw: check bytes per scanline for 2bpp images
...
One byte less is read in case of small width.
Closes #6194 .
Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years ago
Paul B Mahol
3a7f8d2a1f
avcodec/qdrw: consume bytes when end is reached for 8bpp case
...
This should really be part of previous commit.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years ago
Paul B Mahol
1dcf91f2d3
avcodec/qdrw: fix decoding of odd sized images for 8bpp
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years ago
Paul B Mahol
dc78696ea4
avcodec/qdrw: fix decoding odd size images for 2bpp and 4bpp
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years ago
Paul B Mahol
05aa53dc55
avcodec/qdrw: fix decoding odd size images for 16bit case
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years ago
Paul B Mahol
f062947261
avcodec/qdrw: do better w/h parsing for direct bit packing
...
Apparently using 0x0001 opcode solely is not correct.
Try this instead.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years ago
Paul B Mahol
fb5c9be82e
avcodec/qdrw: add support for 0x0001 code
...
Fixes decoding of files which sets frame width/height this way.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years ago
James Almer
d04e0a6bcf
avcodec/qdrw: don't overwrite bpp when checking its value
...
Finishes fixing ticket #6171
8 years ago
Paul B Mahol
770ac75ae9
avcodec/qdrw: add support for 2bpp and 4bpp packed pallette format
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years ago
Paul B Mahol
4e6b44559a
avcodec/qdrw: fix writing past end of row
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years ago
Paul B Mahol
f4777d1b89
avcodec/qdrw: add support for decoding rgb555
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years ago
Paul B Mahol
2eaee6e79b
avcodec/qdrw: skip long comment for now
...
Fixes part of #5918 .
Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years ago
Paul B Mahol
3e99b377fc
avcodec: remove "get_buffer() failed" message
...
It is already provided by ff_get_buffer().
Signed-off-by: Paul B Mahol <onemda@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
Carl Eugen Hoyos
209e91cbc4
lavc/qdrw: Do not fail decoding valid Quickdraw images.
10 years ago
Carl Eugen Hoyos
1eda55510a
lavc/qdrw: Fix overwrite when reading invalid Quickdraw images.
10 years ago
Michael Niedermayer
019daa0775
avcodec/qdrw: Fix the code which asks for version 1 samples
...
The new code only asks for version 1 if its actually version 1 and
prints the version bytes if its something else
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
5c8e4bf7c4
avcodec/qdrw: another try at skipping the first 512 bytes
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
4b28907e4a
avcodec/qdrw: cleanup skip code
...
Skip 512 byte sectors until a non zero resolution is found
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Vittorio Giovara
0348e74c01
quickdraw: Skip the empty 512 byte header for images
...
Found-by: Carl Eugen Hoyos <cehoyos@ag.or.at>
10 years ago
Carl Eugen Hoyos
d0dce15da3
quickdraw: Make the palette opaque
...
Additional overflow fix by Michael Niedermayer <michaelni@gmx.at>.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
10 years ago
Carl Eugen Hoyos
b453e76842
lavc/qdrw: Also support real-world qdraw images.
10 years ago
Vittorio Giovara
34efb8a169
quickdraw: Support direct pixel blocks
...
Data is stored in separated components so rework decode_rle() to support
stepping and offsets.
10 years ago
Vittorio Giovara
bb2cb0a66d
quickdraw: Switch to greedy parsing
...
Quickdraw packs data as a series of codes that the application is supposed
to handle, but it does not define any order in which they might appear.
Since it's unfeasible to support *all* opcodes defined by the spec,
only handle well-known blocks containing video data and ignore any unknown
or unsupported ones.
Move palette loading and rle decoding to separate functions to resue them
in other blocks and drop format initialization in init since it can
support more formats than pal8.
Validate width and height.
10 years ago
Vittorio Giovara
d00f1e0fc1
quickdraw: Convert to bytestream2
...
Add appropriate error messages and reduce r, g, b variables scope.
Drop the now redundant line checks in RLE decoding.
10 years ago
Diego Biurrun
b2bed9325d
cosmetics: Group .name and .long_name together in codec/format declarations
11 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
80cf2ebc59
qdrw: cosmetics, reformat
12 years ago
Anton Khirnov
688b132b88
qdrw: return meaningful error codes.
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
Michael Niedermayer
b12d92efd6
avoid "0xFF << 24" as it is considered a integer overflow in C99
...
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
Martin Storsjö
1d9c2dc89a
Don't include common.h from avutil.h
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
12 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
562b6c744a
Remove unnecessary AVFrame pointer casts.
13 years ago
Carl Eugen Hoyos
9f9a1f424e
Set QuickDraw palette opaque.
13 years ago
Laurent Aimar
4fd56f842c
quickdraw: Check for out of bound reads
...
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
13 years ago
Laurent Aimar
44e2f0c3cd
Check for out of bound reads in the QuickDraw decoder.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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
Stefano Sabatini
975a1447f7
Replace deprecated FF_*_TYPE symbols with AV_PICTURE_TYPE_*.
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
14 years ago
Mans Rullgard
2912e87a6c
Replace FFmpeg with Libav in licence headers
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Diego Elio Pettenò
e7e2df27f8
Add ff_ prefix to data symbols of encoders, decoders, hwaccel, parsers, bsf.
...
None of these symbols should be accessed directly, so declare them as
hidden.
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit d36beb3f69
)
14 years ago
Diego Elio Pettenò
d36beb3f69
Add ff_ prefix to data symbols of encoders, decoders, hwaccel, parsers, bsf.
...
None of these symbols should be accessed directly, so declare them as
hidden.
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Diego Biurrun
ba87f0801d
Remove explicit filename from Doxygen @file commands.
...
Passing an explicit filename to this command is only necessary if the
documentation in the @file block refers to a file different from the
one the block resides in.
Originally committed as revision 22921 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Stefano Sabatini
72415b2adb
Define AVMediaType enum, and use it instead of enum CodecType, which
...
is deprecated and will be dropped at the next major bump.
Originally committed as revision 22735 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago