Re: [FFmpeg-devel] [PATCH] avcodec/codec_desc: sort codec_descriptors

2018-02-09 Thread Muhammad Faiz
On Fri, Feb 9, 2018 at 9:11 AM, Michael Niedermayer
 wrote:
> On Sat, Feb 03, 2018 at 01:35:34AM +0700, Muhammad Faiz wrote:
>> Use bsearch on avcodec_descriptor_get().
>>
>> Signed-off-by: Muhammad Faiz 
>> ---
>>  libavcodec/codec_desc.c | 1103 
>> ---
>>  1 file changed, 563 insertions(+), 540 deletions(-)
>
> probably ok

Pushed.

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


Re: [FFmpeg-devel] [PATCH] avcodec/codec_desc: sort codec_descriptors

2018-02-08 Thread Michael Niedermayer
On Sat, Feb 03, 2018 at 01:35:34AM +0700, Muhammad Faiz wrote:
> Use bsearch on avcodec_descriptor_get().
> 
> Signed-off-by: Muhammad Faiz 
> ---
>  libavcodec/codec_desc.c | 1103 
> ---
>  1 file changed, 563 insertions(+), 540 deletions(-)

probably ok

[...]
-- 
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: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avcodec/codec_desc: sort codec_descriptors

2018-02-07 Thread Muhammad Faiz
On Sat, Feb 3, 2018 at 1:35 AM, Muhammad Faiz  wrote:
> Use bsearch on avcodec_descriptor_get().
>
> Signed-off-by: Muhammad Faiz 
> ---
>  libavcodec/codec_desc.c | 1103 
> ---
>  1 file changed, 563 insertions(+), 540 deletions(-)
>
> diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c
> index c3688de1d6..1e5d715416 100644
> --- a/libavcodec/codec_desc.c
> +++ b/libavcodec/codec_desc.c
> @@ -21,8 +21,10 @@
>
>  #include 
>
> +#include "libavutil/avassert.h"
>  #include "libavutil/common.h"
>  #include "libavutil/internal.h"
> +#include "libavutil/thread.h"
>  #include "avcodec.h"
>  #include "profiles.h"
>  #include "version.h"
> @@ -90,6 +92,28 @@ static const AVCodecDescriptor codec_descriptors[] = {
>  .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY,
>  },
>  {
> +.id= AV_CODEC_ID_LJPEG,
> +.type  = AVMEDIA_TYPE_VIDEO,
> +.name  = "ljpeg",
> +.long_name = NULL_IF_CONFIG_SMALL("Lossless JPEG"),
> +.props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS,
> +},
> +{
> +.id= AV_CODEC_ID_SP5X,
> +.type  = AVMEDIA_TYPE_VIDEO,
> +.name  = "sp5x",
> +.long_name = NULL_IF_CONFIG_SMALL("Sunplus JPEG (SP5X)"),
> +.props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY,
> +},
> +{
> +.id= AV_CODEC_ID_JPEGLS,
> +.type  = AVMEDIA_TYPE_VIDEO,
> +.name  = "jpegls",
> +.long_name = NULL_IF_CONFIG_SMALL("JPEG-LS"),
> +.props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY |
> + AV_CODEC_PROP_LOSSLESS,
> +},
> +{
>  .id= AV_CODEC_ID_MPEG4,
>  .type  = AVMEDIA_TYPE_VIDEO,
>  .name  = "mpeg4",
> @@ -161,14 +185,6 @@ static const AVCodecDescriptor codec_descriptors[] = {
>  .props = AV_CODEC_PROP_LOSSY,
>  },
>  {
> -.id= AV_CODEC_ID_SVG,
> -.type  = AVMEDIA_TYPE_VIDEO,
> -.name  = "svg",
> -.long_name = NULL_IF_CONFIG_SMALL("Scalable Vector Graphics"),
> -.props = AV_CODEC_PROP_LOSSLESS,
> -.mime_types= MT("image/svg+xml"),
> -},
> -{
>  .id= AV_CODEC_ID_SVQ1,
>  .type  = AVMEDIA_TYPE_VIDEO,
>  .name  = "svq1",
> @@ -408,13 +424,6 @@ static const AVCodecDescriptor codec_descriptors[] = {
>  .props = AV_CODEC_PROP_LOSSLESS,
>  },
>  {
> -.id= AV_CODEC_ID_SNOW,
> -.type  = AVMEDIA_TYPE_VIDEO,
> -.name  = "snow",
> -.long_name = NULL_IF_CONFIG_SMALL("Snow"),
> -.props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_LOSSLESS,
> -},
> -{
>  .id= AV_CODEC_ID_TSCC,
>  .type  = AVMEDIA_TYPE_VIDEO,
>  .name  = "tscc",
> @@ -450,6 +459,50 @@ static const AVCodecDescriptor codec_descriptors[] = {
>  .props = AV_CODEC_PROP_LOSSY,
>  },
>  {
> +.id= AV_CODEC_ID_PNG,
> +.type  = AVMEDIA_TYPE_VIDEO,
> +.name  = "png",
> +.long_name = NULL_IF_CONFIG_SMALL("PNG (Portable Network Graphics) 
> image"),
> +.props = AV_CODEC_PROP_LOSSLESS,
> +.mime_types= MT("image/png"),
> +},
> +{
> +.id= AV_CODEC_ID_PPM,
> +.type  = AVMEDIA_TYPE_VIDEO,
> +.name  = "ppm",
> +.long_name = NULL_IF_CONFIG_SMALL("PPM (Portable PixelMap) image"),
> +.props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS,
> +},
> +{
> +.id= AV_CODEC_ID_PBM,
> +.type  = AVMEDIA_TYPE_VIDEO,
> +.name  = "pbm",
> +.long_name = NULL_IF_CONFIG_SMALL("PBM (Portable BitMap) image"),
> +.props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS,
> +},
> +{
> +.id= AV_CODEC_ID_PGM,
> +.type  = AVMEDIA_TYPE_VIDEO,
> +.name  = "pgm",
> +.long_name = NULL_IF_CONFIG_SMALL("PGM (Portable GrayMap) image"),
> +.props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS,
> +},
> +{
> +.id= AV_CODEC_ID_PGMYUV,
> +.type  = AVMEDIA_TYPE_VIDEO,
> +.name  = "pgmyuv",
> +.long_name = NULL_IF_CONFIG_SMALL("PGMYUV (Portable GrayMap YUV) 
> image"),
> +.props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS,
> +},
> +{
> +.id= AV_CODEC_ID_PAM,
> +.type  = AVMEDIA_TYPE_VIDEO,
> +.name  = "pam",
> +.long_name = NULL_IF_CONFIG_SMALL("PAM (Portable AnyMap) image"),
> +.props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS,
> +.mime_types= MT("image/x-portable-pixmap"),
> +},
> +{
>  .id= AV_CODEC_ID_FFVHUFF,
>  

Re: [FFmpeg-devel] [PATCH] avcodec/codec_desc: sort codec_descriptors

2018-02-02 Thread Michael Niedermayer
On Sat, Feb 03, 2018 at 02:03:49AM +0100, Michael Niedermayer wrote:
> On Sat, Feb 03, 2018 at 01:35:34AM +0700, Muhammad Faiz wrote:
> > Use bsearch on avcodec_descriptor_get().
> > 
> > Signed-off-by: Muhammad Faiz 
> > ---
> >  libavcodec/codec_desc.c | 1103 
> > ---
> >  1 file changed, 563 insertions(+), 540 deletions(-)
> 
> breaks fate
> 
> make V=2 fate-api-flac
> [...]
> Test api-flac failed. Look at tests/data/fate/api-flac.err for details.
> channel layout: stereo, sample rate: 8000
> unsorted codec_id 'rv60' and 'vc1'.
> Assertion 0 failed at libavcodec/codec_desc.c:3123
> Aborted (core dumped)
> make: *** [fate-api-flac] Error 134

please ignore this, this seems to have been an interaction with another patch

this alone doesnt fail

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Republics decline into democracies and democracies degenerate into
despotisms. -- Aristotle


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


Re: [FFmpeg-devel] [PATCH] avcodec/codec_desc: sort codec_descriptors

2018-02-02 Thread Michael Niedermayer
On Sat, Feb 03, 2018 at 01:35:34AM +0700, Muhammad Faiz wrote:
> Use bsearch on avcodec_descriptor_get().
> 
> Signed-off-by: Muhammad Faiz 
> ---
>  libavcodec/codec_desc.c | 1103 
> ---
>  1 file changed, 563 insertions(+), 540 deletions(-)

breaks fate

make V=2 fate-api-flac
[...]
Test api-flac failed. Look at tests/data/fate/api-flac.err for details.
channel layout: stereo, sample rate: 8000
unsorted codec_id 'rv60' and 'vc1'.
Assertion 0 failed at libavcodec/codec_desc.c:3123
Aborted (core dumped)
make: *** [fate-api-flac] Error 134


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

Breaking DRM is a little like attempting to break through a door even
though the window is wide open and the only thing in the house is a bunch
of things you dont want and which you would get tomorrow for free anyway


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