Re: [FFmpeg-devel] [PATCH] libavfilter/idet: fix double count and offset accuracy on progressive frame

2018-12-01 Thread pon pon
Carl Eugen Hoyos

I added logs and explanation in tichet #7565.

Thank you in advance.

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


Re: [FFmpeg-devel] [PATCH] libavfilter/idet: fix double count and offset accuracy on progressive frame

2018-11-28 Thread pon pon
>Please avoid top-posting here,
Thannk you for your advice. I'll take care.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] libavfilter/idet: fix double count and offset accuracy on progressive frame

2018-11-27 Thread pon pon
I have attached logs in tichet #7565.
idet before patch (72.6x) is far faster than after (62.2x).
I think it means processes terminate by double counts than expeccted.
How do you thinnk about it?

ponpon

2018年11月28日(水) 11:24 Carl Eugen Hoyos :

> 2018-11-28 3:01 GMT+01:00, pon pon :
>
> > I think idet duplicately counts and offsets accuracy of progressive
> > frames, as repoert in ticket #7565.
>
> Unfortunately, this ticket is missing all necessary information including
> the command line, the complete, uncut console output and a sample file.
>
> For which sample is your patch supposed to make a difference?
>
> Carl Eugen
> ___
> 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


[FFmpeg-devel] [PATCH] libavfilter/idet: fix double count and offset accuracy on progressive frame

2018-11-27 Thread pon pon
Hello,

I think idet duplicately counts and offsets accuracy of progressive frames,
as repoert in ticket #7565.
If this is corret, the below patch can fix it.

ponpon

diff --git a/libavfilter/vf_idet.c b/libavfilter/vf_idet.c
index 02ae2edcb9..8c355ee2f9 100644
--- a/libavfilter/vf_idet.c
+++ b/libavfilter/vf_idet.c
@@ -285,12 +285,14 @@ static int filter_frame(AVFilterLink *link, AVFrame
*picref)
 if (idet->cur->interlaced_frame) {
 idet->cur->interlaced_frame = 0;
 filter(ctx);
-if (idet->last_type == PROGRESSIVE) {
-idet->interlaced_flag_accuracy --;
-idet->analyze_interlaced_flag --;
-} else if (idet->last_type != UNDETERMINED) {
-idet->interlaced_flag_accuracy ++;
-idet->analyze_interlaced_flag --;
+if (idet->last_type != UNDETERMINED) {
+if (idet->last_type == PROGRESSIVE) {
+idet->interlaced_flag_accuracy --;
+idet->analyze_interlaced_flag --;
+} else {
+idet->interlaced_flag_accuracy ++;
+idet->analyze_interlaced_flag --;
+}
 }
 if (idet->analyze_interlaced_flag == 1) {
 ff_filter_frame(ctx->outputs[0],
av_frame_clone(idet->cur));
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] Videotoolbox encoder: Enable Videotoolbox encoder

2017-10-04 Thread pon pon
Sorry for my misunderstanding.

I tests your patch.
./configure
ffmpeg -i input -c:v h264_videotoolbox output
./configure --disable-encoder=h264_videotoolbox
./configure --disable-videotoolbox
All work! Good!

ponpon

2017-10-04 20:01 GMT+09:00 Clément Bœsch <u...@pkh.me>:

> On Wed, Oct 04, 2017 at 07:45:50PM +0900, pon pon wrote:
> > Thank you for pointing out.
> >
> > >i t doesn't belong in this list.
> > Doesn't this mean videotoolbox_encoder belongs to
> > EXTERNAL_AUTODETECT_LIBRARY_LIST,
> > also?
>
> My point was that it doesn't belong in these lists. I applied my patch
> (8be3fc88d), please test if that works for you.
>
> [...]
>
> Regards,
>
> --
> Clément B.
>
> ___
> 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] Videotoolbox encoder: Enable Videotoolbox encoder

2017-10-04 Thread pon pon
Thank you for pointing out.

>i t doesn't belong in this list.
Doesn't this mean videotoolbox_encoder belongs to
EXTERNAL_AUTODETECT_LIBRARY_LIST,
also?
If so, I think the integrated
<https://eow.alc.co.jp/search?q=integrated=awlj> modifications of
videotoolbox"enc".c and videotoolbox.c are need.
This is because videotoolboxenc.c doesn't include videotoolbox.h.
independent each other?

Your idea is correct. Videotoolbox has decoder , encoder, videofilters.
Moreover, its work  switches between soft- and hard-ware. But, My
understanding of hw accelation policy of ffmpeg isn't enough and this is
beyond my ability. For example, ./configure
--disable-decoder=h264_videotoolbox and ffmpeg -c:v h264_videotoolbox  -i
input output don't work. On the other hand, qsv isn't so.

As a temporal handling to autodetect, the previous patch or
diff --git a/configure b/configure
index 0d86c4cb2a..d3886b6d41 100755
--- a/configure
+++ b/configure
@@ -1542,6 +1542,7 @@ EXTERNAL_AUTODETECT_LIBRARY_LIST="
 sdl2
 securetransport
 sndio
+videotoolbox_encoder
 xlib
 zlib
 "
can be used. ffmpeg -i input -c:v h264_videotoolbox output, ./configure
--disable-encoder=h264_videotoolbox, and ./configure --disable-videotoolbox
well work in my tests.

Of course, this depends on the policy of ffmpeg. I like ffmpeg.

Thank you.
ponpon
<https://eow.alc.co.jp/search?q=handling=awlj>

2017-10-04 15:42 GMT+09:00 Clément Bœsch <u...@pkh.me>:

> On Wed, Oct 04, 2017 at 09:55:04AM +0900, pon pon wrote:
> > I reported that Videotoolbox encoder isn't enabled since commit
> > 9ef5a2f5f30bdc4ac86275ae4b4708ab4681b21
> > <http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=
> 9ef5a2f5f30bdc4ac86275ae4b4708ab4681b21d>
> > in ticket 6702.
> > This is a simple patch correcting it.
> >
> > diff --git a/configure b/configure
> > index ae0eddac6c..8922303c89 100755
> > --- a/configure
> > +++ b/configure
> > @@ -1652,6 +1652,7 @@ HWACCEL_AUTODETECT_LIBRARY_LIST="
> >  vda
> >  vdpau
> >  videotoolbox
> > +videotoolbox_encoder
> >  v4l2_m2m
> >  xvmc
> >  "
> >
>
> "videotoolbox_encoder" is not an autodetected library, it's a component
> depending on videotoolbox, so i t doesn't belong in this list.
>
> Please see http://ffmpeg.org/pipermail/ffmpeg-devel/2017-September/
> 217075.html
>
> If you can test it I'll apply it.
>
> --
> Clément B.
>
> ___
> 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


[FFmpeg-devel] [PATCH] Videotoolbox encoder: Enable Videotoolbox encoder

2017-10-03 Thread pon pon
I reported that Videotoolbox encoder isn't enabled since commit
9ef5a2f5f30bdc4ac86275ae4b4708ab4681b21

in ticket 6702.
This is a simple patch correcting it.

diff --git a/configure b/configure
index ae0eddac6c..8922303c89 100755
--- a/configure
+++ b/configure
@@ -1652,6 +1652,7 @@ HWACCEL_AUTODETECT_LIBRARY_LIST="
 vda
 vdpau
 videotoolbox
+videotoolbox_encoder
 v4l2_m2m
 xvmc
 "

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


Re: [FFmpeg-devel] FFmpeg 3.1

2016-06-06 Thread pon pon
hardware decoding dont work in the current git on osx. it is reported on
ticket 5595.
that with videotoolbox works in the current git on osx by the patch
http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/214982 though
hardware decoding with vda dont work.
the pacth is need.

as mentioned on the ticket, also, hardware decoding dont work with -hwaccel
auto in the current git on osx because vda is used by the default of
-hwaccel auto.
it is need to improve it.

thanks

ponpon

2016-06-06 10:28 GMT+09:00 Michael Niedermayer :

> Hi all
>
> its time for making the next major release
> If you want something in dont forget to push it to git master
>
> If theres some bug you care about or belive is important, please
> help fix them:
>
> regression bugs (all, not just since 3.0)
>
> https://trac.ffmpeg.org/query?status=new=open=reopened=~regression=id=summary=status=type=priority=component=version=time=changetime=priority
>
> priority=important bugs
>
> https://trac.ffmpeg.org/query?priority=important=new=open=reopened=id=summary=status=type=priority=component=version=time=changetime=priority
>
> really old bugs are likely hard so if you are searching for easy ones
> skip year old bugs
>
> Thanks
>
> --
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> Those who are best at talking, realize last or never when they are wrong.
>
> ___
> 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/videotoolbox: fix H.264 hwaccel init issue

2016-06-02 Thread pon pon
>may be
this is a miscue. by right, may not be
sorry

ponpon

2016-06-03 11:47 GMT+09:00 pon pon <pon.pon.3876098iu76.pon...@gmail.com>:

> some problems of https://trac.ffmpeg.org/ticket/5595 are fixed.
> can playback 480p.mp4, 720p.mp4, 1080p.mp4 with videotoolbox on osx1095.
> test.mp4 may be supported by videdotoolbox hardware decoding because can
> playback it with commands on #5272.
>
> ponpon
>
> 2016-06-02 11:06 GMT+09:00 Rick Kern <ker...@gmail.com>:
>
>> Fixes VTDecompressionSessionCreate() error.
>>
>> Signed-off-by: Rick Kern <ker...@gmail.com>
>> ---
>>  libavcodec/videotoolbox.c | 59
>> ---
>>  1 file changed, 45 insertions(+), 14 deletions(-)
>>
>> diff --git a/libavcodec/videotoolbox.c b/libavcodec/videotoolbox.c
>> index 2f4d531..cadfb23 100644
>> --- a/libavcodec/videotoolbox.c
>> +++ b/libavcodec/videotoolbox.c
>> @@ -487,23 +487,53 @@ static CFDictionaryRef
>> videotoolbox_buffer_attributes_create(int width,
>>  return buffer_attributes;
>>  }
>>
>> -static CMVideoFormatDescriptionRef
>> videotoolbox_format_desc_create(CMVideoCodecType codec_type,
>> +static CMVideoFormatDescriptionRef
>> videotoolbox_format_desc_create(AVCodecContext *avctx,
>> +
>>  CMVideoCodecType codec_type,
>>
>> CFDictionaryRef decoder_spec,
>> int
>> width,
>> int
>> height)
>>  {
>> -CMFormatDescriptionRef cm_fmt_desc;
>> -OSStatus status;
>> -
>> -status = CMVideoFormatDescriptionCreate(kCFAllocatorDefault,
>> -codec_type,
>> -width,
>> -height,
>> -decoder_spec, // Dictionary
>> of extension
>> -_fmt_desc);
>> -
>> -if (status)
>> -return NULL;
>> +CMFormatDescriptionRef cm_fmt_desc = NULL;
>> +int status;
>> +H264Context *h = codec_type == kCMVideoCodecType_H264 ?
>> avctx->priv_data : NULL;
>> +
>> +if (h && h->sps.data_size && h->pps.data_size) {
>> +int ps_count = 2;
>> +const uint8_t **ps_data = av_malloc(sizeof(uint8_t*) * ps_count);
>> +size_t *ps_sizes = av_malloc(sizeof(size_t)  * ps_count);
>> +
>> +ps_data[0]  = h->sps.data;
>> +ps_sizes[0] = h->sps.data_size;
>> +
>> +ps_data[1]  = h->pps.data;
>> +ps_sizes[1] = h->pps.data_size;
>> +
>> +status =
>> CMVideoFormatDescriptionCreateFromH264ParameterSets(NULL,
>> +
>>  ps_count,
>> +
>>  ps_data,
>> +
>>  ps_sizes,
>> + 4,
>> +
>>  _fmt_desc);
>> +av_freep(_sizes);
>> +av_freep(_data);
>> +
>> +if (status) {
>> +av_log(avctx, AV_LOG_ERROR, "Error creating H.264 format
>> description: %d\n", status);
>> +return NULL;
>> +}
>> +} else {
>> +status = CMVideoFormatDescriptionCreate(kCFAllocatorDefault,
>> +codec_type,
>> +width,
>> +height,
>> +decoder_spec, //
>> Dictionary of extension
>> +_fmt_desc);
>> +
>> +if (status) {
>> +av_log(avctx, AV_LOG_ERROR, "Error creating format
>> description: %d\n", status);
>> +return NULL;
>> +}
>> +}
>>
>>  return cm_fmt_desc;
>>  }
>> @@ -543,7 +573,8 @@ static int videotoolbox_default_init(AVCodecContext
>> *avctx)
>>
>>  decoder_spec =
>> videotoolbox_decoder_config_create(videotoolbox->cm_codec_type, avctx);
>>
>> -videotoolbox->cm_fmt_desc =
>> videotoolbox_format_desc_create(videotoolbox->cm_codec_type,
>> +videotoolbox->cm_fmt_desc = videotoolbox_format_desc_create(avctx,
>> +
>> videotoolbox->cm_codec_type,
>>
>>  decoder_spec,
>>
>>  avctx->width,
>>
>>  avctx->height);
>> --
>> 2.7.4
>>
>> ___
>> 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/videotoolbox: fix H.264 hwaccel init issue

2016-06-02 Thread pon pon
some problems of https://trac.ffmpeg.org/ticket/5595 are fixed.
can playback 480p.mp4, 720p.mp4, 1080p.mp4 with videotoolbox on osx1095.
test.mp4 may be supported by videdotoolbox hardware decoding because can
playback it with commands on #5272.

ponpon

2016-06-02 11:06 GMT+09:00 Rick Kern :

> Fixes VTDecompressionSessionCreate() error.
>
> Signed-off-by: Rick Kern 
> ---
>  libavcodec/videotoolbox.c | 59
> ---
>  1 file changed, 45 insertions(+), 14 deletions(-)
>
> diff --git a/libavcodec/videotoolbox.c b/libavcodec/videotoolbox.c
> index 2f4d531..cadfb23 100644
> --- a/libavcodec/videotoolbox.c
> +++ b/libavcodec/videotoolbox.c
> @@ -487,23 +487,53 @@ static CFDictionaryRef
> videotoolbox_buffer_attributes_create(int width,
>  return buffer_attributes;
>  }
>
> -static CMVideoFormatDescriptionRef
> videotoolbox_format_desc_create(CMVideoCodecType codec_type,
> +static CMVideoFormatDescriptionRef
> videotoolbox_format_desc_create(AVCodecContext *avctx,
> +
>  CMVideoCodecType codec_type,
>
> CFDictionaryRef decoder_spec,
> int
> width,
> int
> height)
>  {
> -CMFormatDescriptionRef cm_fmt_desc;
> -OSStatus status;
> -
> -status = CMVideoFormatDescriptionCreate(kCFAllocatorDefault,
> -codec_type,
> -width,
> -height,
> -decoder_spec, // Dictionary
> of extension
> -_fmt_desc);
> -
> -if (status)
> -return NULL;
> +CMFormatDescriptionRef cm_fmt_desc = NULL;
> +int status;
> +H264Context *h = codec_type == kCMVideoCodecType_H264 ?
> avctx->priv_data : NULL;
> +
> +if (h && h->sps.data_size && h->pps.data_size) {
> +int ps_count = 2;
> +const uint8_t **ps_data = av_malloc(sizeof(uint8_t*) * ps_count);
> +size_t *ps_sizes = av_malloc(sizeof(size_t)  * ps_count);
> +
> +ps_data[0]  = h->sps.data;
> +ps_sizes[0] = h->sps.data_size;
> +
> +ps_data[1]  = h->pps.data;
> +ps_sizes[1] = h->pps.data_size;
> +
> +status = CMVideoFormatDescriptionCreateFromH264ParameterSets(NULL,
> +
>  ps_count,
> +
>  ps_data,
> +
>  ps_sizes,
> + 4,
> +
>  _fmt_desc);
> +av_freep(_sizes);
> +av_freep(_data);
> +
> +if (status) {
> +av_log(avctx, AV_LOG_ERROR, "Error creating H.264 format
> description: %d\n", status);
> +return NULL;
> +}
> +} else {
> +status = CMVideoFormatDescriptionCreate(kCFAllocatorDefault,
> +codec_type,
> +width,
> +height,
> +decoder_spec, //
> Dictionary of extension
> +_fmt_desc);
> +
> +if (status) {
> +av_log(avctx, AV_LOG_ERROR, "Error creating format
> description: %d\n", status);
> +return NULL;
> +}
> +}
>
>  return cm_fmt_desc;
>  }
> @@ -543,7 +573,8 @@ static int videotoolbox_default_init(AVCodecContext
> *avctx)
>
>  decoder_spec =
> videotoolbox_decoder_config_create(videotoolbox->cm_codec_type, avctx);
>
> -videotoolbox->cm_fmt_desc =
> videotoolbox_format_desc_create(videotoolbox->cm_codec_type,
> +videotoolbox->cm_fmt_desc = videotoolbox_format_desc_create(avctx,
> +
> videotoolbox->cm_codec_type,
>
>  decoder_spec,
>
>  avctx->width,
>
>  avctx->height);
> --
> 2.7.4
>
> ___
> 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 2/6] lavc/audiotoolboxenc: fix a number of config issues

2016-04-01 Thread pon pon
i did some tests inclluding profiles under osx1095.

encoding test
51ch->2ch and 51ch->51ch, aac_at, alac_at, pcm_alaw_at, pcm_mulaw_at
there is message "Trying to remove 2048 samples, but the queue is empty" in
encoding aac_at with profile aac_he and 51ch->2ch and 51ch->51ch and
encoding aac_at with profile aac_he_v2 and 51ch->2ch. is it normal?
can't encode aac_at with profile aac_he_v2 and 51ch->51ch. is 51ch
supported?

51ch->1ch, 51ch->2ch, and 51ch->51ch, ilbc_at
can't encode all.

for your further work
codecs supported by afconvert of osx1095 for encoding
aac aace aacf aach aacl aacp alac alaw ima4 I8 BEI16 BEI24 BEI32 BEF32
BEF64 LEI16 LEI24 LEI32 LEF32 LEF64 ulaw

ponpon


2016-03-28 2:20 GMT+09:00 Rodger Combs :

> - size variables were used in a confusing way
> - incorrect size var use led to channel layouts not being set properly
> - channel layouts were incorrectly mapped for >2-channel AAC
> - bitrates not accepted by the encoder were discarded instead of being
> clamped
> - some minor style/indentation fixes
> ---
>  libavcodec/audiotoolboxenc.c | 198
> ++-
>  1 file changed, 176 insertions(+), 22 deletions(-)
>
> diff --git a/libavcodec/audiotoolboxenc.c b/libavcodec/audiotoolboxenc.c
> index 4797b2a..22352da 100644
> --- a/libavcodec/audiotoolboxenc.c
> +++ b/libavcodec/audiotoolboxenc.c
> @@ -146,6 +146,86 @@ static int get_ilbc_mode(AVCodecContext *avctx)
>  return 30;
>  }
>
> +static av_cold int get_channel_label(int channel)
> +{
> +uint64_t map = 1 << channel;
> +if (map <= AV_CH_LOW_FREQUENCY)
> +return channel + 1;
> +else if (map <= AV_CH_BACK_RIGHT)
> +return channel + 29;
> +else if (map <= AV_CH_BACK_CENTER)
> +return channel - 1;
> +else if (map <= AV_CH_SIDE_RIGHT)
> +return channel - 4;
> +else if (map <= AV_CH_TOP_BACK_RIGHT)
> +return channel + 1;
> +else if (map <= AV_CH_STEREO_RIGHT)
> +return -1;
> +else if (map <= AV_CH_WIDE_RIGHT)
> +return channel + 4;
> +else if (map <= AV_CH_SURROUND_DIRECT_RIGHT)
> +return channel - 23;
> +else if (map == AV_CH_LOW_FREQUENCY_2)
> +return kAudioChannelLabel_LFE2;
> +else
> +return -1;
> +}
> +
> +static int remap_layout(AudioChannelLayout *layout, uint64_t in_layout,
> int count)
> +{
> +int i;
> +int c = 0;
> +layout->mChannelLayoutTag =
> kAudioChannelLayoutTag_UseChannelDescriptions;
> +layout->mNumberChannelDescriptions = count;
> +for (i = 0; i < count; i++) {
> +int label;
> +while (!(in_layout & (1 << c)) && c < 64)
> +c++;
> +if (c == 64)
> +return AVERROR(EINVAL); // This should never happen
> +label = get_channel_label(c);
> +layout->mChannelDescriptions[i].mChannelLabel = label;
> +if (label < 0)
> +return AVERROR(EINVAL);
> +c++;
> +}
> +return 0;
> +}
> +
> +static int get_aac_tag(uint64_t in_layout)
> +{
> +switch (in_layout) {
> +case AV_CH_LAYOUT_MONO:
> +return kAudioChannelLayoutTag_Mono;
> +case AV_CH_LAYOUT_STEREO:
> +return kAudioChannelLayoutTag_Stereo;
> +case AV_CH_LAYOUT_QUAD:
> +return kAudioChannelLayoutTag_AAC_Quadraphonic;
> +case AV_CH_LAYOUT_OCTAGONAL:
> +return kAudioChannelLayoutTag_AAC_Octagonal;
> +case AV_CH_LAYOUT_SURROUND:
> +return kAudioChannelLayoutTag_AAC_3_0;
> +case AV_CH_LAYOUT_4POINT0:
> +return kAudioChannelLayoutTag_AAC_4_0;
> +case AV_CH_LAYOUT_5POINT0:
> +return kAudioChannelLayoutTag_AAC_5_0;
> +case AV_CH_LAYOUT_5POINT1:
> +return kAudioChannelLayoutTag_AAC_5_1;
> +case AV_CH_LAYOUT_6POINT0:
> +return kAudioChannelLayoutTag_AAC_6_0;
> +case AV_CH_LAYOUT_6POINT1:
> +return kAudioChannelLayoutTag_AAC_6_1;
> +case AV_CH_LAYOUT_7POINT0:
> +return kAudioChannelLayoutTag_AAC_7_0;
> +case AV_CH_LAYOUT_7POINT1_WIDE_BACK:
> +return kAudioChannelLayoutTag_AAC_7_1;
> +case AV_CH_LAYOUT_7POINT1:
> +return kAudioChannelLayoutTag_MPEG_7_1_C;
> +default:
> +return 0;
> +}
> +}
> +
>  static av_cold int ffat_init_encoder(AVCodecContext *avctx)
>  {
>  ATDecodeContext *at = avctx->priv_data;
> @@ -170,11 +250,12 @@ static av_cold int ffat_init_encoder(AVCodecContext
> *avctx)
>  .mFormatID = ffat_get_format_id(avctx->codec_id, avctx->profile),
>  .mChannelsPerFrame = in_format.mChannelsPerFrame,
>  };
> -AudioChannelLayout channel_layout = {
> -.mChannelLayoutTag = kAudioChannelLayoutTag_UseChannelBitmap,
> -.mChannelBitmap = avctx->channel_layout,
> -};
> -UInt32 size = sizeof(channel_layout);
> +UInt32 layout_size = sizeof(AudioChannelLayout) +
> + sizeof(AudioChannelDescription) *
> avctx->channels;
> +AudioChannelLayout 

Re: [FFmpeg-devel] [PATCH 1/2] lavc/audiotoolboxdec: fix a number of config and timestamp issues

2016-04-01 Thread pon pon
it seems you are correct. i can't playback the ac3 files with afplay and
afconvert, though @constant  kAudioFormatAC3 is described in
CoreAudioType.h and i can playback them  with quicktime player(not 7 and
without perian). the results are attached.

i did some tests.

decoding test(gsm_ms_at and ilbc_at not done)
2ch and 51ch, aac_at ac3_at gsm_ms_at adpcm_ima_qt_at ilbc_at alac_at
mp1_at mp2_at mp3_at pcm_alaw_at pcm_mulaw_at
1ch, amr_nb_at
there are errors for pcm_alaw_at  pcm_mulaw_at.
the results are attached.

ponpon



2016-03-31 11:00 GMT+09:00 Rodger Combs :

> - ADTS-formatted AAC didn't work
> - Channel layouts were never exported
> - Channel mappings were incorrect beyond stereo
> - Channel counts weren't updated after packets were decoded
> - Timestamps were exported incorrectly
> ---
>  libavcodec/audiotoolboxdec.c | 286
> +--
>  1 file changed, 221 insertions(+), 65 deletions(-)
>
> diff --git a/libavcodec/audiotoolboxdec.c b/libavcodec/audiotoolboxdec.c
> index 1fa6f16..4ff46ea 100644
> --- a/libavcodec/audiotoolboxdec.c
> +++ b/libavcodec/audiotoolboxdec.c
> @@ -38,8 +38,9 @@ typedef struct ATDecodeContext {
>  AVPacket in_pkt;
>  AVPacket new_in_pkt;
>  AVBitStreamFilterContext *bsf;
> +char *decoded_data;
> +int channel_map[64];
>
> -unsigned pkt_size;
>  int64_t last_pts;
>  int eof;
>  } ATDecodeContext;
> @@ -81,20 +82,127 @@ static UInt32 ffat_get_format_id(enum AVCodecID
> codec, int profile)
>  }
>  }
>
> -static void ffat_update_ctx(AVCodecContext *avctx)
> +static int ffat_get_channel_id(AudioChannelLabel label)
> +{
> +if (label == 0)
> +return -1;
> +else if (label <= kAudioChannelLabel_LFEScreen)
> +return label - 1;
> +else if (label <= kAudioChannelLabel_RightSurround)
> +return label + 4;
> +else if (label <= kAudioChannelLabel_CenterSurround)
> +return label + 1;
> +else if (label <= kAudioChannelLabel_RightSurroundDirect)
> +return label + 23;
> +else if (label <= kAudioChannelLabel_TopBackRight)
> +return label - 1;
> +else if (label < kAudioChannelLabel_RearSurroundLeft)
> +return -1;
> +else if (label <= kAudioChannelLabel_RearSurroundRight)
> +return label - 29;
> +else if (label <= kAudioChannelLabel_RightWide)
> +return label - 4;
> +else if (label == kAudioChannelLabel_LFE2)
> +return ff_ctzll(AV_CH_LOW_FREQUENCY_2);
> +else if (label == kAudioChannelLabel_Mono)
> +return ff_ctzll(AV_CH_FRONT_CENTER);
> +else
> +return -1;
> +}
> +
> +static int ffat_compare_channel_descriptions(const void* a, const void* b)
> +{
> +const AudioChannelDescription* da = a;
> +const AudioChannelDescription* db = b;
> +return ffat_get_channel_id(da->mChannelLabel) -
> ffat_get_channel_id(db->mChannelLabel);
> +}
> +
> +static AudioChannelLayout *ffat_convert_layout(AudioChannelLayout
> *layout, UInt32* size)
> +{
> +AudioChannelLayoutTag tag = layout->mChannelLayoutTag;
> +AudioChannelLayout *new_layout;
> +if (tag == kAudioChannelLayoutTag_UseChannelDescriptions)
> +return layout;
> +else if (tag == kAudioChannelLayoutTag_UseChannelBitmap)
> +
> AudioFormatGetPropertyInfo(kAudioFormatProperty_ChannelLayoutForBitmap,
> +   sizeof(UInt32),
> >mChannelBitmap, size);
> +else
> +
> AudioFormatGetPropertyInfo(kAudioFormatProperty_ChannelLayoutForTag,
> +   sizeof(AudioChannelLayoutTag), ,
> size);
> +new_layout = av_malloc(*size);
> +if (!new_layout) {
> +av_free(layout);
> +return NULL;
> +}
> +if (tag == kAudioChannelLayoutTag_UseChannelBitmap)
> +
> AudioFormatGetProperty(kAudioFormatProperty_ChannelLayoutForBitmap,
> +   sizeof(UInt32), >mChannelBitmap,
> size, new_layout);
> +else
> +AudioFormatGetProperty(kAudioFormatProperty_ChannelLayoutForTag,
> +   sizeof(AudioChannelLayoutTag), , size,
> new_layout);
> +new_layout->mChannelLayoutTag =
> kAudioChannelLayoutTag_UseChannelDescriptions;
> +av_free(layout);
> +return new_layout;
> +}
> +
> +static int ffat_update_ctx(AVCodecContext *avctx)
>  {
>  ATDecodeContext *at = avctx->priv_data;
> -AudioStreamBasicDescription in_format;
> -UInt32 size = sizeof(in_format);
> +AudioStreamBasicDescription format;
> +UInt32 size = sizeof(format);
>  if (!AudioConverterGetProperty(at->converter,
>
> kAudioConverterCurrentInputStreamDescription,
> -   , _format)) {
> -avctx->channels = in_format.mChannelsPerFrame;
> -at->pkt_size = in_format.mFramesPerPacket;
> +   , )) {
> +if (format.mSampleRate)
> +avctx->sample_rate = format.mSampleRate;
> +avctx->channels = 

Re: [FFmpeg-devel] [PATCH 6/6] lavc/audiotoolboxdec: fix a number of config and timestamp issues

2016-03-30 Thread pon pon
2016-03-30 6:00 GMT+09:00 Rodger Combs <rodger.co...@gmail.com>:

>
>
> Is this a regression in these patches, or did this already happen?
> I haven't seen this issue in my local tests with AC3 streams; can you
> provide a sample?
>

not a regression. this have happened since the first patch.
i use osx1095. does this issue depend on os versions? your version?
i have attached samples. samples other than ticket #5369 are made from
ticket #5369, using ffmpeg.

if that helps, we can know differences of apis of os versions in the below.
https://developer.apple.com/library/mac/releasenotes/General/APIDiffsMacOSX10_11/index.html#//apple_ref/doc/uid/TP40016197
https://developer.apple.com/library/mac/releasenotes/MacOSX/WhatsNewInOSX/WhatsNewInOSX.html#//apple_ref/doc/uid/TP40001812

ponpon

http://speedy.sh/rqZ4x/test-stereo.mkv
http://speedy.sh/3F59z/test-stereo.ac3
http://speedy.sh/DpxAu/test.ac3
http://speedy.sh/vZzKQ/test.mkv


2016-03-30 6:00 GMT+09:00 Rodger Combs <rodger.co...@gmail.com>:

>
> > On Mar 28, 2016, at 00:39, pon pon <pon.pon.3876098iu76.pon...@gmail.com>
> wrote:
> >
> > 2016-03-28 2:20 GMT+09:00 Rodger Combs <rodger.co...@gmail.com>:
> >
> >> - ADTS-formatted AAC didn't work
> >> - Channel layouts were never exported
> >> - Channel mappings were incorrect beyond stereo
> >> - Channel counts weren't updated after packets were decoded
> >> - Timestamps were exported incorrectly
> >> ---
> >>
> >>
> >
> > patching is fixed and all errors of encoding are fixed but there are
> errors
> > of ac3 decoding.
> > logs are attached
>
> Is this a regression in these patches, or did this already happen?
> I haven't seen this issue in my local tests with AC3 streams; can you
> provide a sample?
> ___
> 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 6/6] lavc/audiotoolboxdec: fix a number of config and timestamp issues

2016-03-27 Thread pon pon
2016-03-28 2:20 GMT+09:00 Rodger Combs :

> - ADTS-formatted AAC didn't work
> - Channel layouts were never exported
> - Channel mappings were incorrect beyond stereo
> - Channel counts weren't updated after packets were decoded
> - Timestamps were exported incorrectly
> ---
>
>

patching is fixed and all errors of encoding are fixed but there are errors
of ac3 decoding.
logs are attached

ponpon


ac3_file_2ch.log
Description: Binary data


ac3_file_51ch.log
Description: Binary data


ac3_in_mkv_2ch.log
Description: Binary data


ac3_in_mkv_51ch.log
Description: Binary data
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 4/4] lavc/audiotoolboxdec: fix a number of config and timestamp issues

2016-03-25 Thread pon pon
2016-03-25 0:40 GMT+09:00 Rodger Combs :

> Fixed with this patch:
>
> i tested

there are some errors patch decoding and encoding.

patch error
patch -p1 < "audiotoolboxenc_fixed_1_remove unneeded packet metadata.patch"
patch unexpectedly ends in middle of line

decoding error (aac and ac3 are tested)
ac3 2ch and ac3 5.1ch is false.

encoding error (aac, alac, pcm_alaw, pcm_mulaw  are tested. 5.1->5.1 and
5.1->2. channel mapping isn't examined)
aac from 5.1ch to 5.1ch. alac from 5.1ch to 5.1ch, and alac from 5.1ch to
2ch are false.

logs are attached

ponpon


ac3_2ch.log
Description: Binary data


ac3_51ch.log
Description: Binary data


to_aac_5ch_to_5ch.log
Description: Binary data


to_alac_5ch_to_2ch.log
Description: Binary data


to_alac_5ch_to_5ch.log
Description: Binary data
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 2/2] lavf: Add coreimage filter for GPU based image filtering on OSX.

2016-03-22 Thread pon pon
2016-03-22 19:44 GMT+09:00 Thilo Borgmann :

> Am 19.03.16 um 18:26 schrieb Michael Niedermayer:
>
> If there are no more comments I'll apply soon.

i am looking forward to  your work.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 2/2] lavf: Add coreimage filter for GPU based image filtering on OSX.

2016-03-19 Thread pon pon
2016-03-20 0:31 GMT+09:00 Thilo Borgmann :

> All comments addressed, linux compilation fixed.
>
fixed.
can build.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 2/2] lavf: Add coreimage filter for GPU based image filtering on OSX.

2016-03-18 Thread pon pon
build error under osx1095 and clang37

HTMLdoc/libavutil.html
HTMLdoc/libswscale.html
doc/filters.texi:13909: misplaced {
doc/filters.texi:13909: misplaced }
doc/filters.texi:5028: @ref reference to nonexistent node `coreimagesrc'
make: *** [doc/ffplay-all.html] Error 1
make: *** Waiting for unfinished jobs
HTMLdoc/libswresample.html
doc/filters.texi:13909: misplaced {
doc/filters.texi:13909: misplaced }
doc/filters.texi:5028: @ref reference to nonexistent node `coreimagesrc'
make: *** [doc/ffmpeg-all.html] Error 1
doc/filters.texi:13909: misplaced {
doc/filters.texi:13909: misplaced }
doc/filters.texi:5028: @ref reference to nonexistent node `coreimagesrc'
make: *** [doc/ffprobe-all.html] Error 1
doc/filters.texi:13909: misplaced {
doc/filters.texi:13909: misplaced }
doc/filters.texi:5028: @ref reference to nonexistent node `coreimagesrc'
make: *** [doc/ffserver-all.html] Error 1
doc/filters.texi:13909: misplaced {
doc/filters.texi:13909: misplaced }
doc/filters.texi:5028: @ref reference to nonexistent node `coreimagesrc'
make: *** [doc/ffmpeg-filters.html] Error 1

ponpon


2016-03-17 6:24 GMT+09:00 Thilo Borgmann :

> Am 16.03.16 um 21:10 schrieb Moritz Barsnick:
> > [...]
>
> All addressed in newest patch, thanks!
>
> > - You have a variable by the same name as a function (list_filters),
> >   but Objective C may not mind. (Does ffmpeg coding style mind?)
>
> I've done it in the OSX/iOS devices as well and nobody complained...
> The compilers don't complain either because it is either struct.varname
> or (*varname)().
>
> Updated patch attached.
>
> -Thilo
>
> ___
> 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