[FFmpeg-devel] [PATCH 4/4] af_hdcd: Report PE as being intermittent or permanent

2016-07-23 Thread Burt P
The Peak Extend feature could be enabled permanently or only
when needed. This is now reported.

Signed-off-by: Burt P 
---
 libavfilter/af_hdcd.c | 30 ++
 1 file changed, 26 insertions(+), 4 deletions(-)

diff --git a/libavfilter/af_hdcd.c b/libavfilter/af_hdcd.c
index 7c9494d..daaafba 100644
--- a/libavfilter/af_hdcd.c
+++ b/libavfilter/af_hdcd.c
@@ -851,6 +851,18 @@ typedef struct {
 AVFilterContext *fctx; /* filter context for logging errors */
 } hdcd_state_t;
 
+typedef enum {
+HDCD_PE_NEVER=0,
+HDCD_PE_INTERMITTENT =1,
+HDCD_PE_PERMANENT=2
+} hdcd_pe_t;
+
+const char* pe_str[] = {
+"never enabled",
+"enabled intermittently",
+"enabled permanently"
+};
+
 typedef struct HDCDContext {
 const AVClass *class;
 hdcd_state_t state[2];
@@ -858,7 +870,7 @@ typedef struct HDCDContext {
 /* User information/stats */
 int hdcd_detected;
 int det_errors;/* detectable errors */
-int uses_peak_extend;
+hdcd_pe_t peak_extend;
 int uses_transient_filter; /* detected, but not implemented */
 float max_gain_adjustment; /* in dB, expected in the range -6.0 to 0.0 */
 } HDCDContext;
@@ -1114,7 +1126,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
 const int16_t *in_data;
 int32_t *out_data;
 int n, c;
-int detect;
+int detect, packets, pe_packets;
 
 out = ff_get_audio_buffer(outlink, in->nb_samples);
 if (!out) {
@@ -1131,18 +1143,28 @@ static int filter_frame(AVFilterLink *inlink, AVFrame 
*in)
 }
 
 detect = 0;
+packets = 0;
+pe_packets = 0;
 s->det_errors = 0;
 for (c = 0; c < inlink->channels; c++) {
 hdcd_state_t *state = >state[c];
 hdcd_process(state, out_data + c, in->nb_samples, out->channels);
 if (state->sustain) detect++;
-s->uses_peak_extend |= !!state->count_peak_extend;
+packets += state->code_counterA + state->code_counterB;
+pe_packets += state->count_peak_extend;
 s->uses_transient_filter |= !!state->count_transient_filter;
 s->max_gain_adjustment = FFMIN(s->max_gain_adjustment, 
GAINTOFLOAT(state->max_gain));
 s->det_errors += state->code_counterA_almost
 + state->code_counterB_checkfails
 + state->code_counterC_unmatched;
 }
+if (pe_packets) {
+/* if every valid packet has used PE, call it permanent */
+if (packets == pe_packets)
+s->peak_extend = HDCD_PE_PERMANENT;
+else
+s->peak_extend = HDCD_PE_INTERMITTENT;
+} else s->peak_extend = HDCD_PE_NEVER;
 /* HDCD is detected if a valid packet is active in all (both)
  * channels at the same time. */
 if (detect == inlink->channels) s->hdcd_detected = 1;
@@ -1223,7 +1245,7 @@ static av_cold void uninit(AVFilterContext *ctx)
 if (s->hdcd_detected)
 av_log(ctx, AV_LOG_INFO,
 "HDCD detected: yes, peak_extend: %s, max_gain_adj: %0.1f dB, 
transient_filter: %s, detectable errors: %d%s\n",
-(s->uses_peak_extend) ? "enabled" : "never enabled",
+pe_str[s->peak_extend],
 s->max_gain_adjustment,
 (s->uses_transient_filter) ? "detected" : "not detected",
 s->det_errors, (s->det_errors) ? " (try -v verbose)" : ""
-- 
2.7.4

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


Re: [FFmpeg-devel] [PATCH] af_hdcd: Improve HDCD detection

2016-07-23 Thread Burt P.
On Sat, Jul 23, 2016 at 5:41 PM, Michael Niedermayer
 wrote:
>
> this looks like 2 unrelated changes
> one is improving documentation the other is changing ths detect code
> can you split these in 2 patches ?

Ok, I've submitted a new set.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 3/4] af_hdcd: Add counter for cdt expirations

2016-07-23 Thread Burt P
Adds a counter for when the code detect timer expired without
finding a valid packet.

Signed-off-by: Burt P 
---
 libavfilter/af_hdcd.c | 14 --
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/libavfilter/af_hdcd.c b/libavfilter/af_hdcd.c
index 72560db..7c9494d 100644
--- a/libavfilter/af_hdcd.c
+++ b/libavfilter/af_hdcd.c
@@ -846,6 +846,7 @@ typedef struct {
  * steps of 0.5, but no value below -6.0 dB should appear. */
 int gain_counts[16]; /* for cursiosity, mostly */
 int max_gain;
+int count_sustain_expired;/* occurances of code detect timer expiring 
without detecting a code */
 
 AVFilterContext *fctx; /* filter context for logging errors */
 } hdcd_state_t;
@@ -895,6 +896,8 @@ static void hdcd_reset(hdcd_state_t *state, unsigned rate)
 state->count_transient_filter = 0;
 for(i = 0; i < 16; i++) state->gain_counts[i] = 0;
 state->max_gain = 0;
+
+state->count_sustain_expired = 0;
 }
 
 /* update the user info/counters */
@@ -979,7 +982,10 @@ static int hdcd_integrate(hdcd_state_t *state, int *flag, 
const int32_t *samples
 static int hdcd_scan(hdcd_state_t *state, const int32_t *samples, int max, int 
stride)
 {
 int result;
+int cdt_active = 0;
+/* code detect timer */
 if (state->sustain > 0) {
+cdt_active = 1;
 if (state->sustain <= max) {
 state->control = 0;
 max = state->sustain;
@@ -992,11 +998,14 @@ static int hdcd_scan(hdcd_state_t *state, const int32_t 
*samples, int max, int s
 int consumed = hdcd_integrate(state, , samples, max - result, 
stride);
 result += consumed;
 if (flag > 0) {
+/* reset timer if code detected in channel */
 state->sustain = state->sustain_reset;
 break;
 }
 samples += consumed * stride;
 }
+/* code detect timer expired */
+if (cdt_active && state->sustain == 0) state->count_sustain_expired++;
 return result;
 }
 
@@ -1198,12 +1207,13 @@ static av_cold void uninit(AVFilterContext *ctx)
 hdcd_state_t *state = >state[i];
 av_log(ctx, AV_LOG_VERBOSE, "Channel %d: counter A: %d, B: %d, C: 
%d\n", i,
 state->code_counterA, state->code_counterB, 
state->code_counterC);
-av_log(ctx, AV_LOG_VERBOSE, "Channel %d: pe: %d, tf: %d, almost_A: %d, 
checkfail_B: %d, unmatched_C: %d\n", i,
+av_log(ctx, AV_LOG_VERBOSE, "Channel %d: pe: %d, tf: %d, almost_A: %d, 
checkfail_B: %d, unmatched_C: %d, cdt_expired: %d\n", i,
 state->count_peak_extend,
 state->count_transient_filter,
 state->code_counterA_almost,
 state->code_counterB_checkfails,
-state->code_counterC_unmatched);
+state->code_counterC_unmatched,
+state->count_sustain_expired);
 for (j = 0; j <= state->max_gain; j++) {
 av_log(ctx, AV_LOG_VERBOSE, "Channel %d: tg %0.1f: %d\n", i, 
GAINTOFLOAT(j), state->gain_counts[j]);
 }
-- 
2.7.4

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


[FFmpeg-devel] [PATCH 1/4] af_hdcd: Improve HDCD detection

2016-07-23 Thread Burt P
HDCD is now only considered detected if a valid packet
is active in both channels simultaneously.

Signed-off-by: Burt P 
---
 libavfilter/af_hdcd.c | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/libavfilter/af_hdcd.c b/libavfilter/af_hdcd.c
index 6f0db71..f68a105 100644
--- a/libavfilter/af_hdcd.c
+++ b/libavfilter/af_hdcd.c
@@ -1097,6 +1097,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
 const int16_t *in_data;
 int32_t *out_data;
 int n, c;
+int detect;
 
 out = ff_get_audio_buffer(outlink, in->nb_samples);
 if (!out) {
@@ -1112,19 +1113,22 @@ static int filter_frame(AVFilterLink *inlink, AVFrame 
*in)
 out_data[n] = in_data[n];
 }
 
+detect = 0;
 s->det_errors = 0;
 for (c = 0; c < inlink->channels; c++) {
 hdcd_state_t *state = >state[c];
 hdcd_process(state, out_data + c, in->nb_samples, out->channels);
-
+if (state->sustain) detect++;
 s->uses_peak_extend |= !!state->count_peak_extend;
 s->uses_transient_filter |= !!state->count_transient_filter;
 s->max_gain_adjustment = FFMIN(s->max_gain_adjustment, 
GAINTOFLOAT(state->max_gain));
-s->hdcd_detected |= state->code_counterB || state->code_counterA;
 s->det_errors += state->code_counterA_almost
 + state->code_counterB_checkfails
 + state->code_counterC_unmatched;
 }
+/* HDCD is detected if a valid packet is active in all (both)
+ * channels at the same time. */
+if (detect == inlink->channels) s->hdcd_detected = 1;
 
 av_frame_free();
 return ff_filter_frame(outlink, out);
-- 
2.7.4

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


[FFmpeg-devel] [PATCH 2/4] af_hdcd: more comments in state struct

2016-07-23 Thread Burt P
Add some comments describing the fields in hdcd_state_t.

Signed-off-by: Burt P 
---
 libavfilter/af_hdcd.c | 34 +-
 1 file changed, 21 insertions(+), 13 deletions(-)

diff --git a/libavfilter/af_hdcd.c b/libavfilter/af_hdcd.c
index f68a105..72560db 100644
--- a/libavfilter/af_hdcd.c
+++ b/libavfilter/af_hdcd.c
@@ -818,20 +818,28 @@ static const int32_t gaintab[] = {
 
 typedef struct {
 uint64_t window;
-unsigned char readahead, arg, control;
-int running_gain;
-unsigned sustain, sustain_reset;
-int code_counterA;
-int code_counterA_almost; /* looks like an A code, but a bit expected to 
be 0 is 1 */
-int code_counterB;
+unsigned char readahead;
+
+/* arg is set when a packet prefix is found.
+ * control is the active control code, where
+ * bit 0-3: target_gain, 4-bit (3.1) fixed-point value
+ * bit 4  : peak_extend
+ * bit 5  : transient_filter
+ * bit 6,7: always zero */
+unsigned char arg, control;
+unsigned sustain, sustain_reset; /* code detect timer */
+
+int running_gain; /* 11-bit (3.8) fixed point, extended from target_gain */
+
+/* counters */
+int code_counterA;/* 8-bit format packet */
+int code_counterA_almost; /* looks like an A code, but a bit expected 
to be 0 is 1 */
+int code_counterB;/* 16-bit format packet, 8-bit code, 8-bit 
XOR of code */
 int code_counterB_checkfails; /* looks like a B code, but doesn't pass the 
XOR check */
-int code_counterC;
-int code_counterC_unmatched; /* told to look for a code, but didn't find 
one */
-
-/* For user information/stats, pulled up into HDCDContext
- * by filter_frame() */
-int count_peak_extend;
-int count_transient_filter;
+int code_counterC;/* packet prefix was found, expect a code */
+int code_counterC_unmatched;  /* told to look for a code, but didn't find 
one */
+int count_peak_extend;/* valid packets where peak_extend was 
enabled */
+int count_transient_filter;   /* valid packets where filter was detected */
 /* target_gain is a 4-bit (3.1) fixed-point value, always
  * negative, but stored positive.
  * The 16 possible values range from -7.5 to 0.0 dB in
-- 
2.7.4

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


[FFmpeg-devel] [PATCH 0/4] HDCD filter improvements

2016-07-23 Thread Burt P
I've split an earlier patch as requested, and added a couple more to the set.

--
Burt

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


Re: [FFmpeg-devel] [PATCH] fate: add test for chorus filter

2016-07-23 Thread Michael Niedermayer
On Sat, Jul 23, 2016 at 08:37:51PM -0300, James Almer wrote:
> On 7/19/2016 10:05 PM, Michael Niedermayer wrote:
> > On Tue, Jul 19, 2016 at 07:37:16PM +, Petru Rares Sincraian wrote:
> >>
> >> Hi there,
> >>
> >> Here is a patch for the chorus filter. I tested on x64 and x86.
> >>
> >>
> >> Regards,
> >> Petru Rares.
> > 
> >>  fate/filter-audio.mak  |5 +
> >>  ref/fate/filter-chorus |   15 +++
> >>  2 files changed, 20 insertions(+)
> >> ecb2b496de8f11976bd81ba8857578acc3c2d2c4  
> >> 0001-fate-add-test-for-chorus-filter.patch
> >> From 4a06b5da1e4b3a3dcf8a8df09f650d2545fade6d Mon Sep 17 00:00:00 2001
> >> From: Petru Rares Sincraian 
> >> Date: Tue, 19 Jul 2016 21:18:08 +0200
> >> Subject: [PATCH] fate: add test for chorus filter
> > 
> > applied
> > 
> > thanks
> 
> ARM fate clients seem to not like this test.

changed the parameters a bit until it produced the same results on
all platforms i could easily test
lets see if that works
if not ill disable this one

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

Democracy is the form of government in which you can choose your dictator


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


[FFmpeg-devel] [PATCH v2] tests/fate: add dnxhr encoding tests

2016-07-23 Thread Mark Reid
added sws_flags flags and tested against x86_32

---
 tests/fate/seek.mak   |  2 ++
 tests/fate/vcodec.mak | 26 -
 tests/ref/seek/vsynth_lena-dnxhd-4k-hr-lb | 40 +++
 tests/ref/vsynth/vsynth1-dnxhd-2k-hr-hq   |  4 +++
 tests/ref/vsynth/vsynth1-dnxhd-4k-hr-lb   |  4 +++
 tests/ref/vsynth/vsynth1-dnxhd-720p-hr-lb |  4 +++
 tests/ref/vsynth/vsynth1-dnxhd-uhd-hr-sq  |  4 +++
 tests/ref/vsynth/vsynth2-dnxhd-2k-hr-hq   |  4 +++
 tests/ref/vsynth/vsynth2-dnxhd-4k-hr-lb   |  4 +++
 tests/ref/vsynth/vsynth2-dnxhd-720p-hr-lb |  4 +++
 tests/ref/vsynth/vsynth2-dnxhd-uhd-hr-sq  |  4 +++
 tests/ref/vsynth/vsynth3-dnxhd-2k-hr-hq   |  4 +++
 tests/ref/vsynth/vsynth3-dnxhd-4k-hr-lb   |  4 +++
 tests/ref/vsynth/vsynth3-dnxhd-720p-hr-lb |  4 +++
 tests/ref/vsynth/vsynth3-dnxhd-uhd-hr-sq  |  4 +++
 tests/ref/vsynth/vsynth_lena-dnxhd-2k-hr-hq   |  4 +++
 tests/ref/vsynth/vsynth_lena-dnxhd-4k-hr-lb   |  4 +++
 tests/ref/vsynth/vsynth_lena-dnxhd-720p-hr-lb |  4 +++
 tests/ref/vsynth/vsynth_lena-dnxhd-uhd-hr-sq  |  4 +++
 19 files changed, 131 insertions(+), 1 deletion(-)
 create mode 100644 tests/ref/seek/vsynth_lena-dnxhd-4k-hr-lb
 create mode 100644 tests/ref/vsynth/vsynth1-dnxhd-2k-hr-hq
 create mode 100644 tests/ref/vsynth/vsynth1-dnxhd-4k-hr-lb
 create mode 100644 tests/ref/vsynth/vsynth1-dnxhd-720p-hr-lb
 create mode 100644 tests/ref/vsynth/vsynth1-dnxhd-uhd-hr-sq
 create mode 100644 tests/ref/vsynth/vsynth2-dnxhd-2k-hr-hq
 create mode 100644 tests/ref/vsynth/vsynth2-dnxhd-4k-hr-lb
 create mode 100644 tests/ref/vsynth/vsynth2-dnxhd-720p-hr-lb
 create mode 100644 tests/ref/vsynth/vsynth2-dnxhd-uhd-hr-sq
 create mode 100644 tests/ref/vsynth/vsynth3-dnxhd-2k-hr-hq
 create mode 100644 tests/ref/vsynth/vsynth3-dnxhd-4k-hr-lb
 create mode 100644 tests/ref/vsynth/vsynth3-dnxhd-720p-hr-lb
 create mode 100644 tests/ref/vsynth/vsynth3-dnxhd-uhd-hr-sq
 create mode 100644 tests/ref/vsynth/vsynth_lena-dnxhd-2k-hr-hq
 create mode 100644 tests/ref/vsynth/vsynth_lena-dnxhd-4k-hr-lb
 create mode 100644 tests/ref/vsynth/vsynth_lena-dnxhd-720p-hr-lb
 create mode 100644 tests/ref/vsynth/vsynth_lena-dnxhd-uhd-hr-sq

diff --git a/tests/fate/seek.mak b/tests/fate/seek.mak
index f120f56..b831cf8 100644
--- a/tests/fate/seek.mak
+++ b/tests/fate/seek.mak
@@ -64,6 +64,7 @@ FATE_SEEK_VSYNTH_LENA-$(call ENCDEC, ASV1,  AVI) 
+= asv1
 FATE_SEEK_VSYNTH_LENA-$(call ENCDEC, ASV2,  AVI) += asv2
 FATE_SEEK_VSYNTH_LENA-$(call ENCDEC, DNXHD, DNXHD)   += dnxhd-720p
 FATE_SEEK_VSYNTH_LENA-$(call ENCDEC, DNXHD, DNXHD)   += dnxhd-720p-rd
+FATE_SEEK_VSYNTH_LENA-$(call ENCDEC, DNXHD, DNXHD)   += dnxhd-4k-hr-lb
 FATE_SEEK_VSYNTH_LENA-$(call ENCDEC, DNXHD, MOV) += dnxhd-1080i
 FATE_SEEK_VSYNTH_LENA-$(call ENCDEC, DVVIDEO,   DV)  += dv
 FATE_SEEK_VSYNTH_LENA-$(call ENCDEC, DVVIDEO,   DV)  += dv-411
@@ -111,6 +112,7 @@ fate-seek-vsynth_lena-asv2:  SRC = 
fate/vsynth_lena-asv2.avi
 fate-seek-vsynth_lena-dnxhd-1080i:   SRC = fate/vsynth_lena-dnxhd-1080i.mov
 fate-seek-vsynth_lena-dnxhd-720p:SRC = 
fate/vsynth_lena-dnxhd-720p.dnxhd
 fate-seek-vsynth_lena-dnxhd-720p-rd: SRC = 
fate/vsynth_lena-dnxhd-720p.dnxhd
+fate-seek-vsynth_lena-dnxhd-4k-hr-lb:SRC = 
fate/vsynth_lena-dnxhd-4k-hr-lb.dnxhd
 fate-seek-vsynth_lena-dv:SRC = fate/vsynth_lena-dv.dv
 fate-seek-vsynth_lena-dv-411:SRC = fate/vsynth_lena-dv-411.dv
 fate-seek-vsynth_lena-dv-50: SRC = fate/vsynth_lena-dv-50.dv
diff --git a/tests/fate/vcodec.mak b/tests/fate/vcodec.mak
index 0e08894..c62abe4 100644
--- a/tests/fate/vcodec.mak
+++ b/tests/fate/vcodec.mak
@@ -27,7 +27,11 @@ fate-vsynth%-cljr:   ENCOPTS = -strict -1

 FATE_VCODEC-$(call ENCDEC, DNXHD, DNXHD) += dnxhd-720p  \
 dnxhd-720p-rd   \
-dnxhd-720p-10bit
+dnxhd-720p-10bit\
+dnxhd-720p-hr-lb\
+dnxhd-4k-hr-lb  \
+dnxhd-uhd-hr-sq \
+dnxhd-2k-hr-hq

 FATE_VCODEC-$(call ENCDEC, VC2 DIRAC, MOV) += vc2-420p vc2-420p10 vc2-420p12 \
   vc2-422p vc2-422p10 vc2-422p12 \
@@ -54,6 +58,26 @@ fate-vsynth%-dnxhd-720p-10bit:   ENCOPTS = -s hd720 -b 90M   
   \
-pix_fmt yuv422p10 -frames 5 -qmax 8
 fate-vsynth%-dnxhd-720p-10bit:   FMT = dnxhd

+fate-vsynth%-dnxhd-720p-hr-lb: ENCOPTS   = -s hd720 -profile:v dnxhr_lb \
+   -pix_fmt yuv422p -frames 5

Re: [FFmpeg-devel] [GSoC] MLP/TrueHD encoder

2016-07-23 Thread Michael Niedermayer
On Thu, Jul 07, 2016 at 04:58:21AM +0530, Jai Luthra wrote:
> Hi,
> 
> This is an update for the TrueHD encoder gsoc project. Any input from the 
> community about work done till now, or for plans ahead, is most welcome :)
> 
> The MLP encoder (patch attached) works without any lossless check errors now 
> on most samples I've tested on, both for mono and stereo.
> 
> Here's the changelog from ramiro's original version of the encoder: 
> https://github.com/jailuthra/FFmpeg/compare/33c37b86...b4eb87c
> 
> The current plan is:
> * Support encoding TrueHD bitstreams through mlpenc.c, just like it's 
> done in mlpdec.c
> * Add multi-channel support
> * Add FATE tests?
> * Send the patch for review and merge
> 
> Also while testing how to implement multi-channel support, I noticed that the 
> LFE channel encoding was not lossless for most samples. Any suggestions on 
> how to fix this would be helpful.
> 
> Cheers,
> Jai Luthra (darkapex)

commenting on your mlpencoder branch (which is newer) instead of the
patch


> +static int compare_filter_params(ChannelParams *prev_cp, ChannelParams *cp, 
> int filter)

please mark stuff that are not changed as const

same for compare_matrix_params()

this should allow marking restart_best_offset as const i think


> +for (i = 0; i < NUM_FILTERS; i++) {
> +unsigned int size = ctx->number_of_samples;
> +filter_state_buffer[i] = av_malloc(size*sizeof(int32_t));
> +}
> +
> +for (i = 0; i < 8; i++) {
> +filter_state_buffer[FIR][i] = *sample_buffer;
> +filter_state_buffer[IIR][i] = *sample_buffer;
> +
> +sample_buffer += ctx->num_channels;
> +}

Missing malloc failure check


> diff --git a/libavcodec/ra144enc.c b/libavcodec/ra144enc.c
> index d3a7fff..cc4f381 100644
> --- a/libavcodec/ra144enc.c
> +++ b/libavcodec/ra144enc.c
> @@ -475,7 +475,7 @@ static int ra144_encode_frame(AVCodecContext *avctx, 
> AVPacket *avpkt,
>
>  ff_lpc_calc_coefs(>lpc_ctx, lpc_data, NBLOCKS * BLOCKSIZE, 
> LPC_ORDER,
>LPC_ORDER, 16, lpc_coefs, shift, FF_LPC_TYPE_LEVINSON,
> -  0, ORDER_METHOD_EST, 12, 0);
> +  0, ORDER_METHOD_EST, 0, 12, 0);
>  for (i = 0; i < LPC_ORDER; i++)
>  block_coefs[NBLOCKS - 1][i] = -(lpc_coefs[LPC_ORDER - 1][i] <<
>  (12 - shift[LPC_ORDER - 1]));

A change to ff_lpc_calc_coefs / lpc/flac /  should be in a seperate
patch

more generally, is everything going acording to plan ?
anything that you need help with ?

[...]

--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

It is dangerous to be right in matters on which the established authorities
are wrong. -- Voltaire


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


Re: [FFmpeg-devel] [PATCH] fate: add test for chorus filter

2016-07-23 Thread James Almer
On 7/19/2016 10:05 PM, Michael Niedermayer wrote:
> On Tue, Jul 19, 2016 at 07:37:16PM +, Petru Rares Sincraian wrote:
>>
>> Hi there,
>>
>> Here is a patch for the chorus filter. I tested on x64 and x86.
>>
>>
>> Regards,
>> Petru Rares.
> 
>>  fate/filter-audio.mak  |5 +
>>  ref/fate/filter-chorus |   15 +++
>>  2 files changed, 20 insertions(+)
>> ecb2b496de8f11976bd81ba8857578acc3c2d2c4  
>> 0001-fate-add-test-for-chorus-filter.patch
>> From 4a06b5da1e4b3a3dcf8a8df09f650d2545fade6d Mon Sep 17 00:00:00 2001
>> From: Petru Rares Sincraian 
>> Date: Tue, 19 Jul 2016 21:18:08 +0200
>> Subject: [PATCH] fate: add test for chorus filter
> 
> applied
> 
> thanks

ARM fate clients seem to not like this test.

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


Re: [FFmpeg-devel] [PATCH]lavc/h264_ps: Be more verbose when truncating likely oversized pps.

2016-07-23 Thread Michael Niedermayer
On Fri, Jul 22, 2016 at 07:26:41PM +0200, Carl Eugen Hoyos wrote:
> Hi!
> 
> Attached patch prints the size of the oversized pps when truncating.
> 
> Please comment, Carl Eugen

>  h264_ps.c |4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> d31b582b08f7b3457160ab5418d652746aa3d34c  
> 0001-lavc-h264_ps-Be-more-verbose-when-truncating-likely-.patch
> From 0ac76e23c283103441f372590eba24d14b2977c2 Mon Sep 17 00:00:00 2001
> From: Carl Eugen Hoyos 
> Date: Fri, 22 Jul 2016 19:24:15 +0200
> Subject: [PATCH] lavc/h264_ps: Be more verbose when truncating likely
>  oversized PPS.

should be ok

thx

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Complexity theory is the science of finding the exact solution to an
approximation. Benchmarking OTOH is finding an approximation of the exact


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


Re: [FFmpeg-devel] Outreachy 2016 december

2016-07-23 Thread Yayoi Ukai
On Jul 22, 2016 10:18 AM, "Michael Niedermayer" 
wrote:
>
> On Wed, Jul 06, 2016 at 11:25:21PM +0200, Michael Niedermayer wrote:
> > Hi all
> >
> > The next Outreachy round starts soon
> > FFmpeg has till august 22 IIUC (https://www.gnome.org/outreachy/)
> > to express interrest to participate.
> >
> > We need an admin and backup admins.
>
> ping!

Hi everyone!

I'm happy to help with the administrative tasks of this project. As far as
Outreachy goes, I will not be able to fully commit as a participant. I can
help with fundraising, recruitment, and any administrarative tasks that you
would like me to assist with. I would be happy to contribute code, but I
would be limited to 10 hours per week working on small coding projects. I
attempted to familiarise myself with Trac, but there are still some aspects
of it I need guidance with. If there are any documentation available that I
am not aware of, I would be happy to review it.

I look forward to working with each and everyone of you on FFmpeg!

Cheers,
Yayoi


>
>
> > They need to create the wiki page(s) for this round, and make sure
> > the pages are in shape by the time applicants start pouring in.
> > make sure applicants questions (like "[FFmpeg-devel] need guidance")
> > get awnsered
> > recruite mentors,
>
> > secure funding (as in confirming with the community and stefano that
> > SPI/FFIS funding can be used for one slot or find another sponsor)
>
> @stefano, do we have funding for a slot in the next outreachy round?
>
> also if someone is against it speak now, before we contact Outreachy
> and state that we want to participate and have funding ...
>
>
> > contact the Outreachy admins and express that FFmpeg wants to
> > participate, ...
> > Reply to any questions the outreachy admins have
> > Make sure that during the project nothing goes wrong like a mentor
> > disappearing and if something goes wrong deal with it
>
> [...]
>
> --
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> Freedom in capitalist society always remains about the same as it was in
> ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin
>
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] libavutil/opt: Small changes in example.

2016-07-23 Thread Michael Niedermayer
On Sat, Jul 23, 2016 at 09:43:06PM +0200, Kacper Michajłow wrote:
> Fix const corectness and zero init the struct. This example code would 
> actually crash when initializing string.
> ---
>  libavutil/opt.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

applied

thx

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

Good people do not need laws to tell them to act responsibly, while bad
people will find a way around the laws. -- 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] af_hdcd: Improve HDCD detection

2016-07-23 Thread Michael Niedermayer
On Sun, Jul 17, 2016 at 12:34:12PM -0500, Burt P wrote:
> HDCD is only "detected" if a valid code is active in both
> channels simultaneously, as described here:
> https://hydrogenaud.io/index.php/topic,79427.msg900371.html#msg900371
> 
> Signed-off-by: Burt P 
> ---
>  libavfilter/af_hdcd.c | 34 --
>  1 file changed, 24 insertions(+), 10 deletions(-)
> 
> diff --git a/libavfilter/af_hdcd.c b/libavfilter/af_hdcd.c
> index 6f0db71..4b48967 100644
> --- a/libavfilter/af_hdcd.c
> +++ b/libavfilter/af_hdcd.c
> @@ -818,15 +818,25 @@ static const int32_t gaintab[] = {
>  
>  typedef struct {
>  uint64_t window;
> -unsigned char readahead, arg, control;
> -int running_gain;
> -unsigned sustain, sustain_reset;
> -int code_counterA;
> -int code_counterA_almost; /* looks like an A code, but a bit expected to 
> be 0 is 1 */
> -int code_counterB;
> +unsigned char readahead;
> +
> +/* arg is set when a packet prefix is found.
> + * control is the active control code, where
> + * bit 0-3: target_gain, 4-bit (3.1) fixed-point value
> + * bit 4  : peak_extend
> + * bit 5  : transient_filter
> + * bit 6,7: always zero */
> +unsigned char arg, control;
> +unsigned sustain, sustain_reset; /* code detect timer */
> +
> +int running_gain; /* 11-bit (3.8) fixed point, extended from target_gain 
> */
> +
> +int code_counterA;/* 8-bit format packet */
> +int code_counterA_almost; /* looks like an A code, but a bit 
> expected to be 0 is 1 */
> +int code_counterB;/* 16-bit format packet, 8-bit code, 8-bit 
> XOR of code */
>  int code_counterB_checkfails; /* looks like a B code, but doesn't pass 
> the XOR check */
> -int code_counterC;
> -int code_counterC_unmatched; /* told to look for a code, but didn't find 
> one */
> +int code_counterC;/* packet prefix was found, expect a code 
> */
> +int code_counterC_unmatched;  /* told to look for a code, but didn't 
> find one */
>  
>  /* For user information/stats, pulled up into HDCDContext
>   * by filter_frame() */
> @@ -1096,7 +1106,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame 
> *in)
>  AVFrame *out;
>  const int16_t *in_data;
>  int32_t *out_data;
> -int n, c;
> +int n, c, detect;
>  
>  out = ff_get_audio_buffer(outlink, in->nb_samples);
>  if (!out) {
> @@ -1112,6 +1122,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame 
> *in)
>  out_data[n] = in_data[n];
>  }
>  
> +detect = 0;
>  s->det_errors = 0;
>  for (c = 0; c < inlink->channels; c++) {
>  hdcd_state_t *state = >state[c];
> @@ -1120,11 +1131,14 @@ static int filter_frame(AVFilterLink *inlink, AVFrame 
> *in)
>  s->uses_peak_extend |= !!state->count_peak_extend;
>  s->uses_transient_filter |= !!state->count_transient_filter;
>  s->max_gain_adjustment = FFMIN(s->max_gain_adjustment, 
> GAINTOFLOAT(state->max_gain));
> -s->hdcd_detected |= state->code_counterB || state->code_counterA;
> +if (state->sustain) detect++;
>  s->det_errors += state->code_counterA_almost
>  + state->code_counterB_checkfails
>  + state->code_counterC_unmatched;
>  }
> +/* HDCD is detected if a valid packet is active in all (both)
> + * channels at the same time. */
> +if (detect == inlink->channels) s->hdcd_detected = 1;

this looks like 2 unrelated changes
one is improving documentation the other is changing ths detect code
can you split these in 2 patches ?

thx


[]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The bravest are surely those who have the clearest vision
of what is before them, glory and danger alike, and yet
notwithstanding go out to meet it. -- Thucydides


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


Re: [FFmpeg-devel] [PATCH] tests/fate: add dnxhr encoding tests

2016-07-23 Thread Mark Reid
On Sat, Jul 23, 2016 at 2:12 PM, Michael Niedermayer
 wrote:
> On Sat, Jul 23, 2016 at 12:38:33PM -0700, Mark Reid wrote:
>> ---
>>  tests/fate/seek.mak   |  2 ++
>>  tests/fate/vcodec.mak | 22 ++-
>>  tests/ref/seek/vsynth_lena-dnxhd-4k-hr-lb | 40 
>> +++
>>  tests/ref/vsynth/vsynth1-dnxhd-2k-hr-hq   |  4 +++
>>  tests/ref/vsynth/vsynth1-dnxhd-4k-hr-lb   |  4 +++
>>  tests/ref/vsynth/vsynth1-dnxhd-720p-hr-lb |  4 +++
>>  tests/ref/vsynth/vsynth1-dnxhd-uhd-hr-sq  |  4 +++
>>  tests/ref/vsynth/vsynth2-dnxhd-2k-hr-hq   |  4 +++
>>  tests/ref/vsynth/vsynth2-dnxhd-4k-hr-lb   |  4 +++
>>  tests/ref/vsynth/vsynth2-dnxhd-720p-hr-lb |  4 +++
>>  tests/ref/vsynth/vsynth2-dnxhd-uhd-hr-sq  |  4 +++
>>  tests/ref/vsynth/vsynth3-dnxhd-2k-hr-hq   |  4 +++
>>  tests/ref/vsynth/vsynth3-dnxhd-4k-hr-lb   |  4 +++
>>  tests/ref/vsynth/vsynth3-dnxhd-720p-hr-lb |  4 +++
>>  tests/ref/vsynth/vsynth3-dnxhd-uhd-hr-sq  |  4 +++
>>  tests/ref/vsynth/vsynth_lena-dnxhd-2k-hr-hq   |  4 +++
>>  tests/ref/vsynth/vsynth_lena-dnxhd-4k-hr-lb   |  4 +++
>>  tests/ref/vsynth/vsynth_lena-dnxhd-720p-hr-lb |  4 +++
>>  tests/ref/vsynth/vsynth_lena-dnxhd-uhd-hr-sq  |  4 +++
>>  19 files changed, 127 insertions(+), 1 deletion(-)
>>  create mode 100644 tests/ref/seek/vsynth_lena-dnxhd-4k-hr-lb
>>  create mode 100644 tests/ref/vsynth/vsynth1-dnxhd-2k-hr-hq
>>  create mode 100644 tests/ref/vsynth/vsynth1-dnxhd-4k-hr-lb
>>  create mode 100644 tests/ref/vsynth/vsynth1-dnxhd-720p-hr-lb
>>  create mode 100644 tests/ref/vsynth/vsynth1-dnxhd-uhd-hr-sq
>>  create mode 100644 tests/ref/vsynth/vsynth2-dnxhd-2k-hr-hq
>>  create mode 100644 tests/ref/vsynth/vsynth2-dnxhd-4k-hr-lb
>>  create mode 100644 tests/ref/vsynth/vsynth2-dnxhd-720p-hr-lb
>>  create mode 100644 tests/ref/vsynth/vsynth2-dnxhd-uhd-hr-sq
>>  create mode 100644 tests/ref/vsynth/vsynth3-dnxhd-2k-hr-hq
>>  create mode 100644 tests/ref/vsynth/vsynth3-dnxhd-4k-hr-lb
>>  create mode 100644 tests/ref/vsynth/vsynth3-dnxhd-720p-hr-lb
>>  create mode 100644 tests/ref/vsynth/vsynth3-dnxhd-uhd-hr-sq
>>  create mode 100644 tests/ref/vsynth/vsynth_lena-dnxhd-2k-hr-hq
>>  create mode 100644 tests/ref/vsynth/vsynth_lena-dnxhd-4k-hr-lb
>>  create mode 100644 tests/ref/vsynth/vsynth_lena-dnxhd-720p-hr-lb
>>  create mode 100644 tests/ref/vsynth/vsynth_lena-dnxhd-uhd-hr-sq
>
> fails on x86-32
> no idea if this is caused by dnxhd or some other code
>
> TESTvsynth3-dnxhd-2k-hr-hq
> --- /home/michael/ffmpeg-git/ffmpeg/tests/ref/vsynth/vsynth3-dnxhd-2k-hr-hq   
>   2016-07-23 21:50:57.277864090 +0200
> +++ tests/data/fate/vsynth3-dnxhd-2k-hr-hq  2016-07-23 22:40:40.537926940 
> +0200
> @@ -1,4 +1,4 @@
>  fa0cc58e64c981a45d1c6d667ba4e584 
> *tests/data/fate/vsynth3-dnxhd-2k-hr-hq.dnxhd
>  4894720 tests/data/fate/vsynth3-dnxhd-2k-hr-hq.dnxhd
> -117bd8737ca7d6e8bbd5ca13e7b6e7c6 
> *tests/data/fate/vsynth3-dnxhd-2k-hr-hq.out.rawvideo
> -stddev:7.81 PSNR: 30.27 MAXDIFF:   61 bytes:86700/ 8670
> +6f8bc7f1281c89ba8d279fc85e181a53 
> *tests/data/fate/vsynth3-dnxhd-2k-hr-hq.out.rawvideo
> +stddev:7.83 PSNR: 30.25 MAXDIFF:   61 bytes:86700/ 8670
> Test vsynth3-dnxhd-2k-hr-hq failed. Look at 
> tests/data/fate/vsynth3-dnxhd-2k-hr-hq.err for details.
> make: *** [fate-vsynth3-dnxhd-2k-hr-hq] Error 1
>

I think I need to add a bitexact flag in there somewhere, I'll take a
look and send a new patch.

> [...]
> --
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> No snowflake in an avalanche ever feels responsible. -- Voltaire
>
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] lavc: add mpeg4 mediacodec decoder

2016-07-23 Thread Michael Niedermayer
On Sat, Jul 23, 2016 at 11:21:20PM +0200, Thomas Volkert wrote:
> From: Thomas Volkert 
> 
> ---
>  libavcodec/Makefile  |   1 +
>  libavcodec/allcodecs.c   |   1 +
>  libavcodec/mediacodecdec_mpeg4.c | 239 
> +++
>  3 files changed, 241 insertions(+)
>  create mode 100644 libavcodec/mediacodecdec_mpeg4.c

fails to build:
make distclean ; ./configure  && make -j12
LD  ffmpeg_g
LD  ffplay_g
LD  ffprobe_g
LD  ffserver_g
libavcodec/libavcodec.a(mediacodecdec_mpeg4.o): In function 
`mediacodec_decode_flush':
libavcodec/mediacodecdec_mpeg4.c:224: undefined reference to 
`ff_mediacodec_dec_flush'
libavcodec/libavcodec.a(mediacodecdec_mpeg4.o): In function 
`mediacodec_decode_frame':
libavcodec/mediacodecdec_mpeg4.c:160: undefined reference to 
`ff_mediacodec_dec_is_flushing'
libavcodec/libavcodec.a(mediacodecdec_mpeg4.o): In function 
`mediacodec_process_data':
libavcodec/mediacodecdec_mpeg4.c:133: undefined reference to 
`ff_mediacodec_dec_decode'
libavcodec/libavcodec.a(mediacodecdec_mpeg4.o): In function 
`mediacodec_decode_frame':
libavcodec/mediacodecdec_mpeg4.c:161: undefined reference to 
`ff_mediacodec_dec_flush'
libavcodec/mediacodecdec_mpeg4.c:176: undefined reference to 
`ff_mediacodec_dec_decode'
libavcodec/libavcodec.a(mediacodecdec_mpeg4.o): In function 
`mediacodec_decode_close':
libavcodec/mediacodecdec_mpeg4.c:50: undefined reference to 
`ff_mediacodec_dec_close'
libavcodec/libavcodec.a(mediacodecdec_mpeg4.o): In function 
`mediacodec_decode_init':
libavcodec/mediacodecdec_mpeg4.c:68: undefined reference to 
`ff_AMediaFormat_new'
libavcodec/mediacodecdec_mpeg4.c:75: undefined reference to 
`ff_AMediaFormat_setString'
libavcodec/mediacodecdec_mpeg4.c:76: undefined reference to 
`ff_AMediaFormat_setInt32'
libavcodec/mediacodecdec_mpeg4.c:77: undefined reference to 
`ff_AMediaFormat_setInt32'
libavcodec/mediacodecdec_mpeg4.c:86: undefined reference to 
`ff_mediacodec_dec_init'
libavcodec/mediacodecdec_mpeg4.c:118: undefined reference to 
`ff_AMediaFormat_delete'
collect2: ld returned 1 exit status
make: *** [ffserver_g] Error 1
make: *** Waiting for unfinished jobs
libavcodec/libavcodec.a(mediacodecdec_mpeg4.o): In function 
`mediacodec_decode_flush':
libavcodec/mediacodecdec_mpeg4.c:224: undefined reference to 
`ff_mediacodec_dec_flush'
libavcodec/libavcodec.a(mediacodecdec_mpeg4.o): In function 
`mediacodec_decode_frame':
libavcodec/mediacodecdec_mpeg4.c:160: undefined reference to 
`ff_mediacodec_dec_is_flushing'
libavcodec/libavcodec.a(mediacodecdec_mpeg4.o): In function 
`mediacodec_process_data':
libavcodec/mediacodecdec_mpeg4.c:133: undefined reference to 
`ff_mediacodec_dec_decode'
libavcodec/libavcodec.a(mediacodecdec_mpeg4.o): In function 
`mediacodec_decode_frame':
libavcodec/mediacodecdec_mpeg4.c:161: undefined reference to 
`ff_mediacodec_dec_flush'
libavcodec/mediacodecdec_mpeg4.c:176: undefined reference to 
`ff_mediacodec_dec_decode'
libavcodec/libavcodec.a(mediacodecdec_mpeg4.o): In function 
`mediacodec_decode_close':
libavcodec/mediacodecdec_mpeg4.c:50: undefined reference to 
`ff_mediacodec_dec_close'
libavcodec/libavcodec.a(mediacodecdec_mpeg4.o): In function 
`mediacodec_decode_init':
libavcodec/mediacodecdec_mpeg4.c:68: undefined reference to 
`ff_AMediaFormat_new'
libavcodec/mediacodecdec_mpeg4.c:75: undefined reference to 
`ff_AMediaFormat_setString'
libavcodec/mediacodecdec_mpeg4.c:76: undefined reference to 
`ff_AMediaFormat_setInt32'
libavcodec/mediacodecdec_mpeg4.c:77: undefined reference to 
`ff_AMediaFormat_setInt32'
libavcodec/mediacodecdec_mpeg4.c:86: undefined reference to 
`ff_mediacodec_dec_init'
libavcodec/mediacodecdec_mpeg4.c:118: undefined reference to 
`ff_AMediaFormat_delete'
collect2: ld returned 1 exit status
make: *** [ffprobe_g] Error 1
libavcodec/libavcodec.a(mediacodecdec_mpeg4.o): In function 
`mediacodec_decode_flush':
libavcodec/mediacodecdec_mpeg4.c:224: undefined reference to 
`ff_mediacodec_dec_flush'
libavcodec/libavcodec.a(mediacodecdec_mpeg4.o): In function 
`mediacodec_decode_frame':
libavcodec/mediacodecdec_mpeg4.c:160: undefined reference to 
`ff_mediacodec_dec_is_flushing'
libavcodec/libavcodec.a(mediacodecdec_mpeg4.o): In function 
`mediacodec_process_data':
libavcodec/mediacodecdec_mpeg4.c:133: undefined reference to 
`ff_mediacodec_dec_decode'
libavcodec/libavcodec.a(mediacodecdec_mpeg4.o): In function 
`mediacodec_decode_frame':
libavcodec/mediacodecdec_mpeg4.c:161: undefined reference to 
`ff_mediacodec_dec_flush'
libavcodec/mediacodecdec_mpeg4.c:176: undefined reference to 
`ff_mediacodec_dec_decode'
libavcodec/libavcodec.a(mediacodecdec_mpeg4.o): In function 
`mediacodec_decode_close':
libavcodec/mediacodecdec_mpeg4.c:50: undefined reference to 
`ff_mediacodec_dec_close'
libavcodec/libavcodec.a(mediacodecdec_mpeg4.o): In function 
`mediacodec_decode_init':
libavcodec/mediacodecdec_mpeg4.c:68: undefined reference to 
`ff_AMediaFormat_new'

Re: [FFmpeg-devel] [PATCH] libavcodec/qsvdec.c: Restoring decoding functionality after unsuccessful merge from libav.

2016-07-23 Thread Michael Niedermayer
On Mon, Apr 25, 2016 at 04:13:33PM +0300, Ivan Uskov wrote:
> Hello All,
> 

> After   commit  d30cf57a7b2097b565db02ecfffbdc9c16423d0e  qsv-based  decoding
> aborts  with  crash,  there  are many incorrect places appeared. The attached
> patch fixes the issues but keeps new method of the 'sync' variable allocation
> introduced in commit d30cf57a7b2097b565db02ecfffbdc9c16423d0e.

This text should be in the commit message, not just on the mailing
list

also some native english speaker should review/help with the grammer

thanks

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

It is dangerous to be right in matters on which the established authorities
are wrong. -- Voltaire


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


[FFmpeg-devel] [PATCH] libavformat/rtpdec_asf: zero initialize the AVIOContext struct

2016-07-23 Thread Kacper Michajłow
This fixes crash in avformat_open_input() when accessing
protocol_whitelist field.
---
 libavformat/rtpdec_asf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/rtpdec_asf.c b/libavformat/rtpdec_asf.c
index 8459a51..2c09fda 100644
--- a/libavformat/rtpdec_asf.c
+++ b/libavformat/rtpdec_asf.c
@@ -101,7 +101,7 @@ int ff_wms_parse_sdp_a_line(AVFormatContext *s, const char 
*p)
 {
 int ret = 0;
 if (av_strstart(p, "pgmpu:data:application/vnd.ms.wms-hdr.asfv1;base64,", 
)) {
-AVIOContext pb;
+AVIOContext pb = { 0 };
 RTSPState *rt = s->priv_data;
 AVDictionary *opts = NULL;
 int len = strlen(p) * 6 / 8;
-- 
2.9.2.windows.1

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


Re: [FFmpeg-devel] Questions about Video Memory in qsv decoders

2016-07-23 Thread Michael Niedermayer
On Sat, Jul 23, 2016 at 11:19:59PM +0300, Ivan Uskov wrote:
> Hello 张玉晓,
> 
> Friday, July 22, 2016, 4:10:36 AM, you wrote:
> 
> 张> I have a question when learning ffmpeg qsv decoder and Intel media sdk.
> 
> 张> The intel media sdk suggest to use Video Memory while doing Hardware
> 张> decoding, use System Memory while doing Software decoding.
> 
> 张> FFmpeg only used System Memory to decode with qsv (Intel msdk) in file
> 张> libavcodec/qsvdec.c. Is there any problem when use Video Memory? 
> 
> As qsv modules maintainer I can confirm, yes, there are problems.
> 
> First (objective) problem that in common case there are 3 qsv components
> should be linked by a pipeline through GPU memory: 
> *qsv video decoder
> *qsv vpp filter
> *qsv video encoder
> But current ffmpeg architecture have restrictions to share one common qsv
> session between libavcodec and libavfilter.
> 
> Second  (subjective) problem that nobody in ffmpeg community is interested to
> advance  QSV  codecs. Most of  patches at this year provided by me or by my
> colleagues (including tries to solve issue with GPU memory) were rejected or
> ignored silently. Moreover, if you will try to clone a latest ffmpeg you 
> found qsv
> decoder broken, it crashes at any try of use. The patch to fix it was posted
> by me at April 25 but was ignored.

btw, this patch lacks a review too:
"0618  6:33 zeranoe@gmail.c (2.8K)   └─>[FFmpeg-devel] [PATCH] avcodec/qsv: 
remove MFX_EXTBUFF_CODING_OPTION3"

[...]

-- 
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] lavc: add mpeg4 mediacodec decoder

2016-07-23 Thread Thomas Volkert
From: Thomas Volkert 

---
 libavcodec/Makefile  |   1 +
 libavcodec/allcodecs.c   |   1 +
 libavcodec/mediacodecdec_mpeg4.c | 239 +++
 3 files changed, 241 insertions(+)
 create mode 100644 libavcodec/mediacodecdec_mpeg4.c

diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index abef19e..642cf2a 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -317,6 +317,7 @@ OBJS-$(CONFIG_H264_DECODER)+= h264.o 
h264_cabac.o h264_cavlc.o \
   h2645_parse.o
 OBJS-$(CONFIG_H264_CUVID_DECODER)  += cuvid.o
 OBJS-$(CONFIG_H264_MEDIACODEC_DECODER) += mediacodecdec_h264.o
+OBJS-$(CONFIG_MPEG4_MEDIACODEC_DECODER) += mediacodecdec_mpeg4.o
 OBJS-$(CONFIG_H264_MMAL_DECODER)   += mmaldec.o
 OBJS-$(CONFIG_H264_NVENC_ENCODER)  += nvenc_h264.o
 OBJS-$(CONFIG_NVENC_ENCODER)   += nvenc_h264.o
diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
index 951e199..2d98694 100644
--- a/libavcodec/allcodecs.c
+++ b/libavcodec/allcodecs.c
@@ -239,6 +239,7 @@ void avcodec_register_all(void)
 REGISTER_ENCDEC (MPEG2VIDEO,mpeg2video);
 REGISTER_ENCDEC (MPEG4, mpeg4);
 REGISTER_DECODER(MPEG4_CRYSTALHD,   mpeg4_crystalhd);
+REGISTER_DECODER(MPEG4_MEDIACODEC,  mpeg4_mediacodec);
 REGISTER_DECODER(MPEG4_MMAL,mpeg4_mmal);
 #if FF_API_VDPAU
 REGISTER_DECODER(MPEG4_VDPAU,   mpeg4_vdpau);
diff --git a/libavcodec/mediacodecdec_mpeg4.c b/libavcodec/mediacodecdec_mpeg4.c
new file mode 100644
index 000..7c4559b
--- /dev/null
+++ b/libavcodec/mediacodecdec_mpeg4.c
@@ -0,0 +1,239 @@
+/*
+ * Android MediaCodec MPEG 4 decoder
+ *
+ * Copyright (c) 2016 Thomas Volkert 
+ *
+ * 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
+ */
+
+#include "libavutil/avassert.h"
+#include "libavutil/common.h"
+#include "libavutil/fifo.h"
+
+#include "avcodec.h"
+#include "internal.h"
+#include "mediacodecdec.h"
+#include "mediacodec_wrapper.h"
+
+#define CODEC_MIME "video/mp4v-es"
+
+typedef struct MediaCodecMPEG4DecContext {
+
+MediaCodecDecContext *ctx;
+
+AVBSFContext *bsf;
+
+AVFifoBuffer *fifo;
+
+AVPacket filtered_pkt;
+
+} MediaCodecMPEG4DecContext;
+
+static av_cold int mediacodec_decode_close(AVCodecContext *avctx)
+{
+MediaCodecMPEG4DecContext *s = avctx->priv_data;
+
+ff_mediacodec_dec_close(avctx, s->ctx);
+s->ctx = NULL;
+
+av_fifo_free(s->fifo);
+
+av_bsf_free(>bsf);
+av_packet_unref(>filtered_pkt);
+
+return 0;
+}
+
+static av_cold int mediacodec_decode_init(AVCodecContext *avctx)
+{
+int ret;
+
+FFAMediaFormat *format = NULL;
+MediaCodecMPEG4DecContext *s = avctx->priv_data;
+
+format = ff_AMediaFormat_new();
+if (!format) {
+av_log(avctx, AV_LOG_ERROR, "Failed to create media format\n");
+ret = AVERROR_EXTERNAL;
+goto done;
+}
+
+ff_AMediaFormat_setString(format, "mime", CODEC_MIME);
+ff_AMediaFormat_setInt32(format, "width", avctx->width);
+ff_AMediaFormat_setInt32(format, "height", avctx->height);
+
+s->ctx = av_mallocz(sizeof(*s->ctx));
+if (!s->ctx) {
+av_log(avctx, AV_LOG_ERROR, "Failed to allocate 
MediaCodecDecContext\n");
+ret = AVERROR(ENOMEM);
+goto done;
+}
+
+if ((ret = ff_mediacodec_dec_init(avctx, s->ctx, CODEC_MIME, format)) < 0) 
{
+s->ctx = NULL;
+goto done;
+}
+
+av_log(avctx, AV_LOG_INFO, "MediaCodec started successfully, ret = %d\n", 
ret);
+
+s->fifo = av_fifo_alloc(sizeof(AVPacket));
+if (!s->fifo) {
+ret = AVERROR(ENOMEM);
+goto done;
+}
+
+const AVBitStreamFilter *bsf = av_bsf_get_by_name("mpeg4_unpack_bframes");
+if(!bsf) {
+ret = AVERROR_BSF_NOT_FOUND;
+goto done;
+}
+
+if ((ret = av_bsf_alloc(bsf, >bsf))) {
+goto done;
+}
+
+if (((ret = avcodec_parameters_from_context(s->bsf->par_in, avctx)) < 0) ||
+((ret = av_bsf_init(s->bsf)) < 0)) {
+  goto done;
+}
+
+av_init_packet(>filtered_pkt);
+
+done:
+if (format) {
+ff_AMediaFormat_delete(format);
+}
+
+if (ret < 0) {
+

Re: [FFmpeg-devel] Questions about Video Memory in qsv decoders

2016-07-23 Thread Mark Thompson
On 23/07/16 21:19, Ivan Uskov wrote:
> Second  (subjective) problem that nobody in ffmpeg community is interested to
> advance  QSV  codecs. Most of  patches at this year provided by me or by my
> colleagues (including tries to solve issue with GPU memory) were rejected or
> ignored silently. Moreover, if you will try to clone a latest ffmpeg you 
> found qsv
> decoder broken, it crashes at any try of use. The patch to fix it was posted
> by me at April 25 but was ignored.

As maintainer, it is fine for you to commit patches to areas you maintain if 
there is no response from anyone else.

> If it is acceptable for your purposes I would like to recommend you to look
> libav. The qsv-related modules in libav should be more advanced this time.

Do you have any thoughts on what should be done about this?  Further useful 
patches in the other tine (notably the whole hwcontext series, removing all of 
the hackery around hardware transcode setups) are only going to get harder to 
merge if the code is allowed to diverge.

- Mark

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


Re: [FFmpeg-devel] Questions about Video Memory in qsv decoders

2016-07-23 Thread Michael Niedermayer
On Sat, Jul 23, 2016 at 11:19:59PM +0300, Ivan Uskov wrote:
> Hello 张玉晓,
> 
> Friday, July 22, 2016, 4:10:36 AM, you wrote:
> 
> 张> I have a question when learning ffmpeg qsv decoder and Intel media sdk.
> 
> 张> The intel media sdk suggest to use Video Memory while doing Hardware
> 张> decoding, use System Memory while doing Software decoding.
> 
> 张> FFmpeg only used System Memory to decode with qsv (Intel msdk) in file
> 张> libavcodec/qsvdec.c. Is there any problem when use Video Memory? 
> 
> As qsv modules maintainer I can confirm, yes, there are problems.
> 
> First (objective) problem that in common case there are 3 qsv components
> should be linked by a pipeline through GPU memory: 
> *qsv video decoder
> *qsv vpp filter
> *qsv video encoder
> But current ffmpeg architecture have restrictions to share one common qsv
> session between libavcodec and libavfilter.
> 
> Second  (subjective) problem that nobody in ffmpeg community is interested to
> advance  QSV  codecs. Most of  patches at this year provided by me or by my
> colleagues (including tries to solve issue with GPU memory) were rejected or
> ignored silently. Moreover, if you will try to clone a latest ffmpeg you 
> found qsv
> decoder broken, it crashes at any try of use. The patch to fix it was posted
> by me at April 25 but was ignored.

which patches should be applied to fix the issues ?
can you repost them ?


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

While the State exists there can be no freedom; when there is freedom there
will be no State. -- Vladimir Lenin


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


Re: [FFmpeg-devel] [PATCH] tests/fate: add dnxhr encoding tests

2016-07-23 Thread Michael Niedermayer
On Sat, Jul 23, 2016 at 12:38:33PM -0700, Mark Reid wrote:
> ---
>  tests/fate/seek.mak   |  2 ++
>  tests/fate/vcodec.mak | 22 ++-
>  tests/ref/seek/vsynth_lena-dnxhd-4k-hr-lb | 40 
> +++
>  tests/ref/vsynth/vsynth1-dnxhd-2k-hr-hq   |  4 +++
>  tests/ref/vsynth/vsynth1-dnxhd-4k-hr-lb   |  4 +++
>  tests/ref/vsynth/vsynth1-dnxhd-720p-hr-lb |  4 +++
>  tests/ref/vsynth/vsynth1-dnxhd-uhd-hr-sq  |  4 +++
>  tests/ref/vsynth/vsynth2-dnxhd-2k-hr-hq   |  4 +++
>  tests/ref/vsynth/vsynth2-dnxhd-4k-hr-lb   |  4 +++
>  tests/ref/vsynth/vsynth2-dnxhd-720p-hr-lb |  4 +++
>  tests/ref/vsynth/vsynth2-dnxhd-uhd-hr-sq  |  4 +++
>  tests/ref/vsynth/vsynth3-dnxhd-2k-hr-hq   |  4 +++
>  tests/ref/vsynth/vsynth3-dnxhd-4k-hr-lb   |  4 +++
>  tests/ref/vsynth/vsynth3-dnxhd-720p-hr-lb |  4 +++
>  tests/ref/vsynth/vsynth3-dnxhd-uhd-hr-sq  |  4 +++
>  tests/ref/vsynth/vsynth_lena-dnxhd-2k-hr-hq   |  4 +++
>  tests/ref/vsynth/vsynth_lena-dnxhd-4k-hr-lb   |  4 +++
>  tests/ref/vsynth/vsynth_lena-dnxhd-720p-hr-lb |  4 +++
>  tests/ref/vsynth/vsynth_lena-dnxhd-uhd-hr-sq  |  4 +++
>  19 files changed, 127 insertions(+), 1 deletion(-)
>  create mode 100644 tests/ref/seek/vsynth_lena-dnxhd-4k-hr-lb
>  create mode 100644 tests/ref/vsynth/vsynth1-dnxhd-2k-hr-hq
>  create mode 100644 tests/ref/vsynth/vsynth1-dnxhd-4k-hr-lb
>  create mode 100644 tests/ref/vsynth/vsynth1-dnxhd-720p-hr-lb
>  create mode 100644 tests/ref/vsynth/vsynth1-dnxhd-uhd-hr-sq
>  create mode 100644 tests/ref/vsynth/vsynth2-dnxhd-2k-hr-hq
>  create mode 100644 tests/ref/vsynth/vsynth2-dnxhd-4k-hr-lb
>  create mode 100644 tests/ref/vsynth/vsynth2-dnxhd-720p-hr-lb
>  create mode 100644 tests/ref/vsynth/vsynth2-dnxhd-uhd-hr-sq
>  create mode 100644 tests/ref/vsynth/vsynth3-dnxhd-2k-hr-hq
>  create mode 100644 tests/ref/vsynth/vsynth3-dnxhd-4k-hr-lb
>  create mode 100644 tests/ref/vsynth/vsynth3-dnxhd-720p-hr-lb
>  create mode 100644 tests/ref/vsynth/vsynth3-dnxhd-uhd-hr-sq
>  create mode 100644 tests/ref/vsynth/vsynth_lena-dnxhd-2k-hr-hq
>  create mode 100644 tests/ref/vsynth/vsynth_lena-dnxhd-4k-hr-lb
>  create mode 100644 tests/ref/vsynth/vsynth_lena-dnxhd-720p-hr-lb
>  create mode 100644 tests/ref/vsynth/vsynth_lena-dnxhd-uhd-hr-sq

fails on x86-32
no idea if this is caused by dnxhd or some other code

TESTvsynth3-dnxhd-2k-hr-hq
--- /home/michael/ffmpeg-git/ffmpeg/tests/ref/vsynth/vsynth3-dnxhd-2k-hr-hq 
2016-07-23 21:50:57.277864090 +0200
+++ tests/data/fate/vsynth3-dnxhd-2k-hr-hq  2016-07-23 22:40:40.537926940 
+0200
@@ -1,4 +1,4 @@
 fa0cc58e64c981a45d1c6d667ba4e584 *tests/data/fate/vsynth3-dnxhd-2k-hr-hq.dnxhd
 4894720 tests/data/fate/vsynth3-dnxhd-2k-hr-hq.dnxhd
-117bd8737ca7d6e8bbd5ca13e7b6e7c6 
*tests/data/fate/vsynth3-dnxhd-2k-hr-hq.out.rawvideo
-stddev:7.81 PSNR: 30.27 MAXDIFF:   61 bytes:86700/ 8670
+6f8bc7f1281c89ba8d279fc85e181a53 
*tests/data/fate/vsynth3-dnxhd-2k-hr-hq.out.rawvideo
+stddev:7.83 PSNR: 30.25 MAXDIFF:   61 bytes:86700/ 8670
Test vsynth3-dnxhd-2k-hr-hq failed. Look at 
tests/data/fate/vsynth3-dnxhd-2k-hr-hq.err for details.
make: *** [fate-vsynth3-dnxhd-2k-hr-hq] Error 1

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

No snowflake in an avalanche ever feels responsible. -- Voltaire


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


Re: [FFmpeg-devel] [PATCH] libavcodec/qsvdec.c: Restoring decoding functionality after unsuccessful merge from libav.

2016-07-23 Thread Mark Thompson
On 23/07/16 20:33, Ivan Uskov wrote:
> If  you are use qsv, I would like to recommend to roll-back to version before
> d30cf57a7b2097b565db02ecfffbdc9c16423d0e
> Really  the  d30cf57a7b2097b565db02ecfffbdc9c16423d0e is useless and only
> makes code complex and work slow, the sync variable is not mandatory to be
> allocated  on  heap  at  all.  libav  guys  did a big mistake when have added
> such "feature".

Are you sure that works correctly with all streams, maybe one with some sort of 
delay?  It looks like you can add multiple things to the fifo in one call and 
but then only ever remove one, so using the stack to hold them across 
invocations is not appropriate (though failure may be very subtle).

(Note that I'm not sufficiently familiar with Media SDK to confidently assert 
anything about how this code should behave, so please don't read too much into 
what I say.)

In general I think if you are happy that the previous implementation in ffmpeg 
was correct then please do revert, because the code as it is now is completely 
broken.

Thanks,

- Mark

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


Re: [FFmpeg-devel] Questions about Video Memory in qsv decoders

2016-07-23 Thread Ivan Uskov
Hello 张玉晓,

Friday, July 22, 2016, 4:10:36 AM, you wrote:

张> I have a question when learning ffmpeg qsv decoder and Intel media sdk.

张> The intel media sdk suggest to use Video Memory while doing Hardware
张> decoding, use System Memory while doing Software decoding.

张> FFmpeg only used System Memory to decode with qsv (Intel msdk) in file
张> libavcodec/qsvdec.c. Is there any problem when use Video Memory? 

As qsv modules maintainer I can confirm, yes, there are problems.

First (objective) problem that in common case there are 3 qsv components
should be linked by a pipeline through GPU memory: 
*qsv video decoder
*qsv vpp filter
*qsv video encoder
But current ffmpeg architecture have restrictions to share one common qsv
session between libavcodec and libavfilter.

Second  (subjective) problem that nobody in ffmpeg community is interested to
advance  QSV  codecs. Most of  patches at this year provided by me or by my
colleagues (including tries to solve issue with GPU memory) were rejected or
ignored silently. Moreover, if you will try to clone a latest ffmpeg you found 
qsv
decoder broken, it crashes at any try of use. The patch to fix it was posted
by me at April 25 but was ignored.

If it is acceptable for your purposes I would like to recommend you to look
libav. The qsv-related modules in libav should be more advanced this time.


-- 
Best regards,
 Ivanmailto:ivan.us...@nablet.com

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


Re: [FFmpeg-devel] [PATCH v5 0/2] libavformat/movenc: add dnxhr compatibility for apple players

2016-07-23 Thread Mark Reid
On Sat, Jul 23, 2016 at 5:08 AM, Michael Niedermayer
 wrote:
> On Fri, Jul 22, 2016 at 01:30:13PM -0700, Mark Reid wrote:
>> changes since v4:
>> * use profile to set codec tag
>>
>> to test
>> ffmpeg -i lb_uhd.mxf -vcodec copy out.mov
>>
>> here are some samples:
>> https://dl.dropboxusercontent.com/u/170952/ffmpeg_samples/mxf/UHD/lb_uhd.mxf
>> https://dl.dropboxusercontent.com/u/170952/ffmpeg_samples/mxf/UHD/hqx_uhd.mxf
>
> can somethig of this be turned into a small fate test ?
>
yes, I'll send a patch.
> [...]
> --
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> The real ebay dictionary, page 3
> "Rare item" - "Common item with rare defect or maybe just a lie"
> "Professional" - "'Toy' made in china, not functional except as doorstop"
> "Experts will know" - "The seller hopes you are not an expert"
>
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avcodec/alsdec: implement floating point decoding

2016-07-23 Thread Umair Khan
HI,

On Fri, Jul 22, 2016 at 9:19 PM, Michael Niedermayer
 wrote:
> On Fri, Jul 22, 2016 at 06:22:30PM +0530, Umair Khan wrote:
>> On Thu, Jul 21, 2016 at 6:18 PM, Michael Niedermayer
>>  wrote:
>> > On Sun, Jul 17, 2016 at 12:06:03AM +0530, Umair Khan wrote:
> [...]
>> >> +static int decode_string(MLZDict *dict, unsigned char *buff, int 
>> >> string_code, int *first_char_code, unsigned long bufsize) {
>> >> +unsigned long count, offset;
>> >> +int current_code, parent_code, tmp_code;
>> >> +
>> >> +count= 0;
>> >> +current_code = string_code;
>> >> +*first_char_code = CODE_UNSET;
>> >> +
>> >> +while (count < bufsize) {
>> >> +switch (current_code) {
>> >> +case CODE_UNSET:
>> >> +return count;
>> >> +break;
>> >> +default:
>> >> +if (current_code < FIRST_CODE) {
>> >> +*first_char_code = current_code;
>> >> +buff[0] = current_code;
>> >> +count++;
>> >> +return count;
>> >> +} else {
>> >> +offset  = dict[current_code].match_len - 1;
>> >> +tmp_code = dict[current_code].char_code;
>> >> +buff[offset] = tmp_code;
>> >> +count++;
>> >> +}
>> >> +current_code = dict[current_code].parent_code;
>> >> +if ((current_code < 0) || (current_code > (DIC_INDEX_MAX - 
>> >> 1))) {
>> >
>> >> +av_log(NULL, AV_LOG_ERROR, "MLZ dic index error.\n");
>> >
>> > it would be ideal if all av_log() would have a context instead of NULL
>>
>> How to go ahead with this? Should I create MLZContext or something? If
>> yes, could you please tell how?
>
> possible or you pass a void *context

Updated patch.

-Umair


0001-avcodec-alsdec-implement-floating-point-decoding.patch
Description: Binary data
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] libavformat/rtpdec_asf: zero initialize the AVIOContext struct

2016-07-23 Thread Kacper Michajłow
This fixes crash in avformat_open_input() when accessing
protocol_whitelist field.
---
 libavformat/rtpdec_asf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/rtpdec_asf.c b/libavformat/rtpdec_asf.c
index 8459a51..e344376 100644
--- a/libavformat/rtpdec_asf.c
+++ b/libavformat/rtpdec_asf.c
@@ -101,7 +101,7 @@ int ff_wms_parse_sdp_a_line(AVFormatContext *s, const char 
*p)
 {
 int ret = 0;
 if (av_strstart(p, "pgmpu:data:application/vnd.ms.wms-hdr.asfv1;base64,", 
)) {
-AVIOContext pb;
+AVIOContext pb = {};
 RTSPState *rt = s->priv_data;
 AVDictionary *opts = NULL;
 int len = strlen(p) * 6 / 8;
-- 
2.9.2.windows.1

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


[FFmpeg-devel] [PATCH] libavutil/opt: Small changes in example.

2016-07-23 Thread Kacper Michajłow
Fix const corectness and zero init the struct. This example code would actually 
crash when initializing string.
---
 libavutil/opt.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavutil/opt.h b/libavutil/opt.h
index 9a76a47..9430b98 100644
--- a/libavutil/opt.h
+++ b/libavutil/opt.h
@@ -58,7 +58,7 @@
  * The following example illustrates an AVOptions-enabled struct:
  * @code
  * typedef struct test_struct {
- * AVClass *class;
+ * const AVClass *class;
  * int  int_opt;
  * char*str_opt;
  * uint8_t *bin_opt;
@@ -96,7 +96,7 @@
  * @code
  * test_struct *alloc_test_struct(void)
  * {
- * test_struct *ret = av_malloc(sizeof(*ret));
+ * test_struct *ret = av_mallocz(sizeof(*ret));
  * ret->class = _class;
  * av_opt_set_defaults(ret);
  * return ret;
-- 
2.9.2.windows.1

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


[FFmpeg-devel] [PATCH] tests/fate: add dnxhr encoding tests

2016-07-23 Thread Mark Reid
---
 tests/fate/seek.mak   |  2 ++
 tests/fate/vcodec.mak | 22 ++-
 tests/ref/seek/vsynth_lena-dnxhd-4k-hr-lb | 40 +++
 tests/ref/vsynth/vsynth1-dnxhd-2k-hr-hq   |  4 +++
 tests/ref/vsynth/vsynth1-dnxhd-4k-hr-lb   |  4 +++
 tests/ref/vsynth/vsynth1-dnxhd-720p-hr-lb |  4 +++
 tests/ref/vsynth/vsynth1-dnxhd-uhd-hr-sq  |  4 +++
 tests/ref/vsynth/vsynth2-dnxhd-2k-hr-hq   |  4 +++
 tests/ref/vsynth/vsynth2-dnxhd-4k-hr-lb   |  4 +++
 tests/ref/vsynth/vsynth2-dnxhd-720p-hr-lb |  4 +++
 tests/ref/vsynth/vsynth2-dnxhd-uhd-hr-sq  |  4 +++
 tests/ref/vsynth/vsynth3-dnxhd-2k-hr-hq   |  4 +++
 tests/ref/vsynth/vsynth3-dnxhd-4k-hr-lb   |  4 +++
 tests/ref/vsynth/vsynth3-dnxhd-720p-hr-lb |  4 +++
 tests/ref/vsynth/vsynth3-dnxhd-uhd-hr-sq  |  4 +++
 tests/ref/vsynth/vsynth_lena-dnxhd-2k-hr-hq   |  4 +++
 tests/ref/vsynth/vsynth_lena-dnxhd-4k-hr-lb   |  4 +++
 tests/ref/vsynth/vsynth_lena-dnxhd-720p-hr-lb |  4 +++
 tests/ref/vsynth/vsynth_lena-dnxhd-uhd-hr-sq  |  4 +++
 19 files changed, 127 insertions(+), 1 deletion(-)
 create mode 100644 tests/ref/seek/vsynth_lena-dnxhd-4k-hr-lb
 create mode 100644 tests/ref/vsynth/vsynth1-dnxhd-2k-hr-hq
 create mode 100644 tests/ref/vsynth/vsynth1-dnxhd-4k-hr-lb
 create mode 100644 tests/ref/vsynth/vsynth1-dnxhd-720p-hr-lb
 create mode 100644 tests/ref/vsynth/vsynth1-dnxhd-uhd-hr-sq
 create mode 100644 tests/ref/vsynth/vsynth2-dnxhd-2k-hr-hq
 create mode 100644 tests/ref/vsynth/vsynth2-dnxhd-4k-hr-lb
 create mode 100644 tests/ref/vsynth/vsynth2-dnxhd-720p-hr-lb
 create mode 100644 tests/ref/vsynth/vsynth2-dnxhd-uhd-hr-sq
 create mode 100644 tests/ref/vsynth/vsynth3-dnxhd-2k-hr-hq
 create mode 100644 tests/ref/vsynth/vsynth3-dnxhd-4k-hr-lb
 create mode 100644 tests/ref/vsynth/vsynth3-dnxhd-720p-hr-lb
 create mode 100644 tests/ref/vsynth/vsynth3-dnxhd-uhd-hr-sq
 create mode 100644 tests/ref/vsynth/vsynth_lena-dnxhd-2k-hr-hq
 create mode 100644 tests/ref/vsynth/vsynth_lena-dnxhd-4k-hr-lb
 create mode 100644 tests/ref/vsynth/vsynth_lena-dnxhd-720p-hr-lb
 create mode 100644 tests/ref/vsynth/vsynth_lena-dnxhd-uhd-hr-sq

diff --git a/tests/fate/seek.mak b/tests/fate/seek.mak
index f120f56..b831cf8 100644
--- a/tests/fate/seek.mak
+++ b/tests/fate/seek.mak
@@ -64,6 +64,7 @@ FATE_SEEK_VSYNTH_LENA-$(call ENCDEC, ASV1,  AVI) 
+= asv1
 FATE_SEEK_VSYNTH_LENA-$(call ENCDEC, ASV2,  AVI) += asv2
 FATE_SEEK_VSYNTH_LENA-$(call ENCDEC, DNXHD, DNXHD)   += dnxhd-720p
 FATE_SEEK_VSYNTH_LENA-$(call ENCDEC, DNXHD, DNXHD)   += dnxhd-720p-rd
+FATE_SEEK_VSYNTH_LENA-$(call ENCDEC, DNXHD, DNXHD)   += dnxhd-4k-hr-lb
 FATE_SEEK_VSYNTH_LENA-$(call ENCDEC, DNXHD, MOV) += dnxhd-1080i
 FATE_SEEK_VSYNTH_LENA-$(call ENCDEC, DVVIDEO,   DV)  += dv
 FATE_SEEK_VSYNTH_LENA-$(call ENCDEC, DVVIDEO,   DV)  += dv-411
@@ -111,6 +112,7 @@ fate-seek-vsynth_lena-asv2:  SRC = 
fate/vsynth_lena-asv2.avi
 fate-seek-vsynth_lena-dnxhd-1080i:   SRC = fate/vsynth_lena-dnxhd-1080i.mov
 fate-seek-vsynth_lena-dnxhd-720p:SRC = 
fate/vsynth_lena-dnxhd-720p.dnxhd
 fate-seek-vsynth_lena-dnxhd-720p-rd: SRC = 
fate/vsynth_lena-dnxhd-720p.dnxhd
+fate-seek-vsynth_lena-dnxhd-4k-hr-lb:SRC = 
fate/vsynth_lena-dnxhd-4k-hr-lb.dnxhd
 fate-seek-vsynth_lena-dv:SRC = fate/vsynth_lena-dv.dv
 fate-seek-vsynth_lena-dv-411:SRC = fate/vsynth_lena-dv-411.dv
 fate-seek-vsynth_lena-dv-50: SRC = fate/vsynth_lena-dv-50.dv
diff --git a/tests/fate/vcodec.mak b/tests/fate/vcodec.mak
index 0e08894..7148fbc 100644
--- a/tests/fate/vcodec.mak
+++ b/tests/fate/vcodec.mak
@@ -27,7 +27,11 @@ fate-vsynth%-cljr:   ENCOPTS = -strict -1
 
 FATE_VCODEC-$(call ENCDEC, DNXHD, DNXHD) += dnxhd-720p  \
 dnxhd-720p-rd   \
-dnxhd-720p-10bit
+dnxhd-720p-10bit\
+dnxhd-720p-hr-lb\
+dnxhd-4k-hr-lb  \
+dnxhd-uhd-hr-sq \
+dnxhd-2k-hr-hq
 
 FATE_VCODEC-$(call ENCDEC, VC2 DIRAC, MOV) += vc2-420p vc2-420p10 vc2-420p12 \
   vc2-422p vc2-422p10 vc2-422p12 \
@@ -54,6 +58,22 @@ fate-vsynth%-dnxhd-720p-10bit:   ENCOPTS = -s hd720 -b 90M   
   \
-pix_fmt yuv422p10 -frames 5 -qmax 8
 fate-vsynth%-dnxhd-720p-10bit:   FMT = dnxhd
 
+fate-vsynth%-dnxhd-720p-hr-lb: ENCOPTS   = -s hd720 -profile:v dnxhr_lb \
+   -pix_fmt yuv422p -frames 5
+fate-vsynth%-dnxhd-720p-hr-lb: FMT   = dnxhd
+

Re: [FFmpeg-devel] [PATCH] libavcodec/qsvdec.c: Restoring decoding functionality after unsuccessful merge from libav.

2016-07-23 Thread Ivan Uskov
Hello Mark,

Friday, July 15, 2016, 1:37:54 PM, you wrote:

MT> On 15/07/16 07:15, Chao Liu wrote:
>> Ivan Uskov  nablet.com> writes:
>> 
>>>
>>> Hello All,
>>>
>>> After   commit  d30cf57a7b2097b565db02ecfffbdc9c16423d0e  qsv-based  
>> decoding
>>> aborts  with  crash,  there  are many incorrect places appeared. The 
>> attached
>>> patch fixes the issues but keeps new method of the 'sync' variable 
>> allocation
>>> introduced in commit d30cf57a7b2097b565db02ecfffbdc9c16423d0e.
>>>
>>> Please review.
>>>
>> 
>> I had the same crashes. After reading the code, you are certainly right.
>> Why nobody review this commit?

MT> Presumably noone was particularly interested at the time, and the submitter 
did
MT> not pursue it.

MT> Looking at it now, the change looks mostly ok to me.  The error paths could
MT> maybe be cleaned up a bit, but I think that's mostly a preexisting problem. 
 Can
MT> we loop without *sync being set?  If so, removing the av_freep(); 
inside
MT> the loop makes it leak in that case.

MT> A slightly clearer commit message might help too.  Maybe something like:

MT> ---
MT> lavc/qsvdec: Fix decoding following incorrect merge

MT> Decoding was broken by d30cf57a7b2097b565db02ecfffbdc9c16423d0e - the
MT> merge didn't properly handle the sync pointers, so it always
MT> segfaulted after submitting a frame to libmfx.
MT> ---

If  you are use qsv, I would like to recommend to roll-back to version before
d30cf57a7b2097b565db02ecfffbdc9c16423d0e
Really  the  d30cf57a7b2097b565db02ecfffbdc9c16423d0e is useless and only
makes code complex and work slow, the sync variable is not mandatory to be
allocated  on  heap  at  all.  libav  guys  did a big mistake when have added
such "feature".



-- 
Best regards,
 Ivanmailto:ivan.us...@nablet.com

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


Re: [FFmpeg-devel] [PATCH v2 3/7] avformat/tee: Rescale ts using av_packet_rescale_ts

2016-07-23 Thread Marton Balint


On Sun, 17 Jul 2016, Nicolas George wrote:


Le nonidi 29 messidor, an CCXXIV, sebechlebsky...@gmail.com a écrit :

From: Jan Sebechlebsky 

This ensures that AV_NOPTS_VALUE value is handled
correctly.

Signed-off-by: Jan Sebechlebsky 
---
 libavformat/tee.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)


LGTM, good catch.



Thanks, applied.

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


Re: [FFmpeg-devel] libavcodec : add psd image file decoder

2016-07-23 Thread Michael Niedermayer
On Sat, Jul 23, 2016 at 04:37:19PM +0200, Martin Vignali wrote:
> Hello,
> 
> New patch in attach.
> 
> - add support for RLE compression (who can be use by Photoshop and After
> Effects)
> 
> RLE samples can be found here :
> https://we.tl/LCQLqwuvZ4
> 
> - fix trouble with not even width.
> - modification of the probe function, but i'm not sure of mine for this
> - cosmetics fix.
> 
> 
> Comments welcome
> 
> 
> Martin
> Jokyo Images

>  Changelog|1 
>  doc/general.texi |2 
>  libavcodec/Makefile  |1 
>  libavcodec/allcodecs.c   |1 
>  libavcodec/avcodec.h |1 
>  libavcodec/codec_desc.c  |7 
>  libavcodec/psd.c |  395 
> +++
>  libavformat/Makefile |1 
>  libavformat/allformats.c |1 
>  libavformat/img2.c   |1 
>  libavformat/img2dec.c|   25 ++
>  11 files changed, 436 insertions(+)
> f973f04b071009eefd40211d7ccc759a0236d358  
> 0001-libavcodec-add-decoder-for-.psd-image-file.patch
> From 18de7ec132fb1c599a40baa7c1a04ca08134ed7e Mon Sep 17 00:00:00 2001
> From: Martin Vignali 
> Date: Sat, 23 Jul 2016 16:20:07 +0200
> Subject: [PATCH] libavcodec : add decoder for .psd image file.

breaks fate

make: *** [fate-filter-metadata-ebur128] Error 1
--- -   2016-07-23 18:50:11.633752058 +0200
+++ tests/data/fate/probe-format-roundup14142016-07-23 18:50:10.913635588 
+0200
@@ -1 +1 @@
-mpeg
+psd_pipe
Test probe-format-roundup1414 failed. Look at 
tests/data/fate/probe-format-roundup1414.err for details.
make: *** [fate-probe-format-roundup1414] Error 1
--- -   2016-07-23 18:50:11.657384876 +0200
+++ tests/data/fate/probe-format-roundup997 2016-07-23 18:50:10.917635588 
+0200
@@ -1 +1 @@
-mpeg
+psd_pipe
Test probe-format-roundup997 failed. Look at 
tests/data/fate/probe-format-roundup997.err for details.
make: *** [fate-probe-format-roundup997] Error 1
--- -   2016-07-23 18:50:11.667958765 +0200
+++ tests/data/fate/probe-format-roundup13832016-07-23 18:50:10.917635588 
+0200
@@ -1 +1 @@
-mp3
+psd_pipe
Test probe-format-roundup1383 failed. Look at 
tests/data/fate/probe-format-roundup1383.err for details.
make: *** [fate-probe-format-roundup1383] Error 1
make: Target `fate' not remade because of errors.

[...]

-- 
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


Re: [FFmpeg-devel] [PATCH] af_hdcd: Improve HDCD detection

2016-07-23 Thread Burt P.
It does not fix #5727, it only improves the result for the "HDCD
detected" line in the log.

To fix #5727, the code has to be changed to process both channels at
once, so that target_gain of both channels is known for every
processed sample, or at least every segment between HDCD packets. I am
attempting this.

On Fri, Jul 22, 2016 at 1:49 AM, Carl Eugen Hoyos  wrote:
> Burt P  gmail.com> writes:
>
>> HDCD is only "detected" if a valid code is active in both
>> channels simultaneously
>
> Does your patch fix ticket #5727?
> You don't mention this in the ticket...
>
> Thank you for looking at this, Carl Eugen
>
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel



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


Re: [FFmpeg-devel] libavcodec : add psd image file decoder

2016-07-23 Thread Martin Vignali
Hello,

New patch in attach.

- add support for RLE compression (who can be use by Photoshop and After
Effects)

RLE samples can be found here :
https://we.tl/LCQLqwuvZ4

- fix trouble with not even width.
- modification of the probe function, but i'm not sure of mine for this
- cosmetics fix.


Comments welcome


Martin
Jokyo Images
From 18de7ec132fb1c599a40baa7c1a04ca08134ed7e Mon Sep 17 00:00:00 2001
From: Martin Vignali 
Date: Sat, 23 Jul 2016 16:20:07 +0200
Subject: [PATCH] libavcodec : add decoder for .psd image file.

Decode the Image Data Section (who contain merge picture).
Support RGB/A and Grayscale/A in 8bits and 16 bits by channel.
Support uncompress and rle compression in Image Data Section
---
 Changelog|   1 +
 doc/general.texi |   2 +
 libavcodec/Makefile  |   1 +
 libavcodec/allcodecs.c   |   1 +
 libavcodec/avcodec.h |   1 +
 libavcodec/codec_desc.c  |   7 +
 libavcodec/psd.c | 395 +++
 libavformat/Makefile |   1 +
 libavformat/allformats.c |   1 +
 libavformat/img2.c   |   1 +
 libavformat/img2dec.c|  25 +++
 11 files changed, 436 insertions(+)
 create mode 100644 libavcodec/psd.c

diff --git a/Changelog b/Changelog
index 99cdb80..97b11f1 100644
--- a/Changelog
+++ b/Changelog
@@ -3,6 +3,7 @@ releases are sorted from youngest to oldest.
 
 version :
 
+- Psd Decoder
 
 version 3.1:
 - DXVA2-accelerated HEVC Main10 decoding
diff --git a/doc/general.texi b/doc/general.texi
index 4db209f..06775f4 100644
--- a/doc/general.texi
+++ b/doc/general.texi
@@ -577,6 +577,8 @@ following image formats are supported:
 @item PNG  @tab X @tab X
 @item PPM  @tab X @tab X
 @tab Portable PixelMap image
+@item PSD  @tab   @tab X
+@tab Photoshop
 @item PTX  @tab   @tab X
 @tab V.Flash PTX format
 @item SGI  @tab X @tab X
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index fd0d1f0..913b4a8 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -456,6 +456,7 @@ OBJS-$(CONFIG_PRORES_LGPL_DECODER) += proresdec_lgpl.o proresdsp.o proresdat
 OBJS-$(CONFIG_PRORES_ENCODER)  += proresenc_anatoliy.o
 OBJS-$(CONFIG_PRORES_AW_ENCODER)   += proresenc_anatoliy.o
 OBJS-$(CONFIG_PRORES_KS_ENCODER)   += proresenc_kostya.o proresdata.o
+OBJS-$(CONFIG_PSD_DECODER) += psd.o
 OBJS-$(CONFIG_PTX_DECODER) += ptx.o
 OBJS-$(CONFIG_QCELP_DECODER)   += qcelpdec.o \
   celp_filters.o acelp_vectors.o \
diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
index 54efaad..458f603 100644
--- a/libavcodec/allcodecs.c
+++ b/libavcodec/allcodecs.c
@@ -278,6 +278,7 @@ void avcodec_register_all(void)
 REGISTER_ENCODER(PRORES_AW, prores_aw);
 REGISTER_ENCODER(PRORES_KS, prores_ks);
 REGISTER_DECODER(PRORES_LGPL,   prores_lgpl);
+REGISTER_DECODER(PSD,   psd);
 REGISTER_DECODER(PTX,   ptx);
 REGISTER_DECODER(QDRAW, qdraw);
 REGISTER_DECODER(QPEG,  qpeg);
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 39713ed..75a9970 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -409,6 +409,7 @@ enum AVCodecID {
 AV_CODEC_ID_MAGICYUV,
 AV_CODEC_ID_SHEERVIDEO,
 AV_CODEC_ID_YLC,
+AV_CODEC_ID_PSD,
 
 /* 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 9d94b72..427553c 100644
--- a/libavcodec/codec_desc.c
+++ b/libavcodec/codec_desc.c
@@ -1425,6 +1425,13 @@ static const AVCodecDescriptor codec_descriptors[] = {
 .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS,
 },
 {
+.id= AV_CODEC_ID_PSD,
+.type  = AVMEDIA_TYPE_VIDEO,
+.name  = "psd",
+.long_name = NULL_IF_CONFIG_SMALL("Photoshop file"),
+.props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS,
+},
+{
 .id= AV_CODEC_ID_PTX,
 .type  = AVMEDIA_TYPE_VIDEO,
 .name  = "ptx",
diff --git a/libavcodec/psd.c b/libavcodec/psd.c
new file mode 100644
index 000..5e5fc77
--- /dev/null
+++ b/libavcodec/psd.c
@@ -0,0 +1,395 @@
+/*
+ * Photoshop (.psd) image decoder
+ * Copyright (c) 2016 Jokyo Images
+ *
+ * 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
+ * 

Re: [FFmpeg-devel] [PATCH] avformat/matroskadec: return AVERROR(EIO) rather than AVERROR_EOF on parse error

2016-07-23 Thread James Almer
On 7/23/2016 5:50 AM, Nicolas George wrote:
> Le quintidi 5 thermidor, an CCXXIV, Sophia Wang a écrit :
>> Signed-off-by: Sophia Wang 
>> ---
>>  libavformat/matroskadec.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
>> index f3d701f..c536605 100644
>> --- a/libavformat/matroskadec.c
>> +++ b/libavformat/matroskadec.c
>> @@ -3323,7 +3323,7 @@ static int matroska_read_packet(AVFormatContext *s, 
>> AVPacket *pkt)
>>  while (matroska_deliver_packet(matroska, pkt)) {
>>  int64_t pos = avio_tell(matroska->ctx->pb);
>>  if (matroska->done)
>> -return AVERROR_EOF;
>> +return avio_feof(s->pb) ? AVERROR_EOF : AVERROR(EIO);
>>  if (matroska_parse_cluster(matroska) < 0)
>>  matroska_resync(matroska, pos);
>>  }
> 
> This does not seem correct. EIO means something (usually along the lines
> from "you should not unplug your USB stick while watching a file stored on
> it" to "get a new hard drive and hope your backups are up to date"), it is
> not a generic error when nothing else fits; there is AVERROR_UNKNOWN for
> that.

AVERROR(EIO) is used in a lot of demuxers to signal overreads because of
incomplete files, damaged seek tables, etc.

In any case, checking the return value of matroska_resync(matroska, pos)
may be the correct thing to do here instead, since that function is the
one that sets matroska->done to 1, then returns EOF.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 2/2] avformat: parse iTunes gapless information

2016-07-23 Thread James Almer
On 7/23/2016 8:25 AM, Michael Niedermayer wrote:
> On Fri, Jul 22, 2016 at 05:19:14PM -0700, kod...@gmail.com wrote:
>> From: Chris Moeller 
>>
>> ---
>>  libavformat/mp3dec.c | 64 
>> +++-
>>  1 file changed, 63 insertions(+), 1 deletion(-)
>>
>> diff --git a/libavformat/mp3dec.c b/libavformat/mp3dec.c
>> index 56c7f8c..3055e2c 100644
>> --- a/libavformat/mp3dec.c
>> +++ b/libavformat/mp3dec.c
>> @@ -295,6 +295,53 @@ static void mp3_parse_vbri_tag(AVFormatContext *s, 
>> AVStream *st, int64_t base)
>>  }
>>  }
>>  
>> +static void mp3_parse_itunes_tag(AVFormatContext *s, AVStream *st, 
>> MPADecodeHeader *c, int64_t base, int vbrtag_size, unsigned int *size, 
>> uint64_t *duration)
>> +{
>> +uint32_t v;
>> +AVDictionaryEntry *de;
>> +MP3DecContext *mp3 = s->priv_data;
>> +size_t length;
>> +uint32_t zero, start_pad, end_pad;
>> +uint64_t last_eight_frames_offset;
>> +int i;
>> +
>> +if (!s->metadata || !(de = av_dict_get(s->metadata, "iTunSMPB", NULL, 
>> 0)))
>> +  return;
>> +
>> +length = strlen(de->value);
>> +
>> +/* Minimum length is one digit per field plus the whitespace, maximum 
>> length should depend on field type
>> + * There are four fields we need in the first six, the rest are 
>> currently zero padding */
>> +if (length < (12 + 11) || length > (10 * 8 + 2 * 16 + 11))
>> +return;
>> +
> 
>> +if (sscanf(de->value, "%x %x %x %llx %x %llx", , _pad, 
>> _pad, duration, , _eight_frames_offset) < 6) {
> 
> %llx mismatches the type

Also please use the SCN* macros, which work like the PRI* macros from printf.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH v2] avcodec/bsf: Set EOF flag only if pkt == NULL

2016-07-23 Thread Michael Niedermayer
On Fri, Jul 22, 2016 at 10:14:16PM +0200, Nicolas George wrote:
> Le quintidi 5 thermidor, an CCXXIV, sebechlebsky...@gmail.com a écrit :
> > From: Jan Sebechlebsky 
[...]

> and an assert failure is the most sympathetic undefined
> behaviours for developers.

+1

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Avoid a single point of failure, be that a person or equipment.


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


Re: [FFmpeg-devel] [PATCH 4/4] libavcodec/dnxhdenc: add support for dnxhr encoding

2016-07-23 Thread Michael Niedermayer
On Sat, Jul 16, 2016 at 07:37:39PM -0700, Mark Reid wrote:
> ---
>  libavcodec/dnxhddata.c | 31 +++---
>  libavcodec/dnxhddata.h |  1 +
>  libavcodec/dnxhdenc.c  | 85 
> +-
>  libavcodec/dnxhdenc.h  |  5 +++
>  4 files changed, 103 insertions(+), 19 deletions(-)

applied

If you want to maintain this then please post a patch to add yourself
to the MAINTAINERs file

please also add a fate test

Thanks

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

Dictatorship naturally arises out of democracy, and the most aggravated
form of tyranny and slavery out of the most extreme liberty. -- 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 3/4] libavcodec/dnxhdenc: add support for variable mircoblock counts

2016-07-23 Thread Michael Niedermayer
On Sat, Jul 16, 2016 at 07:37:38PM -0700, Mark Reid wrote:
> dnxhr has variable resolution, 8160 is the mb num for 1920x1080
> ---
>  libavcodec/dnxhdenc.c | 41 +++--
>  libavcodec/dnxhdenc.h |  2 +-
>  2 files changed, 24 insertions(+), 19 deletions(-)

applied

thanks

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

Old school: Use the lowest level language in which you can solve the problem
conveniently.
New school: Use the highest level language in which the latest supercomputer
can solve the problem without the user falling asleep waiting.


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


Re: [FFmpeg-devel] [PATCH v5 0/2] libavformat/movenc: add dnxhr compatibility for apple players

2016-07-23 Thread Michael Niedermayer
On Fri, Jul 22, 2016 at 01:30:13PM -0700, Mark Reid wrote:
> changes since v4:
> * use profile to set codec tag
> 
> to test
> ffmpeg -i lb_uhd.mxf -vcodec copy out.mov
> 
> here are some samples:
> https://dl.dropboxusercontent.com/u/170952/ffmpeg_samples/mxf/UHD/lb_uhd.mxf
> https://dl.dropboxusercontent.com/u/170952/ffmpeg_samples/mxf/UHD/hqx_uhd.mxf

can somethig of this be turned into a small fate test ?

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

The real ebay dictionary, page 3
"Rare item" - "Common item with rare defect or maybe just a lie"
"Professional" - "'Toy' made in china, not functional except as doorstop"
"Experts will know" - "The seller hopes you are not an expert"


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


Re: [FFmpeg-devel] [PATCH] tests/fate/dnxhd: add dnxhr prefix tests

2016-07-23 Thread Michael Niedermayer
On Wed, Jul 20, 2016 at 06:15:38PM -0700, Mark Reid wrote:
> The data offset value in the prefix increases as the heights increases.
> This test adds a tests for some common dnxhr heights.
> 
> can somebody add the following test footage to fate/dnxhd?
> https://dl.dropboxusercontent.com/u/170952/fate/dnxhd/prefix-256x1536.dnxhr
> https://dl.dropboxusercontent.com/u/170952/fate/dnxhd/prefix-256x1716.dnxhr
> https://dl.dropboxusercontent.com/u/170952/fate/dnxhd/prefix-256x2048.dnxhr
> https://dl.dropboxusercontent.com/u/170952/fate/dnxhd/prefix-256x2160.dnxhr
> https://dl.dropboxusercontent.com/u/170952/fate/dnxhd/prefix-256x3212.dnxhr
> 
> ---
>  tests/fate/dnxhd.mak | 12 +++-
>  tests/ref/fate/dnxhr-prefix1 | 10 ++
>  tests/ref/fate/dnxhr-prefix2 | 10 ++
>  tests/ref/fate/dnxhr-prefix3 | 10 ++
>  tests/ref/fate/dnxhr-prefix4 | 10 ++
>  tests/ref/fate/dnxhr-prefix5 | 10 ++
>  6 files changed, 61 insertions(+), 1 deletion(-)
>  create mode 100644 tests/ref/fate/dnxhr-prefix1
>  create mode 100644 tests/ref/fate/dnxhr-prefix2
>  create mode 100644 tests/ref/fate/dnxhr-prefix3
>  create mode 100644 tests/ref/fate/dnxhr-prefix4
>  create mode 100644 tests/ref/fate/dnxhr-prefix5

applied

thx

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

During times of universal deceit, telling the truth becomes a
revolutionary act. -- George Orwell


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


Re: [FFmpeg-devel] [PATCH v5 2/2] libavformat/movenc: add dnxhr compatibility for apple players

2016-07-23 Thread Michael Niedermayer
On Fri, Jul 22, 2016 at 01:30:15PM -0700, Mark Reid wrote:
> ---
>  libavformat/movenc.c | 31 ++-
>  1 file changed, 26 insertions(+), 5 deletions(-)

applied

thx

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

Awnsering whenever a program halts or runs forever is
On a turing machine, in general impossible (turings halting problem).
On any real computer, always possible as a real computer has a finite number
of states N, and will either halt in less than N cycles or never halt.


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


Re: [FFmpeg-devel] [PATCH 2/2] avformat: parse iTunes gapless information

2016-07-23 Thread Nicolas George
Le sextidi 6 thermidor, an CCXXIV, Michael Niedermayer a écrit :
> > +uint32_t zero, start_pad, end_pad;
> > +uint64_t last_eight_frames_offset;

> > +if (sscanf(de->value, "%x %x %x %llx %x %llx", , _pad, 
> > _pad, duration, , _eight_frames_offset) < 6) {

> %llx mismatches the type

The other ones too, although it is less visible since uint32_t is usually
just unsigned int.

Regards,

-- 
  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 2/2] avformat: parse iTunes gapless information

2016-07-23 Thread Michael Niedermayer
On Fri, Jul 22, 2016 at 05:19:14PM -0700, kod...@gmail.com wrote:
> From: Chris Moeller 
> 
> ---
>  libavformat/mp3dec.c | 64 
> +++-
>  1 file changed, 63 insertions(+), 1 deletion(-)
> 
> diff --git a/libavformat/mp3dec.c b/libavformat/mp3dec.c
> index 56c7f8c..3055e2c 100644
> --- a/libavformat/mp3dec.c
> +++ b/libavformat/mp3dec.c
> @@ -295,6 +295,53 @@ static void mp3_parse_vbri_tag(AVFormatContext *s, 
> AVStream *st, int64_t base)
>  }
>  }
>  
> +static void mp3_parse_itunes_tag(AVFormatContext *s, AVStream *st, 
> MPADecodeHeader *c, int64_t base, int vbrtag_size, unsigned int *size, 
> uint64_t *duration)
> +{
> +uint32_t v;
> +AVDictionaryEntry *de;
> +MP3DecContext *mp3 = s->priv_data;
> +size_t length;
> +uint32_t zero, start_pad, end_pad;
> +uint64_t last_eight_frames_offset;
> +int i;
> +
> +if (!s->metadata || !(de = av_dict_get(s->metadata, "iTunSMPB", NULL, 
> 0)))
> +  return;
> +
> +length = strlen(de->value);
> +
> +/* Minimum length is one digit per field plus the whitespace, maximum 
> length should depend on field type
> + * There are four fields we need in the first six, the rest are 
> currently zero padding */
> +if (length < (12 + 11) || length > (10 * 8 + 2 * 16 + 11))
> +return;
> +

> +if (sscanf(de->value, "%x %x %x %llx %x %llx", , _pad, 
> _pad, duration, , _eight_frames_offset) < 6) {

%llx mismatches the type

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

Avoid a single point of failure, be that a person or equipment.


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] avformat: read id3v2 comment tags

2016-07-23 Thread Michael Niedermayer
On Fri, Jul 22, 2016 at 05:59:09PM -0700, kod...@gmail.com wrote:
> From: Chris Moeller 
> 
> ---
>  libavformat/id3v2.c | 44 
>  1 file changed, 44 insertions(+)
> 
> diff --git a/libavformat/id3v2.c b/libavformat/id3v2.c
> index 46b9394..c38c610 100644
> --- a/libavformat/id3v2.c
> +++ b/libavformat/id3v2.c
> @@ -400,6 +400,47 @@ error:
>  }
>  
>  /**
> + * Parse a comment tag.
> + */
> +static void read_comm(AVFormatContext *s, AVIOContext *pb, int taglen,
> +  AVDictionary **metadata)
> +{
> +const char *key = "comment";
> +uint8_t *dst;
> +int encoding, dict_flags = AV_DICT_DONT_OVERWRITE | 
> AV_DICT_DONT_STRDUP_VAL;
> +int language;
> +
> +if (taglen < 4)
> +return;
> +
> +encoding = avio_r8(pb);
> +taglen--;
> +
> +language = avio_rl24(pb);
> +taglen -= 3;
> +
> +if (decode_str(s, pb, encoding, , ) < 0) {
> +av_log(s, AV_LOG_ERROR, "Error reading comment frame, skipped\n");
> +return;
> +}
> +
> +if (dst && dst[0]) {
> +key = (const char *) dst;
> +dict_flags |= AV_DICT_DONT_STRDUP_KEY;
> +}
> +
> +if (decode_str(s, pb, encoding, , ) < 0) {
> +av_log(s, AV_LOG_ERROR, "Error reading comment frame, skipped\n");
> +if (dict_flags & AV_DICT_DONT_STRDUP_KEY)
> +av_freep((void*));
> +return;
> +}
> +
> +if (dst)
> +av_dict_set(metadata, key, (const char *) dst, dict_flags);
> +}
> +
> +/**
>   * Parse GEOB tag into a ID3v2ExtraMetaGEOB struct.
>   */
>  static void read_geobtag(AVFormatContext *s, AVIOContext *pb, int taglen,

> @@ -905,6 +946,9 @@ static void 
id3v2_parse(AVIOContext *pb, AVDictionary **metadata,
>  
>  av_log(s, AV_LOG_WARNING, "Skipping %s ID3v2 frame %s.\n", type, 
> tag);
>  avio_skip(pb, tlen);
> +/* check for comment frame */
> +} else if (!memcmp(tag, "COMM", 4)) {
> +read_comm(s, pbx, tlen, metadata);

pbx can be uninitialized here


[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Democracy is the form of government in which you can choose your dictator


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


Re: [FFmpeg-devel] [PATCH 2/2] doc/examples/muxing: Fix packet duration

2016-07-23 Thread Michael Niedermayer
On Fri, Jul 22, 2016 at 10:39:26PM -0300, Gonzalo wrote:
> 
> 
> El 21/07/16 a las 20:02, Michael Niedermayer escribió:
> >On Sun, Jul 17, 2016 at 04:10:39AM +0200, Michael Niedermayer wrote:
> >>Set needed fields in st->codec
> >>
> >>Fixes Ticket5684
> >>
> >>Signed-off-by: Michael Niedermayer 
> >nevcairiel can you comment on this ?
> >is this ok or should i add teh fields to codecpar or do you see some
> >other solution ?
> >
> >[...]
> Ping.  Can you CC nevcairiel, as he may not read this?  The problem
> right now is that ffmpeg has an api that cannot work without
> deprecated warnings.

i would be surprised if he misses this thread but
cc-ing nevcairiel as requested, sorry for th duplicate mail

[...]
-- 
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 ..."


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


Re: [FFmpeg-devel] [PATCH] libavformat/matroskadec: fix unsigned overflow to improve seeking

2016-07-23 Thread Michael Niedermayer
On Thu, Jul 21, 2016 at 12:01:45PM -0700, Chris Cunningham wrote:
> When seeking a file where codec delay is greater than 0, the timecode
> can become negative after offsetting by the codec delay. Failing to cast
> to a signed int64 will cause the check against skip_to_timecode to evaluate
> true for these negative values. This breaks the "skip_to" seek mechanism.
> ---
>  libavformat/matroskadec.c | 5 -
>  1 file changed, 4 insertions(+), 1 deletion(-)

applied

can you create a fate testcase for this ?
(maybe libavformat/tests/seek.c could be used)

i can upload the sample file to the fate-samples

Thanks

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

While the State exists there can be no freedom; when there is freedom there
will be no State. -- Vladimir Lenin


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


Re: [FFmpeg-devel] [PATCH] MAINTAINERS: add myself to the project server

2016-07-23 Thread Michael Niedermayer
On Fri, Jul 22, 2016 at 04:15:20PM +0200, Nikolay Aleksandrov wrote:
> I've been helping out with the project servers' maintenance and migration
> to the new machine hosted in Telepoint's data center in Sofia, BG.
> 
> Signed-off-by: Nikolay Aleksandrov 
> ---
> note: the patch is against the master branch
> 
>  MAINTAINERS | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

applied

thanks

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

Modern terrorism, a quick summary: Need oil, start war with country that
has oil, kill hundread thousand in war. Let country fall into chaos,
be surprised about raise of fundamantalists. Drop more bombs, kill more
people, be surprised about them taking revenge and drop even more bombs
and strip your own citizens of their rights and freedoms. to be continued


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


Re: [FFmpeg-devel] ffbox0 server hosting

2016-07-23 Thread Michael Niedermayer
On Tue, Jul 19, 2016 at 07:32:01PM +0200, Clément Bœsch wrote:
> Hi,
> 
> As stated in previous meeting¹ I'd like to stop paying for ffbox0. This is
> not exactly an issue today for me, but I feel like it could be avoided.
> There was a need for a fast solution a while ago, but it's now long past
> that time (it was about one year ago), and I'd like to be discharged from
> this.
> 
> So on 19th October 2016 (3 months from now), I will close the ffbox0
> subscription.
> 
> Note that this is not only a money problem, it comes with a hosting
> responsibility I'd like to get rid of; I'm thinking notably about the
> abuse complaints I got wrt rtmpdump (because yes, this box is not only for
> the FFmpeg project, but also all kind of other projects I have absolutely
> 0 interest in funding, hosting and taking responsibility for myself).

raz (and me but really raz did 99% of the work) has moved things from
ffbox0 to ffbox0-bg.

About monthly ffbox0 fees, if you want them refunded please submit
a refund request to the ffmpeg-devel ML (see similar ones on the ML
about refunding of travell costs). All refund requests should be easy
search, detect and discussable on the ML ...

If you wish to shutdown ffbox0 in 3 months, would you have time to
go over the other free server & hosting offers we had? It would make
sense for us probably to keep the number of servers we have available
non decreasing so we can move things "easily" in case future need
arises ...

Thanks alot for providing ffbox0 to FFmpeg, MPlayer, rtmpdump, ...
when it was needed

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In a rich man's house there is no place to spit but his face.
-- Diogenes of Sinope


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


Re: [FFmpeg-devel] [PATCH] avformat/matroskadec: return AVERROR(EIO) rather than AVERROR_EOF on parse error

2016-07-23 Thread Nicolas George
Le quintidi 5 thermidor, an CCXXIV, Sophia Wang a écrit :
> Signed-off-by: Sophia Wang 
> ---
>  libavformat/matroskadec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
> index f3d701f..c536605 100644
> --- a/libavformat/matroskadec.c
> +++ b/libavformat/matroskadec.c
> @@ -3323,7 +3323,7 @@ static int matroska_read_packet(AVFormatContext *s, 
> AVPacket *pkt)
>  while (matroska_deliver_packet(matroska, pkt)) {
>  int64_t pos = avio_tell(matroska->ctx->pb);
>  if (matroska->done)
> -return AVERROR_EOF;
> +return avio_feof(s->pb) ? AVERROR_EOF : AVERROR(EIO);
>  if (matroska_parse_cluster(matroska) < 0)
>  matroska_resync(matroska, pos);
>  }

This does not seem correct. EIO means something (usually along the lines
from "you should not unplug your USB stick while watching a file stored on
it" to "get a new hard drive and hope your backups are up to date"), it is
not a generic error when nothing else fits; there is AVERROR_UNKNOWN for
that.

But I do not think AVERROR_UNKNOWN would be correct either. If I read the
code correctly, the only way for matroska->done to mean something else than
EOF is avio_seek() returning an error in matroska_resync(): its return value
is checked for error but the exact value is discarded. Note that the return
value of matroska_resync() is later ignored. (I also notice that the return
value of avio_seek() is ignored all over the place in this file.)

Regards,

-- 
  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] Avoid sending packets to network when multicast ttl is 0 in udp

2016-07-23 Thread Omid Ghaffarinia
I'm sorry for that, it failed because it was prepared for release/2.8,
this one should work on master.


On Thu, Jul 21, 2016 at 3:48 AM, Michael Niedermayer
 wrote:
> On Wed, Jul 20, 2016 at 05:38:10PM +0430, Omid Ghaffarinia wrote:
>> Thanks for testing in mingw
>> New patch attached, which should work now.
>
> still fails, even on ubuntu:
> libavformat/udp.c: In function ‘udp_set_multicast_ttl’:
> libavformat/udp.c:367:13: warning: passing argument 1 of ‘udp_set_url’ from 
> incompatible pointer type [enabled by default]
> libavformat/udp.c:328:12: note: expected ‘struct URLContext *’ but argument 
> is of type ‘struct sockaddr_storage *’
> libavformat/udp.c:367:13: warning: passing argument 2 of ‘udp_set_url’ from 
> incompatible pointer type [enabled by default]
> libavformat/udp.c:328:12: note: expected ‘struct sockaddr_storage *’ but 
> argument is of type ‘const char *’
> libavformat/udp.c:367:13: error: too few arguments to function ‘udp_set_url’
> libavformat/udp.c:328:12: note: declared here
> libavformat/udp.c:376:13: warning: passing argument 1 of ‘udp_set_url’ from 
> incompatible pointer type [enabled by default]
> libavformat/udp.c:328:12: note: expected ‘struct URLContext *’ but argument 
> is of type ‘struct sockaddr_storage *’
> libavformat/udp.c:376:13: warning: passing argument 2 of ‘udp_set_url’ from 
> incompatible pointer type [enabled by default]
> libavformat/udp.c:328:12: note: expected ‘struct sockaddr_storage *’ but 
> argument is of type ‘const char *’
> libavformat/udp.c:376:13: error: too few arguments to function ‘udp_set_url’
> libavformat/udp.c:328:12: note: declared here
> libavformat/udp.c: In function ‘udp_open’:
> libavformat/udp.c:907:17: warning: passing argument 1 of ‘udp_set_url’ from 
> incompatible pointer type [enabled by default]
> libavformat/udp.c:328:12: note: expected ‘struct URLContext *’ but argument 
> is of type ‘struct sockaddr_storage *’
> libavformat/udp.c:907:17: warning: passing argument 2 of ‘udp_set_url’ from 
> incompatible pointer type [enabled by default]
> libavformat/udp.c:328:12: note: expected ‘struct sockaddr_storage *’ but 
> argument is of type ‘const char *’
> libavformat/udp.c:907:17: error: too few arguments to function ‘udp_set_url’
> libavformat/udp.c:328:12: note: declared here
>
>
> on mingw64:
> CC  libavformat/udp.o
> src/libavformat/udp.c: In function ‘udp_set_multicast_ttl’:
> src/libavformat/udp.c:367:13: warning: passing argument 1 of ‘udp_set_url’ 
> from incompatible pointer type [enabled by default]
> src/libavformat/udp.c:328:12: note: expected ‘struct URLContext *’ but 
> argument is of type ‘struct sockaddr_storage *’
> src/libavformat/udp.c:367:13: warning: passing argument 2 of ‘udp_set_url’ 
> from incompatible pointer type [enabled by default]
> src/libavformat/udp.c:328:12: note: expected ‘struct sockaddr_storage *’ but 
> argument is of type ‘const char *’
> src/libavformat/udp.c:367:13: error: too few arguments to function 
> ‘udp_set_url’
> src/libavformat/udp.c:328:12: note: declared here
> src/libavformat/udp.c:376:13: warning: passing argument 1 of ‘udp_set_url’ 
> from incompatible pointer type [enabled by default]
> src/libavformat/udp.c:328:12: note: expected ‘struct URLContext *’ but 
> argument is of type ‘struct sockaddr_storage *’
> src/libavformat/udp.c:376:13: warning: passing argument 2 of ‘udp_set_url’ 
> from incompatible pointer type [enabled by default]
> src/libavformat/udp.c:328:12: note: expected ‘struct sockaddr_storage *’ but 
> argument is of type ‘const char *’
> src/libavformat/udp.c:376:13: error: too few arguments to function 
> ‘udp_set_url’
> src/libavformat/udp.c:328:12: note: declared here
> src/libavformat/udp.c: In function ‘udp_open’:
> src/libavformat/udp.c:907:17: warning: passing argument 1 of ‘udp_set_url’ 
> from incompatible pointer type [enabled by default]
> src/libavformat/udp.c:328:12: note: expected ‘struct URLContext *’ but 
> argument is of type ‘struct sockaddr_storage *’
> src/libavformat/udp.c:907:17: warning: passing argument 2 of ‘udp_set_url’ 
> from incompatible pointer type [enabled by default]
> src/libavformat/udp.c:328:12: note: expected ‘struct sockaddr_storage *’ but 
> argument is of type ‘const char *’
> src/libavformat/udp.c:907:17: error: too few arguments to function 
> ‘udp_set_url’
> src/libavformat/udp.c:328:12: note: declared here
> make: *** [libavformat/udp.o] Error 1
> make: Target `all' not remade because of errors.
>
> [...]
> --
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> When the tyrant has disposed of foreign enemies by conquest or treaty, and
> there is nothing more to fear from them, then he is always stirring up
> some war or other, in order that the people may require a leader. -- Plato
>
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
From