Re: [FFmpeg-devel] Tee improvement - discussion

2016-05-21 Thread Felt, Patrick


On 5/20/16, 9:32 PM, "ffmpeg-devel on behalf of Michael Niedermayer" 
 wrote:

>On Fri, May 20, 2016 at 12:06:34AM +0200, Marton Balint wrote:
>> 
>> On Thu, 19 May 2016, Nicolas George wrote:
>> 
>> >Le tridi 23 floréal, an CCXXIV, Jan Sebechlebsky a écrit :
>> >>My current idea is to create queue for each output (as Marton suggested) 
>> >>and
>> >>process each output in separate thread. I was also considering using just
>> >>single queue, but since the AVPackets are referenced counted, the memory
>> >>overhead is negligible and using multiple queues will simplify the code.
>> >>Apart from getting advantage of non-blocking processing with multiple slave
>> >>muxers, error handling will also be improved.
>> >
>> >>Another question is what to do when some of the queues becomes full,
>> >>discussed options were so far:
>> >>- Block write_packet call until the queue frees - this might be useful
>> >>when producer is faster than consumer, and we don't want to drop any 
>> >>packets
>> >>when recording to file.
>> >>- Drop some yet unprocessed packets (until next keyframe, or free some
>> >>portion of queue) to free the queue - this might be useful for network
>> >>outputs.
>> >
>> >I must say, I am not very happy with the direction this project takes.
>> >
>> >Non-blocking muxers (and demuxers, and protocols) is a white whale for our
>> >API: we really really want it, but it huge and very hard to catch.
>> >
>> >It is something that needs to be implemented globally with a very careful
>> >design. Definitely not something that can be added in a corner of an obscure
>> >muxer. We already went down that path twice, with the thread for the UDP
>> >protocol and with running demuxer in threads in FFmpeg. Both did lead to
>> >endless complications: bugs, inconsistencies, portability trouble.
>> 
>> What caused these complications? Do you have some references?
>
>i dont know, what i remember as udp problems are things that shouldnt
>affect tee like:
>
>some UDP "users" like RT*P
>bypass the public API and pull the UDP fd out of the demuxer and
>then try to use it polling and stuff (ffurl_get_file_handle)
>this doesnt work so well, as teh fd is on the input side of the que
>and what came out of the udp code is on  the output side and in
>different threads
>
>another issue with udp i remember is timing
>packets should have "transmit times" from the muxer in them so
>they get sent at the correct time, thats not done even though muxers
>like mpeg-ps calculate these times correctly

there was discussion on this just today in the #ffmpeg channel.  Mpeg-ts over 
udp users using hardware decoders could use this functionality.

>
>
>[...]
>
>-- 
>Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
>Everything should be made as simple as possible, but not simpler.
>-- Albert Einstein

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


Re: [FFmpeg-devel] [PATCH] lavc/libopenh264enc: update to openh264 1.6

2016-05-21 Thread Hendrik Leppkes
On Mon, Mar 7, 2016 at 6:05 PM, Stefano Sabatini  wrote:
> In particular, the slice mode API was changed in commit:
>
> commit 33c378f7b791310e4cb64b53e2bb8f3f3bded105
> Author: sijchen 
> Date:   Tue Nov 10 09:50:06 2015 -0800
>
> change API for slicing part for easier usage (the UseLoadBalancing flag 
> is still under working)
>
> This fixes compilation with latest version of openh264.
> ---

From the author of this wrapper:

[20:23:22]  just fwiw, the openh264 patch that somebody just
sent, for fixing compilation with 1.6 (which is not released) is just
awful. it changes defaults for lots of options, it changes names for
options, etc, all in one single patch (which breaks compilation with
any earlier version)
[20:23:47]  if one wants to add support for 1.6, it shouldn't
break support for earlier versions. and 1.6 isn't released, so the
actual api for that version may still change
[20:24:06]  so I would just tell people to stick it and not try
to "support" an unreleased version which is still open for changes

I agree with this assessment, dropping support for any and all
released versions of the library in favor of a unreleased
in-development version seems bad.
Can't we support both, and address his comments about changing the options etc?

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


Re: [FFmpeg-devel] [PATCH] Updated (v3) -- Add input mode autodetect to the decklink module.

2016-05-21 Thread Marton Balint



On Thu, 12 May 2016, Felt, Patrick wrote:


I hang my head in shame.  I neglected to notice that time wasn’t already 
included and so I had to modify the patch.  Apologies for the noise.

-- Add input mode autodetect to the decklink module. Previously users had to 
supply the input format like this 'DeckLink Device@modenum'.  This patch allows 
users to either leave it off completely, or supply 0 or negative number to 
indicate autodetect is requested. Autodetect only works the first time so if 
the mode changes mid stream you'll die

---
libavdevice/decklink_common.cpp | 110 
libavdevice/decklink_common.h   |   5 ++
libavdevice/decklink_common_c.h |   1 +
libavdevice/decklink_dec.cpp|  86 +--
libavdevice/decklink_dec_c.c|   1 +
5 files changed, 188 insertions(+), 15 deletions(-)

diff --git a/libavdevice/decklink_common.cpp b/libavdevice/decklink_common.cpp
index ac7964c..1d51294 100644
--- a/libavdevice/decklink_common.cpp
+++ b/libavdevice/decklink_common.cpp
@@ -98,6 +98,90 @@ HRESULT ff_decklink_get_display_name(IDeckLink *This, const 
char **displayName)
return hr;
}

+long ff_decklink_mode_to_bm(AVFormatContext *avctx,


Should be BMDDisplayMode, not long.


+   decklink_direction_t direction,
+   int ffmpeg_mode,
+   IDeckLinkDisplayMode **mode)


As far a I see you do not use **mode with a non-NULL arugment in your 
code, so you can get rid of it and its functionality.



+{
+struct decklink_cctx *cctx = (struct decklink_cctx *) avctx->priv_data;


unnecessary space before avctx


+struct decklink_ctx *ctx = (struct decklink_ctx *)cctx->ctx;
+IDeckLinkDisplayModeIterator *itermode;
+IDeckLinkDisplayMode *internal_mode;
+
+int result=0;


add breathing spaces before and after =.
Should be BMDDislpayMode, not int.


+HRESULT res;
+
+if (direction == DIRECTION_IN) {
+res = ctx->dli->GetDisplayModeIterator (&itermode);


whitespace issue here as well.


+} else {
+res = ctx->dlo->GetDisplayModeIterator (&itermode);


and here


+}
+
+if (res != S_OK) {
+av_log(avctx, AV_LOG_ERROR, "Could not get the mode iterator\n");
+return -1;


bmdModeUnkown


+}
+
+while (itermode->Next(&internal_mode) == S_OK) {
+if (++result == ffmpeg_mode) {


You are misuising the result variable here for something that has 
nothing to do with the result of this function.



+break;
+}
+
+internal_mode->Release();
+}
+
+itermode->Release();
+if (internal_mode) {


What if there is no match for ffmpeg_mode? Is it documented in the 
Decklink SDK that internal_mode will be overwritten to NULL on the last 
iteration?



+result = internal_mode->GetDisplayMode();
+if (mode) {
+*mode = internal_mode;
+} else {
+internal_mode->Release();
+}
+
+return result;
+}
+
+return 0;


bmdModeUnknown


+}
+
+int ff_decklink_mode_to_ffmpeg(AVFormatContext *avctx,
+   decklink_direction_t direction,
+   IDeckLinkDisplayMode **mode)


should use *mode, not **mode, because *mode is not overwritten in this 
function



+{
+struct decklink_cctx *cctx = (struct decklink_cctx *) avctx->priv_data;


extra space


+struct decklink_ctx *ctx = (struct decklink_ctx *)cctx->ctx;
+IDeckLinkDisplayModeIterator *itermode;
+IDeckLinkDisplayMode *internal_mode;
+long bdm_mode_number = (*mode)->GetDisplayMode();


BMDDisplayMode, not long.


+int result=1, found=0;


missing breathing spaces


+HRESULT res;
+
+if (direction == DIRECTION_IN) {
+res = ctx->dli->GetDisplayModeIterator (&itermode);


extra space


+} else {
+res = ctx->dlo->GetDisplayModeIterator (&itermode);


same here


+}
+
+if (res != S_OK) {
+av_log(avctx, AV_LOG_ERROR, "Could not get the mode iterator\n");
+return -1;


AVERROR_EXTERNAL


+}
+
+while (itermode->Next(&internal_mode) == S_OK) {
+if (internal_mode->GetDisplayMode() == bdm_mode_number) {
+internal_mode->Release();
+found = 1;
+break;
+}
+internal_mode->Release();
+result++;
+}
+
+itermode->Release();
+return (found) ? result : -1;


unnecesary paranthesis


+}
+
int ff_decklink_set_format(AVFormatContext *avctx,
   int width, int height,
   int tb_num, int tb_den,
@@ -197,6 +281,29 @@ int ff_decklink_list_devices(AVFormatContext *avctx)
return 0;
}

+int ff_decklink_device_autodetect(AVFormatContext *avctx)


Probably worth remaining to somehting like 
ff_decklink_can_detect_input_format otherwise somebody may be 
under the impression that this function will do the autodetection.



+{
+HRES

Re: [FFmpeg-devel] [PATCH 04/11] avcodec/mips: loongson optimize h264chroma with mmi v2

2016-05-21 Thread Michael Niedermayer
On Tue, May 17, 2016 at 01:02:41PM +0800, 周晓勇 wrote:
> avcodec/mips/h264chroma_mmi: Version 2 of the optimizations for loongson 
> mmi
> 
> 1. no longer use the register names directly and optimized code format
> 2. to be compatible with O32, specify type of address variable with 
> mips_reg and handle the address variable with PTR_ operator
> 3. use uld and mtc1 to workaround cpu 3A2000 gslwlc1 bug (gslwlc1 
> instruction extension bug in O32 ABI)
> 
> 
> 
> 
> 
> 
> 
> 
> 在 2016-05-13 18:04:02,"周晓勇"  写道:
> 
> From 157e001724cdb1461ecfff2f02d0a7b0d6335943 Mon Sep 17 00:00:00 2001
> From: ZhouXiaoyong 
> Date: Sat, 7 May 2016 14:20:49 +0800
> Subject: [PATCH 04/11] avcodec/mips: loongson optimize h264chroma with mmi v2

patch applied

thanks

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Many that live deserve death. And some that die deserve life. Can you give
it to them? Then do not be too eager to deal out death in judgement. For
even the very wise cannot see all ends. -- Gandalf


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


Re: [FFmpeg-devel] [Vote] Code of Conduct

2016-05-21 Thread James Darnley
On 2016-05-18 20:40, Michael Niedermayer wrote:
> This is the version i had in my pending branch and should be the last 
> version of the Code of Conduct from march, IIRC there where no further 
> comments on the last version, so iam calling everyone to vote on this.
> Everyone because it should be binding to everyone.
> 
> Kieran and Thilo asked for a formal vote and i agree that this needs
> a vote.
> 
> I wanted to send this earlier, but was always busy with other things
> 
> Please state clearly if you agree to the text or if not.
> we can extend and tune it later and do another vote if there are more
>  suggestions

Who knows whether I get to vote.  Anyway...  I disagree on principle.




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


Re: [FFmpeg-devel] [PATCH] add MTAF demuxer and decoder

2016-05-21 Thread Paul B Mahol
On 5/16/16, Paul B Mahol  wrote:
> On 5/16/16, James Almer  wrote:
>> On 5/15/2016 6:33 PM, Paul B Mahol wrote:
>>> diff --git a/libavcodec/Makefile b/libavcodec/Makefile
>>> index 3f0ffd1..3a9dd95 100644
>>> --- a/libavcodec/Makefile
>>> +++ b/libavcodec/Makefile
>>> @@ -707,6 +707,7 @@ OBJS-$(CONFIG_ADPCM_IMA_WAV_ENCODER)  +=
>>> adpcmenc.o adpcm_data.o
>>>  OBJS-$(CONFIG_ADPCM_IMA_WS_DECODER)   += adpcm.o adpcm_data.o
>>>  OBJS-$(CONFIG_ADPCM_MS_DECODER)   += adpcm.o adpcm_data.o
>>>  OBJS-$(CONFIG_ADPCM_MS_ENCODER)   += adpcmenc.o adpcm_data.o
>>> +OBJS-$(CONFIG_ADPCM_MTAF_DECODER) += adpcm.o adpcm_data.o
>>>  OBJS-$(CONFIG_ADPCM_PSX_DECODER)  += adpcm.o adpcm_data.o
>>>  OBJS-$(CONFIG_ADPCM_SBPRO_2_DECODER)  += adpcm.o adpcm_data.o
>>>  OBJS-$(CONFIG_ADPCM_SBPRO_3_DECODER)  += adpcm.o adpcm_data.o
>>> diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c
>>> index 0b6b92e..e624b85 100644
>>> --- a/libavcodec/adpcm.c
>>> +++ b/libavcodec/adpcm.c
>>> @@ -107,6 +107,10 @@ static av_cold int adpcm_decode_init(AVCodecContext
>>> *
>>> avctx)
>>>  case AV_CODEC_ID_ADPCM_EA_XAS:
>>>  max_channels = 6;
>>>  break;
>>> +case AV_CODEC_ID_ADPCM_MTAF:
>>> +min_channels = 2;
>>> +max_channels = 8;
>>> +break;
>>>  case AV_CODEC_ID_ADPCM_PSX:
>>>  max_channels = 8;
>>>  break;
>>> @@ -159,6 +163,7 @@ static av_cold int adpcm_decode_init(AVCodecContext
>>> *
>>> avctx)
>>>  case AV_CODEC_ID_ADPCM_AFC:
>>>  case AV_CODEC_ID_ADPCM_DTK:
>>>  case AV_CODEC_ID_ADPCM_PSX:
>>> +case AV_CODEC_ID_ADPCM_MTAF:
>>>  avctx->sample_fmt = AV_SAMPLE_FMT_S16P;
>>>  break;
>>>  case AV_CODEC_ID_ADPCM_IMA_WS:
>>> @@ -342,6 +347,15 @@ static inline int16_t
>>> adpcm_yamaha_expand_nibble(ADPCMChannelStatus *c, uint8_t
>>>  return c->predictor;
>>>  }
>>>
>>> +static inline int16_t adpcm_mtaf_expand_nibble(ADPCMChannelStatus *c,
>>> uint8_t nibble)
>>> +{
>>
>> You should use local variables here, like in other expand_nibbble()
>> functions.
>
> I don't see point of that.
>
>>
>>> +c->predictor += ff_adpcm_mtaf_stepsize[c->step][nibble];
>>> +c->predictor = av_clip_int16(c->predictor);
>>> +c->step += ff_adpcm_index_table[nibble];
>>> +c->step = av_clip(c->step, 0, 31);
>>
>> av_clip_uintp2(step, 5);
>
> Done.
>

Will apply soon if nobody objects.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avfilter/avf_ahistogram: raise minimum acmax to 1

2016-05-21 Thread Paul B Mahol
On 5/21/16, Michael Niedermayer  wrote:
> On Fri, May 20, 2016 at 08:04:28PM +0200, Paul B Mahol wrote:
>> On 5/20/16, Michael Niedermayer  wrote:
>> > If acmax can be 0 then it could result in a division by 0
>> > Fixes CID1351345
>>
>> But there is cast to double.
>
> yes but the result (aa) is assigned to int (h) which is undefined
> behavior (if it can happen)
>
> [...]
> --
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> The real ebay dictionary, page 1
> "Used only once"- "Some unspecified defect prevented a second use"
> "In good condition" - "Can be repaird by experienced expert"
> "As is" - "You wouldnt want it even if you were payed for it, if you knew
> ..."
>

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


Re: [FFmpeg-devel] [PATCH] avformat/avlanguage: deprecate av_convert_lang_to and make it internal

2016-05-21 Thread Paul B Mahol
On 5/21/16, James Almer  wrote:
> On 5/13/2016 6:10 PM, James Almer wrote:
>> The header was never installed and the function is only used in
>> libavformat
>>
>> Signed-off-by: James Almer 
>> ---
>>  libavformat/asfdec_f.c|  2 +-
>>  libavformat/asfdec_o.c|  2 +-
>>  libavformat/asfenc.c  |  2 +-
>>  libavformat/avienc.c  |  2 +-
>>  libavformat/avlanguage.c  | 11 +--
>>  libavformat/avlanguage.h  |  7 +++
>>  libavformat/matroskaenc.c |  2 +-
>>  7 files changed, 21 insertions(+), 7 deletions(-)
>
> Ping.
>
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>

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


Re: [FFmpeg-devel] [Vote] Code of Conduct

2016-05-21 Thread Michael Niedermayer
On Wed, May 18, 2016 at 08:40:07PM +0200, Michael Niedermayer wrote:
> This is the version i had in my pending branch and should be the last 
> version of the Code of Conduct from march, IIRC there where no further 
> comments on the last version, so iam calling everyone to vote on this.
> Everyone because it should be binding to everyone.
> 
> Kieran and Thilo asked for a formal vote and i agree that this needs
> a vote.
> 
> I wanted to send this earlier, but was always busy with other things
> 
> Please state clearly if you agree to the text or if not.
> we can extend and tune it later and do another vote if there are more
>  suggestions

3 days passed, 7 people casted a vote, 4 days left

Everyone please vote (unless you truely dont care either way)

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

When you are offended at any man's fault, turn to yourself and study your
own failings. Then you will forget your anger. -- Epictetus


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


[FFmpeg-devel] [PATCH] fix few compiler warnings

2016-05-21 Thread Davinder Singh
hi,

this patch fixes following compiler warnings:

libavcodec/cfhd.c:346:78: warning: format specifies type 'unsigned short'
but the argument has type 'int' [-Wformat]
av_log(avctx, AV_LOG_DEBUG, "Small chunk length %"PRIu16"
%s\n", data * 4, tag < 0 ? "optional" : "required");
~~
  ^~~~
libavcodec/cfhd.c:472:110: warning: format specifies type 'unsigned short'
but the argument has type 'int' [-Wformat]
av_log(avctx, AV_LOG_DEBUG, "Start of lowpass coeffs component
%"PRIu16" height:%d, width:%d\n", s->channel_num, lowpass_height,
lowpass_width);

 ~~^~
libavcodec/cfhd.c:490:77: warning: format specifies type 'unsigned short'
but the argument has type 'int' [-Wformat]
av_log(avctx, AV_LOG_DEBUG, "Lowpass coefficients %"PRIu16"\n",
lowpass_width * lowpass_height);
  ~~
 ^~



libavcodec/dv_tablegen.c:30:60: warning: format specifies type 'char' but
the argument has type 'uint32_t' (aka 'unsigned int') [-Wformat]
   "{0x%"PRIx32", %"PRId8"}", data[i].vlc, data[i].size)
~~~^~~~
libavcodec/tableprint.h:37:29: note: expanded from macro
'WRITE_1D_FUNC_ARGV'
   printf(" "fmtstr",", __VA_ARGS__);\
^~~
libavcodec/dv_tablegen.c:30:60: warning: format specifies type 'char' but
the argument has type 'uint32_t' (aka 'unsigned int') [-Wformat]
   "{0x%"PRIx32", %"PRId8"}", data[i].vlc, data[i].size)
~~~^~~~



libavfilter/af_hdcd.c:896:57: warning: shifting a negative signed value is
undefined [-Wshift-negative-value]
state->readahead = readaheadtab[bits & ~(-1 << 8)];



libavfilter/vf_hwdownload.c:59:5: warning: ignoring return value of
function declared with warn_unused_result attribute [-Wunused-result]
ff_formats_ref(infmts,  &avctx->inputs[0]->out_formats);
^~ ~~~
libavfilter/vf_hwdownload.c:60:5: warning: ignoring return value of
function declared with warn_unused_result attribute [-Wunused-result]
ff_formats_ref(outfmts, &avctx->outputs[0]->in_formats);
^~ ~~~



libavutil/opencl.c:456:17: warning: variable 'kernel_source' is used
uninitialized whenever 'for' loop exits because its condition is false
[-Wsometimes-uninitialized]
for (i = 0; i < opencl_ctx.kernel_code_count; i++) {
^~~~
libavutil/opencl.c:466:10: note: uninitialized use occurs here
if (!kernel_source) {
 ^
libavutil/opencl.c:456:17: note: remove the condition if it is always true
for (i = 0; i < opencl_ctx.kernel_code_count; i++) {
^~~~
libavutil/opencl.c:448:30: note: initialize the variable 'kernel_source' to
silence this warning
const char *kernel_source;
 ^
  = NULL


0001-fixed-few-compiler-warnings.patch
Description: Binary data
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [Vote] Code of Conduct

2016-05-21 Thread Annapoornima Koppad
I am voting for the code of conduct.

On Sat, May 21, 2016 at 7:40 PM, Michael Niedermayer  wrote:

> On Wed, May 18, 2016 at 08:40:07PM +0200, Michael Niedermayer wrote:
> > This is the version i had in my pending branch and should be the last
> > version of the Code of Conduct from march, IIRC there where no further
> > comments on the last version, so iam calling everyone to vote on this.
> > Everyone because it should be binding to everyone.
> >
> > Kieran and Thilo asked for a formal vote and i agree that this needs
> > a vote.
> >
> > I wanted to send this earlier, but was always busy with other things
> >
> > Please state clearly if you agree to the text or if not.
> > we can extend and tune it later and do another vote if there are more
> >  suggestions
>
> 3 days passed, 7 people casted a vote, 4 days left
>
> Everyone please vote (unless you truely dont care either way)
>
> [...]
>
> --
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> When you are offended at any man's fault, turn to yourself and study your
> own failings. Then you will forget your anger. -- Epictetus
>
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
>


-- 
Thanks and regards,
Annapoornima Koppad
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] fix few compiler warnings

2016-05-21 Thread Davinder Singh
2 more:

libavcodec/pngenc.c:274:25: warning: assigning to 'Bytef *' (aka 'unsigned
char *') from 'const uint8_t *' (aka 'const unsigned char *') discards
qualifiers
  [-Wincompatible-pointer-types-discards-qualifiers]
s->zstream.next_in  = data;
^ 



libavcodec/tscc.c:81:26: warning: assigning to 'Bytef *' (aka 'unsigned
char *') from 'const uint8_t *' (aka 'const unsigned char *') discards
qualifiers
  [-Wincompatible-pointer-types-discards-qualifiers]
c->zstream.next_in   = buf;
 ^ ~~~


0001-fixed-assignment-discards-qualifier-warnings.patch
Description: Binary data
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] doc/developer.texi: Add a code of conduct

2016-05-21 Thread James Almer
On 5/18/2016 3:40 PM, Michael Niedermayer wrote:
> Signed-off-by: Michael Niedermayer 
> ---
>  doc/developer.texi |   29 +
>  1 file changed, 29 insertions(+)
> 
> diff --git a/doc/developer.texi b/doc/developer.texi
> index 6db93ce..4d3a7ae 100644
> --- a/doc/developer.texi
> +++ b/doc/developer.texi
> @@ -403,6 +403,35 @@ finding a new maintainer and also don't forget to update 
> the @file{MAINTAINERS}
>  
>  We think our rules are not too hard. If you have comments, contact us.
>  
> +@section Code of conduct
> +
> +Be friendly and respectful towards others and third parties.
> +Treat others the way you yourself want to be treated.
> +
> +Be considerate. Not everyone shares the same viewpoint and priorities as you 
> do.
> +Different opinions and interpretations help the project.
> +Looking at issues from a different perspective assists development.
> +
> +Do not assume malice for things that can be attributed to incompetence. Even 
> if
> +it is malice, it's rarely good to start with that as initial assumption.
> +
> +Stay friendly even if someone acts contrarily. Everyone has a bad day
> +once in a while.
> +If you yourself have a bad day or are angry then try to take a break and 
> reply
> +once you are calm and without anger if you have to.
> +
> +Try to help other team members and cooperate if you can.
> +
> +The goal of software development is to create technical excellence, not for 
> any
> +individual to be better and "win" against the others. Large software projects
> +are only possible and successful through teamwork.
> +
> +If someone struggles do not put them down. Give them a helping hand
> +instead and point them in the right direction.
> +
> +Finally, keep in mind the immortal words of Bill and Ted,
> +"Be excellent to each other."
> +
>  @anchor{Submitting patches}
>  @section Submitting patches

I agree with this. It can and should be improved/extended over time, but it's a 
good
start.

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


Re: [FFmpeg-devel] [PATCH 05/11] avcodec/mips: loongson optimize mpegvideo with mmi v2

2016-05-21 Thread Michael Niedermayer
On Tue, May 17, 2016 at 01:08:38PM +0800, 周晓勇 wrote:
> avcodec/mips/mpegvideo_mmi: Version 2 of the optimizations for loongson 
> mmi
> 
> 1. no longer use the register names directly and optimized code format
> 2. to be compatible with O32, specify type of address variable with 
> mips_reg and handle the address variable with PTR_ operator
> 
> 
> 
> 
> 
> 
> 
> 
> 在 2016-05-13 18:04:34,"周晓勇"  写道:
> 
> From cb8887caf25b300ef2f307f930593e9edf394977 Mon Sep 17 00:00:00 2001
> From: Zhou Xiaoyong 
> Date: Thu, 12 May 2016 01:48:03 +0800
> Subject: [PATCH 05/11] avcodec/mips: loongson optimize mpegvideo with mmi v2

applied

thanks

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Those who are too smart to engage in politics are punished by being
governed by those who are dumber. -- Plato 


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


Re: [FFmpeg-devel] [PATCH 06/11] avcodec/mips: loongson optimize hpeldsp with mmi v1

2016-05-21 Thread Michael Niedermayer
On Tue, May 17, 2016 at 02:51:50PM +0800, 周晓勇 wrote:
> avcodec/mips: loongson optimize hpeldsp with mmi v1
> 1.the codes are compatible with O32 ABI
> 2.use uld and mtc1 to workaround cpu 3A2000 gslwlc1 bug (gslwlc1 instruction 
> extension bug in O32 ABI)
> 
> 
> 
> 
> 
> 
> 在 2016-05-13 18:05:07,"周晓勇"  写道:
> 
> From 8212b9b5beecb6e2ba3f05a2a4c7f1704220c911 Mon Sep 17 00:00:00 2001
> From: Zhou Xiaoyong 
> Date: Thu, 12 May 2016 01:59:03 +0800
> Subject: [PATCH 06/11] avcodec/mips: loongson optimize hpeldsp with mmi v1
> 
> 
> ---
>  libavcodec/mips/Makefile|1 +
>  libavcodec/mips/hpeldsp_init_mips.c |   49 ++
>  libavcodec/mips/hpeldsp_mips.h  |   87 +++
>  libavcodec/mips/hpeldsp_mmi.c   | 1257 
> +++
>  4 files changed, 1394 insertions(+)

applied

thanks

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

There will always be a question for which you do not know the correct answer.


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


Re: [FFmpeg-devel] [PATCH 08/11] avcodec/mips: loongson optimize h264pred with mmi v3

2016-05-21 Thread Michael Niedermayer
On Tue, May 17, 2016 at 07:12:54PM +0800, 周晓勇 wrote:
> avcodec/mips: loongson optimize h264pred with mmi v3
> 
> 1. no longer use the register names directly and optimized code format
> 2. to be compatible with O32, specify type of address variable with 
> mips_reg and handle the address variable with PTR_ operator
> 3. ff_pred16x16_plane_ functions only support N64 ABI now
> 
> 
> 
> 
> 
> 
> 
> 
> 在 2016-05-13 18:06:23,"周晓勇"  写道:
> 
> From 0a8c479860dad3220eb00e057f200e21c0521899 Mon Sep 17 00:00:00 2001
> From: Zhou Xiaoyong 
> Date: Thu, 12 May 2016 01:45:34 +0800
> Subject: [PATCH 08/11] avcodec/mips: loongson optimize h264pred with mmi v3

applied

thanks

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Rewriting code that is poorly written but fully understood is good.
Rewriting code that one doesnt understand is a sign that one is less smart
then the original author, trying to rewrite it will not make it better.


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


[FFmpeg-devel] [PATCH] avcodec/mvcdec: simplify, do not use reget buffer

2016-05-21 Thread Paul B Mahol
Hi,

patch attached.
From ec43744693412bae4a45be7823348fee78c14e68 Mon Sep 17 00:00:00 2001
From: Paul B Mahol 
Date: Sat, 21 May 2016 18:06:14 +0200
Subject: [PATCH] avcodec/mvcdec: simplify, no need to use reget buffer

Signed-off-by: Paul B Mahol 
---
 libavcodec/mvcdec.c | 32 +---
 1 file changed, 9 insertions(+), 23 deletions(-)

diff --git a/libavcodec/mvcdec.c b/libavcodec/mvcdec.c
index 74f279a..e507674 100644
--- a/libavcodec/mvcdec.c
+++ b/libavcodec/mvcdec.c
@@ -31,7 +31,6 @@
 #include "internal.h"
 
 typedef struct MvcContext {
-AVFrame *frame;
 int vflip;
 } MvcContext;
 
@@ -53,10 +52,6 @@ static av_cold int mvc_decode_init(AVCodecContext *avctx)
 
 avctx->pix_fmt = (avctx->codec_id == AV_CODEC_ID_MVC1) ? AV_PIX_FMT_RGB555
: AV_PIX_FMT_RGB32;
-s->frame   = av_frame_alloc();
-if (!s->frame)
-return AVERROR(ENOMEM);
-
 s->vflip = avctx->extradata_size >= 9 &&
!memcmp(avctx->extradata + avctx->extradata_size - 9, "BottomUp", 9);
 return 0;
@@ -231,39 +226,32 @@ static int mvc_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
 AVPacket *avpkt)
 {
 MvcContext *s = avctx->priv_data;
+AVFrame *frame = data;
 GetByteContext gb;
 int ret;
 
-if ((ret = ff_reget_buffer(avctx, s->frame)) < 0)
+if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
 return ret;
 
 bytestream2_init(&gb, avpkt->data, avpkt->size);
 if (avctx->codec_id == AV_CODEC_ID_MVC1)
-ret = decode_mvc1(avctx, &gb, s->frame->data[0],
-  avctx->width, avctx->height, s->frame->linesize[0]);
+ret = decode_mvc1(avctx, &gb, frame->data[0],
+  avctx->width, avctx->height, frame->linesize[0]);
 else
-ret = decode_mvc2(avctx, &gb, s->frame->data[0],
-  avctx->width, avctx->height, s->frame->linesize[0],
+ret = decode_mvc2(avctx, &gb, frame->data[0],
+  avctx->width, avctx->height, frame->linesize[0],
   s->vflip);
 if (ret < 0)
 return ret;
 
+frame->pict_type = AV_PICTURE_TYPE_I;
+frame->key_frame = 1;
+
 *got_frame = 1;
-if ((ret = av_frame_ref(data, s->frame)) < 0)
-return ret;
 
 return avpkt->size;
 }
 
-static av_cold int mvc_decode_end(AVCodecContext *avctx)
-{
-MvcContext *s = avctx->priv_data;
-
-av_frame_free(&s->frame);
-
-return 0;
-}
-
 #if CONFIG_MVC1_DECODER
 AVCodec ff_mvc1_decoder = {
 .name   = "mvc1",
@@ -272,7 +260,6 @@ AVCodec ff_mvc1_decoder = {
 .id = AV_CODEC_ID_MVC1,
 .priv_data_size = sizeof(MvcContext),
 .init   = mvc_decode_init,
-.close  = mvc_decode_end,
 .decode = mvc_decode_frame,
 .capabilities   = AV_CODEC_CAP_DR1,
 };
@@ -286,7 +273,6 @@ AVCodec ff_mvc2_decoder = {
 .id = AV_CODEC_ID_MVC2,
 .priv_data_size = sizeof(MvcContext),
 .init   = mvc_decode_init,
-.close  = mvc_decode_end,
 .decode = mvc_decode_frame,
 .capabilities   = AV_CODEC_CAP_DR1,
 };
-- 
2.5.0

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


Re: [FFmpeg-devel] [PATCH] avfilter/avf_ahistogram: raise minimum acmax to 1

2016-05-21 Thread Michael Niedermayer
On Sat, May 21, 2016 at 03:55:27PM +0200, Paul B Mahol wrote:
> On 5/21/16, Michael Niedermayer  wrote:
> > On Fri, May 20, 2016 at 08:04:28PM +0200, Paul B Mahol wrote:
> >> On 5/20/16, Michael Niedermayer  wrote:
> >> > If acmax can be 0 then it could result in a division by 0
> >> > Fixes CID1351345
> >>
> >> But there is cast to double.
> >
> > yes but the result (aa) is assigned to int (h) which is undefined
> > behavior (if it can happen)
> >
> > [...]
> > --
> > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
> >
> > The real ebay dictionary, page 1
> > "Used only once"- "Some unspecified defect prevented a second use"
> > "In good condition" - "Can be repaird by experienced expert"
> > "As is" - "You wouldnt want it even if you were payed for it, if you knew
> > ..."
> >
> 
> ok then

applied

thanks


[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

He who knows, does not speak. He who speaks, does not know. -- Lao Tsu


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


[FFmpeg-devel] [PATCH WIPv2 2/2] avdev: add sdl2 device

2016-05-21 Thread Josh de Kock
Hi Marton,

Sorry for not updating it after we last spoke, I lost my source for the
patch so I was force to do it again. Anyways, here it is. I'm using
SDL_Events for sending the packets, using SDL_WaitEvent to throttle it,
and Conditions to make sure that the queue doesn't build up. Is there
anything I missed?

There's still an issue with the window freezing up though, and on quit
there are "uncommitted CATransaction[s]" (an OSX thing, but I'm sure
that it would still impact other systems if it is a problem on OSX).

I spoke to some of the people in the #sdl IRC channel on freenode, and
they said that, even with most of the SDL functions in the separate
thread, it shouldn't work.

Any and all help would be much appreciated,

Josh

---
 libavdevice/Makefile |   1 +
 libavdevice/alldevices.c |   1 +
 libavdevice/sdl2.c   | 458 +++
 3 files changed, 460 insertions(+)
 create mode 100644 libavdevice/sdl2.c

diff --git a/libavdevice/Makefile b/libavdevice/Makefile
index 585827b..1c4b4d3 100644
--- a/libavdevice/Makefile
+++ b/libavdevice/Makefile
@@ -41,6 +41,7 @@ OBJS-$(CONFIG_PULSE_OUTDEV)  += pulse_audio_enc.o 
\
 pulse_audio_common.o
 OBJS-$(CONFIG_QTKIT_INDEV)   += qtkit.o
 OBJS-$(CONFIG_SDL_OUTDEV)+= sdl.o
+OBJS-$(CONFIG_SDL2_OUTDEV)   += sdl2.o
 OBJS-$(CONFIG_SNDIO_INDEV)   += sndio_dec.o sndio.o
 OBJS-$(CONFIG_SNDIO_OUTDEV)  += sndio_enc.o sndio.o
 OBJS-$(CONFIG_V4L2_INDEV)+= v4l2.o v4l2-common.o timefilter.o
diff --git a/libavdevice/alldevices.c b/libavdevice/alldevices.c
index 26aecf2..c0a9d9a 100644
--- a/libavdevice/alldevices.c
+++ b/libavdevice/alldevices.c
@@ -64,6 +64,7 @@ void avdevice_register_all(void)
 REGISTER_INOUTDEV(PULSE,pulse);
 REGISTER_INDEV   (QTKIT,qtkit);
 REGISTER_OUTDEV  (SDL,  sdl);
+REGISTER_OUTDEV  (SDL2, sdl2);
 REGISTER_INOUTDEV(SNDIO,sndio);
 REGISTER_INOUTDEV(V4L2, v4l2);
 //REGISTER_INDEV   (V4L,  v4l
diff --git a/libavdevice/sdl2.c b/libavdevice/sdl2.c
new file mode 100644
index 000..8c3d49e
--- /dev/null
+++ b/libavdevice/sdl2.c
@@ -0,0 +1,458 @@
+/*
+ * Copyright (c) 2011 Stefano Sabatini
+ * Copyright (c) 2016 Josh de Kock
+ *
+ * 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
+ * libSDL output device
+ */
+
+#include 
+#include 
+
+#include "libavutil/avstring.h"
+#include "libavutil/imgutils.h"
+#include "libavutil/opt.h"
+#include "libavutil/parseutils.h"
+#include "libavutil/pixdesc.h"
+#include "libavutil/time.h"
+#include "avdevice.h"
+
+typedef struct {
+AVClass *class;
+SDL_Window *window;
+SDL_Renderer *renderer;
+char *window_title;
+int window_width, window_height; /**< size of the window */
+int window_fullscreen;
+int window_borderless;
+
+SDL_Texture *texture;
+int texture_fmt;
+SDL_Rect texture_rect;
+
+int sdl_was_already_inited;
+SDL_Thread *event_thread;
+SDL_mutex *mutex;
+SDL_cond *condition;
+int init_ret; /* return code used to signal initialization errors */
+int inited;
+int quit;
+int pkt_sent;
+} SDLContext;
+
+static const struct sdl_texture_pix_fmt_entry {
+enum AVPixelFormat pix_fmt; int texture_fmt;
+} sdl_texture_pix_fmt_map[] = {
+{ AV_PIX_FMT_RGB8, SDL_PIXELFORMAT_RGB332 },
+{ AV_PIX_FMT_RGB444, SDL_PIXELFORMAT_RGB444 },
+{ AV_PIX_FMT_RGB555, SDL_PIXELFORMAT_RGB555 },
+{ AV_PIX_FMT_BGR555, SDL_PIXELFORMAT_BGR555 },
+/* Not implemented in FFmpeg.
+{ AV_PIX_FMT_ARGB, SDL_PIXELFORMAT_ARGB },
+{ AV_PIX_FMT_RGBA, SDL_PIXELFORMAT_RGBA },
+{ AV_PIX_FMT_ABGR, SDL_PIXELFORMAT_ABGR },
+{ AV_PIX_FMT_BGRA, SDL_PIXELFORMAT_BGRA },
+{ AV_PIX_FMT_ARGB1555, SDL_PIXELFORMAT_ARGB1555 },
+{ AV_PIX_FMT_RGBA5551, SDL_PIXELFORMAT_RGBA5551 },
+{ AV_PIX_FMT_ABGR1555, SDL_PIXELFORMAT_ABGR1555 },
+{ AV_PIX_FMT_BGRA5551, SDL_PIXELFORMAT_BGRA5551 },
+ */
+{ AV_PIX_FMT_RGB565, SDL_PIXELFORMAT_RGB565 },
+{ AV_PIX_FMT_BGR565, SDL_PIXELFORMAT_BGR565 },
+{ AV_PIX_FMT_

[FFmpeg-devel] [PATCH] libavcodec/mmaldec.c: add needs for deinterlacing

2016-05-21 Thread Jens Ziller
for deinterlacing is needed frame->interlaced_frame and format
struct. This patch added this.

Signed-off-by: Jens Ziller 
---
 libavcodec/mmaldec.c | 16 
 1 file changed, 16 insertions(+)

diff --git a/libavcodec/mmaldec.c b/libavcodec/mmaldec.c
index 52232d5..89f19a0 100644
--- a/libavcodec/mmaldec.c
+++ b/libavcodec/mmaldec.c
@@ -88,6 +88,7 @@ typedef struct MMALDecodeContext {
 int eos_received;
 int eos_sent;
 int extradata_sent;
+int interlaced_frame;
 } MMALDecodeContext;
 
 // Assume decoder is guaranteed to produce output after at least this
many
@@ -274,6 +275,7 @@ static int ffmal_update_format(AVCodecContext
*avctx)
 int ret = 0;
 MMAL_COMPONENT_T *decoder = ctx->decoder;
 MMAL_ES_FORMAT_T *format_out = decoder->output[0]->format;
+MMAL_PARAMETER_VIDEO_INTERLACE_TYPE_T interlace_type;
 
 ffmmal_poolref_unref(ctx->pool_out);
 if (!(ctx->pool_out = av_mallocz(sizeof(*ctx->pool_out {
@@ -300,6 +302,15 @@ static int ffmal_update_format(AVCodecContext
*avctx)
 if ((status = mmal_port_format_commit(decoder->output[0])))
 goto fail;
 
+interlace_type.hdr.id = MMAL_PARAMETER_VIDEO_INTERLACE_TYPE;
+interlace_type.hdr.size =
sizeof(MMAL_PARAMETER_VIDEO_INTERLACE_TYPE_T);
+status = mmal_port_parameter_get(decoder->output[0],
&interlace_type.hdr);
+if (status != MMAL_SUCCESS) {
+av_log(avctx, AV_LOG_ERROR, "Cannot read MMAL interlace
information!\n");
+} else {
+ctx->interlaced_frame = !(interlace_type.eMode ==
MMAL_InterlaceProgressive);
+}
+
 if ((ret = ff_set_dimensions(avctx, format_out->es->video.crop.x +
format_out->es->video.crop.width,
 format_out->es->video.crop.y +
format_out->es->video.crop.height)) < 0)
 goto fail;
@@ -607,7 +618,12 @@ static int ffmal_copy_frame(AVCodecContext
*avctx,  AVFrame *frame,
 MMALDecodeContext *ctx = avctx->priv_data;
 int ret = 0;
 
+frame->interlaced_frame = ctx->interlaced_frame;
+
 if (avctx->pix_fmt == AV_PIX_FMT_MMAL) {
+// in data[2] give the format struct for configure
deinterlacer and renderer
+frame->data[2] = ctx->decoder->output[0]->format;
+
 if (!ctx->pool_out)
 return AVERROR_UNKNOWN; // format change code failed with
OOM previously
 
-- 
2.7.3

Signed-off-by: Jens Ziller 
---
 libavcodec/mmaldec.c | 16 
 1 file changed, 16 insertions(+)

diff --git a/libavcodec/mmaldec.c b/libavcodec/mmaldec.c
index 52232d5..89f19a0 100644
--- a/libavcodec/mmaldec.c
+++ b/libavcodec/mmaldec.c
@@ -88,6 +88,7 @@ typedef struct MMALDecodeContext {
 int eos_received;
 int eos_sent;
 int extradata_sent;
+int interlaced_frame;
 } MMALDecodeContext;
 
 // Assume decoder is guaranteed to produce output after at least this many
@@ -274,6 +275,7 @@ static int ffmal_update_format(AVCodecContext *avctx)
 int ret = 0;
 MMAL_COMPONENT_T *decoder = ctx->decoder;
 MMAL_ES_FORMAT_T *format_out = decoder->output[0]->format;
+MMAL_PARAMETER_VIDEO_INTERLACE_TYPE_T interlace_type;
 
 ffmmal_poolref_unref(ctx->pool_out);
 if (!(ctx->pool_out = av_mallocz(sizeof(*ctx->pool_out {
@@ -300,6 +302,15 @@ static int ffmal_update_format(AVCodecContext *avctx)
 if ((status = mmal_port_format_commit(decoder->output[0])))
 goto fail;
 
+interlace_type.hdr.id = MMAL_PARAMETER_VIDEO_INTERLACE_TYPE;
+interlace_type.hdr.size = sizeof(MMAL_PARAMETER_VIDEO_INTERLACE_TYPE_T);
+status = mmal_port_parameter_get(decoder->output[0], &interlace_type.hdr);
+if (status != MMAL_SUCCESS) {
+av_log(avctx, AV_LOG_ERROR, "Cannot read MMAL interlace information!\n");
+} else {
+ctx->interlaced_frame = !(interlace_type.eMode == MMAL_InterlaceProgressive);
+}
+
 if ((ret = ff_set_dimensions(avctx, format_out->es->video.crop.x + format_out->es->video.crop.width,
 format_out->es->video.crop.y + format_out->es->video.crop.height)) < 0)
 goto fail;
@@ -607,7 +618,12 @@ static int ffmal_copy_frame(AVCodecContext *avctx,  AVFrame *frame,
 MMALDecodeContext *ctx = avctx->priv_data;
 int ret = 0;
 
+frame->interlaced_frame = ctx->interlaced_frame;
+
 if (avctx->pix_fmt == AV_PIX_FMT_MMAL) {
+// in data[2] give the format struct for configure deinterlacer and renderer
+frame->data[2] = ctx->decoder->output[0]->format;
+
 if (!ctx->pool_out)
 return AVERROR_UNKNOWN; // format change code failed with OOM previously
 
-- 
2.7.3

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


Re: [FFmpeg-devel] [PATCH] libavcodec/mmaldec.c: add needs for deinterlacing

2016-05-21 Thread Michael Niedermayer
On Sat, May 21, 2016 at 09:20:55PM +0200, Jens Ziller wrote:
> for deinterlacing is needed frame->interlaced_frame and format
> struct. This patch added this.
> 
> Signed-off-by: Jens Ziller 
> ---
>  libavcodec/mmaldec.c | 16 
>  1 file changed, 16 insertions(+)
> 
> diff --git a/libavcodec/mmaldec.c b/libavcodec/mmaldec.c
> index 52232d5..89f19a0 100644
> --- a/libavcodec/mmaldec.c
> +++ b/libavcodec/mmaldec.c
> @@ -88,6 +88,7 @@ typedef struct MMALDecodeContext {
>  int eos_received;
>  int eos_sent;
>  int extradata_sent;
> +int interlaced_frame;
>  } MMALDecodeContext;
>  
>  // Assume decoder is guaranteed to produce output after at least this
> many
> @@ -274,6 +275,7 @@ static int ffmal_update_format(AVCodecContext
> *avctx)

the inline patch is corrupted by newlines
the attached patch is missing the author
"Patch does not have a valid e-mail address."
and the whole mail cannot be applied as the inline patch is corrupted

[...]


-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The real ebay dictionary, page 2
"100% positive feedback" - "All either got their money back or didnt complain"
"Best seller ever, very honest" - "Seller refunded buyer after failed scam"


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


Re: [FFmpeg-devel] [PATCH] lavf/mpegtsenc: move putstr8 definition up

2016-05-21 Thread Benoit Fouet

Hi,

Le 19/05/2016 18:45, Stefano Sabatini a écrit :

This allows to use the function in a future commit.
---
  libavformat/mpegtsenc.c | 34 +-
  1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index 93cbac1..5f22032 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -253,6 +253,23 @@ static void mpegts_write_pat(AVFormatContext *s)
data, q - data);
  }
  
+/* NOTE: !str is accepted for an empty string */

+static void putstr8(uint8_t **q_ptr, const char *str)
+{
+uint8_t *q;
+int len;
+
+q = *q_ptr;
+if (!str)
+len = 0;
+else
+len = strlen(str);
+*q++ = len;
+memcpy(q, str, len);


Side note on this one, unrelated to your change.
Isn't this undefined behavior to call memcpy with one of the pointers 
being NULL?


--
Ben

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


Re: [FFmpeg-devel] [PATCH] fix few compiler warnings

2016-05-21 Thread Michael Niedermayer
On Sat, May 21, 2016 at 02:21:17PM +, Davinder Singh wrote:
> hi,
> 
> this patch fixes following compiler warnings:
> 
> libavcodec/cfhd.c:346:78: warning: format specifies type 'unsigned short'
> but the argument has type 'int' [-Wformat]
> av_log(avctx, AV_LOG_DEBUG, "Small chunk length %"PRIu16"
> %s\n", data * 4, tag < 0 ? "optional" : "required");
> ~~
>   ^~~~
> libavcodec/cfhd.c:472:110: warning: format specifies type 'unsigned short'
> but the argument has type 'int' [-Wformat]
> av_log(avctx, AV_LOG_DEBUG, "Start of lowpass coeffs component
> %"PRIu16" height:%d, width:%d\n", s->channel_num, lowpass_height,
> lowpass_width);
> 
>  ~~^~
> libavcodec/cfhd.c:490:77: warning: format specifies type 'unsigned short'
> but the argument has type 'int' [-Wformat]
> av_log(avctx, AV_LOG_DEBUG, "Lowpass coefficients %"PRIu16"\n",
> lowpass_width * lowpass_height);
>   ~~
>  ^~
> 
> 
> 
> libavcodec/dv_tablegen.c:30:60: warning: format specifies type 'char' but
> the argument has type 'uint32_t' (aka 'unsigned int') [-Wformat]
>"{0x%"PRIx32", %"PRId8"}", data[i].vlc, data[i].size)
> ~~~^~~~
> libavcodec/tableprint.h:37:29: note: expanded from macro
> 'WRITE_1D_FUNC_ARGV'
>printf(" "fmtstr",", __VA_ARGS__);\
> ^~~
> libavcodec/dv_tablegen.c:30:60: warning: format specifies type 'char' but
> the argument has type 'uint32_t' (aka 'unsigned int') [-Wformat]
>"{0x%"PRIx32", %"PRId8"}", data[i].vlc, data[i].size)
> ~~~^~~~
> 
> 
> 
> libavfilter/af_hdcd.c:896:57: warning: shifting a negative signed value is
> undefined [-Wshift-negative-value]
> state->readahead = readaheadtab[bits & ~(-1 << 8)];
> 
> 
> 
> libavfilter/vf_hwdownload.c:59:5: warning: ignoring return value of
> function declared with warn_unused_result attribute [-Wunused-result]
> ff_formats_ref(infmts,  &avctx->inputs[0]->out_formats);
> ^~ ~~~
> libavfilter/vf_hwdownload.c:60:5: warning: ignoring return value of
> function declared with warn_unused_result attribute [-Wunused-result]
> ff_formats_ref(outfmts, &avctx->outputs[0]->in_formats);
> ^~ ~~~
> 
> 
> 
> libavutil/opencl.c:456:17: warning: variable 'kernel_source' is used
> uninitialized whenever 'for' loop exits because its condition is false
> [-Wsometimes-uninitialized]
> for (i = 0; i < opencl_ctx.kernel_code_count; i++) {
> ^~~~
> libavutil/opencl.c:466:10: note: uninitialized use occurs here
> if (!kernel_source) {
>  ^
> libavutil/opencl.c:456:17: note: remove the condition if it is always true
> for (i = 0; i < opencl_ctx.kernel_code_count; i++) {
> ^~~~
> libavutil/opencl.c:448:30: note: initialize the variable 'kernel_source' to
> silence this warning
> const char *kernel_source;
>  ^
>   = NULL

>  libavcodec/cfhd.c   |6 +++---
>  libavcodec/dv_tablegen.c|2 +-
>  libavfilter/af_hdcd.c   |2 +-
>  libavfilter/vf_hwdownload.c |6 --
>  libavutil/opencl.c  |2 +-

please split this patch
the fixed warnings are unrelated to each other and possibly differnt
developers would like to reply to different parts

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I have often repented speaking, but never of holding my tongue.
-- Xenocrates


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


[FFmpeg-devel] [PATCH] avcodec/vble: add frame threading support

2016-05-21 Thread Paul B Mahol
Hi,

patch attached.
From 577006712cd3124a71554c3f6456deff2787eef2 Mon Sep 17 00:00:00 2001
From: Paul B Mahol 
Date: Sat, 21 May 2016 23:21:17 +0200
Subject: [PATCH] avcodec/vble: add frame threading support

Signed-off-by: Paul B Mahol 
---
 libavcodec/vble.c | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/libavcodec/vble.c b/libavcodec/vble.c
index bb9c81c..0340cad 100644
--- a/libavcodec/vble.c
+++ b/libavcodec/vble.c
@@ -33,6 +33,7 @@
 #include "huffyuvdsp.h"
 #include "internal.h"
 #include "mathops.h"
+#include "thread.h"
 
 typedef struct VBLEContext {
 AVCodecContext *avctx;
@@ -125,6 +126,7 @@ static int vble_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
 int offset = 0;
 int width_uv = avctx->width / 2, height_uv = avctx->height / 2;
 int ret;
+ThreadFrame frame = { .f = data };
 
 if (avpkt->size < 4 || avpkt->size - 4 > INT_MAX/8) {
 av_log(avctx, AV_LOG_ERROR, "Invalid packet size\n");
@@ -132,7 +134,7 @@ static int vble_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
 }
 
 /* Allocate buffer */
-if ((ret = ff_get_buffer(avctx, pic, 0)) < 0)
+if ((ret = ff_thread_get_buffer(avctx, &frame, 0)) < 0)
 return ret;
 
 /* Set flags */
@@ -212,5 +214,6 @@ AVCodec ff_vble_decoder = {
 .init   = vble_decode_init,
 .close  = vble_decode_close,
 .decode = vble_decode_frame,
-.capabilities   = AV_CODEC_CAP_DR1,
+.capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
+.init_thread_copy = ONLY_IF_THREADS_ENABLED(vble_decode_init),
 };
-- 
2.5.0

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


Re: [FFmpeg-devel] [PATCH WIPv2 2/2] avdev: add sdl2 device

2016-05-21 Thread Michael Niedermayer
On Sat, May 21, 2016 at 07:35:04PM +0100, Josh de Kock wrote:
> Hi Marton,
> 
> Sorry for not updating it after we last spoke, I lost my source for the
> patch so I was force to do it again. Anyways, here it is. I'm using
> SDL_Events for sending the packets, using SDL_WaitEvent to throttle it,
> and Conditions to make sure that the queue doesn't build up. Is there
> anything I missed?
> 
> There's still an issue with the window freezing up though, and on quit
> there are "uncommitted CATransaction[s]" (an OSX thing, but I'm sure
> that it would still impact other systems if it is a problem on OSX).
> 
> I spoke to some of the people in the #sdl IRC channel on freenode, and
> they said that, even with most of the SDL functions in the separate
> thread, it shouldn't work.
> 
> Any and all help would be much appreciated,
> 
> Josh
> 
> ---
>  libavdevice/Makefile |   1 +
>  libavdevice/alldevices.c |   1 +
>  libavdevice/sdl2.c   | 458 
> +++
>  3 files changed, 460 insertions(+)
>  create mode 100644 libavdevice/sdl2.c

breaks build
make distclean ; ./configure && make -j12

libavdevice/sdl2.c:40:5: error: unknown type name ‘SDL_Window’
libavdevice/sdl2.c:41:5: error: unknown type name ‘SDL_Renderer’
libavdevice/sdl2.c:47:5: error: unknown type name ‘SDL_Texture’
libavdevice/sdl2.c:64:24: error: ‘SDL_PIXELFORMAT_RGB332’ undeclared here (not 
in a function)
libavdevice/sdl2.c:65:26: error: ‘SDL_PIXELFORMAT_RGB444’ undeclared here (not 
in a function)
libavdevice/sdl2.c:66:26: error: ‘SDL_PIXELFORMAT_RGB555’ undeclared here (not 
in a function)
libavdevice/sdl2.c:67:26: error: ‘SDL_PIXELFORMAT_BGR555’ undeclared here (not 
in a function)
libavdevice/sdl2.c:78:26: error: ‘SDL_PIXELFORMAT_RGB565’ undeclared here (not 
in a function)
libavdevice/sdl2.c:79:26: error: ‘SDL_PIXELFORMAT_BGR565’ undeclared here (not 
in a function)
libavdevice/sdl2.c:80:25: error: ‘SDL_PIXELFORMAT_RGB24’ undeclared here (not 
in a function)
libavdevice/sdl2.c:81:25: error: ‘SDL_PIXELFORMAT_BGR24’ undeclared here (not 
in a function)
libavdevice/sdl2.c:82:25: error: ‘SDL_PIXELFORMAT_RGB888’ undeclared here (not 
in a function)
libavdevice/sdl2.c:83:24: error: ‘SDL_PIXELFORMAT_RGBX’ undeclared here 
(not in a function)
libavdevice/sdl2.c:84:25: error: ‘SDL_PIXELFORMAT_BGR888’ undeclared here (not 
in a function)
libavdevice/sdl2.c:85:24: error: ‘SDL_PIXELFORMAT_BGRX’ undeclared here 
(not in a function)
libavdevice/sdl2.c:86:24: error: ‘SDL_PIXELFORMAT_ARGB’ undeclared here 
(not in a function)
libavdevice/sdl2.c:87:24: error: ‘SDL_PIXELFORMAT_RGBA’ undeclared here 
(not in a function)
libavdevice/sdl2.c:88:24: error: ‘SDL_PIXELFORMAT_ABGR’ undeclared here 
(not in a function)
libavdevice/sdl2.c:89:24: error: ‘SDL_PIXELFORMAT_BGRA’ undeclared here 
(not in a function)
libavdevice/sdl2.c:93:27: error: ‘SDL_PIXELFORMAT_IYUV’ undeclared here (not in 
a function)
libavdevice/sdl2.c:94:27: error: ‘SDL_PIXELFORMAT_YUY2’ undeclared here (not in 
a function)
libavdevice/sdl2.c:95:27: error: ‘SDL_PIXELFORMAT_UYVY’ undeclared here (not in 
a function)
libavdevice/sdl2.c: In function ‘event_thread’:
libavdevice/sdl2.c:167:17: error: ‘SDL_WINDOW_RESIZABLE’ undeclared (first use 
in this function)
libavdevice/sdl2.c:167:17: note: each undeclared identifier is reported only 
once for each function it appears in
libavdevice/sdl2.c:167:17: error: invalid operands to binary | (have ‘int’ and 
‘const struct sdl_texture_pix_fmt_entry *’)
libavdevice/sdl2.c:167:60: error: ‘SDL_WINDOW_FULLSCREEN’ undeclared (first use 
in this function)
libavdevice/sdl2.c:167:32: error: invalid operands to binary | (have ‘const 
struct sdl_texture_pix_fmt_entry *’ and ‘const struct sdl_texture_pix_fmt_entry 
*’)
libavdevice/sdl2.c:168:60: error: ‘SDL_WINDOW_BORDERLESS’ undeclared (first use 
in this function)
libavdevice/sdl2.c:167:87: error: invalid operands to binary | (have ‘const 
struct sdl_texture_pix_fmt_entry *’ and ‘const struct sdl_texture_pix_fmt_entry 
*’)
libavdevice/sdl2.c:167:17: warning: initialization makes integer from pointer 
without a cast [enabled by default]
libavdevice/sdl2.c:181:5: error: implicit declaration of function 
‘SDL_CreateWindowAndRenderer’ [-Werror=implicit-function-declaration]
libavdevice/sdl2.c:188:5: error: implicit declaration of function 
‘SDL_SetWindowTitle’ [-Werror=implicit-function-declaration]
libavdevice/sdl2.c:190:5: error: implicit declaration of function 
‘SDL_CreateTexture’ [-Werror=implicit-function-declaration]
libavdevice/sdl2.c:190:71: error: ‘SDL_TEXTUREACCESS_STREAMING’ undeclared 
(first use in this function)
libavdevice/sdl2.c:190:18: warning: assignment makes pointer from integer 
without a cast [enabled by default]
libavdevice/sdl2.c:235:18: error: ‘SDL_WINDOWEVENT’ undeclared (first use in 
this function)
libavdevice/sdl2.c:236:29: error: ‘SDL_Event’ has no member named ‘window’
libavdevice/sdl2.c:236:36: error: request for member ‘eve

Re: [FFmpeg-devel] [PATCH] doc/developer.texi: Add a code of conduct

2016-05-21 Thread Ronald S. Bultje
Hi,

On Sat, May 21, 2016 at 11:32 AM, James Almer  wrote:

> On 5/18/2016 3:40 PM, Michael Niedermayer wrote:
> > Signed-off-by: Michael Niedermayer 
> > ---
> >  doc/developer.texi |   29 +
> >  1 file changed, 29 insertions(+)
> >
> > diff --git a/doc/developer.texi b/doc/developer.texi
> > index 6db93ce..4d3a7ae 100644
> > --- a/doc/developer.texi
> > +++ b/doc/developer.texi
> > @@ -403,6 +403,35 @@ finding a new maintainer and also don't forget to
> update the @file{MAINTAINERS}
> >
> >  We think our rules are not too hard. If you have comments, contact us.
> >
> > +@section Code of conduct
> > +
> > +Be friendly and respectful towards others and third parties.
> > +Treat others the way you yourself want to be treated.
> > +
> > +Be considerate. Not everyone shares the same viewpoint and priorities
> as you do.
> > +Different opinions and interpretations help the project.
> > +Looking at issues from a different perspective assists development.
> > +
> > +Do not assume malice for things that can be attributed to incompetence.
> Even if
> > +it is malice, it's rarely good to start with that as initial assumption.
> > +
> > +Stay friendly even if someone acts contrarily. Everyone has a bad day
> > +once in a while.
> > +If you yourself have a bad day or are angry then try to take a break
> and reply
> > +once you are calm and without anger if you have to.
> > +
> > +Try to help other team members and cooperate if you can.
> > +
> > +The goal of software development is to create technical excellence, not
> for any
> > +individual to be better and "win" against the others. Large software
> projects
> > +are only possible and successful through teamwork.
> > +
> > +If someone struggles do not put them down. Give them a helping hand
> > +instead and point them in the right direction.
> > +
> > +Finally, keep in mind the immortal words of Bill and Ted,
> > +"Be excellent to each other."
> > +
> >  @anchor{Submitting patches}
> >  @section Submitting patches
>
> I agree with this. It can and should be improved/extended over time, but
> it's a good
> start.


+1.

Constructive criticism for next version: I agree with most people that we
need a conflict resolution clause in here. We don't need to be as specific
as VLC in terms of how to punish misconduct, although I think it would be
good to have, but at the very least we need to document how it will be
managed and who's in charge of managing that. Right now, if people violate
the CoC, w'll throw our hands in the air and nobody knows what to do next...

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


Re: [FFmpeg-devel] [PATCH WIPv2 2/2] avdev: add sdl2 device

2016-05-21 Thread Michael Niedermayer
On Sat, May 21, 2016 at 11:39:01PM +0200, Michael Niedermayer wrote:
> On Sat, May 21, 2016 at 07:35:04PM +0100, Josh de Kock wrote:
> > Hi Marton,
> > 
> > Sorry for not updating it after we last spoke, I lost my source for the
> > patch so I was force to do it again. Anyways, here it is. I'm using
> > SDL_Events for sending the packets, using SDL_WaitEvent to throttle it,
> > and Conditions to make sure that the queue doesn't build up. Is there
> > anything I missed?
> > 
> > There's still an issue with the window freezing up though, and on quit
> > there are "uncommitted CATransaction[s]" (an OSX thing, but I'm sure
> > that it would still impact other systems if it is a problem on OSX).
> > 
> > I spoke to some of the people in the #sdl IRC channel on freenode, and
> > they said that, even with most of the SDL functions in the separate
> > thread, it shouldn't work.
> > 
> > Any and all help would be much appreciated,
> > 
> > Josh
> > 
> > ---
> >  libavdevice/Makefile |   1 +
> >  libavdevice/alldevices.c |   1 +
> >  libavdevice/sdl2.c   | 458 
> > +++
> >  3 files changed, 460 insertions(+)
> >  create mode 100644 libavdevice/sdl2.c
> 
> breaks build
> make distclean ; ./configure && make -j12
> 
> libavdevice/sdl2.c:40:5: error: unknown type name ‘SDL_Window’
> libavdevice/sdl2.c:41:5: error: unknown type name ‘SDL_Renderer’
> libavdevice/sdl2.c:47:5: error: unknown type name ‘SDL_Texture’
> libavdevice/sdl2.c:64:24: error: ‘SDL_PIXELFORMAT_RGB332’ undeclared here 
> (not in a function)
> libavdevice/sdl2.c:65:26: error: ‘SDL_PIXELFORMAT_RGB444’ undeclared here 
> (not in a function)
> libavdevice/sdl2.c:66:26: error: ‘SDL_PIXELFORMAT_RGB555’ undeclared here 
> (not in a function)
> libavdevice/sdl2.c:67:26: error: ‘SDL_PIXELFORMAT_BGR555’ undeclared here 
> (not in a function)
> libavdevice/sdl2.c:78:26: error: ‘SDL_PIXELFORMAT_RGB565’ undeclared here 
> (not in a function)
> libavdevice/sdl2.c:79:26: error: ‘SDL_PIXELFORMAT_BGR565’ undeclared here 
> (not in a function)
> libavdevice/sdl2.c:80:25: error: ‘SDL_PIXELFORMAT_RGB24’ undeclared here (not 
> in a function)
> libavdevice/sdl2.c:81:25: error: ‘SDL_PIXELFORMAT_BGR24’ undeclared here (not 
> in a function)
> libavdevice/sdl2.c:82:25: error: ‘SDL_PIXELFORMAT_RGB888’ undeclared here 
> (not in a function)
> libavdevice/sdl2.c:83:24: error: ‘SDL_PIXELFORMAT_RGBX’ undeclared here 
> (not in a function)
> libavdevice/sdl2.c:84:25: error: ‘SDL_PIXELFORMAT_BGR888’ undeclared here 
> (not in a function)
> libavdevice/sdl2.c:85:24: error: ‘SDL_PIXELFORMAT_BGRX’ undeclared here 
> (not in a function)
> libavdevice/sdl2.c:86:24: error: ‘SDL_PIXELFORMAT_ARGB’ undeclared here 
> (not in a function)
> libavdevice/sdl2.c:87:24: error: ‘SDL_PIXELFORMAT_RGBA’ undeclared here 
> (not in a function)
> libavdevice/sdl2.c:88:24: error: ‘SDL_PIXELFORMAT_ABGR’ undeclared here 
> (not in a function)
> libavdevice/sdl2.c:89:24: error: ‘SDL_PIXELFORMAT_BGRA’ undeclared here 
> (not in a function)
> libavdevice/sdl2.c:93:27: error: ‘SDL_PIXELFORMAT_IYUV’ undeclared here (not 
> in a function)
> libavdevice/sdl2.c:94:27: error: ‘SDL_PIXELFORMAT_YUY2’ undeclared here (not 
> in a function)
> libavdevice/sdl2.c:95:27: error: ‘SDL_PIXELFORMAT_UYVY’ undeclared here (not 
> in a function)
> libavdevice/sdl2.c: In function ‘event_thread’:
> libavdevice/sdl2.c:167:17: error: ‘SDL_WINDOW_RESIZABLE’ undeclared (first 
> use in this function)
> libavdevice/sdl2.c:167:17: note: each undeclared identifier is reported only 
> once for each function it appears in
> libavdevice/sdl2.c:167:17: error: invalid operands to binary | (have ‘int’ 
> and ‘const struct sdl_texture_pix_fmt_entry *’)
> libavdevice/sdl2.c:167:60: error: ‘SDL_WINDOW_FULLSCREEN’ undeclared (first 
> use in this function)
> libavdevice/sdl2.c:167:32: error: invalid operands to binary | (have ‘const 
> struct sdl_texture_pix_fmt_entry *’ and ‘const struct 
> sdl_texture_pix_fmt_entry *’)
> libavdevice/sdl2.c:168:60: error: ‘SDL_WINDOW_BORDERLESS’ undeclared (first 
> use in this function)
> libavdevice/sdl2.c:167:87: error: invalid operands to binary | (have ‘const 
> struct sdl_texture_pix_fmt_entry *’ and ‘const struct 
> sdl_texture_pix_fmt_entry *’)
> libavdevice/sdl2.c:167:17: warning: initialization makes integer from pointer 
> without a cast [enabled by default]
> libavdevice/sdl2.c:181:5: error: implicit declaration of function 
> ‘SDL_CreateWindowAndRenderer’ [-Werror=implicit-function-declaration]
> libavdevice/sdl2.c:188:5: error: implicit declaration of function 
> ‘SDL_SetWindowTitle’ [-Werror=implicit-function-declaration]
> libavdevice/sdl2.c:190:5: error: implicit declaration of function 
> ‘SDL_CreateTexture’ [-Werror=implicit-function-declaration]
> libavdevice/sdl2.c:190:71: error: ‘SDL_TEXTUREACCESS_STREAMING’ undeclared 
> (first use in this function)
> libavdevice/sdl2.c:190:18: warning: assignment makes pointer from

Re: [FFmpeg-devel] [PATCH WIPv2 2/2] avdev: add sdl2 device

2016-05-21 Thread Michael Niedermayer
On Sun, May 22, 2016 at 12:27:20AM +0200, Michael Niedermayer wrote:
> On Sat, May 21, 2016 at 11:39:01PM +0200, Michael Niedermayer wrote:
> > On Sat, May 21, 2016 at 07:35:04PM +0100, Josh de Kock wrote:
> > > Hi Marton,
> > > 
> > > Sorry for not updating it after we last spoke, I lost my source for the
> > > patch so I was force to do it again. Anyways, here it is. I'm using
> > > SDL_Events for sending the packets, using SDL_WaitEvent to throttle it,
> > > and Conditions to make sure that the queue doesn't build up. Is there
> > > anything I missed?
> > > 
> > > There's still an issue with the window freezing up though, and on quit
> > > there are "uncommitted CATransaction[s]" (an OSX thing, but I'm sure
> > > that it would still impact other systems if it is a problem on OSX).
> > > 
> > > I spoke to some of the people in the #sdl IRC channel on freenode, and
> > > they said that, even with most of the SDL functions in the separate
> > > thread, it shouldn't work.
> > > 
> > > Any and all help would be much appreciated,
> > > 
> > > Josh
> > > 
> > > ---
> > >  libavdevice/Makefile |   1 +
> > >  libavdevice/alldevices.c |   1 +
> > >  libavdevice/sdl2.c   | 458 
> > > +++
> > >  3 files changed, 460 insertions(+)
> > >  create mode 100644 libavdevice/sdl2.c
> > 
> > breaks build
> > make distclean ; ./configure && make -j12
> > 
> > libavdevice/sdl2.c:40:5: error: unknown type name ‘SDL_Window’
> > libavdevice/sdl2.c:41:5: error: unknown type name ‘SDL_Renderer’
> > libavdevice/sdl2.c:47:5: error: unknown type name ‘SDL_Texture’
> > libavdevice/sdl2.c:64:24: error: ‘SDL_PIXELFORMAT_RGB332’ undeclared here 
> > (not in a function)
> > libavdevice/sdl2.c:65:26: error: ‘SDL_PIXELFORMAT_RGB444’ undeclared here 
> > (not in a function)
> > libavdevice/sdl2.c:66:26: error: ‘SDL_PIXELFORMAT_RGB555’ undeclared here 
> > (not in a function)
> > libavdevice/sdl2.c:67:26: error: ‘SDL_PIXELFORMAT_BGR555’ undeclared here 
> > (not in a function)
> > libavdevice/sdl2.c:78:26: error: ‘SDL_PIXELFORMAT_RGB565’ undeclared here 
> > (not in a function)
> > libavdevice/sdl2.c:79:26: error: ‘SDL_PIXELFORMAT_BGR565’ undeclared here 
> > (not in a function)
> > libavdevice/sdl2.c:80:25: error: ‘SDL_PIXELFORMAT_RGB24’ undeclared here 
> > (not in a function)
> > libavdevice/sdl2.c:81:25: error: ‘SDL_PIXELFORMAT_BGR24’ undeclared here 
> > (not in a function)
> > libavdevice/sdl2.c:82:25: error: ‘SDL_PIXELFORMAT_RGB888’ undeclared here 
> > (not in a function)
> > libavdevice/sdl2.c:83:24: error: ‘SDL_PIXELFORMAT_RGBX’ undeclared here 
> > (not in a function)
> > libavdevice/sdl2.c:84:25: error: ‘SDL_PIXELFORMAT_BGR888’ undeclared here 
> > (not in a function)
> > libavdevice/sdl2.c:85:24: error: ‘SDL_PIXELFORMAT_BGRX’ undeclared here 
> > (not in a function)
> > libavdevice/sdl2.c:86:24: error: ‘SDL_PIXELFORMAT_ARGB’ undeclared here 
> > (not in a function)
> > libavdevice/sdl2.c:87:24: error: ‘SDL_PIXELFORMAT_RGBA’ undeclared here 
> > (not in a function)
> > libavdevice/sdl2.c:88:24: error: ‘SDL_PIXELFORMAT_ABGR’ undeclared here 
> > (not in a function)
> > libavdevice/sdl2.c:89:24: error: ‘SDL_PIXELFORMAT_BGRA’ undeclared here 
> > (not in a function)
> > libavdevice/sdl2.c:93:27: error: ‘SDL_PIXELFORMAT_IYUV’ undeclared here 
> > (not in a function)
> > libavdevice/sdl2.c:94:27: error: ‘SDL_PIXELFORMAT_YUY2’ undeclared here 
> > (not in a function)
> > libavdevice/sdl2.c:95:27: error: ‘SDL_PIXELFORMAT_UYVY’ undeclared here 
> > (not in a function)
> > libavdevice/sdl2.c: In function ‘event_thread’:
> > libavdevice/sdl2.c:167:17: error: ‘SDL_WINDOW_RESIZABLE’ undeclared (first 
> > use in this function)
> > libavdevice/sdl2.c:167:17: note: each undeclared identifier is reported 
> > only once for each function it appears in
> > libavdevice/sdl2.c:167:17: error: invalid operands to binary | (have ‘int’ 
> > and ‘const struct sdl_texture_pix_fmt_entry *’)
> > libavdevice/sdl2.c:167:60: error: ‘SDL_WINDOW_FULLSCREEN’ undeclared (first 
> > use in this function)
> > libavdevice/sdl2.c:167:32: error: invalid operands to binary | (have ‘const 
> > struct sdl_texture_pix_fmt_entry *’ and ‘const struct 
> > sdl_texture_pix_fmt_entry *’)
> > libavdevice/sdl2.c:168:60: error: ‘SDL_WINDOW_BORDERLESS’ undeclared (first 
> > use in this function)
> > libavdevice/sdl2.c:167:87: error: invalid operands to binary | (have ‘const 
> > struct sdl_texture_pix_fmt_entry *’ and ‘const struct 
> > sdl_texture_pix_fmt_entry *’)
> > libavdevice/sdl2.c:167:17: warning: initialization makes integer from 
> > pointer without a cast [enabled by default]
> > libavdevice/sdl2.c:181:5: error: implicit declaration of function 
> > ‘SDL_CreateWindowAndRenderer’ [-Werror=implicit-function-declaration]
> > libavdevice/sdl2.c:188:5: error: implicit declaration of function 
> > ‘SDL_SetWindowTitle’ [-Werror=implicit-function-declaration]
> > libavdevice/sdl2.c:190:5: error: implici

[FFmpeg-devel] [PATCH] web/contact: correct the condition for op status on IRC

2016-05-21 Thread Michael Niedermayer
we gave op status to commiters in the CVS and SVN days
since git an entry in MAINTAINERs was generally required to be offered
op status and push rights where not required.

Signed-off-by: Michael Niedermayer 
---
 src/contact |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/contact b/src/contact
index 9ee7392..200cb67 100644
--- a/src/contact
+++ b/src/contact
@@ -99,8 +99,8 @@
   
 
   FFmpeg has two official channels on the https://freenode.net/";>freenode
-  IRC network. Both channels are open and unmoderated. Developers with 
commit
-  rights have operator status, contributors with patches in FFmpeg
+  IRC network. Both channels are open and unmoderated. Maintainers
+  have operator status, contributors with patches in FFmpeg
   have voice in the channels.
   https://webchat.freenode.net/";>freenode webchat is a web
   client for these channels.
-- 
1.7.9.5

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


Re: [FFmpeg-devel] [PATCH] Updated (v3) -- Add input mode autodetect to the decklink module.

2016-05-21 Thread Felt, Patrick
On 5/21/16, 3:38 AM, "ffmpeg-devel on behalf of Marton Balint" 
 wrote:

>> --- a/libavdevice/decklink_common.cpp
>> +++ b/libavdevice/decklink_common.cpp
>> @@ -98,6 +98,90 @@ HRESULT ff_decklink_get_display_name(IDeckLink *This, 
>> const char **displayName)
>> return hr;
>> }
>>
>> +long ff_decklink_mode_to_bm(AVFormatContext *avctx,
>
>Should be BMDDisplayMode, not long.
>
>> +   decklink_direction_t direction,
>> +   int ffmpeg_mode,
>> +   IDeckLinkDisplayMode **mode)
>
>As far a I see you do not use **mode with a non-NULL arugment in your 
>code, so you can get rid of it and its functionality.

True, in this patch I do not use **mode, however I noticed that elsewhere we 
did a similar loop.  This could consolidate the code into one fuction so we 
don’t have duplicate code.  That would definitely be an unrelated change so I 
left it open enough to hopefully suffice.  We can take it out if we need to.
 
>
>> +{
>> +struct decklink_cctx *cctx = (struct decklink_cctx *) avctx->priv_data;
>
>unnecessary space before avctx

most of the spaces here are because I copied and pasted those lines from other, 
previously defined functions.  I removed from where I was seeing them, however 
I may have removed some extras.  Please don’t consider those a formatting 
change.

>> +break;
>> +}
>> +
>> +internal_mode->Release();
>> +}
>> +
>> +itermode->Release();
>> +if (internal_mode) {
>
>What if there is no match for ffmpeg_mode? Is it documented in the 
>Decklink SDK that internal_mode will be overwritten to NULL on the last 
>iteration?

Good catch.  I’ll rework this loop.

>> +int ff_decklink_mode_to_ffmpeg(AVFormatContext *avctx,
>> +   decklink_direction_t direction,
>> +   IDeckLinkDisplayMode **mode)
>
>should use *mode, not **mode, because *mode is not overwritten in this 
>function

modified this one as there really isn’t a need to send back mode information

>> +int ff_decklink_device_autodetect(AVFormatContext *avctx)
>
>Probably worth remaining to somehting like 
>ff_decklink_can_detect_input_format otherwise somebody may be 
>under the impression that this function will do the autodetection.

I’ve modified this to ff_decklink_device_supports_autodetect

>> @@ -244,6 +245,12 @@ HRESULT decklink_input_callback::VideoInputFrameArrived(
>> BMDTimeValue frameTime;
>> BMDTimeValue frameDuration;
>>
>> +/* if we don't have video, we are in the autodetect phase.  skip 
>> everything and let
>> + * autodetect do its magic */
>> +if (!ctx->video) {
>> +return S_OK;
>> +}
>> +
>> ctx->frameCount++;
>>
>> // Handle Video Frame
>> @@ -393,6 +400,14 @@ HRESULT 
>> decklink_input_callback::VideoInputFormatChanged(
>> BMDVideoInputFormatChangedEvents events, IDeckLinkDisplayMode *mode,
>> BMDDetectedVideoInputFormatFlags)
>> {
>> +
>> +/* undo all the autodetect stuff so we can move on with life */
>> +ctx->dli->PauseStreams();
>> +ctx->dli->FlushStreams();
>> +
>> +ctx->mode_num = ff_decklink_mode_to_ffmpeg(avctx, DIRECTION_IN, &mode);
>> +ctx->video = 1;
>
>I would only do anything in this function, if ctx->auto_detect is set 
>to 1, and I would also set ctx->auto_detect to 0, so you don't have to 
>use a separate ->video variable for signalling a successful autodetection.
>
>Also don't you want to StopStreams and DisableAudio/VideoInput here? 
>Because you will be re-doing the whole initialization stuff later, and I 
>am not sure you are supposed to call ff_decklink_set_format when the 
>streams are already running.
>

The decklink sdk specifically states that there should be a pause here and not 
a stop/start.  Also, ff_decklink_set_format() only checks that a mode is 
supported.  It doesn’t actually do anything else with the decklink api.

>> @@ -510,34 +525,74 @@ av_cold int ff_decklink_read_header(AVFormatContext 
>> *avctx)
>>
>> /* Get input device. */
>> if (ctx->dl->QueryInterface(IID_IDeckLinkInput, (void **) &ctx->dli) != 
>> S_OK) {
>> -av_log(avctx, AV_LOG_ERROR, "Could not open output device from 
>> '%s'\n",
>> +av_log(avctx, AV_LOG_ERROR, "Could not open input device from 
>> '%s'\n",
>>avctx->filename);
>> ctx->dl->Release();
>> return AVERROR(EIO);
>> }
>>
>> +auto_detect = ff_decklink_device_autodetect(avctx);
>> +
>> /* List supported formats. */
>> -if (ctx->list_formats) {
>> +if (ctx->list_formats || (ctx->mode_num <= 0 && !auto_detect)) {
>
>This seems like an unrelated change, i'd drop it for now.

If the user specifies they want auto detection, and their card doesn’t support 
it, I display the supported modes and exit.  This is related.

>> +
>> +result = ctx->dli->EnableAudioInput(bmdAudioSampleRate48kHz, 
>> bmdAudioSampleType16bitInteger, cctx->audio_cha

Re: [FFmpeg-devel] [PATCH] fix few compiler warnings

2016-05-21 Thread Davinder Singh
On Sun, May 22, 2016 at 2:09 AM Michael Niedermayer 
wrote:

> On Sat, May 21, 2016 at 02:21:17PM +, Davinder Singh wrote:
> > hi,
> >
> > this patch fixes following compiler warnings:
> >
> > libavcodec/cfhd.c:346:78: warning: format specifies type 'unsigned short'
> > but the argument has type 'int' [-Wformat]
> > av_log(avctx, AV_LOG_DEBUG, "Small chunk length %"PRIu16"
> > %s\n", data * 4, tag < 0 ? "optional" : "required");
> > ~~
> >   ^~~~
> > libavcodec/cfhd.c:472:110: warning: format specifies type 'unsigned
> short'
> > but the argument has type 'int' [-Wformat]
> > av_log(avctx, AV_LOG_DEBUG, "Start of lowpass coeffs
> component
> > %"PRIu16" height:%d, width:%d\n", s->channel_num, lowpass_height,
> > lowpass_width);
> >
> >  ~~^~
> > libavcodec/cfhd.c:490:77: warning: format specifies type 'unsigned short'
> > but the argument has type 'int' [-Wformat]
> > av_log(avctx, AV_LOG_DEBUG, "Lowpass coefficients
> %"PRIu16"\n",
> > lowpass_width * lowpass_height);
> >   ~~
> >  ^~
> >
> >
> >
> > libavcodec/dv_tablegen.c:30:60: warning: format specifies type 'char' but
> > the argument has type 'uint32_t' (aka 'unsigned int') [-Wformat]
> >"{0x%"PRIx32", %"PRId8"}", data[i].vlc, data[i].size)
> > ~~~^~~~
> > libavcodec/tableprint.h:37:29: note: expanded from macro
> > 'WRITE_1D_FUNC_ARGV'
> >printf(" "fmtstr",", __VA_ARGS__);\
> > ^~~
> > libavcodec/dv_tablegen.c:30:60: warning: format specifies type 'char' but
> > the argument has type 'uint32_t' (aka 'unsigned int') [-Wformat]
> >"{0x%"PRIx32", %"PRId8"}", data[i].vlc, data[i].size)
> > ~~~^~~~
> >
> >
> >
> > libavfilter/af_hdcd.c:896:57: warning: shifting a negative signed value
> is
> > undefined [-Wshift-negative-value]
> > state->readahead = readaheadtab[bits & ~(-1 << 8)];
> >
> >
> >
> > libavfilter/vf_hwdownload.c:59:5: warning: ignoring return value of
> > function declared with warn_unused_result attribute [-Wunused-result]
> > ff_formats_ref(infmts,  &avctx->inputs[0]->out_formats);
> > ^~ ~~~
> > libavfilter/vf_hwdownload.c:60:5: warning: ignoring return value of
> > function declared with warn_unused_result attribute [-Wunused-result]
> > ff_formats_ref(outfmts, &avctx->outputs[0]->in_formats);
> > ^~ ~~~
> >
> >
> >
> > libavutil/opencl.c:456:17: warning: variable 'kernel_source' is used
> > uninitialized whenever 'for' loop exits because its condition is false
> > [-Wsometimes-uninitialized]
> > for (i = 0; i < opencl_ctx.kernel_code_count; i++) {
> > ^~~~
> > libavutil/opencl.c:466:10: note: uninitialized use occurs here
> > if (!kernel_source) {
> >  ^
> > libavutil/opencl.c:456:17: note: remove the condition if it is always
> true
> > for (i = 0; i < opencl_ctx.kernel_code_count; i++) {
> > ^~~~
> > libavutil/opencl.c:448:30: note: initialize the variable 'kernel_source'
> to
> > silence this warning
> > const char *kernel_source;
> >  ^
> >   = NULL
>
> >  libavcodec/cfhd.c   |6 +++---
> >  libavcodec/dv_tablegen.c|2 +-
> >  libavfilter/af_hdcd.c   |2 +-
> >  libavfilter/vf_hwdownload.c |6 --
> >  libavutil/opencl.c  |2 +-
>
> please split this patch
> the fixed warnings are unrelated to each other and possibly differnt
> developers would like to reply to different parts
>
> [...]
>
> --
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> I have often repented speaking, but never of holding my tongue.
> -- Xenocrates
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>


0003-libavfilter-af_hdcd-fixed-negative-signed-value-shif.patch
Description: Binary data


0005-libavutil-opencl-fixed-uninitialized-var-warning.patch
Description: Binary data


0001-libavcodec-cfhd-fixed-wrong-printf-format.patch
Description: Binary data


0004-libavfilter-vf_hwdownload-show-error-when-ff_formats.patch
Description: Binary data


0002-libavcodec-dv_tablegen-fixed-wrong-printf-format.patch
Description: Binary data


0006-libavcodec-pngenc-fixed-assignment-discards-qualifie.patch
Description: Binary data


0007-libavcodec-tscc-fixed-assignment-discards-qualifier-.patch
Description: Binary data
_

Re: [FFmpeg-devel] [PATCH] web/contact: correct the condition for op status on IRC

2016-05-21 Thread Lou Logan
On Sat, May 21, 2016, at 03:20 PM, Michael Niedermayer wrote:
> we gave op status to commiters in the CVS and SVN days
> since git an entry in MAINTAINERs was generally required to be offered
> op status and push rights where not required.
>
> Signed-off-by: Michael Niedermayer 
> ---
>src/contact |    4 ++--
>1 file changed, 2 insertions(+), 2 deletions(-)
 
Fine with me.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel