Message ID | 20231031185817.6779-2-lucenticus@gmail.com |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel,10,bit,support,v5,1/3] avcodec/amfenc: Fixes the color information in the output. | expand |
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
On Tue, Oct 31, 2023 at 7:13 PM Evgeny Pavlov <lucenticus@gmail.com> wrote: > From: Michael Fabian 'Xaymar' Dirks <michael.dirks@xaymar.com> > > added 10 bit support for amf hevc. > > before: > > command - ffmpeg.exe -hide_banner -y -hwaccel d3d11va > -hwaccel_output_format d3d11 -i test_10bit_file.mkv -an -c:v h264_amf > res.dx11_hw_h264.mkv > output - Format of input frames context (p010le) is not supported by AMF. > command - ffmpeg.exe -hide_banner -y -hwaccel d3d11va > -hwaccel_output_format d3d11 -i test_10bit_file -an -c:v hevc_amf > res.dx11_hw_hevc.mkv > output - Format of input frames context (p010le) is not supported by AMF. > > after: > > command - ffmpeg.exe -hide_banner -y -hwaccel d3d11va > -hwaccel_output_format d3d11 -i test_10bit_file -an -c:v h264_amf > res.dx11_hw_h264.mkv > output - 10-bit input video is not supported by AMF H264 encoder > command - ffmpeg.exe -hide_banner -y -hwaccel d3d11va > -hwaccel_output_format d3d11 -i test_10bit_file -an -c:v hevc_amf > res.dx11_hw_hevc.mkv > output - 10bit file > > v2 - lost line returned in ff_amf_pix_fmts > v3 - fixes after review > v4 - extract duplicated code, fix incorrect processing of 10-bit input for > h264 > v5 - non-functional changes after review > > Co-authored-by: Evgeny Pavlov <lucenticus@gmail.com> > --- > libavcodec/amfenc.c | 37 +++++++++++++++++++++++++++++++++++++ > libavcodec/amfenc.h | 3 +++ > libavcodec/amfenc_h264.c | 24 ++++++++++++++++++++---- > libavcodec/amfenc_hevc.c | 26 +++++++++++++++++++++++++- > 4 files changed, 85 insertions(+), 5 deletions(-) > > diff --git a/libavcodec/amfenc.c b/libavcodec/amfenc.c > index 061859f85c..0bd15dd812 100644 > --- a/libavcodec/amfenc.c > +++ b/libavcodec/amfenc.c > @@ -60,6 +60,7 @@ const enum AVPixelFormat ff_amf_pix_fmts[] = { > #if CONFIG_DXVA2 > AV_PIX_FMT_DXVA2_VLD, > #endif > + AV_PIX_FMT_P010, > AV_PIX_FMT_NONE > }; > > @@ -72,6 +73,7 @@ static const FormatMap format_map[] = > { > { AV_PIX_FMT_NONE, AMF_SURFACE_UNKNOWN }, > { AV_PIX_FMT_NV12, AMF_SURFACE_NV12 }, > + { AV_PIX_FMT_P010, AMF_SURFACE_P010 }, > { AV_PIX_FMT_BGR0, AMF_SURFACE_BGRA }, > { AV_PIX_FMT_RGB0, AMF_SURFACE_RGBA }, > { AV_PIX_FMT_GRAY8, AMF_SURFACE_GRAY8 }, > @@ -785,6 +787,41 @@ int ff_amf_receive_packet(AVCodecContext *avctx, > AVPacket *avpkt) > return ret; > } > > +int ff_amf_get_color_profile(AVCodecContext *avctx) > +{ > + amf_int64 color_profile = AMF_VIDEO_CONVERTER_COLOR_PROFILE_UNKNOWN; > + if (avctx->color_range == AVCOL_RANGE_JPEG) { > + /// Color Space for Full (JPEG) Range > + switch (avctx->colorspace) { > + case AVCOL_SPC_SMPTE170M: > + color_profile = AMF_VIDEO_CONVERTER_COLOR_PROFILE_FULL_601; > + break; > + case AVCOL_SPC_BT709: > + color_profile = AMF_VIDEO_CONVERTER_COLOR_PROFILE_FULL_709; > + break; > + case AVCOL_SPC_BT2020_NCL: > + case AVCOL_SPC_BT2020_CL: > + color_profile = AMF_VIDEO_CONVERTER_COLOR_PROFILE_FULL_2020; > + break; > + } > + } else { > + /// Color Space for Limited (MPEG) range > + switch (avctx->colorspace) { > + case AVCOL_SPC_SMPTE170M: > + color_profile = AMF_VIDEO_CONVERTER_COLOR_PROFILE_601; > + break; > + case AVCOL_SPC_BT709: > + color_profile = AMF_VIDEO_CONVERTER_COLOR_PROFILE_709; > + break; > + case AVCOL_SPC_BT2020_NCL: > + case AVCOL_SPC_BT2020_CL: > + color_profile = AMF_VIDEO_CONVERTER_COLOR_PROFILE_2020; > + break; > + } > + } > + return color_profile; > +} > + > const AVCodecHWConfigInternal *const ff_amfenc_hw_configs[] = { > #if CONFIG_D3D11VA > HW_CONFIG_ENCODER_FRAMES(D3D11, D3D11VA), > diff --git a/libavcodec/amfenc.h b/libavcodec/amfenc.h > index 2dbd378ef8..62736ef579 100644 > --- a/libavcodec/amfenc.h > +++ b/libavcodec/amfenc.h > @@ -21,6 +21,7 @@ > > #include <AMF/core/Factory.h> > > +#include <AMF/components/ColorSpace.h> > #include <AMF/components/VideoEncoderVCE.h> > #include <AMF/components/VideoEncoderHEVC.h> > #include <AMF/components/VideoEncoderAV1.h> > @@ -170,6 +171,8 @@ int ff_amf_receive_packet(AVCodecContext *avctx, > AVPacket *avpkt); > */ > extern const enum AVPixelFormat ff_amf_pix_fmts[]; > > +int ff_amf_get_color_profile(AVCodecContext *avctx); > + > /** > * Error handling helper > */ > diff --git a/libavcodec/amfenc_h264.c b/libavcodec/amfenc_h264.c > index bd544d12df..f785e091c9 100644 > --- a/libavcodec/amfenc_h264.c > +++ b/libavcodec/amfenc_h264.c > @@ -199,6 +199,8 @@ static av_cold int amf_encode_init_h264(AVCodecContext > *avctx) > AMFRate framerate; > AMFSize framesize = > AMFConstructSize(avctx->width, avctx->height); > int deblocking_filter = (avctx->flags & > AV_CODEC_FLAG_LOOP_FILTER) ? 1 : 0; > + amf_int64 color_profile; > + enum AVPixelFormat pix_fmt; > > if (avctx->framerate.num > 0 && avctx->framerate.den > 0) { > framerate = AMFConstructRate(avctx->framerate.num, > avctx->framerate.den); > @@ -262,10 +264,24 @@ FF_ENABLE_DEPRECATION_WARNINGS > AMF_ASSIGN_PROPERTY_RATIO(res, ctx->encoder, > AMF_VIDEO_ENCODER_ASPECT_RATIO, ratio); > } > > - /// Color Range (Partial/TV/MPEG or Full/PC/JPEG) > - if (avctx->color_range == AVCOL_RANGE_JPEG) { > - AMF_ASSIGN_PROPERTY_BOOL(res, ctx->encoder, > AMF_VIDEO_ENCODER_FULL_RANGE_COLOR, 1); > - } > + color_profile = ff_amf_get_color_profile(avctx); > + AMF_ASSIGN_PROPERTY_INT64(res, ctx->encoder, > AMF_VIDEO_ENCODER_OUTPUT_COLOR_PROFILE, color_profile); > + > + /// Color Range (Support for older Drivers) > + AMF_ASSIGN_PROPERTY_BOOL(res, ctx->encoder, > AMF_VIDEO_ENCODER_FULL_RANGE_COLOR, !!(avctx->color_range == > AVCOL_RANGE_JPEG)); > + > + /// Color Depth > + pix_fmt = avctx->hw_frames_ctx ? > ((AVHWFramesContext*)avctx->hw_frames_ctx->data)->sw_format > + : avctx->pix_fmt; > + > + // 10 bit input video is not supported by AMF H264 encoder > + AMF_RETURN_IF_FALSE(ctx, pix_fmt != AV_PIX_FMT_P010, > AVERROR_INVALIDDATA, "10-bit input video is not supported by AMF H264 > encoder\n"); > + > + AMF_ASSIGN_PROPERTY_INT64(res, ctx->encoder, > AMF_VIDEO_ENCODER_COLOR_BIT_DEPTH, AMF_COLOR_BIT_DEPTH_8); > + /// Color Transfer Characteristics (AMF matches ISO/IEC) > + AMF_ASSIGN_PROPERTY_INT64(res, ctx->encoder, > AMF_VIDEO_ENCODER_OUTPUT_TRANSFER_CHARACTERISTIC, > (amf_int64)avctx->color_trc); > + /// Color Primaries (AMF matches ISO/IEC) > + AMF_ASSIGN_PROPERTY_INT64(res, ctx->encoder, > AMF_VIDEO_ENCODER_OUTPUT_COLOR_PRIMARIES, > (amf_int64)avctx->color_primaries); > > // autodetect rate control method > if (ctx->rate_control_mode == > AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_UNKNOWN) { > diff --git a/libavcodec/amfenc_hevc.c b/libavcodec/amfenc_hevc.c > index 352564a301..8c6401c646 100644 > --- a/libavcodec/amfenc_hevc.c > +++ b/libavcodec/amfenc_hevc.c > @@ -34,8 +34,9 @@ static const AVOption options[] = { > { "high_quality", "high quality trancoding", > 0, AV_OPT_TYPE_CONST, {.i64 = AMF_VIDEO_ENCODER_HEVC_USAGE_HIGH_QUALITY > }, 0, 0, VE, "usage" }, > { "lowlatency_high_quality","low latency yet high quality > trancoding", 0, AV_OPT_TYPE_CONST, {.i64 = > AMF_VIDEO_ENCODER_HEVC_USAGE_LOW_LATENCY_HIGH_QUALITY }, 0, 0, VE, "usage" > }, > > - { "profile", "Set the profile (default main)", > OFFSET(profile), AV_OPT_TYPE_INT,{ .i64 = > AMF_VIDEO_ENCODER_HEVC_PROFILE_MAIN }, AMF_VIDEO_ENCODER_HEVC_PROFILE_MAIN, > AMF_VIDEO_ENCODER_HEVC_PROFILE_MAIN, VE, "profile" }, > + { "profile", "Set the profile (default main)", > OFFSET(profile), AV_OPT_TYPE_INT,{ .i64 = > AMF_VIDEO_ENCODER_HEVC_PROFILE_MAIN }, AMF_VIDEO_ENCODER_HEVC_PROFILE_MAIN, > AMF_VIDEO_ENCODER_HEVC_PROFILE_MAIN_10, VE, "profile" }, > { "main", "", 0, AV_OPT_TYPE_CONST,{ > .i64 = AMF_VIDEO_ENCODER_HEVC_PROFILE_MAIN }, 0, 0, VE, "profile" }, > + { "main10", "", 0, AV_OPT_TYPE_CONST,{ > .i64 = AMF_VIDEO_ENCODER_HEVC_PROFILE_MAIN_10 }, 0, 0, VE, "profile" }, > > { "profile_tier", "Set the profile tier (default main)", > OFFSET(tier), AV_OPT_TYPE_INT,{ .i64 = AMF_VIDEO_ENCODER_HEVC_TIER_MAIN }, > AMF_VIDEO_ENCODER_HEVC_TIER_MAIN, AMF_VIDEO_ENCODER_HEVC_TIER_HIGH, VE, > "tier" }, > { "main", "", 0, AV_OPT_TYPE_CONST, { .i64 = > AMF_VIDEO_ENCODER_HEVC_TIER_MAIN }, 0, 0, VE, "tier" }, > @@ -160,6 +161,9 @@ static av_cold int amf_encode_init_hevc(AVCodecContext > *avctx) > AMFRate framerate; > AMFSize framesize = AMFConstructSize(avctx->width, > avctx->height); > int deblocking_filter = (avctx->flags & > AV_CODEC_FLAG_LOOP_FILTER) ? 1 : 0; > + amf_int64 color_depth; > + amf_int64 color_profile; > + enum AVPixelFormat pix_fmt; > > if (avctx->framerate.num > 0 && avctx->framerate.den > 0) { > framerate = AMFConstructRate(avctx->framerate.num, > avctx->framerate.den); > @@ -187,6 +191,9 @@ FF_ENABLE_DEPRECATION_WARNINGS > case AV_PROFILE_HEVC_MAIN: > profile = AMF_VIDEO_ENCODER_HEVC_PROFILE_MAIN; > break; > + case AV_PROFILE_HEVC_MAIN_10: > + profile = AMF_VIDEO_ENCODER_HEVC_PROFILE_MAIN_10; > + break; > default: > break; > } > @@ -215,6 +222,23 @@ FF_ENABLE_DEPRECATION_WARNINGS > AMF_ASSIGN_PROPERTY_RATIO(res, ctx->encoder, > AMF_VIDEO_ENCODER_HEVC_ASPECT_RATIO, ratio); > } > > + color_profile = ff_amf_get_color_profile(avctx); > + AMF_ASSIGN_PROPERTY_INT64(res, ctx->encoder, > AMF_VIDEO_ENCODER_HEVC_OUTPUT_COLOR_PROFILE, color_profile); > + /// Color Range (Support for older Drivers) > + AMF_ASSIGN_PROPERTY_BOOL(res, ctx->encoder, > AMF_VIDEO_ENCODER_HEVC_NOMINAL_RANGE, !!(avctx->color_range == > AVCOL_RANGE_JPEG)); > + /// Color Depth > + color_depth = AMF_COLOR_BIT_DEPTH_8; > + pix_fmt = avctx->hw_frames_ctx ? > ((AVHWFramesContext*)avctx->hw_frames_ctx->data)->sw_format > + : avctx->pix_fmt; > + if (pix_fmt == AV_PIX_FMT_P010) { > + color_depth = AMF_COLOR_BIT_DEPTH_10; > + } > + AMF_ASSIGN_PROPERTY_INT64(res, ctx->encoder, > AMF_VIDEO_ENCODER_HEVC_COLOR_BIT_DEPTH, color_depth); > + /// Color Transfer Characteristics (AMF matches ISO/IEC) > + AMF_ASSIGN_PROPERTY_INT64(res, ctx->encoder, > AMF_VIDEO_ENCODER_HEVC_OUTPUT_TRANSFER_CHARACTERISTIC, > (amf_int64)avctx->color_trc); > + /// Color Primaries (AMF matches ISO/IEC) > + AMF_ASSIGN_PROPERTY_INT64(res, ctx->encoder, > AMF_VIDEO_ENCODER_HEVC_OUTPUT_COLOR_PRIMARIES, > (amf_int64)avctx->color_primaries); > + > // Picture control properties > AMF_ASSIGN_PROPERTY_INT64(res, ctx->encoder, > AMF_VIDEO_ENCODER_HEVC_NUM_GOPS_PER_IDR, ctx->gops_per_idr); > AMF_ASSIGN_PROPERTY_INT64(res, ctx->encoder, > AMF_VIDEO_ENCODER_HEVC_GOP_SIZE, avctx->gop_size); > -- > 2.41.0 > > I fixed all comments from previous reviews, please check & let me know if I need to fix something more
On 31/10/2023 18:57, Evgeny Pavlov wrote: > From: Michael Fabian 'Xaymar' Dirks <michael.dirks@xaymar.com> > > added 10 bit support for amf hevc. > > before: > > command - ffmpeg.exe -hide_banner -y -hwaccel d3d11va -hwaccel_output_format d3d11 -i test_10bit_file.mkv -an -c:v h264_amf res.dx11_hw_h264.mkv > output - Format of input frames context (p010le) is not supported by AMF. > command - ffmpeg.exe -hide_banner -y -hwaccel d3d11va -hwaccel_output_format d3d11 -i test_10bit_file -an -c:v hevc_amf res.dx11_hw_hevc.mkv > output - Format of input frames context (p010le) is not supported by AMF. > > after: > > command - ffmpeg.exe -hide_banner -y -hwaccel d3d11va -hwaccel_output_format d3d11 -i test_10bit_file -an -c:v h264_amf res.dx11_hw_h264.mkv > output - 10-bit input video is not supported by AMF H264 encoder > command - ffmpeg.exe -hide_banner -y -hwaccel d3d11va -hwaccel_output_format d3d11 -i test_10bit_file -an -c:v hevc_amf res.dx11_hw_hevc.mkv > output - 10bit file > > v2 - lost line returned in ff_amf_pix_fmts > v3 - fixes after review > v4 - extract duplicated code, fix incorrect processing of 10-bit input for h264 > v5 - non-functional changes after review > > Co-authored-by: Evgeny Pavlov <lucenticus@gmail.com> > --- > libavcodec/amfenc.c | 37 +++++++++++++++++++++++++++++++++++++ > libavcodec/amfenc.h | 3 +++ > libavcodec/amfenc_h264.c | 24 ++++++++++++++++++++---- > libavcodec/amfenc_hevc.c | 26 +++++++++++++++++++++++++- > 4 files changed, 85 insertions(+), 5 deletions(-) There is something very wrong with how the header information is working here. With this series applied, I ran: ffmpeg_g.exe -report -y -i in.mp4 -an -c:v hevc_amf -bsf:v trace_headers -frames:v 1 out.mp4 My input file is: Stream #0:0[0x1](und), 60, 1/60000: Video: hevc (Main 10) (hvc1 / 0x31637668), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 3840x2160 [SAR 1:1 DAR 16:9], 74462 kb/s, 59.94 fps, 59.94 tbr, 60k tbn (default) [trace_headers @ 0000023184c753c0] Extradata [trace_headers @ 0000023184c753c0] Sequence Parameter Set ... [trace_headers @ 0000023184c753c0] 222 vui_parameters_present_flag 0 = 0 So no colour information at all in the headers, and the output file indeed says: Stream #0:0[0x1](und): Video: hevc (Main 10) (hev1 / 0x31766568), yuv420p10le(tv, progressive), 3840x2160, 977 kb/s, SAR 1:1 DAR 16:9, 59.94 fps, 59.94 tbr, 60k tbn (default) However! Reading further: [trace_headers @ 0000023184c753c0] Packet: 2039 bytes, key frame, pts 0, dts 0. ... [trace_headers @ 0000023184c753c0] Sequence Parameter Set ... [trace_headers @ 0000023184c753c0] 222 vui_parameters_present_flag 1 = 1 [trace_headers @ 0000023184c753c0] 223 aspect_ratio_info_present_flag 1 = 1 [trace_headers @ 0000023184c753c0] 224 aspect_ratio_idc 11111111 = 255 [trace_headers @ 0000023184c753c0] 232 sar_width 0000000000000001 = 1 [trace_headers @ 0000023184c753c0] 248 sar_height 0000000000000001 = 1 [trace_headers @ 0000023184c753c0] 264 overscan_info_present_flag 0 = 0 [trace_headers @ 0000023184c753c0] 265 video_signal_type_present_flag 1 = 1 [trace_headers @ 0000023184c753c0] 266 video_format 101 = 5 [trace_headers @ 0000023184c753c0] 269 video_full_range_flag 0 = 0 [trace_headers @ 0000023184c753c0] 270 colour_description_present_flag 1 = 1 [trace_headers @ 0000023184c753c0] 271 colour_primaries 00001001 = 9 [trace_headers @ 0000023184c753c0] 279 transfer_characteristics 00010000 = 16 [trace_headers @ 0000023184c753c0] 287 matrix_coefficients 00001001 = 9 [trace_headers @ 0000023184c753c0] 295 chroma_loc_info_present_flag 0 = 0 [trace_headers @ 0000023184c753c0] 296 neutral_chroma_indication_flag 0 = 0 [trace_headers @ 0000023184c753c0] 297 field_seq_flag 0 = 0 [trace_headers @ 0000023184c753c0] 298 frame_field_info_present_flag 0 = 0 [trace_headers @ 0000023184c753c0] 299 default_display_window_flag 0 = 0 [trace_headers @ 0000023184c753c0] 300 vui_timing_info_present_flag 1 = 1 [trace_headers @ 0000023184c753c0] 301 vui_num_units_in_tick 00000000000000000000001111101001 = 1001 [trace_headers @ 0000023184c753c0] 333 vui_time_scale 00000000000000001110101001100000 = 60000 [trace_headers @ 0000023184c753c0] 365 vui_poc_proportional_to_timing_flag 1 = 1 [trace_headers @ 0000023184c753c0] 366 vui_num_ticks_poc_diff_one_minus1 1 = 0 Comparing the to the original, the chroma sample location (collocated top-left in the original, so the implied default is wrong) has been lost but the colours are otherwise correct in the extraneous headers embedded in the first packet. So the colour information has kindof been passed through, except not in the place in the headers which matters so it is mostly useless. (I guess it maybe works for raw streams with no headers?) I think you need to fix whatever is making the headers not match the actual stream content (which creates invalid files, mp4 and similar containers with global headers need them to match). Thanks, - Mark
On Mon, Nov 27, 2023 at 8:47 PM Mark Thompson <sw@jkqxz.net> wrote: > There is something very wrong with how the header information is working > here. > > With this series applied, I ran: > > ffmpeg_g.exe -report -y -i in.mp4 -an -c:v hevc_amf -bsf:v trace_headers > -frames:v 1 out.mp4 > > My input file is: > > Stream #0:0[0x1](und), 60, 1/60000: Video: hevc (Main 10) (hvc1 / > 0x31637668), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 3840x2160 [SAR 1:1 > DAR 16:9], 74462 kb/s, 59.94 fps, 59.94 tbr, 60k tbn (default) > > [trace_headers @ 0000023184c753c0] Extradata > [trace_headers @ 0000023184c753c0] Sequence Parameter Set > ... > [trace_headers @ 0000023184c753c0] 222 > vui_parameters_present_flag 0 = 0 > > So no colour information at all in the headers, and the output file indeed > says: > > Stream #0:0[0x1](und): Video: hevc (Main 10) (hev1 / 0x31766568), > yuv420p10le(tv, progressive), 3840x2160, 977 kb/s, SAR 1:1 DAR 16:9, 59.94 > fps, 59.94 tbr, 60k tbn (default) > > However! Reading further: > > [trace_headers @ 0000023184c753c0] Packet: 2039 bytes, key frame, pts 0, > dts 0. > ... > [trace_headers @ 0000023184c753c0] Sequence Parameter Set > ... > [trace_headers @ 0000023184c753c0] 222 > vui_parameters_present_flag 1 = 1 > [trace_headers @ 0000023184c753c0] 223 > aspect_ratio_info_present_flag 1 = 1 > [trace_headers @ 0000023184c753c0] 224 aspect_ratio_idc > 11111111 = 255 > [trace_headers @ 0000023184c753c0] 232 sar_width > 0000000000000001 = 1 > [trace_headers @ 0000023184c753c0] 248 sar_height > 0000000000000001 = 1 > [trace_headers @ 0000023184c753c0] 264 overscan_info_present_flag > 0 = 0 > [trace_headers @ 0000023184c753c0] 265 > video_signal_type_present_flag 1 = 1 > [trace_headers @ 0000023184c753c0] 266 video_format > 101 = 5 > [trace_headers @ 0000023184c753c0] 269 video_full_range_flag > 0 = 0 > [trace_headers @ 0000023184c753c0] 270 > colour_description_present_flag 1 = 1 > [trace_headers @ 0000023184c753c0] 271 colour_primaries > 00001001 = 9 > [trace_headers @ 0000023184c753c0] 279 transfer_characteristics > 00010000 = 16 > [trace_headers @ 0000023184c753c0] 287 matrix_coefficients > 00001001 = 9 > [trace_headers @ 0000023184c753c0] 295 > chroma_loc_info_present_flag 0 = 0 > [trace_headers @ 0000023184c753c0] 296 > neutral_chroma_indication_flag 0 = 0 > [trace_headers @ 0000023184c753c0] 297 field_seq_flag > 0 = 0 > [trace_headers @ 0000023184c753c0] 298 > frame_field_info_present_flag 0 = 0 > [trace_headers @ 0000023184c753c0] 299 > default_display_window_flag 0 = 0 > [trace_headers @ 0000023184c753c0] 300 > vui_timing_info_present_flag 1 = 1 > [trace_headers @ 0000023184c753c0] 301 vui_num_units_in_tick > 00000000000000000000001111101001 = 1001 > [trace_headers @ 0000023184c753c0] 333 vui_time_scale > 00000000000000001110101001100000 = 60000 > [trace_headers @ 0000023184c753c0] 365 > vui_poc_proportional_to_timing_flag 1 = 1 > [trace_headers @ 0000023184c753c0] 366 > vui_num_ticks_poc_diff_one_minus1 1 = 0 > > Comparing the to the original, the chroma sample location (collocated > top-left in the original, so the implied default is wrong) has been lost > but the colours are otherwise correct in the extraneous headers embedded in > the first packet. > > So the colour information has kindof been passed through, except not in > the place in the headers which matters so it is mostly useless. (I guess > it maybe works for raw streams with no headers?) > > I think you need to fix whatever is making the headers not match the > actual stream content (which creates invalid files, mp4 and similar > containers with global headers need them to match). > > Thanks, > > - Mark > Could you test this issue with the latest AMD 23.11.1 driver? This issue looks similar to issue #9195 in OBS Studio https://github.com/obsproject/obs-studio/issues/9195. It was fixed in the latest AMD driver.
On 28/11/2023 14:39, Evgeny Pavlov wrote: > On Mon, Nov 27, 2023 at 8:47 PM Mark Thompson <sw@jkqxz.net> wrote: > >> There is something very wrong with how the header information is working >> here. >> >> With this series applied, I ran: >> >> ffmpeg_g.exe -report -y -i in.mp4 -an -c:v hevc_amf -bsf:v trace_headers >> -frames:v 1 out.mp4 >> >> My input file is: >> >> Stream #0:0[0x1](und), 60, 1/60000: Video: hevc (Main 10) (hvc1 / >> 0x31637668), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 3840x2160 [SAR 1:1 >> DAR 16:9], 74462 kb/s, 59.94 fps, 59.94 tbr, 60k tbn (default) >> >> [trace_headers @ 0000023184c753c0] Extradata >> [trace_headers @ 0000023184c753c0] Sequence Parameter Set >> ... >> [trace_headers @ 0000023184c753c0] 222 >> vui_parameters_present_flag 0 = 0 >> >> So no colour information at all in the headers, and the output file indeed >> says: >> >> Stream #0:0[0x1](und): Video: hevc (Main 10) (hev1 / 0x31766568), >> yuv420p10le(tv, progressive), 3840x2160, 977 kb/s, SAR 1:1 DAR 16:9, 59.94 >> fps, 59.94 tbr, 60k tbn (default) >> >> However! Reading further: >> >> [trace_headers @ 0000023184c753c0] Packet: 2039 bytes, key frame, pts 0, >> dts 0. >> ... >> [trace_headers @ 0000023184c753c0] Sequence Parameter Set >> ... >> [trace_headers @ 0000023184c753c0] 222 >> vui_parameters_present_flag 1 = 1 >> [trace_headers @ 0000023184c753c0] 223 >> aspect_ratio_info_present_flag 1 = 1 >> [trace_headers @ 0000023184c753c0] 224 aspect_ratio_idc >> 11111111 = 255 >> [trace_headers @ 0000023184c753c0] 232 sar_width >> 0000000000000001 = 1 >> [trace_headers @ 0000023184c753c0] 248 sar_height >> 0000000000000001 = 1 >> [trace_headers @ 0000023184c753c0] 264 overscan_info_present_flag >> 0 = 0 >> [trace_headers @ 0000023184c753c0] 265 >> video_signal_type_present_flag 1 = 1 >> [trace_headers @ 0000023184c753c0] 266 video_format >> 101 = 5 >> [trace_headers @ 0000023184c753c0] 269 video_full_range_flag >> 0 = 0 >> [trace_headers @ 0000023184c753c0] 270 >> colour_description_present_flag 1 = 1 >> [trace_headers @ 0000023184c753c0] 271 colour_primaries >> 00001001 = 9 >> [trace_headers @ 0000023184c753c0] 279 transfer_characteristics >> 00010000 = 16 >> [trace_headers @ 0000023184c753c0] 287 matrix_coefficients >> 00001001 = 9 >> [trace_headers @ 0000023184c753c0] 295 >> chroma_loc_info_present_flag 0 = 0 >> [trace_headers @ 0000023184c753c0] 296 >> neutral_chroma_indication_flag 0 = 0 >> [trace_headers @ 0000023184c753c0] 297 field_seq_flag >> 0 = 0 >> [trace_headers @ 0000023184c753c0] 298 >> frame_field_info_present_flag 0 = 0 >> [trace_headers @ 0000023184c753c0] 299 >> default_display_window_flag 0 = 0 >> [trace_headers @ 0000023184c753c0] 300 >> vui_timing_info_present_flag 1 = 1 >> [trace_headers @ 0000023184c753c0] 301 vui_num_units_in_tick >> 00000000000000000000001111101001 = 1001 >> [trace_headers @ 0000023184c753c0] 333 vui_time_scale >> 00000000000000001110101001100000 = 60000 >> [trace_headers @ 0000023184c753c0] 365 >> vui_poc_proportional_to_timing_flag 1 = 1 >> [trace_headers @ 0000023184c753c0] 366 >> vui_num_ticks_poc_diff_one_minus1 1 = 0 >> >> Comparing the to the original, the chroma sample location (collocated >> top-left in the original, so the implied default is wrong) has been lost >> but the colours are otherwise correct in the extraneous headers embedded in >> the first packet. >> >> So the colour information has kindof been passed through, except not in >> the place in the headers which matters so it is mostly useless. (I guess >> it maybe works for raw streams with no headers?) >> >> I think you need to fix whatever is making the headers not match the >> actual stream content (which creates invalid files, mp4 and similar >> containers with global headers need them to match). >> >> Thanks, >> >> - Mark >> > > Could you test this issue with the latest AMD 23.11.1 driver? This issue > looks similar to issue #9195 in OBS Studio > https://github.com/obsproject/obs-studio/issues/9195. It was fixed in the > latest AMD driver. I upgraded to 23.11.1 and see no change - the colour information is still missing in the header but not the stream, and the two different sequence parameter sets are identical to what they were before the change. Can you share what your trace_headers output looks like for the out-of-band and in-band parameter sets? Are they identical for you? Mine below. Thanks, - Mark [trace_headers @ 0000023184c753c0] Extradata [trace_headers @ 0000023184c753c0] Sequence Parameter Set [trace_headers @ 0000023184c753c0] 0 forbidden_zero_bit 0 = 0 [trace_headers @ 0000023184c753c0] 1 nal_unit_type 100001 = 33 [trace_headers @ 0000023184c753c0] 7 nuh_layer_id 000000 = 0 [trace_headers @ 0000023184c753c0] 13 nuh_temporal_id_plus1 001 = 1 [trace_headers @ 0000023184c753c0] 16 sps_video_parameter_set_id 0000 = 0 [trace_headers @ 0000023184c753c0] 20 sps_max_sub_layers_minus1 000 = 0 [trace_headers @ 0000023184c753c0] 23 sps_temporal_id_nesting_flag 1 = 1 [trace_headers @ 0000023184c753c0] 24 general_profile_space 00 = 0 [trace_headers @ 0000023184c753c0] 26 general_tier_flag 0 = 0 [trace_headers @ 0000023184c753c0] 27 general_profile_idc 00010 = 2 [trace_headers @ 0000023184c753c0] 32 general_profile_compatibility_flag[0] 0 = 0 [trace_headers @ 0000023184c753c0] 33 general_profile_compatibility_flag[1] 0 = 0 [trace_headers @ 0000023184c753c0] 34 general_profile_compatibility_flag[2] 1 = 1 [trace_headers @ 0000023184c753c0] 35 general_profile_compatibility_flag[3] 0 = 0 [trace_headers @ 0000023184c753c0] 36 general_profile_compatibility_flag[4] 0 = 0 [trace_headers @ 0000023184c753c0] 37 general_profile_compatibility_flag[5] 0 = 0 [trace_headers @ 0000023184c753c0] 38 general_profile_compatibility_flag[6] 0 = 0 [trace_headers @ 0000023184c753c0] 39 general_profile_compatibility_flag[7] 0 = 0 [trace_headers @ 0000023184c753c0] 40 general_profile_compatibility_flag[8] 0 = 0 [trace_headers @ 0000023184c753c0] 41 general_profile_compatibility_flag[9] 0 = 0 [trace_headers @ 0000023184c753c0] 42 general_profile_compatibility_flag[10] 0 = 0 [trace_headers @ 0000023184c753c0] 43 general_profile_compatibility_flag[11] 0 = 0 [trace_headers @ 0000023184c753c0] 44 general_profile_compatibility_flag[12] 0 = 0 [trace_headers @ 0000023184c753c0] 45 general_profile_compatibility_flag[13] 0 = 0 [trace_headers @ 0000023184c753c0] 46 general_profile_compatibility_flag[14] 0 = 0 [trace_headers @ 0000023184c753c0] 47 general_profile_compatibility_flag[15] 0 = 0 [trace_headers @ 0000023184c753c0] 48 general_profile_compatibility_flag[16] 0 = 0 [trace_headers @ 0000023184c753c0] 49 general_profile_compatibility_flag[17] 0 = 0 [trace_headers @ 0000023184c753c0] 50 general_profile_compatibility_flag[18] 0 = 0 [trace_headers @ 0000023184c753c0] 51 general_profile_compatibility_flag[19] 0 = 0 [trace_headers @ 0000023184c753c0] 52 general_profile_compatibility_flag[20] 0 = 0 [trace_headers @ 0000023184c753c0] 53 general_profile_compatibility_flag[21] 0 = 0 [trace_headers @ 0000023184c753c0] 54 general_profile_compatibility_flag[22] 0 = 0 [trace_headers @ 0000023184c753c0] 55 general_profile_compatibility_flag[23] 0 = 0 [trace_headers @ 0000023184c753c0] 56 general_profile_compatibility_flag[24] 0 = 0 [trace_headers @ 0000023184c753c0] 57 general_profile_compatibility_flag[25] 0 = 0 [trace_headers @ 0000023184c753c0] 58 general_profile_compatibility_flag[26] 0 = 0 [trace_headers @ 0000023184c753c0] 59 general_profile_compatibility_flag[27] 0 = 0 [trace_headers @ 0000023184c753c0] 60 general_profile_compatibility_flag[28] 0 = 0 [trace_headers @ 0000023184c753c0] 61 general_profile_compatibility_flag[29] 0 = 0 [trace_headers @ 0000023184c753c0] 62 general_profile_compatibility_flag[30] 0 = 0 [trace_headers @ 0000023184c753c0] 63 general_profile_compatibility_flag[31] 0 = 0 [trace_headers @ 0000023184c753c0] 64 general_progressive_source_flag 1 = 1 [trace_headers @ 0000023184c753c0] 65 general_interlaced_source_flag 0 = 0 [trace_headers @ 0000023184c753c0] 66 general_non_packed_constraint_flag 1 = 1 [trace_headers @ 0000023184c753c0] 67 general_frame_only_constraint_flag 1 = 1 [trace_headers @ 0000023184c753c0] 68 general_reserved_zero_7bits 0000000 = 0 [trace_headers @ 0000023184c753c0] 75 general_one_picture_only_constraint_flag 0 = 0 [trace_headers @ 0000023184c753c0] 76 general_reserved_zero_35bits 000000000000000000000000 = 0 [trace_headers @ 0000023184c753c0] 100 general_reserved_zero_35bits 00000000000 = 0 [trace_headers @ 0000023184c753c0] 111 general_inbld_flag 0 = 0 [trace_headers @ 0000023184c753c0] 112 general_level_idc 10111010 = 186 [trace_headers @ 0000023184c753c0] 120 sps_seq_parameter_set_id 1 = 0 [trace_headers @ 0000023184c753c0] 121 chroma_format_idc 010 = 1 [trace_headers @ 0000023184c753c0] 124 pic_width_in_luma_samples 00000000000111100000001 = 3840 [trace_headers @ 0000023184c753c0] 147 pic_height_in_luma_samples 00000000000100001110001 = 2160 [trace_headers @ 0000023184c753c0] 170 conformance_window_flag 0 = 0 [trace_headers @ 0000023184c753c0] 171 bit_depth_luma_minus8 011 = 2 [trace_headers @ 0000023184c753c0] 174 bit_depth_chroma_minus8 011 = 2 [trace_headers @ 0000023184c753c0] 177 log2_max_pic_order_cnt_lsb_minus4 1 = 0 [trace_headers @ 0000023184c753c0] 178 sps_sub_layer_ordering_info_present_flag 0 = 0 [trace_headers @ 0000023184c753c0] 179 sps_max_dec_pic_buffering_minus1[0] 010 = 1 [trace_headers @ 0000023184c753c0] 182 sps_max_num_reorder_pics[0] 1 = 0 [trace_headers @ 0000023184c753c0] 183 sps_max_latency_increase_plus1[0] 1 = 0 [trace_headers @ 0000023184c753c0] 184 log2_min_luma_coding_block_size_minus3 1 = 0 [trace_headers @ 0000023184c753c0] 185 log2_diff_max_min_luma_coding_block_size 00100 = 3 [trace_headers @ 0000023184c753c0] 190 log2_min_luma_transform_block_size_minus2 1 = 0 [trace_headers @ 0000023184c753c0] 191 log2_diff_max_min_luma_transform_block_size 00100 = 3 [trace_headers @ 0000023184c753c0] 196 max_transform_hierarchy_depth_inter 00101 = 4 [trace_headers @ 0000023184c753c0] 201 max_transform_hierarchy_depth_intra 00101 = 4 [trace_headers @ 0000023184c753c0] 206 scaling_list_enabled_flag 0 = 0 [trace_headers @ 0000023184c753c0] 207 amp_enabled_flag 1 = 1 [trace_headers @ 0000023184c753c0] 208 sample_adaptive_offset_enabled_flag 1 = 1 [trace_headers @ 0000023184c753c0] 209 pcm_enabled_flag 0 = 0 [trace_headers @ 0000023184c753c0] 210 num_short_term_ref_pic_sets 010 = 1 [trace_headers @ 0000023184c753c0] 213 num_negative_pics 010 = 1 [trace_headers @ 0000023184c753c0] 216 num_positive_pics 1 = 0 [trace_headers @ 0000023184c753c0] 217 delta_poc_s0_minus1[0] 1 = 0 [trace_headers @ 0000023184c753c0] 218 used_by_curr_pic_s0_flag[0] 1 = 1 [trace_headers @ 0000023184c753c0] 219 long_term_ref_pics_present_flag 0 = 0 [trace_headers @ 0000023184c753c0] 220 sps_temporal_mvp_enabled_flag 0 = 0 [trace_headers @ 0000023184c753c0] 221 strong_intra_smoothing_enabled_flag 0 = 0 [trace_headers @ 0000023184c753c0] 222 vui_parameters_present_flag 0 = 0 [trace_headers @ 0000023184c753c0] 223 sps_extension_present_flag 0 = 0 [trace_headers @ 0000023184c753c0] 224 rbsp_stop_one_bit 1 = 1 [trace_headers @ 0000023184c753c0] 225 rbsp_alignment_zero_bit 0 = 0 [trace_headers @ 0000023184c753c0] 226 rbsp_alignment_zero_bit 0 = 0 [trace_headers @ 0000023184c753c0] 227 rbsp_alignment_zero_bit 0 = 0 [trace_headers @ 0000023184c753c0] 228 rbsp_alignment_zero_bit 0 = 0 [trace_headers @ 0000023184c753c0] 229 rbsp_alignment_zero_bit 0 = 0 [trace_headers @ 0000023184c753c0] 230 rbsp_alignment_zero_bit 0 = 0 [trace_headers @ 0000023184c753c0] 231 rbsp_alignment_zero_bit 0 = 0 [trace_headers @ 0000023184c753c0] Packet: 2039 bytes, key frame, pts 0, dts 0. ... [trace_headers @ 0000023184c753c0] Sequence Parameter Set [trace_headers @ 0000023184c753c0] 0 forbidden_zero_bit 0 = 0 [trace_headers @ 0000023184c753c0] 1 nal_unit_type 100001 = 33 [trace_headers @ 0000023184c753c0] 7 nuh_layer_id 000000 = 0 [trace_headers @ 0000023184c753c0] 13 nuh_temporal_id_plus1 001 = 1 [trace_headers @ 0000023184c753c0] 16 sps_video_parameter_set_id 0000 = 0 [trace_headers @ 0000023184c753c0] 20 sps_max_sub_layers_minus1 000 = 0 [trace_headers @ 0000023184c753c0] 23 sps_temporal_id_nesting_flag 1 = 1 [trace_headers @ 0000023184c753c0] 24 general_profile_space 00 = 0 [trace_headers @ 0000023184c753c0] 26 general_tier_flag 0 = 0 [trace_headers @ 0000023184c753c0] 27 general_profile_idc 00010 = 2 [trace_headers @ 0000023184c753c0] 32 general_profile_compatibility_flag[0] 0 = 0 [trace_headers @ 0000023184c753c0] 33 general_profile_compatibility_flag[1] 0 = 0 [trace_headers @ 0000023184c753c0] 34 general_profile_compatibility_flag[2] 1 = 1 [trace_headers @ 0000023184c753c0] 35 general_profile_compatibility_flag[3] 0 = 0 [trace_headers @ 0000023184c753c0] 36 general_profile_compatibility_flag[4] 0 = 0 [trace_headers @ 0000023184c753c0] 37 general_profile_compatibility_flag[5] 0 = 0 [trace_headers @ 0000023184c753c0] 38 general_profile_compatibility_flag[6] 0 = 0 [trace_headers @ 0000023184c753c0] 39 general_profile_compatibility_flag[7] 0 = 0 [trace_headers @ 0000023184c753c0] 40 general_profile_compatibility_flag[8] 0 = 0 [trace_headers @ 0000023184c753c0] 41 general_profile_compatibility_flag[9] 0 = 0 [trace_headers @ 0000023184c753c0] 42 general_profile_compatibility_flag[10] 0 = 0 [trace_headers @ 0000023184c753c0] 43 general_profile_compatibility_flag[11] 0 = 0 [trace_headers @ 0000023184c753c0] 44 general_profile_compatibility_flag[12] 0 = 0 [trace_headers @ 0000023184c753c0] 45 general_profile_compatibility_flag[13] 0 = 0 [trace_headers @ 0000023184c753c0] 46 general_profile_compatibility_flag[14] 0 = 0 [trace_headers @ 0000023184c753c0] 47 general_profile_compatibility_flag[15] 0 = 0 [trace_headers @ 0000023184c753c0] 48 general_profile_compatibility_flag[16] 0 = 0 [trace_headers @ 0000023184c753c0] 49 general_profile_compatibility_flag[17] 0 = 0 [trace_headers @ 0000023184c753c0] 50 general_profile_compatibility_flag[18] 0 = 0 [trace_headers @ 0000023184c753c0] 51 general_profile_compatibility_flag[19] 0 = 0 [trace_headers @ 0000023184c753c0] 52 general_profile_compatibility_flag[20] 0 = 0 [trace_headers @ 0000023184c753c0] 53 general_profile_compatibility_flag[21] 0 = 0 [trace_headers @ 0000023184c753c0] 54 general_profile_compatibility_flag[22] 0 = 0 [trace_headers @ 0000023184c753c0] 55 general_profile_compatibility_flag[23] 0 = 0 [trace_headers @ 0000023184c753c0] 56 general_profile_compatibility_flag[24] 0 = 0 [trace_headers @ 0000023184c753c0] 57 general_profile_compatibility_flag[25] 0 = 0 [trace_headers @ 0000023184c753c0] 58 general_profile_compatibility_flag[26] 0 = 0 [trace_headers @ 0000023184c753c0] 59 general_profile_compatibility_flag[27] 0 = 0 [trace_headers @ 0000023184c753c0] 60 general_profile_compatibility_flag[28] 0 = 0 [trace_headers @ 0000023184c753c0] 61 general_profile_compatibility_flag[29] 0 = 0 [trace_headers @ 0000023184c753c0] 62 general_profile_compatibility_flag[30] 0 = 0 [trace_headers @ 0000023184c753c0] 63 general_profile_compatibility_flag[31] 0 = 0 [trace_headers @ 0000023184c753c0] 64 general_progressive_source_flag 1 = 1 [trace_headers @ 0000023184c753c0] 65 general_interlaced_source_flag 0 = 0 [trace_headers @ 0000023184c753c0] 66 general_non_packed_constraint_flag 1 = 1 [trace_headers @ 0000023184c753c0] 67 general_frame_only_constraint_flag 1 = 1 [trace_headers @ 0000023184c753c0] 68 general_reserved_zero_7bits 0000000 = 0 [trace_headers @ 0000023184c753c0] 75 general_one_picture_only_constraint_flag 0 = 0 [trace_headers @ 0000023184c753c0] 76 general_reserved_zero_35bits 000000000000000000000000 = 0 [trace_headers @ 0000023184c753c0] 100 general_reserved_zero_35bits 00000000000 = 0 [trace_headers @ 0000023184c753c0] 111 general_inbld_flag 0 = 0 [trace_headers @ 0000023184c753c0] 112 general_level_idc 10111010 = 186 [trace_headers @ 0000023184c753c0] 120 sps_seq_parameter_set_id 1 = 0 [trace_headers @ 0000023184c753c0] 121 chroma_format_idc 010 = 1 [trace_headers @ 0000023184c753c0] 124 pic_width_in_luma_samples 00000000000111100000001 = 3840 [trace_headers @ 0000023184c753c0] 147 pic_height_in_luma_samples 00000000000100001110001 = 2160 [trace_headers @ 0000023184c753c0] 170 conformance_window_flag 0 = 0 [trace_headers @ 0000023184c753c0] 171 bit_depth_luma_minus8 011 = 2 [trace_headers @ 0000023184c753c0] 174 bit_depth_chroma_minus8 011 = 2 [trace_headers @ 0000023184c753c0] 177 log2_max_pic_order_cnt_lsb_minus4 1 = 0 [trace_headers @ 0000023184c753c0] 178 sps_sub_layer_ordering_info_present_flag 0 = 0 [trace_headers @ 0000023184c753c0] 179 sps_max_dec_pic_buffering_minus1[0] 010 = 1 [trace_headers @ 0000023184c753c0] 182 sps_max_num_reorder_pics[0] 1 = 0 [trace_headers @ 0000023184c753c0] 183 sps_max_latency_increase_plus1[0] 1 = 0 [trace_headers @ 0000023184c753c0] 184 log2_min_luma_coding_block_size_minus3 1 = 0 [trace_headers @ 0000023184c753c0] 185 log2_diff_max_min_luma_coding_block_size 00100 = 3 [trace_headers @ 0000023184c753c0] 190 log2_min_luma_transform_block_size_minus2 1 = 0 [trace_headers @ 0000023184c753c0] 191 log2_diff_max_min_luma_transform_block_size 00100 = 3 [trace_headers @ 0000023184c753c0] 196 max_transform_hierarchy_depth_inter 00101 = 4 [trace_headers @ 0000023184c753c0] 201 max_transform_hierarchy_depth_intra 00101 = 4 [trace_headers @ 0000023184c753c0] 206 scaling_list_enabled_flag 0 = 0 [trace_headers @ 0000023184c753c0] 207 amp_enabled_flag 1 = 1 [trace_headers @ 0000023184c753c0] 208 sample_adaptive_offset_enabled_flag 1 = 1 [trace_headers @ 0000023184c753c0] 209 pcm_enabled_flag 0 = 0 [trace_headers @ 0000023184c753c0] 210 num_short_term_ref_pic_sets 010 = 1 [trace_headers @ 0000023184c753c0] 213 num_negative_pics 010 = 1 [trace_headers @ 0000023184c753c0] 216 num_positive_pics 1 = 0 [trace_headers @ 0000023184c753c0] 217 delta_poc_s0_minus1[0] 1 = 0 [trace_headers @ 0000023184c753c0] 218 used_by_curr_pic_s0_flag[0] 1 = 1 [trace_headers @ 0000023184c753c0] 219 long_term_ref_pics_present_flag 0 = 0 [trace_headers @ 0000023184c753c0] 220 sps_temporal_mvp_enabled_flag 0 = 0 [trace_headers @ 0000023184c753c0] 221 strong_intra_smoothing_enabled_flag 0 = 0 [trace_headers @ 0000023184c753c0] 222 vui_parameters_present_flag 1 = 1 [trace_headers @ 0000023184c753c0] 223 aspect_ratio_info_present_flag 1 = 1 [trace_headers @ 0000023184c753c0] 224 aspect_ratio_idc 11111111 = 255 [trace_headers @ 0000023184c753c0] 232 sar_width 0000000000000001 = 1 [trace_headers @ 0000023184c753c0] 248 sar_height 0000000000000001 = 1 [trace_headers @ 0000023184c753c0] 264 overscan_info_present_flag 0 = 0 [trace_headers @ 0000023184c753c0] 265 video_signal_type_present_flag 1 = 1 [trace_headers @ 0000023184c753c0] 266 video_format 101 = 5 [trace_headers @ 0000023184c753c0] 269 video_full_range_flag 0 = 0 [trace_headers @ 0000023184c753c0] 270 colour_description_present_flag 1 = 1 [trace_headers @ 0000023184c753c0] 271 colour_primaries 00001001 = 9 [trace_headers @ 0000023184c753c0] 279 transfer_characteristics 00010000 = 16 [trace_headers @ 0000023184c753c0] 287 matrix_coefficients 00001001 = 9 [trace_headers @ 0000023184c753c0] 295 chroma_loc_info_present_flag 0 = 0 [trace_headers @ 0000023184c753c0] 296 neutral_chroma_indication_flag 0 = 0 [trace_headers @ 0000023184c753c0] 297 field_seq_flag 0 = 0 [trace_headers @ 0000023184c753c0] 298 frame_field_info_present_flag 0 = 0 [trace_headers @ 0000023184c753c0] 299 default_display_window_flag 0 = 0 [trace_headers @ 0000023184c753c0] 300 vui_timing_info_present_flag 1 = 1 [trace_headers @ 0000023184c753c0] 301 vui_num_units_in_tick 00000000000000000000001111101001 = 1001 [trace_headers @ 0000023184c753c0] 333 vui_time_scale 00000000000000001110101001100000 = 60000 [trace_headers @ 0000023184c753c0] 365 vui_poc_proportional_to_timing_flag 1 = 1 [trace_headers @ 0000023184c753c0] 366 vui_num_ticks_poc_diff_one_minus1 1 = 0 [trace_headers @ 0000023184c753c0] 367 vui_hrd_parameters_present_flag 0 = 0 [trace_headers @ 0000023184c753c0] 368 bitstream_restriction_flag 0 = 0 [trace_headers @ 0000023184c753c0] 369 sps_extension_present_flag 0 = 0 [trace_headers @ 0000023184c753c0] 370 rbsp_stop_one_bit 1 = 1 [trace_headers @ 0000023184c753c0] 371 rbsp_alignment_zero_bit 0 = 0 [trace_headers @ 0000023184c753c0] 372 rbsp_alignment_zero_bit 0 = 0 [trace_headers @ 0000023184c753c0] 373 rbsp_alignment_zero_bit 0 = 0 [trace_headers @ 0000023184c753c0] 374 rbsp_alignment_zero_bit 0 = 0 [trace_headers @ 0000023184c753c0] 375 rbsp_alignment_zero_bit 0 = 0 (Note also that the extradata has the VPS at the end (after the SPS which refers to it), while the first packet has them in the right order.)
On Tue, Nov 28, 2023 at 8:13 PM Mark Thompson <sw@jkqxz.net> wrote: > I upgraded to 23.11.1 and see no change - the colour information is still > missing in the header but not the stream, and the two different sequence > parameter sets are identical to what they were before the change. > > Can you share what your trace_headers output looks like for the > out-of-band and in-band parameter sets? Are they identical for you? > Yes, it seems that they are identical for me and both have colour information (please find my output below). Is it possible to provide a video you tested? Probably I need to test the patch on your video input. Stream #0:0[0x1](und): Video: hevc (Main 10) (hvc1 / 0x31637668), yuv420p10le(tv, bt2020nc/bt2020/smpte2084, progressive), 3840x2160 [SAR 1:1 DAR 16:9], 2158 kb/s, 29.97 fps, 29.97 tbr, 30k tbn (default) Metadata: creation_time : 2018-11-26T22:40:26.000000Z handler_name : Core Media Video vendor_id : [0][0][0][0] Side data: Mastering Display Metadata, has_primaries:1 has_luminance:1 r(0.7080,0.2920) g(0.1700,0.7970) b(0.1310 0.0460) wp(0.3127, 0.3290) min_luminance=0.000000, max_luminance=1000.000000 Content Light Level Metadata, MaxCLL=1000, MaxFALL=300 Stream mapping: Stream #0:0 -> #0:0 (hevc (native) -> hevc (hevc_amf)) [trace_headers @ 00000226a49c4a80] Extradata [trace_headers @ 00000226a49c4a80] Sequence Parameter Set [trace_headers @ 00000226a49c4a80] 0 forbidden_zero_bit 0 = 0 [trace_headers @ 00000226a49c4a80] 1 nal_unit_type 100001 = 33 [trace_headers @ 00000226a49c4a80] 7 nuh_layer_id 000000 = 0 [trace_headers @ 00000226a49c4a80] 13 nuh_temporal_id_plus1 001 = 1 [trace_headers @ 00000226a49c4a80] 16 sps_video_parameter_set_id 0000 = 0 [trace_headers @ 00000226a49c4a80] 20 sps_max_sub_layers_minus1 000 = 0 [trace_headers @ 00000226a49c4a80] 23 sps_temporal_id_nesting_flag 1 = 1 [trace_headers @ 00000226a49c4a80] 24 general_profile_space 00 = 0 [trace_headers @ 00000226a49c4a80] 26 general_tier_flag 0 = 0 [trace_headers @ 00000226a49c4a80] 27 general_profile_idc 00001 = 1 [trace_headers @ 00000226a49c4a80] 32 general_profile_compatibility_flag[0] 0 = 0 [trace_headers @ 00000226a49c4a80] 33 general_profile_compatibility_flag[1] 1 = 1 [trace_headers @ 00000226a49c4a80] 34 general_profile_compatibility_flag[2] 1 = 1 [trace_headers @ 00000226a49c4a80] 35 general_profile_compatibility_flag[3] 0 = 0 [trace_headers @ 00000226a49c4a80] 36 general_profile_compatibility_flag[4] 0 = 0 [trace_headers @ 00000226a49c4a80] 37 general_profile_compatibility_flag[5] 0 = 0 [trace_headers @ 00000226a49c4a80] 38 general_profile_compatibility_flag[6] 0 = 0 [trace_headers @ 00000226a49c4a80] 39 general_profile_compatibility_flag[7] 0 = 0 [trace_headers @ 00000226a49c4a80] 40 general_profile_compatibility_flag[8] 0 = 0 [trace_headers @ 00000226a49c4a80] 41 general_profile_compatibility_flag[9] 0 = 0 [trace_headers @ 00000226a49c4a80] 42 general_profile_compatibility_flag[10] 0 = 0 [trace_headers @ 00000226a49c4a80] 43 general_profile_compatibility_flag[11] 0 = 0 [trace_headers @ 00000226a49c4a80] 44 general_profile_compatibility_flag[12] 0 = 0 [trace_headers @ 00000226a49c4a80] 45 general_profile_compatibility_flag[13] 0 = 0 [trace_headers @ 00000226a49c4a80] 46 general_profile_compatibility_flag[14] 0 = 0 [trace_headers @ 00000226a49c4a80] 47 general_profile_compatibility_flag[15] 0 = 0 [trace_headers @ 00000226a49c4a80] 48 general_profile_compatibility_flag[16] 0 = 0 [trace_headers @ 00000226a49c4a80] 49 general_profile_compatibility_flag[17] 0 = 0 [trace_headers @ 00000226a49c4a80] 50 general_profile_compatibility_flag[18] 0 = 0 [trace_headers @ 00000226a49c4a80] 51 general_profile_compatibility_flag[19] 0 = 0 [trace_headers @ 00000226a49c4a80] 52 general_profile_compatibility_flag[20] 0 = 0 [trace_headers @ 00000226a49c4a80] 53 general_profile_compatibility_flag[21] 0 = 0 [trace_headers @ 00000226a49c4a80] 54 general_profile_compatibility_flag[22] 0 = 0 [trace_headers @ 00000226a49c4a80] 55 general_profile_compatibility_flag[23] 0 = 0 [trace_headers @ 00000226a49c4a80] 56 general_profile_compatibility_flag[24] 0 = 0 [trace_headers @ 00000226a49c4a80] 57 general_profile_compatibility_flag[25] 0 = 0 [trace_headers @ 00000226a49c4a80] 58 general_profile_compatibility_flag[26] 0 = 0 [trace_headers @ 00000226a49c4a80] 59 general_profile_compatibility_flag[27] 0 = 0 [trace_headers @ 00000226a49c4a80] 60 general_profile_compatibility_flag[28] 0 = 0 [trace_headers @ 00000226a49c4a80] 61 general_profile_compatibility_flag[29] 0 = 0 [trace_headers @ 00000226a49c4a80] 62 general_profile_compatibility_flag[30] 0 = 0 [trace_headers @ 00000226a49c4a80] 63 general_profile_compatibility_flag[31] 0 = 0 [trace_headers @ 00000226a49c4a80] 64 general_progressive_source_flag 1 = 1 [trace_headers @ 00000226a49c4a80] 65 general_interlaced_source_flag 0 = 0 [trace_headers @ 00000226a49c4a80] 66 general_non_packed_constraint_flag 1 = 1 [trace_headers @ 00000226a49c4a80] 67 general_frame_only_constraint_flag 1 = 1 [trace_headers @ 00000226a49c4a80] 68 general_reserved_zero_7bits 0000000 = 0 [trace_headers @ 00000226a49c4a80] 75 general_one_picture_only_constraint_flag 0 = 0 [trace_headers @ 00000226a49c4a80] 76 general_reserved_zero_35bits 000000000000000000000000 = 0 [trace_headers @ 00000226a49c4a80] 100 general_reserved_zero_35bits 00000000000 = 0 [trace_headers @ 00000226a49c4a80] 111 general_inbld_flag 0 = 0 [trace_headers @ 00000226a49c4a80] 112 general_level_idc 10111010 = 186 [trace_headers @ 00000226a49c4a80] 120 sps_seq_parameter_set_id 1 = 0 [trace_headers @ 00000226a49c4a80] 121 chroma_format_idc 010 = 1 [trace_headers @ 00000226a49c4a80] 124 pic_width_in_luma_samples 00000000000111100000001 = 3840 [trace_headers @ 00000226a49c4a80] 147 pic_height_in_luma_samples 00000000000100001110001 = 2160 [trace_headers @ 00000226a49c4a80] 170 conformance_window_flag 0 = 0 [trace_headers @ 00000226a49c4a80] 171 bit_depth_luma_minus8 011 = 2 [trace_headers @ 00000226a49c4a80] 174 bit_depth_chroma_minus8 011 = 2 [trace_headers @ 00000226a49c4a80] 177 log2_max_pic_order_cnt_lsb_minus4 1 = 0 [trace_headers @ 00000226a49c4a80] 178 sps_sub_layer_ordering_info_present_flag 0 = 0 [trace_headers @ 00000226a49c4a80] 179 sps_max_dec_pic_buffering_minus1[0] 010 = 1 [trace_headers @ 00000226a49c4a80] 182 sps_max_num_reorder_pics[0] 1 = 0 [trace_headers @ 00000226a49c4a80] 183 sps_max_latency_increase_plus1[0] 1 = 0 [trace_headers @ 00000226a49c4a80] 184 log2_min_luma_coding_block_size_minus3 1 = 0 [trace_headers @ 00000226a49c4a80] 185 log2_diff_max_min_luma_coding_block_size 00100 = 3 [trace_headers @ 00000226a49c4a80] 190 log2_min_luma_transform_block_size_minus2 1 = 0 [trace_headers @ 00000226a49c4a80] 191 log2_diff_max_min_luma_transform_block_size 00100 = 3 [trace_headers @ 00000226a49c4a80] 196 max_transform_hierarchy_depth_inter 00101 = 4 [trace_headers @ 00000226a49c4a80] 201 max_transform_hierarchy_depth_intra 00101 = 4 [trace_headers @ 00000226a49c4a80] 206 scaling_list_enabled_flag 0 = 0 [trace_headers @ 00000226a49c4a80] 207 amp_enabled_flag 1 = 1 [trace_headers @ 00000226a49c4a80] 208 sample_adaptive_offset_enabled_flag 1 = 1 [trace_headers @ 00000226a49c4a80] 209 pcm_enabled_flag 0 = 0 [trace_headers @ 00000226a49c4a80] 210 num_short_term_ref_pic_sets 010 = 1 [trace_headers @ 00000226a49c4a80] 213 num_negative_pics 010 = 1 [trace_headers @ 00000226a49c4a80] 216 num_positive_pics 1 = 0 [trace_headers @ 00000226a49c4a80] 217 delta_poc_s0_minus1[0] 1 = 0 [trace_headers @ 00000226a49c4a80] 218 used_by_curr_pic_s0_flag[0] 1 = 1 [trace_headers @ 00000226a49c4a80] 219 long_term_ref_pics_present_flag 0 = 0 [trace_headers @ 00000226a49c4a80] 220 sps_temporal_mvp_enabled_flag 0 = 0 [trace_headers @ 00000226a49c4a80] 221 strong_intra_smoothing_enabled_flag 0 = 0 [trace_headers @ 00000226a49c4a80] 222 vui_parameters_present_flag 1 = 1 [trace_headers @ 00000226a49c4a80] 223 aspect_ratio_info_present_flag 1 = 1 [trace_headers @ 00000226a49c4a80] 224 aspect_ratio_idc 11111111 = 255 [trace_headers @ 00000226a49c4a80] 232 sar_width 0000000000000001 = 1 [trace_headers @ 00000226a49c4a80] 248 sar_height 0000000000000001 = 1 [trace_headers @ 00000226a49c4a80] 264 overscan_info_present_flag 0 = 0 [trace_headers @ 00000226a49c4a80] 265 video_signal_type_present_flag 1 = 1 [trace_headers @ 00000226a49c4a80] 266 video_format 101 = 5 [trace_headers @ 00000226a49c4a80] 269 video_full_range_flag 0 = 0 [trace_headers @ 00000226a49c4a80] 270 colour_description_present_flag 1 = 1 [trace_headers @ 00000226a49c4a80] 271 colour_primaries 00001001 = 9 [trace_headers @ 00000226a49c4a80] 279 transfer_characteristics 00010000 = 16 [trace_headers @ 00000226a49c4a80] 287 matrix_coefficients 00001001 = 9 [trace_headers @ 00000226a49c4a80] 295 chroma_loc_info_present_flag 0 = 0 [trace_headers @ 00000226a49c4a80] 296 neutral_chroma_indication_flag 0 = 0 [trace_headers @ 00000226a49c4a80] 297 field_seq_flag 0 = 0 [trace_headers @ 00000226a49c4a80] 298 frame_field_info_present_flag 0 = 0 [trace_headers @ 00000226a49c4a80] 299 default_display_window_flag 0 = 0 [trace_headers @ 00000226a49c4a80] 300 vui_timing_info_present_flag 1 = 1 [trace_headers @ 00000226a49c4a80] 301 vui_num_units_in_tick 00000000000000000000001111101001 = 1001 [trace_headers @ 00000226a49c4a80] 333 vui_time_scale 00000000000000000111010100110000 = 30000 [trace_headers @ 00000226a49c4a80] 365 vui_poc_proportional_to_timing_flag 1 = 1 [trace_headers @ 00000226a49c4a80] 366 vui_num_ticks_poc_diff_one_minus1 1 = 0 [trace_headers @ 00000226a49c4a80] 367 vui_hrd_parameters_present_flag 0 = 0 [trace_headers @ 00000226a49c4a80] 368 bitstream_restriction_flag 0 = 0 [trace_headers @ 00000226a49c4a80] 369 sps_extension_present_flag 0 = 0 [trace_headers @ 00000226a49c4a80] 370 rbsp_stop_one_bit 1 = 1 [trace_headers @ 00000226a49c4a80] 371 rbsp_alignment_zero_bit 0 = 0 [trace_headers @ 00000226a49c4a80] 372 rbsp_alignment_zero_bit 0 = 0 [trace_headers @ 00000226a49c4a80] 373 rbsp_alignment_zero_bit 0 = 0 [trace_headers @ 00000226a49c4a80] 374 rbsp_alignment_zero_bit 0 = 0 [trace_headers @ 00000226a49c4a80] 375 rbsp_alignment_zero_bit 0 = 0 [trace_headers @ 00000226a49c4a80] Picture Parameter Set ... [trace_headers @ 00000226a49c4a80] Video Parameter Set ... [trace_headers @ 00000226a49c4a80] Packet: 15029 bytes, key frame, pts 0, dts 0. [trace_headers @ 00000226a49c4a80] Video Parameter Set ... [trace_headers @ 00000226a49c4a80] Sequence Parameter Set [trace_headers @ 00000226a49c4a80] 0 forbidden_zero_bit 0 = 0 [trace_headers @ 00000226a49c4a80] 1 nal_unit_type 100001 = 33 [trace_headers @ 00000226a49c4a80] 7 nuh_layer_id 000000 = 0 [trace_headers @ 00000226a49c4a80] 13 nuh_temporal_id_plus1 001 = 1 [trace_headers @ 00000226a49c4a80] 16 sps_video_parameter_set_id 0000 = 0 [trace_headers @ 00000226a49c4a80] 20 sps_max_sub_layers_minus1 000 = 0 [trace_headers @ 00000226a49c4a80] 23 sps_temporal_id_nesting_flag 1 = 1 [trace_headers @ 00000226a49c4a80] 24 general_profile_space 00 = 0 [trace_headers @ 00000226a49c4a80] 26 general_tier_flag 0 = 0 [trace_headers @ 00000226a49c4a80] 27 general_profile_idc 00001 = 1 [trace_headers @ 00000226a49c4a80] 32 general_profile_compatibility_flag[0] 0 = 0 [trace_headers @ 00000226a49c4a80] 33 general_profile_compatibility_flag[1] 1 = 1 [trace_headers @ 00000226a49c4a80] 34 general_profile_compatibility_flag[2] 1 = 1 [trace_headers @ 00000226a49c4a80] 35 general_profile_compatibility_flag[3] 0 = 0 [trace_headers @ 00000226a49c4a80] 36 general_profile_compatibility_flag[4] 0 = 0 [trace_headers @ 00000226a49c4a80] 37 general_profile_compatibility_flag[5] 0 = 0 [trace_headers @ 00000226a49c4a80] 38 general_profile_compatibility_flag[6] 0 = 0 [trace_headers @ 00000226a49c4a80] 39 general_profile_compatibility_flag[7] 0 = 0 [trace_headers @ 00000226a49c4a80] 40 general_profile_compatibility_flag[8] 0 = 0 [trace_headers @ 00000226a49c4a80] 41 general_profile_compatibility_flag[9] 0 = 0 [trace_headers @ 00000226a49c4a80] 42 general_profile_compatibility_flag[10] 0 = 0 [trace_headers @ 00000226a49c4a80] 43 general_profile_compatibility_flag[11] 0 = 0 [trace_headers @ 00000226a49c4a80] 44 general_profile_compatibility_flag[12] 0 = 0 [trace_headers @ 00000226a49c4a80] 45 general_profile_compatibility_flag[13] 0 = 0 [trace_headers @ 00000226a49c4a80] 46 general_profile_compatibility_flag[14] 0 = 0 [trace_headers @ 00000226a49c4a80] 47 general_profile_compatibility_flag[15] 0 = 0 [trace_headers @ 00000226a49c4a80] 48 general_profile_compatibility_flag[16] 0 = 0 [trace_headers @ 00000226a49c4a80] 49 general_profile_compatibility_flag[17] 0 = 0 [trace_headers @ 00000226a49c4a80] 50 general_profile_compatibility_flag[18] 0 = 0 [trace_headers @ 00000226a49c4a80] 51 general_profile_compatibility_flag[19] 0 = 0 [trace_headers @ 00000226a49c4a80] 52 general_profile_compatibility_flag[20] 0 = 0 [trace_headers @ 00000226a49c4a80] 53 general_profile_compatibility_flag[21] 0 = 0 [trace_headers @ 00000226a49c4a80] 54 general_profile_compatibility_flag[22] 0 = 0 [trace_headers @ 00000226a49c4a80] 55 general_profile_compatibility_flag[23] 0 = 0 [trace_headers @ 00000226a49c4a80] 56 general_profile_compatibility_flag[24] 0 = 0 [trace_headers @ 00000226a49c4a80] 57 general_profile_compatibility_flag[25] 0 = 0 [trace_headers @ 00000226a49c4a80] 58 general_profile_compatibility_flag[26] 0 = 0 [trace_headers @ 00000226a49c4a80] 59 general_profile_compatibility_flag[27] 0 = 0 [trace_headers @ 00000226a49c4a80] 60 general_profile_compatibility_flag[28] 0 = 0 [trace_headers @ 00000226a49c4a80] 61 general_profile_compatibility_flag[29] 0 = 0 [trace_headers @ 00000226a49c4a80] 62 general_profile_compatibility_flag[30] 0 = 0 [trace_headers @ 00000226a49c4a80] 63 general_profile_compatibility_flag[31] 0 = 0 [trace_headers @ 00000226a49c4a80] 64 general_progressive_source_flag 1 = 1 [trace_headers @ 00000226a49c4a80] 65 general_interlaced_source_flag 0 = 0 [trace_headers @ 00000226a49c4a80] 66 general_non_packed_constraint_flag 1 = 1 [trace_headers @ 00000226a49c4a80] 67 general_frame_only_constraint_flag 1 = 1 [trace_headers @ 00000226a49c4a80] 68 general_reserved_zero_7bits 0000000 = 0 [trace_headers @ 00000226a49c4a80] 75 general_one_picture_only_constraint_flag 0 = 0 [trace_headers @ 00000226a49c4a80] 76 general_reserved_zero_35bits 000000000000000000000000 = 0 [trace_headers @ 00000226a49c4a80] 100 general_reserved_zero_35bits 00000000000 = 0 [trace_headers @ 00000226a49c4a80] 111 general_inbld_flag 0 = 0 [trace_headers @ 00000226a49c4a80] 112 general_level_idc 10111010 = 186 [trace_headers @ 00000226a49c4a80] 120 sps_seq_parameter_set_id 1 = 0 [trace_headers @ 00000226a49c4a80] 121 chroma_format_idc 010 = 1 [trace_headers @ 00000226a49c4a80] 124 pic_width_in_luma_samples 00000000000111100000001 = 3840 [trace_headers @ 00000226a49c4a80] 147 pic_height_in_luma_samples 00000000000100001110001 = 2160 [trace_headers @ 00000226a49c4a80] 170 conformance_window_flag 0 = 0 [trace_headers @ 00000226a49c4a80] 171 bit_depth_luma_minus8 011 = 2 [trace_headers @ 00000226a49c4a80] 174 bit_depth_chroma_minus8 011 = 2 [trace_headers @ 00000226a49c4a80] 177 log2_max_pic_order_cnt_lsb_minus4 1 = 0 [trace_headers @ 00000226a49c4a80] 178 sps_sub_layer_ordering_info_present_flag 0 = 0 [trace_headers @ 00000226a49c4a80] 179 sps_max_dec_pic_buffering_minus1[0] 010 = 1 [trace_headers @ 00000226a49c4a80] 182 sps_max_num_reorder_pics[0] 1 = 0 [trace_headers @ 00000226a49c4a80] 183 sps_max_latency_increase_plus1[0] 1 = 0 [trace_headers @ 00000226a49c4a80] 184 log2_min_luma_coding_block_size_minus3 1 = 0 [trace_headers @ 00000226a49c4a80] 185 log2_diff_max_min_luma_coding_block_size 00100 = 3 [trace_headers @ 00000226a49c4a80] 190 log2_min_luma_transform_block_size_minus2 1 = 0 [trace_headers @ 00000226a49c4a80] 191 log2_diff_max_min_luma_transform_block_size 00100 = 3 [trace_headers @ 00000226a49c4a80] 196 max_transform_hierarchy_depth_inter 00101 = 4 [trace_headers @ 00000226a49c4a80] 201 max_transform_hierarchy_depth_intra 00101 = 4 [trace_headers @ 00000226a49c4a80] 206 scaling_list_enabled_flag 0 = 0 [trace_headers @ 00000226a49c4a80] 207 amp_enabled_flag 1 = 1 [trace_headers @ 00000226a49c4a80] 208 sample_adaptive_offset_enabled_flag 1 = 1 [trace_headers @ 00000226a49c4a80] 209 pcm_enabled_flag 0 = 0 [trace_headers @ 00000226a49c4a80] 210 num_short_term_ref_pic_sets 010 = 1 [trace_headers @ 00000226a49c4a80] 213 num_negative_pics 010 = 1 [trace_headers @ 00000226a49c4a80] 216 num_positive_pics 1 = 0 [trace_headers @ 00000226a49c4a80] 217 delta_poc_s0_minus1[0] 1 = 0 [trace_headers @ 00000226a49c4a80] 218 used_by_curr_pic_s0_flag[0] 1 = 1 [trace_headers @ 00000226a49c4a80] 219 long_term_ref_pics_present_flag 0 = 0 [trace_headers @ 00000226a49c4a80] 220 sps_temporal_mvp_enabled_flag 0 = 0 [trace_headers @ 00000226a49c4a80] 221 strong_intra_smoothing_enabled_flag 0 = 0 [trace_headers @ 00000226a49c4a80] 222 vui_parameters_present_flag 1 = 1 [trace_headers @ 00000226a49c4a80] 223 aspect_ratio_info_present_flag 1 = 1 [trace_headers @ 00000226a49c4a80] 224 aspect_ratio_idc 11111111 = 255 [trace_headers @ 00000226a49c4a80] 232 sar_width 0000000000000001 = 1 [trace_headers @ 00000226a49c4a80] 248 sar_height 0000000000000001 = 1 [trace_headers @ 00000226a49c4a80] 264 overscan_info_present_flag 0 = 0 [trace_headers @ 00000226a49c4a80] 265 video_signal_type_present_flag 1 = 1 [trace_headers @ 00000226a49c4a80] 266 video_format 101 = 5 [trace_headers @ 00000226a49c4a80] 269 video_full_range_flag 0 = 0 [trace_headers @ 00000226a49c4a80] 270 colour_description_present_flag 1 = 1 [trace_headers @ 00000226a49c4a80] 271 colour_primaries 00001001 = 9 [trace_headers @ 00000226a49c4a80] 279 transfer_characteristics 00010000 = 16 [trace_headers @ 00000226a49c4a80] 287 matrix_coefficients 00001001 = 9 [trace_headers @ 00000226a49c4a80] 295 chroma_loc_info_present_flag 0 = 0 [trace_headers @ 00000226a49c4a80] 296 neutral_chroma_indication_flag 0 = 0 [trace_headers @ 00000226a49c4a80] 297 field_seq_flag 0 = 0 [trace_headers @ 00000226a49c4a80] 298 frame_field_info_present_flag 0 = 0 [trace_headers @ 00000226a49c4a80] 299 default_display_window_flag 0 = 0 [trace_headers @ 00000226a49c4a80] 300 vui_timing_info_present_flag 1 = 1 [trace_headers @ 00000226a49c4a80] 301 vui_num_units_in_tick 00000000000000000000001111101001 = 1001 [trace_headers @ 00000226a49c4a80] 333 vui_time_scale 00000000000000000111010100110000 = 30000 [trace_headers @ 00000226a49c4a80] 365 vui_poc_proportional_to_timing_flag 1 = 1 [trace_headers @ 00000226a49c4a80] 366 vui_num_ticks_poc_diff_one_minus1 1 = 0 [trace_headers @ 00000226a49c4a80] 367 vui_hrd_parameters_present_flag 0 = 0 [trace_headers @ 00000226a49c4a80] 368 bitstream_restriction_flag 0 = 0 [trace_headers @ 00000226a49c4a80] 369 sps_extension_present_flag 0 = 0 [trace_headers @ 00000226a49c4a80] 370 rbsp_stop_one_bit 1 = 1 [trace_headers @ 00000226a49c4a80] 371 rbsp_alignment_zero_bit 0 = 0 [trace_headers @ 00000226a49c4a80] 372 rbsp_alignment_zero_bit 0 = 0 [trace_headers @ 00000226a49c4a80] 373 rbsp_alignment_zero_bit 0 = 0 [trace_headers @ 00000226a49c4a80] 374 rbsp_alignment_zero_bit 0 = 0 [trace_headers @ 00000226a49c4a80] 375 rbsp_alignment_zero_bit 0 = 0 [trace_headers @ 00000226a49c4a80] Picture Parameter Set ...
On Wed, Nov 29, 2023 at 11:57 AM Evgeny Pavlov <lucenticus@gmail.com> wrote: > On Tue, Nov 28, 2023 at 8:13 PM Mark Thompson <sw@jkqxz.net> wrote: > >> I upgraded to 23.11.1 and see no change - the colour information is still >> missing in the header but not the stream, and the two different sequence >> parameter sets are identical to what they were before the change. >> >> Can you share what your trace_headers output looks like for the >> out-of-band and in-band parameter sets? Are they identical for you? >> > Yes, it seems that they are identical for me and both have colour > information (please find my output below). > Is it possible to provide a video you tested? Probably I need to > test the patch on your video input. > > Hi Mark, could you share which AMD hardware you use for testing? Your hardware might use older driver version without the fix for missing color information in the header
On 29/11/2023 10:57, Evgeny Pavlov wrote: > On Tue, Nov 28, 2023 at 8:13 PM Mark Thompson <sw@jkqxz.net> wrote: > >> I upgraded to 23.11.1 and see no change - the colour information is still >> missing in the header but not the stream, and the two different sequence >> parameter sets are identical to what they were before the change. >> >> Can you share what your trace_headers output looks like for the >> out-of-band and in-band parameter sets? Are they identical for you? >> > Yes, it seems that they are identical for me and both have colour > information (please find my output below). > Is it possible to provide a video you tested? Probably I need to > test the patch on your video input. Not the same, but here is a freely-available test video which has the same effect: <https://4kmedia.org/lg-new-york-hdr-uhd-4k-demo/>. Output below. It doesn't seem like this should be dependent on the underlying hardware since (I hope) it won't go to the hardware for header information. Still, just in case: it's a 5850U APU running driver version 23.11.1 on Windows 10. (Seems like it might be a good idea for the debug output to print the driver and hardware versions at least?) The VPS out-of-order is also a weird effect - it makes it look like the two headers are generated by separate processes, which doesn't seem like a good idea when you want them to be identical. Thanks, - Mark ffmpeg started on 2023-12-11 at 21:08:30 Report written to "ffmpeg-20231211-210830.log" Log level: 48 Command line: ffmpeg_g.exe -report -y -threads 1 -i in.ts -an -c:v hevc_amf -bsf:v trace_headers -frames:v 1 out.mp4 ffmpeg version N-112951-g8c718b936a Copyright (c) 2000-2023 the FFmpeg developers built with gcc 13.2.0 (Rev3, Built by MSYS2 project) configuration: --assert-level=2 --enable-debug --disable-optimizations --enable-gpl --enable-libx264 --enable-libx265 --enable-libaom --enable-opencl --enable-amf --enable-dxva2 --enable-d3d11va libavutil 58. 32.100 / 58. 32.100 libavcodec 60. 35.100 / 60. 35.100 libavformat 60. 18.100 / 60. 18.100 libavdevice 60. 4.100 / 60. 4.100 libavfilter 9. 14.100 / 9. 14.100 libswscale 7. 6.100 / 7. 6.100 libswresample 4. 13.100 / 4. 13.100 libpostproc 57. 4.100 / 57. 4.100 Splitting the commandline. Reading option '-report' ... matched as option 'report' (generate a report) with argument '1'. Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'. Reading option '-threads' ... matched as AVOption 'threads' with argument '1'. Reading option '-i' ... matched as output url with argument 'in.ts'. Reading option '-an' ... matched as option 'an' (disable audio) with argument '1'. Reading option '-c:v' ... matched as option 'c' (codec name) with argument 'hevc_amf'. Reading option '-bsf:v' ... matched as option 'bsf' (A comma-separated list of bitstream filters) with argument 'trace_headers'. Reading option '-frames:v' ... matched as option 'frames' (set the number of frames to output) with argument '1'. Reading option 'out.mp4' ... matched as output url. Finished splitting the commandline. Parsing a group of options: global . Applying option report (generate a report) with argument 1. Applying option y (overwrite output files) with argument 1. Successfully parsed a group of options. Parsing a group of options: input url in.ts. Successfully parsed a group of options. Opening an input file: in.ts. [AVFormatContext @ 0000018927c73700] Opening 'in.ts' for reading [file @ 0000018927c2da40] Setting default whitelist 'file,crypto,data' [mpegts @ 0000018927c73700] Format mpegts probed with size=2048 and score=50 [mpegts @ 0000018927c73700] stream=0 stream_type=24 pid=101 prog_reg_desc= [mpegts @ 0000018927c73700] stream=1 stream_type=f pid=102 prog_reg_desc= [mpegts @ 0000018927c73700] Before avformat_find_stream_info() pos: 0 bytes read:32768 seeks:0 nb_streams:2 [hevc @ 0000018927c76fc0] nal_unit_type: 35(AUD), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 32(VPS), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 33(SPS), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 34(PPS), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 39(SEI_PREFIX), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 39(SEI_PREFIX), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 39(SEI_PREFIX), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 20(IDR_N_LP), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 38(FD_NUT), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] Decoding VPS [hevc @ 0000018927c76fc0] Main 10 profile bitstream [hevc @ 0000018927c76fc0] Decoding SPS [hevc @ 0000018927c76fc0] Main 10 profile bitstream [hevc @ 0000018927c76fc0] Decoding VUI [hevc @ 0000018927c76fc0] Decoding PPS [hevc @ 0000018927c76fc0] Decoding SEI [hevc @ 0000018927c76fc0] Decoding SEI [hevc @ 0000018927c76fc0] Skipped PREFIX SEI 0 [hevc @ 0000018927c76fc0] Decoding SEI [hevc @ 0000018927c76fc0] Decoding SEI [hevc @ 0000018927c76fc0] Decoding SEI [extract_extradata @ 0000018929819d40] nal_unit_type: 35(AUD), nuh_layer_id: 0, temporal_id: 0 [extract_extradata @ 0000018929819d40] nal_unit_type: 32(VPS), nuh_layer_id: 0, temporal_id: 0 [extract_extradata @ 0000018929819d40] nal_unit_type: 33(SPS), nuh_layer_id: 0, temporal_id: 0 [extract_extradata @ 0000018929819d40] nal_unit_type: 34(PPS), nuh_layer_id: 0, temporal_id: 0 [extract_extradata @ 0000018929819d40] nal_unit_type: 39(SEI_PREFIX), nuh_layer_id: 0, temporal_id: 0 [extract_extradata @ 0000018929819d40] nal_unit_type: 39(SEI_PREFIX), nuh_layer_id: 0, temporal_id: 0 [extract_extradata @ 0000018929819d40] nal_unit_type: 39(SEI_PREFIX), nuh_layer_id: 0, temporal_id: 0 [extract_extradata @ 0000018929819d40] nal_unit_type: 20(IDR_N_LP), nuh_layer_id: 0, temporal_id: 0 [extract_extradata @ 0000018929819d40] nal_unit_type: 38(FD_NUT), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 35(AUD), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 32(VPS), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 33(SPS), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 34(PPS), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 39(SEI_PREFIX), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 39(SEI_PREFIX), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 39(SEI_PREFIX), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 20(IDR_N_LP), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 38(FD_NUT), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] Decoding VPS [hevc @ 0000018927c76fc0] Main 10 profile bitstream [hevc @ 0000018927c76fc0] Decoding SPS [hevc @ 0000018927c76fc0] Main 10 profile bitstream [hevc @ 0000018927c76fc0] Decoding VUI [hevc @ 0000018927c76fc0] Decoding PPS [hevc @ 0000018927c76fc0] Decoding SEI [hevc @ 0000018927c76fc0] Decoding SEI [hevc @ 0000018927c76fc0] Skipped PREFIX SEI 0 [hevc @ 0000018927c76fc0] Decoding SEI [hevc @ 0000018927c76fc0] Decoding SEI [hevc @ 0000018927c76fc0] Decoding SEI [hevc @ 0000018927c76fc0] Format yuv420p10le chosen by get_format(). Mastering Display Metadata: r(0.6800,0.3200) g(0.2650,0.6900) b(0.1500 0.0600) wp(0.3127, 0.3290) min_luminance=0.050000, max_luminance=1200.000000 [hevc @ 0000018927c76fc0] Output frame with POC 0. [hevc @ 0000018927c76fc0] Decoded frame with POC 0. [hevc @ 0000018927c76fc0] nal_unit_type: 32(VPS), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 33(SPS), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 34(PPS), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] Decoding VPS [hevc @ 0000018927c76fc0] Main 10 profile bitstream [hevc @ 0000018927c76fc0] Decoding SPS [hevc @ 0000018927c76fc0] Main 10 profile bitstream [hevc @ 0000018927c76fc0] Decoding VUI [hevc @ 0000018927c76fc0] Decoding PPS [hevc @ 0000018927c76fc0] nal_unit_type: 35(AUD), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 39(SEI_PREFIX), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 38(FD_NUT), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] Decoding SEI [hevc @ 0000018927c76fc0] nal_unit_type: 35(AUD), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 32(VPS), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 33(SPS), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 34(PPS), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 39(SEI_PREFIX), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 39(SEI_PREFIX), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 39(SEI_PREFIX), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 20(IDR_N_LP), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 38(FD_NUT), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] Decoding VPS [hevc @ 0000018927c76fc0] Main 10 profile bitstream [hevc @ 0000018927c76fc0] Decoding SPS [hevc @ 0000018927c76fc0] Main 10 profile bitstream [hevc @ 0000018927c76fc0] Decoding VUI [hevc @ 0000018927c76fc0] Decoding PPS [hevc @ 0000018927c76fc0] Decoding SEI [hevc @ 0000018927c76fc0] Decoding SEI [hevc @ 0000018927c76fc0] Skipped PREFIX SEI 0 [hevc @ 0000018927c76fc0] Decoding SEI [hevc @ 0000018927c76fc0] Decoding SEI [hevc @ 0000018927c76fc0] Skipped PREFIX SEI 6 [hevc @ 0000018927c76fc0] Decoding SEI [hevc @ 0000018927c76fc0] Decoding SEI [hevc @ 0000018927c76fc0] nal_unit_type: 35(AUD), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 39(SEI_PREFIX), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 38(FD_NUT), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] Decoding SEI [hevc @ 0000018927c76fc0] nal_unit_type: 35(AUD), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 39(SEI_PREFIX), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] Decoding SEI [hevc @ 0000018927c76fc0] nal_unit_type: 35(AUD), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 39(SEI_PREFIX), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] Decoding SEI [hevc @ 0000018927c76fc0] nal_unit_type: 35(AUD), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 39(SEI_PREFIX), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] Decoding SEI [hevc @ 0000018927c76fc0] nal_unit_type: 35(AUD), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 39(SEI_PREFIX), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] Decoding SEI [hevc @ 0000018927c76fc0] nal_unit_type: 35(AUD), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 39(SEI_PREFIX), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] Decoding SEI [hevc @ 0000018927c76fc0] nal_unit_type: 35(AUD), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 39(SEI_PREFIX), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] Decoding SEI [hevc @ 0000018927c76fc0] nal_unit_type: 35(AUD), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 39(SEI_PREFIX), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] Decoding SEI [hevc @ 0000018927c76fc0] nal_unit_type: 35(AUD), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 39(SEI_PREFIX), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] Decoding SEI [hevc @ 0000018927c76fc0] nal_unit_type: 35(AUD), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 39(SEI_PREFIX), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] Decoding SEI [hevc @ 0000018927c76fc0] nal_unit_type: 35(AUD), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 39(SEI_PREFIX), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] Decoding SEI [hevc @ 0000018927c76fc0] nal_unit_type: 35(AUD), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 39(SEI_PREFIX), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] Decoding SEI [hevc @ 0000018927c76fc0] nal_unit_type: 35(AUD), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 39(SEI_PREFIX), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] Decoding SEI [hevc @ 0000018927c76fc0] nal_unit_type: 35(AUD), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 39(SEI_PREFIX), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] Decoding SEI [hevc @ 0000018927c76fc0] nal_unit_type: 35(AUD), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 39(SEI_PREFIX), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018927c76fc0] Decoding SEI [mpegts @ 0000018927c73700] Probe buffer size limit of 5000000 bytes reached [mpegts @ 0000018927c73700] start time for stream 1 is not set in estimate_timings_from_pts [mpegts @ 0000018927c73700] probing stream 1 pp:2500 [mpegts @ 0000018927c73700] Probe with size=1688, packets=1 detected aac with score=25 [mpegts @ 0000018927c73700] probed stream 1 [mpegts @ 0000018927c73700] stream 1 : no TS found at start of file, duration not set [mpegts @ 0000018927c73700] Could not find codec parameters for stream 1 (Audio: aac ([15][0][0][0] / 0x000F), 0 channels): unspecified sample format Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options [mpegts @ 0000018927c73700] After avformat_find_stream_info() pos: 0 bytes read:29676400 seeks:8 frames:18 Input #0, mpegts, from 'in.ts': Duration: 00:01:12.24, start: 0.999989, bitrate: 52032 kb/s Program 1 Stream #0:0[0x101], 18, 1/90000: Video: hevc (Main 10) ([36][0][0][0] / 0x0024), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 3840x2160 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn Stream #0:1[0x102](und), 0, 1/90000: Audio: aac ([15][0][0][0] / 0x000F), 0 channels Successfully opened the file. Parsing a group of options: output url out.mp4. Applying option an (disable audio) with argument 1. Applying option c:v (codec name) with argument hevc_amf. Applying option bsf:v (A comma-separated list of bitstream filters) with argument trace_headers. Applying option frames:v (set the number of frames to output) with argument 1. Successfully parsed a group of options. Opening an output file: out.mp4. [out#0/mp4 @ 0000018927c30d40] No explicit maps, mapping streams automatically... [vost#0:0/hevc_amf @ 00000189298204c0] Created video stream from input stream 0:0 [hevc @ 0000018929920040] nal_unit_type: 32(VPS), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018929920040] nal_unit_type: 33(SPS), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018929920040] nal_unit_type: 34(PPS), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018929920040] Decoding VPS [hevc @ 0000018929920040] Main 10 profile bitstream [hevc @ 0000018929920040] Decoding SPS [hevc @ 0000018929920040] Main 10 profile bitstream [hevc @ 0000018929920040] Decoding VUI [hevc @ 0000018929920040] Decoding PPS [file @ 0000018927ce4f00] Setting default whitelist 'file,crypto,data' Successfully opened the file. Stream mapping: Stream #0:0 -> #0:0 (hevc (native) -> hevc (hevc_amf)) Press [q] to stop, [?] for help [NULL @ 0000018927c76fc0] nal_unit_type: 32(VPS), nuh_layer_id: 0, temporal_id: 0 [NULL @ 0000018927c76fc0] nal_unit_type: 33(SPS), nuh_layer_id: 0, temporal_id: 0 [NULL @ 0000018927c76fc0] nal_unit_type: 34(PPS), nuh_layer_id: 0, temporal_id: 0 [NULL @ 0000018927c76fc0] Decoding VPS [NULL @ 0000018927c76fc0] Main 10 profile bitstream [NULL @ 0000018927c76fc0] Decoding SPS [NULL @ 0000018927c76fc0] Main 10 profile bitstream [NULL @ 0000018927c76fc0] Decoding VUI [NULL @ 0000018927c76fc0] Decoding PPS [NULL @ 0000018927c76fc0] nal_unit_type: 35(AUD), nuh_layer_id: 0, temporal_id: 0 [NULL @ 0000018927c76fc0] nal_unit_type: 32(VPS), nuh_layer_id: 0, temporal_id: 0 [NULL @ 0000018927c76fc0] nal_unit_type: 33(SPS), nuh_layer_id: 0, temporal_id: 0 [NULL @ 0000018927c76fc0] nal_unit_type: 34(PPS), nuh_layer_id: 0, temporal_id: 0 [NULL @ 0000018927c76fc0] nal_unit_type: 39(SEI_PREFIX), nuh_layer_id: 0, temporal_id: 0 [NULL @ 0000018927c76fc0] nal_unit_type: 39(SEI_PREFIX), nuh_layer_id: 0, temporal_id: 0 [NULL @ 0000018927c76fc0] nal_unit_type: 39(SEI_PREFIX), nuh_layer_id: 0, temporal_id: 0 [NULL @ 0000018927c76fc0] nal_unit_type: 20(IDR_N_LP), nuh_layer_id: 0, temporal_id: 0 [NULL @ 0000018927c76fc0] nal_unit_type: 38(FD_NUT), nuh_layer_id: 0, temporal_id: 0 [NULL @ 0000018927c76fc0] Decoding VPS [NULL @ 0000018927c76fc0] Main 10 profile bitstream [NULL @ 0000018927c76fc0] Decoding SPS [NULL @ 0000018927c76fc0] Main 10 profile bitstream [NULL @ 0000018927c76fc0] Decoding VUI [NULL @ 0000018927c76fc0] Decoding PPS [NULL @ 0000018927c76fc0] Decoding SEI [NULL @ 0000018927c76fc0] Decoding SEI [NULL @ 0000018927c76fc0] Skipped PREFIX SEI 0 [NULL @ 0000018927c76fc0] Decoding SEI [NULL @ 0000018927c76fc0] Decoding SEI [NULL @ 0000018927c76fc0] Decoding SEI [hevc @ 0000018929920040] nal_unit_type: 35(AUD), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018929920040] nal_unit_type: 32(VPS), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018929920040] nal_unit_type: 33(SPS), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018929920040] nal_unit_type: 34(PPS), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018929920040] nal_unit_type: 39(SEI_PREFIX), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018929920040] nal_unit_type: 39(SEI_PREFIX), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018929920040] nal_unit_type: 39(SEI_PREFIX), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018929920040] nal_unit_type: 20(IDR_N_LP), nuh_layer_id: 0, temporal_id: 0 [NULL @ 0000018927c76fc0] nal_unit_type: 35(AUD), nuh_layer_id: 0, temporal_id: 0 [NULL @ 0000018927c76fc0] nal_unit_type: 39(SEI_PREFIX), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018929920040] nal_unit_type: 38(FD_NUT), nuh_layer_id: 0, temporal_id: 0 [NULL @ 0000018927c76fc0] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0 [NULL @ 0000018927c76fc0] nal_unit_type: 38(FD_NUT), nuh_layer_id: 0, temporal_id: 0 [NULL @ 0000018927c76fc0] Decoding SEI [hevc @ 0000018929920040] Decoding VPS [hevc @ 0000018929920040] Main 10 profile bitstream [NULL @ 0000018927c76fc0] nal_unit_type: 35(AUD), nuh_layer_id: 0, temporal_id: 0 [NULL @ 0000018927c76fc0] nal_unit_type: 32(VPS), nuh_layer_id: 0, temporal_id: 0 [NULL @ 0000018927c76fc0] nal_unit_type: 33(SPS), nuh_layer_id: 0, temporal_id: 0 [NULL @ 0000018927c76fc0] nal_unit_type: 34(PPS), nuh_layer_id: 0, temporal_id: 0 [NULL @ 0000018927c76fc0] nal_unit_type: 39(SEI_PREFIX), nuh_layer_id: 0, temporal_id: 0 [NULL @ 0000018927c76fc0] nal_unit_type: 39(SEI_PREFIX), nuh_layer_id: 0, temporal_id: 0 [NULL @ 0000018927c76fc0] nal_unit_type: 39(SEI_PREFIX), nuh_layer_id: 0, temporal_id: 0 [NULL @ 0000018927c76fc0] nal_unit_type: 20(IDR_N_LP), nuh_layer_id: 0, temporal_id: 0 [NULL @ 0000018927c76fc0] nal_unit_type: 38(FD_NUT), nuh_layer_id: 0, temporal_id: 0 [hevc @ 0000018929920040] Decoding SPS [hevc @ 0000018929920040] Main 10 profile bitstream [hevc @ 0000018929920040] Decoding VUI [NULL @ 0000018927c76fc0] Decoding VPS [hevc @ 0000018929920040] Decoding PPS [NULL @ 0000018927c76fc0] Main 10 profile bitstream [hevc @ 0000018929920040] Decoding SEI [hevc @ 0000018929920040] Decoding SEI [hevc @ 0000018929920040] Skipped PREFIX SEI 0 [hevc @ 0000018929920040] Decoding SEI [hevc @ 0000018929920040] Decoding SEI [hevc @ 0000018929920040] Decoding SEI [hevc @ 0000018929920040] Format yuv420p10le chosen by get_format(). [NULL @ 0000018927c76fc0] Decoding SPS [NULL @ 0000018927c76fc0] Main 10 profile bitstream [NULL @ 0000018927c76fc0] Decoding VUI [NULL @ 0000018927c76fc0] Decoding PPS [NULL @ 0000018927c76fc0] Decoding SEI [NULL @ 0000018927c76fc0] Decoding SEI [NULL @ 0000018927c76fc0] Skipped PREFIX SEI 0 [NULL @ 0000018927c76fc0] Decoding SEI [NULL @ 0000018927c76fc0] Decoding SEI [NULL @ 0000018927c76fc0] Skipped PREFIX SEI 6 [NULL @ 0000018927c76fc0] Decoding SEI [NULL @ 0000018927c76fc0] Decoding SEI Mastering Display Metadata: r(0.6800,0.3200) g(0.2650,0.6900) b(0.1500 0.0600) wp(0.3127, 0.3290) min_luminance=0.050000, max_luminance=1200.000000 [hevc @ 0000018929920040] Output frame with POC 0. [hevc @ 0000018929920040] Decoded frame with POC 0. detected 16 logical cores [graph 0 input from stream 0:0 @ 000001892a880ec0] Setting 'video_size' to value '3840x2160' [graph 0 input from stream 0:0 @ 000001892a880ec0] Setting 'pix_fmt' to value '62' [graph 0 input from stream 0:0 @ 000001892a880ec0] Setting 'time_base' to value '1/90000' [graph 0 input from stream 0:0 @ 000001892a880ec0] Setting 'pixel_aspect' to value '1/1' [graph 0 input from stream 0:0 @ 000001892a880ec0] Setting 'frame_rate' to value '25/1' [graph 0 input from stream 0:0 @ 000001892a880ec0] w:3840 h:2160 pixfmt:yuv420p10le tb:1/90000 fr:25/1 sar:1/1 [format @ 0000018927cdfe00] Setting 'pix_fmts' to value 'nv12|yuv420p|d3d11|dxva2_vld|p010le' [auto_scale_0 @ 000001892cf20e80] w:iw h:ih flags:'' interl:0 [format @ 0000018927cdfe00] auto-inserting filter 'auto_scale_0' between the filter 'Parsed_null_0' and the filter 'format' [AVFilterGraph @ 0000018929815980] query_formats: 4 queried, 2 merged, 1 already done, 0 delayed [auto_scale_0 @ 000001892cf20e80] picking p010le out of 3 ref:yuv420p10le alpha:0 [auto_scale_0 @ 000001892cf20e80] w:3840 h:2160 fmt:yuv420p10le sar:1/1 -> w:3840 h:2160 fmt:p010le sar:1/1 flags:0x00000004 [auto_scale_0 @ 000001892cf20e80] w:3840 h:2160 fmt:yuv420p10le sar:1/1 -> w:3840 h:2160 fmt:p010le sar:1/1 flags:0x00000004 [auto_scale_0 @ 000001892cf20e80] w:3840 h:2160 fmt:yuv420p10le sar:1/1 -> w:3840 h:2160 fmt:p010le sar:1/1 flags:0x00000004 [auto_scale_0 @ 000001892cf20e80] w:3840 h:2160 fmt:yuv420p10le sar:1/1 -> w:3840 h:2160 fmt:p010le sar:1/1 flags:0x00000004 [hevc_amf @ 0000018929820780] AMFDeviceDX11Impl: 2023-12-11 21:08:30.755 954 [AMFDeviceDX11Impl] Debug: InitDX11() created HW DX11.1 device [hevc_amf @ 0000018929820780] AMFDeviceDX11Impl: 2023-12-11 21:08:30.755 954 [AMFDeviceDX11Impl] Debug: InitDX11() created HW DX11 device [hevc_amf @ 0000018929820780] AMF initialisation succeeded via D3D11. [hevc_amf @ 0000018929820780] EncodeCoreHelper: 2023-12-11 21:08:30.765 954 [EncodeCoreHelper] Info: ***Found regpath, but key not found using default=1 [hevc_amf @ 0000018929820780] EncodeCoreHelper: 2023-12-11 21:08:30.788 954 [EncodeCoreHelper] Info: ***Found regpath, but key not found, Default instance is not set [hevc_amf @ 0000018929820780] AMFEncoderCoreBaseImpl: 2023-12-11 21:08:30.788 954 [AMFEncoderCoreBaseImpl] Info: AMFEncoderCoreBaseImpl::QueryThroughput - maxThroughputMBPerSec = 0, totalRequiredThroughputMBPerSec = 0 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.793 954 [AMFEncoderCoreHevc] Debug: SetProperty HevcUsage:0 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.794 954 [AMFEncoderCoreHevc] Debug: SetProperty HevcFrameSize:3840,2160 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.794 954 [AMFEncoderCoreHevc] Debug: SetProperty TL0.QL0.HevcFrameRate:25,1 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.794 954 [AMFEncoderCoreHevc] Debug: SetProperty HevcProfile:1 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.794 954 [AMFEncoderCoreHevc] Debug: SetProperty HevcTier:0 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.794 954 [AMFEncoderCoreHevc] Debug: SetProperty HevcQualityPreset:10 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.794 954 [AMFEncoderCoreHevc] Debug: SetProperty HevcAspectRatio:1,1 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.794 954 [AMFEncoderCoreHevc] Debug: SetProperty HevcOutColorProfile:2 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.794 954 [AMFEncoderCoreHevc] Debug: SetProperty HevcNominalRange:false [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.794 954 [AMFEncoderCoreHevc] Debug: SetProperty HevcColorBitDepth:10 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.794 954 [AMFEncoderCoreHevc] Debug: SetProperty HevcOutColorTransferChar:16 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.794 954 [AMFEncoderCoreHevc] Debug: SetProperty HevcOutColorPrimaries:9 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.794 954 [AMFEncoderCoreHevc] Debug: SetProperty HevcGOPSPerIDR:1 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.794 954 [AMFEncoderCoreHevc] Debug: SetProperty HevcGOPSize:250 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.795 954 [AMFEncoderCoreHevc] Debug: SetProperty HevcDeBlockingFilter:false [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.795 954 [AMFEncoderCoreHevc] Debug: SetProperty HevcHeaderInsertionMode:0 [hevc_amf @ 0000018929920c00] Rate control turned to CBR [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.795 954 [AMFEncoderCoreHevc] Debug: SetProperty HevcRateControlPreAnalysisEnable:0 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.795 954 [AMFEncoderCoreHevc] Debug: SetProperty HevcRateControlMethod:3 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.795 954 [AMFEncoderCoreHevc] Debug: SetProperty HevcEnableVBAQ:false [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.795 954 [AMFEncoderCoreHevc] Debug: SetProperty HevcHalfPixel:true [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.795 954 [AMFEncoderCoreHevc] Debug: SetProperty HevcQuarterPixel:true [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.795 954 [AMFEncoderCoreHevc] Debug: SetProperty TL0.QL0.HevcEnforceHRD:false [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.795 954 [AMFEncoderCoreHevc] Debug: SetProperty TL0.QL0.HevcFillerDataEnable:false [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.795 954 [AMFEncoderCoreHevc] Debug: SetProperty TL0.QL0.HevcTargetBitrate:2000000 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.795 954 [AMFEncoderCoreHevc] Debug: SetProperty TL0.QL0.HevcPeakBitrate:2000000 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.795 954 [AMFEncoderCoreHevc] Debug: SetProperty TL0.QL0.HevcVBVBufferSize:120000 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.795 954 [AMFEncoderCoreHevc] Debug: SetProperty TL0.QL0.HevcPeakBitrate:2000000 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.795 954 [AMFEncoderCoreHevc] Debug: AMFEncoderCoreHevcImpl::Init(P010, 3840, 2160) [hevc_amf @ 0000018929820780] VideoAdaptersEnum: 2023-12-11 21:08:30.803 954 [VideoAdaptersEnum] Info: AMFEnumerateVideoAdapters - Adapter was in DXGI but not in setupapi, filtering: luid=5dd44 [hevc_amf @ 0000018929820780] AMFEncoderCoreBaseImpl: 2023-12-11 21:08:30.807 954 [AMFEncoderCoreBaseImpl] Info: AMFEncoderCoreBaseImpl::QueryThroughput - maxThroughputMBPerSec = 0, totalRequiredThroughputMBPerSec = 0 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.808 954 [AMFEncoderCoreHevc] Debug: SetProperty HevcUsage:0 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.808 954 [AMFEncoderCoreHevc] Debug: SetProperty HevcAspectRatio:1,1 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.808 954 [AMFEncoderCoreHevc] Debug: SetProperty HevcColorBitDepth:10 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.808 954 [AMFEncoderCoreHevc] Debug: SetProperty HevcDeBlockingFilter:false [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.808 954 [AMFEncoderCoreHevc] Debug: SetProperty HevcEnableVBAQ:0 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.808 954 [AMFEncoderCoreHevc] Debug: SetProperty HevcFrameSize:3840,2160 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.808 954 [AMFEncoderCoreHevc] Debug: SetProperty HevcGOPSPerIDR:1 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.808 954 [AMFEncoderCoreHevc] Debug: SetProperty HevcGOPSize:250 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.808 954 [AMFEncoderCoreHevc] Debug: SetProperty HevcHalfPixel:true [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.808 954 [AMFEncoderCoreHevc] Debug: SetProperty HevcHeaderInsertionMode:0 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.808 954 [AMFEncoderCoreHevc] Debug: SetProperty HevcNominalRange:false [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.808 954 [AMFEncoderCoreHevc] Debug: SetProperty HevcOutColorPrimaries:9 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.808 954 [AMFEncoderCoreHevc] Debug: SetProperty HevcOutColorProfile:2 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.808 954 [AMFEncoderCoreHevc] Debug: SetProperty HevcOutColorTransferChar:16 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.808 954 [AMFEncoderCoreHevc] Debug: SetProperty HevcProfile:1 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.808 954 [AMFEncoderCoreHevc] Debug: SetProperty HevcQualityPreset:10 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.808 954 [AMFEncoderCoreHevc] Debug: SetProperty HevcQuarterPixel:true [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.809 954 [AMFEncoderCoreHevc] Debug: SetProperty HevcRateControlMethod:3 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.809 954 [AMFEncoderCoreHevc] Debug: SetProperty HevcRateControlPreAnalysisEnable:0 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.809 954 [AMFEncoderCoreHevc] Debug: SetProperty HevcTier:0 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.809 954 [AMFEncoderCoreHevc] Debug: SetProperty TL0.QL0.HevcEnforceHRD:false [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.809 954 [AMFEncoderCoreHevc] Debug: SetProperty TL0.QL0.HevcFillerDataEnable:false [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.809 954 [AMFEncoderCoreHevc] Debug: SetProperty TL0.QL0.HevcFrameRate:25,1 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.809 954 [AMFEncoderCoreHevc] Debug: SetProperty TL0.QL0.HevcPeakBitrate:2000000 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.809 954 [AMFEncoderCoreHevc] Debug: SetProperty TL0.QL0.HevcTargetBitrate:2000000 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.809 954 [AMFEncoderCoreHevc] Debug: SetProperty TL0.QL0.HevcVBVBufferSize:120000 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.809 954 [AMFEncoderCoreHevc] Debug: SetProperty HevcFrameSize:3840,2160 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.810 954 [AMFEncoderCoreHevc] Info: ConfigInit::Init() - numReferences=2 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.810 954 [AMFEncoderCoreHevc] Info: ConfigInit::Init() - rateControlMethod=8 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.810 954 [AMFEncoderCoreHevc] Info: ConfigInit::Init() - profile=1 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.810 954 [AMFEncoderCoreHevc] Info: ConfigInit::Init() - level=186 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.811 954 [AMFEncoderCoreHevc] Info: ConfigInit::Init() - queueType=8 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.811 954 [AMFEncoderCoreHevc] Info: ConfigInit::Init() - pictureWidth=3840 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.811 954 [AMFEncoderCoreHevc] Info: ConfigInit::Init() - pictureHeight=2160 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.811 954 [AMFEncoderCoreHevc] Info: ConfigInit::Init() - pictureBitDepth=1 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.811 954 [AMFEncoderCoreHevc] Info: ConfigInit::Init() - usage=0 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.811 954 [AMFEncoderCoreHevc] Info: ConfigInit::Init() - tier=0 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.811 954 [AMFEncoderCoreHevc] Info: ConfigInit::Init() - maxNumTemporalLayers=1 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.811 954 [AMFEncoderCoreHevc] Info: ConfigInit::Init() - maxNumLongTermFrames=0 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.811 954 [AMFEncoderCoreHevc] Info: ConfigInit::Init() - maxNumSliceOutputs=1 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.811 954 [AMFEncoderCoreHevc] Info: ConfigInit::Init() - initialBufferFullness=64 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.811 954 [AMFEncoderCoreHevc] Info: ConfigInit::Init() - preEncodeMode=0 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.811 954 [AMFEncoderCoreHevc] Info: ConfigInit::Init() - enablePreEncodeChroma=0 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.811 954 [AMFEncoderCoreHevc] Info: ConfigInit::Init() - vbaqMode=1 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.811 954 [AMFEncoderCoreHevc] Info: ConfigInit::Init() - vbaqStrength=6 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.811 954 [AMFEncoderCoreHevc] Info: ConfigInit::Init() - sceneChangeSensitivity=0 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.811 954 [AMFEncoderCoreHevc] Info: ConfigInit::Init() - sceneChangeMinIdrInterval=0 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.811 954 [AMFEncoderCoreHevc] Info: ConfigInit::Init() - twoPassSearchCenterMapMode=0 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.811 954 [AMFEncoderCoreHevc] Info: ConfigInit::Init() - disableDeblockingFilter=0 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.811 954 [AMFEncoderCoreHevc] Info: ConfigInit::Init() - loopFilterAcrossSlicesEnabled=0 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.811 954 [AMFEncoderCoreHevc] Info: ConfigInit::Init() - betaOffsetDiv2=0 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.811 954 [AMFEncoderCoreHevc] Info: ConfigInit::Init() - tcOffsetDiv2=0 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.811 954 [AMFEncoderCoreHevc] Info: ConfigInit::Init() - cbQpOffset=0 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.811 954 [AMFEncoderCoreHevc] Info: ConfigInit::Init() - crQpOffset=0 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.811 954 [AMFEncoderCoreHevc] Info: ConfigInit::Init() - saoDisabled=0 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.811 954 [AMFEncoderCoreHevc] Info: ConfigInit::Init() - ampEnabled=1 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.811 954 [AMFEncoderCoreHevc] Info: ConfigInit::Init() - strongIntraSmoothingEnabled=0 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.811 954 [AMFEncoderCoreHevc] Info: ConfigInit::Init() - constrainedIntraPredictionEnabled=0 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.811 954 [AMFEncoderCoreHevc] Info: ConfigInit::Init() - cabacInitFlag=0 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.811 954 [AMFEncoderCoreHevc] Info: ConfigInit::Init() - motionEstimationHalfPixel=1 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.811 954 [AMFEncoderCoreHevc] Info: ConfigInit::Init() - motionEstimationQuarterPixel=1 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.811 954 [AMFEncoderCoreHevc] Info: ConfigInit::Init() - disableTransformSkip=0 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.813 954 [AMFEncoderCoreHevc] Warning: Video core bandwidth calcs is not available FamilyId=8e, RevisionId=a1 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.813 954 [AMFEncoderCoreHevc] Debug: SetProperty TL0.QL0.HevcMaxAUSize:0 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.813 954 [AMFEncoderCoreHevc] Debug: SetProperty TL0.QL0.HevcRateControlSkipFrameEnable:false [trace_headers @ 0000018927c7d500] Extradata [trace_headers @ 0000018927c7d500] nal_unit_type: 33(SPS), nuh_layer_id: 0, temporal_id: 0 [trace_headers @ 0000018927c7d500] nal_unit_type: 34(PPS), nuh_layer_id: 0, temporal_id: 0 [trace_headers @ 0000018927c7d500] nal_unit_type: 32(VPS), nuh_layer_id: 0, temporal_id: 0 [trace_headers @ 0000018927c7d500] Sequence Parameter Set [trace_headers @ 0000018927c7d500] 0 forbidden_zero_bit 0 = 0 [trace_headers @ 0000018927c7d500] 1 nal_unit_type 100001 = 33 [trace_headers @ 0000018927c7d500] 7 nuh_layer_id 000000 = 0 [trace_headers @ 0000018927c7d500] 13 nuh_temporal_id_plus1 001 = 1 [trace_headers @ 0000018927c7d500] 16 sps_video_parameter_set_id 0000 = 0 [trace_headers @ 0000018927c7d500] 20 sps_max_sub_layers_minus1 000 = 0 [trace_headers @ 0000018927c7d500] 23 sps_temporal_id_nesting_flag 1 = 1 [trace_headers @ 0000018927c7d500] 24 general_profile_space 00 = 0 [trace_headers @ 0000018927c7d500] 26 general_tier_flag 0 = 0 [trace_headers @ 0000018927c7d500] 27 general_profile_idc 00001 = 1 [trace_headers @ 0000018927c7d500] 32 general_profile_compatibility_flag[0] 0 = 0 [trace_headers @ 0000018927c7d500] 33 general_profile_compatibility_flag[1] 1 = 1 [trace_headers @ 0000018927c7d500] 34 general_profile_compatibility_flag[2] 1 = 1 [trace_headers @ 0000018927c7d500] 35 general_profile_compatibility_flag[3] 0 = 0 [trace_headers @ 0000018927c7d500] 36 general_profile_compatibility_flag[4] 0 = 0 [trace_headers @ 0000018927c7d500] 37 general_profile_compatibility_flag[5] 0 = 0 [trace_headers @ 0000018927c7d500] 38 general_profile_compatibility_flag[6] 0 = 0 [trace_headers @ 0000018927c7d500] 39 general_profile_compatibility_flag[7] 0 = 0 [trace_headers @ 0000018927c7d500] 40 general_profile_compatibility_flag[8] 0 = 0 [trace_headers @ 0000018927c7d500] 41 general_profile_compatibility_flag[9] 0 = 0 [trace_headers @ 0000018927c7d500] 42 general_profile_compatibility_flag[10] 0 = 0 [trace_headers @ 0000018927c7d500] 43 general_profile_compatibility_flag[11] 0 = 0 [trace_headers @ 0000018927c7d500] 44 general_profile_compatibility_flag[12] 0 = 0 [trace_headers @ 0000018927c7d500] 45 general_profile_compatibility_flag[13] 0 = 0 [trace_headers @ 0000018927c7d500] 46 general_profile_compatibility_flag[14] 0 = 0 [trace_headers @ 0000018927c7d500] 47 general_profile_compatibility_flag[15] 0 = 0 [trace_headers @ 0000018927c7d500] 48 general_profile_compatibility_flag[16] 0 = 0 [trace_headers @ 0000018927c7d500] 49 general_profile_compatibility_flag[17] 0 = 0 [trace_headers @ 0000018927c7d500] 50 general_profile_compatibility_flag[18] 0 = 0 [trace_headers @ 0000018927c7d500] 51 general_profile_compatibility_flag[19] 0 = 0 [trace_headers @ 0000018927c7d500] 52 general_profile_compatibility_flag[20] 0 = 0 [trace_headers @ 0000018927c7d500] 53 general_profile_compatibility_flag[21] 0 = 0 [trace_headers @ 0000018927c7d500] 54 general_profile_compatibility_flag[22] 0 = 0 [trace_headers @ 0000018927c7d500] 55 general_profile_compatibility_flag[23] 0 = 0 [trace_headers @ 0000018927c7d500] 56 general_profile_compatibility_flag[24] 0 = 0 [trace_headers @ 0000018927c7d500] 57 general_profile_compatibility_flag[25] 0 = 0 [trace_headers @ 0000018927c7d500] 58 general_profile_compatibility_flag[26] 0 = 0 [trace_headers @ 0000018927c7d500] 59 general_profile_compatibility_flag[27] 0 = 0 [trace_headers @ 0000018927c7d500] 60 general_profile_compatibility_flag[28] 0 = 0 [trace_headers @ 0000018927c7d500] 61 general_profile_compatibility_flag[29] 0 = 0 [trace_headers @ 0000018927c7d500] 62 general_profile_compatibility_flag[30] 0 = 0 [trace_headers @ 0000018927c7d500] 63 general_profile_compatibility_flag[31] 0 = 0 [trace_headers @ 0000018927c7d500] 64 general_progressive_source_flag 1 = 1 [trace_headers @ 0000018927c7d500] 65 general_interlaced_source_flag 0 = 0 [trace_headers @ 0000018927c7d500] 66 general_non_packed_constraint_flag 1 = 1 [trace_headers @ 0000018927c7d500] 67 general_frame_only_constraint_flag 1 = 1 [trace_headers @ 0000018927c7d500] 68 general_reserved_zero_7bits 0000000 = 0 [trace_headers @ 0000018927c7d500] 75 general_one_picture_only_constraint_flag 0 = 0 [trace_headers @ 0000018927c7d500] 76 general_reserved_zero_35bits 000000000000000000000000 = 0 [trace_headers @ 0000018927c7d500] 100 general_reserved_zero_35bits 00000000000 = 0 [trace_headers @ 0000018927c7d500] 111 general_inbld_flag 0 = 0 [trace_headers @ 0000018927c7d500] 112 general_level_idc 10111010 = 186 [trace_headers @ 0000018927c7d500] 120 sps_seq_parameter_set_id 1 = 0 [trace_headers @ 0000018927c7d500] 121 chroma_format_idc 010 = 1 [trace_headers @ 0000018927c7d500] 124 pic_width_in_luma_samples 00000000000111100000001 = 3840 [trace_headers @ 0000018927c7d500] 147 pic_height_in_luma_samples 00000000000100001110001 = 2160 [trace_headers @ 0000018927c7d500] 170 conformance_window_flag 0 = 0 [trace_headers @ 0000018927c7d500] 171 bit_depth_luma_minus8 011 = 2 [trace_headers @ 0000018927c7d500] 174 bit_depth_chroma_minus8 011 = 2 [trace_headers @ 0000018927c7d500] 177 log2_max_pic_order_cnt_lsb_minus4 1 = 0 [trace_headers @ 0000018927c7d500] 178 sps_sub_layer_ordering_info_present_flag 0 = 0 [trace_headers @ 0000018927c7d500] 179 sps_max_dec_pic_buffering_minus1[0] 010 = 1 [trace_headers @ 0000018927c7d500] 182 sps_max_num_reorder_pics[0] 1 = 0 [trace_headers @ 0000018927c7d500] 183 sps_max_latency_increase_plus1[0] 1 = 0 [trace_headers @ 0000018927c7d500] 184 log2_min_luma_coding_block_size_minus3 1 = 0 [trace_headers @ 0000018927c7d500] 185 log2_diff_max_min_luma_coding_block_size 00100 = 3 [trace_headers @ 0000018927c7d500] 190 log2_min_luma_transform_block_size_minus2 1 = 0 [trace_headers @ 0000018927c7d500] 191 log2_diff_max_min_luma_transform_block_size 00100 = 3 [trace_headers @ 0000018927c7d500] 196 max_transform_hierarchy_depth_inter 00101 = 4 [trace_headers @ 0000018927c7d500] 201 max_transform_hierarchy_depth_intra 00101 = 4 [trace_headers @ 0000018927c7d500] 206 scaling_list_enabled_flag 0 = 0 [trace_headers @ 0000018927c7d500] 207 amp_enabled_flag 1 = 1 [trace_headers @ 0000018927c7d500] 208 sample_adaptive_offset_enabled_flag 1 = 1 [trace_headers @ 0000018927c7d500] 209 pcm_enabled_flag 0 = 0 [trace_headers @ 0000018927c7d500] 210 num_short_term_ref_pic_sets 010 = 1 [trace_headers @ 0000018927c7d500] 213 num_negative_pics 010 = 1 [trace_headers @ 0000018927c7d500] 216 num_positive_pics 1 = 0 [trace_headers @ 0000018927c7d500] 217 delta_poc_s0_minus1[0] 1 = 0 [trace_headers @ 0000018927c7d500] 218 used_by_curr_pic_s0_flag[0] 1 = 1 [trace_headers @ 0000018927c7d500] 219 long_term_ref_pics_present_flag 0 = 0 [trace_headers @ 0000018927c7d500] 220 sps_temporal_mvp_enabled_flag 0 = 0 [trace_headers @ 0000018927c7d500] 221 strong_intra_smoothing_enabled_flag 0 = 0 [trace_headers @ 0000018927c7d500] 222 vui_parameters_present_flag 0 = 0 [trace_headers @ 0000018927c7d500] 223 sps_extension_present_flag 0 = 0 [trace_headers @ 0000018927c7d500] 224 rbsp_stop_one_bit 1 = 1 [trace_headers @ 0000018927c7d500] 225 rbsp_alignment_zero_bit 0 = 0 [trace_headers @ 0000018927c7d500] 226 rbsp_alignment_zero_bit 0 = 0 [trace_headers @ 0000018927c7d500] 227 rbsp_alignment_zero_bit 0 = 0 [trace_headers @ 0000018927c7d500] 228 rbsp_alignment_zero_bit 0 = 0 [trace_headers @ 0000018927c7d500] 229 rbsp_alignment_zero_bit 0 = 0 [trace_headers @ 0000018927c7d500] 230 rbsp_alignment_zero_bit 0 = 0 [trace_headers @ 0000018927c7d500] 231 rbsp_alignment_zero_bit 0 = 0 [trace_headers @ 0000018927c7d500] Picture Parameter Set [trace_headers @ 0000018927c7d500] 0 forbidden_zero_bit 0 = 0 [trace_headers @ 0000018927c7d500] 1 nal_unit_type 100010 = 34 [trace_headers @ 0000018927c7d500] 7 nuh_layer_id 000000 = 0 [trace_headers @ 0000018927c7d500] 13 nuh_temporal_id_plus1 001 = 1 [trace_headers @ 0000018927c7d500] 16 pps_pic_parameter_set_id 1 = 0 [trace_headers @ 0000018927c7d500] 17 pps_seq_parameter_set_id 1 = 0 [trace_headers @ 0000018927c7d500] 18 dependent_slice_segments_enabled_flag 1 = 1 [trace_headers @ 0000018927c7d500] 19 output_flag_present_flag 0 = 0 [trace_headers @ 0000018927c7d500] 20 num_extra_slice_header_bits 000 = 0 [trace_headers @ 0000018927c7d500] 23 sign_data_hiding_enabled_flag 0 = 0 [trace_headers @ 0000018927c7d500] 24 cabac_init_present_flag 1 = 1 [trace_headers @ 0000018927c7d500] 25 num_ref_idx_l0_default_active_minus1 1 = 0 [trace_headers @ 0000018927c7d500] 26 num_ref_idx_l1_default_active_minus1 1 = 0 [trace_headers @ 0000018927c7d500] 27 init_qp_minus26 1 = 0 [trace_headers @ 0000018927c7d500] 28 constrained_intra_pred_flag 0 = 0 [trace_headers @ 0000018927c7d500] 29 transform_skip_enabled_flag 0 = 0 [trace_headers @ 0000018927c7d500] 30 cu_qp_delta_enabled_flag 1 = 1 [trace_headers @ 0000018927c7d500] 31 diff_cu_qp_delta_depth 1 = 0 [trace_headers @ 0000018927c7d500] 32 pps_cb_qp_offset 1 = 0 [trace_headers @ 0000018927c7d500] 33 pps_cr_qp_offset 1 = 0 [trace_headers @ 0000018927c7d500] 34 pps_slice_chroma_qp_offsets_present_flag 0 = 0 [trace_headers @ 0000018927c7d500] 35 weighted_pred_flag 0 = 0 [trace_headers @ 0000018927c7d500] 36 weighted_bipred_flag 0 = 0 [trace_headers @ 0000018927c7d500] 37 transquant_bypass_enabled_flag 0 = 0 [trace_headers @ 0000018927c7d500] 38 tiles_enabled_flag 0 = 0 [trace_headers @ 0000018927c7d500] 39 entropy_coding_sync_enabled_flag 0 = 0 [trace_headers @ 0000018927c7d500] 40 pps_loop_filter_across_slices_enabled_flag 0 = 0 [trace_headers @ 0000018927c7d500] 41 deblocking_filter_control_present_flag 1 = 1 [trace_headers @ 0000018927c7d500] 42 deblocking_filter_override_enabled_flag 0 = 0 [trace_headers @ 0000018927c7d500] 43 pps_deblocking_filter_disabled_flag 0 = 0 [trace_headers @ 0000018927c7d500] 44 pps_beta_offset_div2 1 = 0 [trace_headers @ 0000018927c7d500] 45 pps_tc_offset_div2 1 = 0 [trace_headers @ 0000018927c7d500] 46 pps_scaling_list_data_present_flag 0 = 0 [trace_headers @ 0000018927c7d500] 47 lists_modification_present_flag 0 = 0 [trace_headers @ 0000018927c7d500] 48 log2_parallel_merge_level_minus2 1 = 0 [trace_headers @ 0000018927c7d500] 49 slice_segment_header_extension_present_flag 0 = 0 [trace_headers @ 0000018927c7d500] 50 pps_extension_present_flag 0 = 0 [trace_headers @ 0000018927c7d500] 51 rbsp_stop_one_bit 1 = 1 [trace_headers @ 0000018927c7d500] 52 rbsp_alignment_zero_bit 0 = 0 [trace_headers @ 0000018927c7d500] 53 rbsp_alignment_zero_bit 0 = 0 [trace_headers @ 0000018927c7d500] 54 rbsp_alignment_zero_bit 0 = 0 [trace_headers @ 0000018927c7d500] 55 rbsp_alignment_zero_bit 0 = 0 [trace_headers @ 0000018927c7d500] Video Parameter Set [trace_headers @ 0000018927c7d500] 0 forbidden_zero_bit 0 = 0 [trace_headers @ 0000018927c7d500] 1 nal_unit_type 100000 = 32 [trace_headers @ 0000018927c7d500] 7 nuh_layer_id 000000 = 0 [trace_headers @ 0000018927c7d500] 13 nuh_temporal_id_plus1 001 = 1 [trace_headers @ 0000018927c7d500] 16 vps_video_parameter_set_id 0000 = 0 [trace_headers @ 0000018927c7d500] 20 vps_base_layer_internal_flag 1 = 1 [trace_headers @ 0000018927c7d500] 21 vps_base_layer_available_flag 1 = 1 [trace_headers @ 0000018927c7d500] 22 vps_max_layers_minus1 000000 = 0 [trace_headers @ 0000018927c7d500] 28 vps_max_sub_layers_minus1 000 = 0 [trace_headers @ 0000018927c7d500] 31 vps_temporal_id_nesting_flag 1 = 1 [trace_headers @ 0000018927c7d500] 32 vps_reserved_0xffff_16bits 1111111111111111 = 65535 [trace_headers @ 0000018927c7d500] 48 general_profile_space 00 = 0 [trace_headers @ 0000018927c7d500] 50 general_tier_flag 0 = 0 [trace_headers @ 0000018927c7d500] 51 general_profile_idc 00001 = 1 [trace_headers @ 0000018927c7d500] 56 general_profile_compatibility_flag[0] 0 = 0 [trace_headers @ 0000018927c7d500] 57 general_profile_compatibility_flag[1] 1 = 1 [trace_headers @ 0000018927c7d500] 58 general_profile_compatibility_flag[2] 1 = 1 [trace_headers @ 0000018927c7d500] 59 general_profile_compatibility_flag[3] 0 = 0 [trace_headers @ 0000018927c7d500] 60 general_profile_compatibility_flag[4] 0 = 0 [trace_headers @ 0000018927c7d500] 61 general_profile_compatibility_flag[5] 0 = 0 [trace_headers @ 0000018927c7d500] 62 general_profile_compatibility_flag[6] 0 = 0 [trace_headers @ 0000018927c7d500] 63 general_profile_compatibility_flag[7] 0 = 0 [trace_headers @ 0000018927c7d500] 64 general_profile_compatibility_flag[8] 0 = 0 [trace_headers @ 0000018927c7d500] 65 general_profile_compatibility_flag[9] 0 = 0 [trace_headers @ 0000018927c7d500] 66 general_profile_compatibility_flag[10] 0 = 0 [trace_headers @ 0000018927c7d500] 67 general_profile_compatibility_flag[11] 0 = 0 [trace_headers @ 0000018927c7d500] 68 general_profile_compatibility_flag[12] 0 = 0 [trace_headers @ 0000018927c7d500] 69 general_profile_compatibility_flag[13] 0 = 0 [trace_headers @ 0000018927c7d500] 70 general_profile_compatibility_flag[14] 0 = 0 [trace_headers @ 0000018927c7d500] 71 general_profile_compatibility_flag[15] 0 = 0 [trace_headers @ 0000018927c7d500] 72 general_profile_compatibility_flag[16] 0 = 0 [trace_headers @ 0000018927c7d500] 73 general_profile_compatibility_flag[17] 0 = 0 [trace_headers @ 0000018927c7d500] 74 general_profile_compatibility_flag[18] 0 = 0 [trace_headers @ 0000018927c7d500] 75 general_profile_compatibility_flag[19] 0 = 0 [trace_headers @ 0000018927c7d500] 76 general_profile_compatibility_flag[20] 0 = 0 [trace_headers @ 0000018927c7d500] 77 general_profile_compatibility_flag[21] 0 = 0 [trace_headers @ 0000018927c7d500] 78 general_profile_compatibility_flag[22] 0 = 0 [trace_headers @ 0000018927c7d500] 79 general_profile_compatibility_flag[23] 0 = 0 [trace_headers @ 0000018927c7d500] 80 general_profile_compatibility_flag[24] 0 = 0 [trace_headers @ 0000018927c7d500] 81 general_profile_compatibility_flag[25] 0 = 0 [trace_headers @ 0000018927c7d500] 82 general_profile_compatibility_flag[26] 0 = 0 [trace_headers @ 0000018927c7d500] 83 general_profile_compatibility_flag[27] 0 = 0 [trace_headers @ 0000018927c7d500] 84 general_profile_compatibility_flag[28] 0 = 0 [trace_headers @ 0000018927c7d500] 85 general_profile_compatibility_flag[29] 0 = 0 [trace_headers @ 0000018927c7d500] 86 general_profile_compatibility_flag[30] 0 = 0 [trace_headers @ 0000018927c7d500] 87 general_profile_compatibility_flag[31] 0 = 0 [trace_headers @ 0000018927c7d500] 88 general_progressive_source_flag 1 = 1 [trace_headers @ 0000018927c7d500] 89 general_interlaced_source_flag 0 = 0 [trace_headers @ 0000018927c7d500] 90 general_non_packed_constraint_flag 1 = 1 [trace_headers @ 0000018927c7d500] 91 general_frame_only_constraint_flag 1 = 1 [trace_headers @ 0000018927c7d500] 92 general_reserved_zero_7bits 0000000 = 0 [trace_headers @ 0000018927c7d500] 99 general_one_picture_only_constraint_flag 0 = 0 [trace_headers @ 0000018927c7d500] 100 general_reserved_zero_35bits 000000000000000000000000 = 0 [trace_headers @ 0000018927c7d500] 124 general_reserved_zero_35bits 00000000000 = 0 [trace_headers @ 0000018927c7d500] 135 general_inbld_flag 0 = 0 [trace_headers @ 0000018927c7d500] 136 general_level_idc 10111010 = 186 [trace_headers @ 0000018927c7d500] 144 vps_sub_layer_ordering_info_present_flag 0 = 0 [trace_headers @ 0000018927c7d500] 145 vps_max_dec_pic_buffering_minus1[0] 010 = 1 [trace_headers @ 0000018927c7d500] 148 vps_max_num_reorder_pics[0] 1 = 0 [trace_headers @ 0000018927c7d500] 149 vps_max_latency_increase_plus1[0] 1 = 0 [trace_headers @ 0000018927c7d500] 150 vps_max_layer_id 000000 = 0 [trace_headers @ 0000018927c7d500] 156 vps_num_layer_sets_minus1 1 = 0 [trace_headers @ 0000018927c7d500] 157 vps_timing_info_present_flag 0 = 0 [trace_headers @ 0000018927c7d500] 158 vps_extension_flag 0 = 0 [trace_headers @ 0000018927c7d500] 159 rbsp_stop_one_bit 1 = 1 Output #0, mp4, to 'out.mp4': Metadata: encoder : Lavf60.18.100 Stream #0:0, 0, 1/12800: Video: hevc (hev1 / 0x31766568), p010le(tv, bt2020nc/bt2020/smpte2084, progressive), 3840x2160 [SAR 1:1 DAR 16:9], q=2-31, 2000 kb/s, 25 fps, 12800 tbn Metadata: encoder : Lavc60.35.100 hevc_amf [out#0/mp4 @ 0000018927c30d40] sq: send 0 ts 0.04 [out#0/mp4 @ 0000018927c30d40] sq: 0 frames_max 1 reached [out#0/mp4 @ 0000018927c30d40] sq: finish 0; head ts 0.04 [out#0/mp4 @ 0000018927c30d40] sq: finish queue [out#0/mp4 @ 0000018927c30d40] sq: receive 0 ts 0.04 queue head 0 ts 0.04 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.882 954 [AMFEncoderCoreHevc] Debug: SetProperty HevcInHDRMetadata:(null) [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.883 954 [AMFEncoderCoreHevc] Debug: AMFEncoderCoreHevcImpl::SubmitInput() : format (P010), memory (HOST), width (3840), height (2160) [hevc_amf @ 0000018929820780] AMFEncoderCoreBaseImpl: 2023-12-11 21:08:30.884 954 [AMFEncoderCoreBaseImpl] Info: AMFEncoderCoreBaseImpl::AllocBuffer() Switching to AllocBufferEx() [hevc_amf @ 0000018929820780] AMFEncoderCoreBaseImpl: 2023-12-11 21:08:30.885 954 [AMFEncoderCoreBaseImpl] Info: AMFEncoderCoreBaseImpl::AllocBuffer() Switching to AllocBufferEx() [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.886 954 [AMFEncoderCoreHevc] Debug: SetProperty HevcInColorProfile:7 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.886 954 [AMFEncoderCoreHevc] Debug: SetProperty HevcInColorTransferChar:16 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.886 954 [AMFEncoderCoreHevc] Debug: SetProperty HevcInColorPrimaries:1 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.886 954 [AMFEncoderCoreHevc] Debug: SetProperty HevcOutColorProfile:2 [hevc_amf @ 0000018929820780] AMFEncoderCoreImpl: 2023-12-11 21:08:30.896 954 [AMFEncoderCoreImpl] Debug: ParamType 0! [hevc_amf @ 0000018929820780] AMFEncoderCoreImpl: 2023-12-11 21:08:30.897 954 [AMFEncoderCoreImpl] Debug: ParamType 1, Layer 0 update! [hevc_amf @ 0000018929820780] AMFEncoderCoreImpl: 2023-12-11 21:08:30.897 954 [AMFEncoderCoreImpl] Debug: ParamType 2, Layer 0 update! [hevc_amf @ 0000018929820780] AMFEncoderCoreImpl: 2023-12-11 21:08:30.897 954 [AMFEncoderCoreImpl] Debug: ParamType 4! [hevc_amf @ 0000018929820780] AMFEncoderCoreImpl: 2023-12-11 21:08:30.897 954 [AMFEncoderCoreImpl] Debug: ParamType 5! [hevc_amf @ 0000018929820780] AMFEncoderCoreImpl: 2023-12-11 21:08:30.897 954 [AMFEncoderCoreImpl] Debug: ParamType 6! [hevc_amf @ 0000018929820780] AMFEncoderCoreImpl: 2023-12-11 21:08:30.897 954 [AMFEncoderCoreImpl] Debug: ParamType 7! [hevc_amf @ 0000018929820780] AMFEncoderCoreImpl: 2023-12-11 21:08:30.897 954 [AMFEncoderCoreImpl] Debug: ParamType 8! [hevc_amf @ 0000018929820780] AMFEncoderCoreImpl: 2023-12-11 21:08:30.897 954 [AMFEncoderCoreImpl] Debug: ParamType 9! [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.897 954 [AMFEncoderCoreHevc] Info: ConfigQualityPreset::Update() - preset=2 [hevc_amf @ 0000018929820780] AMFEncoderCoreImpl: 2023-12-11 21:08:30.897 954 [AMFEncoderCoreImpl] Debug: ParamType 10! [hevc_amf @ 0000018929820780] AMFEncoderCoreImpl: 2023-12-11 21:08:30.897 954 [AMFEncoderCoreImpl] Debug: ParamType 11! [hevc_amf @ 0000018929820780] AMFEncoderCoreImpl: 2023-12-11 21:08:30.897 954 [AMFEncoderCoreImpl] Debug: ParamType 12! [hevc_amf @ 0000018929820780] AMFEncoderCoreImpl: 2023-12-11 21:08:30.897 954 [AMFEncoderCoreImpl] Debug: ParamType 13! [hevc_amf @ 0000018929820780] AMFEncoderCoreImpl: 2023-12-11 21:08:30.897 954 [AMFEncoderCoreImpl] Debug: ParamType 14! [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.897 954 [AMFEncoderCoreHevc] Debug: SetBufferProps: Picture Type:0 Temporal ID=0 @frame 0 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.899 954 [AMFEncoderCoreHevc] Debug: AMFEncoderCoreHevcImpl::QueryOutput() [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.899 954 [AMFEncoderCoreHevc] Debug: AMFEncoderCoreHevcImpl::QueryOutput() [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.922 954 [AMFEncoderCoreHevc] Debug: AMFEncoderCoreHevcImpl::QueryOutput() [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.938 954 [AMFEncoderCoreHevc] Debug: AMFEncoderCoreHevcImpl::QueryOutput() [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.938 954 [AMFEncoderCoreHevc] Debug: AMFEncoderCoreHevcImpl::CopyOutputBuffer() - ECHEVCUVEReadFeedback taskId = 1. [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.938 954 [AMFEncoderCoreHevc] Debug: AMFEncoderCoreHevcImpl::CopyOutputBuffer() - ECHEVCUVEReadFeedback status = 0. [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.938 954 [AMFEncoderCoreHevc] Debug: AMFEncoderCoreHevcImpl::CopyOutputBuffer() - ECHEVCUVEReadFeedback isFirst = 1. [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.938 954 [AMFEncoderCoreHevc] Debug: AMFEncoderCoreHevcImpl::CopyOutputBuffer() - ECHEVCUVEReadFeedback isLast = 1. [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.938 954 [AMFEncoderCoreHevc] Debug: AMFEncoderCoreHevcImpl::CopyOutputBuffer() - ECHEVCUVEReadFeedback bitstreamoffset = 0. [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.938 954 [AMFEncoderCoreHevc] Debug: AMFEncoderCoreHevcImpl::CopyOutputBuffer() - ECHEVCUVEReadFeedback bitstreamSize = 2036. [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.938 954 [AMFEncoderCoreHevc] Debug: AMFEncoderCoreHevcImpl::CopyOutputBuffer() - ECHEVCUVEReadFeedback hdcpEncrypted = 0. [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.938 954 [AMFEncoderCoreHevc] Debug: AMFEncoderCoreHevcImpl::CopyOutputBuffer() - ECHEVCUVEReadFeedback hdcpInputCtrHi = 0. [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.938 954 [AMFEncoderCoreHevc] Debug: AMFEncoderCoreHevcImpl::CopyOutputBuffer() - ECHEVCUVEReadFeedback hdcpInputCtrLo = 0. [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.938 954 [AMFEncoderCoreHevc] Debug: AMFEncoderCoreHevcImpl::CopyOutputBuffer() - ECHEVCUVEReadFeedback fillerDataSize = 0. [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:30.939 954 [AMFEncoderCoreHevc] Debug: QueryOutput() End: frame pts=0 outputFrames=1 [trace_headers @ 0000018927c7d500] Packet: 2036 bytes, key frame, pts 0, dts 0. [trace_headers @ 0000018927c7d500] nal_unit_type: 32(VPS), nuh_layer_id: 0, temporal_id: 0 [trace_headers @ 0000018927c7d500] nal_unit_type: 33(SPS), nuh_layer_id: 0, temporal_id: 0 [trace_headers @ 0000018927c7d500] nal_unit_type: 34(PPS), nuh_layer_id: 0, temporal_id: 0 [trace_headers @ 0000018927c7d500] nal_unit_type: 39(SEI_PREFIX), nuh_layer_id: 0, temporal_id: 0 [trace_headers @ 0000018927c7d500] nal_unit_type: 20(IDR_N_LP), nuh_layer_id: 0, temporal_id: 0 [trace_headers @ 0000018927c7d500] Video Parameter Set [trace_headers @ 0000018927c7d500] 0 forbidden_zero_bit 0 = 0 [trace_headers @ 0000018927c7d500] 1 nal_unit_type 100000 = 32 [trace_headers @ 0000018927c7d500] 7 nuh_layer_id 000000 = 0 [trace_headers @ 0000018927c7d500] 13 nuh_temporal_id_plus1 001 = 1 [trace_headers @ 0000018927c7d500] 16 vps_video_parameter_set_id 0000 = 0 [trace_headers @ 0000018927c7d500] 20 vps_base_layer_internal_flag 1 = 1 [trace_headers @ 0000018927c7d500] 21 vps_base_layer_available_flag 1 = 1 [trace_headers @ 0000018927c7d500] 22 vps_max_layers_minus1 000000 = 0 [trace_headers @ 0000018927c7d500] 28 vps_max_sub_layers_minus1 000 = 0 [trace_headers @ 0000018927c7d500] 31 vps_temporal_id_nesting_flag 1 = 1 [trace_headers @ 0000018927c7d500] 32 vps_reserved_0xffff_16bits 1111111111111111 = 65535 [trace_headers @ 0000018927c7d500] 48 general_profile_space 00 = 0 [trace_headers @ 0000018927c7d500] 50 general_tier_flag 0 = 0 [trace_headers @ 0000018927c7d500] 51 general_profile_idc 00001 = 1 [trace_headers @ 0000018927c7d500] 56 general_profile_compatibility_flag[0] 0 = 0 [trace_headers @ 0000018927c7d500] 57 general_profile_compatibility_flag[1] 1 = 1 [trace_headers @ 0000018927c7d500] 58 general_profile_compatibility_flag[2] 1 = 1 [trace_headers @ 0000018927c7d500] 59 general_profile_compatibility_flag[3] 0 = 0 [trace_headers @ 0000018927c7d500] 60 general_profile_compatibility_flag[4] 0 = 0 [trace_headers @ 0000018927c7d500] 61 general_profile_compatibility_flag[5] 0 = 0 [trace_headers @ 0000018927c7d500] 62 general_profile_compatibility_flag[6] 0 = 0 [trace_headers @ 0000018927c7d500] 63 general_profile_compatibility_flag[7] 0 = 0 [trace_headers @ 0000018927c7d500] 64 general_profile_compatibility_flag[8] 0 = 0 [trace_headers @ 0000018927c7d500] 65 general_profile_compatibility_flag[9] 0 = 0 [trace_headers @ 0000018927c7d500] 66 general_profile_compatibility_flag[10] 0 = 0 [trace_headers @ 0000018927c7d500] 67 general_profile_compatibility_flag[11] 0 = 0 [trace_headers @ 0000018927c7d500] 68 general_profile_compatibility_flag[12] 0 = 0 [trace_headers @ 0000018927c7d500] 69 general_profile_compatibility_flag[13] 0 = 0 [trace_headers @ 0000018927c7d500] 70 general_profile_compatibility_flag[14] 0 = 0 [trace_headers @ 0000018927c7d500] 71 general_profile_compatibility_flag[15] 0 = 0 [trace_headers @ 0000018927c7d500] 72 general_profile_compatibility_flag[16] 0 = 0 [trace_headers @ 0000018927c7d500] 73 general_profile_compatibility_flag[17] 0 = 0 [trace_headers @ 0000018927c7d500] 74 general_profile_compatibility_flag[18] 0 = 0 [trace_headers @ 0000018927c7d500] 75 general_profile_compatibility_flag[19] 0 = 0 [trace_headers @ 0000018927c7d500] 76 general_profile_compatibility_flag[20] 0 = 0 [trace_headers @ 0000018927c7d500] 77 general_profile_compatibility_flag[21] 0 = 0 [trace_headers @ 0000018927c7d500] 78 general_profile_compatibility_flag[22] 0 = 0 [trace_headers @ 0000018927c7d500] 79 general_profile_compatibility_flag[23] 0 = 0 [trace_headers @ 0000018927c7d500] 80 general_profile_compatibility_flag[24] 0 = 0 [trace_headers @ 0000018927c7d500] 81 general_profile_compatibility_flag[25] 0 = 0 [trace_headers @ 0000018927c7d500] 82 general_profile_compatibility_flag[26] 0 = 0 [trace_headers @ 0000018927c7d500] 83 general_profile_compatibility_flag[27] 0 = 0 [trace_headers @ 0000018927c7d500] 84 general_profile_compatibility_flag[28] 0 = 0 [trace_headers @ 0000018927c7d500] 85 general_profile_compatibility_flag[29] 0 = 0 [trace_headers @ 0000018927c7d500] 86 general_profile_compatibility_flag[30] 0 = 0 [trace_headers @ 0000018927c7d500] 87 general_profile_compatibility_flag[31] 0 = 0 [trace_headers @ 0000018927c7d500] 88 general_progressive_source_flag 1 = 1 [trace_headers @ 0000018927c7d500] 89 general_interlaced_source_flag 0 = 0 [trace_headers @ 0000018927c7d500] 90 general_non_packed_constraint_flag 1 = 1 [trace_headers @ 0000018927c7d500] 91 general_frame_only_constraint_flag 1 = 1 [trace_headers @ 0000018927c7d500] 92 general_reserved_zero_7bits 0000000 = 0 [trace_headers @ 0000018927c7d500] 99 general_one_picture_only_constraint_flag 0 = 0 [trace_headers @ 0000018927c7d500] 100 general_reserved_zero_35bits 000000000000000000000000 = 0 [trace_headers @ 0000018927c7d500] 124 general_reserved_zero_35bits 00000000000 = 0 [trace_headers @ 0000018927c7d500] 135 general_inbld_flag 0 = 0 [trace_headers @ 0000018927c7d500] 136 general_level_idc 10111010 = 186 [trace_headers @ 0000018927c7d500] 144 vps_sub_layer_ordering_info_present_flag 0 = 0 [trace_headers @ 0000018927c7d500] 145 vps_max_dec_pic_buffering_minus1[0] 010 = 1 [trace_headers @ 0000018927c7d500] 148 vps_max_num_reorder_pics[0] 1 = 0 [trace_headers @ 0000018927c7d500] 149 vps_max_latency_increase_plus1[0] 1 = 0 [trace_headers @ 0000018927c7d500] 150 vps_max_layer_id 000000 = 0 [trace_headers @ 0000018927c7d500] 156 vps_num_layer_sets_minus1 1 = 0 [trace_headers @ 0000018927c7d500] 157 vps_timing_info_present_flag 0 = 0 [trace_headers @ 0000018927c7d500] 158 vps_extension_flag 0 = 0 [trace_headers @ 0000018927c7d500] 159 rbsp_stop_one_bit 1 = 1 [trace_headers @ 0000018927c7d500] Sequence Parameter Set [trace_headers @ 0000018927c7d500] 0 forbidden_zero_bit 0 = 0 [trace_headers @ 0000018927c7d500] 1 nal_unit_type 100001 = 33 [trace_headers @ 0000018927c7d500] 7 nuh_layer_id 000000 = 0 [trace_headers @ 0000018927c7d500] 13 nuh_temporal_id_plus1 001 = 1 [trace_headers @ 0000018927c7d500] 16 sps_video_parameter_set_id 0000 = 0 [trace_headers @ 0000018927c7d500] 20 sps_max_sub_layers_minus1 000 = 0 [trace_headers @ 0000018927c7d500] 23 sps_temporal_id_nesting_flag 1 = 1 [trace_headers @ 0000018927c7d500] 24 general_profile_space 00 = 0 [trace_headers @ 0000018927c7d500] 26 general_tier_flag 0 = 0 [trace_headers @ 0000018927c7d500] 27 general_profile_idc 00001 = 1 [trace_headers @ 0000018927c7d500] 32 general_profile_compatibility_flag[0] 0 = 0 [trace_headers @ 0000018927c7d500] 33 general_profile_compatibility_flag[1] 1 = 1 [trace_headers @ 0000018927c7d500] 34 general_profile_compatibility_flag[2] 1 = 1 [trace_headers @ 0000018927c7d500] 35 general_profile_compatibility_flag[3] 0 = 0 [trace_headers @ 0000018927c7d500] 36 general_profile_compatibility_flag[4] 0 = 0 [trace_headers @ 0000018927c7d500] 37 general_profile_compatibility_flag[5] 0 = 0 [trace_headers @ 0000018927c7d500] 38 general_profile_compatibility_flag[6] 0 = 0 [trace_headers @ 0000018927c7d500] 39 general_profile_compatibility_flag[7] 0 = 0 [trace_headers @ 0000018927c7d500] 40 general_profile_compatibility_flag[8] 0 = 0 [trace_headers @ 0000018927c7d500] 41 general_profile_compatibility_flag[9] 0 = 0 [trace_headers @ 0000018927c7d500] 42 general_profile_compatibility_flag[10] 0 = 0 [trace_headers @ 0000018927c7d500] 43 general_profile_compatibility_flag[11] 0 = 0 [trace_headers @ 0000018927c7d500] 44 general_profile_compatibility_flag[12] 0 = 0 [trace_headers @ 0000018927c7d500] 45 general_profile_compatibility_flag[13] 0 = 0 [trace_headers @ 0000018927c7d500] 46 general_profile_compatibility_flag[14] 0 = 0 [trace_headers @ 0000018927c7d500] 47 general_profile_compatibility_flag[15] 0 = 0 [trace_headers @ 0000018927c7d500] 48 general_profile_compatibility_flag[16] 0 = 0 [trace_headers @ 0000018927c7d500] 49 general_profile_compatibility_flag[17] 0 = 0 [trace_headers @ 0000018927c7d500] 50 general_profile_compatibility_flag[18] 0 = 0 [trace_headers @ 0000018927c7d500] 51 general_profile_compatibility_flag[19] 0 = 0 [trace_headers @ 0000018927c7d500] 52 general_profile_compatibility_flag[20] 0 = 0 [trace_headers @ 0000018927c7d500] 53 general_profile_compatibility_flag[21] 0 = 0 [trace_headers @ 0000018927c7d500] 54 general_profile_compatibility_flag[22] 0 = 0 [trace_headers @ 0000018927c7d500] 55 general_profile_compatibility_flag[23] 0 = 0 [trace_headers @ 0000018927c7d500] 56 general_profile_compatibility_flag[24] 0 = 0 [trace_headers @ 0000018927c7d500] 57 general_profile_compatibility_flag[25] 0 = 0 [trace_headers @ 0000018927c7d500] 58 general_profile_compatibility_flag[26] 0 = 0 [trace_headers @ 0000018927c7d500] 59 general_profile_compatibility_flag[27] 0 = 0 [trace_headers @ 0000018927c7d500] 60 general_profile_compatibility_flag[28] 0 = 0 [trace_headers @ 0000018927c7d500] 61 general_profile_compatibility_flag[29] 0 = 0 [trace_headers @ 0000018927c7d500] 62 general_profile_compatibility_flag[30] 0 = 0 [trace_headers @ 0000018927c7d500] 63 general_profile_compatibility_flag[31] 0 = 0 [trace_headers @ 0000018927c7d500] 64 general_progressive_source_flag 1 = 1 [trace_headers @ 0000018927c7d500] 65 general_interlaced_source_flag 0 = 0 [trace_headers @ 0000018927c7d500] 66 general_non_packed_constraint_flag 1 = 1 [trace_headers @ 0000018927c7d500] 67 general_frame_only_constraint_flag 1 = 1 [trace_headers @ 0000018927c7d500] 68 general_reserved_zero_7bits 0000000 = 0 [trace_headers @ 0000018927c7d500] 75 general_one_picture_only_constraint_flag 0 = 0 [trace_headers @ 0000018927c7d500] 76 general_reserved_zero_35bits 000000000000000000000000 = 0 [trace_headers @ 0000018927c7d500] 100 general_reserved_zero_35bits 00000000000 = 0 [trace_headers @ 0000018927c7d500] 111 general_inbld_flag 0 = 0 [trace_headers @ 0000018927c7d500] 112 general_level_idc 10111010 = 186 [trace_headers @ 0000018927c7d500] 120 sps_seq_parameter_set_id 1 = 0 [trace_headers @ 0000018927c7d500] 121 chroma_format_idc 010 = 1 [trace_headers @ 0000018927c7d500] 124 pic_width_in_luma_samples 00000000000111100000001 = 3840 [trace_headers @ 0000018927c7d500] 147 pic_height_in_luma_samples 00000000000100001110001 = 2160 [trace_headers @ 0000018927c7d500] 170 conformance_window_flag 0 = 0 [trace_headers @ 0000018927c7d500] 171 bit_depth_luma_minus8 011 = 2 [trace_headers @ 0000018927c7d500] 174 bit_depth_chroma_minus8 011 = 2 [trace_headers @ 0000018927c7d500] 177 log2_max_pic_order_cnt_lsb_minus4 1 = 0 [trace_headers @ 0000018927c7d500] 178 sps_sub_layer_ordering_info_present_flag 0 = 0 [trace_headers @ 0000018927c7d500] 179 sps_max_dec_pic_buffering_minus1[0] 010 = 1 [trace_headers @ 0000018927c7d500] 182 sps_max_num_reorder_pics[0] 1 = 0 [trace_headers @ 0000018927c7d500] 183 sps_max_latency_increase_plus1[0] 1 = 0 [trace_headers @ 0000018927c7d500] 184 log2_min_luma_coding_block_size_minus3 1 = 0 [trace_headers @ 0000018927c7d500] 185 log2_diff_max_min_luma_coding_block_size 00100 = 3 [trace_headers @ 0000018927c7d500] 190 log2_min_luma_transform_block_size_minus2 1 = 0 [trace_headers @ 0000018927c7d500] 191 log2_diff_max_min_luma_transform_block_size 00100 = 3 [trace_headers @ 0000018927c7d500] 196 max_transform_hierarchy_depth_inter 00101 = 4 [trace_headers @ 0000018927c7d500] 201 max_transform_hierarchy_depth_intra 00101 = 4 [trace_headers @ 0000018927c7d500] 206 scaling_list_enabled_flag 0 = 0 [trace_headers @ 0000018927c7d500] 207 amp_enabled_flag 1 = 1 [trace_headers @ 0000018927c7d500] 208 sample_adaptive_offset_enabled_flag 1 = 1 [trace_headers @ 0000018927c7d500] 209 pcm_enabled_flag 0 = 0 [trace_headers @ 0000018927c7d500] 210 num_short_term_ref_pic_sets 010 = 1 [trace_headers @ 0000018927c7d500] 213 num_negative_pics 010 = 1 [trace_headers @ 0000018927c7d500] 216 num_positive_pics 1 = 0 [trace_headers @ 0000018927c7d500] 217 delta_poc_s0_minus1[0] 1 = 0 [trace_headers @ 0000018927c7d500] 218 used_by_curr_pic_s0_flag[0] 1 = 1 [trace_headers @ 0000018927c7d500] 219 long_term_ref_pics_present_flag 0 = 0 [trace_headers @ 0000018927c7d500] 220 sps_temporal_mvp_enabled_flag 0 = 0 [trace_headers @ 0000018927c7d500] 221 strong_intra_smoothing_enabled_flag 0 = 0 [trace_headers @ 0000018927c7d500] 222 vui_parameters_present_flag 1 = 1 [trace_headers @ 0000018927c7d500] 223 aspect_ratio_info_present_flag 1 = 1 [trace_headers @ 0000018927c7d500] 224 aspect_ratio_idc 11111111 = 255 [trace_headers @ 0000018927c7d500] 232 sar_width 0000000000000001 = 1 [trace_headers @ 0000018927c7d500] 248 sar_height 0000000000000001 = 1 [trace_headers @ 0000018927c7d500] 264 overscan_info_present_flag 0 = 0 [trace_headers @ 0000018927c7d500] 265 video_signal_type_present_flag 1 = 1 [trace_headers @ 0000018927c7d500] 266 video_format 101 = 5 [trace_headers @ 0000018927c7d500] 269 video_full_range_flag 0 = 0 [trace_headers @ 0000018927c7d500] 270 colour_description_present_flag 1 = 1 [trace_headers @ 0000018927c7d500] 271 colour_primaries 00001001 = 9 [trace_headers @ 0000018927c7d500] 279 transfer_characteristics 00010000 = 16 [trace_headers @ 0000018927c7d500] 287 matrix_coefficients 00001001 = 9 [trace_headers @ 0000018927c7d500] 295 chroma_loc_info_present_flag 0 = 0 [trace_headers @ 0000018927c7d500] 296 neutral_chroma_indication_flag 0 = 0 [trace_headers @ 0000018927c7d500] 297 field_seq_flag 0 = 0 [trace_headers @ 0000018927c7d500] 298 frame_field_info_present_flag 0 = 0 [trace_headers @ 0000018927c7d500] 299 default_display_window_flag 0 = 0 [trace_headers @ 0000018927c7d500] 300 vui_timing_info_present_flag 1 = 1 [trace_headers @ 0000018927c7d500] 301 vui_num_units_in_tick 00000000000000000000000000000001 = 1 [trace_headers @ 0000018927c7d500] 333 vui_time_scale 00000000000000000000000000011001 = 25 [trace_headers @ 0000018927c7d500] 365 vui_poc_proportional_to_timing_flag 1 = 1 [trace_headers @ 0000018927c7d500] 366 vui_num_ticks_poc_diff_one_minus1 1 = 0 [trace_headers @ 0000018927c7d500] 367 vui_hrd_parameters_present_flag 0 = 0 [trace_headers @ 0000018927c7d500] 368 bitstream_restriction_flag 0 = 0 [trace_headers @ 0000018927c7d500] 369 sps_extension_present_flag 0 = 0 [trace_headers @ 0000018927c7d500] 370 rbsp_stop_one_bit 1 = 1 [trace_headers @ 0000018927c7d500] 371 rbsp_alignment_zero_bit 0 = 0 [trace_headers @ 0000018927c7d500] 372 rbsp_alignment_zero_bit 0 = 0 [trace_headers @ 0000018927c7d500] 373 rbsp_alignment_zero_bit 0 = 0 [trace_headers @ 0000018927c7d500] 374 rbsp_alignment_zero_bit 0 = 0 [trace_headers @ 0000018927c7d500] 375 rbsp_alignment_zero_bit 0 = 0 [trace_headers @ 0000018927c7d500] Picture Parameter Set [trace_headers @ 0000018927c7d500] 0 forbidden_zero_bit 0 = 0 [trace_headers @ 0000018927c7d500] 1 nal_unit_type 100010 = 34 [trace_headers @ 0000018927c7d500] 7 nuh_layer_id 000000 = 0 [trace_headers @ 0000018927c7d500] 13 nuh_temporal_id_plus1 001 = 1 [trace_headers @ 0000018927c7d500] 16 pps_pic_parameter_set_id 1 = 0 [trace_headers @ 0000018927c7d500] 17 pps_seq_parameter_set_id 1 = 0 [trace_headers @ 0000018927c7d500] 18 dependent_slice_segments_enabled_flag 1 = 1 [trace_headers @ 0000018927c7d500] 19 output_flag_present_flag 0 = 0 [trace_headers @ 0000018927c7d500] 20 num_extra_slice_header_bits 000 = 0 [trace_headers @ 0000018927c7d500] 23 sign_data_hiding_enabled_flag 0 = 0 [trace_headers @ 0000018927c7d500] 24 cabac_init_present_flag 1 = 1 [trace_headers @ 0000018927c7d500] 25 num_ref_idx_l0_default_active_minus1 1 = 0 [trace_headers @ 0000018927c7d500] 26 num_ref_idx_l1_default_active_minus1 1 = 0 [trace_headers @ 0000018927c7d500] 27 init_qp_minus26 1 = 0 [trace_headers @ 0000018927c7d500] 28 constrained_intra_pred_flag 0 = 0 [trace_headers @ 0000018927c7d500] 29 transform_skip_enabled_flag 0 = 0 [trace_headers @ 0000018927c7d500] 30 cu_qp_delta_enabled_flag 1 = 1 [trace_headers @ 0000018927c7d500] 31 diff_cu_qp_delta_depth 1 = 0 [trace_headers @ 0000018927c7d500] 32 pps_cb_qp_offset 1 = 0 [trace_headers @ 0000018927c7d500] 33 pps_cr_qp_offset 1 = 0 [trace_headers @ 0000018927c7d500] 34 pps_slice_chroma_qp_offsets_present_flag 0 = 0 [trace_headers @ 0000018927c7d500] 35 weighted_pred_flag 0 = 0 [trace_headers @ 0000018927c7d500] 36 weighted_bipred_flag 0 = 0 [trace_headers @ 0000018927c7d500] 37 transquant_bypass_enabled_flag 0 = 0 [trace_headers @ 0000018927c7d500] 38 tiles_enabled_flag 0 = 0 [trace_headers @ 0000018927c7d500] 39 entropy_coding_sync_enabled_flag 0 = 0 [trace_headers @ 0000018927c7d500] 40 pps_loop_filter_across_slices_enabled_flag 0 = 0 [trace_headers @ 0000018927c7d500] 41 deblocking_filter_control_present_flag 1 = 1 [trace_headers @ 0000018927c7d500] 42 deblocking_filter_override_enabled_flag 0 = 0 [trace_headers @ 0000018927c7d500] 43 pps_deblocking_filter_disabled_flag 0 = 0 [trace_headers @ 0000018927c7d500] 44 pps_beta_offset_div2 1 = 0 [trace_headers @ 0000018927c7d500] 45 pps_tc_offset_div2 1 = 0 [trace_headers @ 0000018927c7d500] 46 pps_scaling_list_data_present_flag 0 = 0 [trace_headers @ 0000018927c7d500] 47 lists_modification_present_flag 0 = 0 [trace_headers @ 0000018927c7d500] 48 log2_parallel_merge_level_minus2 1 = 0 [trace_headers @ 0000018927c7d500] 49 slice_segment_header_extension_present_flag 0 = 0 [trace_headers @ 0000018927c7d500] 50 pps_extension_present_flag 0 = 0 [trace_headers @ 0000018927c7d500] 51 rbsp_stop_one_bit 1 = 1 [trace_headers @ 0000018927c7d500] 52 rbsp_alignment_zero_bit 0 = 0 [trace_headers @ 0000018927c7d500] 53 rbsp_alignment_zero_bit 0 = 0 [trace_headers @ 0000018927c7d500] 54 rbsp_alignment_zero_bit 0 = 0 [trace_headers @ 0000018927c7d500] 55 rbsp_alignment_zero_bit 0 = 0 [trace_headers @ 0000018927c7d500] Prefix Supplemental Enhancement Information [trace_headers @ 0000018927c7d500] 0 forbidden_zero_bit 0 = 0 [trace_headers @ 0000018927c7d500] 1 nal_unit_type 100111 = 39 [trace_headers @ 0000018927c7d500] 7 nuh_layer_id 000000 = 0 [trace_headers @ 0000018927c7d500] 13 nuh_temporal_id_plus1 001 = 1 [trace_headers @ 0000018927c7d500] 16 last_payload_type_byte 10001001 = 137 [trace_headers @ 0000018927c7d500] 24 last_payload_size_byte 00011000 = 24 [trace_headers @ 0000018927c7d500] Mastering Display Colour Volume [trace_headers @ 0000018927c7d500] 32 display_primaries_x[0] 0011001111000010 = 13250 [trace_headers @ 0000018927c7d500] 48 display_primaries_y[0] 1000011011000100 = 34500 [trace_headers @ 0000018927c7d500] 64 display_primaries_x[1] 0001110101001100 = 7500 [trace_headers @ 0000018927c7d500] 80 display_primaries_y[1] 0000101110111000 = 3000 [trace_headers @ 0000018927c7d500] 96 display_primaries_x[2] 1000010011010000 = 34000 [trace_headers @ 0000018927c7d500] 112 display_primaries_y[2] 0011111010000000 = 16000 [trace_headers @ 0000018927c7d500] 128 white_point_x 0011110100010010 = 15634 [trace_headers @ 0000018927c7d500] 144 white_point_y 0100000001000010 = 16450 [trace_headers @ 0000018927c7d500] 160 max_display_mastering_luminance 00000000101101110001101100000000 = 12000000 [trace_headers @ 0000018927c7d500] 192 min_display_mastering_luminance 00000000000000000000000111110100 = 500 [trace_headers @ 0000018927c7d500] 224 rbsp_stop_one_bit 1 = 1 [trace_headers @ 0000018927c7d500] 225 rbsp_alignment_zero_bit 0 = 0 [trace_headers @ 0000018927c7d500] 226 rbsp_alignment_zero_bit 0 = 0 [trace_headers @ 0000018927c7d500] 227 rbsp_alignment_zero_bit 0 = 0 [trace_headers @ 0000018927c7d500] 228 rbsp_alignment_zero_bit 0 = 0 [trace_headers @ 0000018927c7d500] 229 rbsp_alignment_zero_bit 0 = 0 [trace_headers @ 0000018927c7d500] 230 rbsp_alignment_zero_bit 0 = 0 [trace_headers @ 0000018927c7d500] 231 rbsp_alignment_zero_bit 0 = 0 [trace_headers @ 0000018927c7d500] Slice Segment Header [trace_headers @ 0000018927c7d500] 0 forbidden_zero_bit 0 = 0 [trace_headers @ 0000018927c7d500] 1 nal_unit_type 010100 = 20 [trace_headers @ 0000018927c7d500] 7 nuh_layer_id 000000 = 0 [trace_headers @ 0000018927c7d500] 13 nuh_temporal_id_plus1 001 = 1 [trace_headers @ 0000018927c7d500] 16 first_slice_segment_in_pic_flag 1 = 1 [trace_headers @ 0000018927c7d500] 17 no_output_of_prior_pics_flag 0 = 0 [trace_headers @ 0000018927c7d500] 18 slice_pic_parameter_set_id 1 = 0 [trace_headers @ 0000018927c7d500] 19 slice_type 011 = 2 [trace_headers @ 0000018927c7d500] 22 slice_sao_luma_flag 0 = 0 [trace_headers @ 0000018927c7d500] 23 slice_sao_chroma_flag 0 = 0 [trace_headers @ 0000018927c7d500] 24 slice_qp_delta 000010100 = 10 [trace_headers @ 0000018927c7d500] 33 alignment_bit_equal_to_one 1 = 1 [trace_headers @ 0000018927c7d500] 34 alignment_bit_equal_to_zero 0 = 0 [trace_headers @ 0000018927c7d500] 35 alignment_bit_equal_to_zero 0 = 0 [trace_headers @ 0000018927c7d500] 36 alignment_bit_equal_to_zero 0 = 0 [trace_headers @ 0000018927c7d500] 37 alignment_bit_equal_to_zero 0 = 0 [trace_headers @ 0000018927c7d500] 38 alignment_bit_equal_to_zero 0 = 0 [trace_headers @ 0000018927c7d500] 39 alignment_bit_equal_to_zero 0 = 0 [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:31.009 954 [AMFEncoderCoreHevc] Debug: AMFEncoderCoreHevcImpl::QueryOutput() [out#0/mp4 @ 0000018927c30d40] sq: 0 EOF [out#0/mp4 @ 0000018927c30d40] All streams finished [out#0/mp4 @ 0000018927c30d40] Terminating muxer thread [out#0/mp4 @ 0000018927c30d40] sq: finish queue frame= 1 fps=0.0 q=-0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x No more output streams to write to, finishing. [vist#0:0/hevc @ 0000018927cf9800] Decoder thread received EOF packet [vist#0:0/hevc @ 0000018927cf9800] Decoder returned EOF, finishing [vist#0:0/hevc @ 0000018927cf9800] Terminating decoder thread [out#0/mp4 @ 0000018927c30d40] sq: 0 EOF [out#0/mp4 @ 0000018927c30d40] sq: finish queue [out#0/mp4 @ 0000018927c30d40] sq: 0 EOF [out#0/mp4 @ 0000018927c30d40] sq: finish queue [out#0/mp4 @ 0000018927c30d40] sq: 0 EOF [out#0/mp4 @ 0000018927c30d40] sq: finish queue [AVIOContext @ 00000189297d9580] Statistics: 2958 bytes written, 2 seeks, 4 writeouts [out#0/mp4 @ 0000018927c30d40] Output file #0 (out.mp4): [out#0/mp4 @ 0000018927c30d40] Output stream #0:0 (video): 1 frames encoded; 1 packets muxed (2036 bytes); [out#0/mp4 @ 0000018927c30d40] Total: 1 packets (2036 bytes) muxed [out#0/mp4 @ 0000018927c30d40] video:2kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 45.088409% frame= 1 fps=0.0 q=-0.0 Lsize= 3kB time=00:00:00.00 bitrate=N/A speed= 0x [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:31.027 954 [AMFEncoderCoreHevc] Debug: AMFEncoderCoreHevcImpl::Terminate() [hevc_amf @ 0000018929820780] AMFEncoderCoreHevc: 2023-12-11 21:08:31.028 954 [AMFEncoderCoreHevc] Debug: AMFEncoderCoreHevcImpl::Terminate() [in#0/mpegts @ 0000018927c36b80] Terminating demuxer thread [in#0/mpegts @ 0000018927c36b80] Input file #0 (in.ts): [in#0/mpegts @ 0000018927c36b80] Input stream #0:0 (video): 3 packets read (750000 bytes); 1 frames decoded; 0 decode errors; [in#0/mpegts @ 0000018927c36b80] Total: 3 packets (750000 bytes) demuxed [AVIOContext @ 0000018927c7cc00] Statistics: 30659440 bytes read, 8 seeks
On Mon, Dec 11, 2023 at 10:21 PM Mark Thompson <sw@jkqxz.net> wrote: > > Not the same, but here is a freely-available test video which has the same > effect: <https://4kmedia.org/lg-new-york-hdr-uhd-4k-demo/>. Output below. > > It doesn't seem like this should be dependent on the underlying hardware > since (I hope) it won't go to the hardware for header information. Still, > just in case: it's a 5850U APU running driver version 23.11.1 on Windows 10. > > (Seems like it might be a good idea for the debug output to print the > driver and hardware versions at least?) > > The VPS out-of-order is also a weird effect - it makes it look like the > two headers are generated by separate processes, which doesn't seem like a > good idea when you want them to be identical. > I've tested the video on 5700U APU with 23.11.1 on Windows 11 & confirmed that there is an issue with missing color information in the header. It seems that for 5xxxU APU drivers 23.11.1 doesn't contain a fix for this bug in AMF. I've checked with the latest AMF library on 5700 U APU and the issue was fixed, so I believe future driver releases will include the updated version of AMF library. This issue with missing color information isn't related with ffmpeg code itself, we need to wait for updated AMD drivers for APU
diff --git a/libavcodec/amfenc.c b/libavcodec/amfenc.c index 061859f85c..0bd15dd812 100644 --- a/libavcodec/amfenc.c +++ b/libavcodec/amfenc.c @@ -60,6 +60,7 @@ const enum AVPixelFormat ff_amf_pix_fmts[] = { #if CONFIG_DXVA2 AV_PIX_FMT_DXVA2_VLD, #endif + AV_PIX_FMT_P010, AV_PIX_FMT_NONE }; @@ -72,6 +73,7 @@ static const FormatMap format_map[] = { { AV_PIX_FMT_NONE, AMF_SURFACE_UNKNOWN }, { AV_PIX_FMT_NV12, AMF_SURFACE_NV12 }, + { AV_PIX_FMT_P010, AMF_SURFACE_P010 }, { AV_PIX_FMT_BGR0, AMF_SURFACE_BGRA }, { AV_PIX_FMT_RGB0, AMF_SURFACE_RGBA }, { AV_PIX_FMT_GRAY8, AMF_SURFACE_GRAY8 }, @@ -785,6 +787,41 @@ int ff_amf_receive_packet(AVCodecContext *avctx, AVPacket *avpkt) return ret; } +int ff_amf_get_color_profile(AVCodecContext *avctx) +{ + amf_int64 color_profile = AMF_VIDEO_CONVERTER_COLOR_PROFILE_UNKNOWN; + if (avctx->color_range == AVCOL_RANGE_JPEG) { + /// Color Space for Full (JPEG) Range + switch (avctx->colorspace) { + case AVCOL_SPC_SMPTE170M: + color_profile = AMF_VIDEO_CONVERTER_COLOR_PROFILE_FULL_601; + break; + case AVCOL_SPC_BT709: + color_profile = AMF_VIDEO_CONVERTER_COLOR_PROFILE_FULL_709; + break; + case AVCOL_SPC_BT2020_NCL: + case AVCOL_SPC_BT2020_CL: + color_profile = AMF_VIDEO_CONVERTER_COLOR_PROFILE_FULL_2020; + break; + } + } else { + /// Color Space for Limited (MPEG) range + switch (avctx->colorspace) { + case AVCOL_SPC_SMPTE170M: + color_profile = AMF_VIDEO_CONVERTER_COLOR_PROFILE_601; + break; + case AVCOL_SPC_BT709: + color_profile = AMF_VIDEO_CONVERTER_COLOR_PROFILE_709; + break; + case AVCOL_SPC_BT2020_NCL: + case AVCOL_SPC_BT2020_CL: + color_profile = AMF_VIDEO_CONVERTER_COLOR_PROFILE_2020; + break; + } + } + return color_profile; +} + const AVCodecHWConfigInternal *const ff_amfenc_hw_configs[] = { #if CONFIG_D3D11VA HW_CONFIG_ENCODER_FRAMES(D3D11, D3D11VA), diff --git a/libavcodec/amfenc.h b/libavcodec/amfenc.h index 2dbd378ef8..62736ef579 100644 --- a/libavcodec/amfenc.h +++ b/libavcodec/amfenc.h @@ -21,6 +21,7 @@ #include <AMF/core/Factory.h> +#include <AMF/components/ColorSpace.h> #include <AMF/components/VideoEncoderVCE.h> #include <AMF/components/VideoEncoderHEVC.h> #include <AMF/components/VideoEncoderAV1.h> @@ -170,6 +171,8 @@ int ff_amf_receive_packet(AVCodecContext *avctx, AVPacket *avpkt); */ extern const enum AVPixelFormat ff_amf_pix_fmts[]; +int ff_amf_get_color_profile(AVCodecContext *avctx); + /** * Error handling helper */ diff --git a/libavcodec/amfenc_h264.c b/libavcodec/amfenc_h264.c index bd544d12df..f785e091c9 100644 --- a/libavcodec/amfenc_h264.c +++ b/libavcodec/amfenc_h264.c @@ -199,6 +199,8 @@ static av_cold int amf_encode_init_h264(AVCodecContext *avctx) AMFRate framerate; AMFSize framesize = AMFConstructSize(avctx->width, avctx->height); int deblocking_filter = (avctx->flags & AV_CODEC_FLAG_LOOP_FILTER) ? 1 : 0; + amf_int64 color_profile; + enum AVPixelFormat pix_fmt; if (avctx->framerate.num > 0 && avctx->framerate.den > 0) { framerate = AMFConstructRate(avctx->framerate.num, avctx->framerate.den); @@ -262,10 +264,24 @@ FF_ENABLE_DEPRECATION_WARNINGS AMF_ASSIGN_PROPERTY_RATIO(res, ctx->encoder, AMF_VIDEO_ENCODER_ASPECT_RATIO, ratio); } - /// Color Range (Partial/TV/MPEG or Full/PC/JPEG) - if (avctx->color_range == AVCOL_RANGE_JPEG) { - AMF_ASSIGN_PROPERTY_BOOL(res, ctx->encoder, AMF_VIDEO_ENCODER_FULL_RANGE_COLOR, 1); - } + color_profile = ff_amf_get_color_profile(avctx); + AMF_ASSIGN_PROPERTY_INT64(res, ctx->encoder, AMF_VIDEO_ENCODER_OUTPUT_COLOR_PROFILE, color_profile); + + /// Color Range (Support for older Drivers) + AMF_ASSIGN_PROPERTY_BOOL(res, ctx->encoder, AMF_VIDEO_ENCODER_FULL_RANGE_COLOR, !!(avctx->color_range == AVCOL_RANGE_JPEG)); + + /// Color Depth + pix_fmt = avctx->hw_frames_ctx ? ((AVHWFramesContext*)avctx->hw_frames_ctx->data)->sw_format + : avctx->pix_fmt; + + // 10 bit input video is not supported by AMF H264 encoder + AMF_RETURN_IF_FALSE(ctx, pix_fmt != AV_PIX_FMT_P010, AVERROR_INVALIDDATA, "10-bit input video is not supported by AMF H264 encoder\n"); + + AMF_ASSIGN_PROPERTY_INT64(res, ctx->encoder, AMF_VIDEO_ENCODER_COLOR_BIT_DEPTH, AMF_COLOR_BIT_DEPTH_8); + /// Color Transfer Characteristics (AMF matches ISO/IEC) + AMF_ASSIGN_PROPERTY_INT64(res, ctx->encoder, AMF_VIDEO_ENCODER_OUTPUT_TRANSFER_CHARACTERISTIC, (amf_int64)avctx->color_trc); + /// Color Primaries (AMF matches ISO/IEC) + AMF_ASSIGN_PROPERTY_INT64(res, ctx->encoder, AMF_VIDEO_ENCODER_OUTPUT_COLOR_PRIMARIES, (amf_int64)avctx->color_primaries); // autodetect rate control method if (ctx->rate_control_mode == AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_UNKNOWN) { diff --git a/libavcodec/amfenc_hevc.c b/libavcodec/amfenc_hevc.c index 352564a301..8c6401c646 100644 --- a/libavcodec/amfenc_hevc.c +++ b/libavcodec/amfenc_hevc.c @@ -34,8 +34,9 @@ static const AVOption options[] = { { "high_quality", "high quality trancoding", 0, AV_OPT_TYPE_CONST, {.i64 = AMF_VIDEO_ENCODER_HEVC_USAGE_HIGH_QUALITY }, 0, 0, VE, "usage" }, { "lowlatency_high_quality","low latency yet high quality trancoding", 0, AV_OPT_TYPE_CONST, {.i64 = AMF_VIDEO_ENCODER_HEVC_USAGE_LOW_LATENCY_HIGH_QUALITY }, 0, 0, VE, "usage" }, - { "profile", "Set the profile (default main)", OFFSET(profile), AV_OPT_TYPE_INT,{ .i64 = AMF_VIDEO_ENCODER_HEVC_PROFILE_MAIN }, AMF_VIDEO_ENCODER_HEVC_PROFILE_MAIN, AMF_VIDEO_ENCODER_HEVC_PROFILE_MAIN, VE, "profile" }, + { "profile", "Set the profile (default main)", OFFSET(profile), AV_OPT_TYPE_INT,{ .i64 = AMF_VIDEO_ENCODER_HEVC_PROFILE_MAIN }, AMF_VIDEO_ENCODER_HEVC_PROFILE_MAIN, AMF_VIDEO_ENCODER_HEVC_PROFILE_MAIN_10, VE, "profile" }, { "main", "", 0, AV_OPT_TYPE_CONST,{ .i64 = AMF_VIDEO_ENCODER_HEVC_PROFILE_MAIN }, 0, 0, VE, "profile" }, + { "main10", "", 0, AV_OPT_TYPE_CONST,{ .i64 = AMF_VIDEO_ENCODER_HEVC_PROFILE_MAIN_10 }, 0, 0, VE, "profile" }, { "profile_tier", "Set the profile tier (default main)", OFFSET(tier), AV_OPT_TYPE_INT,{ .i64 = AMF_VIDEO_ENCODER_HEVC_TIER_MAIN }, AMF_VIDEO_ENCODER_HEVC_TIER_MAIN, AMF_VIDEO_ENCODER_HEVC_TIER_HIGH, VE, "tier" }, { "main", "", 0, AV_OPT_TYPE_CONST, { .i64 = AMF_VIDEO_ENCODER_HEVC_TIER_MAIN }, 0, 0, VE, "tier" }, @@ -160,6 +161,9 @@ static av_cold int amf_encode_init_hevc(AVCodecContext *avctx) AMFRate framerate; AMFSize framesize = AMFConstructSize(avctx->width, avctx->height); int deblocking_filter = (avctx->flags & AV_CODEC_FLAG_LOOP_FILTER) ? 1 : 0; + amf_int64 color_depth; + amf_int64 color_profile; + enum AVPixelFormat pix_fmt; if (avctx->framerate.num > 0 && avctx->framerate.den > 0) { framerate = AMFConstructRate(avctx->framerate.num, avctx->framerate.den); @@ -187,6 +191,9 @@ FF_ENABLE_DEPRECATION_WARNINGS case AV_PROFILE_HEVC_MAIN: profile = AMF_VIDEO_ENCODER_HEVC_PROFILE_MAIN; break; + case AV_PROFILE_HEVC_MAIN_10: + profile = AMF_VIDEO_ENCODER_HEVC_PROFILE_MAIN_10; + break; default: break; } @@ -215,6 +222,23 @@ FF_ENABLE_DEPRECATION_WARNINGS AMF_ASSIGN_PROPERTY_RATIO(res, ctx->encoder, AMF_VIDEO_ENCODER_HEVC_ASPECT_RATIO, ratio); } + color_profile = ff_amf_get_color_profile(avctx); + AMF_ASSIGN_PROPERTY_INT64(res, ctx->encoder, AMF_VIDEO_ENCODER_HEVC_OUTPUT_COLOR_PROFILE, color_profile); + /// Color Range (Support for older Drivers) + AMF_ASSIGN_PROPERTY_BOOL(res, ctx->encoder, AMF_VIDEO_ENCODER_HEVC_NOMINAL_RANGE, !!(avctx->color_range == AVCOL_RANGE_JPEG)); + /// Color Depth + color_depth = AMF_COLOR_BIT_DEPTH_8; + pix_fmt = avctx->hw_frames_ctx ? ((AVHWFramesContext*)avctx->hw_frames_ctx->data)->sw_format + : avctx->pix_fmt; + if (pix_fmt == AV_PIX_FMT_P010) { + color_depth = AMF_COLOR_BIT_DEPTH_10; + } + AMF_ASSIGN_PROPERTY_INT64(res, ctx->encoder, AMF_VIDEO_ENCODER_HEVC_COLOR_BIT_DEPTH, color_depth); + /// Color Transfer Characteristics (AMF matches ISO/IEC) + AMF_ASSIGN_PROPERTY_INT64(res, ctx->encoder, AMF_VIDEO_ENCODER_HEVC_OUTPUT_TRANSFER_CHARACTERISTIC, (amf_int64)avctx->color_trc); + /// Color Primaries (AMF matches ISO/IEC) + AMF_ASSIGN_PROPERTY_INT64(res, ctx->encoder, AMF_VIDEO_ENCODER_HEVC_OUTPUT_COLOR_PRIMARIES, (amf_int64)avctx->color_primaries); + // Picture control properties AMF_ASSIGN_PROPERTY_INT64(res, ctx->encoder, AMF_VIDEO_ENCODER_HEVC_NUM_GOPS_PER_IDR, ctx->gops_per_idr); AMF_ASSIGN_PROPERTY_INT64(res, ctx->encoder, AMF_VIDEO_ENCODER_HEVC_GOP_SIZE, avctx->gop_size);
From: Michael Fabian 'Xaymar' Dirks <michael.dirks@xaymar.com> added 10 bit support for amf hevc. before: command - ffmpeg.exe -hide_banner -y -hwaccel d3d11va -hwaccel_output_format d3d11 -i test_10bit_file.mkv -an -c:v h264_amf res.dx11_hw_h264.mkv output - Format of input frames context (p010le) is not supported by AMF. command - ffmpeg.exe -hide_banner -y -hwaccel d3d11va -hwaccel_output_format d3d11 -i test_10bit_file -an -c:v hevc_amf res.dx11_hw_hevc.mkv output - Format of input frames context (p010le) is not supported by AMF. after: command - ffmpeg.exe -hide_banner -y -hwaccel d3d11va -hwaccel_output_format d3d11 -i test_10bit_file -an -c:v h264_amf res.dx11_hw_h264.mkv output - 10-bit input video is not supported by AMF H264 encoder command - ffmpeg.exe -hide_banner -y -hwaccel d3d11va -hwaccel_output_format d3d11 -i test_10bit_file -an -c:v hevc_amf res.dx11_hw_hevc.mkv output - 10bit file v2 - lost line returned in ff_amf_pix_fmts v3 - fixes after review v4 - extract duplicated code, fix incorrect processing of 10-bit input for h264 v5 - non-functional changes after review Co-authored-by: Evgeny Pavlov <lucenticus@gmail.com> --- libavcodec/amfenc.c | 37 +++++++++++++++++++++++++++++++++++++ libavcodec/amfenc.h | 3 +++ libavcodec/amfenc_h264.c | 24 ++++++++++++++++++++---- libavcodec/amfenc_hevc.c | 26 +++++++++++++++++++++++++- 4 files changed, 85 insertions(+), 5 deletions(-)