Re: [FFmpeg-devel] [PATCH 1/2] fate: add dst decoder test

2018-12-21 Thread Paul B Mahol
On 12/21/18, Peter Ross  wrote:
> ---
> the dst sample file is 40 kilobytes.
> i don't have write access to fate-suite to upload it.
>
>

Please provide way to access it.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH v2] avcodec/fft_template: libavcodec/fft_template: improve performance of the ff_fft_init in fft_template

2018-12-21 Thread Steven Liu
Before patch:
init nbits = 17, get 1 samples, average cost: 16105 us
After patch:
init nbits = 17, get 1 samples, average cost: 15221 us

Signed-off-by: Steven Liu 
---
 libavcodec/fft_template.c | 26 +++---
 1 file changed, 15 insertions(+), 11 deletions(-)

diff --git a/libavcodec/fft_template.c b/libavcodec/fft_template.c
index 762c014bc8..2b528be882 100644
--- a/libavcodec/fft_template.c
+++ b/libavcodec/fft_template.c
@@ -261,17 +261,21 @@ av_cold int ff_fft_init(FFTContext *s, int nbits, int 
inverse)
 if (s->fft_permutation == FF_FFT_PERM_AVX) {
 fft_perm_avx(s);
 } else {
-for(i=0; ifft_permutation == FF_FFT_PERM_SWAP_LSBS)
-j = (j&~3) | ((j>>1)&1) | ((j<<1)&2);
-k = -split_radix_permutation(i, n, s->inverse) & (n-1);
-if (s->revtab)
-s->revtab[k] = j;
-if (s->revtab32)
-s->revtab32[k] = j;
-}
+#define SPLIT_RADIX_PERMUTATION(num) do { \
+for(i=0; ifft_permutation == FF_FFT_PERM_SWAP_LSBS)\
+j = (j&~3) | ((j>>1)&1) | ((j<<1)&2);\
+k = -split_radix_permutation(i, n, s->inverse) & (n-1);\
+s->revtab##num[k] = j;\
+}\
+} while(0);
+if (s->revtab)
+SPLIT_RADIX_PERMUTATION()
+if (s->revtab32)
+SPLIT_RADIX_PERMUTATION(32)
+#undef SPLIT_RADIX_PERMUTATION
 }
 
 return 0;
-- 
2.15.2 (Apple Git-101.1)



___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] h264_v4l2m2m encoder segmentation fault (Samsung Exynos5422)

2018-12-21 Thread Roland Singer
> Run:
> $ gdb -ex r --args ./encode_video out h264_v4l2m2m
> 
> At the core dump, type "bt" and press return. Post that backtrace. Or
> analyze it, if you know what you are doing. 

Hi Moritz,
thanks for the quick reply. I tried to debug the problem already, but the 
problem lies within libavcodec.so.
I'll try to build ffmpeg with debug flags enabled. This might show some more 
hints.

GDB:
> Program received signal SIGSEGV, Segmentation fault.
> 0xb63ca57c in ?? () from /usr/lib/libavcodec.so.58
> (gdb) bt
> #0  0xb63ca57c in ?? () from /usr/lib/libavcodec.so.58
> #1  0x81818180 in ?? ()
> Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Oh, one more thing. dmesg outputs following line:

> vidioc_try_fmt:1070: failed to try output format

Have a great day!
Roland
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] h264_v4l2m2m encoder segmentation fault (Samsung Exynos5422)

2018-12-21 Thread Roland Singer
I compiled ffmpeg with debug flags:

> ./configure --prefix="/opt/ffmpeg" \
>--pkg-config-flags="--static" --disable-programs --disable-doc \
>--enable-gpl --enable-static --enable-pic --enable-v4l2_m2m \
>--disable-optimizations --disable-mmx --disable-stripping --disable-asm

and the results are following:

> (gdb) bt
> #0  ff_v4l2_buffer_avframe_to_buf (frame=0x1c69800, out=0x1c661f0) at 
> libavcodec/v4l2_buffers.c:294
> #1  0x01081a58 in ff_v4l2_context_enqueue_frame (ctx=0x1c65f18, 
> frame=0x1c69800)
> at libavcodec/v4l2_context.c:542
> #2  0x009a1ed0 in v4l2_send_frame (avctx=0x1c64020, frame=0x1c69800) at 
> libavcodec/v4l2_m2m_enc.c:248
> #3  0x0050d0ac in avcodec_send_frame (avctx=0x1c64020, frame=0x1c69800) at 
> libavcodec/encode.c:403
> #4  0x00423a78 in encode ()
> #5  0x00424144 in main ()

I'll try debug this more and find out what causes this.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] h264_v4l2m2m encoder segmentation fault (Samsung Exynos5422)

2018-12-21 Thread Roland Singer
After some investigation I came to the conclusion, that av_frame_get_buffer 
does not allocate the buffers correctly.

1. frame->pix_fmt=AV_PIX_FMT_NV12  frame->width=64  frame->height=64
2. so we need a buffer with 2 planes of same size. First plane holds Y and 
second plane holds U and V interleaved.
3. the frame linesize is set correctly by av_frame_get_buffer: linesize[0]=64  
linesize[1]=64
4. frame->buf must have both planes, however only frame->buf[0] is set and 
initialized. This causes the segmentation fault, because frame->buf[1] does not 
exists.

Hope somebody can help clarifying why av_frame_get_buffer fails to initialize 
the buffers correctly...

Thanks!
Roland
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] h264_v4l2m2m encoder segmentation fault (Samsung Exynos5422)

2018-12-21 Thread Roland Singer
Second thing I noticed is that flushing is broken for v4l2m2m encoders.

> avcodec_send_frame(enc_ctx, NULL);

should return AVERROR_EOF instead of continuing with an empty AVPacket with 
size=0.

Hope we can get this fixed.

Roland
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 1/2] avcodec: add photocd decoder

2018-12-21 Thread Carl Eugen Hoyos
2018-12-20 10:02 GMT+01:00, Paul B Mahol :
> On 12/20/18, Carl Eugen Hoyos  wrote:
>> 2018-12-19 21:32 GMT+01:00, Paul B Mahol :
>>
>>> +static av_cold int photocd_decode_init(AVCodecContext *avctx)
>>> +{
>>> +avctx->pix_fmt= AV_PIX_FMT_YUV420P;
>>
>> I very much welcome this patch but it appears that the colourspace
>> conversion is missing that was part of the original patchset=-(
>
> Please refrain from telling me such obvious untrue things.

I may misunderstand your comment, to clarify I attach a jpg
that shows FFmpeg output on top and reference output below
for the sample image IMG0024.PCD.

Carl Eugen
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 1/2] avcodec: add photocd decoder

2018-12-21 Thread Paul B Mahol
On 12/21/18, Carl Eugen Hoyos  wrote:
> 2018-12-20 10:02 GMT+01:00, Paul B Mahol :
>> On 12/20/18, Carl Eugen Hoyos  wrote:
>>> 2018-12-19 21:32 GMT+01:00, Paul B Mahol :
>>>
 +static av_cold int photocd_decode_init(AVCodecContext *avctx)
 +{
 +avctx->pix_fmt= AV_PIX_FMT_YUV420P;
>>>
>>> I very much welcome this patch but it appears that the colourspace
>>> conversion is missing that was part of the original patchset=-(
>>
>> Please refrain from telling me such obvious untrue things.
>
> I may misunderstand your comment, to clarify I attach a jpg
> that shows FFmpeg output on top and reference output below
> for the sample image IMG0024.PCD.

I will ignore your comments as there is misunderstanding from your side.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 1/2] avcodec: add photocd decoder

2018-12-21 Thread Nicolas George
Paul B Mahol (2018-12-21):
> I will ignore your comments as there is misunderstanding from your side.

Unacceptable. If somebody has misunderstood something you wrote, then
you need to explain better.

-- 
  Nicolas George


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 1/2] avcodec: add photocd decoder

2018-12-21 Thread Carl Eugen Hoyos


> Am 21.12.2018 um 16:43 schrieb Paul B Mahol :
> 
>> On 12/21/18, Carl Eugen Hoyos  wrote:
>> 2018-12-20 10:02 GMT+01:00, Paul B Mahol :
 On 12/20/18, Carl Eugen Hoyos  wrote:
 2018-12-19 21:32 GMT+01:00, Paul B Mahol :
 
> +static av_cold int photocd_decode_init(AVCodecContext *avctx)
> +{
> +avctx->pix_fmt= AV_PIX_FMT_YUV420P;
 
 I very much welcome this patch but it appears that the colourspace
 conversion is missing that was part of the original patchset=-(
>>> 
>>> Please refrain from telling me such obvious untrue things.
>> 
>> I may misunderstand your comment, to clarify I attach a jpg
>> that shows FFmpeg output on top and reference output below
>> for the sample image IMG0024.PCD.
> 
> I will ignore your comments as there is misunderstanding from your side.

Would you like to clarify?

Carl Eugen
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 1/2] avcodec: add photocd decoder

2018-12-21 Thread Paul B Mahol
On 12/21/18, Carl Eugen Hoyos  wrote:
>
>
>> Am 21.12.2018 um 16:43 schrieb Paul B Mahol :
>>
>>> On 12/21/18, Carl Eugen Hoyos  wrote:
>>> 2018-12-20 10:02 GMT+01:00, Paul B Mahol :
> On 12/20/18, Carl Eugen Hoyos  wrote:
> 2018-12-19 21:32 GMT+01:00, Paul B Mahol :
>
>> +static av_cold int photocd_decode_init(AVCodecContext *avctx)
>> +{
>> +avctx->pix_fmt= AV_PIX_FMT_YUV420P;
>
> I very much welcome this patch but it appears that the colourspace
> conversion is missing that was part of the original patchset=-(

 Please refrain from telling me such obvious untrue things.
>>>
>>> I may misunderstand your comment, to clarify I attach a jpg
>>> that shows FFmpeg output on top and reference output below
>>> for the sample image IMG0024.PCD.
>>
>> I will ignore your comments as there is misunderstanding from your side.
>
> Would you like to clarify?

The colors that PhotoCD uses predates color space definitions.
There is no nice way to support it so only manual conversion could do it.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avcodec/libvpxenc: add VP8/9 sharpness config option

2018-12-21 Thread James Zern
On Thu, Dec 20, 2018 at 7:51 PM Rene Claus
 wrote:
>
> This commit adds configuration options to libvpxenc.c that can be used to
> tune the sharpness parameter for VP8 and VP9.
>
> Signed-off-by: Rene Claus 
> ---
>  doc/encoders.texi  | 4 
>  libavcodec/libvpxenc.c | 6 ++
>  2 files changed, 10 insertions(+)
>

This looks all right aside from the text comments.

> diff --git a/doc/encoders.texi b/doc/encoders.texi
> index 3d5b9fc2d2..7f9478fa9d 100644
> --- a/doc/encoders.texi
> +++ b/doc/encoders.texi
> @@ -1767,6 +1767,10 @@ Set number of frames to look ahead for frametype and 
> ratecontrol.
>  @item error-resilient
>  Enable error resiliency features.
>
> +@item sharpness @var{integer}
> +Codec control function to set higher sharpness at the expense of a lower 
> PSNR.
> +The valid range is [0, 7]. Default is 0.
> +

Codec control is meaningful for users of libvpx, but not here. The
text from vpxenc should work:
"Increase sharpness at the expense of lower PSNR"
The range is OK to keep, the default up to the library. From the
wrapper's point of view the default is unset.

> [...]
> +{ "sharpness", "Sharpness", offsetof(VPxContext, sharpness), 
> AV_OPT_TYPE_INT, {.i64 = -1}, -1, 7, VE},
>

This could match as well:
"Increase sharpness at the expense of lower PSNR"

No need to mention the range, that's handled automatically (try -h
encoder=libvpx).
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avcodec/libvpxenc: add VP8/9 sharpness config option

2018-12-21 Thread James Almer
On 12/21/2018 1:09 PM, James Zern wrote:
> On Thu, Dec 20, 2018 at 7:51 PM Rene Claus
>  wrote:
>>
>> This commit adds configuration options to libvpxenc.c that can be used to
>> tune the sharpness parameter for VP8 and VP9.
>>
>> Signed-off-by: Rene Claus 
>> ---
>>  doc/encoders.texi  | 4 
>>  libavcodec/libvpxenc.c | 6 ++
>>  2 files changed, 10 insertions(+)
>>
> 
> This looks all right aside from the text comments.
> 
>> diff --git a/doc/encoders.texi b/doc/encoders.texi
>> index 3d5b9fc2d2..7f9478fa9d 100644
>> --- a/doc/encoders.texi
>> +++ b/doc/encoders.texi
>> @@ -1767,6 +1767,10 @@ Set number of frames to look ahead for frametype and 
>> ratecontrol.
>>  @item error-resilient
>>  Enable error resiliency features.
>>
>> +@item sharpness @var{integer}
>> +Codec control function to set higher sharpness at the expense of a lower 
>> PSNR.
>> +The valid range is [0, 7]. Default is 0.
>> +
> 
> Codec control is meaningful for users of libvpx, but not here. The
> text from vpxenc should work:
> "Increase sharpness at the expense of lower PSNR"
> The range is OK to keep, the default up to the library. From the
> wrapper's point of view the default is unset.
> 
>> [...]
>> +{ "sharpness", "Sharpness", offsetof(VPxContext, sharpness), 
>> AV_OPT_TYPE_INT, {.i64 = -1}, -1, 7, VE},
>>
> 
> This could match as well:
> "Increase sharpness at the expense of lower PSNR"
> 
> No need to mention the range, that's handled automatically (try -h
> encoder=libvpx).

There's no need to mention it the AVOption description, but it's ok in
the encoders.texi. Other options do it as well.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 1/2] add support for ROI-based encoding

2018-12-21 Thread Derek Buitenhuis
A few comments below.

On 12/12/2018 16:26, Guo, Yejun wrote:
> +if (frame->rois_buf != NULL) {
> +if (x4->params.rc.i_aq_mode == X264_AQ_NONE) {
> +av_log(ctx, AV_LOG_ERROR, "Adaptive quantization must be 
> enabled to use ROI encoding, skipping ROI.\n");

This should, in my opinion, return an error and fail hard.

If people want it to continue anyway, it should be AV_LOG_WARNING.

> +} else {
> +if (frame->interlaced_frame == 0) {
> +const static int MBSIZE = 16;

I think we generally use defines for this stuff.

> +size_t mbx = (frame->width + MBSIZE - 1) / MBSIZE;
> +size_t mby = (frame->height + MBSIZE - 1) / MBSIZE;


> +float* qoffsets = (float*)av_malloc(sizeof(float) * mbx 
> * mby);

Convention in FFmpeg is to use sizeof(*var).

> +memset(qoffsets, 0, sizeof(float) * mbx * mby);

Missing NULL check for alloc failure.

> +
> +size_t nb_rois = frame->rois_buf->size / 
> sizeof(AVFrameROI);

I think we have some macros that do this already.

> +AVFrameROI* rois = (AVFrameROI*)frame->rois_buf->data;
> +for (size_t roi = 0; roi < nb_rois; ++roi) {

Nit/convention: roi++

> +int starty = FFMIN(mby, rois[roi].top / MBSIZE);
> +int endy = FFMIN(mby, (rois[roi].bottom + MBSIZE - 
> 1)/ MBSIZE);
> +int startx = FFMIN(mbx, rois[roi].left / MBSIZE);
> +int endx = FFMIN(mbx, (rois[roi].right + MBSIZE - 
> 1)/ MBSIZE);
> +for (int y = starty; y < endy; ++y) {
> +for (int x = startx; x < endx; ++x) {
> +qoffsets[x + y*mbx] = get_roi_qoffset(ctx, 
> rois[roi].quality);
> +}
> +}
> +}
> +
> +x4->pic.prop.quant_offsets = qoffsets;
> +x4->pic.prop.quant_offsets_free = av_free;
> +} else {
> +av_log(ctx, AV_LOG_ERROR, "interlaced_frame not 
> supported for ROI encoding yet, skipping ROI.\n");

Same comment as befor: return error or change to warning.



> +enum AVRoiQuality {

Probably should be AVROIQuality.

> +AV_RQ_NONE = 0,
> +AV_RQ_BETTER = 1,
> +AV_RQ_BEST = 2,
> +};
> +
> +typedef struct AVFrameROI {
> +/* coordinates at frame pixel level.
> + * it will be extended internally if the codec requirs an alignment
> + */
> +size_t top;
> +size_t bottom;
> +size_t left;
> +size_t right;
> +enum AVRoiQuality quality;
> +} AVFrameROI;

Are we not going to allow the API to set an actual offset? This really
limits what someone can do. (I say this as a user of x264's ROI API, in my
own codebase, at least.)

Cheers,
- Derek
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] Add HDR dynamic metadata struct (for SMPTE 2094-40) to libavutil.

2018-12-21 Thread Vittorio Giovara
On Thu, Dec 20, 2018 at 8:14 PM Mohammad Izadi  wrote:

> From: Mohammad Izadi 
>
> The dynamic metadata contains data for color volume transform -
> application 4 of SMPTE 2094-40:2016 standard. The data comes from HEVC in
> the SEI_TYPE_USER_DATA_REGISTERED_ITU_T_T35.
>
>
pushed, thanks
-- 
Vittorio
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 1/2] avcodec: add photocd decoder

2018-12-21 Thread Paul B Mahol
On 12/21/18, Paul B Mahol  wrote:
> On 12/21/18, Carl Eugen Hoyos  wrote:
>>
>>
>>> Am 21.12.2018 um 16:43 schrieb Paul B Mahol :
>>>
 On 12/21/18, Carl Eugen Hoyos  wrote:
 2018-12-20 10:02 GMT+01:00, Paul B Mahol :
>> On 12/20/18, Carl Eugen Hoyos  wrote:
>> 2018-12-19 21:32 GMT+01:00, Paul B Mahol :
>>
>>> +static av_cold int photocd_decode_init(AVCodecContext *avctx)
>>> +{
>>> +avctx->pix_fmt= AV_PIX_FMT_YUV420P;
>>
>> I very much welcome this patch but it appears that the colourspace
>> conversion is missing that was part of the original patchset=-(
>
> Please refrain from telling me such obvious untrue things.

 I may misunderstand your comment, to clarify I attach a jpg
 that shows FFmpeg output on top and reference output below
 for the sample image IMG0024.PCD.
>>>
>>> I will ignore your comments as there is misunderstanding from your side.
>>
>> Would you like to clarify?
>
> The colors that PhotoCD uses predates color space definitions.
> There is no nice way to support it so only manual conversion could do it.
>

I will adjust U and V plane components, and leave Y untouched (result
will be acceptable to me).
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] avcodec/libvpxenc: add VP8/9 sharpness config option

2018-12-21 Thread Rene Claus
This commit adds configuration options to libvpxenc.c that can be used to
tune the sharpness parameter for VP8 and VP9.

Signed-off-by: Rene Claus 
---
 doc/encoders.texi  | 4 
 libavcodec/libvpxenc.c | 6 ++
 2 files changed, 10 insertions(+)

diff --git a/doc/encoders.texi b/doc/encoders.texi
index 3d5b9fc2d2..c6fe923ec7 100644
--- a/doc/encoders.texi
+++ b/doc/encoders.texi
@@ -1767,6 +1767,10 @@ Set number of frames to look ahead for frametype and 
ratecontrol.
 @item error-resilient
 Enable error resiliency features.
 
+@item sharpness @var{integer}
+Increase sharpness at the expense of lower PSNR.
+The valid range is [0, 7].
+
 @item VP8-specific options
 @table @option
 @item ts-parameters
diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c
index 39af586790..c823b8ad8b 100644
--- a/libavcodec/libvpxenc.c
+++ b/libavcodec/libvpxenc.c
@@ -76,6 +76,7 @@ typedef struct VPxEncoderContext {
 struct FrameListData *coded_frame_list;
 
 int cpu_used;
+int sharpness;
 /**
  * VP8 specific flags, see VP8F_* below.
  */
@@ -130,6 +131,7 @@ static const char *const ctlidstr[] = {
 [VP8E_SET_TUNING]= "VP8E_SET_TUNING",
 [VP8E_SET_CQ_LEVEL]  = "VP8E_SET_CQ_LEVEL",
 [VP8E_SET_MAX_INTRA_BITRATE_PCT] = "VP8E_SET_MAX_INTRA_BITRATE_PCT",
+[VP8E_SET_SHARPNESS]   = "VP8E_SET_SHARPNESS",
 #if CONFIG_LIBVPX_VP9_ENCODER
 [VP9E_SET_LOSSLESS]= "VP9E_SET_LOSSLESS",
 [VP9E_SET_TILE_COLUMNS]= "VP9E_SET_TILE_COLUMNS",
@@ -751,6 +753,9 @@ FF_ENABLE_DEPRECATION_WARNINGS
 return AVERROR(EINVAL);
 }
 
+if (ctx->sharpness >= 0)
+codecctl_int(avctx, VP8E_SET_SHARPNESS, ctx->sharpness);
+
 if (CONFIG_LIBVPX_VP8_ENCODER && avctx->codec_id == AV_CODEC_ID_VP8) {
 #if FF_API_PRIVATE_OPT
 FF_DISABLE_DEPRECATION_WARNINGS
@@ -1193,6 +1198,7 @@ static int vpx_encode(AVCodecContext *avctx, AVPacket 
*pkt,
 {"arnr_strength", "altref noise reduction filter strength", 
offsetof(VPxContext, arnr_strength), AV_OPT_TYPE_INT, {.i64 = 3}, 0, 6, VE}, \
 {"arnr_type", "altref noise reduction filter type", offsetof(VPxContext, 
arnr_type), AV_OPT_TYPE_INT, {.i64 = 3}, 1, 3, VE}, \
 {"rc_lookahead", "Number of frames to look ahead for alternate reference 
frame selection", offsetof(VPxContext, lag_in_frames), AV_OPT_TYPE_INT, {.i64 = 
25}, 0, 25, VE}, \
+{"sharpness", "Increase sharpness at the expense of lower PSNR", 
offsetof(VPxContext, sharpness), AV_OPT_TYPE_INT, {.i64 = -1}, -1, 7, VE},
 
 #if CONFIG_LIBVPX_VP8_ENCODER
 static const AVOption vp8_options[] = {
-- 
2.20.1.415.g653613c723-goog

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 1/2] avcodec: add photocd decoder

2018-12-21 Thread Paul B Mahol
Signed-off-by: Paul B Mahol 
---
 libavcodec/Makefile |   1 +
 libavcodec/allcodecs.c  |   1 +
 libavcodec/avcodec.h|   1 +
 libavcodec/codec_desc.c |   7 +
 libavcodec/photocd.c| 493 
 5 files changed, 503 insertions(+)
 create mode 100644 libavcodec/photocd.c

diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index d53b8ff330..d32761559e 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -508,6 +508,7 @@ OBJS-$(CONFIG_PGM_ENCODER) += pnmenc.o
 OBJS-$(CONFIG_PGMYUV_DECODER)  += pnmdec.o pnm.o
 OBJS-$(CONFIG_PGMYUV_ENCODER)  += pnmenc.o
 OBJS-$(CONFIG_PGSSUB_DECODER)  += pgssubdec.o
+OBJS-$(CONFIG_PHOTOCD_DECODER) += photocd.o
 OBJS-$(CONFIG_PICTOR_DECODER)  += pictordec.o cga_data.o
 OBJS-$(CONFIG_PIXLET_DECODER)  += pixlet.o
 OBJS-$(CONFIG_PJS_DECODER) += textdec.o ass.o
diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
index d70646e91a..db2071f980 100644
--- a/libavcodec/allcodecs.c
+++ b/libavcodec/allcodecs.c
@@ -227,6 +227,7 @@ extern AVCodec ff_pgm_encoder;
 extern AVCodec ff_pgm_decoder;
 extern AVCodec ff_pgmyuv_encoder;
 extern AVCodec ff_pgmyuv_decoder;
+extern AVCodec ff_photocd_decoder;
 extern AVCodec ff_pictor_decoder;
 extern AVCodec ff_pixlet_decoder;
 extern AVCodec ff_png_encoder;
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index fd7f60bf4a..57154a6dcd 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -452,6 +452,7 @@ enum AVCodecID {
 AV_CODEC_ID_MWSC,
 AV_CODEC_ID_WCMV,
 AV_CODEC_ID_RASC,
+AV_CODEC_ID_PHOTOCD,
 
 /* various PCM "codecs" */
 AV_CODEC_ID_FIRST_AUDIO = 0x1, ///< A dummy id pointing at the 
start of audio codecs
diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c
index 73f343ce24..0af51e5c2f 100644
--- a/libavcodec/codec_desc.c
+++ b/libavcodec/codec_desc.c
@@ -1691,6 +1691,13 @@ static const AVCodecDescriptor codec_descriptors[] = {
 .long_name = NULL_IF_CONFIG_SMALL("RemotelyAnywhere Screen Capture"),
 .props = AV_CODEC_PROP_LOSSY,
 },
+{
+.id= AV_CODEC_ID_PHOTOCD,
+.type  = AVMEDIA_TYPE_VIDEO,
+.name  = "photocd",
+.long_name = NULL_IF_CONFIG_SMALL("Kodak Photo CD"),
+.props = AV_CODEC_PROP_LOSSY,
+},
 
 /* various PCM "codecs" */
 {
diff --git a/libavcodec/photocd.c b/libavcodec/photocd.c
new file mode 100644
index 00..95884fe2e9
--- /dev/null
+++ b/libavcodec/photocd.c
@@ -0,0 +1,493 @@
+/*
+ * Kodak PhotoCD (a.k.a. ImagePac) image decoder
+ *
+ * Copyright (c) 1996-2002 Gerd Knorr
+ * Copyright (c) 2010 Kenneth Vermeirsch
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/**
+ * @file
+ * Kodak PhotoCD (a.k.a. ImagePac) image decoder
+ *
+ * Supports resolutions up to 3072x2048.
+ */
+
+#include "libavutil/avassert.h"
+#include "libavutil/intreadwrite.h"
+#include "libavutil/opt.h"
+#include "avcodec.h"
+#include "bytestream.h"
+#include "get_bits.h"
+#include "internal.h"
+
+typedef struct PhotoCDContext {
+AVClass *class;
+int  lowres;
+int  luma;
+int  chroma;
+
+GetByteContext gb;
+int  thumbnails;  //* number of thumbnails; 0 for normal image */
+int  resolution;
+int  orientation;
+
+int  streampos;
+
+uint8_t *seq [3]; //* huffman tables */
+uint8_t *bits[3];
+} PhotoCDContext;
+
+typedef struct ImageInfo {
+uint32_t start;
+uint16_t width, height;
+} ImageInfo;
+
+static const ImageInfo img_info[6] = {
+{8192,192, 128},
+{47104,   384, 768},
+{196608,  768, 512},
+{0,  1536, 1024},
+{0,  3072, 2048},
+{0,  6144, 4096},
+};
+
+#define HTABLE_SIZE 0x1
+
+static av_always_inline void interp_lowres(PhotoCDContext *s, AVFrame *picture,
+   int width, int height)
+{
+GetByteContext *gb = &s->gb;
+int start = s->streampos + img_info[2].start;
+uint8_t *ptr, *ptr1, *ptr2;
+uint8_t *dest;
+int fill;
+
+ptr  = picture->data[0];
+ptr1 = picture->data[1];
+ptr2 = picture->data[2];
+
+bytestream2_seek(gb, start, SEEK_SET);
+
+for 

Re: [FFmpeg-devel] [PATCH 1/2] avcodec: add photocd decoder

2018-12-21 Thread Paul B Mahol
On 12/20/18, Peter Ross  wrote:
> also where can i find a sample to fuzz test?

You can create small samples with ImageMagick/GraphicsMagick otherwise
use google skills.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avformat/mpegts: unset DTS/PTS for subtitle PES packets if PCR not available

2018-12-21 Thread Jan Ekström
On Wed, Dec 19, 2018 at 8:56 PM Michael Niedermayer
 wrote:
>
> On Sat, Dec 15, 2018 at 08:50:41PM +0200, Jan Ekström wrote:
> > Fixes issues when a subtitle packet is received before PCR for the
> > program has been received, leading to wildly jumping timestamps
> > on the lavf client side as well as in the re-ordering logic.
> >
> > This usually happens in case of multiplexes where the PCR of a
> > program is not taken into account with subtitle tracks' DTS/PTS.
> > ---
> >  libavformat/mpegts.c | 11 +++
> >  1 file changed, 11 insertions(+)
>
> For the record, so this is not lost on IRC and causes misunderstandings
>  JEEB, if you prefer the simple solution iam fine with that too 
> but i might (if i find time) rewrite it to do the buffering so the timestamps 
> arent lost in the cases this affects
>

As Michael is OK with this, If there are no further comments, I will
push this tomorrow morning.

As a reminder of what this improves:
Sample: https://kuroko.fushizen.eu/samples/2018-04-04-funky_teletext_mux.cut.ts

Steps to show difference:
1. ffprobe -of json -show_packets -show_programs - > before.json
2. ffprobe -of json -show_packets -show_programs - > after.json
3. git diff --no-index before.json after.json

Example of a failing ffmpeg.c command line without these changes
(requires the libzvbi teletext decoder to be enabled):
ffmpeg -fix_sub_duration -txt_format text -v verbose -i
2018-04-04-funky_teletext_mux.cut.ts -c:v mpeg4 -c:a aac -c:s ass
out.mkv

This works after this patch is applied and the incorrect timestamp is
no longer there in the first teletext subtitle packet.

Jan
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avformat/mpegts: unset DTS/PTS for subtitle PES packets if PCR not available

2018-12-21 Thread Jan Ekström
On Fri, Dec 21, 2018 at 9:04 PM Jan Ekström  wrote:
>
> On Wed, Dec 19, 2018 at 8:56 PM Michael Niedermayer
>  wrote:
> >
> > On Sat, Dec 15, 2018 at 08:50:41PM +0200, Jan Ekström wrote:
> > > Fixes issues when a subtitle packet is received before PCR for the
> > > program has been received, leading to wildly jumping timestamps
> > > on the lavf client side as well as in the re-ordering logic.
> > >
> > > This usually happens in case of multiplexes where the PCR of a
> > > program is not taken into account with subtitle tracks' DTS/PTS.
> > > ---
> > >  libavformat/mpegts.c | 11 +++
> > >  1 file changed, 11 insertions(+)
> >
> > For the record, so this is not lost on IRC and causes misunderstandings
> >  JEEB, if you prefer the simple solution iam fine with that too 
> > but i might (if i find time) rewrite it to do the buffering so the 
> > timestamps arent lost in the cases this affects
> >
>
> As Michael is OK with this, If there are no further comments, I will
> push this tomorrow morning.
>
> As a reminder of what this improves:
> Sample: 
> https://kuroko.fushizen.eu/samples/2018-04-04-funky_teletext_mux.cut.ts
>
> Steps to show difference:
> 1. ffprobe -of json -show_packets -show_programs - > before.json
> 2. ffprobe -of json -show_packets -show_programs - > after.json
> 3. git diff --no-index before.json after.json
>
> Example of a failing ffmpeg.c command line without these changes
> (requires the libzvbi teletext decoder to be enabled):
> ffmpeg -fix_sub_duration -txt_format text -v verbose -i
> 2018-04-04-funky_teletext_mux.cut.ts -c:v mpeg4 -c:a aac -c:s ass
> out.mkv
>

Actually now that I give it another bit of thought, no need for
libzvbi, just -c copy'ing  into .ts is enough.

Jan
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 1/2] avcodec: add photocd decoder

2018-12-21 Thread Carl Eugen Hoyos
2018-12-21 19:48 GMT+01:00, Paul B Mahol :

> +if (s->luma) {
> +ptr = p->data[0];
> +
> +for (int y = 0; y < avctx->height; y++) {
> +for (int x = 0; x < avctx->width; x++) {
> +ptr[x] = av_clip_uint8(ptr[x] * 1.35);
> +}

Without this multiplication, the y plane looks much more
similar to the reference with respect to brightness.

Thank you, Carl Eugen
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 1/2] avcodec: add photocd decoder

2018-12-21 Thread Carl Eugen Hoyos
2018-12-20 0:52 GMT+01:00, Peter Ross :

> also where can i find a sample to fuzz test?

See http://samples.ffmpeg.org/ffmpeg-bugs/trac/ticket5923/

Carl Eugen
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 1/2] avcodec: add photocd decoder

2018-12-21 Thread Steinar H. Gunderson
On Fri, Dec 21, 2018 at 05:07:45PM +0100, Paul B Mahol wrote:
> The colors that PhotoCD uses predates color space definitions.

Really? It looks fairly well-defined to me, though esoteric
(the gamma ramp is basically like sRGB but with a much bigger constant,
and the 8-bit Y'CbCr scaling seems unusual):

  https://en.wikipedia.org/wiki/Photo_CD#Encoding

FFmpeg doesn't have a good understanding of gamma (it rarely actually
converts between different gamma ramps), but that's not a problem with
PhotoCD per se. I can't find a good reason why FFmpeg could not be
extended with conversions from the PhotoCD color space to sRGB, at least
not if clipping out-of-gamut colors is acceptable.

/* Steinar */
-- 
Homepage: https://www.sesse.net/
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH]configure: Make sure libpostproc can be found if -rpath-link doesn't work

2018-12-21 Thread Carl Eugen Hoyos
Hi!

Attached patch fixes running fate with "--enable-shared --enable-gpl" on
Solaris, the linker searches "libpostproc" in a directory"-link=libpostproc".
Only tested on Solaris.

Please comment, Carl Eugen
From d69f1fcee41e803e5208bbfabdeb37a19e73814b Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos 
Date: Sat, 22 Dec 2018 00:04:43 +0100
Subject: [PATCH] configure: Make sure libpostproc can be found if -rpath-link
 doesn't work.

Solaris ld takes "-rpath-link=libpostproc" as indication to search in "-link=libpostproc".
---
 configure |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index 2205751..04d3417 100755
--- a/configure
+++ b/configure
@@ -6535,7 +6535,7 @@ EOF
 
 # add some linker flags
 check_ldflags -Wl,--warn-common
-check_ldflags -Wl,-rpath-link=libpostproc:libswresample:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil:libavresample
+check_ldflags -Wl,-rpath-link=:libpostproc:libswresample:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil:libavresample
 enabled rpath && add_ldexeflags -Wl,-rpath,$libdir && add_ldsoflags -Wl,-rpath,$libdir
 test_ldflags -Wl,-Bsymbolic && append SHFLAGS -Wl,-Bsymbolic
 
-- 
1.7.10.4

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 1/2] add support for ROI-based encoding

2018-12-21 Thread Carl Eugen Hoyos
2018-12-21 17:36 GMT+01:00, Derek Buitenhuis :

> On 12/12/2018 16:26, Guo, Yejun wrote:
>> +if (frame->rois_buf != NULL) {
>> +if (x4->params.rc.i_aq_mode == X264_AQ_NONE) {
>> +av_log(ctx, AV_LOG_ERROR, "Adaptive quantization
>> must be enabled to use ROI encoding, skipping ROI.\n");
>
> This should, in my opinion, return an error and fail hard.

> If people want it to continue anyway, it should be AV_LOG_WARNING.

+1

Carl Eugen
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH]lavc/opus_rc: Case a const pointer to uint8_t *

2018-12-21 Thread Carl Eugen Hoyos
2018-12-17 2:47 GMT+01:00, Carl Eugen Hoyos :

> The Opus struct RawBitsContext is used in both the decoder and the encoder.
> The fact that *position is const avoids warnings in the decoder where
> it points into the bitstream. The encoder writes into the same
> pointer, attached cast silences the warning on targets where AV_WB32()
> does not internally cast the qualifier away.

Patch applied.

Carl Eugen
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 1/2] fate: add dst decoder test

2018-12-21 Thread Carl Eugen Hoyos
2018-12-21 3:32 GMT+01:00, Peter Ross :
> ---
> the dst sample file is 40 kilobytes.

You could attach it...

Carl Eugen
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 1/2] fate: add dst decoder test

2018-12-21 Thread Peter Ross
On Sat, Dec 22, 2018 at 12:26:05AM +0100, Carl Eugen Hoyos wrote:
> 2018-12-21 3:32 GMT+01:00, Peter Ross :
> > ---
> > the dst sample file is 40 kilobytes.
> 
> You could attach it...

here is the file. cheers,

-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)


dst-64fs44-2ch.dff
Description: Binary data


signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] Fix unnecessary buffer reallocotion in ffio_ensure_seekback().

2018-12-21 Thread Michael Niedermayer
On Thu, Dec 20, 2018 at 11:11:45AM +0200, Artyom Lebedev wrote:
> On 12/19/18 8:49 PM, Michael Niedermayer wrote:
> >On Wed, Dec 19, 2018 at 02:33:49PM +0200, Artyom Lebedev wrote:
> >>It was reallocated even if the exisiting buffer is larger than needed one,
> >>thus unnecessary shrinking it.
> >>  aviobuf.c |3 +++
> >>  1 file changed, 3 insertions(+)
> >>17a6a27b38d8fc7336d7177338b915b507a69033  
> >>0001-Fix-unnecessary-buffer-reallocotion-in-ffio_ensure_s.patch
> >> From 2b8cea72a69abe6564367fb2149be936d2ffb916 Mon Sep 17 00:00:00 2001
> >>From: Artyom Lebedev 
> >>Date: Wed, 19 Dec 2018 11:49:22 +0200
> >>Subject: [PATCH] Fix unnecessary buffer reallocotion in
> >>  ffio_ensure_seekback().
> >>To: ffmpeg-devel@ffmpeg.org
> >>
> >>---
> >>  libavformat/aviobuf.c | 3 +++
> >>  1 file changed, 3 insertions(+)
> >>
> >>diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
> >>index 5a33f82..b867fdd 100644
> >>--- a/libavformat/aviobuf.c
> >>+++ b/libavformat/aviobuf.c
> >>@@ -1063,6 +1063,9 @@ int ffio_ensure_seekback(AVIOContext *s, int64_t 
> >>buf_size)
> >>  return 0;
> >>  av_assert0(!s->write_flag);
> >>+if (s->buffer_size >= buf_size)
> >>+return 0;
> >Theres a check which returns out for unnecessary reallocation
> >a few lines above
> >if that is incorrect that should be corrected
> >also theres a typo in the commit message
> >
> >thx
> >
> >[...]
> >
> >
> >___
> >ffmpeg-devel mailing list
> >ffmpeg-devel@ffmpeg.org
> >http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> Which check do you mean? "buf_size < filled"? This only checks if currently

yes


> filled size is less than required (I do not know why, may be there was
> intended to do "buf_size < s->buffer_size" check)?

maybe, that is the question. i do not remember why it was written this way
so it could infact be unintended

the point is adding this 2nd check on top is certainly wrong as the checks would
be redundant, or if its not redundant it really would need some explanation

thx

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

it is not once nor twice but times without number that the same ideas make
their appearance in the world. -- Aristotle


signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avcodec/libvpxenc: add VP8/9 sharpness config option

2018-12-21 Thread James Zern
On Fri, Dec 21, 2018 at 1:36 PM Rene Claus
 wrote:
>
> This commit adds configuration options to libvpxenc.c that can be used to
> tune the sharpness parameter for VP8 and VP9.
>
> Signed-off-by: Rene Claus 
> ---
>  doc/encoders.texi  | 4 
>  libavcodec/libvpxenc.c | 6 ++
>  2 files changed, 10 insertions(+)
>

lgtm. I'll submit this soon if there aren't any further comments.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avcodec/libvpxenc: add VP8/9 sharpness config option

2018-12-21 Thread James Zern
On Fri, Dec 21, 2018 at 11:24 AM James Almer  wrote:
>
> On 12/21/2018 1:09 PM, James Zern wrote:
> > On Thu, Dec 20, 2018 at 7:51 PM Rene Claus
> >  wrote:
> >>
> >> This commit adds configuration options to libvpxenc.c that can be used to
> >> tune the sharpness parameter for VP8 and VP9.
> >>
> >> Signed-off-by: Rene Claus 
> >> ---
> >>  doc/encoders.texi  | 4 
> >>  libavcodec/libvpxenc.c | 6 ++
> >>  2 files changed, 10 insertions(+)
> >>
> >
> > This looks all right aside from the text comments.
> >
> >> diff --git a/doc/encoders.texi b/doc/encoders.texi
> >> index 3d5b9fc2d2..7f9478fa9d 100644
> >> --- a/doc/encoders.texi
> >> +++ b/doc/encoders.texi
> >> @@ -1767,6 +1767,10 @@ Set number of frames to look ahead for frametype 
> >> and ratecontrol.
> >>  @item error-resilient
> >>  Enable error resiliency features.
> >>
> >> +@item sharpness @var{integer}
> >> +Codec control function to set higher sharpness at the expense of a lower 
> >> PSNR.
> >> +The valid range is [0, 7]. Default is 0.
> >> +
> >
> > Codec control is meaningful for users of libvpx, but not here. The
> > text from vpxenc should work:
> > "Increase sharpness at the expense of lower PSNR"
> > The range is OK to keep, the default up to the library. From the
> > wrapper's point of view the default is unset.
> >
> >> [...]
> >> +{ "sharpness", "Sharpness", offsetof(VPxContext, sharpness), 
> >> AV_OPT_TYPE_INT, {.i64 = -1}, -1, 7, VE},
> >>
> >
> > This could match as well:
> > "Increase sharpness at the expense of lower PSNR"
> >
> > No need to mention the range, that's handled automatically (try -h
> > encoder=libvpx).
>
> There's no need to mention it the AVOption description, but it's ok in
> the encoders.texi. Other options do it as well.
>

Yes that's what I meant, sorry if it wasn't clear.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [FFmpeg-cvslog] avformat: add vividas demuxer

2018-12-21 Thread Carl Eugen Hoyos
2018-12-20 19:33 GMT+01:00, Paul B Mahol :
> ffmpeg | branch: master | Paul B Mahol  | Mon Dec 10
> 12:15:50 2018 +0100| [d06aae732c16bd4c490c6dfa35cc2a35129c640f] | committer:
> Paul B Mahol
>
> avformat: add vividas demuxer

Crashes here on stream-copying a sample from
http://samples.ffmpeg.org/archive/container/unknown/

$ valgrind ffmpeg_g -i
unknown+unknown+unknown+unknown+5064_cliplive5-16_2_644.viv -c copy -f
null -
==23818==
ffmpeg version N-92766-g6a87729 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 6.4.0 (GCC)
  configuration: --enable-gpl --enable-libxml2 --enable-gnutls
--enable-gmp --enable-version3 --enable-libx264
  libavutil  56. 25.100 / 56. 25.100
  libavcodec 58. 42.104 / 58. 42.104
  libavformat58. 25.100 / 58. 25.100
  libavdevice58.  6.101 / 58.  6.101
  libavfilter 7. 46.101 /  7. 46.101
  libswscale  5.  4.100 /  5.  4.100
  libswresample   3.  4.100 /  3.  4.100
  libpostproc55.  4.100 / 55.  4.100
Input #0, vividas, from
'unknown+unknown+unknown+unknown+5064_cliplive5-16_2_644.viv':
  Duration: N/A, start: 0.00, bitrate: N/A
Stream #0:0: Video: vp6, yuv420p, 432x320, 25 tbr, 25 tbn, 25 tbc
Stream #0:1: Audio: vorbis, 44100 Hz, stereo, fltp
Output #0, null, to 'pipe:':
  Metadata:
encoder : Lavf58.25.100
Stream #0:0: Video: vp6, yuv420p, 432x320, q=2-31, 25 tbr, 25 tbn, 25 tbc
Stream #0:1: Audio: vorbis, 44100 Hz, stereo, fltp
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
==23818== Invalid read of size 8=N/A time=00:06:00.63 bitrate=N/A speed= 103x
==23818==at 0x6766CA: ffio_read_varlen (aviobuf.c:930)
==23818==by 0x79F932: viv_read_packet (vividas.c:621)
==23818==by 0x790A6D: ff_read_packet (utils.c:856)
==23818==by 0x793ED3: read_frame_internal (utils.c:1582)
==23818==by 0x795021: av_read_frame (utils.c:1779)
==23818==by 0x4A8C07: transcode (ffmpeg.c:4147)
==23818==by 0x486F82: main (ffmpeg.c:4891)
==23818==  Address 0x18 is not stack'd, malloc'd or (recently) free'd
==23818==
==23818==
==23818== Process terminating with default action of signal 11 (SIGSEGV)

Carl Eugen
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel