Re: [FFmpeg-devel] [PATCH 1/4] avcodec/bitpacked_enc: add support for uyvy422 encoding
On Sun, May 7, 2023 at 1:38 AM James Almer wrote: > Signed-off-by: James Almer > --- > libavcodec/bitpacked_enc.c | 27 ++- > 1 file changed, 26 insertions(+), 1 deletion(-) > > diff --git a/libavcodec/bitpacked_enc.c b/libavcodec/bitpacked_enc.c > index 3c4e11293d..cbca38006b 100644 > --- a/libavcodec/bitpacked_enc.c > +++ b/libavcodec/bitpacked_enc.c > @@ -25,12 +25,36 @@ > #include "encode.h" > #include "internal.h" > #include "put_bits.h" > +#include "libavutil/imgutils.h" > #include "libavutil/pixdesc.h" > > struct BitpackedContext { > int (*encode)(AVCodecContext *avctx, AVPacket *pkt, const AVFrame > *frame); > }; > > +static int encode_uyvy422(AVCodecContext *avctx, AVPacket *pkt, const > AVFrame *frame) > +{ > +int ret = av_image_get_buffer_size(frame->format, > + frame->width, frame->height, 1); > + > +if (ret < 0) > +return ret; > + > +ret = ff_get_encode_buffer(avctx, pkt, ret, 0); > +if (ret < 0) > +return ret; > + > +ret = av_image_copy_to_buffer(pkt->data, pkt->size, > + (const uint8_t **)frame->data, > frame->linesize, > + frame->format, > + frame->width, frame->height, 1); > + > +if (ret < 0) > +return ret; > + > +return 0; > +} > + > I prefer to bitpack will used for 10-bit 4:2:2 packed format. uyvy422 should use rawvideo as it'll passthrough directly. static int encode_yuv422p10(AVCodecContext *avctx, AVPacket *pkt, const > AVFrame *frame) > { > const int buf_size = avctx->height * avctx->width * > avctx->bits_per_coded_sample / 8; > @@ -85,7 +109,7 @@ static av_cold int encode_init(AVCodecContext *avctx) > if (avctx->pix_fmt == AV_PIX_FMT_YUV422P10) > s->encode = encode_yuv422p10; > else > -return AVERROR(EINVAL); > +s->encode = encode_uyvy422; > > return 0; > } > @@ -115,5 +139,6 @@ const FFCodec ff_bitpacked_encoder = { > .init = encode_init, > FF_CODEC_ENCODE_CB(encode_frame), > .p.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV422P10, > +AV_PIX_FMT_UYVY422, > AV_PIX_FMT_NONE }, > }; > -- > 2.40.1 > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH v6 1/6] ccfifo: Properly handle CEA-708 captions through framerate conversion
LGTM for the patchset. On Sat, May 6, 2023 at 2:13 AM Devin Heitmueller < devin.heitmuel...@ltnglobal.com> wrote: > When transcoding video that contains 708 closed captions, the > caption data is tied to the frames as side data. Simply dropping > or adding frames to change the framerate will result in loss of > data, so the caption data needs to be preserved and reformatted. > > For example, without this patch converting 720p59 to 1080i59 > would result in loss of 50% of the caption bytes, resulting in > garbled 608 captions and 708 probably wouldn't render at all. > Further, the frames that are there will have an illegal > cc_count for the target framerate, so some decoders may ignore > the packets entirely. > > Extract the 608 and 708 tuples and insert them onto queues. Then > after dropping/adding frames, re-write the tuples back into the > resulting frames at the appropriate rate given the target > framerate. This includes both having the correct cc_count as > well as clocking out the 608 pairs at the appropriate rate. > > Thanks to Lance Wang , Anton > Khirnov , and Michael Niedermayer < > mich...@niedermayer.cc> > for providing review/feedback. > > Signed-off-by: Devin Heitmueller > --- > libavfilter/Makefile | 1 + > libavfilter/ccfifo.c | 224 > +++ > libavfilter/ccfifo.h | 110 + > 3 files changed, 335 insertions(+) > create mode 100644 libavfilter/ccfifo.c > create mode 100644 libavfilter/ccfifo.h > > diff --git a/libavfilter/Makefile b/libavfilter/Makefile > index 482aeaf..68c8f14 100644 > --- a/libavfilter/Makefile > +++ b/libavfilter/Makefile > @@ -14,6 +14,7 @@ OBJS = allfilters.o >\ > buffersink.o \ > buffersrc.o \ > colorspace.o \ > + ccfifo.o \ > drawutils.o \ > fifo.o \ > formats.o\ > diff --git a/libavfilter/ccfifo.c b/libavfilter/ccfifo.c > new file mode 100644 > index 000..5fb68ce > --- /dev/null > +++ b/libavfilter/ccfifo.c > @@ -0,0 +1,224 @@ > +/* > + * CEA-708 Closed Captioning FIFO > + * Copyright (c) 2023 LTN Global Communications > + * > + * Author: Devin Heitmueller > + * > + * 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 "ccfifo.h" > + > +struct AVCCFifo { > +AVFifo *cc_608_fifo; > +AVFifo *cc_708_fifo; > +AVRational framerate; > +int expected_cc_count; > +int expected_608; > +int cc_detected; > +int passthrough; > +int passthrough_warning; > +void *log_ctx; > +}; > + > +#define MAX_CC_ELEMENTS 128 > +#define CC_BYTES_PER_ENTRY 3 > + > +struct cc_lookup { > +int num; > +int den; > +int cc_count; > +int num_608; > +}; > + > +const static struct cc_lookup cc_lookup_vals[] = { > +{ 15, 1, 40, 4 }, > +{ 24, 1, 25, 3 }, > +{ 24000, 1001, 25, 3 }, > +{ 30, 1, 20, 2 }, > +{ 3, 1001, 20, 2}, > +{ 60, 1, 10, 1 }, > +{ 6, 1001, 10, 1}, > +}; > + > +void ff_ccfifo_freep(AVCCFifo **ccf) > +{ > +AVCCFifo *tmp = *ccf; > +if (tmp) { > +av_fifo_freep2(&tmp->cc_608_fifo); > +av_fifo_freep2(&tmp->cc_708_fifo); > +} > +av_freep(ccf); > +} > + > +AVCCFifo *ff_ccfifo_alloc(AVRational framerate, void *log_ctx) > +{ > +AVCCFifo *ccf; > +int i; > + > +ccf = av_mallocz(sizeof(*ccf)); > +if (!ccf) > +return NULL; > + > +ccf->log_ctx = log_ctx; > +ccf->framerate = framerate; > + > +if (!(ccf->cc_708_fifo = av_fifo_alloc2(MAX_CC_ELEMENTS, > CC_BYTES_PER_ENTRY, 0))) > +goto error; > + > +if (!(ccf->cc_608_fifo = av_fifo_alloc2(MAX_CC_ELEMENTS, > CC_BYTES_PER_ENTRY, 0))) > +goto error; > + > +/* Based on the target FPS, figure out the expected cc_count and > number of > + 608 tuples per packet. See ANSI/CTA-708-E Sec 4.3.6.1. */ > +
Re: [FFmpeg-devel] [PATCH] avcodec/mediacodec: Add VP8 encoder
On Fri, 2023-04-28 at 11:07 +, Samuel Raposo Vieira Mira wrote: > Connected FFmpeg to Mediacodec VP8 encoder. > Minor Version bump. > --- > configure | 1 + > libavcodec/Makefile | 1 + > libavcodec/allcodecs.c | 1 + > libavcodec/mediacodec_wrapper.c | 4 > libavcodec/mediacodecenc.c | 29 + > libavcodec/version.h| 2 +- > 6 files changed, 37 insertions(+), 1 deletion(-) The patch file format is broken (missing a space before unchanged lines). Please send it via git send-email or add the patch as attachment. > > @@ -387,6 +389,8 @@ int > ff_AMediaCodecProfile_getProfileFromAVCodecContext(AVCodecContext *avctx) > case FF_PROFILE_HEVC_MAIN_10: > return HEVCProfileMain10; > } > +} else if (avctx->codec_id == AV_CODEC_ID_VP8) { > +return VP8ProfileMain; > } else if (avctx->codec_id == AV_CODEC_ID_VP9) { > switch (avctx->profile) { > case FF_PROFILE_VP9_0: The function is a map from avctx->profile to MediaCodec profile. It's not supposed to select a default profile. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH v2] avcodec/mediacodec: Add AV1 encoder
On Tue, 2023-05-02 at 12:22 +, Samuel Raposo Vieira Mira wrote: > @@ -3162,6 +3162,7 @@ aac_mf_encoder_deps="mediafoundation" > ac3_mf_encoder_deps="mediafoundation" > av1_cuvid_decoder_deps="cuvid CUVIDAV1PICPARAMS" > av1_mediacodec_decoder_deps="mediacodec" > +av1_mediacodec_encoder_deps="mediacodec" This patch format is broken too. > > diff --git a/libavcodec/mediacodec_wrapper.c b/libavcodec/mediacodec_wrapper.c > index 1c29bb7406..015f275a0f 100644 > --- a/libavcodec/mediacodec_wrapper.c > +++ b/libavcodec/mediacodec_wrapper.c > @@ -35,6 +35,8 @@ > #include "ffjni.h" > #include "mediacodec_wrapper.h" > +#include "libavutil/pixdesc.h" > + Please keep the include in some order. > struct JNIAMediaCodecListFields { > jclass mediacodec_list_class; > @@ -345,6 +347,11 @@ int > ff_AMediaCodecProfile_getProfileFromAVCodecContext(AVCodecContext *avctx) > static const int MPEG4ProfileAdvancedScalable = 0x4000; > static const int MPEG4ProfileAdvancedSimple = 0x8000; Missing an empty line between MPEG4 and AV1. > +static const int AV1ProfileMain8 = 0x1; > +static const int AV1ProfileMain10 = 0x2; > +static const int AV1ProfileMain10HDR10 = 0x1000; > +static const int AV1ProfileMain10HDR10Plus = 0x2000; > + > // Unused yet. > (void)AVCProfileConstrainedHigh; > (void)HEVCProfileMain10HDR10; > @@ -353,6 +360,8 @@ int > ff_AMediaCodecProfile_getProfileFromAVCodecContext(AVCodecContext *avctx) > (void)VP9Profile3HDR; > (void)VP9Profile2HDR10Plus; > (void)VP9Profile3HDR10Plus; > +(void)AV1ProfileMain10HDR10; > +(void)AV1ProfileMain10HDR10Plus; > if (avctx->codec_id == AV_CODEC_ID_H264) { > switch(avctx->profile) { > @@ -436,6 +445,9 @@ int > ff_AMediaCodecProfile_getProfileFromAVCodecContext(AVCodecContext *avctx) > default: > break; > } > +} else if(avctx->codec_id == AV_CODEC_ID_AV1) { > +const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt); > +return desc != NULL && desc->comp[0].depth == 8? AV1ProfileMain8 : > AV1ProfileMain10; > } I'm not sure about how mediacodec handles 10bit encoding and need some tests. Let's keep the function simple first by just map avctx->profile to MediaCodec profile. > return -1; > diff --git a/libavcodec/mediacodecenc.c b/libavcodec/mediacodecenc.c > index e4b583a542..10da43c3e7 100644 > --- a/libavcodec/mediacodecenc.c > +++ b/libavcodec/mediacodecenc.c > @@ -170,6 +170,9 @@ static av_cold int mediacodec_init(AVCodecContext *avctx) > case AV_CODEC_ID_MPEG4: > codec_mime = "video/mp4v-es"; > break; > +case AV_CODEC_ID_AV1: > +codec_mime = "video/av01"; > +break; > default: > av_assert0(0); > } > @@ -779,16 +782,16 @@ DECLARE_MEDIACODEC_ENCODER(hevc, "H.265", > AV_CODEC_ID_HEVC) > enum MediaCodecVP9Level { > VP9Level1 = 0x1, > -VP9Level11 = 0x2, > +VP9Level11 = 0x2, > VP9Level2 = 0x4, > -VP9Level21 = 0x8, > -VP9Level3 = 0x10, > +VP9Level21 = 0x8, > +VP9Level3 = 0x10, > VP9Level31 = 0x20, > VP9Level4 = 0x40, > -VP9Level41 = 0x80, > -VP9Level5 = 0x100, > +VP9Level41 = 0x80, > +VP9Level5 = 0x100, > VP9Level51 = 0x200, > -VP9Level52 = 0x400, > +VP9Level52 = 0x400, > VP9Level6 = 0x800, > VP9Level61 = 0x1000, > VP9Level62 = 0x2000, > @@ -837,15 +840,15 @@ DECLARE_MEDIACODEC_ENCODER(vp9, "VP9", AV_CODEC_ID_VP9) > enum MediaCodecMpeg4Level { > MPEG4Level0 = 0x01, > -MPEG4Level0b = 0x02, > -MPEG4Level1 = 0x04, > +MPEG4Level0b = 0x02, > +MPEG4Level1 = 0x04, > MPEG4Level2 = 0x08, > -MPEG4Level3 = 0x10, > +MPEG4Level3 = 0x10, > MPEG4Level3b = 0x18, > -MPEG4Level4 = 0x20, > -MPEG4Level4a = 0x40, > +MPEG4Level4 = 0x20, > +MPEG4Level4a = 0x40, > MPEG4Level5 = 0x80, > -MPEG4Level6 = 0x100, > +MPEG4Level6 = 0x100, > }; Don't do unrelated code format in this patch. By the way, which hardware did you use to run the test? ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH] avdevice/lavfi: fix crash on unconnected outpads
Nameless outpads would cause an invocation to sscanf with NULL. Example: ffmpeg -f lavfi -i 'nullsrc;nullsrc' - Changed to throwing an error instead. --- libavdevice/lavfi.c | 5 + 1 file changed, 5 insertions(+) diff --git a/libavdevice/lavfi.c b/libavdevice/lavfi.c index 9c1fcf334b..21f33ade0e 100644 --- a/libavdevice/lavfi.c +++ b/libavdevice/lavfi.c @@ -174,6 +174,11 @@ av_cold static int lavfi_read_header(AVFormatContext *avctx) * create a mapping between them and the streams */ for (i = 0, inout = output_links; inout; i++, inout = inout->next) { int stream_idx = 0, suffix = 0, use_subcc = 0; +if (!inout->name) { +av_log(avctx, AV_LOG_ERROR, + "Filtergraph has nameless outpads\n"); +FAIL(AVERROR(EINVAL)); +} sscanf(inout->name, "out%n%d%n", &suffix, &stream_idx, &suffix); if (!suffix) { av_log(avctx, AV_LOG_ERROR, -- 2.40.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] tiny documentation fix
Hello, I found a mistake in the documentation, a parameter that was copy/pasted but not updated. In filters.texi, the documentation for the colorcorrect filter describes "rh" as "red highlight spot" and "bh" also as "red highlight spot". I'm reasonably confident it should say "blue highlight spot". https://github.com/FFmpeg/FFmpeg/compare/master...logiclrd:FFmpeg:patch-1 Do with this information what you will. :-) Thanks, Jonathan Gilbert ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 06/13] lavc/libdav1d: fix exporting framerate
Same issues as in the previous commit. --- libavcodec/libdav1d.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavcodec/libdav1d.c b/libavcodec/libdav1d.c index 87aed16749..19b6a880da 100644 --- a/libavcodec/libdav1d.c +++ b/libavcodec/libdav1d.c @@ -154,11 +154,11 @@ static void libdav1d_init_params(AVCodecContext *c, const Dav1dSequenceHeader *s else c->pix_fmt = pix_fmt[seq->layout][seq->hbd]; -if (seq->num_units_in_tick && seq->time_scale) { +if (seq->num_units_in_tick && seq->time_scale && +seq->num_ticks_per_picture < INT_MAX / seq->num_units_in_tick) { av_reduce(&c->framerate.den, &c->framerate.num, - seq->num_units_in_tick, seq->time_scale, INT_MAX); -if (seq->equal_picture_interval) -c->ticks_per_frame = seq->num_ticks_per_picture; + seq->num_units_in_tick * FFMAX(seq->num_ticks_per_picture, 1), + seq->time_scale, INT_MAX); } if (seq->film_grain_present) -- 2.39.2 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 07/13] lavc/ratecontrol: use AVCodecContext.framerate when available
--- libavcodec/ratecontrol.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/ratecontrol.c b/libavcodec/ratecontrol.c index 6a40f9cbdc..890ae33cb3 100644 --- a/libavcodec/ratecontrol.c +++ b/libavcodec/ratecontrol.c @@ -57,6 +57,9 @@ void ff_write_pass1_stats(MpegEncContext *s) static double get_fps(AVCodecContext *avctx) { +if (avctx->framerate.num > 0 && avctx->framerate.den > 0) +return av_q2d(avctx->framerate); + return 1.0 / av_q2d(avctx->time_base) / FFMAX(avctx->ticks_per_frame, 1); } -- 2.39.2 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 05/13] lavc/av1*: fix exporting framerate
* take num_ticks_per_picture_minus_1 into account, since that is a part of the framerate computation * stop exporting num_ticks_per_picture_minus_1 into AVCodecContext.ticks_per_frame, as that field is used for other purposes (in conjunction with repeat_pict, which is not used at all by av1) --- libavcodec/Makefile | 2 +- libavcodec/av1_parse.c | 15 +++ libavcodec/av1_parse.h | 4 libavcodec/av1_parser.c | 9 - libavcodec/av1dec.c | 12 +++- 5 files changed, 27 insertions(+), 15 deletions(-) diff --git a/libavcodec/Makefile b/libavcodec/Makefile index b0971ce833..8162bcf4fa 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -1143,7 +1143,7 @@ OBJS-$(CONFIG_AC3_PARSER) += aac_ac3_parser.o ac3tab.o \ ac3_channel_layout_tab.o OBJS-$(CONFIG_ADX_PARSER) += adx_parser.o OBJS-$(CONFIG_AMR_PARSER) += amr_parser.o -OBJS-$(CONFIG_AV1_PARSER) += av1_parser.o +OBJS-$(CONFIG_AV1_PARSER) += av1_parser.o av1_parse.o OBJS-$(CONFIG_AVS2_PARSER) += avs2.o avs2_parser.o OBJS-$(CONFIG_AVS3_PARSER) += avs3_parser.o OBJS-$(CONFIG_BMP_PARSER) += bmp_parser.o diff --git a/libavcodec/av1_parse.c b/libavcodec/av1_parse.c index 59ea0bc6e7..cf325e09b9 100644 --- a/libavcodec/av1_parse.c +++ b/libavcodec/av1_parse.c @@ -24,6 +24,7 @@ #include "av1.h" #include "av1_parse.h" +#include "cbs_av1.h" #include "bytestream.h" int ff_av1_extract_obu(AV1OBU *obu, const uint8_t *buf, int length, void *logctx) @@ -108,3 +109,17 @@ void ff_av1_packet_uninit(AV1Packet *pkt) av_freep(&pkt->obus); pkt->obus_allocated = pkt->obus_allocated_size = 0; } + +AVRational ff_av1_framerate(const AV1RawTimingInfo *ti) +{ +const int ticks = ti->num_ticks_per_picture_minus_1 + 1; +AVRational fr = (AVRational){ 0, 1 }; + +if (ti->num_units_in_display_tick && ti->time_scale && +ticks < INT_MAX / ti->num_units_in_display_tick) { +av_reduce(&fr.den, &fr.num, ti->num_units_in_display_tick * ticks, + ti->time_scale, INT_MAX); +} + +return fr; +} diff --git a/libavcodec/av1_parse.h b/libavcodec/av1_parse.h index f4a5d2830e..60a6fd0ba2 100644 --- a/libavcodec/av1_parse.h +++ b/libavcodec/av1_parse.h @@ -181,4 +181,8 @@ static inline int get_obu_bit_length(const uint8_t *buf, int size, int type) return size; } +struct AV1RawTimingInfo; + +AVRational ff_av1_framerate(const struct AV1RawTimingInfo *ti); + #endif /* AVCODEC_AV1_PARSE_H */ diff --git a/libavcodec/av1_parser.c b/libavcodec/av1_parser.c index 14dae92fe9..978bbebe30 100644 --- a/libavcodec/av1_parser.c +++ b/libavcodec/av1_parser.c @@ -21,6 +21,8 @@ */ #include "libavutil/avassert.h" + +#include "av1_parse.h" #include "cbs.h" #include "cbs_av1.h" #include "parser.h" @@ -162,11 +164,8 @@ static int av1_parser_parse(AVCodecParserContext *ctx, avctx->color_trc = (enum AVColorTransferCharacteristic) color->transfer_characteristics; avctx->color_range = color->color_range ? AVCOL_RANGE_JPEG : AVCOL_RANGE_MPEG; -if (seq->timing_info_present_flag) { -const AV1RawTimingInfo *timing = &seq->timing_info; -av_reduce(&avctx->framerate.den, &avctx->framerate.num, - timing->num_units_in_display_tick, timing->time_scale, INT_MAX); -} +if (seq->timing_info_present_flag) +avctx->framerate = ff_av1_framerate(&seq->timing_info); end: ff_cbs_fragment_reset(td); diff --git a/libavcodec/av1dec.c b/libavcodec/av1dec.c index c90c9c1a69..693673b436 100644 --- a/libavcodec/av1dec.c +++ b/libavcodec/av1dec.c @@ -26,6 +26,7 @@ #include "libavutil/pixdesc.h" #include "libavutil/opt.h" #include "avcodec.h" +#include "av1_parse.h" #include "av1dec.h" #include "atsc_a53.h" #include "bytestream.h" @@ -709,15 +710,8 @@ static int set_context_with_sequence(AVCodecContext *avctx, } avctx->sample_aspect_ratio = (AVRational) { 1, 1 }; -if (seq->timing_info.num_units_in_display_tick && -seq->timing_info.time_scale) { -av_reduce(&avctx->framerate.den, &avctx->framerate.num, - seq->timing_info.num_units_in_display_tick, - seq->timing_info.time_scale, - INT_MAX); -if (seq->timing_info.equal_picture_interval) -avctx->ticks_per_frame = seq->timing_info.num_ticks_per_picture_minus_1 + 1; -} +if (seq->timing_info_present_flag) +avctx->framerate = ff_av1_framerate(&seq->timing_info); return 0; } -- 2.39.2 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 09/13] libaomenc: use AVCodecContext.framerate when available
--- libavcodec/libaomenc.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libavcodec/libaomenc.c b/libavcodec/libaomenc.c index 0b88102c77..1d3a4ae64c 100644 --- a/libavcodec/libaomenc.c +++ b/libavcodec/libaomenc.c @@ -1295,8 +1295,12 @@ static int aom_encode(AVCodecContext *avctx, AVPacket *pkt, if (frame->duration > ULONG_MAX) { av_log(avctx, AV_LOG_WARNING, "Frame duration too large: %"PRId64"\n", frame->duration); -} else -duration = frame->duration ? frame->duration : avctx->ticks_per_frame; +} else if (frame->duration) +duration = frame->duration; +else if (avctx->framerate.num > 0 && avctx->framerate.den > 0) +duration = av_rescale_q(1, av_inv_q(avctx->framerate), avctx->time_base); +else +duration = avctx->ticks_per_frame ? avctx->ticks_per_frame : 1; switch (frame->color_range) { case AVCOL_RANGE_MPEG: -- 2.39.2 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 10/13] lavc/libkvazaar, libopenh264enc: drop redundant checks
The same check is present in encode_preinit_video(). --- libavcodec/libkvazaar.c | 5 - libavcodec/libopenh264enc.c | 5 - 2 files changed, 10 deletions(-) diff --git a/libavcodec/libkvazaar.c b/libavcodec/libkvazaar.c index 168486f4ec..b3faa0a64b 100644 --- a/libavcodec/libkvazaar.c +++ b/libavcodec/libkvazaar.c @@ -85,11 +85,6 @@ static av_cold int libkvazaar_init(AVCodecContext *avctx) cfg->framerate_num = avctx->framerate.num; cfg->framerate_denom = avctx->framerate.den; } else { -if (avctx->ticks_per_frame > INT_MAX / avctx->time_base.num) { -av_log(avctx, AV_LOG_ERROR, - "Could not set framerate for kvazaar: integer overflow\n"); -return AVERROR(EINVAL); -} cfg->framerate_num = avctx->time_base.den; cfg->framerate_denom = avctx->time_base.num * avctx->ticks_per_frame; } diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c index 3c605fe8ea..15c3822824 100644 --- a/libavcodec/libopenh264enc.c +++ b/libavcodec/libopenh264enc.c @@ -139,11 +139,6 @@ static av_cold int svc_encode_init(AVCodecContext *avctx) if (avctx->framerate.num > 0 && avctx->framerate.den > 0) { param.fMaxFrameRate = av_q2d(avctx->framerate); } else { -if (avctx->ticks_per_frame > INT_MAX / avctx->time_base.num) { -av_log(avctx, AV_LOG_ERROR, - "Could not set framerate for libopenh264enc: integer overflow\n"); -return AVERROR(EINVAL); -} param.fMaxFrameRate = 1.0 / av_q2d(avctx->time_base) / FFMAX(avctx->ticks_per_frame, 1); } param.iPicWidth = avctx->width; -- 2.39.2 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 01/13] lavu/frame: extend AVFrame.repeat_pict documentation
--- libavutil/frame.h | 18 -- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/libavutil/frame.h b/libavutil/frame.h index f2b56beebb..ed3f199ce1 100644 --- a/libavutil/frame.h +++ b/libavutil/frame.h @@ -491,8 +491,22 @@ typedef struct AVFrame { void *opaque; /** - * When decoding, this signals how much the picture must be delayed. - * extra_delay = repeat_pict / (2*fps) + * Number of fields in this frame which should be repeated, i.e. the total + * duration of this frame should be repeat_pict + 2 normal field durations. + * + * For interlaced frames this field may be set to 1, which signals that this + * frame should be presented as 3 fields: beginning with the first field (as + * determined by AV_FRAME_FLAG_TOP_FIELD_FIRST being set or not), followed + * by the second field, and then the first field again. + * + * For progressive frames this field may be set to a multiple of 2, which + * signals that this frame's duration should be (repeat_pict + 2) / 2 + * normal frame durations. + * + * @note This field is computed from MPEG2 repeat_first_field flag and its + * associated flags, H.264 pic_struct from picture timing SEI, and + * their analogues in other codecs. Typically it should only be used when + * higher-layer timing information is not available. */ int repeat_pict; -- 2.39.2 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 08/13] lavc/msmpeg4enc: use AVCodecContext.framerate when available
--- libavcodec/msmpeg4enc.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libavcodec/msmpeg4enc.c b/libavcodec/msmpeg4enc.c index 54121438a0..df190d376c 100644 --- a/libavcodec/msmpeg4enc.c +++ b/libavcodec/msmpeg4enc.c @@ -280,7 +280,13 @@ void ff_msmpeg4_encode_picture_header(MpegEncContext * s) void ff_msmpeg4_encode_ext_header(MpegEncContext * s) { -unsigned fps = s->avctx->time_base.den / s->avctx->time_base.num / FFMAX(s->avctx->ticks_per_frame, 1); +unsigned fps; + +if (s->avctx->framerate.num > 0 && s->avctx->framerate.den > 0) +fps = s->avctx->framerate.num / s->avctx->framerate.den; +else +fps = s->avctx->time_base.den / s->avctx->time_base.num / FFMAX(s->avctx->ticks_per_frame, 1); + put_bits(&s->pb, 5, FFMIN(fps, 31)); //yes 29.97 -> 29 put_bits(&s->pb, 11, FFMIN(s->bit_rate / 1024, 2047)); -- 2.39.2 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 13/13] fftools/ffmpeg: stop using deprecated ticks_per_frame
--- fftools/ffmpeg.c | 13 +++-- fftools/ffmpeg.h | 1 + fftools/ffmpeg_demux.c | 2 ++ 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 4e45ab74b9..a731b4bd7d 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -1516,12 +1516,13 @@ static int process_input_packet(InputStream *ist, const AVPacket *pkt, int no_eo } else if (pkt->duration) { ist->next_dts += av_rescale_q(pkt->duration, pkt->time_base, AV_TIME_BASE_Q); } else if(ist->dec_ctx->framerate.num != 0) { -int ticks = ist->last_pkt_repeat_pict >= 0 ? -ist->last_pkt_repeat_pict + 1 : -ist->dec_ctx->ticks_per_frame; -ist->next_dts += ((int64_t)AV_TIME_BASE * - ist->dec_ctx->framerate.den * ticks) / - ist->dec_ctx->framerate.num / ist->dec_ctx->ticks_per_frame; +int fields = (ist->codec_desc && + (ist->codec_desc->props & AV_CODEC_PROP_FIELDS)) ? + ist->last_pkt_repeat_pict + 1 : 2; +AVRational field_rate = av_mul_q(ist->dec_ctx->framerate, + (AVRational){ 2, 1 }); + +ist->next_dts += av_rescale_q(fields, av_inv_q(field_rate), AV_TIME_BASE_Q); } break; } diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index b6389d7f99..0cceffbe9b 100644 --- a/fftools/ffmpeg.h +++ b/fftools/ffmpeg.h @@ -354,6 +354,7 @@ typedef struct InputStream { AVCodecParameters *par; AVCodecContext *dec_ctx; const AVCodec *dec; +const AVCodecDescriptor *codec_desc; AVFrame *decoded_frame; AVPacket *pkt; diff --git a/fftools/ffmpeg_demux.c b/fftools/ffmpeg_demux.c index 26426c7ac1..6f26e4226d 100644 --- a/fftools/ffmpeg_demux.c +++ b/fftools/ffmpeg_demux.c @@ -941,6 +941,8 @@ static void add_input_streams(const OptionsContext *o, Demuxer *d) av_log(ist, AV_LOG_ERROR, "Error initializing the decoder context.\n"); exit_program(1); } + +ist->codec_desc = avcodec_descriptor_get(ist->par->codec_id); } } -- 2.39.2 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 11/13] lavc/libvpxenc: send frame durations to the encoder
Adapt similar code from libaomenc - stop using ticks_per_frame except as a last resort. --- libavcodec/libvpxenc.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c index a20e949842..a89497665b 100644 --- a/libavcodec/libvpxenc.c +++ b/libavcodec/libvpxenc.c @@ -1692,6 +1692,7 @@ static int vpx_encode(AVCodecContext *avctx, AVPacket *pkt, const struct vpx_codec_enc_cfg *enccfg = ctx->encoder.config.enc; vpx_svc_layer_id_t layer_id; int layer_id_valid = 0; +unsigned long duration; if (avctx->qmax >= 0 && enccfg->rc_max_quantizer != avctx->qmax) { struct vpx_codec_enc_cfg cfg = *enccfg; @@ -1820,8 +1821,18 @@ static int vpx_encode(AVCodecContext *avctx, AVPacket *pkt, #endif } +if (frame && frame->duration > ULONG_MAX) { +av_log(avctx, AV_LOG_WARNING, + "Frame duration too large: %"PRId64"\n", frame->duration); +} else if (frame && frame->duration) +duration = frame->duration; +else if (avctx->framerate.num > 0 && avctx->framerate.den > 0) +duration = av_rescale_q(1, av_inv_q(avctx->framerate), avctx->time_base); +else +duration = avctx->ticks_per_frame ? avctx->ticks_per_frame : 1; + res = vpx_codec_encode(&ctx->encoder, rawimg, timestamp, - avctx->ticks_per_frame, flags, ctx->deadline); + duration, flags, ctx->deadline); if (res != VPX_CODEC_OK) { log_encoder_error(avctx, "Error encoding frame"); return AVERROR_INVALIDDATA; @@ -1829,7 +1840,7 @@ static int vpx_encode(AVCodecContext *avctx, AVPacket *pkt, if (ctx->is_alpha) { res = vpx_codec_encode(&ctx->encoder_alpha, rawimg_alpha, timestamp, - avctx->ticks_per_frame, flags, ctx->deadline); + duration, flags, ctx->deadline); if (res != VPX_CODEC_OK) { log_encoder_error(avctx, "Error encoding alpha frame"); return AVERROR_INVALIDDATA; -- 2.39.2 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 12/13] lavc: deprecate AVCodecContext.ticks_per_frame
For encoding, this field is entirely redundant with AVCodecContext.framerate. For decoding, this field is entirely redundant with AV_CODEC_PROP_FIELDS. --- doc/codecs.texi | 1 - libavcodec/amfenc_av1.c | 8 +++- libavcodec/amfenc_h264.c | 8 +++- libavcodec/amfenc_hevc.c | 8 +++- libavcodec/avcodec.h | 8 libavcodec/encode.c | 4 libavcodec/h264_slice.c | 2 +- libavcodec/h264dec.c | 4 libavcodec/libaomenc.c| 8 +++- libavcodec/libkvazaar.c | 8 +++- libavcodec/libopenh264enc.c | 8 +++- libavcodec/librav1e.c | 9 +++-- libavcodec/libsvtav1.c| 8 +++- libavcodec/libvpxenc.c| 8 +++- libavcodec/libx264.c | 8 +++- libavcodec/libx265.c | 8 +++- libavcodec/mfenc.c| 4 libavcodec/mpeg12dec.c| 8 libavcodec/mpegvideo_parser.c | 8 libavcodec/msmpeg4enc.c | 8 +++- libavcodec/nvenc.c| 16 ++-- libavcodec/options_table.h| 2 ++ libavcodec/pthread_frame.c| 4 libavcodec/ratecontrol.c | 8 +++- libavcodec/vc1.c | 11 --- libavcodec/vc1_parser.c | 3 +-- libavcodec/vc1dec.c | 1 - libavcodec/version_major.h| 1 + libavformat/avformat.c| 15 +-- 29 files changed, 171 insertions(+), 26 deletions(-) diff --git a/doc/codecs.texi b/doc/codecs.texi index 1adacd2b59..f903dad754 100644 --- a/doc/codecs.texi +++ b/doc/codecs.texi @@ -775,7 +775,6 @@ Possible values: @end table @item rc_max_vbv_use @var{float} (@emph{encoding,video}) @item rc_min_vbv_use @var{float} (@emph{encoding,video}) -@item ticks_per_frame @var{integer} (@emph{decoding/encoding,audio,video}) @item color_primaries @var{integer} (@emph{decoding/encoding,video}) Possible values: diff --git a/libavcodec/amfenc_av1.c b/libavcodec/amfenc_av1.c index 8093cb7357..ad09b7910a 100644 --- a/libavcodec/amfenc_av1.c +++ b/libavcodec/amfenc_av1.c @@ -117,7 +117,13 @@ static av_cold int amf_encode_init_av1(AVCodecContext* avctx) framerate = AMFConstructRate(avctx->framerate.num, avctx->framerate.den); } else { -framerate = AMFConstructRate(avctx->time_base.den, avctx->time_base.num * avctx->ticks_per_frame); +FF_DISABLE_DEPRECATION_WARNINGS +framerate = AMFConstructRate(avctx->time_base.den, avctx->time_base.num +#if FF_API_TICKS_PER_FRAME + * avctx->ticks_per_frame +#endif + ); +FF_ENABLE_DEPRECATION_WARNINGS } if ((ret = ff_amf_encode_init(avctx)) < 0) diff --git a/libavcodec/amfenc_h264.c b/libavcodec/amfenc_h264.c index eaf7f974f3..d2fc33971b 100644 --- a/libavcodec/amfenc_h264.c +++ b/libavcodec/amfenc_h264.c @@ -142,7 +142,13 @@ static av_cold int amf_encode_init_h264(AVCodecContext *avctx) if (avctx->framerate.num > 0 && avctx->framerate.den > 0) { framerate = AMFConstructRate(avctx->framerate.num, avctx->framerate.den); } else { -framerate = AMFConstructRate(avctx->time_base.den, avctx->time_base.num * avctx->ticks_per_frame); +FF_DISABLE_DEPRECATION_WARNINGS +framerate = AMFConstructRate(avctx->time_base.den, avctx->time_base.num +#if FF_API_TICKS_PER_FRAME + * avctx->ticks_per_frame +#endif + ); +FF_ENABLE_DEPRECATION_WARNINGS } if ((ret = ff_amf_encode_init(avctx)) != 0) diff --git a/libavcodec/amfenc_hevc.c b/libavcodec/amfenc_hevc.c index 9b46946f1e..674a4095d6 100644 --- a/libavcodec/amfenc_hevc.c +++ b/libavcodec/amfenc_hevc.c @@ -109,7 +109,13 @@ static av_cold int amf_encode_init_hevc(AVCodecContext *avctx) if (avctx->framerate.num > 0 && avctx->framerate.den > 0) { framerate = AMFConstructRate(avctx->framerate.num, avctx->framerate.den); } else { -framerate = AMFConstructRate(avctx->time_base.den, avctx->time_base.num * avctx->ticks_per_frame); +FF_DISABLE_DEPRECATION_WARNINGS +framerate = AMFConstructRate(avctx->time_base.den, avctx->time_base.num +#if FF_API_TICKS_PER_FRAME + * avctx->ticks_per_frame +#endif + ); +FF_ENABLE_DEPRECATION_WARNINGS } if ((ret = ff_amf_encode_init(avctx)) < 0) diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 1e91b9cb53..06b1a120ab 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -556,14 +556,22 @@ typedef struct AVCodecContext { */ AVRational time_base; +#if FF_API_TICKS_PER_FRAME /** * For some codecs, the time base is closer to the field rate than the frame rate. * Most notably, H.264 and MPEG-2 specify time_base as half of frame duration * if no telecine is used ... * * Set to time_base ticks per frame.
[FFmpeg-devel] [PATCH 04/13] lavf: use AV_CODEC_PROP_FIELDS where appropriate
H.264 and mpeg12 parsers need to be adjusted at the same time to stop using the value of AVCodecContext.ticks_per_frame, because it is not set correctly unless the codec has been opened. Previously this would result in both the parser and lavf seeing the same incorrect value, which would cancel out. Updating lavf and not the parsers would result in correct value in lavf, but the wrong one in parsers, which would break some tests. --- libavcodec/h264_parser.c | 4 ++-- libavcodec/mpegvideo_parser.c | 2 +- libavformat/avformat.c| 9 ++--- libavformat/demux.c | 29 +++-- libavformat/internal.h| 3 +++ 5 files changed, 31 insertions(+), 16 deletions(-) diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c index 46134a1c48..43abc45f9c 100644 --- a/libavcodec/h264_parser.c +++ b/libavcodec/h264_parser.c @@ -568,7 +568,7 @@ static inline int parse_nal_units(AVCodecParserContext *s, if (p->sei.common.unregistered.x264_build < 44U) den *= 2; av_reduce(&avctx->framerate.den, &avctx->framerate.num, - sps->num_units_in_tick * avctx->ticks_per_frame, den, 1 << 30); + sps->num_units_in_tick * 2, den, 1 << 30); } av_freep(&rbsp.rbsp_buffer); @@ -625,7 +625,7 @@ static int h264_parse(AVCodecParserContext *s, parse_nal_units(s, avctx, buf, buf_size); if (avctx->framerate.num) -time_base = av_inv_q(av_mul_q(avctx->framerate, (AVRational){avctx->ticks_per_frame, 1})); +time_base = av_inv_q(av_mul_q(avctx->framerate, (AVRational){2, 1})); if (p->sei.picture_timing.cpb_removal_delay >= 0) { s->dts_sync_point= p->sei.buffering_period.present; s->dts_ref_dts_delta = p->sei.picture_timing.cpb_removal_delay; diff --git a/libavcodec/mpegvideo_parser.c b/libavcodec/mpegvideo_parser.c index 8e7e88ff25..08e5316960 100644 --- a/libavcodec/mpegvideo_parser.c +++ b/libavcodec/mpegvideo_parser.c @@ -129,6 +129,7 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s, s->pict_type = (buf[1] >> 3) & 7; if (bytes_left >= 4) vbv_delay = ((buf[1] & 0x07) << 13) | (buf[2] << 5) | (buf[3] >> 3); +s->repeat_pict = 1; } break; case SEQ_START_CODE: @@ -186,7 +187,6 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s, progressive_frame = buf[4] & (1 << 7); /* check if we must repeat the frame */ -s->repeat_pict = 1; if (repeat_first_field) { if (pc->progressive_sequence) { if (top_field_first) diff --git a/libavformat/avformat.c b/libavformat/avformat.c index 708d90b38c..fea905693d 100644 --- a/libavformat/avformat.c +++ b/libavformat/avformat.c @@ -679,6 +679,7 @@ AVRational av_guess_sample_aspect_ratio(AVFormatContext *format, AVStream *strea AVRational av_guess_frame_rate(AVFormatContext *format, AVStream *st, AVFrame *frame) { AVRational fr = st->r_frame_rate; +const AVCodecDescriptor *desc = cffstream(st)->codec_desc; AVCodecContext *const avctx = ffstream(st)->avctx; AVRational codec_fr = avctx->framerate; AVRational avg_fr = st->avg_frame_rate; @@ -688,7 +689,7 @@ AVRational av_guess_frame_rate(AVFormatContext *format, AVStream *st, AVFrame *f fr = avg_fr; } -if (avctx->ticks_per_frame > 1) { +if (desc && (desc->props & AV_CODEC_PROP_FIELDS)) { if ( codec_fr.num > 0 && codec_fr.den > 0 && (fr.num == 0 || av_q2d(codec_fr) < av_q2d(fr)*0.7 && fabs(1.0 - av_q2d(av_div_q(avg_fr, fr))) > 0.1)) fr = codec_fr; @@ -701,10 +702,12 @@ int avformat_transfer_internal_stream_timing_info(const AVOutputFormat *ofmt, AVStream *ost, const AVStream *ist, enum AVTimebaseSource copy_tb) { +const AVCodecDescriptor *desc = cffstream(ist)->codec_desc; const AVCodecContext *const dec_ctx = cffstream(ist)->avctx; AVCodecContext *const enc_ctx = ffstream(ost)->avctx; -AVRational dec_ctx_tb = dec_ctx->framerate.num ? av_inv_q(av_mul_q(dec_ctx->framerate, - (AVRational){dec_ctx->ticks_per_frame, 1})) + +AVRational mul = (AVRational){ desc && (desc->props & AV_CODEC_PROP_FIELDS) ? 2 : 1, 1 }; +AVRational dec_ctx_tb = dec_ctx->framerate.num ? av_inv_q(av_mul_q(dec_ctx->framerate, mul)) : (ist->codecpar->codec_type == AVMEDIA_TYPE_AUDIO ? (AVRational){0, 1} : is
[FFmpeg-devel] [PATCH 02/13] fftools/ffmpeg: fix computing video frame duration from repeat_pict
This field contains the number of _field_ durations by which the standard frame duration should be extended. --- fftools/ffmpeg.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 8323c32ffd..4e45ab74b9 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -1008,10 +1008,10 @@ static int64_t video_duration_estimate(const InputStream *ist, const AVFrame *fr return frame->duration; if (ist->dec_ctx->framerate.den && ist->dec_ctx->framerate.num) { -int ticks = frame->repeat_pict >= 0 ? -frame->repeat_pict + 1 : -ist->dec_ctx->ticks_per_frame; -codec_duration = av_rescale_q(ticks, av_inv_q(ist->dec_ctx->framerate), +int fields = frame->repeat_pict + 2; +AVRational field_rate = av_mul_q(ist->dec_ctx->framerate, + (AVRational){ 2, 1 }); +codec_duration = av_rescale_q(fields, av_inv_q(field_rate), ist->st->time_base); } -- 2.39.2 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 03/13] lavc/codec_desc: add a property for codecs that support field coding
Multiple places currently use AVCodecContext.ticks_per_frame > 1 to identify such codecs, which * requires a codec context * requires it to be open --- doc/APIchanges | 3 +++ libavcodec/codec_desc.c | 16 libavcodec/codec_desc.h | 6 ++ libavcodec/version.h| 2 +- 4 files changed, 22 insertions(+), 5 deletions(-) diff --git a/doc/APIchanges b/doc/APIchanges index fd01def1b2..777485ce86 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -2,6 +2,9 @@ The last version increases of all libraries were on 2023-02-09 API changes, most recent first: +2023-05-xx - xx - lavc 60.11.100 - codec_desc.h + Add AV_CODEC_PROP_FIELDS. + 2023-05-04 - xx - lavu 58.7.100 - frame.h Deprecate AVFrame.interlaced_frame, AVFrame.top_field_first, and AVFrame.key_frame. diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c index d40977d6b3..491a49 100644 --- a/libavcodec/codec_desc.c +++ b/libavcodec/codec_desc.c @@ -38,14 +38,20 @@ static const AVCodecDescriptor codec_descriptors[] = { .type = AVMEDIA_TYPE_VIDEO, .name = "mpeg1video", .long_name = NULL_IF_CONFIG_SMALL("MPEG-1 video"), -.props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER, +.props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER | + // FIXME this is strigly speaking not true, as MPEG-1 does + // not allow field coding, but our mpeg12 code (decoder and + // parser) can sometimes change codec id at runtime, so + // this is safer + AV_CODEC_PROP_FIELDS, }, { .id= AV_CODEC_ID_MPEG2VIDEO, .type = AVMEDIA_TYPE_VIDEO, .name = "mpeg2video", .long_name = NULL_IF_CONFIG_SMALL("MPEG-2 video"), -.props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER, +.props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER | + AV_CODEC_PROP_FIELDS, .profiles = NULL_IF_CONFIG_SMALL(ff_mpeg2_video_profiles), }, { @@ -225,7 +231,8 @@ static const AVCodecDescriptor codec_descriptors[] = { .type = AVMEDIA_TYPE_VIDEO, .name = "h264", .long_name = NULL_IF_CONFIG_SMALL("H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10"), -.props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_LOSSLESS | AV_CODEC_PROP_REORDER, +.props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_LOSSLESS | + AV_CODEC_PROP_REORDER | AV_CODEC_PROP_FIELDS, .profiles = NULL_IF_CONFIG_SMALL(ff_h264_profiles), }, { @@ -529,7 +536,8 @@ static const AVCodecDescriptor codec_descriptors[] = { .type = AVMEDIA_TYPE_VIDEO, .name = "vc1", .long_name = NULL_IF_CONFIG_SMALL("SMPTE VC-1"), -.props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER, +.props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER | + AV_CODEC_PROP_FIELDS, .profiles = NULL_IF_CONFIG_SMALL(ff_vc1_profiles), }, { diff --git a/libavcodec/codec_desc.h b/libavcodec/codec_desc.h index 126b52df47..dd4491112b 100644 --- a/libavcodec/codec_desc.h +++ b/libavcodec/codec_desc.h @@ -90,6 +90,12 @@ typedef struct AVCodecDescriptor { * equal. */ #define AV_CODEC_PROP_REORDER (1 << 3) + +/** + * Video codec supports separate coding of fields in interlaced frames. + */ +#define AV_CODEC_PROP_FIELDS(1 << 4) + /** * Subtitle codec is bitmap based * Decoded AVSubtitle data can be read from the AVSubtitleRect->pict field. diff --git a/libavcodec/version.h b/libavcodec/version.h index 80e2ae630d..8b53586be1 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -29,7 +29,7 @@ #include "version_major.h" -#define LIBAVCODEC_VERSION_MINOR 10 +#define LIBAVCODEC_VERSION_MINOR 11 #define LIBAVCODEC_VERSION_MICRO 100 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ -- 2.39.2 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH] avdevice/lavfi: update documentation
lavfi not only supports video but also audio by now. --- doc/indevs.texi | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/doc/indevs.texi b/doc/indevs.texi index 8a198c4b44..863536a34d 100644 --- a/doc/indevs.texi +++ b/doc/indevs.texi @@ -991,9 +991,8 @@ This input device reads data from the open output pads of a libavfilter filtergraph. For each filtergraph open output, the input device will create a -corresponding stream which is mapped to the generated output. Currently -only video data is supported. The filtergraph is specified through the -option @option{graph}. +corresponding stream which is mapped to the generated output. +The filtergraph is specified through the option @option{graph}. @subsection Options -- 2.40.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] avdevice/lavfi: update documentation
approved and applied ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH] avfilter: add zoneplate video source filter
Attached. From 7b0a8586adc0a142f0b7afcdbdf36ce526f4cd34 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Sat, 6 May 2023 22:52:47 +0200 Subject: [PATCH] avfilter: add zoneplate video test source Signed-off-by: Paul B Mahol --- libavfilter/Makefile | 1 + libavfilter/allfilters.c | 1 + libavfilter/vsrc_testsrc.c | 142 + 3 files changed, 144 insertions(+) diff --git a/libavfilter/Makefile b/libavfilter/Makefile index 93c614eeb7..9fb9a1095f 100644 --- a/libavfilter/Makefile +++ b/libavfilter/Makefile @@ -598,6 +598,7 @@ OBJS-$(CONFIG_SMPTEHDBARS_FILTER)+= vsrc_testsrc.o OBJS-$(CONFIG_TESTSRC_FILTER)+= vsrc_testsrc.o OBJS-$(CONFIG_TESTSRC2_FILTER) += vsrc_testsrc.o OBJS-$(CONFIG_YUVTESTSRC_FILTER) += vsrc_testsrc.o +OBJS-$(CONFIG_ZONEPLATE_FILTER) += vsrc_testsrc.o OBJS-$(CONFIG_NULLSINK_FILTER) += vsink_nullsink.o diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c index 1c0bc12a92..025966dc45 100644 --- a/libavfilter/allfilters.c +++ b/libavfilter/allfilters.c @@ -563,6 +563,7 @@ extern const AVFilter ff_vsrc_smptehdbars; extern const AVFilter ff_vsrc_testsrc; extern const AVFilter ff_vsrc_testsrc2; extern const AVFilter ff_vsrc_yuvtestsrc; +extern const AVFilter ff_vsrc_zoneplate; extern const AVFilter ff_vsink_nullsink; diff --git a/libavfilter/vsrc_testsrc.c b/libavfilter/vsrc_testsrc.c index f391ac02e0..b1f7873a9c 100644 --- a/libavfilter/vsrc_testsrc.c +++ b/libavfilter/vsrc_testsrc.c @@ -88,6 +88,14 @@ typedef struct TestSourceContext { /* only used by haldclut */ int level; + +/* only used by zoneplate */ +int k0, kx, ky, kt; +int kxt, kyt, kxy; +int kx2, ky2, kt2; +int xo, yo, kU, kV; +int lut_precision; +uint8_t *lut; } TestSourceContext; #define OFFSET(x) offsetof(TestSourceContext, x) @@ -135,6 +143,7 @@ static av_cold void uninit(AVFilterContext *ctx) TestSourceContext *test = ctx->priv; av_frame_free(&test->picref); +av_freep(&test->lut); } static int config_props(AVFilterLink *outlink) @@ -2049,3 +2058,136 @@ const AVFilter ff_vsrc_colorchart = { }; #endif /* CONFIG_COLORCHART_FILTER */ + +#if CONFIG_COLORCHART_FILTER + +static const AVOption zoneplate_options[] = { +COMMON_OPTIONS +{ "precision", "set LUT precision", OFFSET(lut_precision), AV_OPT_TYPE_INT, {.i64=10}, 4, 16, FLAGS }, +{ "xo", "set x-axis offset", OFFSET(xo), AV_OPT_TYPE_INT, {.i64=0}, INT_MIN, INT_MAX, FLAGSR }, +{ "yo", "set y-axis offset", OFFSET(yo), AV_OPT_TYPE_INT, {.i64=0}, INT_MIN, INT_MAX, FLAGSR }, +{ "k0", "set zero order phase", OFFSET(k0), AV_OPT_TYPE_INT, {.i64=0}, INT_MIN, INT_MAX, FLAGSR }, +{ "kx", "set 1st order x-axis phase", OFFSET(kx), AV_OPT_TYPE_INT, {.i64=0}, INT_MIN, INT_MAX, FLAGSR }, +{ "ky", "set 1st order y-axis phase", OFFSET(ky), AV_OPT_TYPE_INT, {.i64=0}, INT_MIN, INT_MAX, FLAGSR }, +{ "kt", "set 1st order t-axis phase", OFFSET(kt), AV_OPT_TYPE_INT, {.i64=0}, INT_MIN, INT_MAX, FLAGSR }, +{ "kxt", "set x*t product phase", OFFSET(kxt), AV_OPT_TYPE_INT, {.i64=0}, INT_MIN, INT_MAX, FLAGSR }, +{ "kyt", "set y*t product phase", OFFSET(kyt), AV_OPT_TYPE_INT, {.i64=0}, INT_MIN, INT_MAX, FLAGSR }, +{ "kxy", "set x*y product phase", OFFSET(kxy), AV_OPT_TYPE_INT, {.i64=0}, INT_MIN, INT_MAX, FLAGSR }, +{ "kx2", "set 2nd order x-axis phase", OFFSET(kx2), AV_OPT_TYPE_INT, {.i64=0}, INT_MIN, INT_MAX, FLAGSR }, +{ "ky2", "set 2nd order y-axis phase", OFFSET(ky2), AV_OPT_TYPE_INT, {.i64=0}, INT_MIN, INT_MAX, FLAGSR }, +{ "kt2", "set 2nd order t-axis phase", OFFSET(kt2), AV_OPT_TYPE_INT, {.i64=0}, INT_MIN, INT_MAX, FLAGSR }, +{ "kU", "set zero order U-color phase", OFFSET(kU), AV_OPT_TYPE_INT, {.i64=0}, INT_MIN, INT_MAX, FLAGSR }, +{ "kV", "set zero order V-color phase", OFFSET(kV), AV_OPT_TYPE_INT, {.i64=0}, INT_MIN, INT_MAX, FLAGSR }, +{ NULL } +}; + +AVFILTER_DEFINE_CLASS(zoneplate); + +static int zoneplate_config_props(AVFilterLink *inlink) +{ +AVFilterContext *ctx = inlink->src; +TestSourceContext *s = ctx->priv; + +if (av_image_check_size(s->w, s->h, 0, ctx) < 0) +return AVERROR(EINVAL); +return config_props(inlink); +} + +static void zoneplate_fill_picture(AVFilterContext *ctx, AVFrame *frame) +{ +TestSourceContext *test = ctx->priv; +const int w = frame->width; +const int h = frame->height; +const int kxt = test->kxt, kyt = test->kyt, kx2 = test->kx2; +const int t = test->pts, k0 = test->k0; +const int kt = test->kt, kt2 = test->kt2, ky2 = test->ky2; +const int ky = test->ky, kx = test->kx, kxy = test->kxy; +const int lut_mask = (1 << test->lut_precision) - 1; +int akx, akxt, aky, akyt, akxy, nky2kt2; +const int nkt2 = kt2 * t * t, nkt = kt * t; +const int xreset = -(w / 2) - test->xo; +const int yreset = -(h / 2) - test->yo; +const int
Re: [FFmpeg-devel] [PATCH 01/13] lavu/frame: extend AVFrame.repeat_pict documentation
On Sun, 7 May 2023, 14:34 Anton Khirnov, wrote: > --- > libavutil/frame.h | 18 -- > 1 file changed, 16 insertions(+), 2 deletions(-) > > diff --git a/libavutil/frame.h b/libavutil/frame.h > index f2b56beebb..ed3f199ce1 100644 > --- a/libavutil/frame.h > +++ b/libavutil/frame.h > @@ -491,8 +491,22 @@ typedef struct AVFrame { > void *opaque; > > /** > - * When decoding, this signals how much the picture must be delayed. > - * extra_delay = repeat_pict / (2*fps) > + * Number of fields in this frame which should be repeated, i.e. the > total > + * duration of this frame should be repeat_pict + 2 normal field > durations. > + * > + * For interlaced frames this field may be set to 1, which signals > that this > + * frame should be presented as 3 fields: beginning with the first > field (as > + * determined by AV_FRAME_FLAG_TOP_FIELD_FIRST being set or not), > followed > + * by the second field, and then the first field again. > + * > + * For progressive frames this field may be set to a multiple of 2, > which > + * signals that this frame's duration should be (repeat_pict + 2) / 2 > + * normal frame durations. This isn't correct, a progressive [coded] frame is allowed to have its first field repeated. There is a difference between the coded type and the display method of a frame. The documentation suggests otherwise. Kieran ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 01/13] lavu/frame: extend AVFrame.repeat_pict documentation
Quoting Kieran Kunhya (2023-05-07 18:59:22) > On Sun, 7 May 2023, 14:34 Anton Khirnov, wrote: > > > --- > > libavutil/frame.h | 18 -- > > 1 file changed, 16 insertions(+), 2 deletions(-) > > > > diff --git a/libavutil/frame.h b/libavutil/frame.h > > index f2b56beebb..ed3f199ce1 100644 > > --- a/libavutil/frame.h > > +++ b/libavutil/frame.h > > @@ -491,8 +491,22 @@ typedef struct AVFrame { > > void *opaque; > > > > /** > > - * When decoding, this signals how much the picture must be delayed. > > - * extra_delay = repeat_pict / (2*fps) > > + * Number of fields in this frame which should be repeated, i.e. the > > total > > + * duration of this frame should be repeat_pict + 2 normal field > > durations. > > + * > > + * For interlaced frames this field may be set to 1, which signals > > that this > > + * frame should be presented as 3 fields: beginning with the first > > field (as > > + * determined by AV_FRAME_FLAG_TOP_FIELD_FIRST being set or not), > > followed > > + * by the second field, and then the first field again. > > + * > > + * For progressive frames this field may be set to a multiple of 2, > > which > > + * signals that this frame's duration should be (repeat_pict + 2) / 2 > > + * normal frame durations. > > > This isn't correct, a progressive [coded] frame is allowed to have its > first field repeated. > > There is a difference between the coded type and the display method of a > frame. The documentation suggests otherwise. In my understanding the AVFrame interlacing flag relates to how the decoded frame is supposed to be treated (displayed or processed). It says nothing about how the frame was coded or what source it comes from. -- Anton Khirnov ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 2/3] avformat/imfdec: fail on probing non xml file extension
On Sat, May 06, 2023 at 11:01:20AM -0700, Pierre-Anthony Lemieux wrote: > On Sat, May 6, 2023 at 6:25 AM Michael Niedermayer > wrote: > > > > Its unexpected that a .avi or other "standard" file turns into a playlist. > > The goal of this patch is to avoid this unexpected behavior and possible > > privacy or security differences. > > Per the IMF specification, a CPL can have any extension or, in fact, > no extension. The latter is routinely used. is there a restriction on the URL/URIs used in it ? that is in practice, can they be restricted to the same server, child directories, or some other restriction ? thx [...] -- 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 https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 1/3] avformat/dashdec: fail on probing non mpd file extension
Quoting Michael Niedermayer (2023-05-06 15:25:01) > Its unexpected that a .avi or other "standard" file turns into a playlist. > The goal of this patch is to avoid this unexpected behavior and possible > privacy or security differences. > > This is similar to the same change to hls I heavily dislike this. -- Anton Khirnov ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] avformat/hls: fail on probing non hls/m3u8 file extensions
Quoting Michael Niedermayer (2023-05-03 14:30:38) > Its unexpected that a .avi or other "standard" file turns into a playlist. > The goal of this patch is to avoid this unexpected behavior and possible > privacy or security differences. > I very much dislike this approach. -- Anton Khirnov ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] fftools/ffprobe: print exported stream AVOptions
On date Friday 2023-05-05 20:18:56 -0300, James Almer wrote: > Similar to the decoder AVOptions above. Please briefly specify the use case in the log. > Signed-off-by: James Almer > --- > fftools/ffprobe.c | 12 > tests/ref/fate/flv-demux | 4 ++-- > tests/ref/fate/ts-demux | 6 +++--- > tests/ref/fate/ts-opus-demux | 2 +- > tests/ref/fate/ts-small-demux | 2 +- > 5 files changed, 19 insertions(+), 7 deletions(-) > > diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c > index 43bf10db54..9599b3b1b2 100644 > --- a/fftools/ffprobe.c > +++ b/fftools/ffprobe.c > @@ -3127,6 +3127,18 @@ static int show_stream(WriterContext *w, > AVFormatContext *fmt_ctx, int stream_id > } > } > > +if (fmt_ctx->iformat->priv_class && show_private_data) { > +const AVOption *opt = NULL; > +while (opt = av_opt_next(fmt_ctx->priv_data, opt)) { > +uint8_t *str; > +if (!(opt->flags & AV_OPT_FLAG_EXPORT)) continue; > +if (av_opt_get(fmt_ctx->priv_data, opt->name, 0, &str) >= 0) { > +print_str(opt->name, str); > +av_free(str); > +} > +} > +} maybe factorize with the other similar code? [...] LGTM otherwise. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] tiny documentation fix
On date Sunday 2023-05-07 07:56:01 -0500, Jonathan Gilbert wrote: > Hello, > > I found a mistake in the documentation, a parameter that was copy/pasted > but not updated. > > In filters.texi, the documentation for the colorcorrect filter describes > "rh" as "red highlight spot" and "bh" also as "red highlight spot". I'm > reasonably confident it should say "blue highlight spot". Thanks, applied. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] Embedded documentation?
On date Monday 2023-05-01 12:13:09 +0200, Nicolas George wrote: > Hi. > > Three years ago, I shared some brief thoughts about embedding the > documentation in the libraries. For example, that would allow GUI > applications to open help dialogs about specific options. > > To see what it would need, I wrote the following header. I did not work > any further, because groundwork need to be laid first. But now that it > was mentioned in another thread, I think it is a good idea to show it, > to see how people like it. > > Please share your remarks. Even “+1” to say you like it, because people > who will not like it will not hesitate to post “-1”. > > Regards, > > -- > Nicolas George > typedef struct AVDocNode AVDocNode; > typedef struct AVDocLink AVDocLink; > typedef enum AVDocNodeType AVDocNodeType; > typedef enum AVDocLinkType AVDocLinkType; > > /** > * Link to another documentation node. > */ > struct AVDocLink { > AVDocNode *target; > AVDocLinkType type; > }; > > /** > * Node in the documentation system. > * > * A node can be the description of a codec, format, filter, option, type, > * etc. > */ > struct AVDocNode { > > /** > * Names of the component. > * > * It is a concatenation of 0-terminated strings, terminated by an empty > * string (i.e. a double 0). > * For example "frame_rate, rate, r" would be "frame_rate\0rate\0r\0\0". > * The first name is the main name of the component, the other are > * aliases. I'd prefer to use something easily parsable and still more human-readable, such as "frame_rate,rate,r" > * If this field is used as a plain C string, it contains only the main > * name. > */ > const char *names; > > /** > * Unique identifier of the compnent. > * > * It is composed of alphanumeric characters plus underscore and slash > * and written hierarchically. > * > * For example, the width option of the scale filter would be > * "lavfi/vf_scale/opt_width". maybe something as: lavfi/scale/option:width the name of a filter is unique, and we don't want to expose the internals of the library (vf_, af_ etc. - also they don't make much sense for multi/trans-media filters) > * > * This identifier can be used for links in the text. > * > * It matches the symbol that makes the documentation available, in the > * avdoc_ namespace with double underscore standing for slashes: > * extern const AVDocNode avdoc_lavfi__vf_scale__opt_width; > */ > const char *id; > > /** > * Title / short description, possibly NULL. > * > * Can be used in a table of contents for example. > */ > const char *title; > > /** > * Text of the documentation in XXX Markdown / FFHTML. > * > * Apparently we want to write the documentation in Markdown or similar, > * but the build system can convert when creating the data structure to > * embed in the library. > * > * On one hand, Markdown can be dumped as is to the user, in a terminal > * or a basic dialog box. > * > * On the other hand, strict minimalist HTML is more program-friendly, > * which makes it more convenient for programs that want to display it > * with actual italics > * > * I think FFHTML (i.e. a small, strict and clearly documented subset of > * HTML) would be better. > */ > const char *text; I think the problem with HTML is that then you need to parse it if you want to display it, so I'd tend to rather go with markdown: 1. it provides readable raw output 2. there are plenty of libraries which can render it to various formats (including HTML) > > /** > * Object about which the documentation is. > * > * If not NULL, points to an object starting with an AVClass pointer. > */ > void *object; > > /** > * Links towards other nodes. > * > * All nodes linked in the text must have an entry here, but implicit > * links are possible too, for example the type of an option. > * > * The types are ordered by type. > */ > const AVDocLink *links; > > /** > * Type of the node, and of the object documented. > */ > AVDocNodeType type; We already define AV_CLASS_CATEGORY (libavutil/log.h), could it be adjusted for this scope? > }; > > /** > * Type of a documentation node. > */ > enum AVDocNodeType { > AVDOC_TYPE_GENERIC = 0, > AVDOC_TYPE_MUXER, > AVDOC_TYPE_DEMUXER, > AVDOC_TYPE_ENCODER, > AVDOC_TYPE_DECODER, > AVDOC_TYPE_FILTER, > AVDOC_TYPE_BITSTREAM_FILTER, > AVDOC_TYPE_SWSCALER, > AVDOC_TYPE_SWRESAMPLER, > AVDOC_TYPE_DEVICE_VIDEO_OUTPUT, > AVDOC_TYPE_DEVICE_VIDEO_INPUT, > AVDOC_TYPE_DEVICE_AUDIO_OUTPUT, > AVDOC_TYPE_DEVICE_AUDIO_INPUT, > AVDOC_TYPE_DEVICE_OUTPUT, > AVDOC_TYPE_DEVICE_INPUT, > AVDOC_TYPE_OPTION, > AVDOC_TYPE_TYPE, > AVDOC
Re: [FFmpeg-devel] [PATCH] avfilter: add zoneplate video source filter
On date Sunday 2023-05-07 18:04:37 +0200, Paul B Mahol wrote: > Attached. > From 7b0a8586adc0a142f0b7afcdbdf36ce526f4cd34 Mon Sep 17 00:00:00 2001 > From: Paul B Mahol > Date: Sat, 6 May 2023 22:52:47 +0200 > Subject: [PATCH] avfilter: add zoneplate video test source > > Signed-off-by: Paul B Mahol > --- > libavfilter/Makefile | 1 + > libavfilter/allfilters.c | 1 + > libavfilter/vsrc_testsrc.c | 142 + > 3 files changed, 144 insertions(+) please add docs [...] ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] fftools/ffprobe: print exported stream AVOptions
On 5/7/2023 6:20 PM, Stefano Sabatini wrote: On date Friday 2023-05-05 20:18:56 -0300, James Almer wrote: Similar to the decoder AVOptions above. Please briefly specify the use case in the log. A line about how these are options whose values are changed by the demuxer and thus exported back to the caller? Signed-off-by: James Almer --- fftools/ffprobe.c | 12 tests/ref/fate/flv-demux | 4 ++-- tests/ref/fate/ts-demux | 6 +++--- tests/ref/fate/ts-opus-demux | 2 +- tests/ref/fate/ts-small-demux | 2 +- 5 files changed, 19 insertions(+), 7 deletions(-) diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index 43bf10db54..9599b3b1b2 100644 --- a/fftools/ffprobe.c +++ b/fftools/ffprobe.c @@ -3127,6 +3127,18 @@ static int show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_id } } +if (fmt_ctx->iformat->priv_class && show_private_data) { +const AVOption *opt = NULL; +while (opt = av_opt_next(fmt_ctx->priv_data, opt)) { +uint8_t *str; +if (!(opt->flags & AV_OPT_FLAG_EXPORT)) continue; +if (av_opt_get(fmt_ctx->priv_data, opt->name, 0, &str) >= 0) { +print_str(opt->name, str); +av_free(str); +} +} +} maybe factorize with the other similar code? Sure. [...] LGTM otherwise. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] avfilter/setpts: add command support
On date Monday 2023-05-01 22:01:05 +0100, Oleg Afanasyev wrote: > I'm using setpts to generate timelapses with slowdowns in the middle. > Using setpts filter requires complicated expr to handle intervals. This > patch allows commands to change expr and also adds a constant that > provides time of last command applications to allow specifying gradual > changes using difference between time and cmd time. > > -- > with best regards > Oleg Afanasyev > From a714a0957a57c1d392feca0ba675ba5ac7c875ee Mon Sep 17 00:00:00 2001 > From: Oleg > Date: Sat, 29 Apr 2023 19:56:46 +0100 > Subject: [PATCH] avfilter/setpts: add command support > > Add support for changing expr on the fly. > > Signed-off-by: Oleg > --- > doc/filters.texi | 7 + > libavfilter/setpts.c | 68 +--- > 2 files changed, 58 insertions(+), 17 deletions(-) > > diff --git a/doc/filters.texi b/doc/filters.texi > index 50e1682144..fbdb1f8ecf 100644 > diff --git a/libavfilter/setpts.c b/libavfilter/setpts.c > index 5bcc0c2dcf..7b09ce7707 100644 > --- a/libavfilter/setpts.c > +++ b/libavfilter/setpts.c [...] > +static int process_command(AVFilterContext *ctx, const char *cmd, const char > *arg, > + char *res, int res_len, int flags) > +{ > +SetPTSContext *setpts = ctx->priv; > +int ret; > + > +ret = ff_filter_process_command(ctx, cmd, arg, res, res_len, flags); > + > +if (ret < 0) > +return ret; > + > +if (!strcmp(cmd, "expr")) { > +av_expr_free(setpts->expr); > +ret = av_expr_parse(&setpts->expr, arg, var_names, NULL, NULL, NULL, > NULL, 0, ctx); > +if (ret < 0) { > +av_log(ctx, AV_LOG_ERROR, "Error while parsing expression > '%s'\n", arg); > +} what happens in case setpts->expr is freed and this fails? probably it should keep a reference to expr and remove it only in case the new expression was successfully parsed [...] Looks good to me otherwise. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] fftools/ffprobe: print exported stream AVOptions
On date Sunday 2023-05-07 19:30:03 -0300, James Almer wrote: > On 5/7/2023 6:20 PM, Stefano Sabatini wrote: > > On date Friday 2023-05-05 20:18:56 -0300, James Almer wrote: > > > Similar to the decoder AVOptions above. > > > > Please briefly specify the use case in the log. > > A line about how these are options whose values are changed by the demuxer > and thus exported back to the caller? Even simpler, something along the line of: This is useful to show options changed by the demuxer... (you know better than me) so that the reader of the commit log gets an idea about how this can be used [...] ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 1/4] avcodec/bitpacked_enc: add support for uyvy422 encoding
On 5/7/2023 4:00 AM, Lance Wang wrote: On Sun, May 7, 2023 at 1:38 AM James Almer wrote: Signed-off-by: James Almer --- libavcodec/bitpacked_enc.c | 27 ++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/libavcodec/bitpacked_enc.c b/libavcodec/bitpacked_enc.c index 3c4e11293d..cbca38006b 100644 --- a/libavcodec/bitpacked_enc.c +++ b/libavcodec/bitpacked_enc.c @@ -25,12 +25,36 @@ #include "encode.h" #include "internal.h" #include "put_bits.h" +#include "libavutil/imgutils.h" #include "libavutil/pixdesc.h" struct BitpackedContext { int (*encode)(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *frame); }; +static int encode_uyvy422(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *frame) +{ +int ret = av_image_get_buffer_size(frame->format, + frame->width, frame->height, 1); + +if (ret < 0) +return ret; + +ret = ff_get_encode_buffer(avctx, pkt, ret, 0); +if (ret < 0) +return ret; + +ret = av_image_copy_to_buffer(pkt->data, pkt->size, + (const uint8_t **)frame->data, frame->linesize, + frame->format, + frame->width, frame->height, 1); + +if (ret < 0) +return ret; + +return 0; +} + I prefer to bitpack will used for 10-bit 4:2:2 packed format. uyvy422 should use rawvideo as it'll passthrough directly. I'm not sure i follow. The rawvideo encoder will do exactly the same thing I'm doing here. Are you maybe talking about patch 3/4? static int encode_yuv422p10(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *frame) { const int buf_size = avctx->height * avctx->width * avctx->bits_per_coded_sample / 8; @@ -85,7 +109,7 @@ static av_cold int encode_init(AVCodecContext *avctx) if (avctx->pix_fmt == AV_PIX_FMT_YUV422P10) s->encode = encode_yuv422p10; else -return AVERROR(EINVAL); +s->encode = encode_uyvy422; return 0; } @@ -115,5 +139,6 @@ const FFCodec ff_bitpacked_encoder = { .init = encode_init, FF_CODEC_ENCODE_CB(encode_frame), .p.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV422P10, +AV_PIX_FMT_UYVY422, AV_PIX_FMT_NONE }, }; -- 2.40.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] avfilter: add zoneplate video source filter
New version, faster and with slice threading and docs. From 8b9ab6e3401d69f115b5d331fec73fd8c01ea1bd Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Sat, 6 May 2023 22:52:47 +0200 Subject: [PATCH] avfilter: add zoneplate video test source Signed-off-by: Paul B Mahol --- doc/filters.texi | 96 +++ libavfilter/Makefile | 1 + libavfilter/allfilters.c | 1 + libavfilter/vsrc_testsrc.c | 157 + 4 files changed, 255 insertions(+) diff --git a/doc/filters.texi b/doc/filters.texi index 8b443c24e9..d7c828d119 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -28080,6 +28080,102 @@ Set max jump for single pan destination. Allowed range is from 1 to 1. Set fractal type, can be default @code{carpet} or @code{triangle}. @end table +@section zoneplate +Generates a zoneplate test video pattern. +Numerous options for signal controls output phase in all three axis. + +This source accepts the following options: + +@table @option +@item size, s +Set frame size. For the syntax of this option, check the @ref{video size syntax,,"Video +size" section in the ffmpeg-utils manual,ffmpeg-utils}. Default value is "320x240". + +@item rate, r +Set frame rate, expressed as number of frames per second. Default +value is "25". + +@item duration, d +Set the duration of the sourced video. See +@ref{time duration syntax,,the Time duration section in the ffmpeg-utils(1) manual,ffmpeg-utils} +for the accepted syntax. + +If not specified, or the expressed duration is negative, the video is +supposed to be generated forever. + +@item sar +Set the sample aspect ratio of the sourced video. + +@item precision +Set precision in bits for look-up table for sine calculations. Default value is 10. +Allowed range is from 4 to 16. + +@item xo +Set horizontal axis offset for output signal. Default value is 0. + +@item yo +Set vertical axis offset for output signal. Default value is 0. + +@item k0 +Set 0-order, constant added to signal phase. Default value is 0. + +@item kx +Set 1-order, phase factor multiplier for horizontal axis. Default value is 0. + +@item ky +Set 1-order, phase factor multiplier for vertical axis. Default value is 0. + +@item kt +Set 1-order, phase factor multiplier for time axis. Default value is 0. + +@item kxt, kyt, kxy +Set phase factor multipliers for combination of spatial and temporal axis. +Default value is 0. + +@item kx2 +Set 2-order, phase factor multiplier for horizontal axis. Default value is 0. + +@item ky2 +Set 2-order, phase factor multiplier for vertical axis. Default value is 0. + +@item kt2 +Set 2-order, phase factor multiplier for time axis. Default value is 0. + +@item ku +Set the constant added to final phase to produce chroma-blue component of signal. +Default value is 0. + +@item kv +Set the constant added to final phase to produce chroma-red component of signal. +Default value is 0. +@end table + +@subsection Commands + +Filter supports the some above options as @ref{commands}. + +@subsection Examples + +@itemize +@item +Generate horizontal color sine sweep: +@example +zoneplate=ku=512:kv=0:kt2=0:kx2=256:s=wvga:xo=-426:kt=11 +@end example + +@item +Generate vertical color sine sweep: +@example +zoneplate=ku=512:kv=0:kt2=0:ky2=156:s=wvga:yo=-240:kt=11 +@end example + +@item +Generate circular zone-plate: +@example +zoneplate=ku=512:kv=100:kt2=0:ky2=256:kx2=556:s=wvga:yo=0:kt=11 +@end example +@end itemize + @c man end VIDEO SOURCES @chapter Video Sinks diff --git a/libavfilter/Makefile b/libavfilter/Makefile index 93c614eeb7..9fb9a1095f 100644 --- a/libavfilter/Makefile +++ b/libavfilter/Makefile @@ -598,6 +598,7 @@ OBJS-$(CONFIG_SMPTEHDBARS_FILTER)+= vsrc_testsrc.o OBJS-$(CONFIG_TESTSRC_FILTER)+= vsrc_testsrc.o OBJS-$(CONFIG_TESTSRC2_FILTER) += vsrc_testsrc.o OBJS-$(CONFIG_YUVTESTSRC_FILTER) += vsrc_testsrc.o +OBJS-$(CONFIG_ZONEPLATE_FILTER) += vsrc_testsrc.o OBJS-$(CONFIG_NULLSINK_FILTER) += vsink_nullsink.o diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c index 1c0bc12a92..025966dc45 100644 --- a/libavfilter/allfilters.c +++ b/libavfilter/allfilters.c @@ -563,6 +563,7 @@ extern const AVFilter ff_vsrc_smptehdbars; extern const AVFilter ff_vsrc_testsrc; extern const AVFilter ff_vsrc_testsrc2; extern const AVFilter ff_vsrc_yuvtestsrc; +extern const AVFilter ff_vsrc_zoneplate; extern const AVFilter ff_vsink_nullsink; diff --git a/libavfilter/vsrc_testsrc.c b/libavfilter/vsrc_testsrc.c index f391ac02e0..1e74a0e42e 100644 --- a/libavfilter/vsrc_testsrc.c +++ b/libavfilter/vsrc_testsrc.c @@ -88,6 +88,14 @@ typedef struct TestSourceContext { /* only used by haldclut */ int level; + +/* only used by zoneplate */ +int k0, kx, ky, kt; +int kxt, kyt, kxy; +int kx2, ky2, kt2; +int xo, yo, kU, kV; +int lut_precision; +uint8_t *lut; } TestSourceContext; #define OFFSE
Re: [FFmpeg-devel] [PATCH 1/4] avcodec/bitpacked_enc: add support for uyvy422 encoding
On Mon, May 8, 2023 at 6:56 AM James Almer wrote: > On 5/7/2023 4:00 AM, Lance Wang wrote: > > On Sun, May 7, 2023 at 1:38 AM James Almer wrote: > > > >> Signed-off-by: James Almer > >> --- > >> libavcodec/bitpacked_enc.c | 27 ++- > >> 1 file changed, 26 insertions(+), 1 deletion(-) > >> > >> diff --git a/libavcodec/bitpacked_enc.c b/libavcodec/bitpacked_enc.c > >> index 3c4e11293d..cbca38006b 100644 > >> --- a/libavcodec/bitpacked_enc.c > >> +++ b/libavcodec/bitpacked_enc.c > >> @@ -25,12 +25,36 @@ > >> #include "encode.h" > >> #include "internal.h" > >> #include "put_bits.h" > >> +#include "libavutil/imgutils.h" > >> #include "libavutil/pixdesc.h" > >> > >> struct BitpackedContext { > >> int (*encode)(AVCodecContext *avctx, AVPacket *pkt, const AVFrame > >> *frame); > >> }; > >> > >> +static int encode_uyvy422(AVCodecContext *avctx, AVPacket *pkt, const > >> AVFrame *frame) > >> +{ > >> +int ret = av_image_get_buffer_size(frame->format, > >> + frame->width, frame->height, 1); > >> + > >> +if (ret < 0) > >> +return ret; > >> + > >> +ret = ff_get_encode_buffer(avctx, pkt, ret, 0); > >> +if (ret < 0) > >> +return ret; > >> + > >> +ret = av_image_copy_to_buffer(pkt->data, pkt->size, > >> + (const uint8_t **)frame->data, > >> frame->linesize, > >> + frame->format, > >> + frame->width, frame->height, 1); > >> + > >> +if (ret < 0) > >> +return ret; > >> + > >> +return 0; > >> +} > >> + > >> > > > > > > I prefer to bitpack will used for 10-bit 4:2:2 packed format. uyvy422 > > should use rawvideo as it'll passthrough directly. > > I'm not sure i follow. The rawvideo encoder will do exactly the same > thing I'm doing here. > > Are you maybe talking about patch 3/4? > The old rtpdec_rfc4175 use bitpack with rawvideo for uyvy422 and I have changed to used rawvideo directly. For I think bitpacked is better to use for 10-bit 4:2:2 packed format. However I haven't removed the old uyvy422 decode code in 3/4 for I'm not sure whether it'll break any ABI for old avformat. > > > > > > static int encode_yuv422p10(AVCodecContext *avctx, AVPacket *pkt, const > >> AVFrame *frame) > >> { > >> const int buf_size = avctx->height * avctx->width * > >> avctx->bits_per_coded_sample / 8; > >> @@ -85,7 +109,7 @@ static av_cold int encode_init(AVCodecContext *avctx) > >> if (avctx->pix_fmt == AV_PIX_FMT_YUV422P10) > >> s->encode = encode_yuv422p10; > >> else > >> -return AVERROR(EINVAL); > >> +s->encode = encode_uyvy422; > >> > >> return 0; > >> } > >> @@ -115,5 +139,6 @@ const FFCodec ff_bitpacked_encoder = { > >> .init = encode_init, > >> FF_CODEC_ENCODE_CB(encode_frame), > >> .p.pix_fmts = (const enum AVPixelFormat[]){ > AV_PIX_FMT_YUV422P10, > >> +AV_PIX_FMT_UYVY422, > >> AV_PIX_FMT_NONE }, > >> }; > >> -- > >> 2.40.1 > >> > >> ___ > >> ffmpeg-devel mailing list > >> ffmpeg-devel@ffmpeg.org > >> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > >> > >> To unsubscribe, visit link above, or email > >> ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". > >> > > ___ > > ffmpeg-devel mailing list > > ffmpeg-devel@ffmpeg.org > > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > > > To unsubscribe, visit link above, or email > > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 2/3] avformat/imfdec: fail on probing non xml file extension
On Sun, May 7, 2023 at 12:18 PM Michael Niedermayer wrote: > > On Sat, May 06, 2023 at 11:01:20AM -0700, Pierre-Anthony Lemieux wrote: > > On Sat, May 6, 2023 at 6:25 AM Michael Niedermayer > > wrote: > > > > > > Its unexpected that a .avi or other "standard" file turns into a playlist. > > > The goal of this patch is to avoid this unexpected behavior and possible > > > privacy or security differences. > > > > Per the IMF specification, a CPL can have any extension or, in fact, > > no extension. The latter is routinely used. > > is there a restriction on the URL/URIs used in it ? > that is in practice, can they be restricted to the same server, > child directories, or some other restriction ? Below is a brief overview of the linkage between the various of components of an IMF composition: - the Composition Playlist (CPL) is the file that is passed to FFMPEG as input (-i) - the CPL is an XML document and defines a playlist - each of the components that make up the playlist is identified by a UUID, i.e. the CPL does not contain file paths/URLs. - the mapping between UUIDs and URLs is done through separate XML files called Asset Maps. Paths to Asset Maps can be provided explicitly through the "-assetmaps" argument, otherwise FFMPEG looks for a file called "ASSETMAP.xml" in the same directory as the CPL file. - according to the standard, all URLs in each Asset Map is relative to the location of the Asset Map, and thus the CPL and the Asset Map have the same origin - some applications have relaxed this constraint and allowed absolute URLs in the Asset Map What is the threat scenario? Is the concern that a malicious actor provides a CPL and Asset Map from origin A that makes malicious requests to a different origin B? > > thx > > [...] > -- > 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 > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".