Re: [FFmpeg-devel] [PATCH 1/2] avcodec/videotoolboxenc: fix undefined behavior with rc_max_rate=0

2018-07-20 Thread Thomas Guillem
On Thu, Jul 19, 2018, at 18:27, Aman Gupta wrote: > On Fri, Jul 6, 2018 at 10:55 PM Thomas Guillem wrote: > > > > > > > On Thu, Jul 5, 2018, at 20:49, Aman Gupta wrote: > > > On Wed, Jul 4, 2018 at 3:05 AM Thomas Guillem wrote: > > > > > >

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/videotoolboxenc: fix undefined behavior with rc_max_rate=0

2018-07-06 Thread Thomas Guillem
n? > > Has a radar been filed with Apple about this? This issue doesn't reproduce on the iOS 12 beta (with the same device), so I guess they are aware or it has been fixed. > > On Wed, Jul 4, 2018 at 1:44 PM Thomas Guillem wrote: > > > On Wed, Jul 4, 2018, at 09:05,

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/videotoolboxenc: fix undefined behavior with rc_max_rate=0

2018-07-06 Thread Thomas Guillem
On Thu, Jul 5, 2018, at 20:49, Aman Gupta wrote: > On Wed, Jul 4, 2018 at 3:05 AM Thomas Guillem wrote: > > > On macOS, a zero rc_max_rate cause an error from > > VTSessionSetProperty(kVTCompressionPropertyKey_DataRateLimits). > > > > on iOS (depending on devic

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/videotoolboxenc: fix undefined behavior with rc_max_rate=0

2018-07-04 Thread Thomas Guillem
On Wed, Jul 4, 2018, at 09:05, Thomas Guillem wrote: > On macOS, a zero rc_max_rate cause an error from > VTSessionSetProperty(kVTCompressionPropertyKey_DataRateLimits). > > on iOS (depending on device/version), a zero rc_max_rate cause invalid > arguments from the vtenc_output_cal

Re: [FFmpeg-devel] [PATCH] avcodec/videotoolboxenc: fix undefined behavior with rc_max_rate=0

2018-07-04 Thread Thomas Guillem
On Tue, Jul 3, 2018, at 20:53, Carl Eugen Hoyos wrote: > 2018-07-03 17:05 GMT+02:00, Thomas Guillem : > > On macOS, a zero rc_max_rate cause an error from > > VTSessionSetProperty(kVTCompressionPropertyKey_DataRateLimits). > > > > on iOS (depending on device/version

[FFmpeg-devel] [PATCH 2/2] avcodec/videotoolboxenc: reindent after previous commit

2018-07-04 Thread Thomas Guillem
--- libavcodec/videotoolboxenc.c | 72 ++-- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c index aa9aae7e05..050e5cefee 100644 --- a/libavcodec/videotoolboxenc.c +++

[FFmpeg-devel] [PATCH 1/2] avcodec/videotoolboxenc: fix undefined behavior with rc_max_rate=0

2018-07-04 Thread Thomas Guillem
On macOS, a zero rc_max_rate cause an error from VTSessionSetProperty(kVTCompressionPropertyKey_DataRateLimits). on iOS (depending on device/version), a zero rc_max_rate cause invalid arguments from the vtenc_output_callback after few frames and then a crash within the VideoToolbox library. ---

[FFmpeg-devel] [PATCH] avcodec/videotoolboxenc: fix undefined behavior with rc_max_rate=0

2018-07-03 Thread Thomas Guillem
On macOS, a zero rc_max_rate cause an error from VTSessionSetProperty(kVTCompressionPropertyKey_DataRateLimits). on iOS (depending on device/version), a zero rc_max_rate cause invalid arguments from the vtenc_output_callback after few frames and then a crash within the VideoToolbox library. ---

Re: [FFmpeg-devel] [PATCH 3/3] avcodec/videotoolboxenc: fix invalid session on iOS

2018-06-18 Thread Thomas Guillem
Ping? On Thu, Jun 14, 2018, at 17:48, Thomas Guillem wrote: > Cf. comment. Restart the VT session when the APP goes from foreground to > background and vice versa. > --- > libavcodec/videotoolboxenc.c | 23 +-- > 1 file changed, 21 insertions(+), 2 deletio

[FFmpeg-devel] [PATCH 3/3] avcodec/videotoolboxenc: fix invalid session on iOS

2018-06-14 Thread Thomas Guillem
Cf. comment. Restart the VT session when the APP goes from foreground to background and vice versa. --- libavcodec/videotoolboxenc.c | 23 +-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c index

[FFmpeg-devel] [PATCH 3/3] avcodec/videotoolboxenc: fix invalid session on iOS

2018-06-11 Thread Thomas Guillem
Cf. comment. Restart the VT session when the APP goes from foreground to background and vice versa. --- libavcodec/videotoolboxenc.c | 25 +++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c index

[FFmpeg-devel] [PATCH 2/3] avcodec/videotoolboxenc: split initialization

2018-06-11 Thread Thomas Guillem
Split vtenc_init() into vtenc_init() (VTEncContext initialization) and vtenc_configure_encoder() (creates the vt session). This commit will allow to restart the vt session while encoding. --- libavcodec/videotoolboxenc.c | 48 +--- 1 file changed, 28

[FFmpeg-devel] [PATCH 1/3] avcodec/videotoolboxenc: fix mutex/cond leak in error path

2018-06-11 Thread Thomas Guillem
The leak could happen when the vtenc_create_encoder() function failed. --- libavcodec/videotoolboxenc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c index 7796a685c2..9f2a71b15d 100644 ---

Re: [FFmpeg-devel] [PATCH] lavc: Make hardware config method support more explicit for hwaccels

2017-12-08 Thread Thomas Guillem
On Fri, Dec 8, 2017, at 17:15, Mark Thompson wrote: > From: Thomas Guillem <tho...@gllm.fr> > > This fixes the use of old ad-hoc methods which are still supported by > some > hwaccels which also support newer methods (DXVA2, VAAPI, VDPAU, > videotoolbox) - without the m

[FFmpeg-devel] [PATCH 2/2] lavc: add back AD_HOC method for DXVA2/D3D11/VAAPI/VDPAU

2017-12-07 Thread Thomas Guillem
--- libavcodec/hwaccel.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavcodec/hwaccel.h b/libavcodec/hwaccel.h index 16ee822920..292a87f6b5 100644 --- a/libavcodec/hwaccel.h +++ b/libavcodec/hwaccel.h @@ -75,15 +75,15 @@ typedef struct AVCodecHWConfigInternal {

[FFmpeg-devel] [PATCH 1/2] lavc: change HW_CONFIG_HWACCEL arguments

2017-12-07 Thread Thomas Guillem
Add a boolean to specify if an API can work with AV_CODEC_HW_CONFIG_METHOD_AD_HOC. --- libavcodec/hwaccel.h | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/libavcodec/hwaccel.h b/libavcodec/hwaccel.h index ae55527c2f..16ee822920 100644 ---