Re: [FFmpeg-devel] [PATCH v2 1/2] avutil/wchar_filename, file_open: Support long file names on Windows

2022-05-16 Thread nil-admirari
> +static inline int path_is_extended(const wchar_t *path) > +{ > + size_t len = wcslen(path); > + if (len >= 4 && path[0] == L'\\' && (path[1] == L'\\' || path[1] == L'?') > && path[2] == L'?' && path[3] == L'\\') Length check is probably unnecessary: comparisons will reject '\0' and further com

Re: [FFmpeg-devel] [PATCH 2/2] avformat/os_support: Support long file names on Windows

2022-05-16 Thread nil-admirari
> We already have win32_stat, but what's a bit tricky is that the > struct that this function takes as a parameter is named the same > as the function itself. Sorry, I thought is was a definition of a function, not a struct. Since stat function is already defined as win32_stat, It's better to re

Re: [FFmpeg-devel] [PATCH 1/2] avutil/wchar_filename, file_open: Support long file names on Windows

2022-05-16 Thread nil-admirari
> The functions are needed in both. file_open.c cannot be included > in libavformat/os_support.h and neither the other way round, > so they need to be in a 3rd place. How about renaming > wchar_filename.h to windows_filename.h ? Probably it's better to rename. > I have skipped those checks becau

Re: [FFmpeg-devel] [PATCH 0/2] Support long file names on Windows

2022-05-16 Thread nil-admirari
> I have left those out by intention because they are pending removal > and are only for debugging. Is dvdsubdec.c parse_ifo_palette pending removal? What about - vf_pnsr.c init() - vf_vidstabdetect.c config_input() - vf_vidstabtransform.c config_input()? ___

Re: [FFmpeg-devel] [PATCH v4 06/10] libavformat/asfdec: fix macro definition and use

2022-05-16 Thread Andreas Rheinhardt
Soft Works: > > >> -Original Message- >> From: ffmpeg-devel On Behalf Of >> Andreas Rheinhardt >> Sent: Sunday, May 15, 2022 8:12 PM >> To: ffmpeg-devel@ffmpeg.org >> Subject: Re: [FFmpeg-devel] [PATCH v4 06/10] libavformat/asfdec: fix >> macro definition and use >> >> softworkz: >>> Fro

Re: [FFmpeg-devel] [PATCH v11 1/6] libavutil/wchar_filename.h: Add whcartoutf8, wchartoansi and utf8toansi

2022-05-16 Thread nil-admirari
> And what's the point about this? Point is obvious: extended paths are difficult to handle correctly. get_extended_win32_path cannot be used on its own, only as a final step before getting FILE* or a file descriptor. ___ ffmpeg-devel mailing list ffm

Re: [FFmpeg-devel] [PATCH 3/3] avcodec/mpeg4videodec: Replace always true check by assert

2022-05-16 Thread Andreas Rheinhardt
James Almer: > > > On 5/15/2022 10:16 PM, Michael Niedermayer wrote: >> Maybe helps coverity >> Helps: CID1433771 >> >> Signed-off-by: Michael Niedermayer >> --- >>   libavcodec/mpeg4videodec.c | 3 ++- >>   1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/libavcodec/mpeg4videode

[FFmpeg-devel] [PATCH] avfilter/formats: Constify channel_layout in ff_add_channel_layout()

2022-05-16 Thread Andreas Rheinhardt
It copies, not moves the channel layout. Signed-off-by: Andreas Rheinhardt --- libavfilter/formats.c | 3 ++- libavfilter/formats.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/libavfilter/formats.c b/libavfilter/formats.c index f2c474e279..e8c2888c0c 100644 --- a/liba

Re: [FFmpeg-devel] [PATCH] lavc: fix h264 parser bug

2022-05-16 Thread Lingjiang Fang
On Fri, 13 May 2022 00:22:02 +0800 Lingjiang Fang wrote: ping for review padding zero after pps may lead to decode crash in same ipads btw, I am working on update fate cases to fit this bugfix > will give a wrong nalu length(+1) when next nalu start with 0001 > this bug will lead to an paddi

Re: [FFmpeg-devel] [PATCH 3/3] avcodec/mpeg4videodec: Replace always true check by assert

2022-05-16 Thread Andreas Rheinhardt
Michael Niedermayer: > Maybe helps coverity > Helps: CID1433771 > > Signed-off-by: Michael Niedermayer > --- > libavcodec/mpeg4videodec.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c > index e2bde73639..715cb6

[FFmpeg-devel] [PATCH v1] avformat/mpegts: fix avformat_find_stream_info take too time with open single video/audio TS stream

2022-05-16 Thread gaojiangjie
From: Jiangjie Gao 1. ref https://trac.ffmpeg.org/ticket/9782. 2. just check `codec_type`. 3. remove `pos > 10`, we have AVFormatContext::probesize. Signed-off-by: Jiangjie Gao --- libavformat/mpegts.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libavformat/m

[FFmpeg-devel] [PATCH] AV1 VDPAU hwaccel Decode support

2022-05-16 Thread ManojGuptaBonda
Support for VDPAU accelerated AV1 decoding was added with libvdpau-1.5. Support for the same in ffmpeg is added with this patch. Profiles related to VDPAU AV1 can be found in latest vdpau.h present in libvdpau-1.5. Add AV1 VDPAU to list of hwaccels and supported formats Added file vdpau_av1.c and

Re: [FFmpeg-devel] [PATCH] avutil/csp: create public API for colorspace structs

2022-05-16 Thread Leo Izen
On 5/15/22 12:32, Andreas Rheinhardt wrote: Leo Izen: +/* Returns AVCOL_PRI_UNSPECIFIED if no clear match can be identified */ +enum AVColorPrimaries av_detect_color_primaries(const struct ColorPrimaries *prm); + +const struct ColorPrimaries *av_get_color_primaries(enum AVColorPrimaries prm); +

Re: [FFmpeg-devel] [PATCH] avformat/jpegxl_probe: fix incorrect cw_mask probing

2022-05-16 Thread Leo Izen
On 5/1/22 15:39, Leo Izen wrote: Fix incorrectly skipping over the upX_weights if the cw_mask is present and it is not a multiple of 4. Bumping for review. - Leo Izen (thebombzen) ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg

[FFmpeg-devel] [PATCH] avformat/mov: Only read the primary item for AVIF

2022-05-16 Thread Vignesh Venkatasubramanian
Update the still AVIF parser to only read the primary item. With this patch, AVIF still images with exif/icc/alpha channel will no longer fail to parse. For example, this patch enables parsing of files in: https://github.com/AOMediaCodec/av1-avif/tree/master/testFiles/Microsoft Partially fixes tr

[FFmpeg-devel] [PATCH] avformat/img2: Add support for AVIF mux in image2

2022-05-16 Thread Vignesh Venkatasubramanian
Add support for AVIF muxing in the image2 muxer. Tested with this example: ffmpeg -lavfi testsrc=duration=1:size=320x320 -g 1 -flags global_header -c:v libaom-av1 -f image2 img-%2d.avif Signed-off-by: Vignesh Venkatasubramanian --- libavformat/img2enc.c | 4 +++- 1 file changed, 3 insertions(+

[FFmpeg-devel] [PATCH 1/7] avcodec/error_resilience: Only keep what is needed from MECmpContext

2022-05-16 Thread Andreas Rheinhardt
ERContext currently has an embedded MECmpContext, despite only needing exactly one function from it. This is wasteful because MECmpContext is pretty large (135 pointers, 1080 B for eight byte pointers). So keep only what is needed. Signed-off-by: Andreas Rheinhardt --- libavcodec/error_resilienc

[FFmpeg-devel] [PATCH 2/7] avcodec/mss2: Remove write-only QpelDSPContext

2022-05-16 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/mss2.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/libavcodec/mss2.c b/libavcodec/mss2.c index ab42d12217..228f66afc0 100644 --- a/libavcodec/mss2.c +++ b/libavcodec/mss2.c @@ -42,7 +42,6 @@ typedef struct MSS2Context { AVFrame

[FFmpeg-devel] [PATCH 3/7] avcodec/mpegvideo: Move float.h inclusion to mpegvideoenc.h

2022-05-16 Thread Andreas Rheinhardt
It is only needed for the options in mpegvideoenc.h. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegvideo.h| 2 -- libavcodec/mpegvideoenc.h | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h index 0f816e5807..a832369f

[FFmpeg-devel] [PATCH 4/7] avcodec/mpegvideoenc: Remove ineffective [pb]bias options

2022-05-16 Thread Andreas Rheinhardt
The user-provided value is overwritten in ff_mpv_encode_init() without having ever been read. (This has been broken when making these options mpegvideo-specific in commits 910247f1720c6aae422723c05dac6d0b19f20bec and cf7d2f2d2134c0854edf2db91e7436ac2bc9874f. No one has ever complained, so this comm

[FFmpeg-devel] [PATCH 5/7] avcodec/mjpegenc: Remove pointless motion-estimation options

2022-05-16 Thread Andreas Rheinhardt
(M)JPEG does not use motion estimation/motion vectors at all. These options therefore don't affect the output at all. So remove them. Signed-off-by: Andreas Rheinhardt --- libavcodec/ituh263enc.c| 2 ++ libavcodec/mpeg12enc.c | 2 ++ libavcodec/mpeg4videoenc.c | 1 + libavcodec/mpegvi

[FFmpeg-devel] [PATCH 6/7] avcodec/mpegvideoenc: Remove ineffective options

2022-05-16 Thread Andreas Rheinhardt
This commit removes the ineffective FF_MPV_DEPRECATED_ options, namely mpeg_quant (this is only an option for MPEG-4), a53cc (this is only an option for MPEG-2), force_duplicated_matrix (applies only to MJPEG) and b_strategy, b_sensitivity and brd_scale (these options only make sense for encoders s

[FFmpeg-devel] [PATCH 7/7] avcodec/mjpegenc: Remove ineffective pred option

2022-05-16 Thread Andreas Rheinhardt
Never did anything, so it is removed immediately. Signed-off-by: Andreas Rheinhardt --- libavcodec/mjpegenc.c | 6 -- libavcodec/mpegvideo.h | 4 libavcodec/version.h | 2 +- libavcodec/version_major.h | 1 - 4 files changed, 1 insertion(+), 12 deletions(-) diff --git a/

Re: [FFmpeg-devel] [PATCH v2] avcodec/libaomenc: Add unmet target level warning

2022-05-16 Thread Bohan Li
Another ping :) On Fri, Apr 29, 2022 at 2:46 PM Bohan Li wrote: > Gentle ping on this :) > > On Tue, Apr 19, 2022 at 11:20 AM Bohan Li wrote: > >> When target levels are set, this patch checks whether they are >> satisfied by libaom. If not, a warning is shown. Otherwise the output >> levels ar

Re: [FFmpeg-devel] [PATCH v2 1/2] avutil/wchar_filename, file_open: Support long file names on Windows

2022-05-16 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of nil- > admir...@mailo.com > Sent: Monday, May 16, 2022 10:12 AM > To: ffmpeg-devel@ffmpeg.org > Subject: Re: [FFmpeg-devel] [PATCH v2 1/2] avutil/wchar_filename, > file_open: Support long file names on Windows > > > +static inline

[FFmpeg-devel] [PATCH v3 0/2] Support long file names on Windows

2022-05-16 Thread ffmpegagent
This patchset adds support for long file and directory paths on Windows. The implementation follows the same logic that .NET is using internally, with the only exception that it doesn't expand short path components in 8.3 format. .NET does this as the same function is also used for other purposes,

[FFmpeg-devel] [PATCH v3 1/2] avutil/wchar_filename, file_open: Support long file names on Windows

2022-05-16 Thread softworkz
From: softworkz Signed-off-by: softworkz --- libavutil/file_open.c | 2 +- libavutil/wchar_filename.h | 166 + 2 files changed, 167 insertions(+), 1 deletion(-) diff --git a/libavutil/file_open.c b/libavutil/file_open.c index cc302f2f76..57c5e78d51 10

[FFmpeg-devel] [PATCH v3 2/2] avformat/os_support: Support long file names on Windows

2022-05-16 Thread softworkz
From: softworkz Signed-off-by: softworkz --- libavformat/os_support.h | 26 +- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/libavformat/os_support.h b/libavformat/os_support.h index 5e6b32d2dc..bd8c89568f 100644 --- a/libavformat/os_support.h +++ b/liba

Re: [FFmpeg-devel] [PATCH v4 06/10] libavformat/asfdec: fix macro definition and use

2022-05-16 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of > Andreas Rheinhardt > Sent: Monday, May 16, 2022 10:49 AM > To: ffmpeg-devel@ffmpeg.org > Subject: Re: [FFmpeg-devel] [PATCH v4 06/10] libavformat/asfdec: fix > macro definition and use > > Soft Works: > > > > > >> -Original M

Re: [FFmpeg-devel] [PATCH] avformat/oggparsevorbis: Fix oggvorbis duration parsing for small files

2022-05-16 Thread Guangyu Sun
On Mon, May 9, 2022 at 11:19 AM Guangyu Sun wrote: > On Thu, May 5, 2022 at 4:05 PM Guangyu Sun wrote: > >> The decoded Data is not returned from the first frame; it must be used >> to 'prime' the decode engine. The duration of the first packet should >> be ignored also by the container, to make

Re: [FFmpeg-devel] [PATCH 0/2] Support long file names on Windows

2022-05-16 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of nil- > admir...@mailo.com > Sent: Monday, May 16, 2022 10:45 AM > To: ffmpeg-devel@ffmpeg.org > Subject: Re: [FFmpeg-devel] [PATCH 0/2] Support long file names on > Windows > > > I have left those out by intention because they are

[FFmpeg-devel] [PATCH v3 0/2] use av_fopen_utf8() instead of plain fopen()

2022-05-16 Thread ffmpegagent
Unify file access operations by replacing usages of direct calls to posix fopen() v2: Remove changes to fftools for now v3: Add some additional replacements softworkz (2): avfilter: use av_fopen_utf8() instead of plain fopen() avfilter/dvdsubdec: use av_fopen_utf8() instead of plain fopen()

[FFmpeg-devel] [PATCH v3 1/2] avfilter: use av_fopen_utf8() instead of plain fopen()

2022-05-16 Thread softworkz
From: softworkz Signed-off-by: softworkz --- libavfilter/af_firequalizer.c | 2 +- libavfilter/vf_deshake.c | 2 +- libavfilter/vf_psnr.c | 2 +- libavfilter/vf_signature.c| 4 ++-- libavfilter/vf_ssim.c | 2 +- libavfilter/vf_vidstabdetect.c| 2

[FFmpeg-devel] [PATCH v3 2/2] avfilter/dvdsubdec: use av_fopen_utf8() instead of plain fopen()

2022-05-16 Thread softworkz
From: softworkz Signed-off-by: softworkz --- libavcodec/dvdsubdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c index 30fe4d41de..19b78b3eb1 100644 --- a/libavcodec/dvdsubdec.c +++ b/libavcodec/dvdsubdec.c @@ -617,7 +617,7