Commit Graph

19959 Commits

Author SHA1 Message Date
Andreas Cadhalpun
60f1cc4a1f alsdec: only adapt order for positive max_order
For max_order = 0 the clipping range is invalid. (amin = 2, amax = 1)

CC: libav-stable@libav.org
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-05-05 16:10:52 +02:00
Andreas Cadhalpun
94bb1ce882 alsdec: check sample pointer range in revert_channel_correlation
Also change the type of begin, end and smp to ptrdiff_t to make the
comparison well-defined.

CC: libav-stable@libav.org
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-05-05 16:06:58 +02:00
Andreas Cadhalpun
110f7f35fb aacpsy: correct calculation of minath in psy_3gpp_init
The minimum of the ath(x, ATH_ADD) function depends on ATH_ADD.
This patch uses the first order approximation to determine it.

For ATH_ADD = 4 this results in the value at 3407.06812 (-5.24241638)
not the one at 3410 (-5.24237967).

CC: libav-stabl@libav.org
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-05-05 10:28:02 +02:00
Andreas Cadhalpun
e191aaca44 alsdec: limit avctx->bits_per_raw_sample to 32
avctx->bits_per_raw_sample is used in get_sbits_long, which only
supports up to 32 bits.

CC: libav-stable@libav.org
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-05-05 10:22:29 +02:00
Andreas Cadhalpun
8fc8024ea5 aasc: return correct buffer size from aasc_decode_frame
CC: libav-stable@libav.org
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-05-05 10:18:59 +02:00
Carl Eugen Hoyos
3ecb82dd41 dnxhddec: Fix pixel format change
Regression introduced in 598f7d046c.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-05-01 14:52:24 +01:00
Vittorio Giovara
6503cbf842 ffv1enc: Add const attribute to input frame
warning: assigning to 'AVFrame *' (aka 'struct AVFrame *') from
         'const AVFrame *' (aka 'const struct AVFrame *') discards
         qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
2015-05-01 14:52:24 +01:00
Anton Khirnov
a09c499a2e rawenc: properly allocate coded_frame 2015-04-29 05:52:58 +02:00
Anton Khirnov
a0f2946068 h264: use properly allocated AVFrames 2015-04-29 05:52:58 +02:00
Anton Khirnov
7a4f74eed5 h264: embed the DPB in the context
It now has a fixed size and is initialized only once, so there is no
point in allocating it separately.
2015-04-29 05:52:58 +02:00
Anton Khirnov
88c612e3a4 h264: merge the init and reinit paths in update_thread_context()
There is no real need to handle the init case specially, everything
necessary is initialized in the reinit code as well.
2015-04-29 05:52:58 +02:00
Anton Khirnov
8a66fd4026 h264: drop the reinit parameter from init_slice_header()
It is only used to decide whether to call free_tables(), but that
function is safe to call on an uninitialized context as well.
2015-04-29 05:52:58 +02:00
Anton Khirnov
c9ccbc7333 h264: update the current bit depth/chroma type in init_slice_header()
With frame threading, it is currently only updated in the context where
the change occurs, but not in any other contexts.
2015-04-29 05:52:58 +02:00
Anton Khirnov
29dcde2b87 h264: copy nal_length_size in update_thread_context
It does not make sense to copy is_avc without copying this as well. This
patch should not change anything for now, but will have an effect in
later commits.
2015-04-29 05:52:58 +02:00
Anton Khirnov
440e8dd374 h264: drop a comment that carries no useful information 2015-04-29 05:52:58 +02:00
Anton Khirnov
11f024ef0a h264: move freeing the escaped RBSP buffer to free_context()
It does not logically belong in free_tables(), since it's not allocated
in alloc_tables() and its size has nothing to do with the frame size.
2015-04-29 05:52:58 +02:00
Anton Khirnov
ee62b364be h264: eliminate ff_h264_set_parameter_from_sps()
That function currently does two things -- reinitializing the DSP
contexts and setting low_delay based on the SPS values.

The former more appropriately belongs in h264_slice_header_init(), while
the latter only really makes sense in decode_slice_header().

The third call to ff_h264_set_parameter_from_sps(), done immediately
after parsing a new SPS, appears to serve no useful purpose, so it is
just dropped.

Also, drop now unneeded H264Context.cur_chroma_format_idc.
2015-04-29 05:52:57 +02:00
Anton Khirnov
54986d6db9 h264: move context reinit lower down in update_thread_context()
It uses some fields from the SPS, which is not yet set where the reinit
is called currently.
2015-04-29 05:52:57 +02:00
Anton Khirnov
a6cd154463 h264: move the DPB init/uninit to init_context()/free_context()
Currently, the DPB is initialized in alloc_tables() and uninitialized in
free_tables(), but those functions manage frame size-dependent
variables, so DPB management does not logically belong in there.

Since we want the init/uninit to happen exactly once per the context
lifetime, init_context()/free_context() are the proper place for this
code.
2015-04-29 05:52:57 +02:00
Anton Khirnov
9d33bab583 h264: drop H264Context.ouputed_poc
It is only set, but never used for anything.
2015-04-29 05:52:57 +02:00
Anton Khirnov
27b0e6ebfd h264: drop needs_realloc
It is not needed anymore since switching to refcounted frames.
2015-04-29 05:52:57 +02:00
Vittorio Giovara
0c69164f45 h263: Convert function to macro 2015-04-28 16:33:09 +01:00
Vittorio Giovara
59dfc2b0c8 h263: Drop commented-out code and a related otherwise unused function 2015-04-28 16:31:05 +01:00
Vittorio Giovara
c341820130 jpeglsenc: Mark codec as init-thread-safe and init-cleanup
Fixes a memory leak on init failure.
2015-04-28 16:29:29 +01:00
Vittorio Giovara
3919a45726 jpeglsenc: Check memory allocations
Convert exisiting free functions to av_freep() to avoid accidental
double frees, and always intialize all buffers to NULL.
2015-04-28 16:27:16 +01:00
Vittorio Giovara
f5ba67ee13 flacenc: Move a scratch buffer to struct used by the function
This avoids allocating/freeing memory at every function call,
checking its return value, and carrying the error around.
2015-04-28 16:25:09 +01:00
Rico Tzschichholz
5aed1d4240 vaapi: Fix -Wimplicit-function-declaration for ff_dlog() usage
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-04-26 00:07:41 +02:00
Andreas Cadhalpun
cfdaa4de6c dss_sp: use lowercase codec name without whitespace
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-04-24 14:55:11 +01:00
Vittorio Giovara
18db1286b0 libxvid: Make codec use the init-cleanup flag and mark it as init-thread-safe
This takes care of memory leaks on init error.
2015-04-24 14:55:11 +01:00
Vittorio Giovara
eae7338e15 libx264: Make codec use the init-cleanup flag and mark it as init-thread-safe
This takes care of memory leaks on init error.
2015-04-24 14:55:11 +01:00
Vittorio Giovara
74a1cad7e3 lclenc: Mark codec as init-thread-safe and init-cleanup 2015-04-24 14:55:11 +01:00
Vittorio Giovara
bb428e00ac hqx: Mark codec as init-thread-safe and init-cleanup 2015-04-24 14:55:11 +01:00
Vittorio Giovara
43171886e0 huffyuvenc: Mark codec as init-thread-safe and init-cleanup 2015-04-24 14:55:11 +01:00
Vittorio Giovara
d90133b77b asvenc: Mark codec as init-thread-safe and init-cleanup 2015-04-24 14:55:10 +01:00
Vittorio Giovara
a4edaeb50f hq_hqa: Fix table data for profile 17
The table had a wrong table height and was missing the first line of bytes.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-04-24 14:55:10 +01:00
Vittorio Giovara
5bba3ab0cf internal: Make dlog/tlog a no-op when disabled
Improves Coverity analysis, avoiding "double semicolon" CIDs.
2015-04-24 14:55:10 +01:00
Luca Barbato
0a51c7d42a prores: Set the bits_per_coded_sample for alpha pix_fmt
Improve the compatibility with other software.
2015-04-22 20:50:10 +02:00
Luca Barbato
28eddef689 hq_hqa: Validate get_vlc2 return value
The `hq_ac_vlc.table` is incomplete, so unaccounted symbol return -1
as value.
2015-04-22 12:27:43 +02:00
Luca Barbato
a78f5548d9 avcodec: Free the default avoptions on init failure 2015-04-22 12:27:13 +02:00
Luca Barbato
aef0be0875 avcodec: Unref the dummy buffer on the fail path 2015-04-22 12:27:13 +02:00
Vittorio Giovara
bd5ad8b23d hq_hqa: Fix reading hqa quantization matrix index
Value is stored as a byte.
2015-04-20 19:20:22 +01:00
Vittorio Giovara
1746dc382d hqxdsp.h: #include "stddef.h"
It is required by ptrdiff_t, fixes make checkheaders.
2015-04-20 19:19:23 +01:00
Vittorio Giovara
86e1a35802 h264_ps: Return meaningful error codes and address a memory leak
Bug-Id: CID 1026763
2015-04-20 14:59:40 +01:00
Diego Biurrun
338ed3ed33 ffv1: Pass correct pointers to av_free()
Bug-Id: CID 1295124
2015-04-20 14:59:40 +01:00
Thomas Guillem
b18346817d flac: fix realloc loop with invalid flac files
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-04-20 12:41:33 +02:00
Eric Zimmerman
eb31256f12 g2meet: Support G2M5 codec variant
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-04-19 23:45:35 +01:00
Andreas Cadhalpun
09bd7ddf20 aacdec: consistently use avctx for logging in decode_eld_specific_config
ac may be NULL and then accessing ac->avctx results in a segmentation fault.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-04-19 23:45:35 +01:00
Vittorio Giovara
3d71b1f8f0 mpegvideo_enc: Simplify picture allocation 2015-04-19 23:17:56 +01:00
Vittorio Giovara
0251c9be5a motion_est: Fix warning from zero_cmp() assignment
warning: incompatible
      pointer types assigning to 'me_cmp_func' (aka 'int (*)(struct
      MpegEncContext *, uint8_t *, uint8_t *, ptrdiff_t, int)') from 'int
      (MpegEncContext *, uint8_t *, uint8_t *, int, int)'
      [-Wincompatible-pointer-types]
2015-04-19 23:17:56 +01:00
Vittorio Giovara
4d593896aa vc1_pred: Always initialize px and py in ff_vc1_pred_mv_intfr()
Fix a rather lengthy initialization warning from clang.
2015-04-19 23:17:56 +01:00