lee ju
6a0feafebe
avcodec/frame_thread_encoder: fix memory leak that occurs when close encoder without sending eof and receiving to end
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years ago
James Almer
de0526070e
avcodec/frame_thread_encoder: remove usage of av_dup_packet()
...
Signed-off-by: James Almer <jamrial@gmail.com>
7 years ago
James Almer
015f976aae
avcodec/frame_thread_encoder: use av_packet_alloc()
...
Signed-off-by: James Almer <jamrial@gmail.com>
7 years ago
Carl Eugen Hoyos
3118e81f86
lavc/frame_thread_encoder: Do not mix variable declaration and code.
...
Fixes a warning:
ISO C90 forbids mixed declarations and code
7 years ago
Reimar Döffinger
a149fa97d9
avcodec/frame_thread_encoder: Fix AV_OPT_TYPE_STRING handling in avctx
...
This is the equivalent to what 7d317d4706
did for the codec-specific options.
av_opt_copy has specific handling so it's fine that we already copied
the whole context before.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
7 years ago
Ronald S. Bultje
183216b218
frame_thread_encoder: make 'exit' member atomic.
...
Should fix the following tsan warning:
WARNING: ThreadSanitizer: data race (pid=19806)
Read of size 4 at 0x7b84000012f0 by thread T9:
#0 worker src/libavcodec/frame_thread_encoder.c:66 (ffmpeg+0x0000007f349e)
[..]
Previous write of size 4 at 0x7b84000012f0 by main thread (mutexes: write M1395):
#0 ff_frame_thread_encoder_free src/libavcodec/frame_thread_encoder.c:239 (ffmpeg+0x0000007f379e)
[..]
7 years ago
Michael Niedermayer
7d317d4706
avcodec/frame_thread_encoder: Fix AV_OPT_TYPE_STRING handling in priv_data
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Ronald S. Bultje
d98f34d7d4
frame_thread_encoder: extend critical code covered by finished_task_mutex.
...
Should fix tsan errors in utvideoenc_rgb_left and related tests.
8 years ago
Michael Niedermayer
f90c9c306f
Check av_dup_packet() return code
...
Fixes: CID1338320
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Derek Buitenhuis
1a2d6055be
avcodec/frame_thread_encoder: Check the private option for huffy's context modelling
...
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
9 years ago
Clément Bœsch
a8bb81a05c
lavc, lavu: use avutil/thread.h instead of redundant conditional includes
9 years ago
Hendrik Leppkes
1ffcf6ac90
frame_thread_encoder: use ref-counting to avoid memcpy of all input frames
...
Apparently uneeded lock/unlock removed by commiter
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Christophe Gisquet
1467780772
huffyuvenc: add a non-deterministic option
...
Not actually used in huffyuvenc, but rather in setting the frame
threading.
Example for some files:
context=0: 851974 27226 1137281
context=1,ND=0: 471819 22604 972351
context=1,ND=1: 472875 22673 972582
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Lukasz Marek
bc4f362c92
lavc/frame_thread_encoder: use av_fifo_alloc_array
...
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
11 years ago
Lukasz Marek
9b60d907ae
lavc: use av_fifo_freep
...
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
11 years ago
Michael Niedermayer
466988ab75
Fix dont and doesnt typos
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
3c7220fc60
avcodec/frame_thread_encoder: warn about huffyuv limitations
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
f7459bcfc5
avcodec/frame_thread_encoder: restructure huffyuv checks
...
This makes them similar to the other checks
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Carl Eugen Hoyos
e1cb6dc59e
Warn the user if mjpeg cbr encoding with frame threading was requested.
11 years ago
Carl Eugen Hoyos
cfc36666f6
Force automatic thread_count to 1 for cbr mjpeg frame threading.
...
Constant bit rate mjpeg encoding fails for threads > 1 and frame threading.
11 years ago
Michael Niedermayer
bb7a711156
avcodec/huffyuvenc: frame multi-threading support
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Dave Yeo
e615a77799
os2threads: move from lavc to compat/
...
For useage in other places besides lavc. Needed after commit
90f9a5830b
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
42bb3e4db6
avcodec: remove ff_get_logical_cpus()
...
This simplifies the code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
3affcc99a8
frame_thread_encoder: silence integer to pointer without cast warning
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
f4aaf987a5
frame_thread_encoder: fix handling of case where the encoder does not output a packet.
...
This case could cause a deadlock
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
f472d01c25
frame_thread_encode: fix context memleak
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
991db63951
frame_thread_encoder: fix packet memleak
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
2d5c80b2e8
frame_thread_encoder: pass frame pict type and quality
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
097a909ea1
frame_thread_encoder: pass private options
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
fde1bc64ad
lavc: add frame multithreading capability (currently intra only)
...
Compared to the decoder side, this code is able to change both the
delay and the number of threads seamlessly during encoding. Also
any idle thread can pick up tasks, the strict round robin in order
limit is gone too.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago