Commit Graph

5094 Commits

Author SHA1 Message Date
zhenghongda
31a6cff6bb Fixed the abnormal decryption issue of MP4 audio in cens encryption mode
Signed-off-by: zhenghongda <18810008421@163.com>
2024-07-31 09:36:32 +00:00
Bojack
81f5ca5888 add livephoto
Signed-off-by: Bojack <yangjunhui_job@163.com>
2024-07-12 11:03:08 +08:00
ziyugao
b8cc51b48b CVE
Signed-off-by: ziyugao <gaoziyu0614@outlook.com>
2024-05-16 08:59:50 +00:00
ziyugao
70c28dba3f CVE
Signed-off-by: ziyugao <gaoziyu0614@outlook.com>
2024-05-16 08:59:10 +00:00
cyberbox
3b0fb00990
upgrade ffmpeg from 4.4.1 to 5.1.4
Signed-off-by: cyberbox <468042667@qq.com>
Change-Id: I63cc2a8c9ff6197c67d6b6b47c124882ad942a22
2024-04-25 17:20:18 +08:00
zhenghongda
5ef5378a7f drm cenc decrypt updates the cencInfo structure and adds CEI parsing.
Signed-off-by: zhenghongda <zhenghongda4@huawei.com>
2024-04-01 10:59:42 +08:00
zhenghongda
8f7804a0d8 The MP4 H264 encoding format supports pssh parsing and cenc data encapsulation
Signed-off-by: zhenghongda <zhenghongda4@huawei.com>
2024-03-15 14:29:03 +08:00
vvtest
df7caf8708
ffmpeg回退
Signed-off-by: vvtest <815508462@qq.com>
2024-02-05 11:18:57 +00:00
vvtest
e022934105
ffmpeg升级
Signed-off-by: vvtest <815508462@qq.com>
2024-01-24 09:12:57 +00:00
gg0907
65994f5530 upgrade to 4.4.1
Signed-off-by: gg0907 <guohui_1701@163.com>
2022-05-23 11:23:35 +08:00
gg0907
a2da95c415 add avconfig.h and ffversion.h
Signed-off-by: gg0907 <guohui_1701@163.com>
2022-04-01 14:40:18 +08:00
gg0907
28f9b7daac 1、fix cve 2、add version 3、modify version in README.OpenSource 4、delete avconfig.h and ffversion
Signed-off-by: gg0907 <guohui_1701@163.com>
2022-04-01 13:58:26 +08:00
gg0907
3786ef72b5 ffmpeg upgrade to 4.3.2
Signed-off-by: gg0907 <guohui_1701@163.com>
2022-03-31 16:02:22 +08:00
appoe
cffa387350 add ffmpeg into version build
Signed-off-by: appoe <1029040451@qq.com>
2021-07-22 21:55:44 +08:00
Michael Niedermayer
836f6fb567 avutil/avsscanf: Add () to avoid integer overflow in scanexp()
Fixes: signed integer overflow: 2147483610 + 52 cannot be represented in type 'int'
Fixes: 23260/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PBM_fuzzer-5187871274434560

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 42b28565aa852b98d95d8d02f7b0781999f9d533)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-07-02 10:20:36 +02:00
Michael Niedermayer
199d6a049a avutil/common: Fix integer overflow in av_ceil_log2_c()
Fixes: left shift of 1913647649 by 1 places cannot be represented in type 'int'
Fixes: 23572/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-5082619795734528

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit e409262837712016097c187e97bf99aadf6a4cdf)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-07-02 10:20:36 +02:00
Michael Niedermayer
0a8a96c251 Bump minor versions to separate 4.3 from master
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-06-08 22:49:04 +02:00
Limin Wang
4bc5eb27a7 avutil/dict: av_realloc -> av_realloc_array()
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-06-06 10:32:07 +08:00
Dale Curtis
d9aa1ef2c2 avutil/mathematics: Fix overflow with NaN in av_add_stable()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-06-06 00:25:00 +02:00
James Almer
b6c8444e23 avutil/buffer: separate public and internal flags inside AVBuffers
It's better to not mix user provided flags and internal flags set by
AVBufferRef helper functions.

Signed-off-by: James Almer <jamrial@gmail.com>
2020-06-05 10:07:05 -03:00
James Almer
f2ad89beff avutil/buffer: avutil/buffer: add a mention that some arguments from av_buffer_pool_init2() may be NULL
Signed-off-by: James Almer <jamrial@gmail.com>
2020-06-05 10:07:04 -03:00
James Almer
ec39c2276a avutil/buffer: use the default allocator if none is provided to av_buffer_pool_init2()
Signed-off-by: James Almer <jamrial@gmail.com>
2020-06-05 10:07:04 -03:00
Jun Zhao
0c79b73164 hwcontext_vulkan: fix make checkheaders fail
make checkheaders will get error as follow:
CC	libavutil/hwcontext_vulkan.h.o
In file included from libavutil/hwcontext_vulkan.h.c:1:
./libavutil/hwcontext_vulkan.h:130:23: error: ‘AV_NUM_DATA_POINTERS’ undeclared here (not in a function)
  130 |     void *alloc_pnext[AV_NUM_DATA_POINTERS];
      |                       ^~~~~~~~~~~~~~~~~~~~
./libavutil/hwcontext_vulkan.h:199:43: warning: ‘enum AVPixelFormat’ declared inside parameter list will not be visible outside of this definition or declaration

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2020-06-04 21:26:21 +08:00
Limin Wang
77e15f01fb avutil/attributes: Fix too many warning: false is not defined [-Wundef]
Reviewed-by: James Almer <jamrial@gmail.com>
Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-05-30 17:29:23 +08:00
Dale Curtis
fda1c74539 Use gcc/clang builtins for av_sat_(add|sub)_64_c if available.
Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-05-27 21:05:52 +02:00
Lynne
64b12624e2
hwcontext_vulkan: fix uploading and downloading from/to flipped images
We want to copy the lowest amount of bytes per line, but while the buffer
stride is sanitized, the src/dst stride can be negative, and negative numbers
of bytes do not make a lot of sense.
2020-05-26 12:03:42 +01:00
Lynne
bf056caf54
hwcontext_vulkan: check for dedicated allocation when mapping from drm/vaapi
Some vendors (AMD) require dedicated allocation to be used for all imported
images.
2020-05-26 10:52:11 +01:00
Lynne
b6d4bedbb1
hwcontext_vulkan: initialize the frames context when deriving
Otherwise, the frames context is considered to be ready to handle
mapping, and it doesn't get initialized the normal way through
.frames_init.
2020-05-26 10:52:10 +01:00
Lynne
6bb718aabd
hwcontext_vulkan: use dedicated allocation for buffers when necessary 2020-05-26 10:52:10 +01:00
Lynne
4dcb50c58a
hwcontext_vulkan: use host mapped buffers when uploading and downloading
Speeds up both use cases by 30%.
2020-05-26 10:52:10 +01:00
Andreas Rheinhardt
731c775898 avutil/mem: Use max_alloc_size as-is
The size of a single allocation performed by av_malloc() or av_realloc()
is supposed to be bounded by max_alloc_size, which defaults to INT_MAX
and can be set by the user; yet currently this is not completely
honoured: The actual value used is max_alloc_size - 32. How this came
to be can only be understood historically:

a) 0ecca7a49f disallowed allocations
> INT_MAX. At that time the size parameter of av_malloc() was an
unsigned and the commentary added ("lets disallow possible ambiguous
cases") indicates that this was done as a precaution against calling the
functions with negative int values. Genuinely limiting the size of
allocations to INT_MAX doesn't seem to have been the intention given
that at this time the memalign hack introduced in commit
da9b170c6f (which when enabled increased
the size of allocations slightly so that one can return a correctly
aligned pointer that actually does not point to the beginning of the
allocated buffer) was already present.
b) Said memalign hack allocated 17 bytes more than actually desired, yet
allocating 16 bytes more is actually enough and so this was changed in
a9493601638b048c44751956d2360f215918800c; this commit also replaced
INT_MAX by INT_MAX - 16 (and made the limit therefore a limit on the size
of the allocated buffer), but kept the comment, although there is nothing
ambiguous about allocating (INT_MAX - 16)..INT_MAX.
c) 13dfce3d44 then increased 16 to 32 for
AVX, 6b4c0be558 replaced INT_MAX by
MAX_MALLOC_SIZE (which was of course defined to be INT_MAX) and
5a8e994287 added max_alloc_size and made
it user-selectable.
d) 4fb311c804 then dropped the memalign
hack, yet it kept the -32 (probably because the comment about ambiguous
cases was still present?), although it is no longer needed at all after
this commit. Therefore this commit removes it and uses max_alloc_size
directly.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-05-26 06:47:31 +02:00
Anton Khirnov
064b875e89 h264dec: support exporting QP tables through the AVVideoEncParams API 2020-05-25 11:59:42 +02:00
Lynne
dc9cf7f2cd
hwcontext_vulkan: move physical device feature discovery to device_init
Otherwise custom vulkan device contexts won't work.
2020-05-23 19:07:46 +01:00
Lynne
d870e75c39
hwcontext_vulkan: split uploading and downloading contexts
This allows us to speed up only-uploading or only-downloading use cases.
2020-05-23 19:07:45 +01:00
Lynne
192997dd7f
hwcontext_vulkan: set usage for DRM imports to the frames context usage
They're nothing special, and there's no reason they should always use the
default flags.
2020-05-23 19:07:43 +01:00
Lynne
2c6366590e
hwcontext_vulkan: do not OR the user-specified usage with our default flags
Some users may need special formats that aren't available when the STORAGE
flag bit is set, which would result in allocations failing.
2020-05-23 19:07:41 +01:00
Lynne
98405422be
hwcontext_vulkan: actually use the frames exec context for prep/import/export
This was never actually used, likely due to confusion, as the device context
also had one used for uploads and downloads.
Also, since we're only using it for very quick image barriers (which are
practically free on all hardware), use the compute queue instead of the
transfer queue.
2020-05-23 19:07:39 +01:00
Lynne
3dd3d1b7fb
hwcontext_vulkan: support user-provided pools
If an external pool was provided we skipped all of frames init,
including the exec context.
2020-05-23 19:07:37 +01:00
Lynne
c0b0807871
hwcontext_vulkan: use all enabled queues for transfers, make uploads async
This commit makes full use of the enabled queues to provide asynchronous
uploads of images (downloads remain synchronous).
For a pure uploading use cases, the performance gains can be significant.
2020-05-23 19:07:36 +01:00
Lynne
cdb949a05c
hwcontext_vulkan: wrap ImageBufs into AVBufferRefs
Makes it easier to support multiple queues
2020-05-23 19:07:34 +01:00
Lynne
c6df64035f
hwcontext_vulkan: improve public header documentation
Some things like using ImageLists were from a really old version that
still used multiplanar images.
2020-05-23 19:07:32 +01:00
Lynne
ea1a7f6064
hwcontext_vulkan: expose the enabled device features
With this, the puzzle of making libplacebo, ffmpeg and any other Vulkan
API users interoperable is complete.
Users of both libraries can initialize one another's contexts without having
to create a new one.
2020-05-23 19:07:30 +01:00
Lynne
01c7539f30
hwcontext_vulkan: expose the amount of queues for each queue family
This, along with the next patch, are the last missing pieces to being
interoperable with libplacebo.
2020-05-23 19:07:29 +01:00
Lynne
2e08b39444
hwcontext: add av_hwdevice_ctx_create_derived_opts
This allows for users who derive devices to set options for the
new device context they derive.
The main use case of this is to allow users to enable extensions
(such as surface drawing extensions) in Vulkan while deriving from
the device their frames are on. That way, users don't need to write
any initialization code themselves, since the Vulkan spec invalidates
mixing instances, physical devices and active devices.
Apart from Vulkan, other hwcontexts ignore the opts argument since they
don't support options at all (or in VAAPI and OpenCL's case, options are
currently only used for device selection, which device_derive overrides).
2020-05-23 19:07:26 +01:00
Nicolas George
6b65c4ec54 lavu: add av_gcd_q(). 2020-05-23 15:51:44 +02:00
Marton Balint
af9e622776 avutil/opt: add AV_OPT_FLAG_CHILD_CONSTS
This will be used for AVCodecContext->profile. By specifying constants in the
encoders we won't have to use the common AVCodecContext options table and
different encoders can use the same profile name even with different values.

Signed-off-by: Marton Balint <cus@passwd.hu>
2020-05-22 22:16:52 +02:00
Anton Khirnov
f30a41a608 Stop hardcoding align=32 in av_frame_get_buffer() calls.
Use 0, which selects the alignment automatically.
2020-05-22 14:38:57 +02:00
Linjie Fu
9723d7d523 lavc/qsvdec: add decode support for HEVC 4:2:2 8-bit and 10-bit
Enables HEVC Range Extension decoding support (Linux) for 4:2:2 8/10 bit
on ICL+ (gen11 +) platform.

Restricted to linux only for now.

Signed-off-by: Linjie Fu <linjie.fu@intel.com>
2020-05-18 13:32:50 +08:00
James Almer
84af196c65 avutil: bump version after addition of av_sat_add64 and av_sat_sub64
Signed-off-by: James Almer <jamrial@gmail.com>
2020-05-17 16:05:15 -03:00
Dale Curtis
a7e1af3cb1 avutil/common: Add saturated add/sub operations for int64_t.
Many places are using their own custom code for handling overflow
around timestamps or other int64_t values. There are enough of these
now that having some common saturated math functions seems sound.

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-05-15 22:03:36 +02:00