From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 981464C4CB for ; Tue, 14 Oct 2025 03:35:40 +0000 (UTC) Authentication-Results: ffbox; dkim=fail (body hash mismatch (got b'JEVy2Dd5H4eYvSf/P7LxpmNx0Qp8SGgg54aVkYDQVEY=', expected b'0jkS1VbrbQe+Su2agWCzgrn6wihuY8iISHFpU/sy5ag=')) header.d=ffmpeg.org header.i=@ffmpeg.org header.a=rsa-sha256 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ffmpeg.org; i=@ffmpeg.org; q=dns/txt; s=mail; t=1760412911; h=mime-version : to : date : message-id : reply-to : subject : list-id : list-archive : list-archive : list-help : list-owner : list-post : list-subscribe : list-unsubscribe : from : cc : content-type : content-transfer-encoding : from; bh=JEVy2Dd5H4eYvSf/P7LxpmNx0Qp8SGgg54aVkYDQVEY=; b=XgPXG7E9KwYHNeTVmI6xawi2rnWfR9G0VCIqKu82fECPmoRCvzRqOBYRuLxYcWLmcfw6G lMKEvmDyfejApB4v2JQL+xlUYxRKFfqPB0z0fEi4hJPty/I/jECP3rHlj2YCOF33uUAiZgw hDw13h1SMlAEl89r7awI/vKYUXiDBak2VZ2/EeetOfcC8PyS0vd7LuSSfQatMKXvKH6hI45 R2f251wiI93IYBuyaSDzZ5THDeXipC7vTtd9o13/JvPojJJR46hSNzKDExyDU2URTNzc87n lwsSfMx7clvsMGyhzx2wdH/p1L8tv8VRmWkW8v0lNCLJABk2PK4MOf3Rkp/Q== Received: from [172.19.0.4] (unknown [172.19.0.4]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 11D4568F22B; Tue, 14 Oct 2025 06:35:11 +0300 (EEST) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=ffmpeg.org; s=arc; t=1760412903; b=j3Y67aJ6H1Ilf+JZlXFaJaOyLfYka5p5o3ip0XhkgV6XVhxnX21Ywb3BkKa/1DHk0rydu 1CeEaYx68ZnqqDQnSXFkdHzeLEe6/7oNO26j/9/v9OSyd8ro1/VpNuFdLDf32sfCaFV9Zyr yNZKOWvPat0gn8vm0/3hdnmSdjTcbc/oNkYg5fGvbISo3psWa3RYcZM73HCxE1Pj/Bdbyvq 1o/TiRhiZi3VtYx9n25uwk6FXg1saRtSK3ZJ2b9s+p/52585/xGL8rdZxC1VQiNDVgIbbnt Ny7gdkmIRRJVWZ6oz5Hb35t0DRllRSXNh2WMHrKIeZy2BrHUlVUHVmVy1hHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=ffmpeg.org; s=arc; t=1760412903; h=from : sender : reply-to : subject : date : message-id : to : cc : mime-version : content-type : content-transfer-encoding : content-id : content-description : resent-date : resent-from : resent-sender : resent-to : resent-cc : resent-message-id : in-reply-to : references : list-id : list-help : list-unsubscribe : list-subscribe : list-post : list-owner : list-archive; bh=hgY1BCahBa+piVvKBa7JVxUu9usKgV7eQbk5hdwbRz8=; b=ASiypx1Qjl6kFjG9H3kvf8r5fryAVeshHB4PE5cxYkFnSEtGryaYcsLz0EruBybsq1Esj HZR4yLRuynPNXK/7b3WL1TlRx7EpMCa86DN/uzj5jiGwRL5oZ54FuzHw1RX6ByFLInMZABL NUP4tORQ+0SdfAAjayx7Lkp0/UBlrTFxN4MICd9U0ekWXcnqMYe1WCi5C5xyPCeAX8+fCLo ePc1+6KJj8t9a19ikqc3FELipVQLfqqOsplfAOUGeJjq5fKFyA7ss5uk0D2ES8OKXn8KrLu bGLG8kBaB7x+jN6h7WCefXnyH/P4pIx0dalyXCekxgFMDgiJ1j4odH1t5P0Q== ARC-Authentication-Results: i=1; ffmpeg.org; dkim=pass header.d=ffmpeg.org header.i=@ffmpeg.org; arc=none; dmarc=pass header.from=ffmpeg.org policy.dmarc=quarantine Authentication-Results: ffmpeg.org; dkim=pass header.d=ffmpeg.org header.i=@ffmpeg.org; arc=none (Message is not ARC signed); dmarc=pass (Used From Domain Record) header.from=ffmpeg.org policy.dmarc=quarantine DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ffmpeg.org; i=@ffmpeg.org; q=dns/txt; s=mail; t=1760412892; h=content-type : mime-version : content-transfer-encoding : from : to : reply-to : subject : date : from; bh=0jkS1VbrbQe+Su2agWCzgrn6wihuY8iISHFpU/sy5ag=; b=f7zkCt01SdG+Ig4nNkYF/EFweVEbdJ9NIYXAXuTe153DfvGH8Lj+gtpIyTO6F8aOltnpc NBaD8P8kQJneS920pQmUJ7+/oxKDoe2KULcMuXpH+xLZt59V4JfRHRoz/Cr8sxxpoo+XJtx o7hSPREAhtPX/0xTsLdXZkwlaI5SHAP5CjeVgfvtgIbHze0Eh/NAGt4Wk1a/PEjUJw05+il UFH8HWz6ZTAzRJZu8NFAan5KO8glRwK7WVXXD9GSQPANwvKKcHFpB72VTu002lOOswwLPyp qT8llyzE3XXPGPXZppMOP8XR9PPYTveQ1OQUChUp3o8PhjSclP5j0xRo2TAQ== Received: from be50bb5a3685 (code.ffmpeg.org [188.245.149.3]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 6CB4568F0C1 for ; Tue, 14 Oct 2025 06:34:52 +0300 (EEST) MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Date: Tue, 14 Oct 2025 03:34:52 -0000 Message-ID: <176041289284.25.13703314883580084015@bf907ddaa564> Message-ID-Hash: C2UZBUXQHRJZHR7P64GRXJUTGH5VM7Q4 X-Message-ID-Hash: C2UZBUXQHRJZHR7P64GRXJUTGH5VM7Q4 X-MailFrom: code@ffmpeg.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-ffmpeg-devel.ffmpeg.org-0; header-match-ffmpeg-devel.ffmpeg.org-1; header-match-ffmpeg-devel.ffmpeg.org-2; header-match-ffmpeg-devel.ffmpeg.org-3; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list Reply-To: FFmpeg development discussions and patches Subject: [FFmpeg-devel] [PATCH] avcodec/bsf/dts2pts: add hevc support (PR #20702) List-Id: FFmpeg development discussions and patches Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Zhao Zhili via ffmpeg-devel Cc: Zhao Zhili Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Archived-At: List-Archive: List-Post: PR #20702 opened by Zhao Zhili (quink) URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20702 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20702.patch >>From bbd75ceb2502ede2eb4ebcfd027055432aece710 Mon Sep 17 00:00:00 2001 From: Zhao Zhili Date: Mon, 13 Oct 2025 16:40:36 +0800 Subject: [PATCH 1/5] avcodec/bsf/dts2pts: remove always true check --- libavcodec/bsf/dts2pts.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/libavcodec/bsf/dts2pts.c b/libavcodec/bsf/dts2pts.c index 9d31d7dc08..febf3069a5 100644 --- a/libavcodec/bsf/dts2pts.c +++ b/libavcodec/bsf/dts2pts.c @@ -485,11 +485,10 @@ static int dts2pts_filter(AVBSFContext *ctx, AVPacket *out) av_packet_unref(out); return ret; } - if (!ret) - av_log(ctx, AV_LOG_DEBUG, "Queueing frame for POC %d, GOP %d, dts %"PRId64", " - "generated from POC %d, GOP %d, dts %"PRId64", duration %"PRId64"\n", - frame.poc, frame.gop, out->pts, - poc_node->poc, poc_node->gop, poc_node->dts, poc_node->duration); + av_log(ctx, AV_LOG_DEBUG, "Queueing frame for POC %d, GOP %d, dts %"PRId64", " + "generated from POC %d, GOP %d, dts %"PRId64", duration %"PRId64"\n", + frame.poc, frame.gop, out->pts, + poc_node->poc, poc_node->gop, poc_node->dts, poc_node->duration); } else av_log(ctx, AV_LOG_WARNING, "No timestamp for POC %d in tree\n", frame.poc); } else -- 2.49.1 >>From 301cb18067eaae39c27064ab8bd43bfd1a5f74df Mon Sep 17 00:00:00 2001 From: Zhao Zhili Date: Mon, 13 Oct 2025 20:54:10 +0800 Subject: [PATCH 2/5] avcodec/bsf/dts2pts: fix return 0 on error path --- libavcodec/bsf/dts2pts.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/bsf/dts2pts.c b/libavcodec/bsf/dts2pts.c index febf3069a5..6474061974 100644 --- a/libavcodec/bsf/dts2pts.c +++ b/libavcodec/bsf/dts2pts.c @@ -261,6 +261,7 @@ static int h264_filter(AVBSFContext *ctx) if (!sps) { av_log(ctx, AV_LOG_ERROR, "No active SPS for a slice\n"); + ret = AVERROR_INVALIDDATA; goto fail; } // Initialize the SPS struct with the fields ff_h264_init_poc() cares about -- 2.49.1 >>From 55686f1de299b2445a6863db30067f4f54f3216f Mon Sep 17 00:00:00 2001 From: Zhao Zhili Date: Mon, 13 Oct 2025 20:15:53 +0800 Subject: [PATCH 3/5] avcodec/hevc: add ff_hevc_compute_poc2 which don't depend on HEVCSPS directly So it can be used in other places like bsf. --- libavcodec/hevc/ps.c | 4 ++-- libavcodec/hevc/ps.h | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/libavcodec/hevc/ps.c b/libavcodec/hevc/ps.c index 57125d59c1..6243da1ebe 100644 --- a/libavcodec/hevc/ps.c +++ b/libavcodec/hevc/ps.c @@ -2443,9 +2443,9 @@ void ff_hevc_ps_uninit(HEVCParamSets *ps) av_refstruct_unref(&ps->pps_list[i]); } -int ff_hevc_compute_poc(const HEVCSPS *sps, int pocTid0, int poc_lsb, int nal_unit_type) +int ff_hevc_compute_poc2(unsigned log2_max_poc_lsb, int pocTid0, int poc_lsb, int nal_unit_type) { - int max_poc_lsb = 1 << sps->log2_max_poc_lsb; + int max_poc_lsb = 1 << log2_max_poc_lsb; int prev_poc_lsb = pocTid0 % max_poc_lsb; int prev_poc_msb = pocTid0 - prev_poc_lsb; int poc_msb; diff --git a/libavcodec/hevc/ps.h b/libavcodec/hevc/ps.h index 25475b5593..d620887b8e 100644 --- a/libavcodec/hevc/ps.h +++ b/libavcodec/hevc/ps.h @@ -546,6 +546,11 @@ int ff_hevc_encode_nal_vps(HEVCVPS *vps, unsigned int id, /** * Compute POC of the current frame and return it. */ -int ff_hevc_compute_poc(const HEVCSPS *sps, int pocTid0, int poc_lsb, int nal_unit_type); +int ff_hevc_compute_poc2(unsigned log2_max_poc_lsb, int pocTid0, int poc_lsb, int nal_unit_type); + +static inline int ff_hevc_compute_poc(const HEVCSPS *sps, int pocTid0, int poc_lsb, int nal_unit_type) +{ + return ff_hevc_compute_poc2(sps->log2_max_poc_lsb, pocTid0, poc_lsb, nal_unit_type); +} #endif /* AVCODEC_HEVC_PS_H */ -- 2.49.1 >>From f373b81df061ceb6db7ced3bf52a90efe4b540a2 Mon Sep 17 00:00:00 2001 From: Zhao Zhili Date: Mon, 13 Oct 2025 20:52:46 +0800 Subject: [PATCH 4/5] avcodec/bsf/dts2pts: add hevc support --- configure | 2 +- libavcodec/bsf/dts2pts.c | 179 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 179 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 7828381b5d..879c2cf7a8 100755 --- a/configure +++ b/configure @@ -3584,7 +3584,7 @@ av1_frame_merge_bsf_select="cbs_av1" av1_frame_split_bsf_select="cbs_av1" av1_metadata_bsf_select="cbs_av1" dovi_rpu_bsf_select="cbs_h265 cbs_av1 dovi_rpudec dovi_rpuenc" -dts2pts_bsf_select="cbs_h264 h264parse" +dts2pts_bsf_select="cbs_h264 h264parse cbs_h265 hevc_parser" eac3_core_bsf_select="ac3_parser" eia608_to_smpte436m_bsf_select="smpte_436m" evc_frame_merge_bsf_select="evcparse" diff --git a/libavcodec/bsf/dts2pts.c b/libavcodec/bsf/dts2pts.c index 6474061974..bcc042f1c5 100644 --- a/libavcodec/bsf/dts2pts.c +++ b/libavcodec/bsf/dts2pts.c @@ -23,6 +23,8 @@ * Derive PTS by reordering DTS from supported streams */ +#include + #include "libavutil/avassert.h" #include "libavutil/fifo.h" #include "libavutil/mem.h" @@ -32,8 +34,10 @@ #include "bsf_internal.h" #include "cbs.h" #include "cbs_h264.h" +#include "cbs_h265.h" #include "h264_parse.h" #include "h264_ps.h" +#include "hevc/ps.h" #include "libavutil/refstruct.h" typedef struct DTS2PTSNode { @@ -59,6 +63,11 @@ typedef struct DTS2PTSH264Context { int picture_structure; } DTS2PTSH264Context; +typedef struct DTS2PTSHEVCContext { + int poc_tid0; + int latency; +} DTS2PTSHEVCContext; + typedef struct DTS2PTSContext { struct AVTreeNode *root; AVFifo *fifo; @@ -75,6 +84,7 @@ typedef struct DTS2PTSContext { union { DTS2PTSH264Context h264; + DTS2PTSHEVCContext hevc; } u; int nb_frame; @@ -363,6 +373,171 @@ static void h264_flush(AVBSFContext *ctx) h264->last_poc = h264->highest_poc = INT_MIN; } +static int hevc_init(AVBSFContext *ctx) +{ + DTS2PTSContext *s = ctx->priv_data; + DTS2PTSHEVCContext *hevc = &s->u.hevc; + + hevc->latency = INT_MAX; + s->nb_frame = -ctx->par_in->video_delay; + + return 0; +} + +static void hevc_flush(AVBSFContext *ctx) +{ + DTS2PTSContext *s = ctx->priv_data; + DTS2PTSHEVCContext *hevc = &s->u.hevc; + hevc->poc_tid0 = 0; + hevc->latency = INT_MAX; + s->nb_frame = -ctx->par_in->video_delay; +} + +static int hevc_queue_frame(AVBSFContext *ctx, AVPacket *pkt, int poc, bool *queued) +{ + DTS2PTSContext *s = ctx->priv_data; + DTS2PTSHEVCContext *hevc = &s->u.hevc; + + if (poc < s->nb_frame) { + int diff = s->nb_frame - poc; + + hevc->latency += diff; + s->nb_frame -= diff; + av_tree_enumerate(s->root, &diff, NULL, dec_poc); + av_log(ctx, AV_LOG_INFO, + "Increase latency to %d, poc %d, nb_frame %d\n", + hevc->latency, poc, s->nb_frame); + } + + int ret = alloc_and_insert_node(ctx, pkt->dts, pkt->duration, s->nb_frame, 1, s->gop); + if (ret < 0) + return ret; + s->nb_frame++; + if (*queued) + return 0; + + av_log(ctx, AV_LOG_DEBUG, "Queueing frame with POC %d, GOP %d, dts %"PRId64"\n", + poc, s->gop, pkt->dts); + + DTS2PTSFrame frame = { + .pkt = pkt, + .poc = poc, + .poc_diff = 1, + .gop = s->gop, + }; + ret = av_fifo_write(s->fifo, &frame, 1); + if (ret < 0) + return ret; + + *queued = true; + + return 0; +} + +static int hevc_init_nb_frame(AVBSFContext *ctx, int poc) +{ + DTS2PTSContext *s = ctx->priv_data; + DTS2PTSHEVCContext *hevc = &s->u.hevc; + const CodedBitstreamH265Context *cbs_hevc = s->cbc->priv_data; + const H265RawVPS *vps = cbs_hevc->active_vps; + + if (!vps) + return AVERROR_INVALIDDATA; + + hevc->latency = vps->vps_max_num_reorder_pics[0]; + if (vps->vps_max_latency_increase_plus1[0]) + hevc->latency += vps->vps_max_latency_increase_plus1[0] - 1; + + s->nb_frame = poc - hevc->latency; + av_log(ctx, AV_LOG_DEBUG, "Latency %d, poc %d, nb_frame %d\n", + hevc->latency, poc, s->nb_frame); + + return 0; +} + +static int hevc_filter(AVBSFContext *ctx) +{ + DTS2PTSContext *s = ctx->priv_data; + DTS2PTSHEVCContext *hevc = &s->u.hevc; + CodedBitstreamFragment *au = &s->au; + AVPacket *in; + bool queued = 0; + int ret = ff_bsf_get_packet(ctx, &in); + if (ret < 0) + return ret; + + ret = ff_cbs_read_packet(s->cbc, au, in); + if (ret < 0) { + av_log(ctx, AV_LOG_WARNING, "Failed to parse access unit.\n"); + goto fail; + } + + for (int i = 0; i < au->nb_units; i++) { + CodedBitstreamUnit *unit = &au->units[i]; + CodedBitstreamUnitType type = unit->type; + + bool is_slice = type <= HEVC_NAL_RASL_R || (type >= HEVC_NAL_BLA_W_LP && + type <= HEVC_NAL_CRA_NUT); + if (!is_slice) + continue; + + const H265RawSliceHeader *slice = unit->content; + if (!slice->first_slice_segment_in_pic_flag) + continue; + + const CodedBitstreamH265Context *cbs_hevc = s->cbc->priv_data; + const H265RawSPS *sps = cbs_hevc->active_sps; + if (!sps) { + av_log(ctx, AV_LOG_ERROR, "No active SPS for a slice\n"); + ret = AVERROR_INVALIDDATA; + goto fail; + } + + int poc; + if (type == HEVC_NAL_IDR_W_RADL || type == HEVC_NAL_IDR_N_LP) { + poc = 0; + ret = hevc_init_nb_frame(ctx, poc); + if (ret < 0) + goto fail; + s->gop = (s->gop + 1) % s->fifo_size; + } else { + unsigned log2_max_poc_lsb = sps->log2_max_pic_order_cnt_lsb_minus4 + 4; + int poc_lsb = slice->slice_pic_order_cnt_lsb; + + poc = ff_hevc_compute_poc2(log2_max_poc_lsb, hevc->poc_tid0, poc_lsb, type); + if (hevc->latency == INT_MAX) { + ret = hevc_init_nb_frame(ctx, poc); + if (ret < 0) + goto fail; + } + } + + if (slice->nal_unit_header.nuh_temporal_id_plus1 == 1 && + type != HEVC_NAL_TRAIL_N && type != HEVC_NAL_TSA_N && + type != HEVC_NAL_STSA_N && type != HEVC_NAL_RADL_N && + type != HEVC_NAL_RASL_N && type != HEVC_NAL_RADL_R && + type != HEVC_NAL_RASL_R) { + hevc->poc_tid0 = poc; + } + + ret = hevc_queue_frame(ctx, in, poc, &queued); + if (ret < 0) + goto fail; + break; + } + + if (!queued) { + av_log(ctx, AV_LOG_ERROR, "No slices in access unit\n"); + ret = AVERROR_INVALIDDATA; + } + +fail: + ff_cbs_fragment_reset(au); + if (!queued) + av_packet_free(&in); + return ret; +} + // Core functions static const struct { enum AVCodecID id; @@ -372,6 +547,7 @@ static const struct { size_t fifo_size; } func_tab[] = { { AV_CODEC_ID_H264, h264_init, h264_filter, h264_flush, H264_MAX_DPB_FRAMES * 2 * 2 }, + { AV_CODEC_ID_HEVC, hevc_init, hevc_filter, hevc_flush, HEVC_MAX_DPB_SIZE * 2 }, }; static int dts2pts_init(AVBSFContext *ctx) @@ -453,7 +629,7 @@ static int dts2pts_filter(AVBSFContext *ctx, AVPacket *out) // Search the timestamp for the requested POC and set PTS poc_node = av_tree_find(s->root, &frame, cmp_find, (void **)next); - if (!poc_node) { + if (!poc_node && ctx->par_in->codec_id == AV_CODEC_ID_H264) { poc_node = next[1]; if (!poc_node || poc_node->poc != frame.poc) poc_node = next[0]; @@ -536,6 +712,7 @@ static void dts2pts_close(AVBSFContext *ctx) static const enum AVCodecID dts2pts_codec_ids[] = { AV_CODEC_ID_H264, + AV_CODEC_ID_HEVC, AV_CODEC_ID_NONE, }; -- 2.49.1 >>From a7d97b998c27dcd38a6614219cb003ed298b2ba0 Mon Sep 17 00:00:00 2001 From: Zhao Zhili Date: Mon, 13 Oct 2025 22:12:48 +0800 Subject: [PATCH 5/5] fate/hevc: add a test for the dts2pts bsf --- tests/fate/hevc.mak | 8 +++ tests/ref/fate/hevc-bsf-dts2pts-cra | 88 +++++++++++++++++++++++++++++ tests/ref/fate/hevc-bsf-dts2pts-idr | 68 ++++++++++++++++++++++ 3 files changed, 164 insertions(+) create mode 100644 tests/ref/fate/hevc-bsf-dts2pts-cra create mode 100644 tests/ref/fate/hevc-bsf-dts2pts-idr diff --git a/tests/fate/hevc.mak b/tests/fate/hevc.mak index 7b22e36a3d..ba21c602da 100644 --- a/tests/fate/hevc.mak +++ b/tests/fate/hevc.mak @@ -235,6 +235,14 @@ fate-hevc-bsf-mp4toannexb: CMD = md5 -i $(TARGET_PATH)/tests/data/hevc-mp4.mov - fate-hevc-bsf-mp4toannexb: CMP = oneline fate-hevc-bsf-mp4toannexb: REF = 73019329ed7f81c24f9af67c34c640c0 +# First frame is IDR, POC = 0 +FATE_HEVC-$(call FRAMECRC, MOV HEVC,, HEVC_PARSER MOV_MUXER DTS2PTS_BSF) += fate-hevc-bsf-dts2pts-idr +fate-hevc-bsf-dts2pts-idr: CMD = transcode "hevc" $(TARGET_SAMPLES)/hevc-conformance/AMP_A_Samsung_4.bit mov "-c:v copy -bsf:v dts2pts" "-c:v copy" + +# First frame is CRA, POC != 0 +FATE_HEVC-$(call FRAMECRC, MOV HEVC,, HEVC_PARSER MOV_MUXER DTS2PTS_BSF) += fate-hevc-bsf-dts2pts-cra +fate-hevc-bsf-dts2pts-cra: CMD = transcode "hevc" $(TARGET_SAMPLES)/hevc-conformance/RAP_A_docomo_4.bit mov "-c:v copy -bsf:v dts2pts -frames:v 80" "-c:v copy" + fate-hevc-skiploopfilter: CMD = framemd5 -skip_loop_filter nokey -i $(TARGET_SAMPLES)/hevc-conformance/SAO_D_Samsung_5.bit -sws_flags bitexact FATE_HEVC-$(call FRAMEMD5, HEVC, HEVC, HEVC_PARSER) += fate-hevc-skiploopfilter diff --git a/tests/ref/fate/hevc-bsf-dts2pts-cra b/tests/ref/fate/hevc-bsf-dts2pts-cra new file mode 100644 index 0000000000..4e9e2c5114 --- /dev/null +++ b/tests/ref/fate/hevc-bsf-dts2pts-cra @@ -0,0 +1,88 @@ +c3c00fdc637a19fa3d23d37d9974d28d *tests/data/fate/hevc-bsf-dts2pts-cra.mov +103067 tests/data/fate/hevc-bsf-dts2pts-cra.mov +#extradata 0: 118, 0x25f51994 +#tb 0: 1/1200000 +#media_type 0: video +#codec_id 0: hevc +#dimensions 0: 416x240 +#sar 0: 0/1 +0, -144000, 336000, 48000, 7990, 0xc6026e64 +0, -96000, 144000, 48000, 1765, 0xc816635b, F=0x0 +0, -48000, 48000, 48000, 894, 0x428fbdff, F=0x0 +0, 0, 0, 48000, 297, 0x9dd28986, F=0x0 +0, 48000, 96000, 48000, 246, 0x3b5878bd, F=0x0 +0, 96000, 240000, 48000, 972, 0xf1dbe630, F=0x0 +0, 144000, 192000, 48000, 238, 0xbdda7a15, F=0x0 +0, 192000, 288000, 48000, 326, 0x85fa9eb7, F=0x0 +0, 240000, 720000, 48000, 5269, 0x02a83809, F=0x0 +0, 288000, 528000, 48000, 1857, 0xe9f8a77e, F=0x0 +0, 336000, 432000, 48000, 1054, 0x10b70755, F=0x0 +0, 384000, 384000, 48000, 360, 0xe04cbda9, F=0x0 +0, 432000, 480000, 48000, 361, 0x4e05aff5, F=0x0 +0, 480000, 624000, 48000, 1015, 0x3da8ec98, F=0x0 +0, 528000, 576000, 48000, 349, 0x27daadf4, F=0x0 +0, 576000, 672000, 48000, 319, 0x672c9699, F=0x0 +0, 624000, 1104000, 48000, 4491, 0x32eca7c6, F=0x0 +0, 672000, 912000, 48000, 1858, 0x3039994f, F=0x0 +0, 720000, 816000, 48000, 1016, 0xe6010553, F=0x0 +0, 768000, 768000, 48000, 356, 0x5344a6ca, F=0x0 +0, 816000, 864000, 48000, 323, 0xf76d9d30, F=0x0 +0, 864000, 1008000, 48000, 1019, 0x4c8c06d2, F=0x0 +0, 912000, 960000, 48000, 301, 0x0f1d8f43, F=0x0 +0, 960000, 1056000, 48000, 307, 0x341897cb, F=0x0 +0, 1008000, 1488000, 48000, 4275, 0x77a96a7d, F=0x0 +0, 1056000, 1296000, 48000, 1644, 0xc86d3753, F=0x0 +0, 1104000, 1200000, 48000, 853, 0xb3a1a7f4, F=0x0 +0, 1152000, 1152000, 48000, 309, 0x5e4a9840, F=0x0 +0, 1200000, 1248000, 48000, 242, 0x30db7905, F=0x0 +0, 1248000, 1392000, 48000, 960, 0x6b42e74d, F=0x0 +0, 1296000, 1344000, 48000, 279, 0x3ed281a7, F=0x0 +0, 1344000, 1440000, 48000, 261, 0xb6698462, F=0x0 +0, 1392000, 1872000, 48000, 6940, 0x7ab8531d +0, 1440000, 1680000, 48000, 1904, 0x7eb9c679, F=0x0 +0, 1488000, 1584000, 48000, 993, 0x11d9e429, F=0x0 +0, 1536000, 1536000, 48000, 253, 0x08417a25, F=0x0 +0, 1584000, 1632000, 48000, 329, 0x136ca4a1, F=0x0 +0, 1632000, 1776000, 48000, 949, 0xdfaed80a, F=0x0 +0, 1680000, 1728000, 48000, 283, 0x81f686c2, F=0x0 +0, 1728000, 1824000, 48000, 274, 0x81138813, F=0x0 +0, 1776000, 2256000, 48000, 4940, 0x92098d44, F=0x0 +0, 1824000, 2064000, 48000, 1583, 0x25a61e94, F=0x0 +0, 1872000, 1968000, 48000, 909, 0x41fdb7da, F=0x0 +0, 1920000, 1920000, 48000, 251, 0xe68f7697, F=0x0 +0, 1968000, 2016000, 48000, 205, 0xfe4461bd, F=0x0 +0, 2016000, 2160000, 48000, 892, 0x0d2ab3bc, F=0x0 +0, 2064000, 2112000, 48000, 238, 0x45827561, F=0x0 +0, 2112000, 2208000, 48000, 281, 0x2a3a8e61, F=0x0 +0, 2160000, 2256010, 48000, 4629, 0xf2e0fb0f, F=0x0 +0, 2208000, 2256005, 48000, 1453, 0x6ae5dc98, F=0x0 +0, 2256000, 2256002, 1, 869, 0x3982ae69, F=0x0 +0, 2256001, 2256001, 1, 282, 0xd9e28960, F=0x0 +0, 2256002, 2256004, 2, 259, 0x253a809d, F=0x0 +0, 2256004, 2256007, 1, 835, 0x83499f30, F=0x0 +0, 2256005, 2256006, 1, 255, 0xa77b7690, F=0x0 +0, 2256006, 2256008, 1, 242, 0x83977ccf, F=0x0 +0, 2256007, 2256019, 1, 5082, 0xba55ee51, F=0x0 +0, 2256008, 2256014, 2, 1393, 0xc998b442, F=0x0 +0, 2256010, 2256012, 1, 742, 0x91ab75d2, F=0x0 +0, 2256011, 2256011, 1, 229, 0xfa326d98, F=0x0 +0, 2256012, 2256013, 1, 275, 0x49c38226, F=0x0 +0, 2256013, 2256017, 1, 869, 0xdd05acc4, F=0x0 +0, 2256014, 2256016, 2, 293, 0xcc9e904f, F=0x0 +0, 2256016, 2256018, 1, 334, 0x212aa4b1, F=0x0 +0, 2256017, 2256029, 1, 8539, 0xcccc9eb1 +0, 2256018, 2256024, 1, 1593, 0x5a351a68, F=0x0 +0, 2256019, 2256022, 1, 1042, 0xb77d00cc, F=0x0 +0, 2256020, 2256020, 2, 302, 0xbcdb9750, F=0x0 +0, 2256022, 2256023, 1, 336, 0xc7b0a55d, F=0x0 +0, 2256023, 2256026, 1, 875, 0x7e31b046, F=0x0 +0, 2256024, 2256025, 1, 401, 0xb473bca8, F=0x0 +0, 2256025, 2256028, 1, 246, 0x43357263, F=0x0 +0, 2256026, 2256038, 2, 3254, 0x8be44a2d, F=0x0 +0, 2256028, 2256034, 1, 1151, 0x29d52d14, F=0x0 +0, 2256029, 2256031, 1, 733, 0x33606982, F=0x0 +0, 2256030, 2256030, 1, 234, 0xb70a79ff, F=0x0 +0, 2256031, 2256032, 1, 228, 0x86916848, F=0x0 +0, 2256032, 2256036, 2, 689, 0xcca34b40, F=0x0 +0, 2256034, 2256035, 1, 223, 0xa96f6e31, F=0x0 +0, 2256035, 2256037, 1, 241, 0x7ac17531, F=0x0 diff --git a/tests/ref/fate/hevc-bsf-dts2pts-idr b/tests/ref/fate/hevc-bsf-dts2pts-idr new file mode 100644 index 0000000000..4297c6eb22 --- /dev/null +++ b/tests/ref/fate/hevc-bsf-dts2pts-idr @@ -0,0 +1,68 @@ +5536c1f5754cabeca2be7e5ed9e73915 *tests/data/fate/hevc-bsf-dts2pts-idr.mov +2099183 tests/data/fate/hevc-bsf-dts2pts-idr.mov +#extradata 0: 119, 0x62951c6e +#tb 0: 1/1200000 +#media_type 0: video +#codec_id 0: hevc +#dimensions 0: 2560x1600 +#sar 0: 0/1 +0, -144000, 0, 48000, 163193, 0xa0df4126 +0, -96000, 384000, 48000, 108743, 0x38ecef2d, F=0x0 +0, -48000, 192000, 48000, 49821, 0x9cae4107, F=0x0 +0, 0, 96000, 48000, 31671, 0x25407a22, F=0x0 +0, 48000, 48000, 48000, 11543, 0x828498a0, F=0x0 +0, 96000, 144000, 48000, 10615, 0xd387b120, F=0x0 +0, 144000, 288000, 48000, 31879, 0xe80fe84e, F=0x0 +0, 192000, 240000, 48000, 10780, 0xd6e7eede, F=0x0 +0, 240000, 336000, 48000, 10394, 0x3d2e5beb, F=0x0 +0, 288000, 768000, 48000, 104253, 0x2197864b, F=0x0 +0, 336000, 576000, 48000, 49395, 0x0f2ac948, F=0x0 +0, 384000, 480000, 48000, 31408, 0x1c294edc, F=0x0 +0, 432000, 432000, 48000, 10632, 0x1e03c060, F=0x0 +0, 480000, 528000, 48000, 10363, 0x31041014, F=0x0 +0, 528000, 672000, 48000, 31610, 0x3a18b0af, F=0x0 +0, 576000, 624000, 48000, 10513, 0xbdde91bf, F=0x0 +0, 624000, 720000, 48000, 10761, 0x5a61daa0, F=0x0 +0, 672000, 1152000, 48000, 102009, 0x5dcc9a7a, F=0x0 +0, 720000, 960000, 48000, 48966, 0xf1027069, F=0x0 +0, 768000, 864000, 48000, 31541, 0xe5b83109, F=0x0 +0, 816000, 816000, 48000, 11105, 0xfb6cb0d0, F=0x0 +0, 864000, 912000, 48000, 10958, 0xbb766750, F=0x0 +0, 912000, 1056000, 48000, 30581, 0x9cfcb180, F=0x0 +0, 960000, 1008000, 48000, 10885, 0x6ac33d97, F=0x0 +0, 1008000, 1104000, 48000, 10585, 0xb5a6932a, F=0x0 +0, 1056000, 1536000, 48000, 163782, 0x4a0039f9 +0, 1104000, 1344000, 48000, 48606, 0x3ca2bbaa, F=0x0 +0, 1152000, 1248000, 48000, 30233, 0x7ea3fa83, F=0x0 +0, 1200000, 1200000, 48000, 10572, 0xb3ecb899, F=0x0 +0, 1248000, 1296000, 48000, 10596, 0x6d28c65e, F=0x0 +0, 1296000, 1440000, 48000, 30895, 0x60bd15f2, F=0x0 +0, 1344000, 1392000, 48000, 10008, 0xb5c27236, F=0x0 +0, 1392000, 1488000, 48000, 10707, 0x5ad3c069, F=0x0 +0, 1440000, 1920000, 48000, 106762, 0x8d85c1d1, F=0x0 +0, 1488000, 1728000, 48000, 49573, 0xed3814ba, F=0x0 +0, 1536000, 1632000, 48000, 31445, 0x11961e77, F=0x0 +0, 1584000, 1584000, 48000, 10557, 0x53be65fa, F=0x0 +0, 1632000, 1680000, 48000, 10430, 0x3378691c, F=0x0 +0, 1680000, 1824000, 48000, 30660, 0xee25a59f, F=0x0 +0, 1728000, 1776000, 48000, 10519, 0x996b5119, F=0x0 +0, 1776000, 1872000, 48000, 10437, 0xfc711a42, F=0x0 +0, 1824000, 2256001, 48000, 103947, 0x4468d423, F=0x0 +0, 1872000, 2112000, 48000, 49385, 0xa37ab88e, F=0x0 +0, 1920000, 2016000, 48000, 30913, 0xefe92237, F=0x0 +0, 1968000, 1968000, 48000, 10369, 0x3cdfe4d9, F=0x0 +0, 2016000, 2064000, 48000, 10264, 0x4a3316a9, F=0x0 +0, 2064000, 2208000, 48000, 31460, 0xb9bb51e0, F=0x0 +0, 2112000, 2160000, 48000, 10339, 0xd1722293, F=0x0 +0, 2160000, 2256000, 48000, 10386, 0x352647dd, F=0x0 +0, 2208000, 2256011, 48000, 102855, 0xf73a53cd, F=0x0 +0, 2256000, 2256006, 1, 48949, 0x7a001fe6, F=0x0 +0, 2256001, 2256004, 1, 31419, 0x973ff917, F=0x0 +0, 2256002, 2256002, 2, 10845, 0xaa650a19, F=0x0 +0, 2256004, 2256005, 1, 10671, 0x69c7d357, F=0x0 +0, 2256005, 2256008, 1, 30951, 0xebed3d9c, F=0x0 +0, 2256006, 2256007, 1, 10525, 0xc6727243, F=0x0 +0, 2256007, 2256010, 1, 10205, 0x0c6bbc1d, F=0x0 +0, 2256008, 2256008, 2, 37793, 0xfd79bdd2, F=0x0 +0, 2256010, 2256012, 1, 10607, 0x9e689b6d, F=0x0 +0, 2256011, 2256011, 1, 15672, 0x7fa574e9, F=0x0 -- 2.49.1 _______________________________________________ ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org