ffmpeg | branch: master | Timo Rothenpieler <t...@rothenpieler.org> | Sat Nov 5 21:18:36 2022 +0100| [6362b8cd19c72f5b7b58709729afac2a965c3e37] | committer: Timo Rothenpieler
avcodec/nvenc: set correct "sei" payload type for AV1 > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6362b8cd19c72f5b7b58709729afac2a965c3e37 --- libavcodec/nvenc.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c index 8228c66f64..0d1d68d70d 100644 --- a/libavcodec/nvenc.c +++ b/libavcodec/nvenc.c @@ -24,6 +24,9 @@ #include "nvenc.h" #include "hevc_sei.h" +#if CONFIG_AV1_NVENC_ENCODER +#include "av1.h" +#endif #include "libavutil/hwcontext_cuda.h" #include "libavutil/hwcontext.h" @@ -2306,8 +2309,15 @@ static int prepare_sei_data_array(AVCodecContext *avctx, const AVFrame *frame) } else { ctx->sei_data = tmp; ctx->sei_data[sei_count].payloadSize = (uint32_t)a53_size; - ctx->sei_data[sei_count].payloadType = 4; ctx->sei_data[sei_count].payload = (uint8_t*)a53_data; + +#if CONFIG_AV1_NVENC_ENCODER + if (avctx->codec->id == AV_CODEC_ID_AV1) + ctx->sei_data[sei_count].payloadType = AV1_METADATA_TYPE_ITUT_T35; + else +#endif + ctx->sei_data[sei_count].payloadType = SEI_TYPE_USER_DATA_REGISTERED_ITU_T_T35; + sei_count++; } } @@ -2332,8 +2342,15 @@ static int prepare_sei_data_array(AVCodecContext *avctx, const AVFrame *frame) } else { ctx->sei_data = tmp; ctx->sei_data[sei_count].payloadSize = (uint32_t)tc_size; - ctx->sei_data[sei_count].payloadType = SEI_TYPE_TIME_CODE; ctx->sei_data[sei_count].payload = (uint8_t*)tc_data; + +#if CONFIG_AV1_NVENC_ENCODER + if (avctx->codec->id == AV_CODEC_ID_AV1) + ctx->sei_data[sei_count].payloadType = AV1_METADATA_TYPE_TIMECODE; + else +#endif + ctx->sei_data[sei_count].payloadType = SEI_TYPE_TIME_CODE; + sei_count++; } } _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".