From d914ad134d4ed4dfb16f0f5452d8655b50fd9157 Mon Sep 17 00:00:00 2001 From: Alexander Frick Date: Sun, 3 Sep 2023 13:19:55 -0500 Subject: [PATCH] M116 FFMPEG roll --- .../config/Chrome/android/arm-neon/config.h | 1 + .../android/arm-neon/config_components.h | 11 +- .../android/arm-neon/libavutil/ffversion.h | 2 +- .../config/Chrome/android/arm64/config.h | 1 + .../Chrome/android/arm64/config_components.h | 11 +- .../android/arm64/libavutil/ffversion.h | 2 +- .../config/Chrome/android/ia32/config.h | 1 + .../Chrome/android/ia32/config_components.h | 11 +- .../Chrome/android/ia32/libavutil/ffversion.h | 2 +- .../config/Chrome/android/x64/config.asm | 1 + .../config/Chrome/android/x64/config.h | 1 + .../Chrome/android/x64/config_components.h | 11 +- .../Chrome/android/x64/libavutil/ffversion.h | 2 +- .../chromium/config/Chrome/ios/arm64/config.h | 13 +- .../Chrome/ios/arm64/config_components.h | 15 +- .../Chrome/ios/arm64/libavcodec/codec_list.c | 1 + .../Chrome/ios/arm64/libavcodec/parser_list.c | 1 + .../Chrome/ios/arm64/libavutil/ffversion.h | 2 +- .../chromium/config/Chrome/ios/x64/config.asm | 1 + .../chromium/config/Chrome/ios/x64/config.h | 3 +- .../config/Chrome/ios/x64/config_components.h | 11 +- .../Chrome/ios/x64/libavutil/ffversion.h | 2 +- .../config/Chrome/linux-noasm/x64/config.h | 3 +- .../linux-noasm/x64/config_components.h | 11 +- .../linux-noasm/x64/libavutil/ffversion.h | 2 +- .../config/Chrome/linux/arm-neon/config.h | 13 +- .../Chrome/linux/arm-neon/config_components.h | 15 +- .../linux/arm-neon/libavcodec/codec_list.c | 1 + .../linux/arm-neon/libavcodec/parser_list.c | 1 + .../linux/arm-neon/libavutil/ffversion.h | 2 +- .../chromium/config/Chrome/linux/arm/config.h | 13 +- .../Chrome/linux/arm/config_components.h | 15 +- .../Chrome/linux/arm/libavcodec/codec_list.c | 1 + .../Chrome/linux/arm/libavcodec/parser_list.c | 1 + .../Chrome/linux/arm/libavutil/ffversion.h | 2 +- .../config/Chrome/linux/arm64/config.h | 13 +- .../Chrome/linux/arm64/config_components.h | 15 +- .../linux/arm64/libavcodec/codec_list.c | 1 + .../linux/arm64/libavcodec/parser_list.c | 1 + .../Chrome/linux/arm64/libavutil/ffversion.h | 2 +- .../config/Chrome/linux/ia32/config.asm | 1 + .../config/Chrome/linux/ia32/config.h | 13 +- .../Chrome/linux/ia32/config_components.h | 15 +- .../Chrome/linux/ia32/libavcodec/codec_list.c | 1 + .../linux/ia32/libavcodec/parser_list.c | 1 + .../Chrome/linux/ia32/libavutil/ffversion.h | 2 +- .../config/Chrome/linux/x64/config.asm | 1 + .../chromium/config/Chrome/linux/x64/config.h | 13 +- .../Chrome/linux/x64/config_components.h | 15 +- .../Chrome/linux/x64/libavcodec/codec_list.c | 1 + .../Chrome/linux/x64/libavcodec/parser_list.c | 1 + .../Chrome/linux/x64/libavutil/ffversion.h | 2 +- .../chromium/config/Chrome/mac/arm64/config.h | 13 +- .../Chrome/mac/arm64/config_components.h | 15 +- .../Chrome/mac/arm64/libavcodec/codec_list.c | 1 + .../Chrome/mac/arm64/libavcodec/parser_list.c | 1 + .../Chrome/mac/arm64/libavutil/ffversion.h | 2 +- .../chromium/config/Chrome/mac/x64/config.asm | 9 +- .../chromium/config/Chrome/mac/x64/config.h | 13 +- .../config/Chrome/mac/x64/config_components.h | 15 +- .../Chrome/mac/x64/libavcodec/codec_list.c | 1 + .../Chrome/mac/x64/libavcodec/parser_list.c | 1 + .../Chrome/mac/x64/libavutil/ffversion.h | 2 +- .../config/Chrome/win-msvc/ia32/config.asm | 8 +- .../config/Chrome/win-msvc/ia32/config.h | 10 +- .../win-msvc/ia32/libavcodec/codec_list.c | 1 + .../win-msvc/ia32/libavcodec/parser_list.c | 1 + .../config/Chrome/win-msvc/x64/config.asm | 8 +- .../config/Chrome/win-msvc/x64/config.h | 10 +- .../win-msvc/x64/libavcodec/codec_list.c | 1 + .../win-msvc/x64/libavcodec/parser_list.c | 1 + .../chromium/config/Chrome/win/arm64/config.h | 13 +- .../Chrome/win/arm64/config_components.h | 15 +- .../Chrome/win/arm64/libavcodec/codec_list.c | 1 + .../Chrome/win/arm64/libavcodec/parser_list.c | 1 + .../Chrome/win/arm64/libavutil/ffversion.h | 2 +- .../config/Chrome/win/ia32/config.asm | 9 +- .../chromium/config/Chrome/win/ia32/config.h | 13 +- .../Chrome/win/ia32/config_components.h | 15 +- .../Chrome/win/ia32/libavcodec/codec_list.c | 1 + .../Chrome/win/ia32/libavcodec/parser_list.c | 1 + .../Chrome/win/ia32/libavutil/ffversion.h | 2 +- .../chromium/config/Chrome/win/x64/config.asm | 9 +- .../chromium/config/Chrome/win/x64/config.h | 13 +- .../config/Chrome/win/x64/config_components.h | 15 +- .../Chrome/win/x64/libavcodec/codec_list.c | 1 + .../Chrome/win/x64/libavcodec/parser_list.c | 1 + .../Chrome/win/x64/libavutil/ffversion.h | 2 +- .../config/ChromeOS/linux-noasm/x64/config.h | 13 +- .../linux-noasm/x64/config_components.h | 15 +- .../linux-noasm/x64/libavcodec/codec_list.c | 1 + .../linux-noasm/x64/libavcodec/parser_list.c | 1 + .../linux-noasm/x64/libavutil/ffversion.h | 2 +- .../config/ChromeOS/linux/arm-neon/config.h | 13 +- .../linux/arm-neon/config_components.h | 15 +- .../linux/arm-neon/libavcodec/codec_list.c | 1 + .../linux/arm-neon/libavcodec/parser_list.c | 1 + .../linux/arm-neon/libavutil/ffversion.h | 2 +- .../config/ChromeOS/linux/arm/config.h | 13 +- .../ChromeOS/linux/arm/config_components.h | 15 +- .../linux/arm/libavcodec/codec_list.c | 1 + .../linux/arm/libavcodec/parser_list.c | 1 + .../ChromeOS/linux/arm/libavutil/ffversion.h | 2 +- .../config/ChromeOS/linux/arm64/config.h | 13 +- .../ChromeOS/linux/arm64/config_components.h | 15 +- .../linux/arm64/libavcodec/codec_list.c | 1 + .../linux/arm64/libavcodec/parser_list.c | 1 + .../linux/arm64/libavutil/ffversion.h | 2 +- .../config/ChromeOS/linux/ia32/config.asm | 1 + .../config/ChromeOS/linux/ia32/config.h | 13 +- .../ChromeOS/linux/ia32/config_components.h | 15 +- .../linux/ia32/libavcodec/codec_list.c | 1 + .../linux/ia32/libavcodec/parser_list.c | 1 + .../ChromeOS/linux/ia32/libavutil/ffversion.h | 2 +- .../config/ChromeOS/linux/x64/config.asm | 1 + .../config/ChromeOS/linux/x64/config.h | 13 +- .../ChromeOS/linux/x64/config_components.h | 15 +- .../linux/x64/libavcodec/codec_list.c | 1 + .../linux/x64/libavcodec/parser_list.c | 1 + .../ChromeOS/linux/x64/libavutil/ffversion.h | 2 +- .../config/Chromium/android/arm-neon/config.h | 1 + .../android/arm-neon/config_components.h | 11 +- .../android/arm-neon/libavutil/ffversion.h | 2 +- .../config/Chromium/android/arm64/config.h | 1 + .../android/arm64/config_components.h | 11 +- .../android/arm64/libavutil/ffversion.h | 2 +- .../config/Chromium/android/ia32/config.h | 1 + .../Chromium/android/ia32/config_components.h | 11 +- .../android/ia32/libavutil/ffversion.h | 2 +- .../config/Chromium/android/x64/config.asm | 1 + .../config/Chromium/android/x64/config.h | 1 + .../Chromium/android/x64/config_components.h | 11 +- .../android/x64/libavutil/ffversion.h | 2 +- .../config/Chromium/ios/arm64/config.h | 11 +- .../Chromium/ios/arm64/config_components.h | 15 +- .../ios/arm64/libavcodec/codec_list.c | 1 + .../ios/arm64/libavcodec/parser_list.c | 1 + .../Chromium/ios/arm64/libavutil/ffversion.h | 2 +- .../config/Chromium/ios/x64/config.asm | 1 + .../chromium/config/Chromium/ios/x64/config.h | 3 +- .../Chromium/ios/x64/config_components.h | 11 +- .../Chromium/ios/x64/libavutil/ffversion.h | 2 +- .../config/Chromium/linux-noasm/x64/config.h | 11 +- .../linux-noasm/x64/config_components.h | 15 +- .../linux-noasm/x64/libavcodec/codec_list.c | 1 + .../linux-noasm/x64/libavcodec/parser_list.c | 1 + .../linux-noasm/x64/libavutil/ffversion.h | 2 +- .../config/Chromium/linux/arm-neon/config.h | 11 +- .../linux/arm-neon/config_components.h | 15 +- .../linux/arm-neon/libavcodec/codec_list.c | 1 + .../linux/arm-neon/libavcodec/parser_list.c | 1 + .../linux/arm-neon/libavutil/ffversion.h | 2 +- .../config/Chromium/linux/arm/config.h | 11 +- .../Chromium/linux/arm/config_components.h | 15 +- .../linux/arm/libavcodec/codec_list.c | 1 + .../linux/arm/libavcodec/parser_list.c | 1 + .../Chromium/linux/arm/libavutil/ffversion.h | 2 +- .../config/Chromium/linux/arm64/config.h | 11 +- .../Chromium/linux/arm64/config_components.h | 15 +- .../linux/arm64/libavcodec/codec_list.c | 1 + .../linux/arm64/libavcodec/parser_list.c | 1 + .../linux/arm64/libavutil/ffversion.h | 2 +- .../config/Chromium/linux/ia32/config.asm | 1 + .../config/Chromium/linux/ia32/config.h | 11 +- .../Chromium/linux/ia32/config_components.h | 15 +- .../linux/ia32/libavcodec/codec_list.c | 1 + .../linux/ia32/libavcodec/parser_list.c | 1 + .../Chromium/linux/ia32/libavutil/ffversion.h | 2 +- .../config/Chromium/linux/x64/config.asm | 1 + .../config/Chromium/linux/x64/config.h | 11 +- .../Chromium/linux/x64/config_components.h | 15 +- .../linux/x64/libavcodec/codec_list.c | 1 + .../linux/x64/libavcodec/parser_list.c | 1 + .../Chromium/linux/x64/libavutil/ffversion.h | 2 +- .../config/Chromium/mac/arm64/config.h | 11 +- .../Chromium/mac/arm64/config_components.h | 15 +- .../mac/arm64/libavcodec/codec_list.c | 1 + .../mac/arm64/libavcodec/parser_list.c | 1 + .../Chromium/mac/arm64/libavutil/ffversion.h | 2 +- .../config/Chromium/mac/x64/config.asm | 9 +- .../chromium/config/Chromium/mac/x64/config.h | 11 +- .../Chromium/mac/x64/config_components.h | 15 +- .../Chromium/mac/x64/libavcodec/codec_list.c | 1 + .../Chromium/mac/x64/libavcodec/parser_list.c | 1 + .../Chromium/mac/x64/libavutil/ffversion.h | 2 +- .../config/Chromium/win-msvc/ia32/config.asm | 8 +- .../config/Chromium/win-msvc/ia32/config.h | 8 +- .../win-msvc/ia32/libavcodec/codec_list.c | 1 + .../win-msvc/ia32/libavcodec/parser_list.c | 1 + .../config/Chromium/win-msvc/x64/config.asm | 8 +- .../config/Chromium/win-msvc/x64/config.h | 8 +- .../win-msvc/x64/libavcodec/codec_list.c | 1 + .../win-msvc/x64/libavcodec/parser_list.c | 1 + .../config/Chromium/win/arm64/config.h | 11 +- .../Chromium/win/arm64/config_components.h | 15 +- .../win/arm64/libavcodec/codec_list.c | 1 + .../win/arm64/libavcodec/parser_list.c | 1 + .../Chromium/win/arm64/libavutil/ffversion.h | 2 +- .../config/Chromium/win/ia32/config.asm | 9 +- .../config/Chromium/win/ia32/config.h | 11 +- .../Chromium/win/ia32/config_components.h | 15 +- .../Chromium/win/ia32/libavcodec/codec_list.c | 1 + .../win/ia32/libavcodec/parser_list.c | 1 + .../Chromium/win/ia32/libavutil/ffversion.h | 2 +- .../config/Chromium/win/x64/config.asm | 9 +- .../chromium/config/Chromium/win/x64/config.h | 11 +- .../Chromium/win/x64/config_components.h | 15 +- .../Chromium/win/x64/libavcodec/codec_list.c | 1 + .../Chromium/win/x64/libavcodec/parser_list.c | 1 + .../Chromium/win/x64/libavutil/ffversion.h | 2 +- .../ffmpeg/chromium/patches/README | 15 + .../chromium/patches/config_flag_changes.txt | 45 +- .../ffmpeg/chromium/scripts/build_ffmpeg.py | 20 +- .../ffmpeg/chromium/scripts/generate_gn.py | 6 +- .../third_party/ffmpeg/ffmpeg_generated.gni | 97 +- .../third_party/ffmpeg/libavcodec/012v.c | 2 +- .../third_party/ffmpeg/libavcodec/4xm.c | 5 +- .../third_party/ffmpeg/libavcodec/8bps.c | 13 +- .../third_party/ffmpeg/libavcodec/Makefile | 16 +- .../third_party/ffmpeg/libavcodec/aacpsy.c | 2 +- .../ffmpeg/libavcodec/aarch64/Makefile | 3 +- ...ame_libavcodec_aarch64_hevcdsp_idct_neon.S | 2 + ...name_libavcodec_aarch64_hevcdsp_sao_neon.S | 2 + .../libavcodec/aarch64/hevcdsp_deblock_neon.S | 183 +++ .../libavcodec/aarch64/hevcdsp_idct_neon.S | 337 +++- .../libavcodec/aarch64/hevcdsp_init_aarch64.c | 25 + .../third_party/ffmpeg/libavcodec/adpcm.c | 4 +- .../third_party/ffmpeg/libavcodec/agm.c | 7 +- .../third_party/ffmpeg/libavcodec/aic.c | 2 +- .../ffmpeg/libavcodec/aliaspixdec.c | 2 +- .../third_party/ffmpeg/libavcodec/allcodecs.c | 6 +- .../third_party/ffmpeg/libavcodec/alsdec.c | 6 +- .../ffmpeg/libavcodec/amfenc_av1.c | 8 +- .../ffmpeg/libavcodec/amfenc_h264.c | 8 +- .../ffmpeg/libavcodec/amfenc_hevc.c | 8 +- .../third_party/ffmpeg/libavcodec/ansi.c | 8 + .../third_party/ffmpeg/libavcodec/apac.c | 6 +- .../third_party/ffmpeg/libavcodec/apedec.c | 34 +- .../third_party/ffmpeg/libavcodec/arbc.c | 5 +- .../third_party/ffmpeg/libavcodec/argo.c | 5 +- .../third_party/ffmpeg/libavcodec/asvdec.c | 2 +- .../third_party/ffmpeg/libavcodec/atrac3.c | 12 +- .../third_party/ffmpeg/libavcodec/atrac9dec.c | 6 +- .../autorename_libavcodec_bswapdsp.c | 2 + .../third_party/ffmpeg/libavcodec/av1_parse.c | 24 +- .../third_party/ffmpeg/libavcodec/av1_parse.h | 6 +- .../ffmpeg/libavcodec/av1_parser.c | 11 +- .../third_party/ffmpeg/libavcodec/av1dec.c | 19 +- .../third_party/ffmpeg/libavcodec/avcodec.c | 5 +- .../third_party/ffmpeg/libavcodec/avcodec.h | 15 +- .../third_party/ffmpeg/libavcodec/avrndec.c | 2 +- .../third_party/ffmpeg/libavcodec/avs.c | 4 +- .../third_party/ffmpeg/libavcodec/avuidec.c | 2 +- .../ffmpeg/libavcodec/bethsoftvideo.c | 4 + .../third_party/ffmpeg/libavcodec/bfi.c | 12 +- .../third_party/ffmpeg/libavcodec/bintext.c | 4 + .../ffmpeg/libavcodec/bitpacked_dec.c | 2 +- .../third_party/ffmpeg/libavcodec/bmp.c | 2 +- .../third_party/ffmpeg/libavcodec/bmvvideo.c | 4 + .../third_party/ffmpeg/libavcodec/bonk.c | 27 +- .../ffmpeg/libavcodec/brenderpix.c | 10 +- .../ffmpeg/libavcodec/bytestream.h | 10 +- .../third_party/ffmpeg/libavcodec/c93.c | 8 +- .../ffmpeg/libavcodec/cavs_parser.c | 11 +- .../third_party/ffmpeg/libavcodec/cavsdec.c | 3 + .../third_party/ffmpeg/libavcodec/cbs_av1.c | 7 + .../third_party/ffmpeg/libavcodec/cbs_av1.h | 7 + .../libavcodec/cbs_av1_syntax_template.c | 38 +- .../ffmpeg/libavcodec/ccaption_dec.c | 9 +- .../ffmpeg/libavcodec/cdgraphics.c | 4 + .../third_party/ffmpeg/libavcodec/cdtoons.c | 4 + .../third_party/ffmpeg/libavcodec/cdxl.c | 2 +- .../third_party/ffmpeg/libavcodec/cfhd.c | 6 +- .../third_party/ffmpeg/libavcodec/cinepak.c | 13 +- .../ffmpeg/libavcodec/clearvideo.c | 4 +- .../third_party/ffmpeg/libavcodec/cljrdec.c | 2 +- .../third_party/ffmpeg/libavcodec/cllc.c | 2 +- .../third_party/ffmpeg/libavcodec/codec.h | 3 + .../ffmpeg/libavcodec/codec_desc.c | 23 +- .../ffmpeg/libavcodec/codec_desc.h | 6 + .../third_party/ffmpeg/libavcodec/codec_id.h | 1 + .../third_party/ffmpeg/libavcodec/codec_par.c | 3 + .../third_party/ffmpeg/libavcodec/codec_par.h | 12 + .../third_party/ffmpeg/libavcodec/cpia.c | 4 +- .../third_party/ffmpeg/libavcodec/cri.c | 2 +- .../third_party/ffmpeg/libavcodec/crystalhd.c | 4 +- .../third_party/ffmpeg/libavcodec/cscd.c | 4 +- .../third_party/ffmpeg/libavcodec/cuviddec.c | 12 +- .../third_party/ffmpeg/libavcodec/dds.c | 10 +- .../third_party/ffmpeg/libavcodec/decode.c | 20 +- .../third_party/ffmpeg/libavcodec/dfa.c | 4 + .../third_party/ffmpeg/libavcodec/diracdec.c | 5 +- .../third_party/ffmpeg/libavcodec/dnxhddec.c | 17 +- .../third_party/ffmpeg/libavcodec/dnxhdenc.c | 3 +- .../third_party/ffmpeg/libavcodec/dpcm.c | 2 +- .../third_party/ffmpeg/libavcodec/dpx.c | 35 +- .../ffmpeg/libavcodec/dsicinvideo.c | 4 + .../third_party/ffmpeg/libavcodec/dv.h | 6 + .../third_party/ffmpeg/libavcodec/dvdec.c | 14 +- .../third_party/ffmpeg/libavcodec/dvenc.c | 8 +- .../third_party/ffmpeg/libavcodec/dxa.c | 14 +- .../third_party/ffmpeg/libavcodec/dxtory.c | 2 +- .../third_party/ffmpeg/libavcodec/dxv.c | 2 +- .../third_party/ffmpeg/libavcodec/eacmv.c | 4 +- .../third_party/ffmpeg/libavcodec/eatgq.c | 2 +- .../third_party/ffmpeg/libavcodec/eatgv.c | 4 +- .../third_party/ffmpeg/libavcodec/elbg.c | 56 +- .../third_party/ffmpeg/libavcodec/encode.c | 26 +- .../ffmpeg/libavcodec/error_resilience.c | 9 +- .../ffmpeg/libavcodec/error_resilience.h | 1 - .../third_party/ffmpeg/libavcodec/escape124.c | 2 +- .../third_party/ffmpeg/libavcodec/exr.c | 18 +- .../third_party/ffmpeg/libavcodec/ffv1dec.c | 33 +- .../third_party/ffmpeg/libavcodec/ffv1enc.c | 4 +- .../third_party/ffmpeg/libavcodec/fic.c | 4 +- .../third_party/ffmpeg/libavcodec/fitsdec.c | 3 +- .../third_party/ffmpeg/libavcodec/fitsenc.c | 1 + .../third_party/ffmpeg/libavcodec/flacdec.c | 2 +- .../third_party/ffmpeg/libavcodec/flicvideo.c | 4 + .../third_party/ffmpeg/libavcodec/fmvc.c | 4 +- .../third_party/ffmpeg/libavcodec/fraps.c | 2 +- .../third_party/ffmpeg/libavcodec/frwu.c | 2 +- .../third_party/ffmpeg/libavcodec/ftr.c | 6 +- .../third_party/ffmpeg/libavcodec/g2meet.c | 24 +- .../third_party/ffmpeg/libavcodec/g723_1dec.c | 6 +- .../third_party/ffmpeg/libavcodec/g729dec.c | 12 +- .../ffmpeg/libavcodec/g729postfilter.c | 2 +- .../third_party/ffmpeg/libavcodec/gemdec.c | 6 +- .../ffmpeg/libavcodec/gif_parser.c | 34 +- .../third_party/ffmpeg/libavcodec/gifdec.c | 4 +- .../third_party/ffmpeg/libavcodec/h261dec.c | 5 +- .../ffmpeg/libavcodec/h264_parser.c | 4 +- .../ffmpeg/libavcodec/h264_picture.c | 3 +- .../ffmpeg/libavcodec/h264_slice.c | 53 +- .../third_party/ffmpeg/libavcodec/h264dec.c | 8 +- .../third_party/ffmpeg/libavcodec/hapdec.c | 2 +- .../third_party/ffmpeg/libavcodec/hdrdec.c | 2 +- .../third_party/ffmpeg/libavcodec/hevc_ps.c | 148 +- .../third_party/ffmpeg/libavcodec/hevc_ps.h | 48 +- .../third_party/ffmpeg/libavcodec/hevc_refs.c | 7 +- .../third_party/ffmpeg/libavcodec/hevcdec.c | 23 +- .../third_party/ffmpeg/libavcodec/hnm4video.c | 4 +- .../third_party/ffmpeg/libavcodec/hq_hqa.c | 2 +- .../third_party/ffmpeg/libavcodec/hqx.c | 2 +- .../ffmpeg/libavcodec/huffyuvdec.c | 4 +- .../ffmpeg/libavcodec/idcinvideo.c | 9 +- .../third_party/ffmpeg/libavcodec/iff.c | 4 +- .../third_party/ffmpeg/libavcodec/imm4.c | 10 +- .../third_party/ffmpeg/libavcodec/imx.c | 18 +- .../third_party/ffmpeg/libavcodec/internal.h | 2 - .../ffmpeg/libavcodec/interplayacm.c | 8 +- .../ffmpeg/libavcodec/interplayvideo.c | 9 +- .../ffmpeg/libavcodec/ituh263enc.c | 5 + .../third_party/ffmpeg/libavcodec/j2kenc.c | 83 +- .../third_party/ffmpeg/libavcodec/jpeg2000.h | 5 +- .../ffmpeg/libavcodec/jpeg2000dec.c | 160 +- .../ffmpeg/libavcodec/jpeg2000dec.h | 119 ++ .../ffmpeg/libavcodec/jpeg2000htdec.c | 1451 +++++++++++++++++ .../ffmpeg/libavcodec/jpeg2000htdec.h | 34 + .../third_party/ffmpeg/libavcodec/jvdec.c | 10 +- .../third_party/ffmpeg/libavcodec/kmvc.c | 21 +- .../third_party/ffmpeg/libavcodec/lagarith.c | 2 +- .../third_party/ffmpeg/libavcodec/lcldec.c | 39 +- .../third_party/ffmpeg/libavcodec/libaomdec.c | 5 +- .../third_party/ffmpeg/libavcodec/libaomenc.c | 14 +- .../third_party/ffmpeg/libavcodec/libdav1d.c | 76 +- .../ffmpeg/libavcodec/libfdk-aacenc.c | 51 + .../third_party/ffmpeg/libavcodec/libjxldec.c | 2 +- .../third_party/ffmpeg/libavcodec/libjxlenc.c | 4 +- .../ffmpeg/libavcodec/libkvazaar.c | 13 +- .../ffmpeg/libavcodec/libmp3lame.c | 16 +- .../ffmpeg/libavcodec/libopenh264enc.c | 23 +- .../third_party/ffmpeg/libavcodec/librav1e.c | 9 +- .../ffmpeg/libavcodec/librsvgdec.c | 2 +- .../ffmpeg/libavcodec/libspeexdec.c | 6 +- .../third_party/ffmpeg/libavcodec/libsvtav1.c | 12 +- .../third_party/ffmpeg/libavcodec/libuavs3d.c | 5 +- .../third_party/ffmpeg/libavcodec/libvpxenc.c | 21 +- .../third_party/ffmpeg/libavcodec/libx264.c | 40 +- .../third_party/ffmpeg/libavcodec/libx265.c | 8 +- .../third_party/ffmpeg/libavcodec/loco.c | 2 +- .../third_party/ffmpeg/libavcodec/lscrdec.c | 13 +- .../third_party/ffmpeg/libavcodec/m101.c | 14 +- .../third_party/ffmpeg/libavcodec/magicyuv.c | 2 +- .../third_party/ffmpeg/libavcodec/mdec.c | 2 +- .../third_party/ffmpeg/libavcodec/me_cmp.c | 9 +- .../third_party/ffmpeg/libavcodec/me_cmp.h | 2 +- .../ffmpeg/libavcodec/mediacodec_wrapper.c | 98 ++ .../ffmpeg/libavcodec/mediacodecenc.c | 236 +++ .../third_party/ffmpeg/libavcodec/mfenc.c | 4 + .../third_party/ffmpeg/libavcodec/midivid.c | 5 +- .../third_party/ffmpeg/libavcodec/misc4.c | 5 +- .../third_party/ffmpeg/libavcodec/mjpegdec.c | 110 +- .../third_party/ffmpeg/libavcodec/mmaldec.c | 6 +- .../third_party/ffmpeg/libavcodec/mobiclip.c | 4 +- .../ffmpeg/libavcodec/motion_est.c | 11 +- .../third_party/ffmpeg/libavcodec/mpeg12dec.c | 20 +- .../third_party/ffmpeg/libavcodec/mpeg12enc.c | 4 +- .../ffmpeg/libavcodec/mpeg4videoenc.c | 2 +- .../ffmpeg/libavcodec/mpegvideo_dec.c | 19 +- .../ffmpeg/libavcodec/mpegvideo_enc.c | 29 +- .../ffmpeg/libavcodec/mpegvideo_parser.c | 10 +- .../third_party/ffmpeg/libavcodec/mscc.c | 6 +- .../ffmpeg/libavcodec/msmpeg4enc.c | 14 +- .../third_party/ffmpeg/libavcodec/msp2dec.c | 2 +- .../third_party/ffmpeg/libavcodec/msrle.c | 9 +- .../third_party/ffmpeg/libavcodec/mss1.c | 8 +- .../third_party/ffmpeg/libavcodec/mss2.c | 5 +- .../third_party/ffmpeg/libavcodec/mss3.c | 5 +- .../third_party/ffmpeg/libavcodec/mss4.c | 5 +- .../third_party/ffmpeg/libavcodec/msvideo1.c | 9 +- .../ffmpeg/libavcodec/msvideo1enc.c | 2 + .../third_party/ffmpeg/libavcodec/mv30.c | 6 +- .../third_party/ffmpeg/libavcodec/mvcdec.c | 2 +- .../third_party/ffmpeg/libavcodec/mvha.c | 2 +- .../third_party/ffmpeg/libavcodec/mwsc.c | 9 +- .../third_party/ffmpeg/libavcodec/mxpegdec.c | 4 +- .../third_party/ffmpeg/libavcodec/notchlc.c | 2 +- .../third_party/ffmpeg/libavcodec/nuv.c | 5 +- .../ffmpeg/libavcodec/nvdec_mpeg12.c | 5 +- .../ffmpeg/libavcodec/nvdec_mpeg4.c | 5 +- .../third_party/ffmpeg/libavcodec/nvenc.c | 19 +- .../ffmpeg/libavcodec/options_table.h | 4 +- .../third_party/ffmpeg/libavcodec/pafvideo.c | 8 +- .../third_party/ffmpeg/libavcodec/parser.c | 4 + .../ffmpeg/libavcodec/pcm_rechunk_bsf.c | 4 +- .../third_party/ffmpeg/libavcodec/pdvdec.c | 141 ++ .../third_party/ffmpeg/libavcodec/pgxdec.c | 2 +- .../third_party/ffmpeg/libavcodec/photocd.c | 2 +- .../third_party/ffmpeg/libavcodec/pictordec.c | 4 + .../third_party/ffmpeg/libavcodec/pixlet.c | 2 +- .../third_party/ffmpeg/libavcodec/pngdec.c | 63 +- .../third_party/ffmpeg/libavcodec/pngenc.c | 6 + .../third_party/ffmpeg/libavcodec/pnmdec.c | 2 +- .../ffmpeg/libavcodec/proresdec2.c | 9 +- .../ffmpeg/libavcodec/proresenc_anatoliy.c | 3 +- .../ffmpeg/libavcodec/proresenc_kostya.c | 6 +- .../third_party/ffmpeg/libavcodec/prosumer.c | 2 +- .../third_party/ffmpeg/libavcodec/psd.c | 4 + .../ffmpeg/libavcodec/pthread_frame.c | 4 + .../third_party/ffmpeg/libavcodec/qdrw.c | 6 +- .../third_party/ffmpeg/libavcodec/qoidec.c | 2 +- .../third_party/ffmpeg/libavcodec/qpeg.c | 14 +- .../ffmpeg/libavcodec/qsv_internal.h | 5 +- .../third_party/ffmpeg/libavcodec/qsvdec.c | 14 +- .../third_party/ffmpeg/libavcodec/qsvenc.c | 6 +- .../third_party/ffmpeg/libavcodec/qtrle.c | 9 +- .../third_party/ffmpeg/libavcodec/r210dec.c | 2 +- .../third_party/ffmpeg/libavcodec/rasc.c | 5 +- .../ffmpeg/libavcodec/ratecontrol.c | 11 +- .../third_party/ffmpeg/libavcodec/rawdec.c | 19 +- .../third_party/ffmpeg/libavcodec/rka.c | 2 +- .../third_party/ffmpeg/libavcodec/rkmppdec.c | 6 +- .../third_party/ffmpeg/libavcodec/rscc.c | 11 +- .../third_party/ffmpeg/libavcodec/rv34.c | 2 + .../third_party/ffmpeg/libavcodec/sanm.c | 4 +- .../third_party/ffmpeg/libavcodec/scpr.c | 12 +- .../ffmpeg/libavcodec/screenpresso.c | 2 +- .../third_party/ffmpeg/libavcodec/sga.c | 6 +- .../third_party/ffmpeg/libavcodec/sgidec.c | 2 +- .../third_party/ffmpeg/libavcodec/sgirledec.c | 2 +- .../ffmpeg/libavcodec/sheervideo.c | 2 +- .../third_party/ffmpeg/libavcodec/shorten.c | 6 +- .../third_party/ffmpeg/libavcodec/smacker.c | 34 +- .../third_party/ffmpeg/libavcodec/smc.c | 9 +- .../third_party/ffmpeg/libavcodec/snow.c | 7 +- .../third_party/ffmpeg/libavcodec/snowenc.c | 10 +- .../third_party/ffmpeg/libavcodec/sonic.c | 4 +- .../ffmpeg/libavcodec/speedhqdec.c | 2 +- .../third_party/ffmpeg/libavcodec/svq3.c | 5 +- .../third_party/ffmpeg/libavcodec/tak.c | 23 +- .../third_party/ffmpeg/libavcodec/tak.h | 2 - .../third_party/ffmpeg/libavcodec/targa.c | 4 + .../ffmpeg/libavcodec/targa_y216dec.c | 2 +- .../third_party/ffmpeg/libavcodec/tdsc.c | 2 +- .../ffmpeg/libavcodec/tests/avcodec.c | 3 +- .../ffmpeg/libavcodec/threadframe.h | 3 + .../ffmpeg/libavcodec/tiertexseqv.c | 4 + .../third_party/ffmpeg/libavcodec/tiff.c | 5 +- .../third_party/ffmpeg/libavcodec/tmv.c | 6 +- .../ffmpeg/libavcodec/truemotion2.c | 8 +- .../ffmpeg/libavcodec/truemotion2rt.c | 2 +- .../third_party/ffmpeg/libavcodec/tscc.c | 4 + .../third_party/ffmpeg/libavcodec/utils.c | 23 +- .../ffmpeg/libavcodec/utvideodec.c | 5 +- .../third_party/ffmpeg/libavcodec/v210dec.c | 6 +- .../third_party/ffmpeg/libavcodec/v210x.c | 2 +- .../third_party/ffmpeg/libavcodec/v308dec.c | 2 +- .../third_party/ffmpeg/libavcodec/v408dec.c | 2 +- .../third_party/ffmpeg/libavcodec/v410dec.c | 2 +- .../ffmpeg/libavcodec/v4l2_buffers.c | 3 +- .../ffmpeg/libavcodec/vaapi_decode.c | 5 + .../ffmpeg/libavcodec/vaapi_encode_h264.c | 27 +- .../ffmpeg/libavcodec/vaapi_hevc.c | 6 +- .../third_party/ffmpeg/libavcodec/vb.c | 4 + .../third_party/ffmpeg/libavcodec/vble.c | 2 +- .../third_party/ffmpeg/libavcodec/vbndec.c | 2 +- .../third_party/ffmpeg/libavcodec/vc1.c | 11 +- .../third_party/ffmpeg/libavcodec/vc1_mc.c | 18 +- .../ffmpeg/libavcodec/vc1_parser.c | 3 +- .../third_party/ffmpeg/libavcodec/vc1dec.c | 21 +- .../third_party/ffmpeg/libavcodec/vcr1.c | 2 +- .../ffmpeg/libavcodec/vdpau_mpeg12.c | 5 +- .../ffmpeg/libavcodec/vdpau_mpeg4.c | 5 +- .../third_party/ffmpeg/libavcodec/version.h | 4 +- .../ffmpeg/libavcodec/version_major.h | 2 + .../ffmpeg/libavcodec/videotoolbox.c | 16 +- .../ffmpeg/libavcodec/videotoolboxenc.c | 43 +- .../third_party/ffmpeg/libavcodec/vmnc.c | 4 +- .../third_party/ffmpeg/libavcodec/vorbisdec.c | 4 + .../third_party/ffmpeg/libavcodec/vp3.c | 13 +- .../third_party/ffmpeg/libavcodec/vp5.c | 11 +- .../third_party/ffmpeg/libavcodec/vp56.c | 11 +- .../third_party/ffmpeg/libavcodec/vp6.c | 11 +- .../third_party/ffmpeg/libavcodec/vp8.c | 5 +- .../third_party/ffmpeg/libavcodec/vp8data.c | 42 + .../third_party/ffmpeg/libavcodec/vp8data.h | 20 +- .../third_party/ffmpeg/libavcodec/vp9.c | 5 +- .../third_party/ffmpeg/libavcodec/vqavideo.c | 4 + .../third_party/ffmpeg/libavcodec/wavarc.c | 10 +- .../ffmpeg/libavcodec/wavpackenc.c | 2 +- .../third_party/ffmpeg/libavcodec/wbmpdec.c | 2 +- .../third_party/ffmpeg/libavcodec/wcmv.c | 5 +- .../third_party/ffmpeg/libavcodec/webp.c | 2 +- .../ffmpeg/libavcodec/wmalosslessdec.c | 6 +- .../third_party/ffmpeg/libavcodec/wmaprodec.c | 18 +- .../third_party/ffmpeg/libavcodec/wmavoice.c | 6 +- .../third_party/ffmpeg/libavcodec/wnv1.c | 2 +- .../third_party/ffmpeg/libavcodec/x86/cabac.h | 2 +- .../third_party/ffmpeg/libavcodec/xbmdec.c | 2 +- .../third_party/ffmpeg/libavcodec/xl.c | 2 +- .../third_party/ffmpeg/libavcodec/xpmdec.c | 2 +- .../third_party/ffmpeg/libavcodec/xwddec.c | 2 +- .../third_party/ffmpeg/libavcodec/y41pdec.c | 2 +- .../third_party/ffmpeg/libavcodec/ylc.c | 2 +- .../third_party/ffmpeg/libavcodec/yop.c | 4 + .../third_party/ffmpeg/libavcodec/yuv4dec.c | 2 +- .../third_party/ffmpeg/libavcodec/zerocodec.c | 4 +- .../third_party/ffmpeg/libavcodec/zmbv.c | 4 +- .../third_party/ffmpeg/libavutil/frame.c | 142 +- .../third_party/ffmpeg/libavutil/frame.h | 62 +- .../ffmpeg/libavutil/hdr_dynamic_metadata.c | 28 +- .../ffmpeg/libavutil/hdr_dynamic_metadata.h | 14 +- .../ffmpeg/libavutil/hwcontext_qsv.c | 14 +- .../ffmpeg/libavutil/hwcontext_vaapi.c | 78 +- .../third_party/ffmpeg/libavutil/internal.h | 1 - .../ffmpeg/libavutil/mathematics.h | 51 + .../ffmpeg/libavutil/riscv/bswap.h | 52 +- .../ffmpeg/libavutil/riscv/intmath.h | 30 +- .../ffmpeg/libavutil/tests/hwdevice.c | 2 +- .../third_party/ffmpeg/libavutil/tx_priv.h | 14 +- .../third_party/ffmpeg/libavutil/version.h | 5 +- .../ffmpeg/libavutil/wchar_filename.h | 6 +- .../config/Chrome/android/arm-neon/config.h | 1 + .../android/arm-neon/config_components.h | 11 +- .../android/arm-neon/libavutil/ffversion.h | 2 +- .../config/Chrome/android/arm64/config.h | 1 + .../Chrome/android/arm64/config_components.h | 11 +- .../android/arm64/libavutil/ffversion.h | 2 +- .../config/Chrome/android/ia32/config.h | 1 + .../Chrome/android/ia32/config_components.h | 11 +- .../Chrome/android/ia32/libavutil/ffversion.h | 2 +- .../config/Chrome/android/x64/config.asm | 1 + .../config/Chrome/android/x64/config.h | 1 + .../Chrome/android/x64/config_components.h | 11 +- .../Chrome/android/x64/libavutil/ffversion.h | 2 +- .../chromium/config/Chrome/ios/arm64/config.h | 3 +- .../Chrome/ios/arm64/config_components.h | 11 +- .../Chrome/ios/arm64/libavutil/ffversion.h | 2 +- .../chromium/config/Chrome/ios/x64/config.asm | 1 + .../chromium/config/Chrome/ios/x64/config.h | 3 +- .../config/Chrome/ios/x64/config_components.h | 11 +- .../Chrome/ios/x64/libavutil/ffversion.h | 2 +- .../config/Chrome/linux-noasm/x64/config.h | 3 +- .../linux-noasm/x64/config_components.h | 11 +- .../linux-noasm/x64/libavutil/ffversion.h | 2 +- .../config/Chrome/linux/arm-neon/config.h | 3 +- .../Chrome/linux/arm-neon/config_components.h | 11 +- .../linux/arm-neon/libavutil/ffversion.h | 2 +- .../chromium/config/Chrome/linux/arm/config.h | 3 +- .../Chrome/linux/arm/config_components.h | 11 +- .../Chrome/linux/arm/libavutil/ffversion.h | 2 +- .../config/Chrome/linux/arm64/config.h | 3 +- .../Chrome/linux/arm64/config_components.h | 11 +- .../Chrome/linux/arm64/libavutil/ffversion.h | 2 +- .../config/Chrome/linux/ia32/config.asm | 1 + .../config/Chrome/linux/ia32/config.h | 3 +- .../Chrome/linux/ia32/config_components.h | 11 +- .../Chrome/linux/ia32/libavutil/ffversion.h | 2 +- .../config/Chrome/linux/x64/config.asm | 1 + .../chromium/config/Chrome/linux/x64/config.h | 3 +- .../Chrome/linux/x64/config_components.h | 11 +- .../Chrome/linux/x64/libavutil/ffversion.h | 2 +- .../chromium/config/Chrome/mac/arm64/config.h | 3 +- .../Chrome/mac/arm64/config_components.h | 11 +- .../Chrome/mac/arm64/libavutil/ffversion.h | 2 +- .../chromium/config/Chrome/mac/x64/config.asm | 1 + .../chromium/config/Chrome/mac/x64/config.h | 3 +- .../config/Chrome/mac/x64/config_components.h | 11 +- .../Chrome/mac/x64/libavutil/ffversion.h | 2 +- .../chromium/config/Chrome/win/arm64/config.h | 3 +- .../Chrome/win/arm64/config_components.h | 11 +- .../Chrome/win/arm64/libavutil/ffversion.h | 2 +- .../config/Chrome/win/ia32/config.asm | 1 + .../chromium/config/Chrome/win/ia32/config.h | 3 +- .../Chrome/win/ia32/config_components.h | 11 +- .../Chrome/win/ia32/libavutil/ffversion.h | 2 +- .../chromium/config/Chrome/win/x64/config.asm | 1 + .../chromium/config/Chrome/win/x64/config.h | 3 +- .../config/Chrome/win/x64/config_components.h | 11 +- .../Chrome/win/x64/libavutil/ffversion.h | 2 +- .../config/ChromeOS/linux-noasm/x64/config.h | 3 +- .../linux-noasm/x64/config_components.h | 11 +- .../linux-noasm/x64/libavutil/ffversion.h | 2 +- .../config/ChromeOS/linux/arm-neon/config.h | 3 +- .../linux/arm-neon/config_components.h | 11 +- .../linux/arm-neon/libavutil/ffversion.h | 2 +- .../config/ChromeOS/linux/arm/config.h | 3 +- .../ChromeOS/linux/arm/config_components.h | 11 +- .../ChromeOS/linux/arm/libavutil/ffversion.h | 2 +- .../config/ChromeOS/linux/arm64/config.h | 3 +- .../ChromeOS/linux/arm64/config_components.h | 11 +- .../linux/arm64/libavutil/ffversion.h | 2 +- .../config/ChromeOS/linux/ia32/config.asm | 1 + .../config/ChromeOS/linux/ia32/config.h | 3 +- .../ChromeOS/linux/ia32/config_components.h | 11 +- .../ChromeOS/linux/ia32/libavutil/ffversion.h | 2 +- .../config/ChromeOS/linux/x64/config.asm | 1 + .../config/ChromeOS/linux/x64/config.h | 3 +- .../ChromeOS/linux/x64/config_components.h | 11 +- .../ChromeOS/linux/x64/libavutil/ffversion.h | 2 +- .../config/Chromium/android/arm-neon/config.h | 1 + .../android/arm-neon/config_components.h | 11 +- .../android/arm-neon/libavutil/ffversion.h | 2 +- .../config/Chromium/android/arm64/config.h | 1 + .../android/arm64/config_components.h | 11 +- .../android/arm64/libavutil/ffversion.h | 2 +- .../config/Chromium/android/ia32/config.h | 1 + .../Chromium/android/ia32/config_components.h | 11 +- .../android/ia32/libavutil/ffversion.h | 2 +- .../config/Chromium/android/x64/config.asm | 1 + .../config/Chromium/android/x64/config.h | 1 + .../Chromium/android/x64/config_components.h | 11 +- .../android/x64/libavutil/ffversion.h | 2 +- .../config/Chromium/ios/arm64/config.h | 3 +- .../Chromium/ios/arm64/config_components.h | 11 +- .../Chromium/ios/arm64/libavutil/ffversion.h | 2 +- .../config/Chromium/ios/x64/config.asm | 1 + .../chromium/config/Chromium/ios/x64/config.h | 3 +- .../Chromium/ios/x64/config_components.h | 11 +- .../Chromium/ios/x64/libavutil/ffversion.h | 2 +- .../config/Chromium/linux-noasm/x64/config.h | 3 +- .../linux-noasm/x64/config_components.h | 11 +- .../linux-noasm/x64/libavutil/ffversion.h | 2 +- .../config/Chromium/linux/arm-neon/config.h | 3 +- .../linux/arm-neon/config_components.h | 11 +- .../linux/arm-neon/libavutil/ffversion.h | 2 +- .../config/Chromium/linux/arm/config.h | 3 +- .../Chromium/linux/arm/config_components.h | 11 +- .../Chromium/linux/arm/libavutil/ffversion.h | 2 +- .../config/Chromium/linux/arm64/config.h | 3 +- .../Chromium/linux/arm64/config_components.h | 11 +- .../linux/arm64/libavutil/ffversion.h | 2 +- .../config/Chromium/linux/ia32/config.asm | 1 + .../config/Chromium/linux/ia32/config.h | 3 +- .../Chromium/linux/ia32/config_components.h | 11 +- .../Chromium/linux/ia32/libavutil/ffversion.h | 2 +- .../config/Chromium/linux/x64/config.asm | 1 + .../config/Chromium/linux/x64/config.h | 3 +- .../Chromium/linux/x64/config_components.h | 11 +- .../Chromium/linux/x64/libavutil/ffversion.h | 2 +- .../config/Chromium/mac/arm64/config.h | 3 +- .../Chromium/mac/arm64/config_components.h | 11 +- .../Chromium/mac/arm64/libavutil/ffversion.h | 2 +- .../config/Chromium/mac/x64/config.asm | 1 + .../chromium/config/Chromium/mac/x64/config.h | 3 +- .../Chromium/mac/x64/config_components.h | 11 +- .../Chromium/mac/x64/libavutil/ffversion.h | 2 +- .../config/Chromium/win/arm64/config.h | 3 +- .../Chromium/win/arm64/config_components.h | 11 +- .../Chromium/win/arm64/libavutil/ffversion.h | 2 +- .../config/Chromium/win/ia32/config.asm | 1 + .../config/Chromium/win/ia32/config.h | 3 +- .../Chromium/win/ia32/config_components.h | 11 +- .../Chromium/win/ia32/libavutil/ffversion.h | 2 +- .../config/Chromium/win/x64/config.asm | 1 + .../chromium/config/Chromium/win/x64/config.h | 3 +- .../Chromium/win/x64/config_components.h | 11 +- .../Chromium/win/x64/libavutil/ffversion.h | 2 +- .../ffmpeg/chromium/patches/README | 15 + .../chromium/patches/config_flag_changes.txt | 45 +- .../ffmpeg/chromium/scripts/build_ffmpeg.py | 20 +- .../ffmpeg/chromium/scripts/generate_gn.py | 6 +- .../third_party/ffmpeg/ffmpeg_generated.gni | 34 +- .../third_party/ffmpeg/libavcodec/012v.c | 2 +- arm/raspi/third_party/ffmpeg/libavcodec/4xm.c | 5 +- .../third_party/ffmpeg/libavcodec/8bps.c | 13 +- .../third_party/ffmpeg/libavcodec/Makefile | 16 +- .../third_party/ffmpeg/libavcodec/aacpsy.c | 2 +- .../ffmpeg/libavcodec/aarch64/Makefile | 3 +- .../libavcodec/aarch64/hevcdsp_deblock_neon.S | 183 +++ .../libavcodec/aarch64/hevcdsp_idct_neon.S | 337 +++- .../libavcodec/aarch64/hevcdsp_init_aarch64.c | 25 + .../third_party/ffmpeg/libavcodec/adpcm.c | 4 +- arm/raspi/third_party/ffmpeg/libavcodec/agm.c | 7 +- arm/raspi/third_party/ffmpeg/libavcodec/aic.c | 2 +- .../ffmpeg/libavcodec/aliaspixdec.c | 2 +- .../third_party/ffmpeg/libavcodec/allcodecs.c | 6 +- .../third_party/ffmpeg/libavcodec/alsdec.c | 6 +- .../ffmpeg/libavcodec/amfenc_av1.c | 8 +- .../ffmpeg/libavcodec/amfenc_h264.c | 8 +- .../ffmpeg/libavcodec/amfenc_hevc.c | 8 +- .../third_party/ffmpeg/libavcodec/ansi.c | 8 + .../third_party/ffmpeg/libavcodec/apac.c | 6 +- .../third_party/ffmpeg/libavcodec/apedec.c | 34 +- .../third_party/ffmpeg/libavcodec/arbc.c | 5 +- .../third_party/ffmpeg/libavcodec/argo.c | 5 +- .../third_party/ffmpeg/libavcodec/asvdec.c | 2 +- .../third_party/ffmpeg/libavcodec/atrac3.c | 12 +- .../third_party/ffmpeg/libavcodec/atrac9dec.c | 6 +- .../third_party/ffmpeg/libavcodec/av1_parse.c | 24 +- .../third_party/ffmpeg/libavcodec/av1_parse.h | 6 +- .../ffmpeg/libavcodec/av1_parser.c | 11 +- .../third_party/ffmpeg/libavcodec/av1dec.c | 19 +- .../third_party/ffmpeg/libavcodec/avcodec.c | 5 +- .../third_party/ffmpeg/libavcodec/avcodec.h | 15 +- .../third_party/ffmpeg/libavcodec/avrndec.c | 2 +- arm/raspi/third_party/ffmpeg/libavcodec/avs.c | 4 +- .../third_party/ffmpeg/libavcodec/avuidec.c | 2 +- .../ffmpeg/libavcodec/bethsoftvideo.c | 4 + arm/raspi/third_party/ffmpeg/libavcodec/bfi.c | 12 +- .../third_party/ffmpeg/libavcodec/bintext.c | 4 + .../ffmpeg/libavcodec/bitpacked_dec.c | 2 +- arm/raspi/third_party/ffmpeg/libavcodec/bmp.c | 2 +- .../third_party/ffmpeg/libavcodec/bmvvideo.c | 4 + .../third_party/ffmpeg/libavcodec/bonk.c | 27 +- .../ffmpeg/libavcodec/brenderpix.c | 10 +- .../ffmpeg/libavcodec/bytestream.h | 10 +- arm/raspi/third_party/ffmpeg/libavcodec/c93.c | 8 +- .../ffmpeg/libavcodec/cavs_parser.c | 11 +- .../third_party/ffmpeg/libavcodec/cavsdec.c | 3 + .../third_party/ffmpeg/libavcodec/cbs_av1.c | 7 + .../third_party/ffmpeg/libavcodec/cbs_av1.h | 7 + .../libavcodec/cbs_av1_syntax_template.c | 38 +- .../ffmpeg/libavcodec/ccaption_dec.c | 9 +- .../ffmpeg/libavcodec/cdgraphics.c | 4 + .../third_party/ffmpeg/libavcodec/cdtoons.c | 4 + .../third_party/ffmpeg/libavcodec/cdxl.c | 2 +- .../third_party/ffmpeg/libavcodec/cfhd.c | 6 +- .../third_party/ffmpeg/libavcodec/cinepak.c | 13 +- .../ffmpeg/libavcodec/clearvideo.c | 4 +- .../third_party/ffmpeg/libavcodec/cljrdec.c | 2 +- .../third_party/ffmpeg/libavcodec/cllc.c | 2 +- .../third_party/ffmpeg/libavcodec/codec.h | 3 + .../ffmpeg/libavcodec/codec_desc.c | 23 +- .../ffmpeg/libavcodec/codec_desc.h | 6 + .../third_party/ffmpeg/libavcodec/codec_id.h | 1 + .../third_party/ffmpeg/libavcodec/codec_par.c | 3 + .../third_party/ffmpeg/libavcodec/codec_par.h | 12 + .../third_party/ffmpeg/libavcodec/cpia.c | 4 +- arm/raspi/third_party/ffmpeg/libavcodec/cri.c | 2 +- .../third_party/ffmpeg/libavcodec/crystalhd.c | 4 +- .../third_party/ffmpeg/libavcodec/cscd.c | 4 +- .../third_party/ffmpeg/libavcodec/cuviddec.c | 12 +- arm/raspi/third_party/ffmpeg/libavcodec/dds.c | 10 +- .../third_party/ffmpeg/libavcodec/decode.c | 20 +- arm/raspi/third_party/ffmpeg/libavcodec/dfa.c | 4 + .../third_party/ffmpeg/libavcodec/diracdec.c | 5 +- .../third_party/ffmpeg/libavcodec/dnxhddec.c | 17 +- .../third_party/ffmpeg/libavcodec/dnxhdenc.c | 3 +- .../third_party/ffmpeg/libavcodec/dpcm.c | 2 +- arm/raspi/third_party/ffmpeg/libavcodec/dpx.c | 35 +- .../ffmpeg/libavcodec/dsicinvideo.c | 4 + arm/raspi/third_party/ffmpeg/libavcodec/dv.h | 6 + .../third_party/ffmpeg/libavcodec/dvdec.c | 14 +- .../third_party/ffmpeg/libavcodec/dvenc.c | 8 +- arm/raspi/third_party/ffmpeg/libavcodec/dxa.c | 14 +- .../third_party/ffmpeg/libavcodec/dxtory.c | 2 +- arm/raspi/third_party/ffmpeg/libavcodec/dxv.c | 2 +- .../third_party/ffmpeg/libavcodec/eacmv.c | 4 +- .../third_party/ffmpeg/libavcodec/eatgq.c | 2 +- .../third_party/ffmpeg/libavcodec/eatgv.c | 4 +- .../third_party/ffmpeg/libavcodec/elbg.c | 56 +- .../third_party/ffmpeg/libavcodec/encode.c | 26 +- .../ffmpeg/libavcodec/error_resilience.c | 9 +- .../ffmpeg/libavcodec/error_resilience.h | 1 - .../third_party/ffmpeg/libavcodec/escape124.c | 2 +- arm/raspi/third_party/ffmpeg/libavcodec/exr.c | 18 +- .../third_party/ffmpeg/libavcodec/ffv1dec.c | 33 +- .../third_party/ffmpeg/libavcodec/ffv1enc.c | 4 +- arm/raspi/third_party/ffmpeg/libavcodec/fic.c | 4 +- .../third_party/ffmpeg/libavcodec/fitsdec.c | 3 +- .../third_party/ffmpeg/libavcodec/fitsenc.c | 1 + .../third_party/ffmpeg/libavcodec/flacdec.c | 2 +- .../third_party/ffmpeg/libavcodec/flicvideo.c | 4 + .../third_party/ffmpeg/libavcodec/fmvc.c | 4 +- .../third_party/ffmpeg/libavcodec/fraps.c | 2 +- .../third_party/ffmpeg/libavcodec/frwu.c | 2 +- arm/raspi/third_party/ffmpeg/libavcodec/ftr.c | 6 +- .../third_party/ffmpeg/libavcodec/g2meet.c | 24 +- .../third_party/ffmpeg/libavcodec/g723_1dec.c | 6 +- .../third_party/ffmpeg/libavcodec/g729dec.c | 12 +- .../ffmpeg/libavcodec/g729postfilter.c | 2 +- .../third_party/ffmpeg/libavcodec/gemdec.c | 6 +- .../ffmpeg/libavcodec/gif_parser.c | 34 +- .../third_party/ffmpeg/libavcodec/gifdec.c | 4 +- .../third_party/ffmpeg/libavcodec/h261dec.c | 5 +- .../ffmpeg/libavcodec/h264_parser.c | 4 +- .../ffmpeg/libavcodec/h264_picture.c | 3 +- .../ffmpeg/libavcodec/h264_slice.c | 53 +- .../third_party/ffmpeg/libavcodec/h264dec.c | 8 +- .../third_party/ffmpeg/libavcodec/hapdec.c | 2 +- .../third_party/ffmpeg/libavcodec/hdrdec.c | 2 +- .../third_party/ffmpeg/libavcodec/hevc_ps.c | 148 +- .../third_party/ffmpeg/libavcodec/hevc_ps.h | 48 +- .../third_party/ffmpeg/libavcodec/hevc_refs.c | 7 +- .../third_party/ffmpeg/libavcodec/hevcdec.c | 23 +- .../third_party/ffmpeg/libavcodec/hnm4video.c | 4 +- .../third_party/ffmpeg/libavcodec/hq_hqa.c | 2 +- arm/raspi/third_party/ffmpeg/libavcodec/hqx.c | 2 +- .../ffmpeg/libavcodec/huffyuvdec.c | 4 +- .../ffmpeg/libavcodec/idcinvideo.c | 9 +- arm/raspi/third_party/ffmpeg/libavcodec/iff.c | 4 +- .../third_party/ffmpeg/libavcodec/imm4.c | 10 +- arm/raspi/third_party/ffmpeg/libavcodec/imx.c | 18 +- .../third_party/ffmpeg/libavcodec/internal.h | 2 - .../ffmpeg/libavcodec/interplayacm.c | 8 +- .../ffmpeg/libavcodec/interplayvideo.c | 9 +- .../ffmpeg/libavcodec/ituh263enc.c | 5 + .../third_party/ffmpeg/libavcodec/j2kenc.c | 83 +- .../third_party/ffmpeg/libavcodec/jpeg2000.h | 5 +- .../ffmpeg/libavcodec/jpeg2000dec.c | 160 +- .../ffmpeg/libavcodec/jpeg2000dec.h | 119 ++ .../ffmpeg/libavcodec/jpeg2000htdec.c | 1451 +++++++++++++++++ .../ffmpeg/libavcodec/jpeg2000htdec.h | 34 + .../third_party/ffmpeg/libavcodec/jvdec.c | 10 +- .../third_party/ffmpeg/libavcodec/kmvc.c | 21 +- .../third_party/ffmpeg/libavcodec/lagarith.c | 2 +- .../third_party/ffmpeg/libavcodec/lcldec.c | 39 +- .../third_party/ffmpeg/libavcodec/libaomdec.c | 5 +- .../third_party/ffmpeg/libavcodec/libaomenc.c | 14 +- .../third_party/ffmpeg/libavcodec/libdav1d.c | 76 +- .../ffmpeg/libavcodec/libfdk-aacenc.c | 51 + .../third_party/ffmpeg/libavcodec/libjxldec.c | 2 +- .../third_party/ffmpeg/libavcodec/libjxlenc.c | 4 +- .../ffmpeg/libavcodec/libkvazaar.c | 13 +- .../ffmpeg/libavcodec/libmp3lame.c | 16 +- .../ffmpeg/libavcodec/libopenh264enc.c | 23 +- .../third_party/ffmpeg/libavcodec/librav1e.c | 9 +- .../ffmpeg/libavcodec/librsvgdec.c | 2 +- .../ffmpeg/libavcodec/libspeexdec.c | 6 +- .../third_party/ffmpeg/libavcodec/libsvtav1.c | 12 +- .../third_party/ffmpeg/libavcodec/libuavs3d.c | 5 +- .../third_party/ffmpeg/libavcodec/libvpxenc.c | 21 +- .../third_party/ffmpeg/libavcodec/libx264.c | 40 +- .../third_party/ffmpeg/libavcodec/libx265.c | 8 +- .../third_party/ffmpeg/libavcodec/loco.c | 2 +- .../third_party/ffmpeg/libavcodec/lscrdec.c | 13 +- .../third_party/ffmpeg/libavcodec/m101.c | 14 +- .../third_party/ffmpeg/libavcodec/magicyuv.c | 2 +- .../third_party/ffmpeg/libavcodec/mdec.c | 2 +- .../third_party/ffmpeg/libavcodec/me_cmp.c | 9 +- .../third_party/ffmpeg/libavcodec/me_cmp.h | 2 +- .../ffmpeg/libavcodec/mediacodec_wrapper.c | 98 ++ .../ffmpeg/libavcodec/mediacodecenc.c | 236 +++ .../third_party/ffmpeg/libavcodec/mfenc.c | 4 + .../third_party/ffmpeg/libavcodec/midivid.c | 5 +- .../third_party/ffmpeg/libavcodec/misc4.c | 5 +- .../third_party/ffmpeg/libavcodec/mjpegdec.c | 110 +- .../third_party/ffmpeg/libavcodec/mmaldec.c | 6 +- .../third_party/ffmpeg/libavcodec/mobiclip.c | 4 +- .../ffmpeg/libavcodec/motion_est.c | 11 +- .../third_party/ffmpeg/libavcodec/mpeg12dec.c | 20 +- .../third_party/ffmpeg/libavcodec/mpeg12enc.c | 4 +- .../ffmpeg/libavcodec/mpeg4videoenc.c | 2 +- .../ffmpeg/libavcodec/mpegvideo_dec.c | 19 +- .../ffmpeg/libavcodec/mpegvideo_enc.c | 29 +- .../ffmpeg/libavcodec/mpegvideo_parser.c | 10 +- .../third_party/ffmpeg/libavcodec/mscc.c | 6 +- .../ffmpeg/libavcodec/msmpeg4enc.c | 14 +- .../third_party/ffmpeg/libavcodec/msp2dec.c | 2 +- .../third_party/ffmpeg/libavcodec/msrle.c | 9 +- .../third_party/ffmpeg/libavcodec/mss1.c | 8 +- .../third_party/ffmpeg/libavcodec/mss2.c | 5 +- .../third_party/ffmpeg/libavcodec/mss3.c | 5 +- .../third_party/ffmpeg/libavcodec/mss4.c | 5 +- .../third_party/ffmpeg/libavcodec/msvideo1.c | 9 +- .../ffmpeg/libavcodec/msvideo1enc.c | 2 + .../third_party/ffmpeg/libavcodec/mv30.c | 6 +- .../third_party/ffmpeg/libavcodec/mvcdec.c | 2 +- .../third_party/ffmpeg/libavcodec/mvha.c | 2 +- .../third_party/ffmpeg/libavcodec/mwsc.c | 9 +- .../third_party/ffmpeg/libavcodec/mxpegdec.c | 4 +- .../third_party/ffmpeg/libavcodec/notchlc.c | 2 +- arm/raspi/third_party/ffmpeg/libavcodec/nuv.c | 5 +- .../ffmpeg/libavcodec/nvdec_mpeg12.c | 5 +- .../ffmpeg/libavcodec/nvdec_mpeg4.c | 5 +- .../third_party/ffmpeg/libavcodec/nvenc.c | 19 +- .../ffmpeg/libavcodec/options_table.h | 4 +- .../third_party/ffmpeg/libavcodec/pafvideo.c | 8 +- .../third_party/ffmpeg/libavcodec/parser.c | 4 + .../ffmpeg/libavcodec/pcm_rechunk_bsf.c | 4 +- .../third_party/ffmpeg/libavcodec/pdvdec.c | 141 ++ .../third_party/ffmpeg/libavcodec/pgxdec.c | 2 +- .../third_party/ffmpeg/libavcodec/photocd.c | 2 +- .../third_party/ffmpeg/libavcodec/pictordec.c | 4 + .../third_party/ffmpeg/libavcodec/pixlet.c | 2 +- .../third_party/ffmpeg/libavcodec/pngdec.c | 63 +- .../third_party/ffmpeg/libavcodec/pngenc.c | 6 + .../third_party/ffmpeg/libavcodec/pnmdec.c | 2 +- .../ffmpeg/libavcodec/proresdec2.c | 9 +- .../ffmpeg/libavcodec/proresenc_anatoliy.c | 3 +- .../ffmpeg/libavcodec/proresenc_kostya.c | 6 +- .../third_party/ffmpeg/libavcodec/prosumer.c | 2 +- arm/raspi/third_party/ffmpeg/libavcodec/psd.c | 4 + .../ffmpeg/libavcodec/pthread_frame.c | 4 + .../third_party/ffmpeg/libavcodec/qdrw.c | 6 +- .../third_party/ffmpeg/libavcodec/qoidec.c | 2 +- .../third_party/ffmpeg/libavcodec/qpeg.c | 14 +- .../ffmpeg/libavcodec/qsv_internal.h | 5 +- .../third_party/ffmpeg/libavcodec/qsvdec.c | 14 +- .../third_party/ffmpeg/libavcodec/qsvenc.c | 6 +- .../third_party/ffmpeg/libavcodec/qtrle.c | 9 +- .../third_party/ffmpeg/libavcodec/r210dec.c | 2 +- .../third_party/ffmpeg/libavcodec/rasc.c | 5 +- .../ffmpeg/libavcodec/ratecontrol.c | 11 +- .../third_party/ffmpeg/libavcodec/rawdec.c | 19 +- arm/raspi/third_party/ffmpeg/libavcodec/rka.c | 2 +- .../third_party/ffmpeg/libavcodec/rkmppdec.c | 6 +- .../third_party/ffmpeg/libavcodec/rscc.c | 11 +- .../third_party/ffmpeg/libavcodec/rv34.c | 2 + .../third_party/ffmpeg/libavcodec/sanm.c | 4 +- .../third_party/ffmpeg/libavcodec/scpr.c | 12 +- .../ffmpeg/libavcodec/screenpresso.c | 2 +- arm/raspi/third_party/ffmpeg/libavcodec/sga.c | 6 +- .../third_party/ffmpeg/libavcodec/sgidec.c | 2 +- .../third_party/ffmpeg/libavcodec/sgirledec.c | 2 +- .../ffmpeg/libavcodec/sheervideo.c | 2 +- .../third_party/ffmpeg/libavcodec/shorten.c | 6 +- .../third_party/ffmpeg/libavcodec/smacker.c | 34 +- arm/raspi/third_party/ffmpeg/libavcodec/smc.c | 9 +- .../third_party/ffmpeg/libavcodec/snow.c | 7 +- .../third_party/ffmpeg/libavcodec/snowenc.c | 10 +- .../third_party/ffmpeg/libavcodec/sonic.c | 4 +- .../ffmpeg/libavcodec/speedhqdec.c | 2 +- .../third_party/ffmpeg/libavcodec/svq3.c | 5 +- arm/raspi/third_party/ffmpeg/libavcodec/tak.c | 23 +- arm/raspi/third_party/ffmpeg/libavcodec/tak.h | 2 - .../third_party/ffmpeg/libavcodec/targa.c | 4 + .../ffmpeg/libavcodec/targa_y216dec.c | 2 +- .../third_party/ffmpeg/libavcodec/tdsc.c | 2 +- .../ffmpeg/libavcodec/tests/avcodec.c | 3 +- .../ffmpeg/libavcodec/threadframe.h | 3 + .../ffmpeg/libavcodec/tiertexseqv.c | 4 + .../third_party/ffmpeg/libavcodec/tiff.c | 5 +- arm/raspi/third_party/ffmpeg/libavcodec/tmv.c | 6 +- .../ffmpeg/libavcodec/truemotion2.c | 8 +- .../ffmpeg/libavcodec/truemotion2rt.c | 2 +- .../third_party/ffmpeg/libavcodec/tscc.c | 4 + .../third_party/ffmpeg/libavcodec/utils.c | 23 +- .../ffmpeg/libavcodec/utvideodec.c | 5 +- .../third_party/ffmpeg/libavcodec/v210dec.c | 6 +- .../third_party/ffmpeg/libavcodec/v210x.c | 2 +- .../third_party/ffmpeg/libavcodec/v308dec.c | 2 +- .../third_party/ffmpeg/libavcodec/v408dec.c | 2 +- .../third_party/ffmpeg/libavcodec/v410dec.c | 2 +- .../ffmpeg/libavcodec/v4l2_buffers.c | 3 +- .../ffmpeg/libavcodec/vaapi_decode.c | 5 + .../ffmpeg/libavcodec/vaapi_encode_h264.c | 27 +- .../ffmpeg/libavcodec/vaapi_hevc.c | 6 +- arm/raspi/third_party/ffmpeg/libavcodec/vb.c | 4 + .../third_party/ffmpeg/libavcodec/vble.c | 2 +- .../third_party/ffmpeg/libavcodec/vbndec.c | 2 +- arm/raspi/third_party/ffmpeg/libavcodec/vc1.c | 11 +- .../third_party/ffmpeg/libavcodec/vc1_mc.c | 18 +- .../ffmpeg/libavcodec/vc1_parser.c | 3 +- .../third_party/ffmpeg/libavcodec/vc1dec.c | 21 +- .../third_party/ffmpeg/libavcodec/vcr1.c | 2 +- .../ffmpeg/libavcodec/vdpau_mpeg12.c | 5 +- .../ffmpeg/libavcodec/vdpau_mpeg4.c | 5 +- .../third_party/ffmpeg/libavcodec/version.h | 4 +- .../ffmpeg/libavcodec/version_major.h | 2 + .../ffmpeg/libavcodec/videotoolbox.c | 16 +- .../ffmpeg/libavcodec/videotoolboxenc.c | 43 +- .../third_party/ffmpeg/libavcodec/vmnc.c | 4 +- .../third_party/ffmpeg/libavcodec/vorbisdec.c | 4 + arm/raspi/third_party/ffmpeg/libavcodec/vp3.c | 13 +- arm/raspi/third_party/ffmpeg/libavcodec/vp5.c | 11 +- .../third_party/ffmpeg/libavcodec/vp56.c | 11 +- arm/raspi/third_party/ffmpeg/libavcodec/vp6.c | 11 +- arm/raspi/third_party/ffmpeg/libavcodec/vp8.c | 5 +- .../third_party/ffmpeg/libavcodec/vp8data.c | 42 + .../third_party/ffmpeg/libavcodec/vp8data.h | 20 +- arm/raspi/third_party/ffmpeg/libavcodec/vp9.c | 5 +- .../third_party/ffmpeg/libavcodec/vqavideo.c | 4 + .../third_party/ffmpeg/libavcodec/wavarc.c | 10 +- .../ffmpeg/libavcodec/wavpackenc.c | 2 +- .../third_party/ffmpeg/libavcodec/wbmpdec.c | 2 +- .../third_party/ffmpeg/libavcodec/wcmv.c | 5 +- .../third_party/ffmpeg/libavcodec/webp.c | 2 +- .../ffmpeg/libavcodec/wmalosslessdec.c | 6 +- .../third_party/ffmpeg/libavcodec/wmaprodec.c | 18 +- .../third_party/ffmpeg/libavcodec/wmavoice.c | 6 +- .../third_party/ffmpeg/libavcodec/wnv1.c | 2 +- .../third_party/ffmpeg/libavcodec/x86/cabac.h | 2 +- .../third_party/ffmpeg/libavcodec/xbmdec.c | 2 +- arm/raspi/third_party/ffmpeg/libavcodec/xl.c | 2 +- .../third_party/ffmpeg/libavcodec/xpmdec.c | 2 +- .../third_party/ffmpeg/libavcodec/xwddec.c | 2 +- .../third_party/ffmpeg/libavcodec/y41pdec.c | 2 +- arm/raspi/third_party/ffmpeg/libavcodec/ylc.c | 2 +- arm/raspi/third_party/ffmpeg/libavcodec/yop.c | 4 + .../third_party/ffmpeg/libavcodec/yuv4dec.c | 2 +- .../third_party/ffmpeg/libavcodec/zerocodec.c | 4 +- .../third_party/ffmpeg/libavcodec/zmbv.c | 4 +- .../third_party/ffmpeg/libavutil/frame.c | 142 +- .../third_party/ffmpeg/libavutil/frame.h | 62 +- .../ffmpeg/libavutil/hdr_dynamic_metadata.c | 28 +- .../ffmpeg/libavutil/hdr_dynamic_metadata.h | 14 +- .../ffmpeg/libavutil/hwcontext_qsv.c | 14 +- .../ffmpeg/libavutil/hwcontext_vaapi.c | 78 +- .../third_party/ffmpeg/libavutil/internal.h | 1 - .../ffmpeg/libavutil/mathematics.h | 51 + .../ffmpeg/libavutil/riscv/bswap.h | 52 +- .../ffmpeg/libavutil/riscv/intmath.h | 30 +- .../ffmpeg/libavutil/tests/hwdevice.c | 2 +- .../third_party/ffmpeg/libavutil/tx_priv.h | 14 +- .../third_party/ffmpeg/libavutil/version.h | 5 +- .../ffmpeg/libavutil/wchar_filename.h | 6 +- other/add-hevc-ffmpeg-decoder-parser.js | 1 + other/add-hevc-ffmpeg-decoder-parser.patch | 415 ++--- .../config/Chrome/android/arm-neon/config.h | 1 + .../android/arm-neon/config_components.h | 11 +- .../android/arm-neon/libavutil/ffversion.h | 2 +- .../config/Chrome/android/arm64/config.h | 1 + .../Chrome/android/arm64/config_components.h | 11 +- .../android/arm64/libavutil/ffversion.h | 2 +- .../config/Chrome/android/ia32/config.h | 1 + .../Chrome/android/ia32/config_components.h | 11 +- .../Chrome/android/ia32/libavutil/ffversion.h | 2 +- .../config/Chrome/android/x64/config.asm | 1 + .../config/Chrome/android/x64/config.h | 1 + .../Chrome/android/x64/config_components.h | 11 +- .../Chrome/android/x64/libavutil/ffversion.h | 2 +- .../chromium/config/Chrome/ios/arm64/config.h | 3 +- .../Chrome/ios/arm64/config_components.h | 11 +- .../Chrome/ios/arm64/libavutil/ffversion.h | 2 +- .../chromium/config/Chrome/ios/x64/config.asm | 1 + .../chromium/config/Chrome/ios/x64/config.h | 3 +- .../config/Chrome/ios/x64/config_components.h | 11 +- .../Chrome/ios/x64/libavutil/ffversion.h | 2 +- .../config/Chrome/linux-noasm/x64/config.h | 3 +- .../linux-noasm/x64/config_components.h | 11 +- .../linux-noasm/x64/libavutil/ffversion.h | 2 +- .../config/Chrome/linux/arm-neon/config.h | 3 +- .../Chrome/linux/arm-neon/config_components.h | 11 +- .../linux/arm-neon/libavutil/ffversion.h | 2 +- .../chromium/config/Chrome/linux/arm/config.h | 3 +- .../Chrome/linux/arm/config_components.h | 11 +- .../Chrome/linux/arm/libavutil/ffversion.h | 2 +- .../config/Chrome/linux/arm64/config.h | 3 +- .../Chrome/linux/arm64/config_components.h | 11 +- .../Chrome/linux/arm64/libavutil/ffversion.h | 2 +- .../config/Chrome/linux/ia32/config.asm | 1 + .../config/Chrome/linux/ia32/config.h | 3 +- .../Chrome/linux/ia32/config_components.h | 11 +- .../Chrome/linux/ia32/libavutil/ffversion.h | 2 +- .../config/Chrome/linux/x64/config.asm | 1 + .../chromium/config/Chrome/linux/x64/config.h | 3 +- .../Chrome/linux/x64/config_components.h | 11 +- .../Chrome/linux/x64/libavutil/ffversion.h | 2 +- .../chromium/config/Chrome/mac/arm64/config.h | 3 +- .../Chrome/mac/arm64/config_components.h | 11 +- .../Chrome/mac/arm64/libavutil/ffversion.h | 2 +- .../chromium/config/Chrome/mac/x64/config.asm | 1 + .../chromium/config/Chrome/mac/x64/config.h | 3 +- .../config/Chrome/mac/x64/config_components.h | 11 +- .../Chrome/mac/x64/libavutil/ffversion.h | 2 +- .../config/Chrome/win-msvc/x64/config.asm | 4 +- .../config/Chrome/win-msvc/x64/config.h | 2 +- .../win-msvc/x64/libavcodec/codec_list.c | 3 - .../win-msvc/x64/libavcodec/parser_list.c | 1 - .../win-msvc/x64/libavformat/demuxer_list.c | 2 - .../chromium/config/Chrome/win/arm64/config.h | 3 +- .../Chrome/win/arm64/config_components.h | 11 +- .../Chrome/win/arm64/libavutil/ffversion.h | 2 +- .../config/Chrome/win/ia32/config.asm | 1 + .../chromium/config/Chrome/win/ia32/config.h | 3 +- .../Chrome/win/ia32/config_components.h | 11 +- .../Chrome/win/ia32/libavutil/ffversion.h | 2 +- .../chromium/config/Chrome/win/x64/config.asm | 1 + .../chromium/config/Chrome/win/x64/config.h | 3 +- .../config/Chrome/win/x64/config_components.h | 11 +- .../Chrome/win/x64/libavutil/ffversion.h | 2 +- .../config/ChromeOS/linux-noasm/x64/config.h | 3 +- .../linux-noasm/x64/config_components.h | 11 +- .../linux-noasm/x64/libavutil/ffversion.h | 2 +- .../config/ChromeOS/linux/arm-neon/config.h | 3 +- .../linux/arm-neon/config_components.h | 11 +- .../linux/arm-neon/libavutil/ffversion.h | 2 +- .../config/ChromeOS/linux/arm/config.h | 3 +- .../ChromeOS/linux/arm/config_components.h | 11 +- .../ChromeOS/linux/arm/libavutil/ffversion.h | 2 +- .../config/ChromeOS/linux/arm64/config.h | 3 +- .../ChromeOS/linux/arm64/config_components.h | 11 +- .../linux/arm64/libavutil/ffversion.h | 2 +- .../config/ChromeOS/linux/ia32/config.asm | 1 + .../config/ChromeOS/linux/ia32/config.h | 3 +- .../ChromeOS/linux/ia32/config_components.h | 11 +- .../ChromeOS/linux/ia32/libavutil/ffversion.h | 2 +- .../config/ChromeOS/linux/x64/config.asm | 1 + .../config/ChromeOS/linux/x64/config.h | 3 +- .../ChromeOS/linux/x64/config_components.h | 11 +- .../ChromeOS/linux/x64/libavutil/ffversion.h | 2 +- .../config/Chromium/android/arm-neon/config.h | 1 + .../android/arm-neon/config_components.h | 11 +- .../android/arm-neon/libavutil/ffversion.h | 2 +- .../config/Chromium/android/arm64/config.h | 1 + .../android/arm64/config_components.h | 11 +- .../android/arm64/libavutil/ffversion.h | 2 +- .../config/Chromium/android/ia32/config.h | 1 + .../Chromium/android/ia32/config_components.h | 11 +- .../android/ia32/libavutil/ffversion.h | 2 +- .../config/Chromium/android/x64/config.asm | 1 + .../config/Chromium/android/x64/config.h | 1 + .../Chromium/android/x64/config_components.h | 11 +- .../android/x64/libavutil/ffversion.h | 2 +- .../config/Chromium/ios/arm64/config.h | 3 +- .../Chromium/ios/arm64/config_components.h | 11 +- .../Chromium/ios/arm64/libavutil/ffversion.h | 2 +- .../config/Chromium/ios/x64/config.asm | 1 + .../chromium/config/Chromium/ios/x64/config.h | 3 +- .../Chromium/ios/x64/config_components.h | 11 +- .../Chromium/ios/x64/libavutil/ffversion.h | 2 +- .../config/Chromium/linux-noasm/x64/config.h | 3 +- .../linux-noasm/x64/config_components.h | 11 +- .../linux-noasm/x64/libavutil/ffversion.h | 2 +- .../config/Chromium/linux/arm-neon/config.h | 3 +- .../linux/arm-neon/config_components.h | 11 +- .../linux/arm-neon/libavutil/ffversion.h | 2 +- .../config/Chromium/linux/arm/config.h | 3 +- .../Chromium/linux/arm/config_components.h | 11 +- .../Chromium/linux/arm/libavutil/ffversion.h | 2 +- .../config/Chromium/linux/arm64/config.h | 3 +- .../Chromium/linux/arm64/config_components.h | 11 +- .../linux/arm64/libavutil/ffversion.h | 2 +- .../config/Chromium/linux/ia32/config.asm | 1 + .../config/Chromium/linux/ia32/config.h | 3 +- .../Chromium/linux/ia32/config_components.h | 11 +- .../Chromium/linux/ia32/libavutil/ffversion.h | 2 +- .../config/Chromium/linux/x64/config.asm | 1 + .../config/Chromium/linux/x64/config.h | 3 +- .../Chromium/linux/x64/config_components.h | 11 +- .../Chromium/linux/x64/libavutil/ffversion.h | 2 +- .../config/Chromium/mac/arm64/config.h | 3 +- .../Chromium/mac/arm64/config_components.h | 11 +- .../Chromium/mac/arm64/libavutil/ffversion.h | 2 +- .../config/Chromium/mac/x64/config.asm | 1 + .../chromium/config/Chromium/mac/x64/config.h | 3 +- .../Chromium/mac/x64/config_components.h | 11 +- .../Chromium/mac/x64/libavutil/ffversion.h | 2 +- .../config/Chromium/win/arm64/config.h | 3 +- .../Chromium/win/arm64/config_components.h | 11 +- .../Chromium/win/arm64/libavutil/ffversion.h | 2 +- .../config/Chromium/win/ia32/config.asm | 1 + .../config/Chromium/win/ia32/config.h | 3 +- .../Chromium/win/ia32/config_components.h | 11 +- .../Chromium/win/ia32/libavutil/ffversion.h | 2 +- .../config/Chromium/win/x64/config.asm | 1 + .../chromium/config/Chromium/win/x64/config.h | 3 +- .../Chromium/win/x64/config_components.h | 11 +- .../Chromium/win/x64/libavutil/ffversion.h | 2 +- .../ffmpeg/chromium/patches/README | 15 + .../chromium/patches/config_flag_changes.txt | 45 +- .../ffmpeg/chromium/scripts/build_ffmpeg.py | 8 - .../ffmpeg/chromium/scripts/generate_gn.py | 6 +- src/third_party/ffmpeg/ffmpeg_generated.gni | 70 +- src/third_party/ffmpeg/libavcodec/012v.c | 2 +- src/third_party/ffmpeg/libavcodec/4xm.c | 5 +- src/third_party/ffmpeg/libavcodec/8bps.c | 13 +- src/third_party/ffmpeg/libavcodec/Makefile | 16 +- src/third_party/ffmpeg/libavcodec/aacpsy.c | 2 +- .../ffmpeg/libavcodec/aarch64/Makefile | 3 +- .../libavcodec/aarch64/hevcdsp_deblock_neon.S | 183 +++ .../libavcodec/aarch64/hevcdsp_idct_neon.S | 337 +++- .../libavcodec/aarch64/hevcdsp_init_aarch64.c | 25 + src/third_party/ffmpeg/libavcodec/adpcm.c | 4 +- src/third_party/ffmpeg/libavcodec/agm.c | 7 +- src/third_party/ffmpeg/libavcodec/aic.c | 2 +- .../ffmpeg/libavcodec/aliaspixdec.c | 2 +- src/third_party/ffmpeg/libavcodec/allcodecs.c | 6 +- src/third_party/ffmpeg/libavcodec/alsdec.c | 6 +- .../ffmpeg/libavcodec/amfenc_av1.c | 8 +- .../ffmpeg/libavcodec/amfenc_h264.c | 8 +- .../ffmpeg/libavcodec/amfenc_hevc.c | 8 +- src/third_party/ffmpeg/libavcodec/ansi.c | 8 + src/third_party/ffmpeg/libavcodec/apac.c | 6 +- src/third_party/ffmpeg/libavcodec/apedec.c | 34 +- src/third_party/ffmpeg/libavcodec/arbc.c | 5 +- src/third_party/ffmpeg/libavcodec/argo.c | 5 +- src/third_party/ffmpeg/libavcodec/asvdec.c | 2 +- src/third_party/ffmpeg/libavcodec/atrac3.c | 12 +- src/third_party/ffmpeg/libavcodec/atrac9dec.c | 6 +- src/third_party/ffmpeg/libavcodec/av1_parse.c | 24 +- src/third_party/ffmpeg/libavcodec/av1_parse.h | 6 +- .../ffmpeg/libavcodec/av1_parser.c | 11 +- src/third_party/ffmpeg/libavcodec/av1dec.c | 19 +- src/third_party/ffmpeg/libavcodec/avcodec.c | 5 +- src/third_party/ffmpeg/libavcodec/avcodec.h | 15 +- src/third_party/ffmpeg/libavcodec/avrndec.c | 2 +- src/third_party/ffmpeg/libavcodec/avs.c | 4 +- src/third_party/ffmpeg/libavcodec/avuidec.c | 2 +- .../ffmpeg/libavcodec/bethsoftvideo.c | 4 + src/third_party/ffmpeg/libavcodec/bfi.c | 12 +- src/third_party/ffmpeg/libavcodec/bintext.c | 4 + .../ffmpeg/libavcodec/bitpacked_dec.c | 2 +- src/third_party/ffmpeg/libavcodec/bmp.c | 2 +- src/third_party/ffmpeg/libavcodec/bmvvideo.c | 4 + src/third_party/ffmpeg/libavcodec/bonk.c | 27 +- .../ffmpeg/libavcodec/brenderpix.c | 10 +- .../ffmpeg/libavcodec/bytestream.h | 10 +- src/third_party/ffmpeg/libavcodec/c93.c | 8 +- .../ffmpeg/libavcodec/cavs_parser.c | 11 +- src/third_party/ffmpeg/libavcodec/cavsdec.c | 3 + src/third_party/ffmpeg/libavcodec/cbs_av1.c | 7 + src/third_party/ffmpeg/libavcodec/cbs_av1.h | 7 + .../libavcodec/cbs_av1_syntax_template.c | 38 +- .../ffmpeg/libavcodec/ccaption_dec.c | 9 +- .../ffmpeg/libavcodec/cdgraphics.c | 4 + src/third_party/ffmpeg/libavcodec/cdtoons.c | 4 + src/third_party/ffmpeg/libavcodec/cdxl.c | 2 +- src/third_party/ffmpeg/libavcodec/cfhd.c | 6 +- src/third_party/ffmpeg/libavcodec/cinepak.c | 13 +- .../ffmpeg/libavcodec/clearvideo.c | 4 +- src/third_party/ffmpeg/libavcodec/cljrdec.c | 2 +- src/third_party/ffmpeg/libavcodec/cllc.c | 2 +- src/third_party/ffmpeg/libavcodec/codec.h | 3 + .../ffmpeg/libavcodec/codec_desc.c | 23 +- .../ffmpeg/libavcodec/codec_desc.h | 6 + src/third_party/ffmpeg/libavcodec/codec_id.h | 1 + src/third_party/ffmpeg/libavcodec/codec_par.c | 3 + src/third_party/ffmpeg/libavcodec/codec_par.h | 12 + src/third_party/ffmpeg/libavcodec/cpia.c | 4 +- src/third_party/ffmpeg/libavcodec/cri.c | 2 +- src/third_party/ffmpeg/libavcodec/crystalhd.c | 4 +- src/third_party/ffmpeg/libavcodec/cscd.c | 4 +- src/third_party/ffmpeg/libavcodec/cuviddec.c | 12 +- src/third_party/ffmpeg/libavcodec/dds.c | 10 +- src/third_party/ffmpeg/libavcodec/decode.c | 20 +- src/third_party/ffmpeg/libavcodec/dfa.c | 4 + src/third_party/ffmpeg/libavcodec/diracdec.c | 5 +- src/third_party/ffmpeg/libavcodec/dnxhddec.c | 17 +- src/third_party/ffmpeg/libavcodec/dnxhdenc.c | 3 +- src/third_party/ffmpeg/libavcodec/dpcm.c | 2 +- src/third_party/ffmpeg/libavcodec/dpx.c | 35 +- .../ffmpeg/libavcodec/dsicinvideo.c | 4 + src/third_party/ffmpeg/libavcodec/dv.h | 6 + src/third_party/ffmpeg/libavcodec/dvdec.c | 14 +- src/third_party/ffmpeg/libavcodec/dvenc.c | 8 +- src/third_party/ffmpeg/libavcodec/dxa.c | 14 +- src/third_party/ffmpeg/libavcodec/dxtory.c | 2 +- src/third_party/ffmpeg/libavcodec/dxv.c | 2 +- src/third_party/ffmpeg/libavcodec/eacmv.c | 4 +- src/third_party/ffmpeg/libavcodec/eatgq.c | 2 +- src/third_party/ffmpeg/libavcodec/eatgv.c | 4 +- src/third_party/ffmpeg/libavcodec/elbg.c | 56 +- src/third_party/ffmpeg/libavcodec/encode.c | 26 +- .../ffmpeg/libavcodec/error_resilience.c | 9 +- .../ffmpeg/libavcodec/error_resilience.h | 1 - src/third_party/ffmpeg/libavcodec/escape124.c | 2 +- src/third_party/ffmpeg/libavcodec/exr.c | 18 +- src/third_party/ffmpeg/libavcodec/ffv1dec.c | 33 +- src/third_party/ffmpeg/libavcodec/ffv1enc.c | 4 +- src/third_party/ffmpeg/libavcodec/fic.c | 4 +- src/third_party/ffmpeg/libavcodec/fitsdec.c | 3 +- src/third_party/ffmpeg/libavcodec/fitsenc.c | 1 + src/third_party/ffmpeg/libavcodec/flacdec.c | 2 +- src/third_party/ffmpeg/libavcodec/flicvideo.c | 4 + src/third_party/ffmpeg/libavcodec/fmvc.c | 4 +- src/third_party/ffmpeg/libavcodec/fraps.c | 2 +- src/third_party/ffmpeg/libavcodec/frwu.c | 2 +- src/third_party/ffmpeg/libavcodec/ftr.c | 6 +- src/third_party/ffmpeg/libavcodec/g2meet.c | 24 +- src/third_party/ffmpeg/libavcodec/g723_1dec.c | 6 +- src/third_party/ffmpeg/libavcodec/g729dec.c | 12 +- .../ffmpeg/libavcodec/g729postfilter.c | 2 +- src/third_party/ffmpeg/libavcodec/gemdec.c | 6 +- .../ffmpeg/libavcodec/gif_parser.c | 34 +- src/third_party/ffmpeg/libavcodec/gifdec.c | 4 +- src/third_party/ffmpeg/libavcodec/h261dec.c | 5 +- .../ffmpeg/libavcodec/h264_parser.c | 4 +- .../ffmpeg/libavcodec/h264_picture.c | 3 +- .../ffmpeg/libavcodec/h264_slice.c | 53 +- src/third_party/ffmpeg/libavcodec/h264dec.c | 8 +- src/third_party/ffmpeg/libavcodec/hapdec.c | 2 +- src/third_party/ffmpeg/libavcodec/hdrdec.c | 2 +- src/third_party/ffmpeg/libavcodec/hevc_ps.c | 148 +- src/third_party/ffmpeg/libavcodec/hevc_ps.h | 48 +- src/third_party/ffmpeg/libavcodec/hevc_refs.c | 7 +- src/third_party/ffmpeg/libavcodec/hevcdec.c | 23 +- src/third_party/ffmpeg/libavcodec/hnm4video.c | 4 +- src/third_party/ffmpeg/libavcodec/hq_hqa.c | 2 +- src/third_party/ffmpeg/libavcodec/hqx.c | 2 +- .../ffmpeg/libavcodec/huffyuvdec.c | 4 +- .../ffmpeg/libavcodec/idcinvideo.c | 9 +- src/third_party/ffmpeg/libavcodec/iff.c | 4 +- src/third_party/ffmpeg/libavcodec/imm4.c | 10 +- src/third_party/ffmpeg/libavcodec/imx.c | 18 +- src/third_party/ffmpeg/libavcodec/internal.h | 2 - .../ffmpeg/libavcodec/interplayacm.c | 8 +- .../ffmpeg/libavcodec/interplayvideo.c | 9 +- .../ffmpeg/libavcodec/ituh263enc.c | 5 + src/third_party/ffmpeg/libavcodec/j2kenc.c | 83 +- src/third_party/ffmpeg/libavcodec/jpeg2000.h | 5 +- .../ffmpeg/libavcodec/jpeg2000dec.c | 160 +- .../ffmpeg/libavcodec/jpeg2000dec.h | 119 ++ .../ffmpeg/libavcodec/jpeg2000htdec.c | 1451 +++++++++++++++++ .../ffmpeg/libavcodec/jpeg2000htdec.h | 34 + src/third_party/ffmpeg/libavcodec/jvdec.c | 10 +- src/third_party/ffmpeg/libavcodec/kmvc.c | 21 +- src/third_party/ffmpeg/libavcodec/lagarith.c | 2 +- src/third_party/ffmpeg/libavcodec/lcldec.c | 39 +- src/third_party/ffmpeg/libavcodec/libaomdec.c | 5 +- src/third_party/ffmpeg/libavcodec/libaomenc.c | 14 +- src/third_party/ffmpeg/libavcodec/libdav1d.c | 76 +- .../ffmpeg/libavcodec/libfdk-aacenc.c | 51 + src/third_party/ffmpeg/libavcodec/libjxldec.c | 2 +- src/third_party/ffmpeg/libavcodec/libjxlenc.c | 4 +- .../ffmpeg/libavcodec/libkvazaar.c | 13 +- .../ffmpeg/libavcodec/libmp3lame.c | 16 +- .../ffmpeg/libavcodec/libopenh264enc.c | 23 +- src/third_party/ffmpeg/libavcodec/librav1e.c | 9 +- .../ffmpeg/libavcodec/librsvgdec.c | 2 +- .../ffmpeg/libavcodec/libspeexdec.c | 6 +- src/third_party/ffmpeg/libavcodec/libsvtav1.c | 12 +- src/third_party/ffmpeg/libavcodec/libuavs3d.c | 5 +- src/third_party/ffmpeg/libavcodec/libvpxenc.c | 21 +- src/third_party/ffmpeg/libavcodec/libx264.c | 40 +- src/third_party/ffmpeg/libavcodec/libx265.c | 8 +- src/third_party/ffmpeg/libavcodec/loco.c | 2 +- src/third_party/ffmpeg/libavcodec/lscrdec.c | 13 +- src/third_party/ffmpeg/libavcodec/m101.c | 14 +- src/third_party/ffmpeg/libavcodec/magicyuv.c | 2 +- src/third_party/ffmpeg/libavcodec/mdec.c | 2 +- src/third_party/ffmpeg/libavcodec/me_cmp.c | 9 +- src/third_party/ffmpeg/libavcodec/me_cmp.h | 2 +- .../ffmpeg/libavcodec/mediacodec_wrapper.c | 98 ++ .../ffmpeg/libavcodec/mediacodecenc.c | 236 +++ src/third_party/ffmpeg/libavcodec/mfenc.c | 4 + src/third_party/ffmpeg/libavcodec/midivid.c | 5 +- src/third_party/ffmpeg/libavcodec/misc4.c | 5 +- src/third_party/ffmpeg/libavcodec/mjpegdec.c | 110 +- src/third_party/ffmpeg/libavcodec/mmaldec.c | 6 +- src/third_party/ffmpeg/libavcodec/mobiclip.c | 4 +- .../ffmpeg/libavcodec/motion_est.c | 11 +- src/third_party/ffmpeg/libavcodec/mpeg12dec.c | 20 +- src/third_party/ffmpeg/libavcodec/mpeg12enc.c | 4 +- .../ffmpeg/libavcodec/mpeg4videoenc.c | 2 +- .../ffmpeg/libavcodec/mpegvideo_dec.c | 19 +- .../ffmpeg/libavcodec/mpegvideo_enc.c | 29 +- .../ffmpeg/libavcodec/mpegvideo_parser.c | 10 +- src/third_party/ffmpeg/libavcodec/mscc.c | 6 +- .../ffmpeg/libavcodec/msmpeg4enc.c | 14 +- src/third_party/ffmpeg/libavcodec/msp2dec.c | 2 +- src/third_party/ffmpeg/libavcodec/msrle.c | 9 +- src/third_party/ffmpeg/libavcodec/mss1.c | 8 +- src/third_party/ffmpeg/libavcodec/mss2.c | 5 +- src/third_party/ffmpeg/libavcodec/mss3.c | 5 +- src/third_party/ffmpeg/libavcodec/mss4.c | 5 +- src/third_party/ffmpeg/libavcodec/msvideo1.c | 9 +- .../ffmpeg/libavcodec/msvideo1enc.c | 2 + src/third_party/ffmpeg/libavcodec/mv30.c | 6 +- src/third_party/ffmpeg/libavcodec/mvcdec.c | 2 +- src/third_party/ffmpeg/libavcodec/mvha.c | 2 +- src/third_party/ffmpeg/libavcodec/mwsc.c | 9 +- src/third_party/ffmpeg/libavcodec/mxpegdec.c | 4 +- src/third_party/ffmpeg/libavcodec/notchlc.c | 2 +- src/third_party/ffmpeg/libavcodec/nuv.c | 5 +- .../ffmpeg/libavcodec/nvdec_mpeg12.c | 5 +- .../ffmpeg/libavcodec/nvdec_mpeg4.c | 5 +- src/third_party/ffmpeg/libavcodec/nvenc.c | 19 +- .../ffmpeg/libavcodec/options_table.h | 4 +- src/third_party/ffmpeg/libavcodec/pafvideo.c | 8 +- src/third_party/ffmpeg/libavcodec/parser.c | 4 + .../ffmpeg/libavcodec/pcm_rechunk_bsf.c | 4 +- src/third_party/ffmpeg/libavcodec/pdvdec.c | 141 ++ src/third_party/ffmpeg/libavcodec/pgxdec.c | 2 +- src/third_party/ffmpeg/libavcodec/photocd.c | 2 +- src/third_party/ffmpeg/libavcodec/pictordec.c | 4 + src/third_party/ffmpeg/libavcodec/pixlet.c | 2 +- src/third_party/ffmpeg/libavcodec/pngdec.c | 63 +- src/third_party/ffmpeg/libavcodec/pngenc.c | 6 + src/third_party/ffmpeg/libavcodec/pnmdec.c | 2 +- .../ffmpeg/libavcodec/proresdec2.c | 9 +- .../ffmpeg/libavcodec/proresenc_anatoliy.c | 3 +- .../ffmpeg/libavcodec/proresenc_kostya.c | 6 +- src/third_party/ffmpeg/libavcodec/prosumer.c | 2 +- src/third_party/ffmpeg/libavcodec/psd.c | 4 + .../ffmpeg/libavcodec/pthread_frame.c | 4 + src/third_party/ffmpeg/libavcodec/qdrw.c | 6 +- src/third_party/ffmpeg/libavcodec/qoidec.c | 2 +- src/third_party/ffmpeg/libavcodec/qpeg.c | 14 +- .../ffmpeg/libavcodec/qsv_internal.h | 5 +- src/third_party/ffmpeg/libavcodec/qsvdec.c | 14 +- src/third_party/ffmpeg/libavcodec/qsvenc.c | 6 +- src/third_party/ffmpeg/libavcodec/qtrle.c | 9 +- src/third_party/ffmpeg/libavcodec/r210dec.c | 2 +- src/third_party/ffmpeg/libavcodec/rasc.c | 5 +- .../ffmpeg/libavcodec/ratecontrol.c | 11 +- src/third_party/ffmpeg/libavcodec/rawdec.c | 19 +- src/third_party/ffmpeg/libavcodec/rka.c | 2 +- src/third_party/ffmpeg/libavcodec/rkmppdec.c | 6 +- src/third_party/ffmpeg/libavcodec/rscc.c | 11 +- src/third_party/ffmpeg/libavcodec/rv34.c | 2 + src/third_party/ffmpeg/libavcodec/sanm.c | 4 +- src/third_party/ffmpeg/libavcodec/scpr.c | 12 +- .../ffmpeg/libavcodec/screenpresso.c | 2 +- src/third_party/ffmpeg/libavcodec/sga.c | 6 +- src/third_party/ffmpeg/libavcodec/sgidec.c | 2 +- src/third_party/ffmpeg/libavcodec/sgirledec.c | 2 +- .../ffmpeg/libavcodec/sheervideo.c | 2 +- src/third_party/ffmpeg/libavcodec/shorten.c | 6 +- src/third_party/ffmpeg/libavcodec/smacker.c | 34 +- src/third_party/ffmpeg/libavcodec/smc.c | 9 +- src/third_party/ffmpeg/libavcodec/snow.c | 7 +- src/third_party/ffmpeg/libavcodec/snowenc.c | 10 +- src/third_party/ffmpeg/libavcodec/sonic.c | 4 +- .../ffmpeg/libavcodec/speedhqdec.c | 2 +- src/third_party/ffmpeg/libavcodec/svq3.c | 5 +- src/third_party/ffmpeg/libavcodec/tak.c | 23 +- src/third_party/ffmpeg/libavcodec/tak.h | 2 - src/third_party/ffmpeg/libavcodec/targa.c | 4 + .../ffmpeg/libavcodec/targa_y216dec.c | 2 +- src/third_party/ffmpeg/libavcodec/tdsc.c | 2 +- .../ffmpeg/libavcodec/tests/avcodec.c | 3 +- .../ffmpeg/libavcodec/threadframe.h | 3 + .../ffmpeg/libavcodec/tiertexseqv.c | 4 + src/third_party/ffmpeg/libavcodec/tiff.c | 5 +- src/third_party/ffmpeg/libavcodec/tmv.c | 6 +- .../ffmpeg/libavcodec/truemotion2.c | 8 +- .../ffmpeg/libavcodec/truemotion2rt.c | 2 +- src/third_party/ffmpeg/libavcodec/tscc.c | 4 + src/third_party/ffmpeg/libavcodec/utils.c | 23 +- .../ffmpeg/libavcodec/utvideodec.c | 5 +- src/third_party/ffmpeg/libavcodec/v210dec.c | 6 +- src/third_party/ffmpeg/libavcodec/v210x.c | 2 +- src/third_party/ffmpeg/libavcodec/v308dec.c | 2 +- src/third_party/ffmpeg/libavcodec/v408dec.c | 2 +- src/third_party/ffmpeg/libavcodec/v410dec.c | 2 +- .../ffmpeg/libavcodec/v4l2_buffers.c | 3 +- .../ffmpeg/libavcodec/vaapi_decode.c | 5 + .../ffmpeg/libavcodec/vaapi_encode_h264.c | 27 +- .../ffmpeg/libavcodec/vaapi_hevc.c | 6 +- src/third_party/ffmpeg/libavcodec/vb.c | 4 + src/third_party/ffmpeg/libavcodec/vble.c | 2 +- src/third_party/ffmpeg/libavcodec/vbndec.c | 2 +- src/third_party/ffmpeg/libavcodec/vc1.c | 11 +- src/third_party/ffmpeg/libavcodec/vc1_mc.c | 18 +- .../ffmpeg/libavcodec/vc1_parser.c | 3 +- src/third_party/ffmpeg/libavcodec/vc1dec.c | 21 +- src/third_party/ffmpeg/libavcodec/vcr1.c | 2 +- .../ffmpeg/libavcodec/vdpau_mpeg12.c | 5 +- .../ffmpeg/libavcodec/vdpau_mpeg4.c | 5 +- src/third_party/ffmpeg/libavcodec/version.h | 4 +- .../ffmpeg/libavcodec/version_major.h | 2 + .../ffmpeg/libavcodec/videotoolbox.c | 16 +- .../ffmpeg/libavcodec/videotoolboxenc.c | 43 +- src/third_party/ffmpeg/libavcodec/vmnc.c | 4 +- src/third_party/ffmpeg/libavcodec/vorbisdec.c | 4 + src/third_party/ffmpeg/libavcodec/vp3.c | 13 +- src/third_party/ffmpeg/libavcodec/vp5.c | 11 +- src/third_party/ffmpeg/libavcodec/vp56.c | 11 +- src/third_party/ffmpeg/libavcodec/vp6.c | 11 +- src/third_party/ffmpeg/libavcodec/vp8.c | 5 +- src/third_party/ffmpeg/libavcodec/vp8data.c | 42 + src/third_party/ffmpeg/libavcodec/vp8data.h | 20 +- src/third_party/ffmpeg/libavcodec/vp9.c | 5 +- src/third_party/ffmpeg/libavcodec/vqavideo.c | 4 + src/third_party/ffmpeg/libavcodec/wavarc.c | 10 +- .../ffmpeg/libavcodec/wavpackenc.c | 2 +- src/third_party/ffmpeg/libavcodec/wbmpdec.c | 2 +- src/third_party/ffmpeg/libavcodec/wcmv.c | 5 +- src/third_party/ffmpeg/libavcodec/webp.c | 2 +- .../ffmpeg/libavcodec/wmalosslessdec.c | 6 +- src/third_party/ffmpeg/libavcodec/wmaprodec.c | 18 +- src/third_party/ffmpeg/libavcodec/wmavoice.c | 6 +- src/third_party/ffmpeg/libavcodec/wnv1.c | 2 +- src/third_party/ffmpeg/libavcodec/x86/cabac.h | 2 +- src/third_party/ffmpeg/libavcodec/xbmdec.c | 2 +- src/third_party/ffmpeg/libavcodec/xl.c | 2 +- src/third_party/ffmpeg/libavcodec/xpmdec.c | 2 +- src/third_party/ffmpeg/libavcodec/xwddec.c | 2 +- src/third_party/ffmpeg/libavcodec/y41pdec.c | 2 +- src/third_party/ffmpeg/libavcodec/ylc.c | 2 +- src/third_party/ffmpeg/libavcodec/yop.c | 4 + src/third_party/ffmpeg/libavcodec/yuv4dec.c | 2 +- src/third_party/ffmpeg/libavcodec/zerocodec.c | 4 +- src/third_party/ffmpeg/libavcodec/zmbv.c | 4 +- src/third_party/ffmpeg/libavutil/frame.c | 142 +- src/third_party/ffmpeg/libavutil/frame.h | 62 +- .../ffmpeg/libavutil/hdr_dynamic_metadata.c | 28 +- .../ffmpeg/libavutil/hdr_dynamic_metadata.h | 14 +- .../ffmpeg/libavutil/hwcontext_qsv.c | 14 +- .../ffmpeg/libavutil/hwcontext_vaapi.c | 78 +- src/third_party/ffmpeg/libavutil/internal.h | 1 - .../ffmpeg/libavutil/mathematics.h | 51 + .../ffmpeg/libavutil/riscv/bswap.h | 52 +- .../ffmpeg/libavutil/riscv/intmath.h | 30 +- .../ffmpeg/libavutil/tests/hwdevice.c | 2 +- src/third_party/ffmpeg/libavutil/tx_priv.h | 14 +- src/third_party/ffmpeg/libavutil/version.h | 5 +- .../ffmpeg/libavutil/wchar_filename.h | 6 +- 1512 files changed, 17936 insertions(+), 4404 deletions(-) create mode 100644 arm/android/third_party/ffmpeg/libavcodec/aarch64/autorename_libavcodec_aarch64_hevcdsp_idct_neon.S create mode 100644 arm/android/third_party/ffmpeg/libavcodec/aarch64/autorename_libavcodec_aarch64_hevcdsp_sao_neon.S create mode 100644 arm/android/third_party/ffmpeg/libavcodec/aarch64/hevcdsp_deblock_neon.S create mode 100644 arm/android/third_party/ffmpeg/libavcodec/autorename_libavcodec_bswapdsp.c create mode 100644 arm/android/third_party/ffmpeg/libavcodec/jpeg2000dec.h create mode 100644 arm/android/third_party/ffmpeg/libavcodec/jpeg2000htdec.c create mode 100644 arm/android/third_party/ffmpeg/libavcodec/jpeg2000htdec.h create mode 100644 arm/android/third_party/ffmpeg/libavcodec/pdvdec.c create mode 100644 arm/android/third_party/ffmpeg/libavcodec/vp8data.c create mode 100644 arm/raspi/third_party/ffmpeg/libavcodec/aarch64/hevcdsp_deblock_neon.S create mode 100644 arm/raspi/third_party/ffmpeg/libavcodec/jpeg2000dec.h create mode 100644 arm/raspi/third_party/ffmpeg/libavcodec/jpeg2000htdec.c create mode 100644 arm/raspi/third_party/ffmpeg/libavcodec/jpeg2000htdec.h create mode 100644 arm/raspi/third_party/ffmpeg/libavcodec/pdvdec.c create mode 100644 arm/raspi/third_party/ffmpeg/libavcodec/vp8data.c create mode 100644 src/third_party/ffmpeg/libavcodec/aarch64/hevcdsp_deblock_neon.S create mode 100644 src/third_party/ffmpeg/libavcodec/jpeg2000dec.h create mode 100644 src/third_party/ffmpeg/libavcodec/jpeg2000htdec.c create mode 100644 src/third_party/ffmpeg/libavcodec/jpeg2000htdec.h create mode 100644 src/third_party/ffmpeg/libavcodec/pdvdec.c create mode 100644 src/third_party/ffmpeg/libavcodec/vp8data.c diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/android/arm-neon/config.h b/arm/android/third_party/ffmpeg/chromium/config/Chrome/android/arm-neon/config.h index 3af8cb51..2f8b5417 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/android/arm-neon/config.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/android/arm-neon/config.h @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/android/arm-neon/config_components.h b/arm/android/third_party/ffmpeg/chromium/config/Chrome/android/arm-neon/config_components.h index 9c6d1229..c06a0e4c 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/android/arm-neon/config_components.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/android/arm-neon/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/android/arm-neon/libavutil/ffversion.h b/arm/android/third_party/ffmpeg/chromium/config/Chrome/android/arm-neon/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/android/arm-neon/libavutil/ffversion.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/android/arm-neon/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/android/arm64/config.h b/arm/android/third_party/ffmpeg/chromium/config/Chrome/android/arm64/config.h index df04fd3b..675e3425 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/android/arm64/config.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/android/arm64/config.h @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/android/arm64/config_components.h b/arm/android/third_party/ffmpeg/chromium/config/Chrome/android/arm64/config_components.h index 9c6d1229..c06a0e4c 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/android/arm64/config_components.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/android/arm64/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/android/arm64/libavutil/ffversion.h b/arm/android/third_party/ffmpeg/chromium/config/Chrome/android/arm64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/android/arm64/libavutil/ffversion.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/android/arm64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/android/ia32/config.h b/arm/android/third_party/ffmpeg/chromium/config/Chrome/android/ia32/config.h index 41b24690..729d4f8e 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/android/ia32/config.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/android/ia32/config.h @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/android/ia32/config_components.h b/arm/android/third_party/ffmpeg/chromium/config/Chrome/android/ia32/config_components.h index 9c6d1229..c06a0e4c 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/android/ia32/config_components.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/android/ia32/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/android/ia32/libavutil/ffversion.h b/arm/android/third_party/ffmpeg/chromium/config/Chrome/android/ia32/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/android/ia32/libavutil/ffversion.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/android/ia32/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/android/x64/config.asm b/arm/android/third_party/ffmpeg/chromium/config/Chrome/android/x64/config.asm index ae8d78e4..a06dae35 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/android/x64/config.asm +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/android/x64/config.asm @@ -329,6 +329,7 @@ %define HAVE_BCRYPT 0 %define HAVE_VAAPI_DRM 0 %define HAVE_VAAPI_X11 0 +%define HAVE_VAAPI_WIN32 0 %define HAVE_VDPAU_X11 0 %define HAVE_PTHREADS 1 %define HAVE_OS2THREADS 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/android/x64/config.h b/arm/android/third_party/ffmpeg/chromium/config/Chrome/android/x64/config.h index c5d8b813..b8bb12f7 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/android/x64/config.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/android/x64/config.h @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/android/x64/config_components.h b/arm/android/third_party/ffmpeg/chromium/config/Chrome/android/x64/config_components.h index 9c6d1229..c06a0e4c 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/android/x64/config_components.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/android/x64/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/android/x64/libavutil/ffversion.h b/arm/android/third_party/ffmpeg/chromium/config/Chrome/android/x64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/android/x64/libavutil/ffversion.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/android/x64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/ios/arm64/config.h b/arm/android/third_party/ffmpeg/chromium/config/Chrome/ios/arm64/config.h index 4a2c9afb..741f2c7f 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/ios/arm64/config.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/ios/arm64/config.h @@ -1,12 +1,12 @@ /* Automatically generated by configure - do not modify! */ #ifndef FFMPEG_CONFIG_H #define FFMPEG_CONFIG_H -/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/liberato/src/release_chrome/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --enable-pic --cc=clang --cxx=clang++ --ld=clang --enable-cross-compile --cc=clang --ld=ld64.lld --nm=llvm-nm --ar=llvm-ar --target-os=darwin --extra-cflags='--target=arm64-apple-macosx' --extra-cflags=-F/usr/local/google/home/liberato/src/release_chrome/src/build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks --extra-cflags='-mmacosx-version-min=10.10' --extra-cflags=-fblocks --extra-cflags=-nostdinc --extra-cflags=-isystem/usr/local/google/home/liberato/src/release_chrome/src/build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include --extra-cflags=-isystem/usr/local/google/home/liberato/src/release_chrome/src/third_party/llvm-build/Release+Asserts/lib/clang/17/include --extra-ldflags=-syslibroot --extra-ldflags=/usr/local/google/home/liberato/src/release_chrome/src/build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk --extra-ldflags=-L/usr/local/google/home/liberato/src/release_chrome/src/build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib --extra-ldflags=-lSystem --extra-ldflags=-macosx_version_min --extra-ldflags=10.10 --extra-ldflags=-sdk_version --extra-ldflags=10.10 --extra-ldflags=-platform_version --extra-ldflags=macos --extra-ldflags=10.10 --extra-ldflags=10.10 --arch=arm64 --extra-cflags='-arch arm64' --extra-ldflags='-arch arm64' --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264'" -- elide long configuration string from binary */ +/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/liberato/src/release_chrome/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --enable-pic --cc=clang --cxx=clang++ --ld=clang --enable-cross-compile --cc=clang --ld=ld64.lld --nm=llvm-nm --ar=llvm-ar --target-os=darwin --extra-cflags='--target=arm64-apple-macosx' --extra-cflags=-F/usr/local/google/home/liberato/src/release_chrome/src/build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks --extra-cflags='-mmacosx-version-min=10.10' --extra-cflags=-fblocks --extra-cflags=-nostdinc --extra-cflags=-isystem/usr/local/google/home/liberato/src/release_chrome/src/build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include --extra-cflags=-isystem/usr/local/google/home/liberato/src/release_chrome/src/third_party/llvm-build/Release+Asserts/lib/clang/17/include --extra-ldflags=-syslibroot --extra-ldflags=/usr/local/google/home/liberato/src/release_chrome/src/build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk --extra-ldflags=-L/usr/local/google/home/liberato/src/release_chrome/src/build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib --extra-ldflags=-lSystem --extra-ldflags=-macosx_version_min --extra-ldflags=10.10 --extra-ldflags=-sdk_version --extra-ldflags=10.10 --extra-ldflags=-platform_version --extra-ldflags=macos --extra-ldflags=10.10 --extra-ldflags=10.10 --arch=arm64 --extra-cflags='-arch arm64' --extra-ldflags='-arch arm64' --enable-decoder='aac,h264,hevc' --enable-demuxer=aac --enable-decoder='aac,h264,hevc'" -- elide long configuration string from binary */ #define FFMPEG_LICENSE "LGPL version 2.1 or later" #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME darwin #define av_restrict restrict #define EXTERN_PREFIX "_" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 @@ -656,7 +657,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 0 -#define CONFIG_BSWAPDSP 0 +#define CONFIG_BSWAPDSP 1 #define CONFIG_CABAC 1 #define CONFIG_CBS 0 #define CONFIG_CBS_AV1 0 @@ -668,7 +669,7 @@ #define CONFIG_DEFLATE_WRAPPER 0 #define CONFIG_DIRAC_PARSE 1 #define CONFIG_DNN 0 -#define CONFIG_DOVI_RPU 0 +#define CONFIG_DOVI_RPU 1 #define CONFIG_DVPROFILE 0 #define CONFIG_EXIF 0 #define CONFIG_FAANDCT 0 @@ -686,8 +687,8 @@ #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 1 #define CONFIG_H264_SEI 1 -#define CONFIG_HEVCPARSE 0 -#define CONFIG_HEVC_SEI 0 +#define CONFIG_HEVCPARSE 1 +#define CONFIG_HEVC_SEI 1 #define CONFIG_HPELDSP 1 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/ios/arm64/config_components.h b/arm/android/third_party/ffmpeg/chromium/config/Chrome/ios/arm64/config_components.h index 3604442a..d0311ac8 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/ios/arm64/config_components.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/ios/arm64/config_components.h @@ -134,7 +134,7 @@ #define CONFIG_H264_QSV_DECODER 0 #define CONFIG_H264_RKMPP_DECODER 0 #define CONFIG_HAP_DECODER 0 -#define CONFIG_HEVC_DECODER 0 +#define CONFIG_HEVC_DECODER 1 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -959,7 +963,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 0 #define CONFIG_H264_PARSER 1 -#define CONFIG_HEVC_PARSER 0 +#define CONFIG_HEVC_PARSER 1 #define CONFIG_HDR_PARSER 0 #define CONFIG_IPU_PARSER 0 #define CONFIG_JPEG2000_PARSER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/ios/arm64/libavcodec/codec_list.c b/arm/android/third_party/ffmpeg/chromium/config/Chrome/ios/arm64/libavcodec/codec_list.c index cbd7f394..80d0456b 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/ios/arm64/libavcodec/codec_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/ios/arm64/libavcodec/codec_list.c @@ -17,4 +17,5 @@ static const FFCodec * const codec_list[] = { &ff_pcm_s32le_decoder, &ff_pcm_u8_decoder, &ff_libopus_decoder, + &ff_hevc_decoder, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/ios/arm64/libavcodec/parser_list.c b/arm/android/third_party/ffmpeg/chromium/config/Chrome/ios/arm64/libavcodec/parser_list.c index 50acddb2..1269282a 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/ios/arm64/libavcodec/parser_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/ios/arm64/libavcodec/parser_list.c @@ -8,4 +8,5 @@ static const AVCodecParser * const parser_list[] = { &ff_vp3_parser, &ff_vp8_parser, &ff_vp9_parser, + &ff_hevc_parser, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/ios/arm64/libavutil/ffversion.h b/arm/android/third_party/ffmpeg/chromium/config/Chrome/ios/arm64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/ios/arm64/libavutil/ffversion.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/ios/arm64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/ios/x64/config.asm b/arm/android/third_party/ffmpeg/chromium/config/Chrome/ios/x64/config.asm index 9bdc5d84..a0131929 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/ios/x64/config.asm +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/ios/x64/config.asm @@ -329,6 +329,7 @@ %define HAVE_BCRYPT 0 %define HAVE_VAAPI_DRM 0 %define HAVE_VAAPI_X11 0 +%define HAVE_VAAPI_WIN32 0 %define HAVE_VDPAU_X11 0 %define HAVE_PTHREADS 1 %define HAVE_OS2THREADS 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/ios/x64/config.h b/arm/android/third_party/ffmpeg/chromium/config/Chrome/ios/x64/config.h index 638ac95a..c0ccfb3a 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/ios/x64/config.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/ios/x64/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME darwin #define av_restrict restrict #define EXTERN_PREFIX "_" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/ios/x64/config_components.h b/arm/android/third_party/ffmpeg/chromium/config/Chrome/ios/x64/config_components.h index 3604442a..0bf0c781 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/ios/x64/config_components.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/ios/x64/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/ios/x64/libavutil/ffversion.h b/arm/android/third_party/ffmpeg/chromium/config/Chrome/ios/x64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/ios/x64/libavutil/ffversion.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/ios/x64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux-noasm/x64/config.h b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux-noasm/x64/config.h index a20c23ae..6af805b6 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux-noasm/x64/config.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux-noasm/x64/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME linux #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux-noasm/x64/config_components.h b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux-noasm/x64/config_components.h index 3604442a..0bf0c781 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux-noasm/x64/config_components.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux-noasm/x64/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux-noasm/x64/libavutil/ffversion.h b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux-noasm/x64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux-noasm/x64/libavutil/ffversion.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux-noasm/x64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm-neon/config.h b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm-neon/config.h index bf88a83c..09a1519c 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm-neon/config.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm-neon/config.h @@ -1,12 +1,12 @@ /* Automatically generated by configure - do not modify! */ #ifndef FFMPEG_CONFIG_H #define FFMPEG_CONFIG_H -/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/liberato/src/release_chrome/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --arch=arm --enable-armv6 --enable-armv6t2 --enable-vfp --enable-thumb --extra-cflags='-march=armv7-a' --enable-cross-compile --target-os=linux --extra-cflags='--target=arm-linux-gnueabihf' --extra-ldflags='--target=arm-linux-gnueabihf' --sysroot=/usr/local/google/home/liberato/src/release_chrome/src/build/linux/debian_bullseye_arm-sysroot --extra-cflags='-mtune=cortex-a8' --extra-cflags='-mfloat-abi=hard' --extra-cflags=-O2 --enable-neon --extra-cflags='-mfpu=neon' --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld' --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264'" -- elide long configuration string from binary */ +/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/liberato/src/release_chrome/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --arch=arm --enable-armv6 --enable-armv6t2 --enable-vfp --enable-thumb --extra-cflags='-march=armv7-a' --enable-cross-compile --target-os=linux --extra-cflags='--target=arm-linux-gnueabihf' --extra-ldflags='--target=arm-linux-gnueabihf' --sysroot=/usr/local/google/home/liberato/src/release_chrome/src/build/linux/debian_bullseye_arm-sysroot --extra-cflags='-mtune=cortex-a8' --extra-cflags='-mfloat-abi=hard' --extra-cflags=-O2 --enable-neon --extra-cflags='-mfpu=neon' --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld' --enable-decoder='aac,h264,hevc' --enable-demuxer=aac --enable-decoder='aac,h264,hevc'" -- elide long configuration string from binary */ #define FFMPEG_LICENSE "LGPL version 2.1 or later" #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME linux #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 @@ -656,7 +657,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 0 -#define CONFIG_BSWAPDSP 0 +#define CONFIG_BSWAPDSP 1 #define CONFIG_CABAC 1 #define CONFIG_CBS 0 #define CONFIG_CBS_AV1 0 @@ -668,7 +669,7 @@ #define CONFIG_DEFLATE_WRAPPER 0 #define CONFIG_DIRAC_PARSE 1 #define CONFIG_DNN 0 -#define CONFIG_DOVI_RPU 0 +#define CONFIG_DOVI_RPU 1 #define CONFIG_DVPROFILE 0 #define CONFIG_EXIF 0 #define CONFIG_FAANDCT 0 @@ -686,8 +687,8 @@ #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 1 #define CONFIG_H264_SEI 1 -#define CONFIG_HEVCPARSE 0 -#define CONFIG_HEVC_SEI 0 +#define CONFIG_HEVCPARSE 1 +#define CONFIG_HEVC_SEI 1 #define CONFIG_HPELDSP 1 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm-neon/config_components.h b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm-neon/config_components.h index 3604442a..d0311ac8 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm-neon/config_components.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm-neon/config_components.h @@ -134,7 +134,7 @@ #define CONFIG_H264_QSV_DECODER 0 #define CONFIG_H264_RKMPP_DECODER 0 #define CONFIG_HAP_DECODER 0 -#define CONFIG_HEVC_DECODER 0 +#define CONFIG_HEVC_DECODER 1 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -959,7 +963,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 0 #define CONFIG_H264_PARSER 1 -#define CONFIG_HEVC_PARSER 0 +#define CONFIG_HEVC_PARSER 1 #define CONFIG_HDR_PARSER 0 #define CONFIG_IPU_PARSER 0 #define CONFIG_JPEG2000_PARSER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm-neon/libavcodec/codec_list.c b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm-neon/libavcodec/codec_list.c index cbd7f394..80d0456b 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm-neon/libavcodec/codec_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm-neon/libavcodec/codec_list.c @@ -17,4 +17,5 @@ static const FFCodec * const codec_list[] = { &ff_pcm_s32le_decoder, &ff_pcm_u8_decoder, &ff_libopus_decoder, + &ff_hevc_decoder, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm-neon/libavcodec/parser_list.c b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm-neon/libavcodec/parser_list.c index 50acddb2..1269282a 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm-neon/libavcodec/parser_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm-neon/libavcodec/parser_list.c @@ -8,4 +8,5 @@ static const AVCodecParser * const parser_list[] = { &ff_vp3_parser, &ff_vp8_parser, &ff_vp9_parser, + &ff_hevc_parser, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm-neon/libavutil/ffversion.h b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm-neon/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm-neon/libavutil/ffversion.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm-neon/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm/config.h b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm/config.h index ba6634d4..622f33cd 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm/config.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm/config.h @@ -1,12 +1,12 @@ /* Automatically generated by configure - do not modify! */ #ifndef FFMPEG_CONFIG_H #define FFMPEG_CONFIG_H -/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/liberato/src/release_chrome/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --arch=arm --enable-armv6 --enable-armv6t2 --enable-vfp --enable-thumb --extra-cflags='-march=armv7-a' --enable-cross-compile --target-os=linux --extra-cflags='--target=arm-linux-gnueabihf' --extra-ldflags='--target=arm-linux-gnueabihf' --sysroot=/usr/local/google/home/liberato/src/release_chrome/src/build/linux/debian_bullseye_arm-sysroot --extra-cflags='-mtune=cortex-a8' --extra-cflags='-mfloat-abi=hard' --extra-cflags=-O2 --disable-neon --extra-cflags='-mfpu=vfpv3-d16' --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld' --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264'" -- elide long configuration string from binary */ +/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/liberato/src/release_chrome/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --arch=arm --enable-armv6 --enable-armv6t2 --enable-vfp --enable-thumb --extra-cflags='-march=armv7-a' --enable-cross-compile --target-os=linux --extra-cflags='--target=arm-linux-gnueabihf' --extra-ldflags='--target=arm-linux-gnueabihf' --sysroot=/usr/local/google/home/liberato/src/release_chrome/src/build/linux/debian_bullseye_arm-sysroot --extra-cflags='-mtune=cortex-a8' --extra-cflags='-mfloat-abi=hard' --extra-cflags=-O2 --disable-neon --extra-cflags='-mfpu=vfpv3-d16' --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld' --enable-decoder='aac,h264,hevc' --enable-demuxer=aac --enable-decoder='aac,h264,hevc'" -- elide long configuration string from binary */ #define FFMPEG_LICENSE "LGPL version 2.1 or later" #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME linux #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 @@ -656,7 +657,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 0 -#define CONFIG_BSWAPDSP 0 +#define CONFIG_BSWAPDSP 1 #define CONFIG_CABAC 1 #define CONFIG_CBS 0 #define CONFIG_CBS_AV1 0 @@ -668,7 +669,7 @@ #define CONFIG_DEFLATE_WRAPPER 0 #define CONFIG_DIRAC_PARSE 1 #define CONFIG_DNN 0 -#define CONFIG_DOVI_RPU 0 +#define CONFIG_DOVI_RPU 1 #define CONFIG_DVPROFILE 0 #define CONFIG_EXIF 0 #define CONFIG_FAANDCT 0 @@ -686,8 +687,8 @@ #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 1 #define CONFIG_H264_SEI 1 -#define CONFIG_HEVCPARSE 0 -#define CONFIG_HEVC_SEI 0 +#define CONFIG_HEVCPARSE 1 +#define CONFIG_HEVC_SEI 1 #define CONFIG_HPELDSP 1 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm/config_components.h b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm/config_components.h index 3604442a..d0311ac8 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm/config_components.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm/config_components.h @@ -134,7 +134,7 @@ #define CONFIG_H264_QSV_DECODER 0 #define CONFIG_H264_RKMPP_DECODER 0 #define CONFIG_HAP_DECODER 0 -#define CONFIG_HEVC_DECODER 0 +#define CONFIG_HEVC_DECODER 1 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -959,7 +963,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 0 #define CONFIG_H264_PARSER 1 -#define CONFIG_HEVC_PARSER 0 +#define CONFIG_HEVC_PARSER 1 #define CONFIG_HDR_PARSER 0 #define CONFIG_IPU_PARSER 0 #define CONFIG_JPEG2000_PARSER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm/libavcodec/codec_list.c b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm/libavcodec/codec_list.c index cbd7f394..80d0456b 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm/libavcodec/codec_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm/libavcodec/codec_list.c @@ -17,4 +17,5 @@ static const FFCodec * const codec_list[] = { &ff_pcm_s32le_decoder, &ff_pcm_u8_decoder, &ff_libopus_decoder, + &ff_hevc_decoder, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm/libavcodec/parser_list.c b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm/libavcodec/parser_list.c index 50acddb2..1269282a 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm/libavcodec/parser_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm/libavcodec/parser_list.c @@ -8,4 +8,5 @@ static const AVCodecParser * const parser_list[] = { &ff_vp3_parser, &ff_vp8_parser, &ff_vp9_parser, + &ff_hevc_parser, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm/libavutil/ffversion.h b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm/libavutil/ffversion.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm64/config.h b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm64/config.h index 6f732b12..5cc92ff0 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm64/config.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm64/config.h @@ -1,12 +1,12 @@ /* Automatically generated by configure - do not modify! */ #ifndef FFMPEG_CONFIG_H #define FFMPEG_CONFIG_H -/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/liberato/src/release_chrome/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --enable-cross-compile --cross-prefix=/usr/bin/aarch64-linux-gnu- --extra-cflags='--target=aarch64-linux-gnu' --extra-ldflags='--target=aarch64-linux-gnu' --target-os=linux --sysroot=/usr/local/google/home/liberato/src/release_chrome/src/build/linux/debian_bullseye_arm64-sysroot --arch=aarch64 --enable-armv8 --extra-cflags='-march=armv8-a' --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld' --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264'" -- elide long configuration string from binary */ +/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/liberato/src/release_chrome/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --enable-cross-compile --cross-prefix=/usr/bin/aarch64-linux-gnu- --extra-cflags='--target=aarch64-linux-gnu' --extra-ldflags='--target=aarch64-linux-gnu' --target-os=linux --sysroot=/usr/local/google/home/liberato/src/release_chrome/src/build/linux/debian_bullseye_arm64-sysroot --arch=aarch64 --enable-armv8 --extra-cflags='-march=armv8-a' --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld' --enable-decoder='aac,h264,hevc' --enable-demuxer=aac --enable-decoder='aac,h264,hevc'" -- elide long configuration string from binary */ #define FFMPEG_LICENSE "LGPL version 2.1 or later" #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME linux #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 @@ -656,7 +657,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 0 -#define CONFIG_BSWAPDSP 0 +#define CONFIG_BSWAPDSP 1 #define CONFIG_CABAC 1 #define CONFIG_CBS 0 #define CONFIG_CBS_AV1 0 @@ -668,7 +669,7 @@ #define CONFIG_DEFLATE_WRAPPER 0 #define CONFIG_DIRAC_PARSE 1 #define CONFIG_DNN 0 -#define CONFIG_DOVI_RPU 0 +#define CONFIG_DOVI_RPU 1 #define CONFIG_DVPROFILE 0 #define CONFIG_EXIF 0 #define CONFIG_FAANDCT 0 @@ -686,8 +687,8 @@ #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 1 #define CONFIG_H264_SEI 1 -#define CONFIG_HEVCPARSE 0 -#define CONFIG_HEVC_SEI 0 +#define CONFIG_HEVCPARSE 1 +#define CONFIG_HEVC_SEI 1 #define CONFIG_HPELDSP 1 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm64/config_components.h b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm64/config_components.h index 3604442a..d0311ac8 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm64/config_components.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm64/config_components.h @@ -134,7 +134,7 @@ #define CONFIG_H264_QSV_DECODER 0 #define CONFIG_H264_RKMPP_DECODER 0 #define CONFIG_HAP_DECODER 0 -#define CONFIG_HEVC_DECODER 0 +#define CONFIG_HEVC_DECODER 1 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -959,7 +963,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 0 #define CONFIG_H264_PARSER 1 -#define CONFIG_HEVC_PARSER 0 +#define CONFIG_HEVC_PARSER 1 #define CONFIG_HDR_PARSER 0 #define CONFIG_IPU_PARSER 0 #define CONFIG_JPEG2000_PARSER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm64/libavcodec/codec_list.c b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm64/libavcodec/codec_list.c index cbd7f394..80d0456b 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm64/libavcodec/codec_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm64/libavcodec/codec_list.c @@ -17,4 +17,5 @@ static const FFCodec * const codec_list[] = { &ff_pcm_s32le_decoder, &ff_pcm_u8_decoder, &ff_libopus_decoder, + &ff_hevc_decoder, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm64/libavcodec/parser_list.c b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm64/libavcodec/parser_list.c index 50acddb2..1269282a 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm64/libavcodec/parser_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm64/libavcodec/parser_list.c @@ -8,4 +8,5 @@ static const AVCodecParser * const parser_list[] = { &ff_vp3_parser, &ff_vp8_parser, &ff_vp9_parser, + &ff_hevc_parser, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm64/libavutil/ffversion.h b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm64/libavutil/ffversion.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/arm64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/config.asm b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/config.asm index 277c96b3..53d8e0d2 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/config.asm +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/config.asm @@ -329,6 +329,7 @@ %define HAVE_BCRYPT 0 %define HAVE_VAAPI_DRM 0 %define HAVE_VAAPI_X11 0 +%define HAVE_VAAPI_WIN32 0 %define HAVE_VDPAU_X11 0 %define HAVE_PTHREADS 1 %define HAVE_OS2THREADS 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/config.h b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/config.h index c39827e8..14e73271 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/config.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/config.h @@ -1,12 +1,12 @@ /* Automatically generated by configure - do not modify! */ #ifndef FFMPEG_CONFIG_H #define FFMPEG_CONFIG_H -/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/liberato/src/release_chrome/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --arch=i686 --extra-cflags='\"-m32\"' --extra-ldflags='\"-m32\"' --enable-pic --cc=clang --cxx=clang++ --ld=clang --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264'" -- elide long configuration string from binary */ +/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/liberato/src/release_chrome/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --arch=i686 --extra-cflags='\"-m32\"' --extra-ldflags='\"-m32\"' --enable-pic --cc=clang --cxx=clang++ --ld=clang --enable-decoder='aac,h264,hevc' --enable-demuxer=aac --enable-decoder='aac,h264,hevc'" -- elide long configuration string from binary */ #define FFMPEG_LICENSE "LGPL version 2.1 or later" #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME linux #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 @@ -656,7 +657,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 0 -#define CONFIG_BSWAPDSP 0 +#define CONFIG_BSWAPDSP 1 #define CONFIG_CABAC 1 #define CONFIG_CBS 0 #define CONFIG_CBS_AV1 0 @@ -668,7 +669,7 @@ #define CONFIG_DEFLATE_WRAPPER 0 #define CONFIG_DIRAC_PARSE 1 #define CONFIG_DNN 0 -#define CONFIG_DOVI_RPU 0 +#define CONFIG_DOVI_RPU 1 #define CONFIG_DVPROFILE 0 #define CONFIG_EXIF 0 #define CONFIG_FAANDCT 0 @@ -686,8 +687,8 @@ #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 1 #define CONFIG_H264_SEI 1 -#define CONFIG_HEVCPARSE 0 -#define CONFIG_HEVC_SEI 0 +#define CONFIG_HEVCPARSE 1 +#define CONFIG_HEVC_SEI 1 #define CONFIG_HPELDSP 1 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/config_components.h b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/config_components.h index 3604442a..d0311ac8 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/config_components.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/config_components.h @@ -134,7 +134,7 @@ #define CONFIG_H264_QSV_DECODER 0 #define CONFIG_H264_RKMPP_DECODER 0 #define CONFIG_HAP_DECODER 0 -#define CONFIG_HEVC_DECODER 0 +#define CONFIG_HEVC_DECODER 1 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -959,7 +963,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 0 #define CONFIG_H264_PARSER 1 -#define CONFIG_HEVC_PARSER 0 +#define CONFIG_HEVC_PARSER 1 #define CONFIG_HDR_PARSER 0 #define CONFIG_IPU_PARSER 0 #define CONFIG_JPEG2000_PARSER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/libavcodec/codec_list.c b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/libavcodec/codec_list.c index cbd7f394..80d0456b 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/libavcodec/codec_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/libavcodec/codec_list.c @@ -17,4 +17,5 @@ static const FFCodec * const codec_list[] = { &ff_pcm_s32le_decoder, &ff_pcm_u8_decoder, &ff_libopus_decoder, + &ff_hevc_decoder, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/libavcodec/parser_list.c b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/libavcodec/parser_list.c index 50acddb2..1269282a 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/libavcodec/parser_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/libavcodec/parser_list.c @@ -8,4 +8,5 @@ static const AVCodecParser * const parser_list[] = { &ff_vp3_parser, &ff_vp8_parser, &ff_vp9_parser, + &ff_hevc_parser, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/libavutil/ffversion.h b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/libavutil/ffversion.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/x64/config.asm b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/x64/config.asm index 363c3e99..33f1bde5 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/x64/config.asm +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/x64/config.asm @@ -329,6 +329,7 @@ %define HAVE_BCRYPT 0 %define HAVE_VAAPI_DRM 0 %define HAVE_VAAPI_X11 0 +%define HAVE_VAAPI_WIN32 0 %define HAVE_VDPAU_X11 0 %define HAVE_PTHREADS 1 %define HAVE_OS2THREADS 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/x64/config.h b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/x64/config.h index 2dc833e5..a726c3f0 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/x64/config.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/x64/config.h @@ -1,12 +1,12 @@ /* Automatically generated by configure - do not modify! */ #ifndef FFMPEG_CONFIG_H #define FFMPEG_CONFIG_H -/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/liberato/src/release_chrome/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --enable-lto --arch=x86_64 --target-os=linux --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld' --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264'" -- elide long configuration string from binary */ +/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/liberato/src/release_chrome/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --enable-lto --arch=x86_64 --target-os=linux --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld' --enable-decoder='aac,h264,hevc' --enable-demuxer=aac --enable-decoder='aac,h264,hevc'" -- elide long configuration string from binary */ #define FFMPEG_LICENSE "LGPL version 2.1 or later" #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME linux #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 @@ -656,7 +657,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 0 -#define CONFIG_BSWAPDSP 0 +#define CONFIG_BSWAPDSP 1 #define CONFIG_CABAC 1 #define CONFIG_CBS 0 #define CONFIG_CBS_AV1 0 @@ -668,7 +669,7 @@ #define CONFIG_DEFLATE_WRAPPER 0 #define CONFIG_DIRAC_PARSE 1 #define CONFIG_DNN 0 -#define CONFIG_DOVI_RPU 0 +#define CONFIG_DOVI_RPU 1 #define CONFIG_DVPROFILE 0 #define CONFIG_EXIF 0 #define CONFIG_FAANDCT 0 @@ -686,8 +687,8 @@ #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 1 #define CONFIG_H264_SEI 1 -#define CONFIG_HEVCPARSE 0 -#define CONFIG_HEVC_SEI 0 +#define CONFIG_HEVCPARSE 1 +#define CONFIG_HEVC_SEI 1 #define CONFIG_HPELDSP 1 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/x64/config_components.h b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/x64/config_components.h index 3604442a..d0311ac8 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/x64/config_components.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/x64/config_components.h @@ -134,7 +134,7 @@ #define CONFIG_H264_QSV_DECODER 0 #define CONFIG_H264_RKMPP_DECODER 0 #define CONFIG_HAP_DECODER 0 -#define CONFIG_HEVC_DECODER 0 +#define CONFIG_HEVC_DECODER 1 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -959,7 +963,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 0 #define CONFIG_H264_PARSER 1 -#define CONFIG_HEVC_PARSER 0 +#define CONFIG_HEVC_PARSER 1 #define CONFIG_HDR_PARSER 0 #define CONFIG_IPU_PARSER 0 #define CONFIG_JPEG2000_PARSER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/x64/libavcodec/codec_list.c b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/x64/libavcodec/codec_list.c index cbd7f394..80d0456b 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/x64/libavcodec/codec_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/x64/libavcodec/codec_list.c @@ -17,4 +17,5 @@ static const FFCodec * const codec_list[] = { &ff_pcm_s32le_decoder, &ff_pcm_u8_decoder, &ff_libopus_decoder, + &ff_hevc_decoder, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/x64/libavcodec/parser_list.c b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/x64/libavcodec/parser_list.c index 50acddb2..1269282a 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/x64/libavcodec/parser_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/x64/libavcodec/parser_list.c @@ -8,4 +8,5 @@ static const AVCodecParser * const parser_list[] = { &ff_vp3_parser, &ff_vp8_parser, &ff_vp9_parser, + &ff_hevc_parser, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/x64/libavutil/ffversion.h b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/x64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/x64/libavutil/ffversion.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/linux/x64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/mac/arm64/config.h b/arm/android/third_party/ffmpeg/chromium/config/Chrome/mac/arm64/config.h index 4a2c9afb..741f2c7f 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/mac/arm64/config.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/mac/arm64/config.h @@ -1,12 +1,12 @@ /* Automatically generated by configure - do not modify! */ #ifndef FFMPEG_CONFIG_H #define FFMPEG_CONFIG_H -/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/liberato/src/release_chrome/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --enable-pic --cc=clang --cxx=clang++ --ld=clang --enable-cross-compile --cc=clang --ld=ld64.lld --nm=llvm-nm --ar=llvm-ar --target-os=darwin --extra-cflags='--target=arm64-apple-macosx' --extra-cflags=-F/usr/local/google/home/liberato/src/release_chrome/src/build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks --extra-cflags='-mmacosx-version-min=10.10' --extra-cflags=-fblocks --extra-cflags=-nostdinc --extra-cflags=-isystem/usr/local/google/home/liberato/src/release_chrome/src/build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include --extra-cflags=-isystem/usr/local/google/home/liberato/src/release_chrome/src/third_party/llvm-build/Release+Asserts/lib/clang/17/include --extra-ldflags=-syslibroot --extra-ldflags=/usr/local/google/home/liberato/src/release_chrome/src/build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk --extra-ldflags=-L/usr/local/google/home/liberato/src/release_chrome/src/build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib --extra-ldflags=-lSystem --extra-ldflags=-macosx_version_min --extra-ldflags=10.10 --extra-ldflags=-sdk_version --extra-ldflags=10.10 --extra-ldflags=-platform_version --extra-ldflags=macos --extra-ldflags=10.10 --extra-ldflags=10.10 --arch=arm64 --extra-cflags='-arch arm64' --extra-ldflags='-arch arm64' --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264'" -- elide long configuration string from binary */ +/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/liberato/src/release_chrome/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --enable-pic --cc=clang --cxx=clang++ --ld=clang --enable-cross-compile --cc=clang --ld=ld64.lld --nm=llvm-nm --ar=llvm-ar --target-os=darwin --extra-cflags='--target=arm64-apple-macosx' --extra-cflags=-F/usr/local/google/home/liberato/src/release_chrome/src/build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks --extra-cflags='-mmacosx-version-min=10.10' --extra-cflags=-fblocks --extra-cflags=-nostdinc --extra-cflags=-isystem/usr/local/google/home/liberato/src/release_chrome/src/build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include --extra-cflags=-isystem/usr/local/google/home/liberato/src/release_chrome/src/third_party/llvm-build/Release+Asserts/lib/clang/17/include --extra-ldflags=-syslibroot --extra-ldflags=/usr/local/google/home/liberato/src/release_chrome/src/build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk --extra-ldflags=-L/usr/local/google/home/liberato/src/release_chrome/src/build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib --extra-ldflags=-lSystem --extra-ldflags=-macosx_version_min --extra-ldflags=10.10 --extra-ldflags=-sdk_version --extra-ldflags=10.10 --extra-ldflags=-platform_version --extra-ldflags=macos --extra-ldflags=10.10 --extra-ldflags=10.10 --arch=arm64 --extra-cflags='-arch arm64' --extra-ldflags='-arch arm64' --enable-decoder='aac,h264,hevc' --enable-demuxer=aac --enable-decoder='aac,h264,hevc'" -- elide long configuration string from binary */ #define FFMPEG_LICENSE "LGPL version 2.1 or later" #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME darwin #define av_restrict restrict #define EXTERN_PREFIX "_" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 @@ -656,7 +657,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 0 -#define CONFIG_BSWAPDSP 0 +#define CONFIG_BSWAPDSP 1 #define CONFIG_CABAC 1 #define CONFIG_CBS 0 #define CONFIG_CBS_AV1 0 @@ -668,7 +669,7 @@ #define CONFIG_DEFLATE_WRAPPER 0 #define CONFIG_DIRAC_PARSE 1 #define CONFIG_DNN 0 -#define CONFIG_DOVI_RPU 0 +#define CONFIG_DOVI_RPU 1 #define CONFIG_DVPROFILE 0 #define CONFIG_EXIF 0 #define CONFIG_FAANDCT 0 @@ -686,8 +687,8 @@ #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 1 #define CONFIG_H264_SEI 1 -#define CONFIG_HEVCPARSE 0 -#define CONFIG_HEVC_SEI 0 +#define CONFIG_HEVCPARSE 1 +#define CONFIG_HEVC_SEI 1 #define CONFIG_HPELDSP 1 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/mac/arm64/config_components.h b/arm/android/third_party/ffmpeg/chromium/config/Chrome/mac/arm64/config_components.h index 3604442a..d0311ac8 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/mac/arm64/config_components.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/mac/arm64/config_components.h @@ -134,7 +134,7 @@ #define CONFIG_H264_QSV_DECODER 0 #define CONFIG_H264_RKMPP_DECODER 0 #define CONFIG_HAP_DECODER 0 -#define CONFIG_HEVC_DECODER 0 +#define CONFIG_HEVC_DECODER 1 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -959,7 +963,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 0 #define CONFIG_H264_PARSER 1 -#define CONFIG_HEVC_PARSER 0 +#define CONFIG_HEVC_PARSER 1 #define CONFIG_HDR_PARSER 0 #define CONFIG_IPU_PARSER 0 #define CONFIG_JPEG2000_PARSER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/mac/arm64/libavcodec/codec_list.c b/arm/android/third_party/ffmpeg/chromium/config/Chrome/mac/arm64/libavcodec/codec_list.c index cbd7f394..80d0456b 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/mac/arm64/libavcodec/codec_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/mac/arm64/libavcodec/codec_list.c @@ -17,4 +17,5 @@ static const FFCodec * const codec_list[] = { &ff_pcm_s32le_decoder, &ff_pcm_u8_decoder, &ff_libopus_decoder, + &ff_hevc_decoder, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/mac/arm64/libavcodec/parser_list.c b/arm/android/third_party/ffmpeg/chromium/config/Chrome/mac/arm64/libavcodec/parser_list.c index 50acddb2..1269282a 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/mac/arm64/libavcodec/parser_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/mac/arm64/libavcodec/parser_list.c @@ -8,4 +8,5 @@ static const AVCodecParser * const parser_list[] = { &ff_vp3_parser, &ff_vp8_parser, &ff_vp9_parser, + &ff_hevc_parser, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/mac/arm64/libavutil/ffversion.h b/arm/android/third_party/ffmpeg/chromium/config/Chrome/mac/arm64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/mac/arm64/libavutil/ffversion.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/mac/arm64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/mac/x64/config.asm b/arm/android/third_party/ffmpeg/chromium/config/Chrome/mac/x64/config.asm index 9bdc5d84..d419ad37 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/mac/x64/config.asm +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/mac/x64/config.asm @@ -329,6 +329,7 @@ %define HAVE_BCRYPT 0 %define HAVE_VAAPI_DRM 0 %define HAVE_VAAPI_X11 0 +%define HAVE_VAAPI_WIN32 0 %define HAVE_VDPAU_X11 0 %define HAVE_PTHREADS 1 %define HAVE_OS2THREADS 0 @@ -640,7 +641,7 @@ %define CONFIG_AUDIO_FRAME_QUEUE 0 %define CONFIG_AUDIODSP 0 %define CONFIG_BLOCKDSP 0 -%define CONFIG_BSWAPDSP 0 +%define CONFIG_BSWAPDSP 1 %define CONFIG_CABAC 1 %define CONFIG_CBS 0 %define CONFIG_CBS_AV1 0 @@ -652,7 +653,7 @@ %define CONFIG_DEFLATE_WRAPPER 0 %define CONFIG_DIRAC_PARSE 1 %define CONFIG_DNN 0 -%define CONFIG_DOVI_RPU 0 +%define CONFIG_DOVI_RPU 1 %define CONFIG_DVPROFILE 0 %define CONFIG_EXIF 0 %define CONFIG_FAANDCT 0 @@ -670,8 +671,8 @@ %define CONFIG_H264PRED 1 %define CONFIG_H264QPEL 1 %define CONFIG_H264_SEI 1 -%define CONFIG_HEVCPARSE 0 -%define CONFIG_HEVC_SEI 0 +%define CONFIG_HEVCPARSE 1 +%define CONFIG_HEVC_SEI 1 %define CONFIG_HPELDSP 1 %define CONFIG_HUFFMAN 0 %define CONFIG_HUFFYUVDSP 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/mac/x64/config.h b/arm/android/third_party/ffmpeg/chromium/config/Chrome/mac/x64/config.h index 638ac95a..13863d1a 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/mac/x64/config.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/mac/x64/config.h @@ -1,12 +1,12 @@ /* Automatically generated by configure - do not modify! */ #ifndef FFMPEG_CONFIG_H #define FFMPEG_CONFIG_H -/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/liberato/src/release_chrome/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --enable-pic --cc=clang --cxx=clang++ --ld=clang --enable-cross-compile --cc=clang --ld=ld64.lld --nm=llvm-nm --ar=llvm-ar --target-os=darwin --extra-cflags='--target=x86_64-apple-macosx' --extra-cflags=-F/usr/local/google/home/liberato/src/release_chrome/src/build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks --extra-cflags='-mmacosx-version-min=10.10' --extra-cflags=-fblocks --extra-cflags=-nostdinc --extra-cflags=-isystem/usr/local/google/home/liberato/src/release_chrome/src/build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include --extra-cflags=-isystem/usr/local/google/home/liberato/src/release_chrome/src/third_party/llvm-build/Release+Asserts/lib/clang/17/include --extra-ldflags=-syslibroot --extra-ldflags=/usr/local/google/home/liberato/src/release_chrome/src/build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk --extra-ldflags=-L/usr/local/google/home/liberato/src/release_chrome/src/build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib --extra-ldflags=-lSystem --extra-ldflags=-macosx_version_min --extra-ldflags=10.10 --extra-ldflags=-sdk_version --extra-ldflags=10.10 --extra-ldflags=-platform_version --extra-ldflags=macos --extra-ldflags=10.10 --extra-ldflags=10.10 --arch=x86_64 --extra-cflags=-m64 --extra-ldflags='-arch x86_64' --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264'" -- elide long configuration string from binary */ +/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/liberato/src/release_chrome/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --enable-pic --cc=clang --cxx=clang++ --ld=clang --enable-cross-compile --cc=clang --ld=ld64.lld --nm=llvm-nm --ar=llvm-ar --target-os=darwin --extra-cflags='--target=x86_64-apple-macosx' --extra-cflags=-F/usr/local/google/home/liberato/src/release_chrome/src/build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks --extra-cflags='-mmacosx-version-min=10.10' --extra-cflags=-fblocks --extra-cflags=-nostdinc --extra-cflags=-isystem/usr/local/google/home/liberato/src/release_chrome/src/build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include --extra-cflags=-isystem/usr/local/google/home/liberato/src/release_chrome/src/third_party/llvm-build/Release+Asserts/lib/clang/17/include --extra-ldflags=-syslibroot --extra-ldflags=/usr/local/google/home/liberato/src/release_chrome/src/build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk --extra-ldflags=-L/usr/local/google/home/liberato/src/release_chrome/src/build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib --extra-ldflags=-lSystem --extra-ldflags=-macosx_version_min --extra-ldflags=10.10 --extra-ldflags=-sdk_version --extra-ldflags=10.10 --extra-ldflags=-platform_version --extra-ldflags=macos --extra-ldflags=10.10 --extra-ldflags=10.10 --arch=x86_64 --extra-cflags=-m64 --extra-ldflags='-arch x86_64' --enable-decoder='aac,h264,hevc' --enable-demuxer=aac --enable-decoder='aac,h264,hevc'" -- elide long configuration string from binary */ #define FFMPEG_LICENSE "LGPL version 2.1 or later" #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME darwin #define av_restrict restrict #define EXTERN_PREFIX "_" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 @@ -656,7 +657,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 0 -#define CONFIG_BSWAPDSP 0 +#define CONFIG_BSWAPDSP 1 #define CONFIG_CABAC 1 #define CONFIG_CBS 0 #define CONFIG_CBS_AV1 0 @@ -668,7 +669,7 @@ #define CONFIG_DEFLATE_WRAPPER 0 #define CONFIG_DIRAC_PARSE 1 #define CONFIG_DNN 0 -#define CONFIG_DOVI_RPU 0 +#define CONFIG_DOVI_RPU 1 #define CONFIG_DVPROFILE 0 #define CONFIG_EXIF 0 #define CONFIG_FAANDCT 0 @@ -686,8 +687,8 @@ #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 1 #define CONFIG_H264_SEI 1 -#define CONFIG_HEVCPARSE 0 -#define CONFIG_HEVC_SEI 0 +#define CONFIG_HEVCPARSE 1 +#define CONFIG_HEVC_SEI 1 #define CONFIG_HPELDSP 1 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/mac/x64/config_components.h b/arm/android/third_party/ffmpeg/chromium/config/Chrome/mac/x64/config_components.h index 3604442a..d0311ac8 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/mac/x64/config_components.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/mac/x64/config_components.h @@ -134,7 +134,7 @@ #define CONFIG_H264_QSV_DECODER 0 #define CONFIG_H264_RKMPP_DECODER 0 #define CONFIG_HAP_DECODER 0 -#define CONFIG_HEVC_DECODER 0 +#define CONFIG_HEVC_DECODER 1 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -959,7 +963,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 0 #define CONFIG_H264_PARSER 1 -#define CONFIG_HEVC_PARSER 0 +#define CONFIG_HEVC_PARSER 1 #define CONFIG_HDR_PARSER 0 #define CONFIG_IPU_PARSER 0 #define CONFIG_JPEG2000_PARSER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/mac/x64/libavcodec/codec_list.c b/arm/android/third_party/ffmpeg/chromium/config/Chrome/mac/x64/libavcodec/codec_list.c index cbd7f394..80d0456b 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/mac/x64/libavcodec/codec_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/mac/x64/libavcodec/codec_list.c @@ -17,4 +17,5 @@ static const FFCodec * const codec_list[] = { &ff_pcm_s32le_decoder, &ff_pcm_u8_decoder, &ff_libopus_decoder, + &ff_hevc_decoder, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/mac/x64/libavcodec/parser_list.c b/arm/android/third_party/ffmpeg/chromium/config/Chrome/mac/x64/libavcodec/parser_list.c index 50acddb2..1269282a 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/mac/x64/libavcodec/parser_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/mac/x64/libavcodec/parser_list.c @@ -8,4 +8,5 @@ static const AVCodecParser * const parser_list[] = { &ff_vp3_parser, &ff_vp8_parser, &ff_vp9_parser, + &ff_hevc_parser, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/mac/x64/libavutil/ffversion.h b/arm/android/third_party/ffmpeg/chromium/config/Chrome/mac/x64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/mac/x64/libavutil/ffversion.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/mac/x64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/win-msvc/ia32/config.asm b/arm/android/third_party/ffmpeg/chromium/config/Chrome/win-msvc/ia32/config.asm index ac13ddab..1305cdb7 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/win-msvc/ia32/config.asm +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/win-msvc/ia32/config.asm @@ -563,7 +563,7 @@ %define CONFIG_AUDIO_FRAME_QUEUE 0 %define CONFIG_AUDIODSP 0 %define CONFIG_BLOCKDSP 0 -%define CONFIG_BSWAPDSP 0 +%define CONFIG_BSWAPDSP 1 %define CONFIG_CABAC 1 %define CONFIG_CBS 0 %define CONFIG_CBS_H264 0 @@ -587,7 +587,7 @@ %define CONFIG_H264PARSE 1 %define CONFIG_H264PRED 1 %define CONFIG_H264QPEL 1 -%define CONFIG_HEVCPARSE 0 +%define CONFIG_HEVCPARSE 1 %define CONFIG_HPELDSP 1 %define CONFIG_HUFFMAN 0 %define CONFIG_HUFFYUVDSP 0 @@ -752,7 +752,7 @@ %define CONFIG_H264_QSV_DECODER 0 %define CONFIG_H264_RKMPP_DECODER 0 %define CONFIG_HAP_DECODER 0 -%define CONFIG_HEVC_DECODER 0 +%define CONFIG_HEVC_DECODER 1 %define CONFIG_HEVC_QSV_DECODER 0 %define CONFIG_HEVC_RKMPP_DECODER 0 %define CONFIG_HEVC_V4L2M2M_DECODER 0 @@ -1450,7 +1450,7 @@ %define CONFIG_H261_PARSER 0 %define CONFIG_H263_PARSER 0 %define CONFIG_H264_PARSER 1 -%define CONFIG_HEVC_PARSER 0 +%define CONFIG_HEVC_PARSER 1 %define CONFIG_MJPEG_PARSER 0 %define CONFIG_MLP_PARSER 0 %define CONFIG_MPEG4VIDEO_PARSER 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/win-msvc/ia32/config.h b/arm/android/third_party/ffmpeg/chromium/config/Chrome/win-msvc/ia32/config.h index 90497d03..0b6d522e 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/win-msvc/ia32/config.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/win-msvc/ia32/config.h @@ -1,7 +1,7 @@ /* Automatically generated by configure - do not modify! */ #ifndef FFMPEG_CONFIG_H #define FFMPEG_CONFIG_H -/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio' --extra-cflags=-I/cygdrive/d/chromium/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=yasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --toolchain=msvc --extra-cflags=-I/cygdrive/d/chromium/src/third_party/ffmpeg/chromium/include/win --cc='cygwin-wrapper cl' --ld='cygwin-wrapper link' --nm='cygwin-wrapper dumpbin -symbols' --ar='cygwin-wrapper lib' --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264'" -- elide long configuration string from binary */ +/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio' --extra-cflags=-I/cygdrive/d/chromium/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=yasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --toolchain=msvc --extra-cflags=-I/cygdrive/d/chromium/src/third_party/ffmpeg/chromium/include/win --cc='cygwin-wrapper cl' --ld='cygwin-wrapper link' --nm='cygwin-wrapper dumpbin -symbols' --ar='cygwin-wrapper lib' --enable-decoder='aac,h264,hevc' --enable-demuxer=aac --enable-decoder='aac,h264,hevc'" -- elide long configuration string from binary */ #define FFMPEG_LICENSE "LGPL version 2.1 or later" #define CONFIG_THIS_YEAR 2018 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" @@ -578,7 +578,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 0 -#define CONFIG_BSWAPDSP 0 +#define CONFIG_BSWAPDSP 1 #define CONFIG_CABAC 1 #define CONFIG_CBS 0 #define CONFIG_CBS_H264 0 @@ -602,7 +602,7 @@ #define CONFIG_H264PARSE 1 #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 1 -#define CONFIG_HEVCPARSE 0 +#define CONFIG_HEVCPARSE 1 #define CONFIG_HPELDSP 1 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 @@ -767,7 +767,7 @@ #define CONFIG_H264_QSV_DECODER 0 #define CONFIG_H264_RKMPP_DECODER 0 #define CONFIG_HAP_DECODER 0 -#define CONFIG_HEVC_DECODER 0 +#define CONFIG_HEVC_DECODER 1 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 @@ -1465,7 +1465,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 0 #define CONFIG_H264_PARSER 1 -#define CONFIG_HEVC_PARSER 0 +#define CONFIG_HEVC_PARSER 1 #define CONFIG_MJPEG_PARSER 0 #define CONFIG_MLP_PARSER 0 #define CONFIG_MPEG4VIDEO_PARSER 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/win-msvc/ia32/libavcodec/codec_list.c b/arm/android/third_party/ffmpeg/chromium/config/Chrome/win-msvc/ia32/libavcodec/codec_list.c index 49f757b2..5ca1e995 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/win-msvc/ia32/libavcodec/codec_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/win-msvc/ia32/libavcodec/codec_list.c @@ -17,4 +17,5 @@ static const AVCodec * const codec_list[] = { &ff_pcm_s32le_decoder, &ff_pcm_u8_decoder, &ff_libopus_decoder, + &ff_hevc_decoder, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/win-msvc/ia32/libavcodec/parser_list.c b/arm/android/third_party/ffmpeg/chromium/config/Chrome/win-msvc/ia32/libavcodec/parser_list.c index 19d670aa..f55c2ca4 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/win-msvc/ia32/libavcodec/parser_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/win-msvc/ia32/libavcodec/parser_list.c @@ -7,4 +7,5 @@ static const AVCodecParser * const parser_list[] = { &ff_vorbis_parser, &ff_vp3_parser, &ff_vp8_parser, + &ff_hevc_parser, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/win-msvc/x64/config.asm b/arm/android/third_party/ffmpeg/chromium/config/Chrome/win-msvc/x64/config.asm index 49d66ac5..c3e7f4de 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/win-msvc/x64/config.asm +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/win-msvc/x64/config.asm @@ -563,7 +563,7 @@ %define CONFIG_AUDIO_FRAME_QUEUE 0 %define CONFIG_AUDIODSP 0 %define CONFIG_BLOCKDSP 0 -%define CONFIG_BSWAPDSP 0 +%define CONFIG_BSWAPDSP 1 %define CONFIG_CABAC 1 %define CONFIG_CBS 0 %define CONFIG_CBS_H264 0 @@ -587,7 +587,7 @@ %define CONFIG_H264PARSE 1 %define CONFIG_H264PRED 1 %define CONFIG_H264QPEL 1 -%define CONFIG_HEVCPARSE 0 +%define CONFIG_HEVCPARSE 1 %define CONFIG_HPELDSP 1 %define CONFIG_HUFFMAN 0 %define CONFIG_HUFFYUVDSP 0 @@ -752,7 +752,7 @@ %define CONFIG_H264_QSV_DECODER 0 %define CONFIG_H264_RKMPP_DECODER 0 %define CONFIG_HAP_DECODER 0 -%define CONFIG_HEVC_DECODER 0 +%define CONFIG_HEVC_DECODER 1 %define CONFIG_HEVC_QSV_DECODER 0 %define CONFIG_HEVC_RKMPP_DECODER 0 %define CONFIG_HEVC_V4L2M2M_DECODER 0 @@ -1450,7 +1450,7 @@ %define CONFIG_H261_PARSER 0 %define CONFIG_H263_PARSER 0 %define CONFIG_H264_PARSER 1 -%define CONFIG_HEVC_PARSER 0 +%define CONFIG_HEVC_PARSER 1 %define CONFIG_MJPEG_PARSER 0 %define CONFIG_MLP_PARSER 0 %define CONFIG_MPEG4VIDEO_PARSER 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/win-msvc/x64/config.h b/arm/android/third_party/ffmpeg/chromium/config/Chrome/win-msvc/x64/config.h index 35968217..d45775e3 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/win-msvc/x64/config.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/win-msvc/x64/config.h @@ -1,7 +1,7 @@ /* Automatically generated by configure - do not modify! */ #ifndef FFMPEG_CONFIG_H #define FFMPEG_CONFIG_H -/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio' --extra-cflags=-I/cygdrive/d/chromium/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=yasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --toolchain=msvc --extra-cflags=-I/cygdrive/d/chromium/src/third_party/ffmpeg/chromium/include/win --cc='cygwin-wrapper cl' --ld='cygwin-wrapper link' --nm='cygwin-wrapper dumpbin -symbols' --ar='cygwin-wrapper lib' --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264'" -- elide long configuration string from binary */ +/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio' --extra-cflags=-I/cygdrive/d/chromium/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=yasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --toolchain=msvc --extra-cflags=-I/cygdrive/d/chromium/src/third_party/ffmpeg/chromium/include/win --cc='cygwin-wrapper cl' --ld='cygwin-wrapper link' --nm='cygwin-wrapper dumpbin -symbols' --ar='cygwin-wrapper lib' --enable-decoder='aac,h264,hevc' --enable-demuxer=aac --enable-decoder='aac,h264,hevc'" -- elide long configuration string from binary */ #define FFMPEG_LICENSE "LGPL version 2.1 or later" #define CONFIG_THIS_YEAR 2018 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" @@ -578,7 +578,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 0 -#define CONFIG_BSWAPDSP 0 +#define CONFIG_BSWAPDSP 1 #define CONFIG_CABAC 1 #define CONFIG_CBS 0 #define CONFIG_CBS_H264 0 @@ -602,7 +602,7 @@ #define CONFIG_H264PARSE 1 #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 1 -#define CONFIG_HEVCPARSE 0 +#define CONFIG_HEVCPARSE 1 #define CONFIG_HPELDSP 1 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 @@ -767,7 +767,7 @@ #define CONFIG_H264_QSV_DECODER 0 #define CONFIG_H264_RKMPP_DECODER 0 #define CONFIG_HAP_DECODER 0 -#define CONFIG_HEVC_DECODER 0 +#define CONFIG_HEVC_DECODER 1 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 @@ -1465,7 +1465,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 0 #define CONFIG_H264_PARSER 1 -#define CONFIG_HEVC_PARSER 0 +#define CONFIG_HEVC_PARSER 1 #define CONFIG_MJPEG_PARSER 0 #define CONFIG_MLP_PARSER 0 #define CONFIG_MPEG4VIDEO_PARSER 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/win-msvc/x64/libavcodec/codec_list.c b/arm/android/third_party/ffmpeg/chromium/config/Chrome/win-msvc/x64/libavcodec/codec_list.c index 49f757b2..5ca1e995 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/win-msvc/x64/libavcodec/codec_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/win-msvc/x64/libavcodec/codec_list.c @@ -17,4 +17,5 @@ static const AVCodec * const codec_list[] = { &ff_pcm_s32le_decoder, &ff_pcm_u8_decoder, &ff_libopus_decoder, + &ff_hevc_decoder, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/win-msvc/x64/libavcodec/parser_list.c b/arm/android/third_party/ffmpeg/chromium/config/Chrome/win-msvc/x64/libavcodec/parser_list.c index 19d670aa..f55c2ca4 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/win-msvc/x64/libavcodec/parser_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/win-msvc/x64/libavcodec/parser_list.c @@ -7,4 +7,5 @@ static const AVCodecParser * const parser_list[] = { &ff_vorbis_parser, &ff_vp3_parser, &ff_vp8_parser, + &ff_hevc_parser, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/arm64/config.h b/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/arm64/config.h index ba18416b..d8b32c92 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/arm64/config.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/arm64/config.h @@ -1,12 +1,12 @@ /* Automatically generated by configure - do not modify! */ #ifndef FFMPEG_CONFIG_H #define FFMPEG_CONFIG_H -/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/liberato/src/release_chrome/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --toolchain=msvc --extra-cflags=-I/usr/local/google/home/liberato/src/release_chrome/src/third_party/ffmpeg/chromium/include/win --enable-cross-compile --cc=clang-cl --ld=lld-link --nm=llvm-nm --ar=llvm-ar --extra-cflags=-O2 --arch=aarch64 --as=clang-cl --extra-cflags='--target=arm64-windows' --extra-cflags=/winsysroot/usr/local/google/home/liberato/src/release_chrome/src/third_party/depot_tools/win_toolchain/vs_files/27370823e7 --extra-ldflags='/winsysroot:/usr/local/google/home/liberato/src/release_chrome/src/third_party/depot_tools/win_toolchain/vs_files/27370823e7' --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264'" -- elide long configuration string from binary */ +/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/liberato/src/release_chrome/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --toolchain=msvc --extra-cflags=-I/usr/local/google/home/liberato/src/release_chrome/src/third_party/ffmpeg/chromium/include/win --enable-cross-compile --cc=clang-cl --ld=lld-link --nm=llvm-nm --ar=llvm-ar --extra-cflags=-O2 --arch=aarch64 --as=clang-cl --extra-cflags='--target=arm64-windows' --extra-cflags=/winsysroot/usr/local/google/home/liberato/src/release_chrome/src/third_party/depot_tools/win_toolchain/vs_files/27370823e7 --extra-ldflags='/winsysroot:/usr/local/google/home/liberato/src/release_chrome/src/third_party/depot_tools/win_toolchain/vs_files/27370823e7' --enable-decoder='aac,h264,hevc' --enable-demuxer=aac --enable-decoder='aac,h264,hevc'" -- elide long configuration string from binary */ #define FFMPEG_LICENSE "LGPL version 2.1 or later" #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME win32 #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 0 #define HAVE_OS2THREADS 0 @@ -656,7 +657,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 0 -#define CONFIG_BSWAPDSP 0 +#define CONFIG_BSWAPDSP 1 #define CONFIG_CABAC 1 #define CONFIG_CBS 0 #define CONFIG_CBS_AV1 0 @@ -668,7 +669,7 @@ #define CONFIG_DEFLATE_WRAPPER 0 #define CONFIG_DIRAC_PARSE 1 #define CONFIG_DNN 0 -#define CONFIG_DOVI_RPU 0 +#define CONFIG_DOVI_RPU 1 #define CONFIG_DVPROFILE 0 #define CONFIG_EXIF 0 #define CONFIG_FAANDCT 0 @@ -686,8 +687,8 @@ #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 1 #define CONFIG_H264_SEI 1 -#define CONFIG_HEVCPARSE 0 -#define CONFIG_HEVC_SEI 0 +#define CONFIG_HEVCPARSE 1 +#define CONFIG_HEVC_SEI 1 #define CONFIG_HPELDSP 1 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/arm64/config_components.h b/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/arm64/config_components.h index 3604442a..d0311ac8 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/arm64/config_components.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/arm64/config_components.h @@ -134,7 +134,7 @@ #define CONFIG_H264_QSV_DECODER 0 #define CONFIG_H264_RKMPP_DECODER 0 #define CONFIG_HAP_DECODER 0 -#define CONFIG_HEVC_DECODER 0 +#define CONFIG_HEVC_DECODER 1 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -959,7 +963,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 0 #define CONFIG_H264_PARSER 1 -#define CONFIG_HEVC_PARSER 0 +#define CONFIG_HEVC_PARSER 1 #define CONFIG_HDR_PARSER 0 #define CONFIG_IPU_PARSER 0 #define CONFIG_JPEG2000_PARSER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/arm64/libavcodec/codec_list.c b/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/arm64/libavcodec/codec_list.c index cbd7f394..80d0456b 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/arm64/libavcodec/codec_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/arm64/libavcodec/codec_list.c @@ -17,4 +17,5 @@ static const FFCodec * const codec_list[] = { &ff_pcm_s32le_decoder, &ff_pcm_u8_decoder, &ff_libopus_decoder, + &ff_hevc_decoder, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/arm64/libavcodec/parser_list.c b/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/arm64/libavcodec/parser_list.c index 50acddb2..1269282a 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/arm64/libavcodec/parser_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/arm64/libavcodec/parser_list.c @@ -8,4 +8,5 @@ static const AVCodecParser * const parser_list[] = { &ff_vp3_parser, &ff_vp8_parser, &ff_vp9_parser, + &ff_hevc_parser, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/arm64/libavutil/ffversion.h b/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/arm64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/arm64/libavutil/ffversion.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/arm64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/ia32/config.asm b/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/ia32/config.asm index 7fd5041d..1291ace3 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/ia32/config.asm +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/ia32/config.asm @@ -329,6 +329,7 @@ %define HAVE_BCRYPT 0 %define HAVE_VAAPI_DRM 0 %define HAVE_VAAPI_X11 0 +%define HAVE_VAAPI_WIN32 0 %define HAVE_VDPAU_X11 0 %define HAVE_PTHREADS 0 %define HAVE_OS2THREADS 0 @@ -640,7 +641,7 @@ %define CONFIG_AUDIO_FRAME_QUEUE 0 %define CONFIG_AUDIODSP 0 %define CONFIG_BLOCKDSP 0 -%define CONFIG_BSWAPDSP 0 +%define CONFIG_BSWAPDSP 1 %define CONFIG_CABAC 1 %define CONFIG_CBS 0 %define CONFIG_CBS_AV1 0 @@ -652,7 +653,7 @@ %define CONFIG_DEFLATE_WRAPPER 0 %define CONFIG_DIRAC_PARSE 1 %define CONFIG_DNN 0 -%define CONFIG_DOVI_RPU 0 +%define CONFIG_DOVI_RPU 1 %define CONFIG_DVPROFILE 0 %define CONFIG_EXIF 0 %define CONFIG_FAANDCT 0 @@ -670,8 +671,8 @@ %define CONFIG_H264PRED 1 %define CONFIG_H264QPEL 1 %define CONFIG_H264_SEI 1 -%define CONFIG_HEVCPARSE 0 -%define CONFIG_HEVC_SEI 0 +%define CONFIG_HEVCPARSE 1 +%define CONFIG_HEVC_SEI 1 %define CONFIG_HPELDSP 1 %define CONFIG_HUFFMAN 0 %define CONFIG_HUFFYUVDSP 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/ia32/config.h b/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/ia32/config.h index f4d897aa..153a93b8 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/ia32/config.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/ia32/config.h @@ -1,12 +1,12 @@ /* Automatically generated by configure - do not modify! */ #ifndef FFMPEG_CONFIG_H #define FFMPEG_CONFIG_H -/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/liberato/src/release_chrome/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --toolchain=msvc --extra-cflags=-I/usr/local/google/home/liberato/src/release_chrome/src/third_party/ffmpeg/chromium/include/win --enable-cross-compile --cc=clang-cl --ld=lld-link --nm=llvm-nm --ar=llvm-ar --extra-cflags=-O2 --extra-cflags=-m32 --extra-cflags=/winsysroot/usr/local/google/home/liberato/src/release_chrome/src/third_party/depot_tools/win_toolchain/vs_files/27370823e7 --extra-ldflags='/winsysroot:/usr/local/google/home/liberato/src/release_chrome/src/third_party/depot_tools/win_toolchain/vs_files/27370823e7' --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264'" -- elide long configuration string from binary */ +/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/liberato/src/release_chrome/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --toolchain=msvc --extra-cflags=-I/usr/local/google/home/liberato/src/release_chrome/src/third_party/ffmpeg/chromium/include/win --enable-cross-compile --cc=clang-cl --ld=lld-link --nm=llvm-nm --ar=llvm-ar --extra-cflags=-O2 --extra-cflags=-m32 --extra-cflags=/winsysroot/usr/local/google/home/liberato/src/release_chrome/src/third_party/depot_tools/win_toolchain/vs_files/27370823e7 --extra-ldflags='/winsysroot:/usr/local/google/home/liberato/src/release_chrome/src/third_party/depot_tools/win_toolchain/vs_files/27370823e7' --enable-decoder='aac,h264,hevc' --enable-demuxer=aac --enable-decoder='aac,h264,hevc'" -- elide long configuration string from binary */ #define FFMPEG_LICENSE "LGPL version 2.1 or later" #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME win32 #define av_restrict restrict #define EXTERN_PREFIX "_" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 0 #define HAVE_OS2THREADS 0 @@ -656,7 +657,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 0 -#define CONFIG_BSWAPDSP 0 +#define CONFIG_BSWAPDSP 1 #define CONFIG_CABAC 1 #define CONFIG_CBS 0 #define CONFIG_CBS_AV1 0 @@ -668,7 +669,7 @@ #define CONFIG_DEFLATE_WRAPPER 0 #define CONFIG_DIRAC_PARSE 1 #define CONFIG_DNN 0 -#define CONFIG_DOVI_RPU 0 +#define CONFIG_DOVI_RPU 1 #define CONFIG_DVPROFILE 0 #define CONFIG_EXIF 0 #define CONFIG_FAANDCT 0 @@ -686,8 +687,8 @@ #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 1 #define CONFIG_H264_SEI 1 -#define CONFIG_HEVCPARSE 0 -#define CONFIG_HEVC_SEI 0 +#define CONFIG_HEVCPARSE 1 +#define CONFIG_HEVC_SEI 1 #define CONFIG_HPELDSP 1 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/ia32/config_components.h b/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/ia32/config_components.h index 3604442a..d0311ac8 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/ia32/config_components.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/ia32/config_components.h @@ -134,7 +134,7 @@ #define CONFIG_H264_QSV_DECODER 0 #define CONFIG_H264_RKMPP_DECODER 0 #define CONFIG_HAP_DECODER 0 -#define CONFIG_HEVC_DECODER 0 +#define CONFIG_HEVC_DECODER 1 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -959,7 +963,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 0 #define CONFIG_H264_PARSER 1 -#define CONFIG_HEVC_PARSER 0 +#define CONFIG_HEVC_PARSER 1 #define CONFIG_HDR_PARSER 0 #define CONFIG_IPU_PARSER 0 #define CONFIG_JPEG2000_PARSER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/ia32/libavcodec/codec_list.c b/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/ia32/libavcodec/codec_list.c index cbd7f394..80d0456b 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/ia32/libavcodec/codec_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/ia32/libavcodec/codec_list.c @@ -17,4 +17,5 @@ static const FFCodec * const codec_list[] = { &ff_pcm_s32le_decoder, &ff_pcm_u8_decoder, &ff_libopus_decoder, + &ff_hevc_decoder, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/ia32/libavcodec/parser_list.c b/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/ia32/libavcodec/parser_list.c index 50acddb2..1269282a 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/ia32/libavcodec/parser_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/ia32/libavcodec/parser_list.c @@ -8,4 +8,5 @@ static const AVCodecParser * const parser_list[] = { &ff_vp3_parser, &ff_vp8_parser, &ff_vp9_parser, + &ff_hevc_parser, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/ia32/libavutil/ffversion.h b/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/ia32/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/ia32/libavutil/ffversion.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/ia32/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/x64/config.asm b/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/x64/config.asm index c1af2d69..388c3281 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/x64/config.asm +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/x64/config.asm @@ -329,6 +329,7 @@ %define HAVE_BCRYPT 0 %define HAVE_VAAPI_DRM 0 %define HAVE_VAAPI_X11 0 +%define HAVE_VAAPI_WIN32 0 %define HAVE_VDPAU_X11 0 %define HAVE_PTHREADS 0 %define HAVE_OS2THREADS 0 @@ -640,7 +641,7 @@ %define CONFIG_AUDIO_FRAME_QUEUE 0 %define CONFIG_AUDIODSP 0 %define CONFIG_BLOCKDSP 0 -%define CONFIG_BSWAPDSP 0 +%define CONFIG_BSWAPDSP 1 %define CONFIG_CABAC 1 %define CONFIG_CBS 0 %define CONFIG_CBS_AV1 0 @@ -652,7 +653,7 @@ %define CONFIG_DEFLATE_WRAPPER 0 %define CONFIG_DIRAC_PARSE 1 %define CONFIG_DNN 0 -%define CONFIG_DOVI_RPU 0 +%define CONFIG_DOVI_RPU 1 %define CONFIG_DVPROFILE 0 %define CONFIG_EXIF 0 %define CONFIG_FAANDCT 0 @@ -670,8 +671,8 @@ %define CONFIG_H264PRED 1 %define CONFIG_H264QPEL 1 %define CONFIG_H264_SEI 1 -%define CONFIG_HEVCPARSE 0 -%define CONFIG_HEVC_SEI 0 +%define CONFIG_HEVCPARSE 1 +%define CONFIG_HEVC_SEI 1 %define CONFIG_HPELDSP 1 %define CONFIG_HUFFMAN 0 %define CONFIG_HUFFYUVDSP 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/x64/config.h b/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/x64/config.h index 02d074b8..5a13a177 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/x64/config.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/x64/config.h @@ -1,12 +1,12 @@ /* Automatically generated by configure - do not modify! */ #ifndef FFMPEG_CONFIG_H #define FFMPEG_CONFIG_H -/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/liberato/src/release_chrome/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --toolchain=msvc --extra-cflags=-I/usr/local/google/home/liberato/src/release_chrome/src/third_party/ffmpeg/chromium/include/win --target-os=win64 --enable-cross-compile --cc=clang-cl --ld=lld-link --nm=llvm-nm --ar=llvm-ar --extra-cflags=-O2 --extra-cflags=/winsysroot/usr/local/google/home/liberato/src/release_chrome/src/third_party/depot_tools/win_toolchain/vs_files/27370823e7 --extra-ldflags='/winsysroot:/usr/local/google/home/liberato/src/release_chrome/src/third_party/depot_tools/win_toolchain/vs_files/27370823e7' --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264'" -- elide long configuration string from binary */ +/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/liberato/src/release_chrome/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --toolchain=msvc --extra-cflags=-I/usr/local/google/home/liberato/src/release_chrome/src/third_party/ffmpeg/chromium/include/win --target-os=win64 --enable-cross-compile --cc=clang-cl --ld=lld-link --nm=llvm-nm --ar=llvm-ar --extra-cflags=-O2 --extra-cflags=/winsysroot/usr/local/google/home/liberato/src/release_chrome/src/third_party/depot_tools/win_toolchain/vs_files/27370823e7 --extra-ldflags='/winsysroot:/usr/local/google/home/liberato/src/release_chrome/src/third_party/depot_tools/win_toolchain/vs_files/27370823e7' --enable-decoder='aac,h264,hevc' --enable-demuxer=aac --enable-decoder='aac,h264,hevc'" -- elide long configuration string from binary */ #define FFMPEG_LICENSE "LGPL version 2.1 or later" #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME win64 #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 0 #define HAVE_OS2THREADS 0 @@ -656,7 +657,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 0 -#define CONFIG_BSWAPDSP 0 +#define CONFIG_BSWAPDSP 1 #define CONFIG_CABAC 1 #define CONFIG_CBS 0 #define CONFIG_CBS_AV1 0 @@ -668,7 +669,7 @@ #define CONFIG_DEFLATE_WRAPPER 0 #define CONFIG_DIRAC_PARSE 1 #define CONFIG_DNN 0 -#define CONFIG_DOVI_RPU 0 +#define CONFIG_DOVI_RPU 1 #define CONFIG_DVPROFILE 0 #define CONFIG_EXIF 0 #define CONFIG_FAANDCT 0 @@ -686,8 +687,8 @@ #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 1 #define CONFIG_H264_SEI 1 -#define CONFIG_HEVCPARSE 0 -#define CONFIG_HEVC_SEI 0 +#define CONFIG_HEVCPARSE 1 +#define CONFIG_HEVC_SEI 1 #define CONFIG_HPELDSP 1 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/x64/config_components.h b/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/x64/config_components.h index 3604442a..d0311ac8 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/x64/config_components.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/x64/config_components.h @@ -134,7 +134,7 @@ #define CONFIG_H264_QSV_DECODER 0 #define CONFIG_H264_RKMPP_DECODER 0 #define CONFIG_HAP_DECODER 0 -#define CONFIG_HEVC_DECODER 0 +#define CONFIG_HEVC_DECODER 1 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -959,7 +963,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 0 #define CONFIG_H264_PARSER 1 -#define CONFIG_HEVC_PARSER 0 +#define CONFIG_HEVC_PARSER 1 #define CONFIG_HDR_PARSER 0 #define CONFIG_IPU_PARSER 0 #define CONFIG_JPEG2000_PARSER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/x64/libavcodec/codec_list.c b/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/x64/libavcodec/codec_list.c index cbd7f394..80d0456b 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/x64/libavcodec/codec_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/x64/libavcodec/codec_list.c @@ -17,4 +17,5 @@ static const FFCodec * const codec_list[] = { &ff_pcm_s32le_decoder, &ff_pcm_u8_decoder, &ff_libopus_decoder, + &ff_hevc_decoder, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/x64/libavcodec/parser_list.c b/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/x64/libavcodec/parser_list.c index 50acddb2..1269282a 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/x64/libavcodec/parser_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/x64/libavcodec/parser_list.c @@ -8,4 +8,5 @@ static const AVCodecParser * const parser_list[] = { &ff_vp3_parser, &ff_vp8_parser, &ff_vp9_parser, + &ff_hevc_parser, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/x64/libavutil/ffversion.h b/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/x64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/x64/libavutil/ffversion.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chrome/win/x64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux-noasm/x64/config.h b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux-noasm/x64/config.h index 25582b9c..0e9cc30a 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux-noasm/x64/config.h +++ b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux-noasm/x64/config.h @@ -1,12 +1,12 @@ /* Automatically generated by configure - do not modify! */ #ifndef FFMPEG_CONFIG_H #define FFMPEG_CONFIG_H -/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-iconv --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/liberato/src/release_chrome/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --enable-lto --arch=x86_64 --target-os=linux --disable-asm --disable-inline-asm --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld' --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264' --enable-decoder=mpeg4 --enable-parser='h263,mpeg4video' --enable-demuxer=avi" -- elide long configuration string from binary */ +/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-iconv --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/liberato/src/release_chrome/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --enable-lto --arch=x86_64 --target-os=linux --disable-asm --disable-inline-asm --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld' --enable-decoder='aac,h264,hevc' --enable-demuxer=aac --enable-decoder='aac,h264,hevc' --enable-decoder=mpeg4 --enable-parser='h263,mpeg4video' --enable-demuxer=avi" -- elide long configuration string from binary */ #define FFMPEG_LICENSE "LGPL version 2.1 or later" #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME linux #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 @@ -656,7 +657,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 1 -#define CONFIG_BSWAPDSP 0 +#define CONFIG_BSWAPDSP 1 #define CONFIG_CABAC 1 #define CONFIG_CBS 0 #define CONFIG_CBS_AV1 0 @@ -668,7 +669,7 @@ #define CONFIG_DEFLATE_WRAPPER 0 #define CONFIG_DIRAC_PARSE 1 #define CONFIG_DNN 0 -#define CONFIG_DOVI_RPU 0 +#define CONFIG_DOVI_RPU 1 #define CONFIG_DVPROFILE 0 #define CONFIG_EXIF 1 #define CONFIG_FAANDCT 0 @@ -686,8 +687,8 @@ #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 1 #define CONFIG_H264_SEI 1 -#define CONFIG_HEVCPARSE 0 -#define CONFIG_HEVC_SEI 0 +#define CONFIG_HEVCPARSE 1 +#define CONFIG_HEVC_SEI 1 #define CONFIG_HPELDSP 1 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux-noasm/x64/config_components.h b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux-noasm/x64/config_components.h index 80435e58..fa52167a 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux-noasm/x64/config_components.h +++ b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux-noasm/x64/config_components.h @@ -134,7 +134,7 @@ #define CONFIG_H264_QSV_DECODER 0 #define CONFIG_H264_RKMPP_DECODER 0 #define CONFIG_HAP_DECODER 0 -#define CONFIG_HEVC_DECODER 0 +#define CONFIG_HEVC_DECODER 1 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -959,7 +963,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 1 #define CONFIG_H264_PARSER 1 -#define CONFIG_HEVC_PARSER 0 +#define CONFIG_HEVC_PARSER 1 #define CONFIG_HDR_PARSER 0 #define CONFIG_IPU_PARSER 0 #define CONFIG_JPEG2000_PARSER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux-noasm/x64/libavcodec/codec_list.c b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux-noasm/x64/libavcodec/codec_list.c index 0cc21354..d318784b 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux-noasm/x64/libavcodec/codec_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux-noasm/x64/libavcodec/codec_list.c @@ -19,4 +19,5 @@ static const FFCodec * const codec_list[] = { &ff_pcm_s32le_decoder, &ff_pcm_u8_decoder, &ff_libopus_decoder, + &ff_hevc_decoder, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux-noasm/x64/libavcodec/parser_list.c b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux-noasm/x64/libavcodec/parser_list.c index e1652f8b..bb61b337 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux-noasm/x64/libavcodec/parser_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux-noasm/x64/libavcodec/parser_list.c @@ -10,4 +10,5 @@ static const AVCodecParser * const parser_list[] = { &ff_vp3_parser, &ff_vp8_parser, &ff_vp9_parser, + &ff_hevc_parser, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux-noasm/x64/libavutil/ffversion.h b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux-noasm/x64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux-noasm/x64/libavutil/ffversion.h +++ b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux-noasm/x64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm-neon/config.h b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm-neon/config.h index bce5389b..a5a56eee 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm-neon/config.h +++ b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm-neon/config.h @@ -1,12 +1,12 @@ /* Automatically generated by configure - do not modify! */ #ifndef FFMPEG_CONFIG_H #define FFMPEG_CONFIG_H -/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-iconv --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/liberato/src/release_chrome/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --arch=arm --enable-armv6 --enable-armv6t2 --enable-vfp --enable-thumb --extra-cflags='-march=armv7-a' --enable-cross-compile --target-os=linux --extra-cflags='--target=arm-linux-gnueabihf' --extra-ldflags='--target=arm-linux-gnueabihf' --sysroot=/usr/local/google/home/liberato/src/release_chrome/src/build/linux/debian_bullseye_arm-sysroot --extra-cflags='-mtune=cortex-a8' --extra-cflags='-mfloat-abi=hard' --extra-cflags=-O2 --enable-neon --extra-cflags='-mfpu=neon' --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld' --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264' --enable-decoder=mpeg4 --enable-parser='h263,mpeg4video' --enable-demuxer=avi" -- elide long configuration string from binary */ +/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-iconv --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/liberato/src/release_chrome/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --arch=arm --enable-armv6 --enable-armv6t2 --enable-vfp --enable-thumb --extra-cflags='-march=armv7-a' --enable-cross-compile --target-os=linux --extra-cflags='--target=arm-linux-gnueabihf' --extra-ldflags='--target=arm-linux-gnueabihf' --sysroot=/usr/local/google/home/liberato/src/release_chrome/src/build/linux/debian_bullseye_arm-sysroot --extra-cflags='-mtune=cortex-a8' --extra-cflags='-mfloat-abi=hard' --extra-cflags=-O2 --enable-neon --extra-cflags='-mfpu=neon' --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld' --enable-decoder='aac,h264,hevc' --enable-demuxer=aac --enable-decoder='aac,h264,hevc' --enable-decoder=mpeg4 --enable-parser='h263,mpeg4video' --enable-demuxer=avi" -- elide long configuration string from binary */ #define FFMPEG_LICENSE "LGPL version 2.1 or later" #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME linux #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 @@ -656,7 +657,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 1 -#define CONFIG_BSWAPDSP 0 +#define CONFIG_BSWAPDSP 1 #define CONFIG_CABAC 1 #define CONFIG_CBS 0 #define CONFIG_CBS_AV1 0 @@ -668,7 +669,7 @@ #define CONFIG_DEFLATE_WRAPPER 0 #define CONFIG_DIRAC_PARSE 1 #define CONFIG_DNN 0 -#define CONFIG_DOVI_RPU 0 +#define CONFIG_DOVI_RPU 1 #define CONFIG_DVPROFILE 0 #define CONFIG_EXIF 1 #define CONFIG_FAANDCT 0 @@ -686,8 +687,8 @@ #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 1 #define CONFIG_H264_SEI 1 -#define CONFIG_HEVCPARSE 0 -#define CONFIG_HEVC_SEI 0 +#define CONFIG_HEVCPARSE 1 +#define CONFIG_HEVC_SEI 1 #define CONFIG_HPELDSP 1 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm-neon/config_components.h b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm-neon/config_components.h index 80435e58..fa52167a 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm-neon/config_components.h +++ b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm-neon/config_components.h @@ -134,7 +134,7 @@ #define CONFIG_H264_QSV_DECODER 0 #define CONFIG_H264_RKMPP_DECODER 0 #define CONFIG_HAP_DECODER 0 -#define CONFIG_HEVC_DECODER 0 +#define CONFIG_HEVC_DECODER 1 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -959,7 +963,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 1 #define CONFIG_H264_PARSER 1 -#define CONFIG_HEVC_PARSER 0 +#define CONFIG_HEVC_PARSER 1 #define CONFIG_HDR_PARSER 0 #define CONFIG_IPU_PARSER 0 #define CONFIG_JPEG2000_PARSER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm-neon/libavcodec/codec_list.c b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm-neon/libavcodec/codec_list.c index 0cc21354..d318784b 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm-neon/libavcodec/codec_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm-neon/libavcodec/codec_list.c @@ -19,4 +19,5 @@ static const FFCodec * const codec_list[] = { &ff_pcm_s32le_decoder, &ff_pcm_u8_decoder, &ff_libopus_decoder, + &ff_hevc_decoder, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm-neon/libavcodec/parser_list.c b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm-neon/libavcodec/parser_list.c index e1652f8b..bb61b337 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm-neon/libavcodec/parser_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm-neon/libavcodec/parser_list.c @@ -10,4 +10,5 @@ static const AVCodecParser * const parser_list[] = { &ff_vp3_parser, &ff_vp8_parser, &ff_vp9_parser, + &ff_hevc_parser, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm-neon/libavutil/ffversion.h b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm-neon/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm-neon/libavutil/ffversion.h +++ b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm-neon/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm/config.h b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm/config.h index 73b32e93..26110295 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm/config.h +++ b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm/config.h @@ -1,12 +1,12 @@ /* Automatically generated by configure - do not modify! */ #ifndef FFMPEG_CONFIG_H #define FFMPEG_CONFIG_H -/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-iconv --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/liberato/src/release_chrome/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --arch=arm --enable-armv6 --enable-armv6t2 --enable-vfp --enable-thumb --extra-cflags='-march=armv7-a' --enable-cross-compile --target-os=linux --extra-cflags='--target=arm-linux-gnueabihf' --extra-ldflags='--target=arm-linux-gnueabihf' --sysroot=/usr/local/google/home/liberato/src/release_chrome/src/build/linux/debian_bullseye_arm-sysroot --extra-cflags='-mtune=cortex-a8' --extra-cflags='-mfloat-abi=hard' --extra-cflags=-O2 --disable-neon --extra-cflags='-mfpu=vfpv3-d16' --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld' --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264' --enable-decoder=mpeg4 --enable-parser='h263,mpeg4video' --enable-demuxer=avi" -- elide long configuration string from binary */ +/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-iconv --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/liberato/src/release_chrome/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --arch=arm --enable-armv6 --enable-armv6t2 --enable-vfp --enable-thumb --extra-cflags='-march=armv7-a' --enable-cross-compile --target-os=linux --extra-cflags='--target=arm-linux-gnueabihf' --extra-ldflags='--target=arm-linux-gnueabihf' --sysroot=/usr/local/google/home/liberato/src/release_chrome/src/build/linux/debian_bullseye_arm-sysroot --extra-cflags='-mtune=cortex-a8' --extra-cflags='-mfloat-abi=hard' --extra-cflags=-O2 --disable-neon --extra-cflags='-mfpu=vfpv3-d16' --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld' --enable-decoder='aac,h264,hevc' --enable-demuxer=aac --enable-decoder='aac,h264,hevc' --enable-decoder=mpeg4 --enable-parser='h263,mpeg4video' --enable-demuxer=avi" -- elide long configuration string from binary */ #define FFMPEG_LICENSE "LGPL version 2.1 or later" #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME linux #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 @@ -656,7 +657,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 1 -#define CONFIG_BSWAPDSP 0 +#define CONFIG_BSWAPDSP 1 #define CONFIG_CABAC 1 #define CONFIG_CBS 0 #define CONFIG_CBS_AV1 0 @@ -668,7 +669,7 @@ #define CONFIG_DEFLATE_WRAPPER 0 #define CONFIG_DIRAC_PARSE 1 #define CONFIG_DNN 0 -#define CONFIG_DOVI_RPU 0 +#define CONFIG_DOVI_RPU 1 #define CONFIG_DVPROFILE 0 #define CONFIG_EXIF 1 #define CONFIG_FAANDCT 0 @@ -686,8 +687,8 @@ #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 1 #define CONFIG_H264_SEI 1 -#define CONFIG_HEVCPARSE 0 -#define CONFIG_HEVC_SEI 0 +#define CONFIG_HEVCPARSE 1 +#define CONFIG_HEVC_SEI 1 #define CONFIG_HPELDSP 1 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm/config_components.h b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm/config_components.h index 80435e58..fa52167a 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm/config_components.h +++ b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm/config_components.h @@ -134,7 +134,7 @@ #define CONFIG_H264_QSV_DECODER 0 #define CONFIG_H264_RKMPP_DECODER 0 #define CONFIG_HAP_DECODER 0 -#define CONFIG_HEVC_DECODER 0 +#define CONFIG_HEVC_DECODER 1 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -959,7 +963,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 1 #define CONFIG_H264_PARSER 1 -#define CONFIG_HEVC_PARSER 0 +#define CONFIG_HEVC_PARSER 1 #define CONFIG_HDR_PARSER 0 #define CONFIG_IPU_PARSER 0 #define CONFIG_JPEG2000_PARSER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm/libavcodec/codec_list.c b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm/libavcodec/codec_list.c index 0cc21354..d318784b 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm/libavcodec/codec_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm/libavcodec/codec_list.c @@ -19,4 +19,5 @@ static const FFCodec * const codec_list[] = { &ff_pcm_s32le_decoder, &ff_pcm_u8_decoder, &ff_libopus_decoder, + &ff_hevc_decoder, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm/libavcodec/parser_list.c b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm/libavcodec/parser_list.c index e1652f8b..bb61b337 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm/libavcodec/parser_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm/libavcodec/parser_list.c @@ -10,4 +10,5 @@ static const AVCodecParser * const parser_list[] = { &ff_vp3_parser, &ff_vp8_parser, &ff_vp9_parser, + &ff_hevc_parser, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm/libavutil/ffversion.h b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm/libavutil/ffversion.h +++ b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm64/config.h b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm64/config.h index 5616e4a1..1be92fdf 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm64/config.h +++ b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm64/config.h @@ -1,12 +1,12 @@ /* Automatically generated by configure - do not modify! */ #ifndef FFMPEG_CONFIG_H #define FFMPEG_CONFIG_H -/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-iconv --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/liberato/src/release_chrome/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --enable-cross-compile --cross-prefix=/usr/bin/aarch64-linux-gnu- --extra-cflags='--target=aarch64-linux-gnu' --extra-ldflags='--target=aarch64-linux-gnu' --target-os=linux --sysroot=/usr/local/google/home/liberato/src/release_chrome/src/build/linux/debian_bullseye_arm64-sysroot --arch=aarch64 --enable-armv8 --extra-cflags='-march=armv8-a' --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld' --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264' --enable-decoder=mpeg4 --enable-parser='h263,mpeg4video' --enable-demuxer=avi" -- elide long configuration string from binary */ +/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-iconv --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/liberato/src/release_chrome/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --enable-cross-compile --cross-prefix=/usr/bin/aarch64-linux-gnu- --extra-cflags='--target=aarch64-linux-gnu' --extra-ldflags='--target=aarch64-linux-gnu' --target-os=linux --sysroot=/usr/local/google/home/liberato/src/release_chrome/src/build/linux/debian_bullseye_arm64-sysroot --arch=aarch64 --enable-armv8 --extra-cflags='-march=armv8-a' --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld' --enable-decoder='aac,h264,hevc' --enable-demuxer=aac --enable-decoder='aac,h264,hevc' --enable-decoder=mpeg4 --enable-parser='h263,mpeg4video' --enable-demuxer=avi" -- elide long configuration string from binary */ #define FFMPEG_LICENSE "LGPL version 2.1 or later" #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME linux #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 @@ -656,7 +657,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 1 -#define CONFIG_BSWAPDSP 0 +#define CONFIG_BSWAPDSP 1 #define CONFIG_CABAC 1 #define CONFIG_CBS 0 #define CONFIG_CBS_AV1 0 @@ -668,7 +669,7 @@ #define CONFIG_DEFLATE_WRAPPER 0 #define CONFIG_DIRAC_PARSE 1 #define CONFIG_DNN 0 -#define CONFIG_DOVI_RPU 0 +#define CONFIG_DOVI_RPU 1 #define CONFIG_DVPROFILE 0 #define CONFIG_EXIF 1 #define CONFIG_FAANDCT 0 @@ -686,8 +687,8 @@ #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 1 #define CONFIG_H264_SEI 1 -#define CONFIG_HEVCPARSE 0 -#define CONFIG_HEVC_SEI 0 +#define CONFIG_HEVCPARSE 1 +#define CONFIG_HEVC_SEI 1 #define CONFIG_HPELDSP 1 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm64/config_components.h b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm64/config_components.h index 80435e58..fa52167a 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm64/config_components.h +++ b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm64/config_components.h @@ -134,7 +134,7 @@ #define CONFIG_H264_QSV_DECODER 0 #define CONFIG_H264_RKMPP_DECODER 0 #define CONFIG_HAP_DECODER 0 -#define CONFIG_HEVC_DECODER 0 +#define CONFIG_HEVC_DECODER 1 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -959,7 +963,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 1 #define CONFIG_H264_PARSER 1 -#define CONFIG_HEVC_PARSER 0 +#define CONFIG_HEVC_PARSER 1 #define CONFIG_HDR_PARSER 0 #define CONFIG_IPU_PARSER 0 #define CONFIG_JPEG2000_PARSER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm64/libavcodec/codec_list.c b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm64/libavcodec/codec_list.c index 0cc21354..d318784b 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm64/libavcodec/codec_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm64/libavcodec/codec_list.c @@ -19,4 +19,5 @@ static const FFCodec * const codec_list[] = { &ff_pcm_s32le_decoder, &ff_pcm_u8_decoder, &ff_libopus_decoder, + &ff_hevc_decoder, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm64/libavcodec/parser_list.c b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm64/libavcodec/parser_list.c index e1652f8b..bb61b337 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm64/libavcodec/parser_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm64/libavcodec/parser_list.c @@ -10,4 +10,5 @@ static const AVCodecParser * const parser_list[] = { &ff_vp3_parser, &ff_vp8_parser, &ff_vp9_parser, + &ff_hevc_parser, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm64/libavutil/ffversion.h b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm64/libavutil/ffversion.h +++ b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/config.asm b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/config.asm index b257dadf..22bde70a 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/config.asm +++ b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/config.asm @@ -329,6 +329,7 @@ %define HAVE_BCRYPT 0 %define HAVE_VAAPI_DRM 0 %define HAVE_VAAPI_X11 0 +%define HAVE_VAAPI_WIN32 0 %define HAVE_VDPAU_X11 0 %define HAVE_PTHREADS 1 %define HAVE_OS2THREADS 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/config.h b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/config.h index 3ffcf8b6..5e48bbcf 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/config.h +++ b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/config.h @@ -1,12 +1,12 @@ /* Automatically generated by configure - do not modify! */ #ifndef FFMPEG_CONFIG_H #define FFMPEG_CONFIG_H -/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-iconv --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/liberato/src/release_chrome/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --arch=i686 --extra-cflags='\"-m32\"' --extra-ldflags='\"-m32\"' --enable-pic --cc=clang --cxx=clang++ --ld=clang --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264' --enable-decoder=mpeg4 --enable-parser='h263,mpeg4video' --enable-demuxer=avi" -- elide long configuration string from binary */ +/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-iconv --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/liberato/src/release_chrome/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --arch=i686 --extra-cflags='\"-m32\"' --extra-ldflags='\"-m32\"' --enable-pic --cc=clang --cxx=clang++ --ld=clang --enable-decoder='aac,h264,hevc' --enable-demuxer=aac --enable-decoder='aac,h264,hevc' --enable-decoder=mpeg4 --enable-parser='h263,mpeg4video' --enable-demuxer=avi" -- elide long configuration string from binary */ #define FFMPEG_LICENSE "LGPL version 2.1 or later" #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME linux #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 @@ -656,7 +657,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 1 -#define CONFIG_BSWAPDSP 0 +#define CONFIG_BSWAPDSP 1 #define CONFIG_CABAC 1 #define CONFIG_CBS 0 #define CONFIG_CBS_AV1 0 @@ -668,7 +669,7 @@ #define CONFIG_DEFLATE_WRAPPER 0 #define CONFIG_DIRAC_PARSE 1 #define CONFIG_DNN 0 -#define CONFIG_DOVI_RPU 0 +#define CONFIG_DOVI_RPU 1 #define CONFIG_DVPROFILE 0 #define CONFIG_EXIF 1 #define CONFIG_FAANDCT 0 @@ -686,8 +687,8 @@ #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 1 #define CONFIG_H264_SEI 1 -#define CONFIG_HEVCPARSE 0 -#define CONFIG_HEVC_SEI 0 +#define CONFIG_HEVCPARSE 1 +#define CONFIG_HEVC_SEI 1 #define CONFIG_HPELDSP 1 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/config_components.h b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/config_components.h index 80435e58..fa52167a 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/config_components.h +++ b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/config_components.h @@ -134,7 +134,7 @@ #define CONFIG_H264_QSV_DECODER 0 #define CONFIG_H264_RKMPP_DECODER 0 #define CONFIG_HAP_DECODER 0 -#define CONFIG_HEVC_DECODER 0 +#define CONFIG_HEVC_DECODER 1 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -959,7 +963,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 1 #define CONFIG_H264_PARSER 1 -#define CONFIG_HEVC_PARSER 0 +#define CONFIG_HEVC_PARSER 1 #define CONFIG_HDR_PARSER 0 #define CONFIG_IPU_PARSER 0 #define CONFIG_JPEG2000_PARSER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/libavcodec/codec_list.c b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/libavcodec/codec_list.c index 0cc21354..d318784b 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/libavcodec/codec_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/libavcodec/codec_list.c @@ -19,4 +19,5 @@ static const FFCodec * const codec_list[] = { &ff_pcm_s32le_decoder, &ff_pcm_u8_decoder, &ff_libopus_decoder, + &ff_hevc_decoder, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/libavcodec/parser_list.c b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/libavcodec/parser_list.c index e1652f8b..bb61b337 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/libavcodec/parser_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/libavcodec/parser_list.c @@ -10,4 +10,5 @@ static const AVCodecParser * const parser_list[] = { &ff_vp3_parser, &ff_vp8_parser, &ff_vp9_parser, + &ff_hevc_parser, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/libavutil/ffversion.h b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/libavutil/ffversion.h +++ b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/config.asm b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/config.asm index deb21917..274919d1 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/config.asm +++ b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/config.asm @@ -329,6 +329,7 @@ %define HAVE_BCRYPT 0 %define HAVE_VAAPI_DRM 0 %define HAVE_VAAPI_X11 0 +%define HAVE_VAAPI_WIN32 0 %define HAVE_VDPAU_X11 0 %define HAVE_PTHREADS 1 %define HAVE_OS2THREADS 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/config.h b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/config.h index 22c4bcfe..8bbfde8d 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/config.h +++ b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/config.h @@ -1,12 +1,12 @@ /* Automatically generated by configure - do not modify! */ #ifndef FFMPEG_CONFIG_H #define FFMPEG_CONFIG_H -/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-iconv --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/liberato/src/release_chrome/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --enable-lto --arch=x86_64 --target-os=linux --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld' --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264' --enable-decoder=mpeg4 --enable-parser='h263,mpeg4video' --enable-demuxer=avi" -- elide long configuration string from binary */ +/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-iconv --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/liberato/src/release_chrome/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --enable-lto --arch=x86_64 --target-os=linux --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld' --enable-decoder='aac,h264,hevc' --enable-demuxer=aac --enable-decoder='aac,h264,hevc' --enable-decoder=mpeg4 --enable-parser='h263,mpeg4video' --enable-demuxer=avi" -- elide long configuration string from binary */ #define FFMPEG_LICENSE "LGPL version 2.1 or later" #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME linux #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 @@ -656,7 +657,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 1 -#define CONFIG_BSWAPDSP 0 +#define CONFIG_BSWAPDSP 1 #define CONFIG_CABAC 1 #define CONFIG_CBS 0 #define CONFIG_CBS_AV1 0 @@ -668,7 +669,7 @@ #define CONFIG_DEFLATE_WRAPPER 0 #define CONFIG_DIRAC_PARSE 1 #define CONFIG_DNN 0 -#define CONFIG_DOVI_RPU 0 +#define CONFIG_DOVI_RPU 1 #define CONFIG_DVPROFILE 0 #define CONFIG_EXIF 1 #define CONFIG_FAANDCT 0 @@ -686,8 +687,8 @@ #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 1 #define CONFIG_H264_SEI 1 -#define CONFIG_HEVCPARSE 0 -#define CONFIG_HEVC_SEI 0 +#define CONFIG_HEVCPARSE 1 +#define CONFIG_HEVC_SEI 1 #define CONFIG_HPELDSP 1 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/config_components.h b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/config_components.h index 80435e58..fa52167a 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/config_components.h +++ b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/config_components.h @@ -134,7 +134,7 @@ #define CONFIG_H264_QSV_DECODER 0 #define CONFIG_H264_RKMPP_DECODER 0 #define CONFIG_HAP_DECODER 0 -#define CONFIG_HEVC_DECODER 0 +#define CONFIG_HEVC_DECODER 1 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -959,7 +963,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 1 #define CONFIG_H264_PARSER 1 -#define CONFIG_HEVC_PARSER 0 +#define CONFIG_HEVC_PARSER 1 #define CONFIG_HDR_PARSER 0 #define CONFIG_IPU_PARSER 0 #define CONFIG_JPEG2000_PARSER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/libavcodec/codec_list.c b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/libavcodec/codec_list.c index 0cc21354..d318784b 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/libavcodec/codec_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/libavcodec/codec_list.c @@ -19,4 +19,5 @@ static const FFCodec * const codec_list[] = { &ff_pcm_s32le_decoder, &ff_pcm_u8_decoder, &ff_libopus_decoder, + &ff_hevc_decoder, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/libavcodec/parser_list.c b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/libavcodec/parser_list.c index e1652f8b..bb61b337 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/libavcodec/parser_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/libavcodec/parser_list.c @@ -10,4 +10,5 @@ static const AVCodecParser * const parser_list[] = { &ff_vp3_parser, &ff_vp8_parser, &ff_vp9_parser, + &ff_hevc_parser, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/libavutil/ffversion.h b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/libavutil/ffversion.h +++ b/arm/android/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/android/arm-neon/config.h b/arm/android/third_party/ffmpeg/chromium/config/Chromium/android/arm-neon/config.h index f8fdbf28..0b224436 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/android/arm-neon/config.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/android/arm-neon/config.h @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/android/arm-neon/config_components.h b/arm/android/third_party/ffmpeg/chromium/config/Chromium/android/arm-neon/config_components.h index 012c89d9..46a1c423 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/android/arm-neon/config_components.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/android/arm-neon/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/android/arm-neon/libavutil/ffversion.h b/arm/android/third_party/ffmpeg/chromium/config/Chromium/android/arm-neon/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/android/arm-neon/libavutil/ffversion.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/android/arm-neon/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/android/arm64/config.h b/arm/android/third_party/ffmpeg/chromium/config/Chromium/android/arm64/config.h index 146d72b6..bc50a3da 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/android/arm64/config.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/android/arm64/config.h @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/android/arm64/config_components.h b/arm/android/third_party/ffmpeg/chromium/config/Chromium/android/arm64/config_components.h index 012c89d9..46a1c423 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/android/arm64/config_components.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/android/arm64/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/android/arm64/libavutil/ffversion.h b/arm/android/third_party/ffmpeg/chromium/config/Chromium/android/arm64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/android/arm64/libavutil/ffversion.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/android/arm64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/android/ia32/config.h b/arm/android/third_party/ffmpeg/chromium/config/Chromium/android/ia32/config.h index a2b1cb8b..402c4f5d 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/android/ia32/config.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/android/ia32/config.h @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/android/ia32/config_components.h b/arm/android/third_party/ffmpeg/chromium/config/Chromium/android/ia32/config_components.h index 012c89d9..46a1c423 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/android/ia32/config_components.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/android/ia32/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/android/ia32/libavutil/ffversion.h b/arm/android/third_party/ffmpeg/chromium/config/Chromium/android/ia32/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/android/ia32/libavutil/ffversion.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/android/ia32/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/android/x64/config.asm b/arm/android/third_party/ffmpeg/chromium/config/Chromium/android/x64/config.asm index b811591a..1fa00fd2 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/android/x64/config.asm +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/android/x64/config.asm @@ -329,6 +329,7 @@ %define HAVE_BCRYPT 0 %define HAVE_VAAPI_DRM 0 %define HAVE_VAAPI_X11 0 +%define HAVE_VAAPI_WIN32 0 %define HAVE_VDPAU_X11 0 %define HAVE_PTHREADS 1 %define HAVE_OS2THREADS 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/android/x64/config.h b/arm/android/third_party/ffmpeg/chromium/config/Chromium/android/x64/config.h index 0d90febd..29332059 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/android/x64/config.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/android/x64/config.h @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/android/x64/config_components.h b/arm/android/third_party/ffmpeg/chromium/config/Chromium/android/x64/config_components.h index 012c89d9..46a1c423 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/android/x64/config_components.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/android/x64/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/android/x64/libavutil/ffversion.h b/arm/android/third_party/ffmpeg/chromium/config/Chromium/android/x64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/android/x64/libavutil/ffversion.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/android/x64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/ios/arm64/config.h b/arm/android/third_party/ffmpeg/chromium/config/Chromium/ios/arm64/config.h index 8581bab9..55203e0f 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/ios/arm64/config.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/ios/arm64/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME darwin #define av_restrict restrict #define EXTERN_PREFIX "_" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 @@ -656,7 +657,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 0 -#define CONFIG_BSWAPDSP 0 +#define CONFIG_BSWAPDSP 1 #define CONFIG_CABAC 0 #define CONFIG_CBS 0 #define CONFIG_CBS_AV1 0 @@ -668,7 +669,7 @@ #define CONFIG_DEFLATE_WRAPPER 0 #define CONFIG_DIRAC_PARSE 1 #define CONFIG_DNN 0 -#define CONFIG_DOVI_RPU 0 +#define CONFIG_DOVI_RPU 1 #define CONFIG_DVPROFILE 0 #define CONFIG_EXIF 0 #define CONFIG_FAANDCT 0 @@ -686,8 +687,8 @@ #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 0 #define CONFIG_H264_SEI 0 -#define CONFIG_HEVCPARSE 0 -#define CONFIG_HEVC_SEI 0 +#define CONFIG_HEVCPARSE 1 +#define CONFIG_HEVC_SEI 1 #define CONFIG_HPELDSP 1 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/ios/arm64/config_components.h b/arm/android/third_party/ffmpeg/chromium/config/Chromium/ios/arm64/config_components.h index d85ee4cc..6f3ae35a 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/ios/arm64/config_components.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/ios/arm64/config_components.h @@ -134,7 +134,7 @@ #define CONFIG_H264_QSV_DECODER 0 #define CONFIG_H264_RKMPP_DECODER 0 #define CONFIG_HAP_DECODER 0 -#define CONFIG_HEVC_DECODER 0 +#define CONFIG_HEVC_DECODER 1 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -959,7 +963,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 0 #define CONFIG_H264_PARSER 0 -#define CONFIG_HEVC_PARSER 0 +#define CONFIG_HEVC_PARSER 1 #define CONFIG_HDR_PARSER 0 #define CONFIG_IPU_PARSER 0 #define CONFIG_JPEG2000_PARSER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/ios/arm64/libavcodec/codec_list.c b/arm/android/third_party/ffmpeg/chromium/config/Chromium/ios/arm64/libavcodec/codec_list.c index 653357d3..9181e1cb 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/ios/arm64/libavcodec/codec_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/ios/arm64/libavcodec/codec_list.c @@ -15,4 +15,5 @@ static const FFCodec * const codec_list[] = { &ff_pcm_s32le_decoder, &ff_pcm_u8_decoder, &ff_libopus_decoder, + &ff_hevc_decoder, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/ios/arm64/libavcodec/parser_list.c b/arm/android/third_party/ffmpeg/chromium/config/Chromium/ios/arm64/libavcodec/parser_list.c index f81fbe8b..2d65b7d8 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/ios/arm64/libavcodec/parser_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/ios/arm64/libavcodec/parser_list.c @@ -6,4 +6,5 @@ static const AVCodecParser * const parser_list[] = { &ff_vp3_parser, &ff_vp8_parser, &ff_vp9_parser, + &ff_hevc_parser, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/ios/arm64/libavutil/ffversion.h b/arm/android/third_party/ffmpeg/chromium/config/Chromium/ios/arm64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/ios/arm64/libavutil/ffversion.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/ios/arm64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/ios/x64/config.asm b/arm/android/third_party/ffmpeg/chromium/config/Chromium/ios/x64/config.asm index 36e5a1e6..a8832e99 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/ios/x64/config.asm +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/ios/x64/config.asm @@ -329,6 +329,7 @@ %define HAVE_BCRYPT 0 %define HAVE_VAAPI_DRM 0 %define HAVE_VAAPI_X11 0 +%define HAVE_VAAPI_WIN32 0 %define HAVE_VDPAU_X11 0 %define HAVE_PTHREADS 1 %define HAVE_OS2THREADS 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/ios/x64/config.h b/arm/android/third_party/ffmpeg/chromium/config/Chromium/ios/x64/config.h index 5db229d8..ac8416b0 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/ios/x64/config.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/ios/x64/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME darwin #define av_restrict restrict #define EXTERN_PREFIX "_" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/ios/x64/config_components.h b/arm/android/third_party/ffmpeg/chromium/config/Chromium/ios/x64/config_components.h index d85ee4cc..18d38c48 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/ios/x64/config_components.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/ios/x64/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/ios/x64/libavutil/ffversion.h b/arm/android/third_party/ffmpeg/chromium/config/Chromium/ios/x64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/ios/x64/libavutil/ffversion.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/ios/x64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux-noasm/x64/config.h b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux-noasm/x64/config.h index 2a160bd8..508898c8 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux-noasm/x64/config.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux-noasm/x64/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME linux #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 @@ -656,7 +657,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 0 -#define CONFIG_BSWAPDSP 0 +#define CONFIG_BSWAPDSP 1 #define CONFIG_CABAC 0 #define CONFIG_CBS 0 #define CONFIG_CBS_AV1 0 @@ -668,7 +669,7 @@ #define CONFIG_DEFLATE_WRAPPER 0 #define CONFIG_DIRAC_PARSE 1 #define CONFIG_DNN 0 -#define CONFIG_DOVI_RPU 0 +#define CONFIG_DOVI_RPU 1 #define CONFIG_DVPROFILE 0 #define CONFIG_EXIF 0 #define CONFIG_FAANDCT 0 @@ -686,8 +687,8 @@ #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 0 #define CONFIG_H264_SEI 0 -#define CONFIG_HEVCPARSE 0 -#define CONFIG_HEVC_SEI 0 +#define CONFIG_HEVCPARSE 1 +#define CONFIG_HEVC_SEI 1 #define CONFIG_HPELDSP 1 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux-noasm/x64/config_components.h b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux-noasm/x64/config_components.h index d85ee4cc..6f3ae35a 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux-noasm/x64/config_components.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux-noasm/x64/config_components.h @@ -134,7 +134,7 @@ #define CONFIG_H264_QSV_DECODER 0 #define CONFIG_H264_RKMPP_DECODER 0 #define CONFIG_HAP_DECODER 0 -#define CONFIG_HEVC_DECODER 0 +#define CONFIG_HEVC_DECODER 1 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -959,7 +963,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 0 #define CONFIG_H264_PARSER 0 -#define CONFIG_HEVC_PARSER 0 +#define CONFIG_HEVC_PARSER 1 #define CONFIG_HDR_PARSER 0 #define CONFIG_IPU_PARSER 0 #define CONFIG_JPEG2000_PARSER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux-noasm/x64/libavcodec/codec_list.c b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux-noasm/x64/libavcodec/codec_list.c index 653357d3..9181e1cb 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux-noasm/x64/libavcodec/codec_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux-noasm/x64/libavcodec/codec_list.c @@ -15,4 +15,5 @@ static const FFCodec * const codec_list[] = { &ff_pcm_s32le_decoder, &ff_pcm_u8_decoder, &ff_libopus_decoder, + &ff_hevc_decoder, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux-noasm/x64/libavcodec/parser_list.c b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux-noasm/x64/libavcodec/parser_list.c index f81fbe8b..2d65b7d8 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux-noasm/x64/libavcodec/parser_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux-noasm/x64/libavcodec/parser_list.c @@ -6,4 +6,5 @@ static const AVCodecParser * const parser_list[] = { &ff_vp3_parser, &ff_vp8_parser, &ff_vp9_parser, + &ff_hevc_parser, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux-noasm/x64/libavutil/ffversion.h b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux-noasm/x64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux-noasm/x64/libavutil/ffversion.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux-noasm/x64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm-neon/config.h b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm-neon/config.h index 761a7c6e..38e66b4b 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm-neon/config.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm-neon/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME linux #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 @@ -656,7 +657,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 0 -#define CONFIG_BSWAPDSP 0 +#define CONFIG_BSWAPDSP 1 #define CONFIG_CABAC 0 #define CONFIG_CBS 0 #define CONFIG_CBS_AV1 0 @@ -668,7 +669,7 @@ #define CONFIG_DEFLATE_WRAPPER 0 #define CONFIG_DIRAC_PARSE 1 #define CONFIG_DNN 0 -#define CONFIG_DOVI_RPU 0 +#define CONFIG_DOVI_RPU 1 #define CONFIG_DVPROFILE 0 #define CONFIG_EXIF 0 #define CONFIG_FAANDCT 0 @@ -686,8 +687,8 @@ #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 0 #define CONFIG_H264_SEI 0 -#define CONFIG_HEVCPARSE 0 -#define CONFIG_HEVC_SEI 0 +#define CONFIG_HEVCPARSE 1 +#define CONFIG_HEVC_SEI 1 #define CONFIG_HPELDSP 1 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm-neon/config_components.h b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm-neon/config_components.h index d85ee4cc..6f3ae35a 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm-neon/config_components.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm-neon/config_components.h @@ -134,7 +134,7 @@ #define CONFIG_H264_QSV_DECODER 0 #define CONFIG_H264_RKMPP_DECODER 0 #define CONFIG_HAP_DECODER 0 -#define CONFIG_HEVC_DECODER 0 +#define CONFIG_HEVC_DECODER 1 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -959,7 +963,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 0 #define CONFIG_H264_PARSER 0 -#define CONFIG_HEVC_PARSER 0 +#define CONFIG_HEVC_PARSER 1 #define CONFIG_HDR_PARSER 0 #define CONFIG_IPU_PARSER 0 #define CONFIG_JPEG2000_PARSER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm-neon/libavcodec/codec_list.c b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm-neon/libavcodec/codec_list.c index 653357d3..9181e1cb 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm-neon/libavcodec/codec_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm-neon/libavcodec/codec_list.c @@ -15,4 +15,5 @@ static const FFCodec * const codec_list[] = { &ff_pcm_s32le_decoder, &ff_pcm_u8_decoder, &ff_libopus_decoder, + &ff_hevc_decoder, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm-neon/libavcodec/parser_list.c b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm-neon/libavcodec/parser_list.c index f81fbe8b..2d65b7d8 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm-neon/libavcodec/parser_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm-neon/libavcodec/parser_list.c @@ -6,4 +6,5 @@ static const AVCodecParser * const parser_list[] = { &ff_vp3_parser, &ff_vp8_parser, &ff_vp9_parser, + &ff_hevc_parser, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm-neon/libavutil/ffversion.h b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm-neon/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm-neon/libavutil/ffversion.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm-neon/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm/config.h b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm/config.h index c2aab774..53902563 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm/config.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME linux #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 @@ -656,7 +657,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 0 -#define CONFIG_BSWAPDSP 0 +#define CONFIG_BSWAPDSP 1 #define CONFIG_CABAC 0 #define CONFIG_CBS 0 #define CONFIG_CBS_AV1 0 @@ -668,7 +669,7 @@ #define CONFIG_DEFLATE_WRAPPER 0 #define CONFIG_DIRAC_PARSE 1 #define CONFIG_DNN 0 -#define CONFIG_DOVI_RPU 0 +#define CONFIG_DOVI_RPU 1 #define CONFIG_DVPROFILE 0 #define CONFIG_EXIF 0 #define CONFIG_FAANDCT 0 @@ -686,8 +687,8 @@ #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 0 #define CONFIG_H264_SEI 0 -#define CONFIG_HEVCPARSE 0 -#define CONFIG_HEVC_SEI 0 +#define CONFIG_HEVCPARSE 1 +#define CONFIG_HEVC_SEI 1 #define CONFIG_HPELDSP 1 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm/config_components.h b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm/config_components.h index d85ee4cc..6f3ae35a 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm/config_components.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm/config_components.h @@ -134,7 +134,7 @@ #define CONFIG_H264_QSV_DECODER 0 #define CONFIG_H264_RKMPP_DECODER 0 #define CONFIG_HAP_DECODER 0 -#define CONFIG_HEVC_DECODER 0 +#define CONFIG_HEVC_DECODER 1 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -959,7 +963,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 0 #define CONFIG_H264_PARSER 0 -#define CONFIG_HEVC_PARSER 0 +#define CONFIG_HEVC_PARSER 1 #define CONFIG_HDR_PARSER 0 #define CONFIG_IPU_PARSER 0 #define CONFIG_JPEG2000_PARSER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm/libavcodec/codec_list.c b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm/libavcodec/codec_list.c index 653357d3..9181e1cb 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm/libavcodec/codec_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm/libavcodec/codec_list.c @@ -15,4 +15,5 @@ static const FFCodec * const codec_list[] = { &ff_pcm_s32le_decoder, &ff_pcm_u8_decoder, &ff_libopus_decoder, + &ff_hevc_decoder, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm/libavcodec/parser_list.c b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm/libavcodec/parser_list.c index f81fbe8b..2d65b7d8 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm/libavcodec/parser_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm/libavcodec/parser_list.c @@ -6,4 +6,5 @@ static const AVCodecParser * const parser_list[] = { &ff_vp3_parser, &ff_vp8_parser, &ff_vp9_parser, + &ff_hevc_parser, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm/libavutil/ffversion.h b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm/libavutil/ffversion.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm64/config.h b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm64/config.h index 3ce3e42a..dae4f17a 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm64/config.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm64/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME linux #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 @@ -656,7 +657,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 0 -#define CONFIG_BSWAPDSP 0 +#define CONFIG_BSWAPDSP 1 #define CONFIG_CABAC 0 #define CONFIG_CBS 0 #define CONFIG_CBS_AV1 0 @@ -668,7 +669,7 @@ #define CONFIG_DEFLATE_WRAPPER 0 #define CONFIG_DIRAC_PARSE 1 #define CONFIG_DNN 0 -#define CONFIG_DOVI_RPU 0 +#define CONFIG_DOVI_RPU 1 #define CONFIG_DVPROFILE 0 #define CONFIG_EXIF 0 #define CONFIG_FAANDCT 0 @@ -686,8 +687,8 @@ #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 0 #define CONFIG_H264_SEI 0 -#define CONFIG_HEVCPARSE 0 -#define CONFIG_HEVC_SEI 0 +#define CONFIG_HEVCPARSE 1 +#define CONFIG_HEVC_SEI 1 #define CONFIG_HPELDSP 1 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm64/config_components.h b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm64/config_components.h index d85ee4cc..6f3ae35a 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm64/config_components.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm64/config_components.h @@ -134,7 +134,7 @@ #define CONFIG_H264_QSV_DECODER 0 #define CONFIG_H264_RKMPP_DECODER 0 #define CONFIG_HAP_DECODER 0 -#define CONFIG_HEVC_DECODER 0 +#define CONFIG_HEVC_DECODER 1 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -959,7 +963,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 0 #define CONFIG_H264_PARSER 0 -#define CONFIG_HEVC_PARSER 0 +#define CONFIG_HEVC_PARSER 1 #define CONFIG_HDR_PARSER 0 #define CONFIG_IPU_PARSER 0 #define CONFIG_JPEG2000_PARSER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm64/libavcodec/codec_list.c b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm64/libavcodec/codec_list.c index 653357d3..9181e1cb 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm64/libavcodec/codec_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm64/libavcodec/codec_list.c @@ -15,4 +15,5 @@ static const FFCodec * const codec_list[] = { &ff_pcm_s32le_decoder, &ff_pcm_u8_decoder, &ff_libopus_decoder, + &ff_hevc_decoder, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm64/libavcodec/parser_list.c b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm64/libavcodec/parser_list.c index f81fbe8b..2d65b7d8 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm64/libavcodec/parser_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm64/libavcodec/parser_list.c @@ -6,4 +6,5 @@ static const AVCodecParser * const parser_list[] = { &ff_vp3_parser, &ff_vp8_parser, &ff_vp9_parser, + &ff_hevc_parser, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm64/libavutil/ffversion.h b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm64/libavutil/ffversion.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/arm64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/config.asm b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/config.asm index 038ff00b..0ad6241d 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/config.asm +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/config.asm @@ -329,6 +329,7 @@ %define HAVE_BCRYPT 0 %define HAVE_VAAPI_DRM 0 %define HAVE_VAAPI_X11 0 +%define HAVE_VAAPI_WIN32 0 %define HAVE_VDPAU_X11 0 %define HAVE_PTHREADS 1 %define HAVE_OS2THREADS 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/config.h b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/config.h index d8285a78..36ea4c75 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/config.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME linux #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 @@ -656,7 +657,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 0 -#define CONFIG_BSWAPDSP 0 +#define CONFIG_BSWAPDSP 1 #define CONFIG_CABAC 0 #define CONFIG_CBS 0 #define CONFIG_CBS_AV1 0 @@ -668,7 +669,7 @@ #define CONFIG_DEFLATE_WRAPPER 0 #define CONFIG_DIRAC_PARSE 1 #define CONFIG_DNN 0 -#define CONFIG_DOVI_RPU 0 +#define CONFIG_DOVI_RPU 1 #define CONFIG_DVPROFILE 0 #define CONFIG_EXIF 0 #define CONFIG_FAANDCT 0 @@ -686,8 +687,8 @@ #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 0 #define CONFIG_H264_SEI 0 -#define CONFIG_HEVCPARSE 0 -#define CONFIG_HEVC_SEI 0 +#define CONFIG_HEVCPARSE 1 +#define CONFIG_HEVC_SEI 1 #define CONFIG_HPELDSP 1 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/config_components.h b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/config_components.h index d85ee4cc..6f3ae35a 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/config_components.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/config_components.h @@ -134,7 +134,7 @@ #define CONFIG_H264_QSV_DECODER 0 #define CONFIG_H264_RKMPP_DECODER 0 #define CONFIG_HAP_DECODER 0 -#define CONFIG_HEVC_DECODER 0 +#define CONFIG_HEVC_DECODER 1 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -959,7 +963,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 0 #define CONFIG_H264_PARSER 0 -#define CONFIG_HEVC_PARSER 0 +#define CONFIG_HEVC_PARSER 1 #define CONFIG_HDR_PARSER 0 #define CONFIG_IPU_PARSER 0 #define CONFIG_JPEG2000_PARSER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/libavcodec/codec_list.c b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/libavcodec/codec_list.c index 653357d3..9181e1cb 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/libavcodec/codec_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/libavcodec/codec_list.c @@ -15,4 +15,5 @@ static const FFCodec * const codec_list[] = { &ff_pcm_s32le_decoder, &ff_pcm_u8_decoder, &ff_libopus_decoder, + &ff_hevc_decoder, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/libavcodec/parser_list.c b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/libavcodec/parser_list.c index f81fbe8b..2d65b7d8 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/libavcodec/parser_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/libavcodec/parser_list.c @@ -6,4 +6,5 @@ static const AVCodecParser * const parser_list[] = { &ff_vp3_parser, &ff_vp8_parser, &ff_vp9_parser, + &ff_hevc_parser, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/libavutil/ffversion.h b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/libavutil/ffversion.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/x64/config.asm b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/x64/config.asm index bcb04508..87ed69fc 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/x64/config.asm +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/x64/config.asm @@ -329,6 +329,7 @@ %define HAVE_BCRYPT 0 %define HAVE_VAAPI_DRM 0 %define HAVE_VAAPI_X11 0 +%define HAVE_VAAPI_WIN32 0 %define HAVE_VDPAU_X11 0 %define HAVE_PTHREADS 1 %define HAVE_OS2THREADS 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/x64/config.h b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/x64/config.h index c2bda731..183bc7f7 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/x64/config.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/x64/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME linux #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 @@ -656,7 +657,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 0 -#define CONFIG_BSWAPDSP 0 +#define CONFIG_BSWAPDSP 1 #define CONFIG_CABAC 0 #define CONFIG_CBS 0 #define CONFIG_CBS_AV1 0 @@ -668,7 +669,7 @@ #define CONFIG_DEFLATE_WRAPPER 0 #define CONFIG_DIRAC_PARSE 1 #define CONFIG_DNN 0 -#define CONFIG_DOVI_RPU 0 +#define CONFIG_DOVI_RPU 1 #define CONFIG_DVPROFILE 0 #define CONFIG_EXIF 0 #define CONFIG_FAANDCT 0 @@ -686,8 +687,8 @@ #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 0 #define CONFIG_H264_SEI 0 -#define CONFIG_HEVCPARSE 0 -#define CONFIG_HEVC_SEI 0 +#define CONFIG_HEVCPARSE 1 +#define CONFIG_HEVC_SEI 1 #define CONFIG_HPELDSP 1 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/x64/config_components.h b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/x64/config_components.h index d85ee4cc..6f3ae35a 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/x64/config_components.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/x64/config_components.h @@ -134,7 +134,7 @@ #define CONFIG_H264_QSV_DECODER 0 #define CONFIG_H264_RKMPP_DECODER 0 #define CONFIG_HAP_DECODER 0 -#define CONFIG_HEVC_DECODER 0 +#define CONFIG_HEVC_DECODER 1 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -959,7 +963,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 0 #define CONFIG_H264_PARSER 0 -#define CONFIG_HEVC_PARSER 0 +#define CONFIG_HEVC_PARSER 1 #define CONFIG_HDR_PARSER 0 #define CONFIG_IPU_PARSER 0 #define CONFIG_JPEG2000_PARSER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/x64/libavcodec/codec_list.c b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/x64/libavcodec/codec_list.c index 653357d3..9181e1cb 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/x64/libavcodec/codec_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/x64/libavcodec/codec_list.c @@ -15,4 +15,5 @@ static const FFCodec * const codec_list[] = { &ff_pcm_s32le_decoder, &ff_pcm_u8_decoder, &ff_libopus_decoder, + &ff_hevc_decoder, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/x64/libavcodec/parser_list.c b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/x64/libavcodec/parser_list.c index f81fbe8b..2d65b7d8 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/x64/libavcodec/parser_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/x64/libavcodec/parser_list.c @@ -6,4 +6,5 @@ static const AVCodecParser * const parser_list[] = { &ff_vp3_parser, &ff_vp8_parser, &ff_vp9_parser, + &ff_hevc_parser, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/x64/libavutil/ffversion.h b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/x64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/x64/libavutil/ffversion.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/linux/x64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/mac/arm64/config.h b/arm/android/third_party/ffmpeg/chromium/config/Chromium/mac/arm64/config.h index 8581bab9..55203e0f 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/mac/arm64/config.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/mac/arm64/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME darwin #define av_restrict restrict #define EXTERN_PREFIX "_" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 @@ -656,7 +657,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 0 -#define CONFIG_BSWAPDSP 0 +#define CONFIG_BSWAPDSP 1 #define CONFIG_CABAC 0 #define CONFIG_CBS 0 #define CONFIG_CBS_AV1 0 @@ -668,7 +669,7 @@ #define CONFIG_DEFLATE_WRAPPER 0 #define CONFIG_DIRAC_PARSE 1 #define CONFIG_DNN 0 -#define CONFIG_DOVI_RPU 0 +#define CONFIG_DOVI_RPU 1 #define CONFIG_DVPROFILE 0 #define CONFIG_EXIF 0 #define CONFIG_FAANDCT 0 @@ -686,8 +687,8 @@ #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 0 #define CONFIG_H264_SEI 0 -#define CONFIG_HEVCPARSE 0 -#define CONFIG_HEVC_SEI 0 +#define CONFIG_HEVCPARSE 1 +#define CONFIG_HEVC_SEI 1 #define CONFIG_HPELDSP 1 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/mac/arm64/config_components.h b/arm/android/third_party/ffmpeg/chromium/config/Chromium/mac/arm64/config_components.h index d85ee4cc..6f3ae35a 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/mac/arm64/config_components.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/mac/arm64/config_components.h @@ -134,7 +134,7 @@ #define CONFIG_H264_QSV_DECODER 0 #define CONFIG_H264_RKMPP_DECODER 0 #define CONFIG_HAP_DECODER 0 -#define CONFIG_HEVC_DECODER 0 +#define CONFIG_HEVC_DECODER 1 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -959,7 +963,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 0 #define CONFIG_H264_PARSER 0 -#define CONFIG_HEVC_PARSER 0 +#define CONFIG_HEVC_PARSER 1 #define CONFIG_HDR_PARSER 0 #define CONFIG_IPU_PARSER 0 #define CONFIG_JPEG2000_PARSER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/mac/arm64/libavcodec/codec_list.c b/arm/android/third_party/ffmpeg/chromium/config/Chromium/mac/arm64/libavcodec/codec_list.c index 653357d3..9181e1cb 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/mac/arm64/libavcodec/codec_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/mac/arm64/libavcodec/codec_list.c @@ -15,4 +15,5 @@ static const FFCodec * const codec_list[] = { &ff_pcm_s32le_decoder, &ff_pcm_u8_decoder, &ff_libopus_decoder, + &ff_hevc_decoder, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/mac/arm64/libavcodec/parser_list.c b/arm/android/third_party/ffmpeg/chromium/config/Chromium/mac/arm64/libavcodec/parser_list.c index f81fbe8b..2d65b7d8 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/mac/arm64/libavcodec/parser_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/mac/arm64/libavcodec/parser_list.c @@ -6,4 +6,5 @@ static const AVCodecParser * const parser_list[] = { &ff_vp3_parser, &ff_vp8_parser, &ff_vp9_parser, + &ff_hevc_parser, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/mac/arm64/libavutil/ffversion.h b/arm/android/third_party/ffmpeg/chromium/config/Chromium/mac/arm64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/mac/arm64/libavutil/ffversion.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/mac/arm64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/mac/x64/config.asm b/arm/android/third_party/ffmpeg/chromium/config/Chromium/mac/x64/config.asm index 36e5a1e6..9276b180 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/mac/x64/config.asm +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/mac/x64/config.asm @@ -329,6 +329,7 @@ %define HAVE_BCRYPT 0 %define HAVE_VAAPI_DRM 0 %define HAVE_VAAPI_X11 0 +%define HAVE_VAAPI_WIN32 0 %define HAVE_VDPAU_X11 0 %define HAVE_PTHREADS 1 %define HAVE_OS2THREADS 0 @@ -640,7 +641,7 @@ %define CONFIG_AUDIO_FRAME_QUEUE 0 %define CONFIG_AUDIODSP 0 %define CONFIG_BLOCKDSP 0 -%define CONFIG_BSWAPDSP 0 +%define CONFIG_BSWAPDSP 1 %define CONFIG_CABAC 0 %define CONFIG_CBS 0 %define CONFIG_CBS_AV1 0 @@ -652,7 +653,7 @@ %define CONFIG_DEFLATE_WRAPPER 0 %define CONFIG_DIRAC_PARSE 1 %define CONFIG_DNN 0 -%define CONFIG_DOVI_RPU 0 +%define CONFIG_DOVI_RPU 1 %define CONFIG_DVPROFILE 0 %define CONFIG_EXIF 0 %define CONFIG_FAANDCT 0 @@ -670,8 +671,8 @@ %define CONFIG_H264PRED 1 %define CONFIG_H264QPEL 0 %define CONFIG_H264_SEI 0 -%define CONFIG_HEVCPARSE 0 -%define CONFIG_HEVC_SEI 0 +%define CONFIG_HEVCPARSE 1 +%define CONFIG_HEVC_SEI 1 %define CONFIG_HPELDSP 1 %define CONFIG_HUFFMAN 0 %define CONFIG_HUFFYUVDSP 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/mac/x64/config.h b/arm/android/third_party/ffmpeg/chromium/config/Chromium/mac/x64/config.h index 5db229d8..e0c55bf0 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/mac/x64/config.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/mac/x64/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME darwin #define av_restrict restrict #define EXTERN_PREFIX "_" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 @@ -656,7 +657,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 0 -#define CONFIG_BSWAPDSP 0 +#define CONFIG_BSWAPDSP 1 #define CONFIG_CABAC 0 #define CONFIG_CBS 0 #define CONFIG_CBS_AV1 0 @@ -668,7 +669,7 @@ #define CONFIG_DEFLATE_WRAPPER 0 #define CONFIG_DIRAC_PARSE 1 #define CONFIG_DNN 0 -#define CONFIG_DOVI_RPU 0 +#define CONFIG_DOVI_RPU 1 #define CONFIG_DVPROFILE 0 #define CONFIG_EXIF 0 #define CONFIG_FAANDCT 0 @@ -686,8 +687,8 @@ #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 0 #define CONFIG_H264_SEI 0 -#define CONFIG_HEVCPARSE 0 -#define CONFIG_HEVC_SEI 0 +#define CONFIG_HEVCPARSE 1 +#define CONFIG_HEVC_SEI 1 #define CONFIG_HPELDSP 1 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/mac/x64/config_components.h b/arm/android/third_party/ffmpeg/chromium/config/Chromium/mac/x64/config_components.h index d85ee4cc..6f3ae35a 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/mac/x64/config_components.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/mac/x64/config_components.h @@ -134,7 +134,7 @@ #define CONFIG_H264_QSV_DECODER 0 #define CONFIG_H264_RKMPP_DECODER 0 #define CONFIG_HAP_DECODER 0 -#define CONFIG_HEVC_DECODER 0 +#define CONFIG_HEVC_DECODER 1 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -959,7 +963,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 0 #define CONFIG_H264_PARSER 0 -#define CONFIG_HEVC_PARSER 0 +#define CONFIG_HEVC_PARSER 1 #define CONFIG_HDR_PARSER 0 #define CONFIG_IPU_PARSER 0 #define CONFIG_JPEG2000_PARSER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/mac/x64/libavcodec/codec_list.c b/arm/android/third_party/ffmpeg/chromium/config/Chromium/mac/x64/libavcodec/codec_list.c index 653357d3..9181e1cb 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/mac/x64/libavcodec/codec_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/mac/x64/libavcodec/codec_list.c @@ -15,4 +15,5 @@ static const FFCodec * const codec_list[] = { &ff_pcm_s32le_decoder, &ff_pcm_u8_decoder, &ff_libopus_decoder, + &ff_hevc_decoder, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/mac/x64/libavcodec/parser_list.c b/arm/android/third_party/ffmpeg/chromium/config/Chromium/mac/x64/libavcodec/parser_list.c index f81fbe8b..2d65b7d8 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/mac/x64/libavcodec/parser_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/mac/x64/libavcodec/parser_list.c @@ -6,4 +6,5 @@ static const AVCodecParser * const parser_list[] = { &ff_vp3_parser, &ff_vp8_parser, &ff_vp9_parser, + &ff_hevc_parser, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/mac/x64/libavutil/ffversion.h b/arm/android/third_party/ffmpeg/chromium/config/Chromium/mac/x64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/mac/x64/libavutil/ffversion.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/mac/x64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/win-msvc/ia32/config.asm b/arm/android/third_party/ffmpeg/chromium/config/Chromium/win-msvc/ia32/config.asm index e425512a..99eeb26c 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/win-msvc/ia32/config.asm +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/win-msvc/ia32/config.asm @@ -563,7 +563,7 @@ %define CONFIG_AUDIO_FRAME_QUEUE 0 %define CONFIG_AUDIODSP 0 %define CONFIG_BLOCKDSP 0 -%define CONFIG_BSWAPDSP 0 +%define CONFIG_BSWAPDSP 1 %define CONFIG_CABAC 0 %define CONFIG_CBS 0 %define CONFIG_CBS_H264 0 @@ -587,7 +587,7 @@ %define CONFIG_H264PARSE 0 %define CONFIG_H264PRED 1 %define CONFIG_H264QPEL 0 -%define CONFIG_HEVCPARSE 0 +%define CONFIG_HEVCPARSE 1 %define CONFIG_HPELDSP 1 %define CONFIG_HUFFMAN 0 %define CONFIG_HUFFYUVDSP 0 @@ -752,7 +752,7 @@ %define CONFIG_H264_QSV_DECODER 0 %define CONFIG_H264_RKMPP_DECODER 0 %define CONFIG_HAP_DECODER 0 -%define CONFIG_HEVC_DECODER 0 +%define CONFIG_HEVC_DECODER 1 %define CONFIG_HEVC_QSV_DECODER 0 %define CONFIG_HEVC_RKMPP_DECODER 0 %define CONFIG_HEVC_V4L2M2M_DECODER 0 @@ -1450,7 +1450,7 @@ %define CONFIG_H261_PARSER 0 %define CONFIG_H263_PARSER 0 %define CONFIG_H264_PARSER 0 -%define CONFIG_HEVC_PARSER 0 +%define CONFIG_HEVC_PARSER 1 %define CONFIG_MJPEG_PARSER 0 %define CONFIG_MLP_PARSER 0 %define CONFIG_MPEG4VIDEO_PARSER 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/win-msvc/ia32/config.h b/arm/android/third_party/ffmpeg/chromium/config/Chromium/win-msvc/ia32/config.h index a23d3a60..b1fb82ac 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/win-msvc/ia32/config.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/win-msvc/ia32/config.h @@ -578,7 +578,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 0 -#define CONFIG_BSWAPDSP 0 +#define CONFIG_BSWAPDSP 1 #define CONFIG_CABAC 0 #define CONFIG_CBS 0 #define CONFIG_CBS_H264 0 @@ -602,7 +602,7 @@ #define CONFIG_H264PARSE 0 #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 0 -#define CONFIG_HEVCPARSE 0 +#define CONFIG_HEVCPARSE 1 #define CONFIG_HPELDSP 1 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 @@ -767,7 +767,7 @@ #define CONFIG_H264_QSV_DECODER 0 #define CONFIG_H264_RKMPP_DECODER 0 #define CONFIG_HAP_DECODER 0 -#define CONFIG_HEVC_DECODER 0 +#define CONFIG_HEVC_DECODER 1 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 @@ -1465,7 +1465,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 0 #define CONFIG_H264_PARSER 0 -#define CONFIG_HEVC_PARSER 0 +#define CONFIG_HEVC_PARSER 1 #define CONFIG_MJPEG_PARSER 0 #define CONFIG_MLP_PARSER 0 #define CONFIG_MPEG4VIDEO_PARSER 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/win-msvc/ia32/libavcodec/codec_list.c b/arm/android/third_party/ffmpeg/chromium/config/Chromium/win-msvc/ia32/libavcodec/codec_list.c index 9407bd27..069f0f61 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/win-msvc/ia32/libavcodec/codec_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/win-msvc/ia32/libavcodec/codec_list.c @@ -15,4 +15,5 @@ static const AVCodec * const codec_list[] = { &ff_pcm_s32le_decoder, &ff_pcm_u8_decoder, &ff_libopus_decoder, + &ff_hevc_decoder, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/win-msvc/ia32/libavcodec/parser_list.c b/arm/android/third_party/ffmpeg/chromium/config/Chromium/win-msvc/ia32/libavcodec/parser_list.c index 4c59b89c..86297768 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/win-msvc/ia32/libavcodec/parser_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/win-msvc/ia32/libavcodec/parser_list.c @@ -5,4 +5,5 @@ static const AVCodecParser * const parser_list[] = { &ff_vorbis_parser, &ff_vp3_parser, &ff_vp8_parser, + &ff_hevc_parser, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/win-msvc/x64/config.asm b/arm/android/third_party/ffmpeg/chromium/config/Chromium/win-msvc/x64/config.asm index 3c9bd637..71c73ca0 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/win-msvc/x64/config.asm +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/win-msvc/x64/config.asm @@ -563,7 +563,7 @@ %define CONFIG_AUDIO_FRAME_QUEUE 0 %define CONFIG_AUDIODSP 0 %define CONFIG_BLOCKDSP 0 -%define CONFIG_BSWAPDSP 0 +%define CONFIG_BSWAPDSP 1 %define CONFIG_CABAC 0 %define CONFIG_CBS 0 %define CONFIG_CBS_H264 0 @@ -587,7 +587,7 @@ %define CONFIG_H264PARSE 0 %define CONFIG_H264PRED 1 %define CONFIG_H264QPEL 0 -%define CONFIG_HEVCPARSE 0 +%define CONFIG_HEVCPARSE 1 %define CONFIG_HPELDSP 1 %define CONFIG_HUFFMAN 0 %define CONFIG_HUFFYUVDSP 0 @@ -752,7 +752,7 @@ %define CONFIG_H264_QSV_DECODER 0 %define CONFIG_H264_RKMPP_DECODER 0 %define CONFIG_HAP_DECODER 0 -%define CONFIG_HEVC_DECODER 0 +%define CONFIG_HEVC_DECODER 1 %define CONFIG_HEVC_QSV_DECODER 0 %define CONFIG_HEVC_RKMPP_DECODER 0 %define CONFIG_HEVC_V4L2M2M_DECODER 0 @@ -1450,7 +1450,7 @@ %define CONFIG_H261_PARSER 0 %define CONFIG_H263_PARSER 0 %define CONFIG_H264_PARSER 0 -%define CONFIG_HEVC_PARSER 0 +%define CONFIG_HEVC_PARSER 1 %define CONFIG_MJPEG_PARSER 0 %define CONFIG_MLP_PARSER 0 %define CONFIG_MPEG4VIDEO_PARSER 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/win-msvc/x64/config.h b/arm/android/third_party/ffmpeg/chromium/config/Chromium/win-msvc/x64/config.h index 89d69e47..81ff36df 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/win-msvc/x64/config.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/win-msvc/x64/config.h @@ -578,7 +578,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 0 -#define CONFIG_BSWAPDSP 0 +#define CONFIG_BSWAPDSP 1 #define CONFIG_CABAC 0 #define CONFIG_CBS 0 #define CONFIG_CBS_H264 0 @@ -602,7 +602,7 @@ #define CONFIG_H264PARSE 0 #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 0 -#define CONFIG_HEVCPARSE 0 +#define CONFIG_HEVCPARSE 1 #define CONFIG_HPELDSP 1 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 @@ -767,7 +767,7 @@ #define CONFIG_H264_QSV_DECODER 0 #define CONFIG_H264_RKMPP_DECODER 0 #define CONFIG_HAP_DECODER 0 -#define CONFIG_HEVC_DECODER 0 +#define CONFIG_HEVC_DECODER 1 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 @@ -1465,7 +1465,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 0 #define CONFIG_H264_PARSER 0 -#define CONFIG_HEVC_PARSER 0 +#define CONFIG_HEVC_PARSER 1 #define CONFIG_MJPEG_PARSER 0 #define CONFIG_MLP_PARSER 0 #define CONFIG_MPEG4VIDEO_PARSER 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/win-msvc/x64/libavcodec/codec_list.c b/arm/android/third_party/ffmpeg/chromium/config/Chromium/win-msvc/x64/libavcodec/codec_list.c index 9407bd27..069f0f61 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/win-msvc/x64/libavcodec/codec_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/win-msvc/x64/libavcodec/codec_list.c @@ -15,4 +15,5 @@ static const AVCodec * const codec_list[] = { &ff_pcm_s32le_decoder, &ff_pcm_u8_decoder, &ff_libopus_decoder, + &ff_hevc_decoder, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/win-msvc/x64/libavcodec/parser_list.c b/arm/android/third_party/ffmpeg/chromium/config/Chromium/win-msvc/x64/libavcodec/parser_list.c index 4c59b89c..86297768 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/win-msvc/x64/libavcodec/parser_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/win-msvc/x64/libavcodec/parser_list.c @@ -5,4 +5,5 @@ static const AVCodecParser * const parser_list[] = { &ff_vorbis_parser, &ff_vp3_parser, &ff_vp8_parser, + &ff_hevc_parser, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/arm64/config.h b/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/arm64/config.h index fcf1f42f..0fc3ad3f 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/arm64/config.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/arm64/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME win32 #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 0 #define HAVE_OS2THREADS 0 @@ -656,7 +657,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 0 -#define CONFIG_BSWAPDSP 0 +#define CONFIG_BSWAPDSP 1 #define CONFIG_CABAC 0 #define CONFIG_CBS 0 #define CONFIG_CBS_AV1 0 @@ -668,7 +669,7 @@ #define CONFIG_DEFLATE_WRAPPER 0 #define CONFIG_DIRAC_PARSE 1 #define CONFIG_DNN 0 -#define CONFIG_DOVI_RPU 0 +#define CONFIG_DOVI_RPU 1 #define CONFIG_DVPROFILE 0 #define CONFIG_EXIF 0 #define CONFIG_FAANDCT 0 @@ -686,8 +687,8 @@ #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 0 #define CONFIG_H264_SEI 0 -#define CONFIG_HEVCPARSE 0 -#define CONFIG_HEVC_SEI 0 +#define CONFIG_HEVCPARSE 1 +#define CONFIG_HEVC_SEI 1 #define CONFIG_HPELDSP 1 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/arm64/config_components.h b/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/arm64/config_components.h index d85ee4cc..6f3ae35a 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/arm64/config_components.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/arm64/config_components.h @@ -134,7 +134,7 @@ #define CONFIG_H264_QSV_DECODER 0 #define CONFIG_H264_RKMPP_DECODER 0 #define CONFIG_HAP_DECODER 0 -#define CONFIG_HEVC_DECODER 0 +#define CONFIG_HEVC_DECODER 1 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -959,7 +963,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 0 #define CONFIG_H264_PARSER 0 -#define CONFIG_HEVC_PARSER 0 +#define CONFIG_HEVC_PARSER 1 #define CONFIG_HDR_PARSER 0 #define CONFIG_IPU_PARSER 0 #define CONFIG_JPEG2000_PARSER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/arm64/libavcodec/codec_list.c b/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/arm64/libavcodec/codec_list.c index 653357d3..9181e1cb 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/arm64/libavcodec/codec_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/arm64/libavcodec/codec_list.c @@ -15,4 +15,5 @@ static const FFCodec * const codec_list[] = { &ff_pcm_s32le_decoder, &ff_pcm_u8_decoder, &ff_libopus_decoder, + &ff_hevc_decoder, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/arm64/libavcodec/parser_list.c b/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/arm64/libavcodec/parser_list.c index f81fbe8b..2d65b7d8 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/arm64/libavcodec/parser_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/arm64/libavcodec/parser_list.c @@ -6,4 +6,5 @@ static const AVCodecParser * const parser_list[] = { &ff_vp3_parser, &ff_vp8_parser, &ff_vp9_parser, + &ff_hevc_parser, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/arm64/libavutil/ffversion.h b/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/arm64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/arm64/libavutil/ffversion.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/arm64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/ia32/config.asm b/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/ia32/config.asm index c5f74314..2fdb72be 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/ia32/config.asm +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/ia32/config.asm @@ -329,6 +329,7 @@ %define HAVE_BCRYPT 0 %define HAVE_VAAPI_DRM 0 %define HAVE_VAAPI_X11 0 +%define HAVE_VAAPI_WIN32 0 %define HAVE_VDPAU_X11 0 %define HAVE_PTHREADS 0 %define HAVE_OS2THREADS 0 @@ -640,7 +641,7 @@ %define CONFIG_AUDIO_FRAME_QUEUE 0 %define CONFIG_AUDIODSP 0 %define CONFIG_BLOCKDSP 0 -%define CONFIG_BSWAPDSP 0 +%define CONFIG_BSWAPDSP 1 %define CONFIG_CABAC 0 %define CONFIG_CBS 0 %define CONFIG_CBS_AV1 0 @@ -652,7 +653,7 @@ %define CONFIG_DEFLATE_WRAPPER 0 %define CONFIG_DIRAC_PARSE 1 %define CONFIG_DNN 0 -%define CONFIG_DOVI_RPU 0 +%define CONFIG_DOVI_RPU 1 %define CONFIG_DVPROFILE 0 %define CONFIG_EXIF 0 %define CONFIG_FAANDCT 0 @@ -670,8 +671,8 @@ %define CONFIG_H264PRED 1 %define CONFIG_H264QPEL 0 %define CONFIG_H264_SEI 0 -%define CONFIG_HEVCPARSE 0 -%define CONFIG_HEVC_SEI 0 +%define CONFIG_HEVCPARSE 1 +%define CONFIG_HEVC_SEI 1 %define CONFIG_HPELDSP 1 %define CONFIG_HUFFMAN 0 %define CONFIG_HUFFYUVDSP 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/ia32/config.h b/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/ia32/config.h index 284b0803..26bf57b3 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/ia32/config.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/ia32/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME win32 #define av_restrict restrict #define EXTERN_PREFIX "_" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 0 #define HAVE_OS2THREADS 0 @@ -656,7 +657,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 0 -#define CONFIG_BSWAPDSP 0 +#define CONFIG_BSWAPDSP 1 #define CONFIG_CABAC 0 #define CONFIG_CBS 0 #define CONFIG_CBS_AV1 0 @@ -668,7 +669,7 @@ #define CONFIG_DEFLATE_WRAPPER 0 #define CONFIG_DIRAC_PARSE 1 #define CONFIG_DNN 0 -#define CONFIG_DOVI_RPU 0 +#define CONFIG_DOVI_RPU 1 #define CONFIG_DVPROFILE 0 #define CONFIG_EXIF 0 #define CONFIG_FAANDCT 0 @@ -686,8 +687,8 @@ #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 0 #define CONFIG_H264_SEI 0 -#define CONFIG_HEVCPARSE 0 -#define CONFIG_HEVC_SEI 0 +#define CONFIG_HEVCPARSE 1 +#define CONFIG_HEVC_SEI 1 #define CONFIG_HPELDSP 1 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/ia32/config_components.h b/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/ia32/config_components.h index d85ee4cc..6f3ae35a 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/ia32/config_components.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/ia32/config_components.h @@ -134,7 +134,7 @@ #define CONFIG_H264_QSV_DECODER 0 #define CONFIG_H264_RKMPP_DECODER 0 #define CONFIG_HAP_DECODER 0 -#define CONFIG_HEVC_DECODER 0 +#define CONFIG_HEVC_DECODER 1 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -959,7 +963,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 0 #define CONFIG_H264_PARSER 0 -#define CONFIG_HEVC_PARSER 0 +#define CONFIG_HEVC_PARSER 1 #define CONFIG_HDR_PARSER 0 #define CONFIG_IPU_PARSER 0 #define CONFIG_JPEG2000_PARSER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/ia32/libavcodec/codec_list.c b/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/ia32/libavcodec/codec_list.c index 653357d3..9181e1cb 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/ia32/libavcodec/codec_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/ia32/libavcodec/codec_list.c @@ -15,4 +15,5 @@ static const FFCodec * const codec_list[] = { &ff_pcm_s32le_decoder, &ff_pcm_u8_decoder, &ff_libopus_decoder, + &ff_hevc_decoder, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/ia32/libavcodec/parser_list.c b/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/ia32/libavcodec/parser_list.c index f81fbe8b..2d65b7d8 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/ia32/libavcodec/parser_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/ia32/libavcodec/parser_list.c @@ -6,4 +6,5 @@ static const AVCodecParser * const parser_list[] = { &ff_vp3_parser, &ff_vp8_parser, &ff_vp9_parser, + &ff_hevc_parser, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/ia32/libavutil/ffversion.h b/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/ia32/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/ia32/libavutil/ffversion.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/ia32/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/x64/config.asm b/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/x64/config.asm index fc0d3aa8..11ea6353 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/x64/config.asm +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/x64/config.asm @@ -329,6 +329,7 @@ %define HAVE_BCRYPT 0 %define HAVE_VAAPI_DRM 0 %define HAVE_VAAPI_X11 0 +%define HAVE_VAAPI_WIN32 0 %define HAVE_VDPAU_X11 0 %define HAVE_PTHREADS 0 %define HAVE_OS2THREADS 0 @@ -640,7 +641,7 @@ %define CONFIG_AUDIO_FRAME_QUEUE 0 %define CONFIG_AUDIODSP 0 %define CONFIG_BLOCKDSP 0 -%define CONFIG_BSWAPDSP 0 +%define CONFIG_BSWAPDSP 1 %define CONFIG_CABAC 0 %define CONFIG_CBS 0 %define CONFIG_CBS_AV1 0 @@ -652,7 +653,7 @@ %define CONFIG_DEFLATE_WRAPPER 0 %define CONFIG_DIRAC_PARSE 1 %define CONFIG_DNN 0 -%define CONFIG_DOVI_RPU 0 +%define CONFIG_DOVI_RPU 1 %define CONFIG_DVPROFILE 0 %define CONFIG_EXIF 0 %define CONFIG_FAANDCT 0 @@ -670,8 +671,8 @@ %define CONFIG_H264PRED 1 %define CONFIG_H264QPEL 0 %define CONFIG_H264_SEI 0 -%define CONFIG_HEVCPARSE 0 -%define CONFIG_HEVC_SEI 0 +%define CONFIG_HEVCPARSE 1 +%define CONFIG_HEVC_SEI 1 %define CONFIG_HPELDSP 1 %define CONFIG_HUFFMAN 0 %define CONFIG_HUFFYUVDSP 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/x64/config.h b/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/x64/config.h index e76ad5b9..75f478ac 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/x64/config.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/x64/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME win64 #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 0 #define HAVE_OS2THREADS 0 @@ -656,7 +657,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 0 -#define CONFIG_BSWAPDSP 0 +#define CONFIG_BSWAPDSP 1 #define CONFIG_CABAC 0 #define CONFIG_CBS 0 #define CONFIG_CBS_AV1 0 @@ -668,7 +669,7 @@ #define CONFIG_DEFLATE_WRAPPER 0 #define CONFIG_DIRAC_PARSE 1 #define CONFIG_DNN 0 -#define CONFIG_DOVI_RPU 0 +#define CONFIG_DOVI_RPU 1 #define CONFIG_DVPROFILE 0 #define CONFIG_EXIF 0 #define CONFIG_FAANDCT 0 @@ -686,8 +687,8 @@ #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 0 #define CONFIG_H264_SEI 0 -#define CONFIG_HEVCPARSE 0 -#define CONFIG_HEVC_SEI 0 +#define CONFIG_HEVCPARSE 1 +#define CONFIG_HEVC_SEI 1 #define CONFIG_HPELDSP 1 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/x64/config_components.h b/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/x64/config_components.h index d85ee4cc..6f3ae35a 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/x64/config_components.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/x64/config_components.h @@ -134,7 +134,7 @@ #define CONFIG_H264_QSV_DECODER 0 #define CONFIG_H264_RKMPP_DECODER 0 #define CONFIG_HAP_DECODER 0 -#define CONFIG_HEVC_DECODER 0 +#define CONFIG_HEVC_DECODER 1 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -959,7 +963,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 0 #define CONFIG_H264_PARSER 0 -#define CONFIG_HEVC_PARSER 0 +#define CONFIG_HEVC_PARSER 1 #define CONFIG_HDR_PARSER 0 #define CONFIG_IPU_PARSER 0 #define CONFIG_JPEG2000_PARSER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/x64/libavcodec/codec_list.c b/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/x64/libavcodec/codec_list.c index 653357d3..9181e1cb 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/x64/libavcodec/codec_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/x64/libavcodec/codec_list.c @@ -15,4 +15,5 @@ static const FFCodec * const codec_list[] = { &ff_pcm_s32le_decoder, &ff_pcm_u8_decoder, &ff_libopus_decoder, + &ff_hevc_decoder, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/x64/libavcodec/parser_list.c b/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/x64/libavcodec/parser_list.c index f81fbe8b..2d65b7d8 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/x64/libavcodec/parser_list.c +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/x64/libavcodec/parser_list.c @@ -6,4 +6,5 @@ static const AVCodecParser * const parser_list[] = { &ff_vp3_parser, &ff_vp8_parser, &ff_vp9_parser, + &ff_hevc_parser, NULL }; diff --git a/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/x64/libavutil/ffversion.h b/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/x64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/x64/libavutil/ffversion.h +++ b/arm/android/third_party/ffmpeg/chromium/config/Chromium/win/x64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/android/third_party/ffmpeg/chromium/patches/README b/arm/android/third_party/ffmpeg/chromium/patches/README index 11fa345f..b5675cfe 100644 --- a/arm/android/third_party/ffmpeg/chromium/patches/README +++ b/arm/android/third_party/ffmpeg/chromium/patches/README @@ -953,3 +953,18 @@ Affects: libavcodec/libx264.c libavutil/frame.h +------------------------------------------------------------------ +commit 13156c083ffe746a0f5908778c6fc6d165217af0 +Author: Frank Liberato +Date: Wed May 24 05:24:25 2023 +0000 + + Replace #include "" with #include <> + + generate_gn.py assumes that "includes" can be found in the current + directory, while can be ignored. Rather than try to + teach it how to search include paths, change the one instance in + ffmpeg of "stdint.h" to . + +Affects: + libavcodec/vp8data.c + diff --git a/arm/android/third_party/ffmpeg/chromium/patches/config_flag_changes.txt b/arm/android/third_party/ffmpeg/chromium/patches/config_flag_changes.txt index 94ab5cf9..db1c38b5 100644 --- a/arm/android/third_party/ffmpeg/chromium/patches/config_flag_changes.txt +++ b/arm/android/third_party/ffmpeg/chromium/patches/config_flag_changes.txt @@ -1,33 +1,12 @@ -+ CONFIG_AVIO_HTTP_SERVE_FILES_EXAMPLE 1 -+ CONFIG_AVIO_READ_CALLBACK_EXAMPLE 1 -+ CONFIG_DECODE_FILTER_AUDIO_EXAMPLE 0 -+ CONFIG_DECODE_FILTER_VIDEO_EXAMPLE 0 -+ CONFIG_DEMUX_DECODE_EXAMPLE 1 -+ CONFIG_HSTACK_QSV_FILTER 0 -+ CONFIG_LIBARIBCAPTION 0 -+ CONFIG_LIBARIBCAPTION_DECODER 0 -+ CONFIG_MUX_EXAMPLE 0 -+ CONFIG_QSV_DECODE_EXAMPLE 0 -+ CONFIG_REMUX_EXAMPLE 1 -+ CONFIG_RESAMPLE_AUDIO_EXAMPLE 0 -+ CONFIG_RKA_DECODER 0 -+ CONFIG_RKA_DEMUXER 0 -+ CONFIG_SCALE_VIDEO_EXAMPLE 0 -+ CONFIG_SDNS_DEMUXER 0 -+ CONFIG_SHOW_METADATA_EXAMPLE 1 -+ CONFIG_TRANSCODE_EXAMPLE 0 -+ CONFIG_VSTACK_QSV_FILTER 0 -+ CONFIG_XSTACK_QSV_FILTER 0 -- CONFIG_AVIO_READING_EXAMPLE 1 -- CONFIG_DEMUXING_DECODING_EXAMPLE 1 -- CONFIG_FILTERING_AUDIO_EXAMPLE 0 -- CONFIG_FILTERING_VIDEO_EXAMPLE 0 -- CONFIG_HTTP_MULTICLIENT_EXAMPLE 0 -- CONFIG_HTTP_MULTICLIENT_EXAMPLE 1 -- CONFIG_METADATA_EXAMPLE 1 -- CONFIG_MUXING_EXAMPLE 0 -- CONFIG_QSVDEC_EXAMPLE 0 -- CONFIG_REMUXING_EXAMPLE 1 -- CONFIG_RESAMPLING_AUDIO_EXAMPLE 0 -- CONFIG_SCALING_VIDEO_EXAMPLE 0 -- CONFIG_TRANSCODING_EXAMPLE 0 ++ CONFIG_AFIREQSRC_FILTER 0 ++ CONFIG_ARLS_FILTER 0 ++ CONFIG_AV1_MEDIACODEC_ENCODER 0 ++ CONFIG_CCREPACK_FILTER 0 ++ CONFIG_MPEG4_MEDIACODEC_ENCODER 0 ++ CONFIG_PDV_DECODER 0 ++ CONFIG_PDV_DEMUXER 0 ++ CONFIG_VP8_MEDIACODEC_ENCODER 0 ++ CONFIG_VP9_MEDIACODEC_ENCODER 0 ++ CONFIG_ZONEPLATE_FILTER 0 ++ HAVE_VAAPI_WIN32 0 +- CONFIG_LIBOPENJPEG_DECODER 0 diff --git a/arm/android/third_party/ffmpeg/chromium/scripts/build_ffmpeg.py b/arm/android/third_party/ffmpeg/chromium/scripts/build_ffmpeg.py index f8a6cb27..e126807d 100755 --- a/arm/android/third_party/ffmpeg/chromium/scripts/build_ffmpeg.py +++ b/arm/android/third_party/ffmpeg/chromium/scripts/build_ffmpeg.py @@ -731,10 +731,6 @@ def ConfigureAndBuild(target_arch, target_os, host_os, host_arch, parallel_jobs, configure_flags['Common'].extend([ # --optflags doesn't append multiple entries, so set all at once. '--optflags="-O3"', - '--extra-cflags=-mavx', - '--extra-cflags=-maes', - '--extra-cflags=-mpclmul', - '--extra-cflags=-O3', '--enable-decoder=theora,vp8', '--enable-parser=vp3,vp8', ]) @@ -748,10 +744,6 @@ def ConfigureAndBuild(target_arch, target_os, host_os, host_arch, parallel_jobs, else: configure_flags['Common'].extend([ '--enable-lto', - '--extra-cflags=-O3', - '--extra-cflags=-mavx', - '--extra-cflags=-maes', - '--extra-cflags=-mpclmul', '--arch=x86_64', '--target-os=linux', ]) @@ -1011,9 +1003,9 @@ def ConfigureAndBuild(target_arch, target_os, host_os, host_arch, parallel_jobs, # Google Chrome & ChromeOS specific configuration. configure_flags['Chrome'].extend([ - '--enable-decoder=aac,h264,mp3,eac3,ac3,hevc,mpeg4,mpegvideo,mp2,mp1,flac', - '--enable-demuxer=aac,mp3,mov,dtshd,dts,avi,mpegvideo,m4v,h264,vc1,flac', - '--enable-parser=aac,h264,hevc,mpegaudio,mpeg4video,mpegvideo,ac3,h261,vc1,h263,flac', + '--enable-decoder=aac,h264,mp3,hevc', + '--enable-demuxer=aac,mp3', + '--enable-parser=aac,h264,hevc', ]) # Google ChromeOS specific configuration. @@ -1024,12 +1016,6 @@ def ConfigureAndBuild(target_arch, target_os, host_os, host_arch, parallel_jobs, '--enable-decoder=mpeg4', '--enable-parser=h263,mpeg4video', '--enable-demuxer=avi', - # Enable playing Android 3gp files. - '--enable-demuxer=amr', - '--enable-decoder=amrnb,amrwb', - # Wav files for playing phone messages. - '--enable-decoder=gsm_ms', - '--enable-parser=gsm', ]) configure_flags['ChromeAndroid'].extend([ diff --git a/arm/android/third_party/ffmpeg/chromium/scripts/generate_gn.py b/arm/android/third_party/ffmpeg/chromium/scripts/generate_gn.py index d36b0a22..c7869a7d 100755 --- a/arm/android/third_party/ffmpeg/chromium/scripts/generate_gn.py +++ b/arm/android/third_party/ffmpeg/chromium/scripts/generate_gn.py @@ -700,11 +700,11 @@ LICENSE_EXCEPTIONS = [ # Regex to find lines matching #include "some_dir\some_file.h". # Also works for assembly files that use %include. -INCLUDE_REGEX = re.compile('[#%]\s*include\s+"([^"]+)"') +INCLUDE_REGEX = re.compile('^\s*[#%]\s*include\s+"([^"]+)"') # Regex to find whacky includes that we might be overlooking (e.g. using macros # or defines). -EXOTIC_INCLUDE_REGEX = re.compile('[#%]\s*include\s+[^"<\s].+') +EXOTIC_INCLUDE_REGEX = re.compile('^\s*[#%]\s*include\s+[^"<\s].+') # Prefix added to renamed files as part of RENAME_PREFIX = 'autorename' @@ -782,7 +782,7 @@ def GetIncludedSources(file_path, source_dir, include_set, scan_only=False): elif include_file_path in MUST_BE_MISSING_INCLUDE_FILES: continue else: - exit('Failed to find file ' + include_file_path) + exit('Failed to find file ' + include_file_path + " in " + file_path) # At this point we've found the file. Check if its in our ignore list which # means that the list should be updated to no longer mention this file. diff --git a/arm/android/third_party/ffmpeg/ffmpeg_generated.gni b/arm/android/third_party/ffmpeg/ffmpeg_generated.gni index f0b5c666..13e31ffb 100644 --- a/arm/android/third_party/ffmpeg/ffmpeg_generated.gni +++ b/arm/android/third_party/ffmpeg/ffmpeg_generated.gni @@ -242,6 +242,25 @@ if (use_linux_config && ffmpeg_branding == "ChromeOS") { } if ((is_apple && ffmpeg_branding == "Chrome") || (is_win && ffmpeg_branding == "Chrome") || (use_linux_config && ffmpeg_branding == "Chrome") || (use_linux_config && ffmpeg_branding == "ChromeOS")) { + + ffmpeg_c_sources += [ + "libavcodec/autorename_libavcodec_bswapdsp.c", + "libavcodec/dovi_rpu.c", + "libavcodec/dynamic_hdr_vivid.c", + "libavcodec/hevc_cabac.c", + "libavcodec/hevc_data.c", + "libavcodec/hevc_filter.c", + "libavcodec/hevc_mvs.c", + "libavcodec/hevc_parse.c", + "libavcodec/hevc_parser.c", + "libavcodec/hevc_ps.c", + "libavcodec/hevc_refs.c", + "libavcodec/hevc_sei.c", + "libavcodec/hevcdec.c", + "libavcodec/hevcdsp.c", + "libavcodec/hevcpred.c" + ] + ffmpeg_c_sources += [ "libavcodec/atsc_a53.c", "libavcodec/cabac.c", @@ -338,6 +357,22 @@ if ((use_linux_config && current_cpu == "arm" && arm_use_neon && ffmpeg_branding } if ((is_apple && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (use_linux_config && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (use_linux_config && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || (use_linux_config && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (use_linux_config && current_cpu == "x86" && ffmpeg_branding == "ChromeOS")) { + + ffmpeg_c_sources += [ + "libavcodec/x86/bswapdsp_init.c", + "libavcodec/x86/hevcdsp_init.c" + ] + + ffmpeg_asm_sources += [ + "libavcodec/x86/bswapdsp.asm", + "libavcodec/x86/hevc_add_res.asm", + "libavcodec/x86/hevc_deblock.asm", + "libavcodec/x86/hevc_idct.asm", + "libavcodec/x86/hevc_mc.asm", + "libavcodec/x86/hevc_sao.asm", + "libavcodec/x86/hevc_sao_10bit.asm" + ] + ffmpeg_c_sources += [ "libavcodec/x86/h264_qpel.c", "libavcodec/x86/h264chroma_init.c", @@ -437,6 +472,23 @@ if ((is_android && current_cpu == "arm" && arm_use_neon) || (use_linux_config && ] } +if ((is_apple) || (is_win) || (use_linux_config)) { + ffmpeg_c_sources += [ + "libavcodec/autorename_libavcodec_videodsp.c", + "libavcodec/h264pred.c", + "libavcodec/hpeldsp.c", + "libavcodec/jpegquanttables.c", + "libavcodec/vp3.c", + "libavcodec/vp3_parser.c", + "libavcodec/vp3dsp.c", + "libavcodec/vp8.c", + "libavcodec/vp8_parser.c", + "libavcodec/vp8data.c", + "libavcodec/vp8dsp.c", + "libavcodec/vpx_rac.c", + ] +} + if ((is_android && current_cpu == "x64") || (is_android && current_cpu == "x86") || (is_apple && current_cpu == "x64") || (is_win && current_cpu == "x64") || (is_win && current_cpu == "x86") || (use_linux_config && current_cpu == "x64") || (use_linux_config && current_cpu == "x86")) { ffmpeg_c_sources += [ "libavcodec/x86/autorename_libavcodec_x86_vorbisdsp_init.c", @@ -471,22 +523,6 @@ if ((is_android && current_cpu == "arm64") || (is_apple && current_cpu == "arm64 ] } -if ((is_apple) || (is_win) || (use_linux_config)) { - ffmpeg_c_sources += [ - "libavcodec/autorename_libavcodec_videodsp.c", - "libavcodec/h264pred.c", - "libavcodec/hpeldsp.c", - "libavcodec/jpegquanttables.c", - "libavcodec/vp3.c", - "libavcodec/vp3_parser.c", - "libavcodec/vp3dsp.c", - "libavcodec/vp8.c", - "libavcodec/vp8_parser.c", - "libavcodec/vp8dsp.c", - "libavcodec/vpx_rac.c", - ] -} - if ((is_apple && current_cpu == "arm64") || (is_win && current_cpu == "arm64") || (use_linux_config && current_cpu == "arm64")) { ffmpeg_c_sources += [ "libavcodec/aarch64/h264pred_init.c", @@ -503,6 +539,18 @@ if ((is_apple && current_cpu == "arm64") || (is_win && current_cpu == "arm64") | } if ((is_apple && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (use_linux_config && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (use_linux_config && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS")) { + + ffmpeg_c_sources += [ + "libavcodec/aarch64/hevcdsp_init_aarch64.c" + ] + + ffmpeg_gas_sources += [ + "libavcodec/aarch64/autorename_libavcodec_aarch64_hevcdsp_idct_neon.S", + "libavcodec/aarch64/autorename_libavcodec_aarch64_hevcdsp_sao_neon.S", + "libavcodec/aarch64/hevcdsp_deblock_neon.S", + "libavcodec/aarch64/hevcdsp_qpel_neon.S" + ] + ffmpeg_c_sources += [ "libavcodec/aarch64/h264chroma_init_aarch64.c", "libavcodec/aarch64/h264dsp_init_aarch64.c", @@ -567,6 +615,11 @@ if (use_linux_config && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS") } if ((use_linux_config && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (use_linux_config && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (use_linux_config && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (use_linux_config && current_cpu == "arm" && ffmpeg_branding == "ChromeOS")) { + + ffmpeg_c_sources += [ + "libavcodec/arm/hevcdsp_init_arm.c" + ] + ffmpeg_c_sources += [ "libavcodec/arm/h264chroma_init_arm.c", "libavcodec/arm/h264dsp_init_arm.c", @@ -578,6 +631,18 @@ if ((use_linux_config && current_cpu == "arm" && arm_use_neon && ffmpeg_branding } if ((use_linux_config && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (use_linux_config && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS")) { + + ffmpeg_c_sources += [ + "libavcodec/arm/hevcdsp_init_neon.c" + ] + + ffmpeg_gas_sources += [ + "libavcodec/arm/hevcdsp_deblock_neon.S", + "libavcodec/arm/hevcdsp_idct_neon.S", + "libavcodec/arm/hevcdsp_qpel_neon.S", + "libavcodec/arm/hevcdsp_sao_neon.S" + ] + ffmpeg_gas_sources += [ "libavcodec/arm/h264cmc_neon.S", "libavcodec/arm/h264dsp_neon.S", diff --git a/arm/android/third_party/ffmpeg/libavcodec/012v.c b/arm/android/third_party/ffmpeg/libavcodec/012v.c index f0197cd8..fa5eb0f9 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/012v.c +++ b/arm/android/third_party/ffmpeg/libavcodec/012v.c @@ -65,7 +65,7 @@ static int zero12v_decode_frame(AVCodecContext *avctx, AVFrame *pic, return ret; pic->pict_type = AV_PICTURE_TYPE_I; - pic->key_frame = 1; + pic->flags |= AV_FRAME_FLAG_KEY; line_end = avpkt->data + stride; for (line = 0; line < avctx->height; line++) { diff --git a/arm/android/third_party/ffmpeg/libavcodec/4xm.c b/arm/android/third_party/ffmpeg/libavcodec/4xm.c index fab3fb5b..411e50da 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/4xm.c +++ b/arm/android/third_party/ffmpeg/libavcodec/4xm.c @@ -957,7 +957,10 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *picture, return AVERROR_INVALIDDATA; } - picture->key_frame = picture->pict_type == AV_PICTURE_TYPE_I; + if (picture->pict_type == AV_PICTURE_TYPE_I) + picture->flags |= AV_FRAME_FLAG_KEY; + else + picture->flags &= ~AV_FRAME_FLAG_KEY; av_image_copy_plane(picture->data[0], picture->linesize[0], (const uint8_t*)f->frame_buffer, avctx->width * 2, diff --git a/arm/android/third_party/ffmpeg/libavcodec/8bps.c b/arm/android/third_party/ffmpeg/libavcodec/8bps.c index 90d6c96f..af98f62f 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/8bps.c +++ b/arm/android/third_party/ffmpeg/libavcodec/8bps.c @@ -47,8 +47,6 @@ typedef struct EightBpsContext { unsigned char planes; unsigned char planemap[4]; - - uint32_t pal[256]; } EightBpsContext; static int decode_frame(AVCodecContext *avctx, AVFrame *frame, @@ -123,9 +121,14 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, } if (avctx->bits_per_coded_sample <= 8) { - frame->palette_has_changed = ff_copy_palette(c->pal, avpkt, avctx); - - memcpy (frame->data[1], c->pal, AVPALETTE_SIZE); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS + frame->palette_has_changed = +#endif + ff_copy_palette(frame->data[1], avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_ENABLE_DEPRECATION_WARNINGS +#endif } *got_frame = 1; diff --git a/arm/android/third_party/ffmpeg/libavcodec/Makefile b/arm/android/third_party/ffmpeg/libavcodec/Makefile index 711d2690..9c382400 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/Makefile +++ b/arm/android/third_party/ffmpeg/libavcodec/Makefile @@ -253,6 +253,7 @@ OBJS-$(CONFIG_AURA2_DECODER) += aura.o OBJS-$(CONFIG_AV1_DECODER) += av1dec.o OBJS-$(CONFIG_AV1_CUVID_DECODER) += cuviddec.o OBJS-$(CONFIG_AV1_MEDIACODEC_DECODER) += mediacodecdec.o +OBJS-$(CONFIG_AV1_MEDIACODEC_ENCODER) += mediacodecenc.o OBJS-$(CONFIG_AV1_NVENC_ENCODER) += nvenc_av1.o nvenc.o OBJS-$(CONFIG_AV1_QSV_ENCODER) += qsvenc_av1.o OBJS-$(CONFIG_AVRN_DECODER) += avrndec.o @@ -469,7 +470,7 @@ OBJS-$(CONFIG_JACOSUB_DECODER) += jacosubdec.o ass.o OBJS-$(CONFIG_JPEG2000_ENCODER) += j2kenc.o mqcenc.o mqc.o jpeg2000.o \ jpeg2000dwt.o OBJS-$(CONFIG_JPEG2000_DECODER) += jpeg2000dec.o jpeg2000.o jpeg2000dsp.o \ - jpeg2000dwt.o mqcdec.o mqc.o + jpeg2000dwt.o mqcdec.o mqc.o jpeg2000htdec.o OBJS-$(CONFIG_JPEGLS_DECODER) += jpeglsdec.o jpegls.o OBJS-$(CONFIG_JPEGLS_ENCODER) += jpeglsenc.o jpegls.o OBJS-$(CONFIG_JV_DECODER) += jvdec.o @@ -542,6 +543,7 @@ OBJS-$(CONFIG_MPEG4_DECODER) += mpeg4videodsp.o xvididct.o OBJS-$(CONFIG_MPEG4_ENCODER) += mpeg4videoenc.o OBJS-$(CONFIG_MPEG4_CUVID_DECODER) += cuviddec.o OBJS-$(CONFIG_MPEG4_MEDIACODEC_DECODER) += mediacodecdec.o +OBJS-$(CONFIG_MPEG4_MEDIACODEC_ENCODER) += mediacodecenc.o OBJS-$(CONFIG_MPEG4_OMX_ENCODER) += omx.o OBJS-$(CONFIG_MPEG4_V4L2M2M_DECODER) += v4l2_m2m_dec.o OBJS-$(CONFIG_MPEG4_V4L2M2M_ENCODER) += v4l2_m2m_enc.o @@ -582,6 +584,7 @@ OBJS-$(CONFIG_PBM_DECODER) += pnmdec.o pnm.o OBJS-$(CONFIG_PBM_ENCODER) += pnmenc.o OBJS-$(CONFIG_PCX_DECODER) += pcx.o OBJS-$(CONFIG_PCX_ENCODER) += pcxenc.o +OBJS-$(CONFIG_PDV_DECODER) += pdvdec.o OBJS-$(CONFIG_PFM_DECODER) += pnmdec.o pnm.o OBJS-$(CONFIG_PFM_ENCODER) += pnmenc.o OBJS-$(CONFIG_PGM_DECODER) += pnmdec.o pnm.o @@ -760,10 +763,11 @@ OBJS-$(CONFIG_VP3_DECODER) += vp3.o jpegquanttables.o OBJS-$(CONFIG_VP5_DECODER) += vp5.o vp56.o vp56data.o vpx_rac.o OBJS-$(CONFIG_VP6_DECODER) += vp6.o vp56.o vp56data.o \ vp6dsp.o vpx_rac.o -OBJS-$(CONFIG_VP7_DECODER) += vp8.o vpx_rac.o -OBJS-$(CONFIG_VP8_DECODER) += vp8.o vpx_rac.o +OBJS-$(CONFIG_VP7_DECODER) += vp8.o vp8data.o vpx_rac.o +OBJS-$(CONFIG_VP8_DECODER) += vp8.o vp8data.o vpx_rac.o OBJS-$(CONFIG_VP8_CUVID_DECODER) += cuviddec.o OBJS-$(CONFIG_VP8_MEDIACODEC_DECODER) += mediacodecdec.o +OBJS-$(CONFIG_VP8_MEDIACODEC_ENCODER) += mediacodecenc.o OBJS-$(CONFIG_VP8_QSV_DECODER) += qsvdec.o OBJS-$(CONFIG_VP8_RKMPP_DECODER) += rkmppdec.o OBJS-$(CONFIG_VP8_VAAPI_ENCODER) += vaapi_encode_vp8.o @@ -774,6 +778,7 @@ OBJS-$(CONFIG_VP9_DECODER) += vp9.o vp9data.o vp9dsp.o vp9lpf.o vp9r vp9dsp_8bpp.o vp9dsp_10bpp.o vp9dsp_12bpp.o OBJS-$(CONFIG_VP9_CUVID_DECODER) += cuviddec.o OBJS-$(CONFIG_VP9_MEDIACODEC_DECODER) += mediacodecdec.o +OBJS-$(CONFIG_VP9_MEDIACODEC_ENCODER) += mediacodecenc.o OBJS-$(CONFIG_VP9_RKMPP_DECODER) += rkmppdec.o OBJS-$(CONFIG_VP9_VAAPI_ENCODER) += vaapi_encode_vp9.o OBJS-$(CONFIG_VP9_QSV_ENCODER) += qsvenc_vp9.o @@ -1083,7 +1088,7 @@ OBJS-$(CONFIG_LIBARIBCAPTION_DECODER) += libaribcaption.o ass.o OBJS-$(CONFIG_LIBCELT_DECODER) += libcelt_dec.o OBJS-$(CONFIG_LIBCODEC2_DECODER) += libcodec2.o OBJS-$(CONFIG_LIBCODEC2_ENCODER) += libcodec2.o -OBJS-$(CONFIG_LIBDAV1D_DECODER) += libdav1d.o +OBJS-$(CONFIG_LIBDAV1D_DECODER) += libdav1d.o av1_parse.o OBJS-$(CONFIG_LIBDAVS2_DECODER) += libdavs2.o OBJS-$(CONFIG_LIBFDK_AAC_DECODER) += libfdk-aacdec.o OBJS-$(CONFIG_LIBFDK_AAC_ENCODER) += libfdk-aacenc.o @@ -1102,7 +1107,6 @@ OBJS-$(CONFIG_LIBOPENCORE_AMRNB_ENCODER) += libopencore-amr.o OBJS-$(CONFIG_LIBOPENCORE_AMRWB_DECODER) += libopencore-amr.o OBJS-$(CONFIG_LIBOPENH264_DECODER) += libopenh264dec.o libopenh264.o OBJS-$(CONFIG_LIBOPENH264_ENCODER) += libopenh264enc.o libopenh264.o -OBJS-$(CONFIG_LIBOPENJPEG_DECODER) += libopenjpegdec.o OBJS-$(CONFIG_LIBOPENJPEG_ENCODER) += libopenjpegenc.o OBJS-$(CONFIG_LIBOPUS_DECODER) += libopusdec.o libopus.o \ vorbis_data.o @@ -1141,7 +1145,7 @@ OBJS-$(CONFIG_AC3_PARSER) += aac_ac3_parser.o ac3tab.o \ ac3_channel_layout_tab.o OBJS-$(CONFIG_ADX_PARSER) += adx_parser.o OBJS-$(CONFIG_AMR_PARSER) += amr_parser.o -OBJS-$(CONFIG_AV1_PARSER) += av1_parser.o +OBJS-$(CONFIG_AV1_PARSER) += av1_parser.o av1_parse.o OBJS-$(CONFIG_AVS2_PARSER) += avs2.o avs2_parser.o OBJS-$(CONFIG_AVS3_PARSER) += avs3_parser.o OBJS-$(CONFIG_BMP_PARSER) += bmp_parser.o diff --git a/arm/android/third_party/ffmpeg/libavcodec/aacpsy.c b/arm/android/third_party/ffmpeg/libavcodec/aacpsy.c index 4c5ab2c9..933369e4 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/aacpsy.c +++ b/arm/android/third_party/ffmpeg/libavcodec/aacpsy.c @@ -267,7 +267,7 @@ static av_cold void lame_window_init(AacPsyContext *ctx, AVCodecContext *avctx) AacPsyChannel *pch = &ctx->ch[i]; if (avctx->flags & AV_CODEC_FLAG_QSCALE) - pch->attack_threshold = psy_vbr_map[avctx->global_quality / FF_QP2LAMBDA].st_lrm; + pch->attack_threshold = psy_vbr_map[av_clip(avctx->global_quality / FF_QP2LAMBDA, 0, 10)].st_lrm; else pch->attack_threshold = lame_calc_attack_threshold(avctx->bit_rate / avctx->ch_layout.nb_channels / 1000); diff --git a/arm/android/third_party/ffmpeg/libavcodec/aarch64/Makefile b/arm/android/third_party/ffmpeg/libavcodec/aarch64/Makefile index 02fb51c3..21619164 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/aarch64/Makefile +++ b/arm/android/third_party/ffmpeg/libavcodec/aarch64/Makefile @@ -65,7 +65,8 @@ NEON-OBJS-$(CONFIG_VP9_DECODER) += aarch64/vp9itxfm_16bpp_neon.o \ aarch64/vp9lpf_neon.o \ aarch64/vp9mc_16bpp_neon.o \ aarch64/vp9mc_neon.o -NEON-OBJS-$(CONFIG_HEVC_DECODER) += aarch64/hevcdsp_idct_neon.o \ +NEON-OBJS-$(CONFIG_HEVC_DECODER) += aarch64/hevcdsp_deblock_neon.o \ + aarch64/hevcdsp_idct_neon.o \ aarch64/hevcdsp_init_aarch64.o \ aarch64/hevcdsp_qpel_neon.o \ aarch64/hevcdsp_sao_neon.o diff --git a/arm/android/third_party/ffmpeg/libavcodec/aarch64/autorename_libavcodec_aarch64_hevcdsp_idct_neon.S b/arm/android/third_party/ffmpeg/libavcodec/aarch64/autorename_libavcodec_aarch64_hevcdsp_idct_neon.S new file mode 100644 index 00000000..26b255b3 --- /dev/null +++ b/arm/android/third_party/ffmpeg/libavcodec/aarch64/autorename_libavcodec_aarch64_hevcdsp_idct_neon.S @@ -0,0 +1,2 @@ +// File automatically generated. See crbug.com/495833. +#include "hevcdsp_idct_neon.S" \ No newline at end of file diff --git a/arm/android/third_party/ffmpeg/libavcodec/aarch64/autorename_libavcodec_aarch64_hevcdsp_sao_neon.S b/arm/android/third_party/ffmpeg/libavcodec/aarch64/autorename_libavcodec_aarch64_hevcdsp_sao_neon.S new file mode 100644 index 00000000..9479c7f4 --- /dev/null +++ b/arm/android/third_party/ffmpeg/libavcodec/aarch64/autorename_libavcodec_aarch64_hevcdsp_sao_neon.S @@ -0,0 +1,2 @@ +// File automatically generated. See crbug.com/495833. +#include "hevcdsp_sao_neon.S" \ No newline at end of file diff --git a/arm/android/third_party/ffmpeg/libavcodec/aarch64/hevcdsp_deblock_neon.S b/arm/android/third_party/ffmpeg/libavcodec/aarch64/hevcdsp_deblock_neon.S new file mode 100644 index 00000000..8227f656 --- /dev/null +++ b/arm/android/third_party/ffmpeg/libavcodec/aarch64/hevcdsp_deblock_neon.S @@ -0,0 +1,183 @@ +/* -*-arm64-*- + * vim: syntax=arm64asm + * + * Copyright (c) 2014 Seppo Tomperi + * Copyright (c) 2023 J. Dekker + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + + +#include "libavutil/aarch64/asm.S" +#include "neon.S" + +.macro hevc_loop_filter_chroma_start bitdepth + mov x4, x30 + ldr w14, [x2] + ldr w15, [x2, #4] +.if \bitdepth > 8 + lsl w14, w14, #(\bitdepth - 8) + lsl w15, w15, #(\bitdepth - 8) +.endif + adds w2, w14, w15 + b.eq 1f + dup v16.4h, w14 + dup v17.4h, w15 + trn1 v16.2d, v16.2d, v17.2d +.if \bitdepth > 8 + mvni v19.8h, #((0xff << (\bitdepth - 8)) & 0xff), lsl #8 + movi v18.8h, #0 +.endif + neg v17.8h, v16.8h +.endm + +.macro hevc_loop_filter_chroma_body bitdepth +.if \bitdepth <= 8 + uxtl v20.8h, v0.8b // p1 + uxtl v1.8h, v1.8b // p0 + uxtl v2.8h, v2.8b // q0 + uxtl v23.8h, v3.8b // q1 + va .req v20 + vb .req v23 +.else // required to specify both cases as we are unable to do: v0 .req v20 + va .req v0 + vb .req v3 +.endif + sub v5.8h, v2.8h, v1.8h // q0 - p0 + sub v6.8h, va.8h, vb.8h // p1 - q1 + shl v5.8h, v5.8h, #2 + add v5.8h, v6.8h, v5.8h + srshr v5.8h, v5.8h, #3 + clip v17.8h, v16.8h, v5.8h + sqadd v1.8h, v1.8h, v5.8h // p0 + delta + sqsub v2.8h, v2.8h, v5.8h // q0 - delta +.if \bitdepth <= 8 + sqxtun v1.8b, v1.8h + sqxtun v2.8b, v2.8h +.else + clip v18.8h, v19.8h, v1.8h, v2.8h +.endif +.unreq va +.unreq vb +.endm + +function hevc_loop_filter_chroma_body_8_neon, export=0 + hevc_loop_filter_chroma_body 8 + ret +endfunc + +function hevc_loop_filter_chroma_body_10_neon, export=0 +hevc_loop_filter_chroma_body_12_neon: + hevc_loop_filter_chroma_body 10 + ret +endfunc + +// void ff_hevc_h_loop_filter_chroma_8_neon(uint8_t *_pix, ptrdiff_t _stride, int *_tc, uint8_t *_no_p, uint8_t *_no_q); + +.macro hevc_h_loop_filter_chroma bitdepth +function ff_hevc_h_loop_filter_chroma_\bitdepth\()_neon, export=1 + hevc_loop_filter_chroma_start \bitdepth + sub x0, x0, x1, lsl #1 +.if \bitdepth > 8 + ld1 {v0.8h}, [x0], x1 + ld1 {v1.8h}, [x0], x1 + ld1 {v2.8h}, [x0], x1 + ld1 {v3.8h}, [x0] +.else + ld1 {v0.8b}, [x0], x1 + ld1 {v1.8b}, [x0], x1 + ld1 {v2.8b}, [x0], x1 + ld1 {v3.8b}, [x0] +.endif + sub x0, x0, x1, lsl #1 + bl hevc_loop_filter_chroma_body_\bitdepth\()_neon +.if \bitdepth > 8 + st1 {v1.8h}, [x0], x1 + st1 {v2.8h}, [x0] +.else + st1 {v1.8b}, [x0], x1 + st1 {v2.8b}, [x0] +.endif +1: ret x4 +endfunc +.endm + +.macro hevc_v_loop_filter_chroma bitdepth +function ff_hevc_v_loop_filter_chroma_\bitdepth\()_neon, export=1 + hevc_loop_filter_chroma_start \bitdepth +.if \bitdepth > 8 + sub x0, x0, #4 + add x3, x0, x1 + lsl x1, x1, #1 + ld1 {v0.d}[0], [x0], x1 + ld1 {v1.d}[0], [x3], x1 + ld1 {v2.d}[0], [x0], x1 + ld1 {v3.d}[0], [x3], x1 + ld1 {v0.d}[1], [x0], x1 + ld1 {v1.d}[1], [x3], x1 + ld1 {v2.d}[1], [x0], x1 + ld1 {v3.d}[1], [x3], x1 + transpose_4x8H v0, v1, v2, v3, v28, v29, v30, v31 +.else + sub x0, x0, #2 + add x3, x0, x1 + lsl x1, x1, #1 + ld1 {v0.s}[0], [x0], x1 + ld1 {v1.s}[0], [x3], x1 + ld1 {v2.s}[0], [x0], x1 + ld1 {v3.s}[0], [x3], x1 + ld1 {v0.s}[1], [x0], x1 + ld1 {v1.s}[1], [x3], x1 + ld1 {v2.s}[1], [x0], x1 + ld1 {v3.s}[1], [x3], x1 + transpose_4x8B v0, v1, v2, v3, v28, v29, v30, v31 +.endif + sub x0, x0, x1, lsl #2 + sub x3, x3, x1, lsl #2 + bl hevc_loop_filter_chroma_body_\bitdepth\()_neon +.if \bitdepth > 8 + transpose_4x8H v0, v1, v2, v3, v28, v29, v30, v31 + st1 {v0.d}[0], [x0], x1 + st1 {v1.d}[0], [x3], x1 + st1 {v2.d}[0], [x0], x1 + st1 {v3.d}[0], [x3], x1 + st1 {v0.d}[1], [x0], x1 + st1 {v1.d}[1], [x3], x1 + st1 {v2.d}[1], [x0], x1 + st1 {v3.d}[1], [x3] +.else + transpose_4x8B v0, v1, v2, v3, v28, v29, v30, v31 + st1 {v0.s}[0], [x0], x1 + st1 {v1.s}[0], [x3], x1 + st1 {v2.s}[0], [x0], x1 + st1 {v3.s}[0], [x3], x1 + st1 {v0.s}[1], [x0], x1 + st1 {v1.s}[1], [x3], x1 + st1 {v2.s}[1], [x0], x1 + st1 {v3.s}[1], [x3] +.endif +1: ret x4 +endfunc +.endm + +hevc_h_loop_filter_chroma 8 +hevc_h_loop_filter_chroma 10 +hevc_h_loop_filter_chroma 12 + +hevc_v_loop_filter_chroma 8 +hevc_v_loop_filter_chroma 10 +hevc_v_loop_filter_chroma 12 diff --git a/arm/android/third_party/ffmpeg/libavcodec/aarch64/hevcdsp_idct_neon.S b/arm/android/third_party/ffmpeg/libavcodec/aarch64/hevcdsp_idct_neon.S index 3e59dd20..b7f23386 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/aarch64/hevcdsp_idct_neon.S +++ b/arm/android/third_party/ffmpeg/libavcodec/aarch64/hevcdsp_idct_neon.S @@ -6,6 +6,7 @@ * Ported from arm/hevcdsp_idct_neon.S by * Copyright (c) 2020 Reimar Döffinger * Copyright (c) 2023 J. Dekker + * Copyright (c) 2023 xu fulong <839789740@qq.com> * * This file is part of FFmpeg. * @@ -477,34 +478,52 @@ endfunc sqrshrn2 \out3\().8h, \in7, \shift .endm -.macro transpose16_4x4_2 r0, r1, r2, r3 +// use temp register to transpose, then we can reuse it +.macro transpose16_4x4_2 r0, r1, r2, r3, tmp0, tmp1, tmp2, tmp3, tmp4, tmp5 // lower halves - trn1 v2.4h, \r0\().4h, \r1\().4h - trn2 v3.4h, \r0\().4h, \r1\().4h - trn1 v4.4h, \r2\().4h, \r3\().4h - trn2 v5.4h, \r2\().4h, \r3\().4h - trn1 v6.2s, v2.2s, v4.2s - trn2 v7.2s, v2.2s, v4.2s - trn1 v2.2s, v3.2s, v5.2s - trn2 v4.2s, v3.2s, v5.2s - mov \r0\().d[0], v6.d[0] - mov \r2\().d[0], v7.d[0] - mov \r1\().d[0], v2.d[0] - mov \r3\().d[0], v4.d[0] + trn1 \tmp0\().4h, \r0\().4h, \r1\().4h + trn2 \tmp1\().4h, \r0\().4h, \r1\().4h + trn1 \tmp2\().4h, \r2\().4h, \r3\().4h + trn2 \tmp3\().4h, \r2\().4h, \r3\().4h + trn1 \tmp4\().2s, \tmp0\().2s, \tmp2\().2s + trn2 \tmp5\().2s, \tmp0\().2s, \tmp2\().2s + trn1 \tmp0\().2s, \tmp1\().2s, \tmp3\().2s + trn2 \tmp2\().2s, \tmp1\().2s, \tmp3\().2s + mov \r0\().d[0], \tmp4\().d[0] + mov \r2\().d[0], \tmp5\().d[0] + mov \r1\().d[0], \tmp0\().d[0] + mov \r3\().d[0], \tmp2\().d[0] // upper halves in reverse order - trn1 v2.8h, \r3\().8h, \r2\().8h - trn2 v3.8h, \r3\().8h, \r2\().8h - trn1 v4.8h, \r1\().8h, \r0\().8h - trn2 v5.8h, \r1\().8h, \r0\().8h - trn1 v6.4s, v2.4s, v4.4s - trn2 v7.4s, v2.4s, v4.4s - trn1 v2.4s, v3.4s, v5.4s - trn2 v4.4s, v3.4s, v5.4s - mov \r3\().d[1], v6.d[1] - mov \r1\().d[1], v7.d[1] - mov \r2\().d[1], v2.d[1] - mov \r0\().d[1], v4.d[1] + trn1 \tmp0\().8h, \r3\().8h, \r2\().8h + trn2 \tmp1\().8h, \r3\().8h, \r2\().8h + trn1 \tmp2\().8h, \r1\().8h, \r0\().8h + trn2 \tmp3\().8h, \r1\().8h, \r0\().8h + trn1 \tmp4\().4s, \tmp0\().4s, \tmp2\().4s + trn2 \tmp5\().4s, \tmp0\().4s, \tmp2\().4s + trn1 \tmp0\().4s, \tmp1\().4s, \tmp3\().4s + trn2 \tmp2\().4s, \tmp1\().4s, \tmp3\().4s + mov \r3\().d[1], \tmp4\().d[1] + mov \r1\().d[1], \tmp5\().d[1] + mov \r2\().d[1], \tmp0\().d[1] + mov \r0\().d[1], \tmp2\().d[1] +.endm + +// stores in0, in2, in4, in6 ascending from off1 and +// stores in1, in3, in5, in7 descending from off2 +.macro store_to_stack off1, off2, in0, in2, in4, in6, in7, in5, in3, in1 + add x1, sp, #\off1 + add x3, sp, #\off2 + mov x2, #-16 + mov x4, #16 + st1 {\in0}, [x1], x4 + st1 {\in1}, [x3], x2 + st1 {\in2}, [x1], x4 + st1 {\in3}, [x3], x2 + st1 {\in4}, [x1], x4 + st1 {\in5}, [x3], x2 + st1 {\in6}, [x1] + st1 {\in7}, [x3] .endm .macro tr_16x4 name, shift, offset, step @@ -543,27 +562,34 @@ function func_tr_16x4_\name add x4, sp, #\offset ld1 {v16.4s-v19.4s}, [x4], #64 - butterfly16 v16.4s, v21.4s, v17.4s, v22.4s, v18.4s, v23.4s, v19.4s, v24.4s + .if \shift > 0 scale v29, v30, v31, v24, v20.4s, v16.4s, v21.4s, v17.4s, v22.4s, v18.4s, v23.4s, v19.4s, \shift - transpose16_4x4_2 v29, v30, v31, v24 + transpose16_4x4_2 v29, v30, v31, v24, v2, v3, v4, v5, v6, v7 mov x1, x6 add x3, x6, #(24 +3*32) mov x2, #32 mov x4, #-32 store16 v29.d, v30.d, v31.d, v24.d, x4 + .else + store_to_stack \offset, (\offset + 240), v20.4s, v21.4s, v22.4s, v23.4s, v19.4s, v18.4s, v17.4s, v16.4s + .endif add x4, sp, #(\offset + 64) ld1 {v16.4s-v19.4s}, [x4] butterfly16 v16.4s, v25.4s, v17.4s, v26.4s, v18.4s, v27.4s, v19.4s, v28.4s + .if \shift > 0 scale v29, v30, v31, v20, v20.4s, v16.4s, v25.4s, v17.4s, v26.4s, v18.4s, v27.4s, v19.4s, \shift - transpose16_4x4_2 v29, v30, v31, v20 + transpose16_4x4_2 v29, v30, v31, v20, v2, v3, v4, v5, v6, v7 add x1, x6, #8 add x3, x6, #(16 + 3 * 32) mov x2, #32 mov x4, #-32 store16 v29.d, v30.d, v31.d, v20.d, x4 + .else + store_to_stack (\offset + 64), (\offset + 176), v20.4s, v25.4s, v26.4s, v27.4s, v19.4s, v18.4s, v17.4s, v16.4s + .endif ret endfunc @@ -596,6 +622,203 @@ function ff_hevc_idct_16x16_\bitdepth\()_neon, export=1 endfunc .endm +.macro load32 + add x1, x5, #64 + add x3, x1, #128 + mov x2, #256 + ld1 {v4.d}[0], [x1], x2 + ld1 {v4.d}[1], [x3], x2 + ld1 {v5.d}[0], [x1], x2 + ld1 {v5.d}[1], [x3], x2 + ld1 {v6.d}[0], [x1], x2 + ld1 {v6.d}[1], [x3], x2 + ld1 {v7.d}[0], [x1], x2 + ld1 {v7.d}[1], [x3], x2 + ld1 {v16.d}[0], [x1], x2 + ld1 {v16.d}[1], [x3], x2 + ld1 {v17.d}[0], [x1], x2 + ld1 {v17.d}[1], [x3], x2 + ld1 {v18.d}[0], [x1], x2 + ld1 {v18.d}[1], [x3], x2 + ld1 {v19.d}[0], [x1], x2 + ld1 {v19.d}[1], [x3], x2 +.endm + +.macro add_member32 in, t0, t1, t2, t3, op0, op1, op2, op3, p + sum_sub v24.4s, \in, \t0, \op0, \p + sum_sub v25.4s, \in, \t1, \op1, \p + sum_sub v26.4s, \in, \t2, \op2, \p + sum_sub v27.4s, \in, \t3, \op3, \p +.endm + +.macro butterfly32 in0, in1, in2, in3, out + add \out, \in0, \in1 + sub \in0, \in0, \in1 + add \in1, \in2, \in3 + sub \in2, \in2, \in3 +.endm + +.macro multiply in + smull v24.4s, v4.4h, \in\().h[0] + smull v25.4s, v4.4h, \in\().h[1] + smull v26.4s, v4.4h, \in\().h[2] + smull v27.4s, v4.4h, \in\().h[3] +.endm + +.macro scale_store shift + ld1 {v28.8h-v31.8h}, [x4], #64 + butterfly32 v28.4s, v24.4s, v29.4s, v25.4s, v2.4s + butterfly32 v30.4s, v26.4s, v31.4s, v27.4s, v3.4s + scale v20, v21, v22, v23, v2.4s, v28.4s, v24.4s, v29.4s, v3.4s, v30.4s, v26.4s, v31.4s, \shift + + transpose16_4x4_2 v20, v21, v22, v23, v24, v25, v26, v27, v28, v29 + store16 v20.d, v21.d, v22.d, v23.d, x8 + + // reload coefficients + ld1 {v2.4h-v3.4h}, [x9] +.endm + +function tr_block1 + multiply v0 + add_member32 v4.8h, v0.h[1], v1.h[0], v1.h[3], v2.h[2], +, +, +, +, 2 + add_member32 v5.4h, v0.h[2], v1.h[3], v3.h[0], v3.h[2], +, +, +, - + add_member32 v5.8h, v0.h[3], v2.h[2], v3.h[2], v1.h[3], +, +, -, -, 2 + add_member32 v6.4h, v1.h[0], v3.h[1], v2.h[1], v0.h[0], +, +, -, - + add_member32 v6.8h, v1.h[1], v3.h[3], v1.h[0], v1.h[2], +, -, -, -, 2 + add_member32 v7.4h, v1.h[2], v3.h[0], v0.h[0], v3.h[1], +, -, -, - + add_member32 v7.8h, v1.h[3], v2.h[1], v1.h[1], v2.h[3], +, -, -, +, 2 + add_member32 v16.4h, v2.h[0], v1.h[2], v2.h[2], v1.h[0], +, -, -, + + add_member32 v16.8h, v2.h[1], v0.h[3], v3.h[3], v0.h[2], +, -, -, +, 2 + add_member32 v17.4h, v2.h[2], v0.h[1], v2.h[3], v2.h[1], +, -, +, + + add_member32 v17.8h, v2.h[3], v0.h[2], v1.h[2], v3.h[3], +, -, +, -, 2 + add_member32 v18.4h, v3.h[0], v1.h[1], v0.h[1], v2.h[0], +, -, +, - + add_member32 v18.8h, v3.h[1], v2.h[0], v0.h[3], v0.h[1], +, -, +, -, 2 + add_member32 v19.4h, v3.h[2], v2.h[3], v2.h[0], v1.h[1], +, -, +, - + add_member32 v19.8h, v3.h[3], v3.h[2], v3.h[1], v3.h[0], +, -, +, -, 2 + ret +endfunc + +function tr_block2 + multiply v1 + add_member32 v4.8h, v3.h[1], v3.h[3], v3.h[0], v2.h[1], +, -, -, -, 2 + add_member32 v5.4h, v2.h[1], v1.h[0], v0.h[0], v1.h[1], -, -, -, - + add_member32 v5.8h, v0.h[0], v1.h[2], v3.h[1], v2.h[3], -, -, -, +, 2 + add_member32 v6.4h, v2.h[0], v3.h[2], v1.h[1], v0.h[3], -, +, +, + + add_member32 v6.8h, v3.h[2], v0.h[3], v1.h[3], v3.h[1], +, +, +, -, 2 + add_member32 v7.4h, v1.h[1], v1.h[3], v2.h[3], v0.h[0], +, +, -, - + add_member32 v7.8h, v0.h[3], v3.h[1], v0.h[1], v3.h[3], +, -, -, +, 2 + add_member32 v16.4h, v3.h[0], v0.h[2], v3.h[2], v0.h[1], +, -, -, + + add_member32 v16.8h, v2.h[2], v2.h[0], v1.h[0], v3.h[2], -, -, +, +, 2 + add_member32 v17.4h, v0.h[1], v3.h[0], v2.h[0], v0.h[2], -, +, +, - + add_member32 v17.8h, v1.h[3], v0.h[1], v2.h[2], v3.h[0], -, +, -, -, 2 + add_member32 v18.4h, v3.h[3], v2.h[1], v0.h[2], v1.h[0], +, +, -, + + add_member32 v18.8h, v1.h[2], v2.h[3], v3.h[3], v2.h[2], +, -, -, +, 2 + add_member32 v19.4h, v0.h[2], v0.h[1], v0.h[3], v1.h[2], +, -, +, - + add_member32 v19.8h, v2.h[3], v2.h[2], v2.h[1], v2.h[0], +, -, +, -, 2 + ret +endfunc + +function tr_block3 + multiply v2 + add_member32 v4.8h, v1.h[2], v0.h[3], v0.h[0], v0.h[2], -, -, -, -, 2 + add_member32 v5.4h, v2.h[2], v3.h[3], v2.h[3], v1.h[2], -, -, +, + + add_member32 v5.8h, v1.h[0], v0.h[2], v2.h[1], v3.h[3], +, +, +, -, 2 + add_member32 v6.4h, v3.h[0], v2.h[2], v0.h[1], v1.h[3], +, -, -, - + add_member32 v6.8h, v0.h[2], v2.h[0], v3.h[0], v0.h[0], -, -, +, +, 2 + add_member32 v7.4h, v3.h[2], v1.h[0], v2.h[0], v2.h[2], -, +, +, - + add_member32 v7.8h, v0.h[0], v3.h[2], v0.h[2], v3.h[0], +, +, -, -, 2 + add_member32 v16.4h, v3.h[3], v0.h[1], v3.h[1], v0.h[3], -, -, +, + + add_member32 v16.8h, v0.h[1], v2.h[3], v1.h[3], v1.h[1], -, +, +, -, 2 + add_member32 v17.4h, v3.h[1], v1.h[3], v0.h[3], v3.h[2], +, +, -, + + add_member32 v17.8h, v0.h[3], v1.h[1], v3.h[2], v2.h[0], +, -, +, +, 2 + add_member32 v18.4h, v2.h[3], v3.h[1], v1.h[2], v0.h[1], -, -, +, - + add_member32 v18.8h, v1.h[1], v0.h[0], v1.h[0], v2.h[1], -, +, -, +, 2 + add_member32 v19.4h, v2.h[1], v3.h[0], v3.h[3], v3.h[1], +, -, +, + + add_member32 v19.8h, v1.h[3], v1.h[2], v1.h[1], v1.h[0], +, -, +, -, 2 + ret +endfunc + +function tr_block4 + multiply v3 + add_member32 v4.8h, v1.h[1], v2.h[0], v2.h[3], v3.h[2], -, -, -, -, 2 + add_member32 v5.4h, v0.h[0], v0.h[3], v2.h[0], v3.h[1], +, +, +, + + add_member32 v5.8h, v2.h[0], v0.h[0], v1.h[1], v3.h[0], -, -, -, -, 2 + add_member32 v6.4h, v3.h[3], v1.h[2], v0.h[2], v2.h[3], +, +, +, + + add_member32 v6.8h, v2.h[1], v2.h[3], v0.h[0], v2.h[2], +, -, -, -, 2 + add_member32 v7.4h, v0.h[2], v3.h[3], v0.h[3], v2.h[1], -, -, +, + + add_member32 v7.8h, v1.h[0], v2.h[2], v1.h[2], v2.h[0], +, +, -, -, 2 + add_member32 v16.4h, v2.h[3], v1.h[1], v2.h[1], v1.h[3], -, -, +, + + add_member32 v16.8h, v3.h[1], v0.h[1], v3.h[0], v1.h[2], -, +, -, -, 2 + add_member32 v17.4h, v1.h[2], v1.h[0], v3.h[3], v1.h[1], +, -, +, + + add_member32 v17.8h, v0.h[1], v2.h[1], v3.h[1], v1.h[0], -, +, +, -, 2 + add_member32 v18.4h, v1.h[3], v3.h[2], v2.h[2], v0.h[3], +, -, -, + + add_member32 v18.8h, v3.h[2], v3.h[0], v1.h[3], v0.h[2], -, -, +, -, 2 + add_member32 v19.4h, v2.h[2], v1.h[3], v1.h[0], v0.h[1], -, +, -, + + add_member32 v19.8h, v0.h[3], v0.h[2], v0.h[1], v0.h[0], +, -, +, -, 2 + ret +endfunc + +.macro tr_32x4 name, shift +function func_tr_32x4_\name + mov x10, x30 + bl func_tr_16x4_noscale + + load32 + movrel x9, trans, 32 + ld1 {v0.4h-v1.4h}, [x9], #16 + ld1 {v2.4h-v3.4h}, [x9] + add x4, sp, #2048 + mov x2, #64 + mov x8, #-64 + + bl tr_block1 + mov x1, x11 + add x3, x11, #(56 + 3 * 64) + scale_store \shift + + bl tr_block2 + add x1, x11, #8 + add x3, x11, #(48 + 3 * 64) + scale_store \shift + + bl tr_block3 + add x1, x11, #16 + add x3, x11, #(40 + 3 * 64) + scale_store \shift + + bl tr_block4 + add x1, x11, #24 + add x3, x11, #(32 + 3 * 64) + scale_store \shift + + br x10 +endfunc +.endm + +.macro idct_32x32 bitdepth +function ff_hevc_idct_32x32_\bitdepth\()_neon, export=1 + mov x15, x30 + // allocate a temp buffer + sub sp, sp, #2432 + +.irp i, 0, 1, 2, 3, 4, 5, 6, 7 + add x5, x0, #(8 * \i) + add x11, sp, #(8 * \i * 32) + bl func_tr_32x4_firstpass +.endr + +.irp i, 0, 1, 2, 3, 4, 5, 6, 7 + add x5, sp, #(8 * \i) + add x11, x0, #(8 * \i * 32) + bl func_tr_32x4_secondpass_\bitdepth +.endr + + add sp, sp, #2432 + mov x30, x15 + ret +endfunc +.endm + idct_4x4 8 idct_4x4 10 @@ -605,10 +828,68 @@ idct_8x8 10 tr_16x4 firstpass, 7, 512, 1 tr_16x4 secondpass_8, 20 - 8, 512, 1 tr_16x4 secondpass_10, 20 - 10, 512, 1 +tr_16x4 noscale, 0, 2048, 4 idct_16x16 8 idct_16x16 10 +.ltorg +tr_32x4 firstpass, 7 +tr_32x4 secondpass_8, 20 - 8 +tr_32x4 secondpass_10, 20 - 10 +.ltorg + +idct_32x32 8 +idct_32x32 10 + +.macro tr4_luma_shift r0, r1, r2, r3, shift + saddl v0.4s, \r0, \r2 // c0 = src0 + src2 + saddl v1.4s, \r2, \r3 // c1 = src2 + src3 + ssubl v2.4s, \r0, \r3 // c2 = src0 - src3 + smull v3.4s, \r1, v21.4h // c3 = 74 * src1 + + saddl v7.4s, \r0, \r3 // src0 + src3 + ssubw v7.4s, v7.4s, \r2 // src0 - src2 + src3 + mul v7.4s, v7.4s, v18.4s // dst2 = 74 * (src0 - src2 + src3) + + mul v5.4s, v0.4s, v19.4s // 29 * c0 + mul v6.4s, v1.4s, v20.4s // 55 * c1 + add v5.4s, v5.4s, v6.4s // 29 * c0 + 55 * c1 + add v5.4s, v5.4s, v3.4s // dst0 = 29 * c0 + 55 * c1 + c3 + + mul v1.4s, v1.4s, v19.4s // 29 * c1 + mul v6.4s, v2.4s, v20.4s // 55 * c2 + sub v6.4s, v6.4s, v1.4s // 55 * c2 - 29 * c1 + add v6.4s, v6.4s, v3.4s // dst1 = 55 * c2 - 29 * c1 + c3 + + mul v0.4s, v0.4s, v20.4s // 55 * c0 + mul v2.4s, v2.4s, v19.4s // 29 * c2 + add v0.4s, v0.4s, v2.4s // 55 * c0 + 29 * c2 + sub v0.4s, v0.4s, v3.4s // dst3 = 55 * c0 + 29 * c2 - c3 + + sqrshrn \r0, v5.4s, \shift + sqrshrn \r1, v6.4s, \shift + sqrshrn \r2, v7.4s, \shift + sqrshrn \r3, v0.4s, \shift +.endm + +function ff_hevc_transform_luma_4x4_neon_8, export=1 + ld1 {v28.4h-v31.4h}, [x0] + movi v18.4s, #74 + movi v19.4s, #29 + movi v20.4s, #55 + movi v21.4h, #74 + + tr4_luma_shift v28.4h, v29.4h, v30.4h, v31.4h, #7 + transpose_4x4H v28, v29, v30, v31, v22, v23, v24, v25 + + tr4_luma_shift v28.4h, v29.4h, v30.4h, v31.4h, #12 + transpose_4x4H v28, v29, v30, v31, v22, v23, v24, v25 + + st1 {v28.4h-v31.4h}, [x0] + ret +endfunc + // void ff_hevc_idct_NxN_dc_DEPTH_neon(int16_t *coeffs) .macro idct_dc size, bitdepth function ff_hevc_idct_\size\()x\size\()_dc_\bitdepth\()_neon, export=1 diff --git a/arm/android/third_party/ffmpeg/libavcodec/aarch64/hevcdsp_init_aarch64.c b/arm/android/third_party/ffmpeg/libavcodec/aarch64/hevcdsp_init_aarch64.c index 1deefca0..be1049a2 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/aarch64/hevcdsp_init_aarch64.c +++ b/arm/android/third_party/ffmpeg/libavcodec/aarch64/hevcdsp_init_aarch64.c @@ -1,5 +1,6 @@ /* * Copyright (c) 2020 Reimar Döffinger + * Copyright (c) 2023 xu fulong <839789740@qq.com> * * This file is part of FFmpeg. * @@ -25,6 +26,18 @@ #include "libavutil/aarch64/cpu.h" #include "libavcodec/hevcdsp.h" +void ff_hevc_v_loop_filter_chroma_8_neon(uint8_t *_pix, ptrdiff_t _stride, + const int *_tc, const uint8_t *_no_p, const uint8_t *_no_q); +void ff_hevc_v_loop_filter_chroma_10_neon(uint8_t *_pix, ptrdiff_t _stride, + const int *_tc, const uint8_t *_no_p, const uint8_t *_no_q); +void ff_hevc_v_loop_filter_chroma_12_neon(uint8_t *_pix, ptrdiff_t _stride, + const int *_tc, const uint8_t *_no_p, const uint8_t *_no_q); +void ff_hevc_h_loop_filter_chroma_8_neon(uint8_t *_pix, ptrdiff_t _stride, + const int *_tc, const uint8_t *_no_p, const uint8_t *_no_q); +void ff_hevc_h_loop_filter_chroma_10_neon(uint8_t *_pix, ptrdiff_t _stride, + const int *_tc, const uint8_t *_no_p, const uint8_t *_no_q); +void ff_hevc_h_loop_filter_chroma_12_neon(uint8_t *_pix, ptrdiff_t _stride, + const int *_tc, const uint8_t *_no_p, const uint8_t *_no_q); void ff_hevc_add_residual_4x4_8_neon(uint8_t *_dst, const int16_t *coeffs, ptrdiff_t stride); void ff_hevc_add_residual_4x4_10_neon(uint8_t *_dst, const int16_t *coeffs, @@ -55,6 +68,8 @@ void ff_hevc_idct_8x8_8_neon(int16_t *coeffs, int col_limit); void ff_hevc_idct_8x8_10_neon(int16_t *coeffs, int col_limit); void ff_hevc_idct_16x16_8_neon(int16_t *coeffs, int col_limit); void ff_hevc_idct_16x16_10_neon(int16_t *coeffs, int col_limit); +void ff_hevc_idct_32x32_8_neon(int16_t *coeffs, int col_limit); +void ff_hevc_idct_32x32_10_neon(int16_t *coeffs, int col_limit); void ff_hevc_idct_4x4_dc_8_neon(int16_t *coeffs); void ff_hevc_idct_8x8_dc_8_neon(int16_t *coeffs); void ff_hevc_idct_16x16_dc_8_neon(int16_t *coeffs); @@ -63,6 +78,7 @@ void ff_hevc_idct_4x4_dc_10_neon(int16_t *coeffs); void ff_hevc_idct_8x8_dc_10_neon(int16_t *coeffs); void ff_hevc_idct_16x16_dc_10_neon(int16_t *coeffs); void ff_hevc_idct_32x32_dc_10_neon(int16_t *coeffs); +void ff_hevc_transform_luma_4x4_neon_8(int16_t *coeffs); void ff_hevc_sao_band_filter_8x8_8_neon(uint8_t *_dst, const uint8_t *_src, ptrdiff_t stride_dst, ptrdiff_t stride_src, const int16_t *sao_offset_val, int sao_left_class, @@ -117,6 +133,8 @@ av_cold void ff_hevc_dsp_init_aarch64(HEVCDSPContext *c, const int bit_depth) if (!have_neon(av_get_cpu_flags())) return; if (bit_depth == 8) { + c->hevc_h_loop_filter_chroma = ff_hevc_h_loop_filter_chroma_8_neon; + c->hevc_v_loop_filter_chroma = ff_hevc_v_loop_filter_chroma_8_neon; c->add_residual[0] = ff_hevc_add_residual_4x4_8_neon; c->add_residual[1] = ff_hevc_add_residual_8x8_8_neon; c->add_residual[2] = ff_hevc_add_residual_16x16_8_neon; @@ -124,10 +142,12 @@ av_cold void ff_hevc_dsp_init_aarch64(HEVCDSPContext *c, const int bit_depth) c->idct[0] = ff_hevc_idct_4x4_8_neon; c->idct[1] = ff_hevc_idct_8x8_8_neon; c->idct[2] = ff_hevc_idct_16x16_8_neon; + c->idct[3] = ff_hevc_idct_32x32_8_neon; c->idct_dc[0] = ff_hevc_idct_4x4_dc_8_neon; c->idct_dc[1] = ff_hevc_idct_8x8_dc_8_neon; c->idct_dc[2] = ff_hevc_idct_16x16_dc_8_neon; c->idct_dc[3] = ff_hevc_idct_32x32_dc_8_neon; + c->transform_4x4_luma = ff_hevc_transform_luma_4x4_neon_8; c->sao_band_filter[0] = c->sao_band_filter[1] = c->sao_band_filter[2] = @@ -167,6 +187,8 @@ av_cold void ff_hevc_dsp_init_aarch64(HEVCDSPContext *c, const int bit_depth) c->put_hevc_qpel_bi[9][0][1] = ff_hevc_put_hevc_qpel_bi_h16_8_neon; } if (bit_depth == 10) { + c->hevc_h_loop_filter_chroma = ff_hevc_h_loop_filter_chroma_10_neon; + c->hevc_v_loop_filter_chroma = ff_hevc_v_loop_filter_chroma_10_neon; c->add_residual[0] = ff_hevc_add_residual_4x4_10_neon; c->add_residual[1] = ff_hevc_add_residual_8x8_10_neon; c->add_residual[2] = ff_hevc_add_residual_16x16_10_neon; @@ -174,12 +196,15 @@ av_cold void ff_hevc_dsp_init_aarch64(HEVCDSPContext *c, const int bit_depth) c->idct[0] = ff_hevc_idct_4x4_10_neon; c->idct[1] = ff_hevc_idct_8x8_10_neon; c->idct[2] = ff_hevc_idct_16x16_10_neon; + c->idct[3] = ff_hevc_idct_32x32_10_neon; c->idct_dc[0] = ff_hevc_idct_4x4_dc_10_neon; c->idct_dc[1] = ff_hevc_idct_8x8_dc_10_neon; c->idct_dc[2] = ff_hevc_idct_16x16_dc_10_neon; c->idct_dc[3] = ff_hevc_idct_32x32_dc_10_neon; } if (bit_depth == 12) { + c->hevc_h_loop_filter_chroma = ff_hevc_h_loop_filter_chroma_12_neon; + c->hevc_v_loop_filter_chroma = ff_hevc_v_loop_filter_chroma_12_neon; c->add_residual[0] = ff_hevc_add_residual_4x4_12_neon; c->add_residual[1] = ff_hevc_add_residual_8x8_12_neon; c->add_residual[2] = ff_hevc_add_residual_16x16_12_neon; diff --git a/arm/android/third_party/ffmpeg/libavcodec/adpcm.c b/arm/android/third_party/ffmpeg/libavcodec/adpcm.c index 45169693..59b9ef34 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/adpcm.c +++ b/arm/android/third_party/ffmpeg/libavcodec/adpcm.c @@ -1579,11 +1579,11 @@ static int adpcm_decode_frame(AVCodecContext *avctx, AVFrame *frame, nibble[0] = sign_extend(byte & 15, 4); nibble[1] = sign_extend(byte >> 4, 4); - out[2+n*2] = (nibble[0]*(scale<<14) + (history[0]*29336) - (history[1]*13136)) >> 14; + out[2+n*2] = nibble[0]*scale + ((history[0]*3667 - history[1]*1642) >> 11); history[1] = history[0]; history[0] = out[2+n*2]; - out[2+n*2+1] = (nibble[1]*(scale<<14) + (history[0]*29336) - (history[1]*13136)) >> 14; + out[2+n*2+1] = nibble[1]*scale + ((history[0]*3667 - history[1]*1642) >> 11); history[1] = history[0]; history[0] = out[2+n*2+1]; } diff --git a/arm/android/third_party/ffmpeg/libavcodec/agm.c b/arm/android/third_party/ffmpeg/libavcodec/agm.c index b37f1a42..55cf0b47 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/agm.c +++ b/arm/android/third_party/ffmpeg/libavcodec/agm.c @@ -1100,7 +1100,10 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, return AVERROR_INVALIDDATA; s->key_frame = (avpkt->flags & AV_PKT_FLAG_KEY); - frame->key_frame = s->key_frame; + if (s->key_frame) + frame->flags |= AV_FRAME_FLAG_KEY; + else + frame->flags &= ~AV_FRAME_FLAG_KEY; frame->pict_type = s->key_frame ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; if (!s->key_frame) { @@ -1171,7 +1174,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, if ((ret = ff_get_buffer(avctx, frame, AV_GET_BUFFER_FLAG_REF)) < 0) return ret; - if (frame->key_frame) { + if (frame->flags & AV_FRAME_FLAG_KEY) { if (!s->dct && !s->rgb) ret = decode_raw_intra(avctx, gbyte, frame); else if (!s->dct && s->rgb) diff --git a/arm/android/third_party/ffmpeg/libavcodec/aic.c b/arm/android/third_party/ffmpeg/libavcodec/aic.c index 7ba1c02f..f8b0f603 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/aic.c +++ b/arm/android/third_party/ffmpeg/libavcodec/aic.c @@ -393,7 +393,7 @@ static int aic_decode_frame(AVCodecContext *avctx, AVFrame *frame, ctx->frame = frame; ctx->frame->pict_type = AV_PICTURE_TYPE_I; - ctx->frame->key_frame = 1; + ctx->frame->flags |= AV_FRAME_FLAG_KEY; off = FFALIGN(AIC_HDR_SIZE + ctx->num_x_slices * ctx->mb_height * 2, 4); diff --git a/arm/android/third_party/ffmpeg/libavcodec/aliaspixdec.c b/arm/android/third_party/ffmpeg/libavcodec/aliaspixdec.c index 45155d79..72f810d4 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/aliaspixdec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/aliaspixdec.c @@ -70,7 +70,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *f, return ret; f->pict_type = AV_PICTURE_TYPE_I; - f->key_frame = 1; + f->flags |= AV_FRAME_FLAG_KEY; x = 0; y = 1; diff --git a/arm/android/third_party/ffmpeg/libavcodec/allcodecs.c b/arm/android/third_party/ffmpeg/libavcodec/allcodecs.c index 3cbb9334..184bb852 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/allcodecs.c +++ b/arm/android/third_party/ffmpeg/libavcodec/allcodecs.c @@ -251,6 +251,7 @@ extern const FFCodec ff_pbm_encoder; extern const FFCodec ff_pbm_decoder; extern const FFCodec ff_pcx_encoder; extern const FFCodec ff_pcx_decoder; +extern const FFCodec ff_pdv_decoder; extern const FFCodec ff_pfm_encoder; extern const FFCodec ff_pfm_decoder; extern const FFCodec ff_pgm_encoder; @@ -782,7 +783,6 @@ extern const FFCodec ff_libopencore_amrnb_encoder; extern const FFCodec ff_libopencore_amrnb_decoder; extern const FFCodec ff_libopencore_amrwb_decoder; extern const FFCodec ff_libopenjpeg_encoder; -extern const FFCodec ff_libopenjpeg_decoder; extern const FFCodec ff_libopus_encoder; extern const FFCodec ff_libopus_decoder; extern const FFCodec ff_librav1e_encoder; @@ -836,6 +836,7 @@ extern const FFCodec ff_libaom_av1_decoder; extern const FFCodec ff_av1_decoder; extern const FFCodec ff_av1_cuvid_decoder; extern const FFCodec ff_av1_mediacodec_decoder; +extern const FFCodec ff_av1_mediacodec_encoder; extern const FFCodec ff_av1_nvenc_encoder; extern const FFCodec ff_av1_qsv_decoder; extern const FFCodec ff_av1_qsv_encoder; @@ -873,17 +874,20 @@ extern const FFCodec ff_mpeg2_qsv_encoder; extern const FFCodec ff_mpeg2_vaapi_encoder; extern const FFCodec ff_mpeg4_cuvid_decoder; extern const FFCodec ff_mpeg4_mediacodec_decoder; +extern const FFCodec ff_mpeg4_mediacodec_encoder; extern const FFCodec ff_mpeg4_omx_encoder; extern const FFCodec ff_mpeg4_v4l2m2m_encoder; extern const FFCodec ff_prores_videotoolbox_encoder; extern const FFCodec ff_vc1_cuvid_decoder; extern const FFCodec ff_vp8_cuvid_decoder; extern const FFCodec ff_vp8_mediacodec_decoder; +extern const FFCodec ff_vp8_mediacodec_encoder; extern const FFCodec ff_vp8_qsv_decoder; extern const FFCodec ff_vp8_v4l2m2m_encoder; extern const FFCodec ff_vp8_vaapi_encoder; extern const FFCodec ff_vp9_cuvid_decoder; extern const FFCodec ff_vp9_mediacodec_decoder; +extern const FFCodec ff_vp9_mediacodec_encoder; extern const FFCodec ff_vp9_qsv_decoder; extern const FFCodec ff_vp9_vaapi_encoder; extern const FFCodec ff_vp9_qsv_encoder; diff --git a/arm/android/third_party/ffmpeg/libavcodec/alsdec.c b/arm/android/third_party/ffmpeg/libavcodec/alsdec.c index 4605b224..c64d1032 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/alsdec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/alsdec.c @@ -2190,6 +2190,10 @@ const FFCodec ff_als_decoder = { .close = decode_end, FF_CODEC_DECODE_CB(decode_frame), .flush = flush, - .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF, + .p.capabilities = +#if FF_API_SUBFRAMES + AV_CODEC_CAP_SUBFRAMES | +#endif + AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, }; diff --git a/arm/android/third_party/ffmpeg/libavcodec/amfenc_av1.c b/arm/android/third_party/ffmpeg/libavcodec/amfenc_av1.c index 8093cb73..ad09b791 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/amfenc_av1.c +++ b/arm/android/third_party/ffmpeg/libavcodec/amfenc_av1.c @@ -117,7 +117,13 @@ static av_cold int amf_encode_init_av1(AVCodecContext* avctx) framerate = AMFConstructRate(avctx->framerate.num, avctx->framerate.den); } else { - framerate = AMFConstructRate(avctx->time_base.den, avctx->time_base.num * avctx->ticks_per_frame); +FF_DISABLE_DEPRECATION_WARNINGS + framerate = AMFConstructRate(avctx->time_base.den, avctx->time_base.num +#if FF_API_TICKS_PER_FRAME + * avctx->ticks_per_frame +#endif + ); +FF_ENABLE_DEPRECATION_WARNINGS } if ((ret = ff_amf_encode_init(avctx)) < 0) diff --git a/arm/android/third_party/ffmpeg/libavcodec/amfenc_h264.c b/arm/android/third_party/ffmpeg/libavcodec/amfenc_h264.c index eaf7f974..d2fc3397 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/amfenc_h264.c +++ b/arm/android/third_party/ffmpeg/libavcodec/amfenc_h264.c @@ -142,7 +142,13 @@ static av_cold int amf_encode_init_h264(AVCodecContext *avctx) if (avctx->framerate.num > 0 && avctx->framerate.den > 0) { framerate = AMFConstructRate(avctx->framerate.num, avctx->framerate.den); } else { - framerate = AMFConstructRate(avctx->time_base.den, avctx->time_base.num * avctx->ticks_per_frame); +FF_DISABLE_DEPRECATION_WARNINGS + framerate = AMFConstructRate(avctx->time_base.den, avctx->time_base.num +#if FF_API_TICKS_PER_FRAME + * avctx->ticks_per_frame +#endif + ); +FF_ENABLE_DEPRECATION_WARNINGS } if ((ret = ff_amf_encode_init(avctx)) != 0) diff --git a/arm/android/third_party/ffmpeg/libavcodec/amfenc_hevc.c b/arm/android/third_party/ffmpeg/libavcodec/amfenc_hevc.c index 9b46946f..674a4095 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/amfenc_hevc.c +++ b/arm/android/third_party/ffmpeg/libavcodec/amfenc_hevc.c @@ -109,7 +109,13 @@ static av_cold int amf_encode_init_hevc(AVCodecContext *avctx) if (avctx->framerate.num > 0 && avctx->framerate.den > 0) { framerate = AMFConstructRate(avctx->framerate.num, avctx->framerate.den); } else { - framerate = AMFConstructRate(avctx->time_base.den, avctx->time_base.num * avctx->ticks_per_frame); +FF_DISABLE_DEPRECATION_WARNINGS + framerate = AMFConstructRate(avctx->time_base.den, avctx->time_base.num +#if FF_API_TICKS_PER_FRAME + * avctx->ticks_per_frame +#endif + ); +FF_ENABLE_DEPRECATION_WARNINGS } if ((ret = ff_amf_encode_init(avctx)) < 0) diff --git a/arm/android/third_party/ffmpeg/libavcodec/ansi.c b/arm/android/third_party/ffmpeg/libavcodec/ansi.c index c1e31266..49c3770c 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/ansi.c +++ b/arm/android/third_party/ffmpeg/libavcodec/ansi.c @@ -262,7 +262,11 @@ static int execute_code(AVCodecContext * avctx, int c) AV_GET_BUFFER_FLAG_REF)) < 0) return ret; s->frame->pict_type = AV_PICTURE_TYPE_I; +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS s->frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif set_palette((uint32_t *)s->frame->data[1]); erase_screen(avctx); } else if (c == 'l') { @@ -371,7 +375,11 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, } s->frame->pict_type = AV_PICTURE_TYPE_I; +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS s->frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif set_palette((uint32_t *)s->frame->data[1]); if (!s->first_frame) { erase_screen(avctx); diff --git a/arm/android/third_party/ffmpeg/libavcodec/apac.c b/arm/android/third_party/ffmpeg/libavcodec/apac.c index 3408f752..b6cb6c66 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/apac.c +++ b/arm/android/third_party/ffmpeg/libavcodec/apac.c @@ -269,8 +269,10 @@ const FFCodec ff_apac_decoder = { FF_CODEC_DECODE_CB(apac_decode), .close = apac_close, .p.capabilities = AV_CODEC_CAP_DELAY | - AV_CODEC_CAP_DR1 | - AV_CODEC_CAP_SUBFRAMES, +#if FF_API_SUBFRAMES + AV_CODEC_CAP_SUBFRAMES | +#endif + AV_CODEC_CAP_DR1, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_U8P, AV_SAMPLE_FMT_S16P, diff --git a/arm/android/third_party/ffmpeg/libavcodec/apedec.c b/arm/android/third_party/ffmpeg/libavcodec/apedec.c index c08d13d6..613c76df 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/apedec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/apedec.c @@ -944,7 +944,7 @@ static void long_filter_high_3800(int32_t *buffer, int order, int shift, int len { int i, j; int32_t dotprod, sign; - int32_t coeffs[256], delay[256]; + int32_t coeffs[256], delay[256+256], *delayp = delay; if (order >= length) return; @@ -955,14 +955,28 @@ static void long_filter_high_3800(int32_t *buffer, int order, int shift, int len for (i = order; i < length; i++) { dotprod = 0; sign = APESIGN(buffer[i]); - for (j = 0; j < order; j++) { - dotprod += delay[j] * (unsigned)coeffs[j]; - coeffs[j] += ((delay[j] >> 31) | 1) * sign; + if (sign == 1) { + for (j = 0; j < order; j++) { + dotprod += delayp[j] * (unsigned)coeffs[j]; + coeffs[j] += (delayp[j] >> 31) | 1; + } + } else if (sign == -1) { + for (j = 0; j < order; j++) { + dotprod += delayp[j] * (unsigned)coeffs[j]; + coeffs[j] -= (delayp[j] >> 31) | 1; + } + } else { + for (j = 0; j < order; j++) { + dotprod += delayp[j] * (unsigned)coeffs[j]; + } } buffer[i] -= (unsigned)(dotprod >> shift); - for (j = 0; j < order - 1; j++) - delay[j] = delay[j + 1]; - delay[order - 1] = buffer[i]; + delayp ++; + delayp[order - 1] = buffer[i]; + if (delayp - delay == 256) { + memcpy(delay, delayp, sizeof(*delay)*256); + delayp = delay; + } } } @@ -1666,7 +1680,11 @@ const FFCodec ff_ape_decoder = { .init = ape_decode_init, .close = ape_decode_close, FF_CODEC_DECODE_CB(ape_decode_frame), - .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DELAY | + .p.capabilities = +#if FF_API_SUBFRAMES + AV_CODEC_CAP_SUBFRAMES | +#endif + AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, .flush = ape_flush, diff --git a/arm/android/third_party/ffmpeg/libavcodec/arbc.c b/arm/android/third_party/ffmpeg/libavcodec/arbc.c index 343c5669..1b349f4d 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/arbc.c +++ b/arm/android/third_party/ffmpeg/libavcodec/arbc.c @@ -171,7 +171,10 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, return ret; frame->pict_type = prev_pixels <= 0 ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; - frame->key_frame = prev_pixels <= 0; + if (prev_pixels <= 0) + frame->flags |= AV_FRAME_FLAG_KEY; + else + frame->flags &= ~AV_FRAME_FLAG_KEY; *got_frame = 1; return avpkt->size; diff --git a/arm/android/third_party/ffmpeg/libavcodec/argo.c b/arm/android/third_party/ffmpeg/libavcodec/argo.c index 9bedb139..589feed4 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/argo.c +++ b/arm/android/third_party/ffmpeg/libavcodec/argo.c @@ -666,7 +666,10 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, return ret; frame->pict_type = s->key ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; - frame->key_frame = s->key; + if (s->key) + frame->flags |= AV_FRAME_FLAG_KEY; + else + frame->flags &= ~AV_FRAME_FLAG_KEY; *got_frame = 1; return avpkt->size; diff --git a/arm/android/third_party/ffmpeg/libavcodec/asvdec.c b/arm/android/third_party/ffmpeg/libavcodec/asvdec.c index 699aab9f..62295b2d 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/asvdec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/asvdec.c @@ -245,7 +245,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, if ((ret = ff_get_buffer(avctx, p, 0)) < 0) return ret; p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; if (avctx->codec_id == AV_CODEC_ID_ASV1) { av_fast_padded_malloc(&a->bitstream_buffer, &a->bitstream_buffer_size, diff --git a/arm/android/third_party/ffmpeg/libavcodec/atrac3.c b/arm/android/third_party/ffmpeg/libavcodec/atrac3.c index 7415da59..5851ee02 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/atrac3.c +++ b/arm/android/third_party/ffmpeg/libavcodec/atrac3.c @@ -1026,7 +1026,11 @@ const FFCodec ff_atrac3_decoder = { .init = atrac3_decode_init, .close = atrac3_decode_close, FF_CODEC_DECODE_CB(atrac3_decode_frame), - .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1, + .p.capabilities = +#if FF_API_SUBFRAMES + AV_CODEC_CAP_SUBFRAMES | +#endif + AV_CODEC_CAP_DR1, .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_NONE }, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, @@ -1041,7 +1045,11 @@ const FFCodec ff_atrac3al_decoder = { .init = atrac3_decode_init, .close = atrac3_decode_close, FF_CODEC_DECODE_CB(atrac3al_decode_frame), - .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1, + .p.capabilities = +#if FF_API_SUBFRAMES + AV_CODEC_CAP_SUBFRAMES | +#endif + AV_CODEC_CAP_DR1, .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_NONE }, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, diff --git a/arm/android/third_party/ffmpeg/libavcodec/atrac9dec.c b/arm/android/third_party/ffmpeg/libavcodec/atrac9dec.c index 60962b16..8a694045 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/atrac9dec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/atrac9dec.c @@ -1003,5 +1003,9 @@ const FFCodec ff_atrac9_decoder = { FF_CODEC_DECODE_CB(atrac9_decode_frame), .flush = atrac9_decode_flush, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, - .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF, + .p.capabilities = +#if FF_API_SUBFRAMES + AV_CODEC_CAP_SUBFRAMES | +#endif + AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF, }; diff --git a/arm/android/third_party/ffmpeg/libavcodec/autorename_libavcodec_bswapdsp.c b/arm/android/third_party/ffmpeg/libavcodec/autorename_libavcodec_bswapdsp.c new file mode 100644 index 00000000..3accbac3 --- /dev/null +++ b/arm/android/third_party/ffmpeg/libavcodec/autorename_libavcodec_bswapdsp.c @@ -0,0 +1,2 @@ +// File automatically generated. See crbug.com/495833. +#include "bswapdsp.c" \ No newline at end of file diff --git a/arm/android/third_party/ffmpeg/libavcodec/av1_parse.c b/arm/android/third_party/ffmpeg/libavcodec/av1_parse.c index 59ea0bc6..06163681 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/av1_parse.c +++ b/arm/android/third_party/ffmpeg/libavcodec/av1_parse.c @@ -56,7 +56,7 @@ int ff_av1_extract_obu(AV1OBU *obu, const uint8_t *buf, int length, void *logctx int ff_av1_packet_split(AV1Packet *pkt, const uint8_t *buf, int length, void *logctx) { GetByteContext bc; - int ret, consumed; + int consumed; bytestream2_init(&bc, buf, length); pkt->nb_obus = 0; @@ -88,16 +88,14 @@ int ff_av1_packet_split(AV1Packet *pkt, const uint8_t *buf, int length, void *lo obu->size_bits = get_obu_bit_length(obu->data, obu->size, obu->type); - if (obu->size_bits < 0 || (!obu->size_bits && obu->type != AV1_OBU_TEMPORAL_DELIMITER)) { + if (obu->size_bits < 0 || + (obu->size_bits == 0 && (obu->type != AV1_OBU_TEMPORAL_DELIMITER && + obu->type != AV1_OBU_PADDING))) { av_log(logctx, AV_LOG_ERROR, "Invalid OBU of type %d, skipping.\n", obu->type); continue; } pkt->nb_obus++; - - ret = init_get_bits(&obu->gb, obu->data, obu->size_bits); - if (ret < 0) - return ret; } return 0; @@ -108,3 +106,17 @@ void ff_av1_packet_uninit(AV1Packet *pkt) av_freep(&pkt->obus); pkt->obus_allocated = pkt->obus_allocated_size = 0; } + +AVRational ff_av1_framerate(int64_t ticks_per_frame, int64_t units_per_tick, + int64_t time_scale) +{ + AVRational fr; + + if (ticks_per_frame && units_per_tick && time_scale && + ticks_per_frame < INT64_MAX / units_per_tick && + av_reduce(&fr.den, &fr.num, units_per_tick * ticks_per_frame, + time_scale, INT_MAX)) + return fr; + + return (AVRational){ 0, 1 }; +} diff --git a/arm/android/third_party/ffmpeg/libavcodec/av1_parse.h b/arm/android/third_party/ffmpeg/libavcodec/av1_parse.h index f4a5d283..d0abd7ac 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/av1_parse.h +++ b/arm/android/third_party/ffmpeg/libavcodec/av1_parse.h @@ -49,9 +49,6 @@ typedef struct AV1OBU { int raw_size; const uint8_t *raw_data; - /** GetBitContext initialized to the start of the payload */ - GetBitContext gb; - int type; int temporal_id; @@ -181,4 +178,7 @@ static inline int get_obu_bit_length(const uint8_t *buf, int size, int type) return size; } +AVRational ff_av1_framerate(int64_t ticks_per_frame, int64_t units_per_tick, + int64_t time_scale); + #endif /* AVCODEC_AV1_PARSE_H */ diff --git a/arm/android/third_party/ffmpeg/libavcodec/av1_parser.c b/arm/android/third_party/ffmpeg/libavcodec/av1_parser.c index 14dae92f..2b79493b 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/av1_parser.c +++ b/arm/android/third_party/ffmpeg/libavcodec/av1_parser.c @@ -21,6 +21,8 @@ */ #include "libavutil/avassert.h" + +#include "av1_parse.h" #include "cbs.h" #include "cbs_av1.h" #include "parser.h" @@ -162,11 +164,10 @@ static int av1_parser_parse(AVCodecParserContext *ctx, avctx->color_trc = (enum AVColorTransferCharacteristic) color->transfer_characteristics; avctx->color_range = color->color_range ? AVCOL_RANGE_JPEG : AVCOL_RANGE_MPEG; - if (seq->timing_info_present_flag) { - const AV1RawTimingInfo *timing = &seq->timing_info; - av_reduce(&avctx->framerate.den, &avctx->framerate.num, - timing->num_units_in_display_tick, timing->time_scale, INT_MAX); - } + if (seq->timing_info_present_flag) + avctx->framerate = ff_av1_framerate(1LL + seq->timing_info.num_ticks_per_picture_minus_1, + seq->timing_info.num_units_in_display_tick, + seq->timing_info.time_scale); end: ff_cbs_fragment_reset(td); diff --git a/arm/android/third_party/ffmpeg/libavcodec/av1dec.c b/arm/android/third_party/ffmpeg/libavcodec/av1dec.c index 807852e3..d46ee483 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/av1dec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/av1dec.c @@ -26,6 +26,7 @@ #include "libavutil/pixdesc.h" #include "libavutil/opt.h" #include "avcodec.h" +#include "av1_parse.h" #include "av1dec.h" #include "atsc_a53.h" #include "bytestream.h" @@ -709,15 +710,10 @@ static int set_context_with_sequence(AVCodecContext *avctx, } avctx->sample_aspect_ratio = (AVRational) { 1, 1 }; - if (seq->timing_info.num_units_in_display_tick && - seq->timing_info.time_scale) { - av_reduce(&avctx->framerate.den, &avctx->framerate.num, - seq->timing_info.num_units_in_display_tick, - seq->timing_info.time_scale, - INT_MAX); - if (seq->timing_info.equal_picture_interval) - avctx->ticks_per_frame = seq->timing_info.num_ticks_per_picture_minus_1 + 1; - } + if (seq->timing_info_present_flag) + avctx->framerate = ff_av1_framerate(1LL + seq->timing_info.num_ticks_per_picture_minus_1, + seq->timing_info.num_units_in_display_tick, + seq->timing_info.time_scale); return 0; } @@ -846,7 +842,10 @@ static int av1_frame_alloc(AVCodecContext *avctx, AV1Frame *f) goto fail; frame = f->f; - frame->key_frame = header->frame_type == AV1_FRAME_KEY; + if (header->frame_type == AV1_FRAME_KEY) + frame->flags |= AV_FRAME_FLAG_KEY; + else + frame->flags &= ~AV_FRAME_FLAG_KEY; switch (header->frame_type) { case AV1_FRAME_KEY: diff --git a/arm/android/third_party/ffmpeg/libavcodec/avcodec.c b/arm/android/third_party/ffmpeg/libavcodec/avcodec.c index fb136229..5a96899d 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/avcodec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/avcodec.c @@ -44,10 +44,11 @@ int avcodec_default_execute(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2), void *arg, int *ret, int count, int size) { - int i; + size_t i; for (i = 0; i < count; i++) { - int r = func(c, (char *)arg + i * size); + size_t offset = i * size; + int r = func(c, FF_PTR_ADD((char *)arg, offset)); if (ret) ret[i] = r; } diff --git a/arm/android/third_party/ffmpeg/libavcodec/avcodec.h b/arm/android/third_party/ffmpeg/libavcodec/avcodec.h index eaaa0e2e..d6a4622f 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/avcodec.h +++ b/arm/android/third_party/ffmpeg/libavcodec/avcodec.h @@ -556,14 +556,22 @@ typedef struct AVCodecContext { */ AVRational time_base; +#if FF_API_TICKS_PER_FRAME /** * For some codecs, the time base is closer to the field rate than the frame rate. * Most notably, H.264 and MPEG-2 specify time_base as half of frame duration * if no telecine is used ... * * Set to time_base ticks per frame. Default 1, e.g., H.264/MPEG-2 set it to 2. + * + * @deprecated + * - decoding: Use AVCodecDescriptor.props & AV_CODEC_PROP_FIELDS + * - encoding: Set AVCodecContext.framerate instead + * */ + attribute_deprecated int ticks_per_frame; +#endif /** * Codec delay. @@ -1016,8 +1024,11 @@ typedef struct AVCodecContext { /** * MPEG vs JPEG YUV range. - * - encoding: Set by user - * - decoding: Set by libavcodec + * - encoding: Set by user to override the default output color range value, + * If not specified, libavcodec sets the color range depending on the + * output format. + * - decoding: Set by libavcodec, can be set by the user to propagate the + * color range to components reading from the decoder context. */ enum AVColorRange color_range; diff --git a/arm/android/third_party/ffmpeg/libavcodec/avrndec.c b/arm/android/third_party/ffmpeg/libavcodec/avrndec.c index ef194058..97d28246 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/avrndec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/avrndec.c @@ -68,7 +68,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, if ((ret = ff_get_buffer(avctx, p, 0)) < 0) return ret; p->pict_type= AV_PICTURE_TYPE_I; - p->key_frame= 1; + p->flags |= AV_FRAME_FLAG_KEY; if(a->interlace) { buf += (true_height - avctx->height)*avctx->width; diff --git a/arm/android/third_party/ffmpeg/libavcodec/avs.c b/arm/android/third_party/ffmpeg/libavcodec/avs.c index a1c9d3c4..b53175f6 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/avs.c +++ b/arm/android/third_party/ffmpeg/libavcodec/avs.c @@ -61,7 +61,7 @@ static int avs_decode_frame(AVCodecContext * avctx, AVFrame *picture, if ((ret = ff_reget_buffer(avctx, p, 0)) < 0) return ret; p->pict_type = AV_PICTURE_TYPE_P; - p->key_frame = 0; + p->flags &= ~AV_FRAME_FLAG_KEY; out = p->data[0]; stride = p->linesize[0]; @@ -97,7 +97,7 @@ static int avs_decode_frame(AVCodecContext * avctx, AVFrame *picture, switch (sub_type) { case AVS_I_FRAME: p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; case AVS_P_FRAME_3X3: vect_w = 3; vect_h = 3; diff --git a/arm/android/third_party/ffmpeg/libavcodec/avuidec.c b/arm/android/third_party/ffmpeg/libavcodec/avuidec.c index ba157e16..48b23d48 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/avuidec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/avuidec.c @@ -71,7 +71,7 @@ static int avui_decode_frame(AVCodecContext *avctx, AVFrame *pic, if ((ret = ff_get_buffer(avctx, pic, 0)) < 0) return ret; - pic->key_frame = 1; + pic->flags |= AV_FRAME_FLAG_KEY; pic->pict_type = AV_PICTURE_TYPE_I; if (!interlaced) { diff --git a/arm/android/third_party/ffmpeg/libavcodec/bethsoftvideo.c b/arm/android/third_party/ffmpeg/libavcodec/bethsoftvideo.c index e095d04f..6de50282 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/bethsoftvideo.c +++ b/arm/android/third_party/ffmpeg/libavcodec/bethsoftvideo.c @@ -63,7 +63,11 @@ static int set_palette(BethsoftvidContext *ctx, GetByteContext *g) palette[a] = 0xFFU << 24 | bytestream2_get_be24u(g) * 4; palette[a] |= palette[a] >> 6 & 0x30303; } +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS ctx->frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif return 0; } diff --git a/arm/android/third_party/ffmpeg/libavcodec/bfi.c b/arm/android/third_party/ffmpeg/libavcodec/bfi.c index c2682724..901669a3 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/bfi.c +++ b/arm/android/third_party/ffmpeg/libavcodec/bfi.c @@ -68,7 +68,7 @@ static int bfi_decode_frame(AVCodecContext *avctx, AVFrame *frame, /* Set frame parameters and palette, if necessary */ if (!avctx->frame_num) { frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; /* Setting the palette */ if (avctx->extradata_size > 768) { av_log(avctx, AV_LOG_ERROR, "Palette is too large.\n"); @@ -84,11 +84,19 @@ static int bfi_decode_frame(AVCodecContext *avctx, AVFrame *frame, pal++; } memcpy(bfi->pal, frame->data[1], sizeof(bfi->pal)); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } else { frame->pict_type = AV_PICTURE_TYPE_P; - frame->key_frame = 0; + frame->flags &= ~AV_FRAME_FLAG_KEY; +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = 0; +FF_ENABLE_DEPRECATION_WARNINGS +#endif memcpy(frame->data[1], bfi->pal, sizeof(bfi->pal)); } diff --git a/arm/android/third_party/ffmpeg/libavcodec/bintext.c b/arm/android/third_party/ffmpeg/libavcodec/bintext.c index ce814f76..b20d6ce1 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/bintext.c +++ b/arm/android/third_party/ffmpeg/libavcodec/bintext.c @@ -157,7 +157,11 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, if ((ret = ff_get_buffer(avctx, s->frame, 0)) < 0) return ret; s->frame->pict_type = AV_PICTURE_TYPE_I; +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS s->frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif memcpy(s->frame->data[1], s->palette, 16 * 4); if (avctx->codec_id == AV_CODEC_ID_XBIN) { diff --git a/arm/android/third_party/ffmpeg/libavcodec/bitpacked_dec.c b/arm/android/third_party/ffmpeg/libavcodec/bitpacked_dec.c index a1ffef18..c88f8619 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/bitpacked_dec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/bitpacked_dec.c @@ -134,7 +134,7 @@ static int bitpacked_decode(AVCodecContext *avctx, AVFrame *frame, return res; frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; *got_frame = 1; return buf_size; diff --git a/arm/android/third_party/ffmpeg/libavcodec/bmp.c b/arm/android/third_party/ffmpeg/libavcodec/bmp.c index d7e01f07..d117c06c 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/bmp.c +++ b/arm/android/third_party/ffmpeg/libavcodec/bmp.c @@ -210,7 +210,7 @@ static int bmp_decode_frame(AVCodecContext *avctx, AVFrame *p, if ((ret = ff_get_buffer(avctx, p, 0)) < 0) return ret; p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; buf = buf0 + hsize; dsize = buf_size - hsize; diff --git a/arm/android/third_party/ffmpeg/libavcodec/bmvvideo.c b/arm/android/third_party/ffmpeg/libavcodec/bmvvideo.c index 92ce41c8..20f07ca5 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/bmvvideo.c +++ b/arm/android/third_party/ffmpeg/libavcodec/bmvvideo.c @@ -251,7 +251,11 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, } memcpy(frame->data[1], c->pal, AVPALETTE_SIZE); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = type & BMV_PALETTE; +FF_ENABLE_DEPRECATION_WARNINGS +#endif outptr = frame->data[0]; srcptr = c->frame; diff --git a/arm/android/third_party/ffmpeg/libavcodec/bonk.c b/arm/android/third_party/ffmpeg/libavcodec/bonk.c index 5f510e49..fbea91c7 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/bonk.c +++ b/arm/android/third_party/ffmpeg/libavcodec/bonk.c @@ -155,6 +155,7 @@ static int intlist_read(BonkContext *s, int *buf, int entries, int base_2_part) int n_zeros = 0, step = 256, dominant = 0; int pos = 0, level = 0; BitCount *bits = s->bits; + int passes = 1; memset(buf, 0, entries * sizeof(*buf)); if (base_2_part) { @@ -216,24 +217,28 @@ static int intlist_read(BonkContext *s, int *buf, int entries, int base_2_part) x = 0; n_zeros = 0; for (i = 0; n_zeros < entries; i++) { + if (x >= max_x) + return AVERROR_INVALIDDATA; + if (pos >= entries) { pos = 0; - level += 1 << low_bits; + level += passes << low_bits; + passes = 1; + if (bits[x].bit && bits[x].count > entries - n_zeros) + passes = bits[x].count / (entries - n_zeros); } if (level > 1 << 16) return AVERROR_INVALIDDATA; - if (x >= max_x) - return AVERROR_INVALIDDATA; - if (buf[pos] >= level) { if (bits[x].bit) - buf[pos] += 1 << low_bits; + buf[pos] += passes << low_bits; else n_zeros++; - bits[x].count--; + av_assert1(bits[x].count >= passes); + bits[x].count -= passes; x += bits[x].count == 0; } @@ -265,14 +270,14 @@ static inline int shift(int a, int b) static int predictor_calc_error(int *k, int *state, int order, int error) { - int i, x = error - shift_down(k[order-1] * state[order-1], LATTICE_SHIFT); + int i, x = error - shift_down(k[order-1] * (unsigned)state[order-1], LATTICE_SHIFT); int *k_ptr = &(k[order-2]), *state_ptr = &(state[order-2]); for (i = order-2; i >= 0; i--, k_ptr--, state_ptr--) { unsigned k_value = *k_ptr, state_value = *state_ptr; - x -= shift_down(k_value * state_value, LATTICE_SHIFT); + x -= shift_down(k_value * (unsigned)state_value, LATTICE_SHIFT); state_ptr[1] = state_value + shift_down(k_value * x, LATTICE_SHIFT); } @@ -423,8 +428,10 @@ const FFCodec ff_bonk_decoder = { FF_CODEC_DECODE_CB(bonk_decode), .close = bonk_close, .p.capabilities = AV_CODEC_CAP_DELAY | - AV_CODEC_CAP_DR1 | - AV_CODEC_CAP_SUBFRAMES, +#if FF_API_SUBFRAMES + AV_CODEC_CAP_SUBFRAMES | +#endif + AV_CODEC_CAP_DR1, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P, AV_SAMPLE_FMT_NONE }, diff --git a/arm/android/third_party/ffmpeg/libavcodec/brenderpix.c b/arm/android/third_party/ffmpeg/libavcodec/brenderpix.c index e95ab3d4..70a3e6be 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/brenderpix.c +++ b/arm/android/third_party/ffmpeg/libavcodec/brenderpix.c @@ -245,7 +245,11 @@ static int pix_decode_frame(AVCodecContext *avctx, AVFrame *frame, *pal_out++ = (0xFFU << 24) | bytestream2_get_be32u(&gb); bytestream2_skip(&gb, 8); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif chunk_type = bytestream2_get_be32(&gb); } else if (avctx->pix_fmt == AV_PIX_FMT_PAL8) { @@ -257,7 +261,11 @@ static int pix_decode_frame(AVCodecContext *avctx, AVFrame *frame, "Using default palette, colors might be off.\n"); memcpy(pal_out, std_pal_table, sizeof(uint32_t) * 256); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } data_len = bytestream2_get_be32(&gb); @@ -278,7 +286,7 @@ static int pix_decode_frame(AVCodecContext *avctx, AVFrame *frame, bytes_per_scanline, hdr.height); frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; *got_frame = 1; return avpkt->size; diff --git a/arm/android/third_party/ffmpeg/libavcodec/bytestream.h b/arm/android/third_party/ffmpeg/libavcodec/bytestream.h index d0033f14..67080604 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/bytestream.h +++ b/arm/android/third_party/ffmpeg/libavcodec/bytestream.h @@ -180,7 +180,7 @@ static av_always_inline void bytestream2_skipu(GetByteContext *g, static av_always_inline void bytestream2_skip_p(PutByteContext *p, unsigned int size) { - int size2; + unsigned int size2; if (p->eof) return; size2 = FFMIN(p->buffer_end - p->buffer, size); @@ -268,7 +268,7 @@ static av_always_inline unsigned int bytestream2_get_buffer(GetByteContext *g, uint8_t *dst, unsigned int size) { - int size2 = FFMIN(g->buffer_end - g->buffer, size); + unsigned int size2 = FFMIN(g->buffer_end - g->buffer, size); memcpy(dst, g->buffer, size2); g->buffer += size2; return size2; @@ -287,7 +287,7 @@ static av_always_inline unsigned int bytestream2_put_buffer(PutByteContext *p, const uint8_t *src, unsigned int size) { - int size2; + unsigned int size2; if (p->eof) return 0; size2 = FFMIN(p->buffer_end - p->buffer, size); @@ -311,7 +311,7 @@ static av_always_inline void bytestream2_set_buffer(PutByteContext *p, const uint8_t c, unsigned int size) { - int size2; + unsigned int size2; if (p->eof) return; size2 = FFMIN(p->buffer_end - p->buffer, size); @@ -348,7 +348,7 @@ static av_always_inline unsigned int bytestream2_copy_buffer(PutByteContext *p, GetByteContext *g, unsigned int size) { - int size2; + unsigned int size2; if (p->eof) return 0; diff --git a/arm/android/third_party/ffmpeg/libavcodec/c93.c b/arm/android/third_party/ffmpeg/libavcodec/c93.c index bfcbc7c1..2a4fe459 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/c93.c +++ b/arm/android/third_party/ffmpeg/libavcodec/c93.c @@ -147,10 +147,10 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, b = bytestream2_get_byte(&gb); if (b & C93_FIRST_FRAME) { newpic->pict_type = AV_PICTURE_TYPE_I; - newpic->key_frame = 1; + newpic->flags |= AV_FRAME_FLAG_KEY; } else { newpic->pict_type = AV_PICTURE_TYPE_P; - newpic->key_frame = 0; + newpic->flags &= ~AV_FRAME_FLAG_KEY; } for (y = 0; y < HEIGHT; y += 8) { @@ -246,7 +246,11 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, for (i = 0; i < 256; i++) { palette[i] = 0xFFU << 24 | bytestream2_get_be24(&gb); } +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS newpic->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } else { if (oldpic->data[1]) memcpy(newpic->data[1], oldpic->data[1], 256 * 4); diff --git a/arm/android/third_party/ffmpeg/libavcodec/cavs_parser.c b/arm/android/third_party/ffmpeg/libavcodec/cavs_parser.c index 03f392c2..4a03effd 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/cavs_parser.c +++ b/arm/android/third_party/ffmpeg/libavcodec/cavs_parser.c @@ -59,12 +59,11 @@ static int cavs_find_frame_end(ParseContext *pc, const uint8_t *buf, return 0; for(; i SLICE_MAX_START_CODE){ - pc->frame_start_found=0; - pc->state=-1; - return i-3; - } + if (state == PIC_I_START_CODE || state == PIC_PB_START_CODE || + state == CAVS_START_CODE) { + pc->frame_start_found=0; + pc->state=-1; + return i-3; } } } diff --git a/arm/android/third_party/ffmpeg/libavcodec/cavsdec.c b/arm/android/third_party/ffmpeg/libavcodec/cavsdec.c index b1fa9a98..37071dfb 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/cavsdec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/cavsdec.c @@ -1020,6 +1020,9 @@ static int decode_pic(AVSContext *h) skip_bits(&h->gb, 1); //marker_bit } + if (get_bits_left(&h->gb) < 23) + return AVERROR_INVALIDDATA; + ret = ff_get_buffer(h->avctx, h->cur.f, h->cur.f->pict_type == AV_PICTURE_TYPE_B ? 0 : AV_GET_BUFFER_FLAG_REF); if (ret < 0) diff --git a/arm/android/third_party/ffmpeg/libavcodec/cbs_av1.c b/arm/android/third_party/ffmpeg/libavcodec/cbs_av1.c index 45e1288a..8788fee0 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/cbs_av1.c +++ b/arm/android/third_party/ffmpeg/libavcodec/cbs_av1.c @@ -1306,9 +1306,16 @@ static void cbs_av1_free_metadata(void *unit, uint8_t *content) md = &obu->obu.metadata; switch (md->metadata_type) { + case AV1_METADATA_TYPE_HDR_CLL: + case AV1_METADATA_TYPE_HDR_MDCV: + case AV1_METADATA_TYPE_SCALABILITY: + case AV1_METADATA_TYPE_TIMECODE: + break; case AV1_METADATA_TYPE_ITUT_T35: av_buffer_unref(&md->metadata.itut_t35.payload_ref); break; + default: + av_buffer_unref(&md->metadata.unknown.payload_ref); } av_free(content); } diff --git a/arm/android/third_party/ffmpeg/libavcodec/cbs_av1.h b/arm/android/third_party/ffmpeg/libavcodec/cbs_av1.h index 1fc80dcf..36848d44 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/cbs_av1.h +++ b/arm/android/third_party/ffmpeg/libavcodec/cbs_av1.h @@ -370,6 +370,12 @@ typedef struct AV1RawMetadataTimecode { uint32_t time_offset_value; } AV1RawMetadataTimecode; +typedef struct AV1RawMetadataUnknown { + uint8_t *payload; + AVBufferRef *payload_ref; + size_t payload_size; +} AV1RawMetadataUnknown; + typedef struct AV1RawMetadata { uint64_t metadata_type; union { @@ -378,6 +384,7 @@ typedef struct AV1RawMetadata { AV1RawMetadataScalability scalability; AV1RawMetadataITUTT35 itut_t35; AV1RawMetadataTimecode timecode; + AV1RawMetadataUnknown unknown; } metadata; } AV1RawMetadata; diff --git a/arm/android/third_party/ffmpeg/libavcodec/cbs_av1_syntax_template.c b/arm/android/third_party/ffmpeg/libavcodec/cbs_av1_syntax_template.c index e95925a4..8f4640d1 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/cbs_av1_syntax_template.c +++ b/arm/android/third_party/ffmpeg/libavcodec/cbs_av1_syntax_template.c @@ -176,7 +176,7 @@ static int FUNC(decoder_model_info)(CodedBitstreamContext *ctx, RWContext *rw, int err; fb(5, buffer_delay_length_minus_1); - fb(32, num_units_in_decoding_tick); + fc(32, num_units_in_decoding_tick, 1, MAX_UINT_BITS(32)); fb(5, buffer_removal_time_length_minus_1); fb(5, frame_presentation_time_length_minus_1); @@ -1843,6 +1843,8 @@ static int FUNC(metadata_hdr_cll)(CodedBitstreamContext *ctx, RWContext *rw, { int err; + HEADER("HDR CLL Metadata"); + fb(16, max_cll); fb(16, max_fall); @@ -1854,6 +1856,8 @@ static int FUNC(metadata_hdr_mdcv)(CodedBitstreamContext *ctx, RWContext *rw, { int err, i; + HEADER("HDR MDCV Metadata"); + for (i = 0; i < 3; i++) { fbs(16, primary_chromaticity_x[i], 1, i); fbs(16, primary_chromaticity_y[i], 1, i); @@ -1920,6 +1924,8 @@ static int FUNC(metadata_scalability)(CodedBitstreamContext *ctx, RWContext *rw, { int err; + HEADER("Scalability Metadata"); + fb(8, scalability_mode_idc); if (current->scalability_mode_idc == AV1_SCALABILITY_SS) @@ -1934,6 +1940,8 @@ static int FUNC(metadata_itut_t35)(CodedBitstreamContext *ctx, RWContext *rw, int err; size_t i; + HEADER("ITU-T T.35 Metadata"); + fb(8, itu_t_t35_country_code); if (current->itu_t_t35_country_code == 0xff) fb(8, itu_t_t35_country_code_extension_byte); @@ -1961,6 +1969,8 @@ static int FUNC(metadata_timecode)(CodedBitstreamContext *ctx, RWContext *rw, { int err; + HEADER("Timecode Metadata"); + fb(5, counting_type); flag(full_timestamp_flag); flag(discontinuity_flag); @@ -1994,6 +2004,29 @@ static int FUNC(metadata_timecode)(CodedBitstreamContext *ctx, RWContext *rw, return 0; } +static int FUNC(metadata_unknown)(CodedBitstreamContext *ctx, RWContext *rw, + AV1RawMetadataUnknown *current) +{ + int err; + size_t i; + + HEADER("Unknown Metadata"); + +#ifdef READ + current->payload_size = cbs_av1_get_payload_bytes_left(rw); + + current->payload_ref = av_buffer_alloc(current->payload_size); + if (!current->payload_ref) + return AVERROR(ENOMEM); + current->payload = current->payload_ref->data; +#endif + + for (i = 0; i < current->payload_size; i++) + fbs(8, payload[i], 1, i); + + return 0; +} + static int FUNC(metadata_obu)(CodedBitstreamContext *ctx, RWContext *rw, AV1RawMetadata *current) { @@ -2018,8 +2051,7 @@ static int FUNC(metadata_obu)(CodedBitstreamContext *ctx, RWContext *rw, CHECK(FUNC(metadata_timecode)(ctx, rw, ¤t->metadata.timecode)); break; default: - // Unknown metadata type. - return AVERROR_PATCHWELCOME; + CHECK(FUNC(metadata_unknown)(ctx, rw, ¤t->metadata.unknown)); } return 0; diff --git a/arm/android/third_party/ffmpeg/libavcodec/ccaption_dec.c b/arm/android/third_party/ffmpeg/libavcodec/ccaption_dec.c index 661a4951..f91c92b3 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/ccaption_dec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/ccaption_dec.c @@ -262,7 +262,6 @@ typedef struct CCaptionSubContext { static av_cold int init_decoder(AVCodecContext *avctx) { - int ret; CCaptionSubContext *ctx = avctx->priv_data; av_bprint_init(&ctx->buffer[0], 0, AV_BPRINT_SIZE_UNLIMITED); @@ -272,7 +271,7 @@ static av_cold int init_decoder(AVCodecContext *avctx) ctx->bg_color = CCCOL_BLACK; ctx->rollup = 2; ctx->cursor_row = 10; - ret = ff_ass_subtitle_header(avctx, "Monospace", + return ff_ass_subtitle_header(avctx, "Monospace", ASS_DEFAULT_FONT_SIZE, ASS_DEFAULT_COLOR, ASS_DEFAULT_BACK_COLOR, @@ -281,11 +280,6 @@ static av_cold int init_decoder(AVCodecContext *avctx) ASS_DEFAULT_UNDERLINE, 3, ASS_DEFAULT_ALIGNMENT); - if (ret < 0) { - return ret; - } - - return ret; } static av_cold int close_decoder(AVCodecContext *avctx) @@ -900,6 +894,7 @@ static int decode(AVCodecContext *avctx, AVSubtitle *sub, ret = ff_ass_add_rect2(sub, ctx->buffer[bidx].str, ctx->readorder++, 0, NULL, NULL, &nb_rect_allocated); if (ret < 0) return ret; + av_bprint_clear(&ctx->buffer[bidx]); sub->pts = ctx->buffer_time[1]; sub->end_display_time = av_rescale_q(ctx->buffer_time[1] - ctx->buffer_time[0], AV_TIME_BASE_Q, ms_tb); diff --git a/arm/android/third_party/ffmpeg/libavcodec/cdgraphics.c b/arm/android/third_party/ffmpeg/libavcodec/cdgraphics.c index 431e99cd..0c5022a5 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/cdgraphics.c +++ b/arm/android/third_party/ffmpeg/libavcodec/cdgraphics.c @@ -125,7 +125,11 @@ static void cdg_load_palette(CDGraphicsContext *cc, uint8_t *data, int low) b = ((color ) & 0x000F) * 17; palette[i + array_offset] = (uint32_t)cc->alpha[i + array_offset] << 24 | r << 16 | g << 8 | b; } +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS cc->frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } static int cdg_tile_block(CDGraphicsContext *cc, uint8_t *data, int b) diff --git a/arm/android/third_party/ffmpeg/libavcodec/cdtoons.c b/arm/android/third_party/ffmpeg/libavcodec/cdtoons.c index 3ebed226..94c49f0c 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/cdtoons.c +++ b/arm/android/third_party/ffmpeg/libavcodec/cdtoons.c @@ -384,7 +384,11 @@ static int cdtoons_decode_frame(AVCodecContext *avctx, AVFrame *rframe, } /* first palette entry indicates transparency */ c->pal[0] = 0; +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS c->frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } } diff --git a/arm/android/third_party/ffmpeg/libavcodec/cdxl.c b/arm/android/third_party/ffmpeg/libavcodec/cdxl.c index ad2cfd97..085ae97c 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/cdxl.c +++ b/arm/android/third_party/ffmpeg/libavcodec/cdxl.c @@ -305,7 +305,7 @@ static int cdxl_decode_frame(AVCodecContext *avctx, AVFrame *p, if ((ret = ff_get_buffer(avctx, p, 0)) < 0) return ret; p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; if (encoding) { av_fast_padded_malloc(&c->new_video, &c->new_video_size, diff --git a/arm/android/third_party/ffmpeg/libavcodec/cfhd.c b/arm/android/third_party/ffmpeg/libavcodec/cfhd.c index c23eb069..42d7dcc3 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/cfhd.c +++ b/arm/android/third_party/ffmpeg/libavcodec/cfhd.c @@ -1087,8 +1087,8 @@ finish: dst += dst_linesize; } } else { - av_log(avctx, AV_LOG_DEBUG, "interlaced frame ? %d", pic->interlaced_frame); - pic->interlaced_frame = 1; + av_log(avctx, AV_LOG_DEBUG, "interlaced frame ? %d", !!(pic->flags & AV_FRAME_FLAG_INTERLACED)); + pic->flags |= AV_FRAME_FLAG_INTERLACED; low = s->plane[plane].subband[0]; high = s->plane[plane].subband[7]; output = s->plane[plane].l_h[6]; @@ -1284,7 +1284,7 @@ finish: dst += dst_linesize; } } else { - pic->interlaced_frame = 1; + pic->flags |= AV_FRAME_FLAG_INTERLACED; low = s->plane[plane].l_h[7]; high = s->plane[plane].subband[14]; output = s->plane[plane].l_h[6]; diff --git a/arm/android/third_party/ffmpeg/libavcodec/cinepak.c b/arm/android/third_party/ffmpeg/libavcodec/cinepak.c index 282614fd..2ec0ce88 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/cinepak.c +++ b/arm/android/third_party/ffmpeg/libavcodec/cinepak.c @@ -379,7 +379,7 @@ static int cinepak_decode (CinepakContext *s) num_strips = FFMIN(num_strips, MAX_STRIPS); - s->frame->key_frame = 0; + s->frame->flags &= ~AV_FRAME_FLAG_KEY; for (i=0; i < num_strips; i++) { if ((s->data + 12) > eod) @@ -395,7 +395,7 @@ static int cinepak_decode (CinepakContext *s) s->strips[i].x2 = AV_RB16 (&s->data[10]); if (s->strips[i].id == 0x10) - s->frame->key_frame = 1; + s->frame->flags |= AV_FRAME_FLAG_KEY; strip_size = AV_RB24 (&s->data[1]) - 12; if (strip_size < 0) @@ -476,7 +476,14 @@ static int cinepak_decode_frame(AVCodecContext *avctx, AVFrame *rframe, return ret; if (s->palette_video) { - s->frame->palette_has_changed = ff_copy_palette(s->pal, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS + s->frame->palette_has_changed = +#endif + ff_copy_palette(s->pal, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_ENABLE_DEPRECATION_WARNINGS +#endif } if ((ret = cinepak_decode(s)) < 0) { diff --git a/arm/android/third_party/ffmpeg/libavcodec/clearvideo.c b/arm/android/third_party/ffmpeg/libavcodec/clearvideo.c index e77661d1..f84e3e6e 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/clearvideo.c +++ b/arm/android/third_party/ffmpeg/libavcodec/clearvideo.c @@ -511,7 +511,7 @@ static int clv_decode_frame(AVCodecContext *avctx, AVFrame *rframe, if ((ret = ff_reget_buffer(avctx, c->pic, 0)) < 0) return ret; - c->pic->key_frame = 1; + c->pic->flags |= AV_FRAME_FLAG_KEY; c->pic->pict_type = AV_PICTURE_TYPE_I; bytestream2_get_be32(&gb); // frame size; @@ -605,7 +605,7 @@ static int clv_decode_frame(AVCodecContext *avctx, AVFrame *rframe, } extend_edges(c->pic, c->tile_size); - c->pic->key_frame = 0; + c->pic->flags &= ~AV_FRAME_FLAG_KEY; c->pic->pict_type = AV_PICTURE_TYPE_P; } diff --git a/arm/android/third_party/ffmpeg/libavcodec/cljrdec.c b/arm/android/third_party/ffmpeg/libavcodec/cljrdec.c index 914f853c..a4baa015 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/cljrdec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/cljrdec.c @@ -51,7 +51,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, if ((ret = ff_get_buffer(avctx, p, 0)) < 0) return ret; p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; init_get_bits(&gb, buf, buf_size * 8); diff --git a/arm/android/third_party/ffmpeg/libavcodec/cllc.c b/arm/android/third_party/ffmpeg/libavcodec/cllc.c index 911717b6..52cb86e5 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/cllc.c +++ b/arm/android/third_party/ffmpeg/libavcodec/cllc.c @@ -460,7 +460,7 @@ static int cllc_decode_frame(AVCodecContext *avctx, AVFrame *pic, return AVERROR_INVALIDDATA; } - pic->key_frame = 1; + pic->flags |= AV_FRAME_FLAG_KEY; pic->pict_type = AV_PICTURE_TYPE_I; *got_picture_ptr = 1; diff --git a/arm/android/third_party/ffmpeg/libavcodec/codec.h b/arm/android/third_party/ffmpeg/libavcodec/codec.h index 3b1995bc..7a932d75 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/codec.h +++ b/arm/android/third_party/ffmpeg/libavcodec/codec.h @@ -80,6 +80,7 @@ */ #define AV_CODEC_CAP_SMALL_LAST_FRAME (1 << 6) +#if FF_API_SUBFRAMES /** * Codec can output multiple frames per AVPacket * Normally demuxers return one frame at a time, demuxers which do not do @@ -92,6 +93,8 @@ * as a last resort. */ #define AV_CODEC_CAP_SUBFRAMES (1 << 8) +#endif + /** * Codec is experimental and is thus avoided in favor of non experimental * encoders diff --git a/arm/android/third_party/ffmpeg/libavcodec/codec_desc.c b/arm/android/third_party/ffmpeg/libavcodec/codec_desc.c index efdcb59b..49dddd1a 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/codec_desc.c +++ b/arm/android/third_party/ffmpeg/libavcodec/codec_desc.c @@ -38,14 +38,20 @@ static const AVCodecDescriptor codec_descriptors[] = { .type = AVMEDIA_TYPE_VIDEO, .name = "mpeg1video", .long_name = NULL_IF_CONFIG_SMALL("MPEG-1 video"), - .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER, + .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER | + // FIXME this is strigly speaking not true, as MPEG-1 does + // not allow field coding, but our mpeg12 code (decoder and + // parser) can sometimes change codec id at runtime, so + // this is safer + AV_CODEC_PROP_FIELDS, }, { .id = AV_CODEC_ID_MPEG2VIDEO, .type = AVMEDIA_TYPE_VIDEO, .name = "mpeg2video", .long_name = NULL_IF_CONFIG_SMALL("MPEG-2 video"), - .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER, + .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER | + AV_CODEC_PROP_FIELDS, .profiles = NULL_IF_CONFIG_SMALL(ff_mpeg2_video_profiles), }, { @@ -225,7 +231,8 @@ static const AVCodecDescriptor codec_descriptors[] = { .type = AVMEDIA_TYPE_VIDEO, .name = "h264", .long_name = NULL_IF_CONFIG_SMALL("H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10"), - .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_LOSSLESS | AV_CODEC_PROP_REORDER, + .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_LOSSLESS | + AV_CODEC_PROP_REORDER | AV_CODEC_PROP_FIELDS, .profiles = NULL_IF_CONFIG_SMALL(ff_h264_profiles), }, { @@ -529,7 +536,8 @@ static const AVCodecDescriptor codec_descriptors[] = { .type = AVMEDIA_TYPE_VIDEO, .name = "vc1", .long_name = NULL_IF_CONFIG_SMALL("SMPTE VC-1"), - .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER, + .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER | + AV_CODEC_PROP_FIELDS, .profiles = NULL_IF_CONFIG_SMALL(ff_vc1_profiles), }, { @@ -1923,6 +1931,13 @@ static const AVCodecDescriptor codec_descriptors[] = { .long_name = NULL_IF_CONFIG_SMALL("ViewQuest VQC"), .props = AV_CODEC_PROP_LOSSY, }, + { + .id = AV_CODEC_ID_PDV, + .type = AVMEDIA_TYPE_VIDEO, + .name = "pdv", + .long_name = NULL_IF_CONFIG_SMALL("PDV (PlayDate Video)"), + .props = AV_CODEC_PROP_LOSSY, + }, /* various PCM "codecs" */ { diff --git a/arm/android/third_party/ffmpeg/libavcodec/codec_desc.h b/arm/android/third_party/ffmpeg/libavcodec/codec_desc.h index 126b52df..dd449111 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/codec_desc.h +++ b/arm/android/third_party/ffmpeg/libavcodec/codec_desc.h @@ -90,6 +90,12 @@ typedef struct AVCodecDescriptor { * equal. */ #define AV_CODEC_PROP_REORDER (1 << 3) + +/** + * Video codec supports separate coding of fields in interlaced frames. + */ +#define AV_CODEC_PROP_FIELDS (1 << 4) + /** * Subtitle codec is bitmap based * Decoded AVSubtitle data can be read from the AVSubtitleRect->pict field. diff --git a/arm/android/third_party/ffmpeg/libavcodec/codec_id.h b/arm/android/third_party/ffmpeg/libavcodec/codec_id.h index 64df9699..70800ec2 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/codec_id.h +++ b/arm/android/third_party/ffmpeg/libavcodec/codec_id.h @@ -320,6 +320,7 @@ enum AVCodecID { AV_CODEC_ID_WBMP, AV_CODEC_ID_MEDIA100, AV_CODEC_ID_VQC, + AV_CODEC_ID_PDV, /* various PCM "codecs" */ AV_CODEC_ID_FIRST_AUDIO = 0x10000, ///< A dummy id pointing at the start of audio codecs diff --git a/arm/android/third_party/ffmpeg/libavcodec/codec_par.c b/arm/android/third_party/ffmpeg/libavcodec/codec_par.c index abda649a..775c1870 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/codec_par.c +++ b/arm/android/third_party/ffmpeg/libavcodec/codec_par.c @@ -46,6 +46,7 @@ static void codec_parameters_reset(AVCodecParameters *par) par->color_space = AVCOL_SPC_UNSPECIFIED; par->chroma_location = AVCHROMA_LOC_UNSPECIFIED; par->sample_aspect_ratio = (AVRational){ 0, 1 }; + par->framerate = (AVRational){ 0, 1 }; par->profile = FF_PROFILE_UNKNOWN; par->level = FF_LEVEL_UNKNOWN; } @@ -126,6 +127,7 @@ int avcodec_parameters_from_context(AVCodecParameters *par, par->chroma_location = codec->chroma_sample_location; par->sample_aspect_ratio = codec->sample_aspect_ratio; par->video_delay = codec->has_b_frames; + par->framerate = codec->framerate; break; case AVMEDIA_TYPE_AUDIO: par->format = codec->sample_fmt; @@ -207,6 +209,7 @@ int avcodec_parameters_to_context(AVCodecContext *codec, codec->chroma_sample_location = par->chroma_location; codec->sample_aspect_ratio = par->sample_aspect_ratio; codec->has_b_frames = par->video_delay; + codec->framerate = par->framerate; break; case AVMEDIA_TYPE_AUDIO: codec->sample_fmt = par->format; diff --git a/arm/android/third_party/ffmpeg/libavcodec/codec_par.h b/arm/android/third_party/ffmpeg/libavcodec/codec_par.h index f51d27c5..add90fdb 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/codec_par.h +++ b/arm/android/third_party/ffmpeg/libavcodec/codec_par.h @@ -211,6 +211,18 @@ typedef struct AVCodecParameters { * Audio only. The channel layout and number of channels. */ AVChannelLayout ch_layout; + + /** + * Video only. Number of frames per second, for streams with constant frame + * durations. Should be set to { 0, 1 } when some frames have differing + * durations or if the value is not known. + * + * @note This field correponds to values that are stored in codec-level + * headers and is typically overridden by container/transport-layer + * timestamps, when available. It should thus be used only as a last resort, + * when no higher-level timing information is available. + */ + AVRational framerate; } AVCodecParameters; /** diff --git a/arm/android/third_party/ffmpeg/libavcodec/cpia.c b/arm/android/third_party/ffmpeg/libavcodec/cpia.c index bfd270da..f62100c4 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/cpia.c +++ b/arm/android/third_party/ffmpeg/libavcodec/cpia.c @@ -94,10 +94,10 @@ static int cpia_decode_frame(AVCodecContext *avctx, AVFrame *rframe, if (header[28] == NOT_COMPRESSED) { frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; } else { frame->pict_type = AV_PICTURE_TYPE_P; - frame->key_frame = 0; + frame->flags &= ~AV_FRAME_FLAG_KEY; } // Get buffer filled with previous frame diff --git a/arm/android/third_party/ffmpeg/libavcodec/cri.c b/arm/android/third_party/ffmpeg/libavcodec/cri.c index 5761152c..0380a0c6 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/cri.c +++ b/arm/android/third_party/ffmpeg/libavcodec/cri.c @@ -408,7 +408,7 @@ skip: } p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; *got_frame = 1; diff --git a/arm/android/third_party/ffmpeg/libavcodec/crystalhd.c b/arm/android/third_party/ffmpeg/libavcodec/crystalhd.c index a48d60f1..86f6cfa6 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/crystalhd.c +++ b/arm/android/third_party/ffmpeg/libavcodec/crystalhd.c @@ -543,9 +543,9 @@ static inline CopyRet copy_frame(AVCodecContext *avctx, av_image_copy_plane(dst, dStride, src, sStride, bwidth, height); } - frame->interlaced_frame = interlaced; + frame->flags |= AV_FRAME_FLAG_INTERLACED * !!interlaced; if (interlaced) - frame->top_field_first = !bottom_first; + frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST * !bottom_first; frame->pts = pkt_pts; diff --git a/arm/android/third_party/ffmpeg/libavcodec/cscd.c b/arm/android/third_party/ffmpeg/libavcodec/cscd.c index b4ed3332..23dd2df9 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/cscd.c +++ b/arm/android/third_party/ffmpeg/libavcodec/cscd.c @@ -110,12 +110,12 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, // flip upside down, add difference frame if (buf[0] & 1) { // keyframe c->pic->pict_type = AV_PICTURE_TYPE_I; - c->pic->key_frame = 1; + c->pic->flags |= AV_FRAME_FLAG_KEY; copy_frame_default(c->pic, c->decomp_buf, c->linelen, c->height); } else { c->pic->pict_type = AV_PICTURE_TYPE_P; - c->pic->key_frame = 0; + c->pic->flags &= ~AV_FRAME_FLAG_KEY; add_frame_default(c->pic, c->decomp_buf, c->linelen, c->height); } diff --git a/arm/android/third_party/ffmpeg/libavcodec/cuviddec.c b/arm/android/third_party/ffmpeg/libavcodec/cuviddec.c index 76e70aa6..3d43bbd4 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/cuviddec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/cuviddec.c @@ -599,7 +599,10 @@ static int cuvid_output_frame(AVCodecContext *avctx, AVFrame *frame) goto error; } - frame->key_frame = ctx->key_frame[parsed_frame.dispinfo.picture_index]; + if (ctx->key_frame[parsed_frame.dispinfo.picture_index]) + frame->flags |= AV_FRAME_FLAG_KEY; + else + frame->flags &= ~AV_FRAME_FLAG_KEY; ctx->key_frame[parsed_frame.dispinfo.picture_index] = 0; frame->width = avctx->width; @@ -631,10 +634,11 @@ FF_DISABLE_DEPRECATION_WARNINGS FF_ENABLE_DEPRECATION_WARNINGS #endif - frame->interlaced_frame = !parsed_frame.is_deinterlacing && !parsed_frame.dispinfo.progressive_frame; + if (!parsed_frame.is_deinterlacing && !parsed_frame.dispinfo.progressive_frame) + frame->flags |= AV_FRAME_FLAG_INTERLACED; - if (frame->interlaced_frame) - frame->top_field_first = parsed_frame.dispinfo.top_field_first; + if ((frame->flags & AV_FRAME_FLAG_INTERLACED) && parsed_frame.dispinfo.top_field_first) + frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST; } else if (ctx->decoder_flushing) { ret = AVERROR_EOF; } else { diff --git a/arm/android/third_party/ffmpeg/libavcodec/dds.c b/arm/android/third_party/ffmpeg/libavcodec/dds.c index 4bb425db..31a327a5 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/dds.c +++ b/arm/android/third_party/ffmpeg/libavcodec/dds.c @@ -651,7 +651,11 @@ static int dds_decode(AVCodecContext *avctx, AVFrame *frame, ((unsigned)frame->data[1][3+i*4]<<24) ); } +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif if (bytestream2_get_bytes_left(gbc) < frame->height * frame->width / 2) { av_log(avctx, AV_LOG_ERROR, "Buffer is too small (%d < %d).\n", @@ -682,7 +686,11 @@ static int dds_decode(AVCodecContext *avctx, AVFrame *frame, ((unsigned)frame->data[1][3+i*4]<<24) ); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } if (bytestream2_get_bytes_left(gbc) < frame->height * linesize) { @@ -702,7 +710,7 @@ static int dds_decode(AVCodecContext *avctx, AVFrame *frame, /* Frame is ready to be output. */ frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; *got_frame = 1; return avpkt->size; diff --git a/arm/android/third_party/ffmpeg/libavcodec/decode.c b/arm/android/third_party/ffmpeg/libavcodec/decode.c index 40f5a3ba..360837a0 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/decode.c +++ b/arm/android/third_party/ffmpeg/libavcodec/decode.c @@ -423,13 +423,6 @@ FF_ENABLE_DEPRECATION_WARNINGS } } - if (avctx->codec->type == AVMEDIA_TYPE_AUDIO && - !avci->showed_multi_packet_warning && - ret >= 0 && ret != pkt->size && !(avctx->codec->capabilities & AV_CODEC_CAP_SUBFRAMES)) { - av_log(avctx, AV_LOG_WARNING, "Multiple frames in a packet.\n"); - avci->showed_multi_packet_warning = 1; - } - if (!got_frame) av_frame_unref(frame); @@ -570,6 +563,19 @@ static int decode_receive_frame_internal(AVCodecContext *avctx, AVFrame *frame) } if (!ret) { + if (avctx->codec_type != AVMEDIA_TYPE_VIDEO) + frame->flags |= AV_FRAME_FLAG_KEY; +#if FF_API_FRAME_KEY +FF_DISABLE_DEPRECATION_WARNINGS + frame->key_frame = !!(frame->flags & AV_FRAME_FLAG_KEY); +FF_ENABLE_DEPRECATION_WARNINGS +#endif +#if FF_API_INTERLACED_FRAME +FF_DISABLE_DEPRECATION_WARNINGS + frame->interlaced_frame = !!(frame->flags & AV_FRAME_FLAG_INTERLACED); + frame->top_field_first = !!(frame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST); +FF_ENABLE_DEPRECATION_WARNINGS +#endif frame->best_effort_timestamp = guess_correct_pts(avctx, frame->pts, frame->pkt_dts); diff --git a/arm/android/third_party/ffmpeg/libavcodec/dfa.c b/arm/android/third_party/ffmpeg/libavcodec/dfa.c index 114c803f..9114feb0 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/dfa.c +++ b/arm/android/third_party/ffmpeg/libavcodec/dfa.c @@ -367,7 +367,11 @@ static int dfa_decode_frame(AVCodecContext *avctx, AVFrame *frame, s->pal[i] = bytestream2_get_be24(&gb) << 2; s->pal[i] |= 0xFFU << 24 | (s->pal[i] >> 6) & 0x30303; } +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } else if (chunk_type <= 9) { if (decoder[chunk_type - 2](&gb, s->frame_buf, avctx->width, avctx->height)) { av_log(avctx, AV_LOG_ERROR, "Error decoding %s chunk\n", diff --git a/arm/android/third_party/ffmpeg/libavcodec/diracdec.c b/arm/android/third_party/ffmpeg/libavcodec/diracdec.c index 0ae582be..277c730c 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/diracdec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/diracdec.c @@ -2230,7 +2230,10 @@ static int dirac_decode_data_unit(AVCodecContext *avctx, const uint8_t *buf, int s->hq_picture = (parse_code & 0xF8) == 0xE8; /* [DIRAC_STD] is_hq_picture() */ s->dc_prediction = (parse_code & 0x28) == 0x08; /* [DIRAC_STD] using_dc_prediction() */ pic->reference = (parse_code & 0x0C) == 0x0C; /* [DIRAC_STD] is_reference() */ - pic->avframe->key_frame = s->num_refs == 0; /* [DIRAC_STD] is_intra() */ + if (s->num_refs == 0) /* [DIRAC_STD] is_intra() */ + pic->avframe->flags |= AV_FRAME_FLAG_KEY; + else + pic->avframe->flags &= ~AV_FRAME_FLAG_KEY; pic->avframe->pict_type = s->num_refs + 1; /* Definition of AVPictureType in avutil.h */ /* VC-2 Low Delay has a different parse code than the Dirac Low Delay */ diff --git a/arm/android/third_party/ffmpeg/libavcodec/dnxhddec.c b/arm/android/third_party/ffmpeg/libavcodec/dnxhddec.c index d91a6bf1..84bd0e61 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/dnxhddec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/dnxhddec.c @@ -195,8 +195,9 @@ static int dnxhd_decode_header(DNXHDContext *ctx, AVFrame *frame, } if (buf[5] & 2) { /* interlaced */ ctx->cur_field = first_field ? buf[5] & 1 : !ctx->cur_field; - frame->interlaced_frame = 1; - frame->top_field_first = first_field ^ ctx->cur_field; + frame->flags |= AV_FRAME_FLAG_INTERLACED; + if (first_field ^ ctx->cur_field) + frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST; av_log(ctx->avctx, AV_LOG_DEBUG, "interlaced %d, cur field %d\n", buf[5] & 3, ctx->cur_field); } else { @@ -298,7 +299,7 @@ static int dnxhd_decode_header(DNXHDContext *ctx, AVFrame *frame, ctx->mb_width = (ctx->width + 15)>> 4; ctx->mb_height = AV_RB16(buf + 0x16c); - if ((ctx->height + 15) >> 4 == ctx->mb_height && frame->interlaced_frame) + if ((ctx->height + 15) >> 4 == ctx->mb_height && (frame->flags & AV_FRAME_FLAG_INTERLACED)) ctx->height <<= 1; av_log(ctx->avctx, AV_LOG_VERBOSE, "%dx%d, 4:%s %d bits, MBAFF=%d ACT=%d\n", @@ -316,7 +317,7 @@ static int dnxhd_decode_header(DNXHDContext *ctx, AVFrame *frame, } ctx->data_offset = 0x280; } - if ((ctx->mb_height << frame->interlaced_frame) > (ctx->height + 15) >> 4) { + if ((ctx->mb_height << !!(frame->flags & AV_FRAME_FLAG_INTERLACED)) > (ctx->height + 15) >> 4) { av_log(ctx->avctx, AV_LOG_ERROR, "mb height too big: %d\n", ctx->mb_height); return AVERROR_INVALIDDATA; @@ -530,7 +531,7 @@ static int dnxhd_decode_macroblock(const DNXHDContext *ctx, RowContext *row, return AVERROR_INVALIDDATA; } - if (frame->interlaced_frame) { + if (frame->flags & AV_FRAME_FLAG_INTERLACED) { dct_linesize_luma <<= 1; dct_linesize_chroma <<= 1; } @@ -539,7 +540,7 @@ static int dnxhd_decode_macroblock(const DNXHDContext *ctx, RowContext *row, dest_u = frame->data[1] + ((y * dct_linesize_chroma) << 4) + (x << (3 + shift1 + ctx->is_444)); dest_v = frame->data[2] + ((y * dct_linesize_chroma) << 4) + (x << (3 + shift1 + ctx->is_444)); - if (frame->interlaced_frame && ctx->cur_field) { + if ((frame->flags & AV_FRAME_FLAG_INTERLACED) && ctx->cur_field) { dest_y += frame->linesize[0]; dest_u += frame->linesize[1]; dest_v += frame->linesize[2]; @@ -652,14 +653,14 @@ decode_coding_unit: if ((ret = ff_thread_get_buffer(avctx, picture, 0)) < 0) return ret; picture->pict_type = AV_PICTURE_TYPE_I; - picture->key_frame = 1; + picture->flags |= AV_FRAME_FLAG_KEY; } ctx->buf_size = buf_size - ctx->data_offset; ctx->buf = buf + ctx->data_offset; avctx->execute2(avctx, dnxhd_decode_row, picture, NULL, ctx->mb_height); - if (first_field && picture->interlaced_frame) { + if (first_field && (picture->flags & AV_FRAME_FLAG_INTERLACED)) { buf += ctx->cid_table->coding_unit_size; buf_size -= ctx->cid_table->coding_unit_size; first_field = 0; diff --git a/arm/android/third_party/ffmpeg/libavcodec/dnxhdenc.c b/arm/android/third_party/ffmpeg/libavcodec/dnxhdenc.c index 176bf972..a1852fa6 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/dnxhdenc.c +++ b/arm/android/third_party/ffmpeg/libavcodec/dnxhdenc.c @@ -1251,7 +1251,8 @@ static void dnxhd_load_picture(DNXHDEncContext *ctx, const AVFrame *frame) ctx->thread[i]->dct_uv_offset = ctx->m.uvlinesize*8; } - ctx->cur_field = frame->interlaced_frame && !frame->top_field_first; + ctx->cur_field = (frame->flags & AV_FRAME_FLAG_INTERLACED) && + !(frame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST); } static int dnxhd_encode_picture(AVCodecContext *avctx, AVPacket *pkt, diff --git a/arm/android/third_party/ffmpeg/libavcodec/dpcm.c b/arm/android/third_party/ffmpeg/libavcodec/dpcm.c index 6ea9e2c0..eff65874 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/dpcm.c +++ b/arm/android/third_party/ffmpeg/libavcodec/dpcm.c @@ -444,7 +444,7 @@ static int dpcm_decode_frame(AVCodecContext *avctx, AVFrame *frame, if (n & 0x80) s->sample[idx] = sign_extend((n & 0x7f) << 9, 16); else - s->sample[idx] += s->scale * wady_table[n & 0x7f]; + s->sample[idx] += s->scale * (unsigned)wady_table[n & 0x7f]; *output_samples++ = av_clip_int16(s->sample[idx]); idx ^= stereo; } diff --git a/arm/android/third_party/ffmpeg/libavcodec/dpx.c b/arm/android/third_party/ffmpeg/libavcodec/dpx.c index 4f506084..31e4a3f8 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/dpx.c +++ b/arm/android/third_party/ffmpeg/libavcodec/dpx.c @@ -476,14 +476,31 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, avctx->colorspace = AVCOL_SPC_RGB; } + av_strlcpy(creator, avpkt->data + 160, 100); + creator[100] = '\0'; + av_dict_set(&p->metadata, "Creator", creator, 0); + + av_strlcpy(input_device, avpkt->data + 1556, 32); + input_device[32] = '\0'; + av_dict_set(&p->metadata, "Input Device", input_device, 0); + + // Some devices do not pad 10bit samples to whole 32bit words per row + if (!memcmp(input_device, "Scanity", 7) || + !memcmp(creator, "Lasergraphics Inc.", 18)) { + if (bits_per_color == 10) + unpadded_10bit = 1; + } + // Table 3c: Runs will always break at scan line boundaries. Packing // will always break to the next 32-bit word at scan-line boundaries. // Unfortunately, the encoder produced invalid files, so attempt // to detect it + // Also handle special case with unpadded content need_align = FFALIGN(stride, 4); - if (need_align*avctx->height + (int64_t)offset > avpkt->size) { + if (need_align*avctx->height + (int64_t)offset > avpkt->size && + (!unpadded_10bit || (avctx->width * avctx->height * elements + 2) / 3 * 4 + (int64_t)offset > avpkt->size)) { // Alignment seems unappliable, try without - if (stride*avctx->height + (int64_t)offset > avpkt->size) { + if (stride*avctx->height + (int64_t)offset > avpkt->size || unpadded_10bit) { av_log(avctx, AV_LOG_ERROR, "Overread buffer. Invalid header?\n"); return AVERROR_INVALIDDATA; } else { @@ -609,20 +626,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, if ((ret = ff_get_buffer(avctx, p, 0)) < 0) return ret; - av_strlcpy(creator, avpkt->data + 160, 100); - creator[100] = '\0'; - av_dict_set(&p->metadata, "Creator", creator, 0); - - av_strlcpy(input_device, avpkt->data + 1556, 32); - input_device[32] = '\0'; - av_dict_set(&p->metadata, "Input Device", input_device, 0); - - // Some devices do not pad 10bit samples to whole 32bit words per row - if (!memcmp(input_device, "Scanity", 7) || - !memcmp(creator, "Lasergraphics Inc.", 18)) { - unpadded_10bit = 1; - } - // Move pointer to offset from start of file buf = avpkt->data + offset; diff --git a/arm/android/third_party/ffmpeg/libavcodec/dsicinvideo.c b/arm/android/third_party/ffmpeg/libavcodec/dsicinvideo.c index 222044d1..000d79e1 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/dsicinvideo.c +++ b/arm/android/third_party/ffmpeg/libavcodec/dsicinvideo.c @@ -293,7 +293,11 @@ static int cinvideo_decode_frame(AVCodecContext *avctx, AVFrame *rframe, return res; memcpy(cin->frame->data[1], cin->palette, sizeof(cin->palette)); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS cin->frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif for (y = 0; y < cin->avctx->height; ++y) memcpy(cin->frame->data[0] + (cin->avctx->height - 1 - y) * cin->frame->linesize[0], cin->bitmap_table[CIN_CUR_BMP] + y * cin->avctx->width, diff --git a/arm/android/third_party/ffmpeg/libavcodec/dv.h b/arm/android/third_party/ffmpeg/libavcodec/dv.h index 29f97b60..abff9f1e 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/dv.h +++ b/arm/android/third_party/ffmpeg/libavcodec/dv.h @@ -60,6 +60,12 @@ enum DVPackType { */ #define DV_MAX_FRAME_SIZE 576000 +// LCM of video framerate numerators +#define DV_TIMESCALE_VIDEO 60000 + +// LCM of audio sample rates +#define DV_TIMESCALE_AUDIO 14112000 + /** * maximum number of blocks per macroblock in any DV format */ diff --git a/arm/android/third_party/ffmpeg/libavcodec/dvdec.c b/arm/android/third_party/ffmpeg/libavcodec/dvdec.c index afc4bb0b..750e25a4 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/dvdec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/dvdec.c @@ -646,7 +646,7 @@ static int dvvideo_decode_frame(AVCodecContext *avctx, AVFrame *frame, } s->frame = frame; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_I; avctx->pix_fmt = s->sys->pix_fmt; avctx->framerate = av_inv_q(s->sys->time_base); @@ -670,14 +670,14 @@ static int dvvideo_decode_frame(AVCodecContext *avctx, AVFrame *frame, /* Determine the codec's field order from the packet */ if ( *vsc_pack == DV_VIDEO_CONTROL ) { if (avctx->height == 720) { - frame->interlaced_frame = 0; - frame->top_field_first = 0; + frame->flags &= ~AV_FRAME_FLAG_INTERLACED; + frame->flags &= ~AV_FRAME_FLAG_TOP_FIELD_FIRST; } else if (avctx->height == 1080) { - frame->interlaced_frame = 1; - frame->top_field_first = (vsc_pack[3] & 0x40) == 0x40; + frame->flags |= AV_FRAME_FLAG_INTERLACED; + frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST * ((vsc_pack[3] & 0x40) == 0x40); } else { - frame->interlaced_frame = (vsc_pack[3] & 0x10) == 0x10; - frame->top_field_first = !(vsc_pack[3] & 0x40); + frame->flags |= AV_FRAME_FLAG_INTERLACED * ((vsc_pack[3] & 0x10) == 0x10); + frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST * !(vsc_pack[3] & 0x40); } } diff --git a/arm/android/third_party/ffmpeg/libavcodec/dvenc.c b/arm/android/third_party/ffmpeg/libavcodec/dvenc.c index 11dd5763..7bd50174 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/dvenc.c +++ b/arm/android/third_party/ffmpeg/libavcodec/dvenc.c @@ -104,7 +104,9 @@ static av_cold int dvvideo_encode_init(AVCodecContext *avctx) ff_fdctdsp_init(&fdsp, avctx); ff_me_cmp_init(&mecc, avctx); ff_pixblockdsp_init(&pdsp, avctx); - ff_set_cmp(&mecc, mecc.ildct_cmp, avctx->ildct_cmp); + ret = ff_set_cmp(&mecc, mecc.ildct_cmp, avctx->ildct_cmp); + if (ret < 0) + return AVERROR(EINVAL); s->get_pixels = pdsp.get_pixels; s->ildct_cmp = mecc.ildct_cmp[5]; @@ -1046,9 +1048,9 @@ static inline int dv_write_pack(enum DVPackType pack_id, DVEncContext *c, int fs; if (c->avctx->height >= 720) - fs = c->avctx->height == 720 || c->frame->top_field_first ? 0x40 : 0x00; + fs = c->avctx->height == 720 || (c->frame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST) ? 0x40 : 0x00; else - fs = c->frame->top_field_first ? 0x00 : 0x40; + fs = (c->frame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST) ? 0x00 : 0x40; if (DV_PROFILE_IS_HD(c->sys) || (int)(av_q2d(c->avctx->sample_aspect_ratio) * diff --git a/arm/android/third_party/ffmpeg/libavcodec/dxa.c b/arm/android/third_party/ffmpeg/libavcodec/dxa.c index 8d2d2d77..d903b7ec 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/dxa.c +++ b/arm/android/third_party/ffmpeg/libavcodec/dxa.c @@ -230,7 +230,11 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, if ((ret = ff_get_buffer(avctx, frame, AV_GET_BUFFER_FLAG_REF)) < 0) return ret; memcpy(frame->data[1], c->pal, AVPALETTE_SIZE); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = pc; +FF_ENABLE_DEPRECATION_WARNINGS +#endif outptr = frame->data[0]; srcptr = c->decomp_buf; @@ -258,19 +262,19 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, switch(compr){ case -1: - frame->key_frame = 0; + frame->flags &= ~AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_P; if (c->prev->data[0]) memcpy(frame->data[0], c->prev->data[0], frame->linesize[0] * avctx->height); else{ // Should happen only when first frame is 'NULL' memset(frame->data[0], 0, frame->linesize[0] * avctx->height); - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_I; } break; case 2: case 4: - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_I; for (j = 0; j < avctx->height; j++) { memcpy(outptr, srcptr, avctx->width); @@ -285,7 +289,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, if (!(avctx->flags2 & AV_CODEC_FLAG2_SHOW_ALL)) return AVERROR_INVALIDDATA; } - frame->key_frame = 0; + frame->flags &= ~AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_P; for (j = 0; j < avctx->height; j++) { if(tmpptr){ @@ -300,7 +304,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, break; case 12: // ScummVM coding case 13: - frame->key_frame = 0; + frame->flags &= ~AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_P; if (!c->prev->data[0]) { av_log(avctx, AV_LOG_ERROR, "Missing reference frame\n"); diff --git a/arm/android/third_party/ffmpeg/libavcodec/dxtory.c b/arm/android/third_party/ffmpeg/libavcodec/dxtory.c index e13d2748..f36420cd 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/dxtory.c +++ b/arm/android/third_party/ffmpeg/libavcodec/dxtory.c @@ -864,7 +864,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *pic, return ret; pic->pict_type = AV_PICTURE_TYPE_I; - pic->key_frame = 1; + pic->flags |= AV_FRAME_FLAG_KEY; *got_frame = 1; return avpkt->size; diff --git a/arm/android/third_party/ffmpeg/libavcodec/dxv.c b/arm/android/third_party/ffmpeg/libavcodec/dxv.c index 7c848742..5923811b 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/dxv.c +++ b/arm/android/third_party/ffmpeg/libavcodec/dxv.c @@ -1220,7 +1220,7 @@ static int dxv_decode(AVCodecContext *avctx, AVFrame *frame, /* Frame is ready to be output. */ frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; *got_frame = 1; return avpkt->size; diff --git a/arm/android/third_party/ffmpeg/libavcodec/eacmv.c b/arm/android/third_party/ffmpeg/libavcodec/eacmv.c index 18f27dfd..e73e310c 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/eacmv.c +++ b/arm/android/third_party/ffmpeg/libavcodec/eacmv.c @@ -202,10 +202,10 @@ static int cmv_decode_frame(AVCodecContext *avctx, AVFrame *frame, buf += EA_PREAMBLE_SIZE; if ((buf[0]&1)) { // subtype cmv_decode_inter(s, frame, buf+2, buf_end); - frame->key_frame = 0; + frame->flags &= ~AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_P; }else{ - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_I; cmv_decode_intra(s, frame, buf+2, buf_end); } diff --git a/arm/android/third_party/ffmpeg/libavcodec/eatgq.c b/arm/android/third_party/ffmpeg/libavcodec/eatgq.c index 01e1acd4..0f0ed358 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/eatgq.c +++ b/arm/android/third_party/ffmpeg/libavcodec/eatgq.c @@ -237,7 +237,7 @@ static int tgq_decode_frame(AVCodecContext *avctx, AVFrame *frame, if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) return ret; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_I; for (y = 0; y < FFALIGN(avctx->height, 16) >> 4; y++) diff --git a/arm/android/third_party/ffmpeg/libavcodec/eatgv.c b/arm/android/third_party/ffmpeg/libavcodec/eatgv.c index 29f7ee12..a2aead46 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/eatgv.c +++ b/arm/android/third_party/ffmpeg/libavcodec/eatgv.c @@ -310,7 +310,7 @@ static int tgv_decode_frame(AVCodecContext *avctx, AVFrame *frame, if (chunk_type == kVGT_TAG) { int y; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_I; if (!s->frame_buffer && @@ -330,7 +330,7 @@ static int tgv_decode_frame(AVCodecContext *avctx, AVFrame *frame, av_log(avctx, AV_LOG_WARNING, "inter frame without corresponding intra frame\n"); return buf_size; } - frame->key_frame = 0; + frame->flags &= ~AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_P; if (tgv_decode_inter(s, frame, buf, buf_end) < 0) { av_log(avctx, AV_LOG_WARNING, "truncated inter frame\n"); diff --git a/arm/android/third_party/ffmpeg/libavcodec/elbg.c b/arm/android/third_party/ffmpeg/libavcodec/elbg.c index d97a7bc3..7a6a84fb 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/elbg.c +++ b/arm/android/third_party/ffmpeg/libavcodec/elbg.c @@ -44,13 +44,13 @@ typedef struct cell_s { * ELBG internal data */ typedef struct ELBGContext { - int64_t error; + int error; int dim; int num_cb; int *codebook; cell **cells; - int64_t *utility; - int64_t *utility_inc; + int *utility; + int *utility_inc; int *nearest_cb; int *points; int *temp_points; @@ -75,9 +75,12 @@ static inline int distance_limited(int *a, int *b, int dim, int limit) { int i, dist=0; for (i=0; i limit) - return INT_MAX; + int64_t distance = a[i] - b[i]; + + distance *= distance; + if (dist >= limit - distance) + return limit; + dist += distance; } return dist; @@ -97,8 +100,12 @@ static inline void vect_division(int *res, int *vect, int div, int dim) static int eval_error_cell(ELBGContext *elbg, int *centroid, cell *cells) { int error=0; - for (; cells; cells=cells->next) - error += distance_limited(centroid, elbg->points + cells->index*elbg->dim, elbg->dim, INT_MAX); + for (; cells; cells=cells->next) { + int distance = distance_limited(centroid, elbg->points + cells->index*elbg->dim, elbg->dim, INT_MAX); + if (error >= INT_MAX - distance) + return INT_MAX; + error += distance; + } return error; } @@ -178,10 +185,13 @@ static int simple_lbg(ELBGContext *elbg, int dist[2] = {distance_limited(centroid[0], points + tempcell->index*dim, dim, INT_MAX), distance_limited(centroid[1], points + tempcell->index*dim, dim, INT_MAX)}; int idx = dist[0] > dist[1]; - newutility[idx] += dist[idx]; + if (newutility[idx] >= INT_MAX - dist[idx]) + newutility[idx] = INT_MAX; + else + newutility[idx] += dist[idx]; } - return newutility[0] + newutility[1]; + return (newutility[0] >= INT_MAX - newutility[1]) ? INT_MAX : newutility[0] + newutility[1]; } static void get_new_centroids(ELBGContext *elbg, int huc, int *newcentroid_i, @@ -253,9 +263,9 @@ static void evaluate_utility_inc(ELBGContext *elbg) int64_t inc=0; for (int i = 0; i < elbg->num_cb; i++) { - if (elbg->num_cb * elbg->utility[i] > elbg->error) + if (elbg->num_cb * (int64_t)elbg->utility[i] > elbg->error) inc += elbg->utility[i]; - elbg->utility_inc[i] = inc; + elbg->utility_inc[i] = FFMIN(inc, INT_MAX); } } @@ -278,7 +288,7 @@ static void update_utility_and_n_cb(ELBGContext *elbg, int idx, int newutility) */ static void try_shift_candidate(ELBGContext *elbg, int idx[3]) { - int j, k, cont=0; + int j, k, cont=0, tmp; int64_t olderror=0, newerror; int newutility[3]; int *newcentroid[3] = { @@ -305,12 +315,17 @@ static void try_shift_candidate(ELBGContext *elbg, int idx[3]) get_new_centroids(elbg, idx[1], newcentroid[0], newcentroid[1]); newutility[2] = eval_error_cell(elbg, newcentroid[2], elbg->cells[idx[0]]); - newutility[2] += eval_error_cell(elbg, newcentroid[2], elbg->cells[idx[2]]); + tmp = eval_error_cell(elbg, newcentroid[2], elbg->cells[idx[2]]); + newutility[2] = (tmp >= INT_MAX - newutility[2]) ? INT_MAX : newutility[2] + tmp; newerror = newutility[2]; - newerror += simple_lbg(elbg, elbg->dim, newcentroid, newutility, elbg->points, + tmp = simple_lbg(elbg, elbg->dim, newcentroid, newutility, elbg->points, elbg->cells[idx[1]]); + if (tmp >= INT_MAX - newerror) + newerror = INT_MAX; + else + newerror += tmp; if (olderror > newerror) { shift_codebook(elbg, idx, newcentroid); @@ -334,7 +349,7 @@ static void do_shiftings(ELBGContext *elbg) evaluate_utility_inc(elbg); for (idx[0]=0; idx[0] < elbg->num_cb; idx[0]++) - if (elbg->num_cb * elbg->utility[idx[0]] < elbg->error) { + if (elbg->num_cb * (int64_t)elbg->utility[idx[0]] < elbg->error) { if (elbg->utility_inc[elbg->num_cb - 1] == 0) return; @@ -352,9 +367,9 @@ static void do_elbg(ELBGContext *av_restrict elbg, int *points, int numpoints, int *const size_part = elbg->size_part; int i, j, steps = 0; int best_idx = 0; - int64_t last_error; + int last_error; - elbg->error = INT64_MAX; + elbg->error = INT_MAX; elbg->points = points; do { @@ -382,8 +397,9 @@ static void do_elbg(ELBGContext *av_restrict elbg, int *points, int numpoints, } } elbg->nearest_cb[i] = best_idx; - elbg->error += best_dist; - elbg->utility[elbg->nearest_cb[i]] += best_dist; + elbg->error = (elbg->error >= INT_MAX - best_dist) ? INT_MAX : elbg->error + best_dist; + elbg->utility[elbg->nearest_cb[i]] = (elbg->utility[elbg->nearest_cb[i]] >= INT_MAX - best_dist) ? + INT_MAX : elbg->utility[elbg->nearest_cb[i]] + best_dist; free_cells->index = i; free_cells->next = elbg->cells[elbg->nearest_cb[i]]; elbg->cells[elbg->nearest_cb[i]] = free_cells; diff --git a/arm/android/third_party/ffmpeg/libavcodec/encode.c b/arm/android/third_party/ffmpeg/libavcodec/encode.c index 041fc767..ab5f8896 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/encode.c +++ b/arm/android/third_party/ffmpeg/libavcodec/encode.c @@ -192,6 +192,21 @@ int ff_encode_get_frame(AVCodecContext *avctx, AVFrame *frame) av_frame_move_ref(frame, avci->buffer_frame); +#if FF_API_FRAME_KEY +FF_DISABLE_DEPRECATION_WARNINGS + if (frame->key_frame) + frame->flags |= AV_FRAME_FLAG_KEY; +FF_ENABLE_DEPRECATION_WARNINGS +#endif +#if FF_API_INTERLACED_FRAME +FF_DISABLE_DEPRECATION_WARNINGS + if (frame->interlaced_frame) + frame->flags |= AV_FRAME_FLAG_INTERLACED; + if (frame->top_field_first) + frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST; +FF_ENABLE_DEPRECATION_WARNINGS +#endif + return 0; } @@ -457,13 +472,6 @@ static int encode_send_frame_internal(AVCodecContext *avctx, const AVFrame *src) finish: -#if FF_API_PKT_DURATION -FF_DISABLE_DEPRECATION_WARNINGS - if (dst->pkt_duration && dst->pkt_duration != dst->duration) - dst->duration = dst->pkt_duration; -FF_ENABLE_DEPRECATION_WARNINGS -#endif - if (avctx->codec->type == AVMEDIA_TYPE_VIDEO) { ret = encode_generate_icc_profile(avctx, dst); if (ret < 0) @@ -574,6 +582,8 @@ static int encode_preinit_video(AVCodecContext *avctx) return AVERROR(EINVAL); } +#if FF_API_TICKS_PER_FRAME +FF_DISABLE_DEPRECATION_WARNINGS if (avctx->ticks_per_frame && avctx->time_base.num && avctx->ticks_per_frame > INT_MAX / avctx->time_base.num) { av_log(avctx, AV_LOG_ERROR, @@ -583,6 +593,8 @@ static int encode_preinit_video(AVCodecContext *avctx) avctx->time_base.den); return AVERROR(EINVAL); } +FF_ENABLE_DEPRECATION_WARNINGS +#endif if (avctx->hw_frames_ctx) { AVHWFramesContext *frames_ctx = (AVHWFramesContext*)avctx->hw_frames_ctx->data; diff --git a/arm/android/third_party/ffmpeg/libavcodec/error_resilience.c b/arm/android/third_party/ffmpeg/libavcodec/error_resilience.c index bd705006..2aa6f1d8 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/error_resilience.c +++ b/arm/android/third_party/ffmpeg/libavcodec/error_resilience.c @@ -805,7 +805,8 @@ void ff_er_frame_start(ERContext *s) static int er_supported(ERContext *s) { if(s->avctx->hwaccel && s->avctx->hwaccel->decode_slice || - !s->cur_pic.f + !s->cur_pic.f || + s->cur_pic.field_picture ) return 0; return 1; @@ -907,12 +908,6 @@ void ff_er_frame_end(ERContext *s) (s->avctx->skip_top + s->avctx->skip_bottom)) { return; } - - if (!s->warned_fields && (s->cur_pic.field_picture || s->cur_pic.f->interlaced_frame)) { - av_log(s->avctx, AV_LOG_WARNING, "Error concealment is not fully implemented for field pictures.\n"); - s->warned_fields = 1; - } - linesize = s->cur_pic.f->linesize; if ( s->avctx->codec_id == AV_CODEC_ID_MPEG2VIDEO diff --git a/arm/android/third_party/ffmpeg/libavcodec/error_resilience.h b/arm/android/third_party/ffmpeg/libavcodec/error_resilience.h index 55efacac..47cc8a4f 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/error_resilience.h +++ b/arm/android/third_party/ffmpeg/libavcodec/error_resilience.h @@ -87,7 +87,6 @@ typedef struct ERContext { int (*mv)[2][4][2], int mb_x, int mb_y, int mb_intra, int mb_skipped); void *opaque; - int warned_fields; } ERContext; void ff_er_frame_start(ERContext *s); diff --git a/arm/android/third_party/ffmpeg/libavcodec/escape124.c b/arm/android/third_party/ffmpeg/libavcodec/escape124.c index e8a8395f..592de09a 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/escape124.c +++ b/arm/android/third_party/ffmpeg/libavcodec/escape124.c @@ -155,7 +155,7 @@ static MacroBlock decode_macroblock(Escape124Context* s, GetBitContext* gb, // This condition can occur with invalid bitstreams and // *codebook_index == 2 - if (block_index >= s->codebooks[*codebook_index].size) + if (block_index >= s->codebooks[*codebook_index].size || !s->codebooks[*codebook_index].blocks) return (MacroBlock) { { 0 } }; return s->codebooks[*codebook_index].blocks[block_index]; diff --git a/arm/android/third_party/ffmpeg/libavcodec/exr.c b/arm/android/third_party/ffmpeg/libavcodec/exr.c index 2f1766c1..8cc6b056 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/exr.c +++ b/arm/android/third_party/ffmpeg/libavcodec/exr.c @@ -1930,8 +1930,10 @@ static int decode_header(EXRContext *s, AVFrame *frame) bytestream2_get_buffer(gb, key, FFMIN(sizeof(key) - 1, var_size)); if (strncmp("scanlineimage", key, var_size) && - strncmp("tiledimage", key, var_size)) - return AVERROR_PATCHWELCOME; + strncmp("tiledimage", key, var_size)) { + ret = AVERROR_PATCHWELCOME; + goto fail; + } continue; } else if ((var_size = check_header_variable(s, "preview", @@ -1939,12 +1941,16 @@ static int decode_header(EXRContext *s, AVFrame *frame) uint32_t pw = bytestream2_get_le32(gb); uint32_t ph = bytestream2_get_le32(gb); uint64_t psize = pw * ph; - if (psize > INT64_MAX / 4) - return AVERROR_INVALIDDATA; + if (psize > INT64_MAX / 4) { + ret = AVERROR_INVALIDDATA; + goto fail; + } psize *= 4; - if ((int64_t)psize >= bytestream2_get_bytes_left(gb)) - return AVERROR_INVALIDDATA; + if ((int64_t)psize >= bytestream2_get_bytes_left(gb)) { + ret = AVERROR_INVALIDDATA; + goto fail; + } bytestream2_skip(gb, psize); diff --git a/arm/android/third_party/ffmpeg/libavcodec/ffv1dec.c b/arm/android/third_party/ffmpeg/libavcodec/ffv1dec.c index 180d24e6..54cf075b 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/ffv1dec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/ffv1dec.c @@ -217,13 +217,13 @@ static int decode_slice_header(const FFV1Context *f, FFV1Context *fs) ps = get_symbol(c, state, 0); if (ps == 1) { - f->cur->interlaced_frame = 1; - f->cur->top_field_first = 1; + f->cur->flags |= AV_FRAME_FLAG_INTERLACED; + f->cur->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST; } else if (ps == 2) { - f->cur->interlaced_frame = 1; - f->cur->top_field_first = 0; + f->cur->flags |= AV_FRAME_FLAG_INTERLACED; + f->cur->flags &= ~AV_FRAME_FLAG_TOP_FIELD_FIRST; } else if (ps == 3) { - f->cur->interlaced_frame = 0; + f->cur->flags &= ~AV_FRAME_FLAG_INTERLACED; } f->cur->sample_aspect_ratio.num = get_symbol(c, state, 0); f->cur->sample_aspect_ratio.den = get_symbol(c, state, 0); @@ -264,16 +264,16 @@ static int decode_slice(AVCodecContext *c, void *arg) for( si=0; fs != f->slice_context[si]; si ++) ; - if(f->fsrc && !p->key_frame) + if(f->fsrc && !(p->flags & AV_FRAME_FLAG_KEY)) ff_thread_await_progress(&f->last_picture, si, 0); - if(f->fsrc && !p->key_frame) { + if(f->fsrc && !(p->flags & AV_FRAME_FLAG_KEY)) { FFV1Context *fssrc = f->fsrc->slice_context[si]; FFV1Context *fsdst = f->slice_context[si]; av_assert1(fsdst->plane_count == fssrc->plane_count); av_assert1(fsdst == fs); - if (!p->key_frame) + if (!(p->flags & AV_FRAME_FLAG_KEY)) fsdst->slice_damaged |= fssrc->slice_damaged; for (i = 0; i < f->plane_count; i++) { @@ -310,7 +310,7 @@ static int decode_slice(AVCodecContext *c, void *arg) } if ((ret = ff_ffv1_init_slice_state(f, fs)) < 0) return ret; - if (f->cur->key_frame || fs->slice_reset_contexts) { + if ((f->cur->flags & AV_FRAME_FLAG_KEY) || fs->slice_reset_contexts) { ff_ffv1_clear_slice_state(f, fs); } else if (fs->slice_damaged) { return AVERROR_INVALIDDATA; @@ -439,6 +439,11 @@ static int read_extra_header(FFV1Context *f) av_log(f->avctx, AV_LOG_ERROR, "Invalid version in global header\n"); return AVERROR_INVALIDDATA; } + if (f->version > 4) { + av_log(f->avctx, AV_LOG_ERROR, "unsupported version %d\n", + f->version); + return AVERROR_PATCHWELCOME; + } if (f->version > 2) { c->bytestream_end -= 4; f->micro_version = get_symbol(c, state, 0); @@ -876,9 +881,9 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, if (f->version < 3 && avctx->field_order > AV_FIELD_PROGRESSIVE) { /* we have interlaced material flagged in container */ - p->interlaced_frame = 1; + p->flags |= AV_FRAME_FLAG_INTERLACED; if (avctx->field_order == AV_FIELD_TT || avctx->field_order == AV_FIELD_TB) - p->top_field_first = 1; + p->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST; } f->avctx = avctx; @@ -887,7 +892,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, p->pict_type = AV_PICTURE_TYPE_I; //FIXME I vs. P if (get_rac(c, &keystate)) { - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; f->key_frame_ok = 0; if ((ret = read_header(f)) < 0) return ret; @@ -898,7 +903,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, "Cannot decode non-keyframe without valid keyframe\n"); return AVERROR_INVALIDDATA; } - p->key_frame = 0; + p->flags &= ~AV_FRAME_FLAG_KEY; } if (f->ac != AC_GOLOMB_RICE) { @@ -922,7 +927,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, if (avctx->debug & FF_DEBUG_PICT_INFO) av_log(avctx, AV_LOG_DEBUG, "ver:%d keyframe:%d coder:%d ec:%d slices:%d bps:%d\n", - f->version, p->key_frame, f->ac, f->ec, f->slice_count, f->avctx->bits_per_raw_sample); + f->version, !!(p->flags & AV_FRAME_FLAG_KEY), f->ac, f->ec, f->slice_count, f->avctx->bits_per_raw_sample); ff_thread_finish_setup(avctx); diff --git a/arm/android/third_party/ffmpeg/libavcodec/ffv1enc.c b/arm/android/third_party/ffmpeg/libavcodec/ffv1enc.c index fb12776c..746f7175 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/ffv1enc.c +++ b/arm/android/third_party/ffmpeg/libavcodec/ffv1enc.c @@ -916,10 +916,10 @@ static void encode_slice_header(FFV1Context *f, FFV1Context *fs) put_symbol(c, state, f->plane[j].quant_table_index, 0); av_assert0(f->plane[j].quant_table_index == f->context_model); } - if (!f->cur_enc_frame->interlaced_frame) + if (!(f->cur_enc_frame->flags & AV_FRAME_FLAG_INTERLACED)) put_symbol(c, state, 3, 0); else - put_symbol(c, state, 1 + !f->cur_enc_frame->top_field_first, 0); + put_symbol(c, state, 1 + !(f->cur_enc_frame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST), 0); put_symbol(c, state, f->cur_enc_frame->sample_aspect_ratio.num, 0); put_symbol(c, state, f->cur_enc_frame->sample_aspect_ratio.den, 0); if (f->version > 3) { diff --git a/arm/android/third_party/ffmpeg/libavcodec/fic.c b/arm/android/third_party/ffmpeg/libavcodec/fic.c index 94cf4288..fb998021 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/fic.c +++ b/arm/android/third_party/ffmpeg/libavcodec/fic.c @@ -406,11 +406,11 @@ static int fic_decode_frame(AVCodecContext *avctx, AVFrame *rframe, NULL, nslices, sizeof(ctx->slice_data[0]))) < 0) return ret; - ctx->frame->key_frame = 1; + ctx->frame->flags |= AV_FRAME_FLAG_KEY; ctx->frame->pict_type = AV_PICTURE_TYPE_I; for (slice = 0; slice < nslices; slice++) { if (ctx->slice_data[slice].p_frame) { - ctx->frame->key_frame = 0; + ctx->frame->flags &= ~AV_FRAME_FLAG_KEY; ctx->frame->pict_type = AV_PICTURE_TYPE_P; break; } diff --git a/arm/android/third_party/ffmpeg/libavcodec/fitsdec.c b/arm/android/third_party/ffmpeg/libavcodec/fitsdec.c index b9c51e70..284e945b 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/fitsdec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/fitsdec.c @@ -301,7 +301,7 @@ static int fits_decode_frame(AVCodecContext *avctx, AVFrame *p, } } - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; p->pict_type = AV_PICTURE_TYPE_I; *got_frame = 1; @@ -319,6 +319,7 @@ static const AVClass fits_decoder_class = { .item_name = av_default_item_name, .option = fits_options, .version = LIBAVUTIL_VERSION_INT, + .category = AV_CLASS_CATEGORY_DECODER, }; const FFCodec ff_fits_decoder = { diff --git a/arm/android/third_party/ffmpeg/libavcodec/fitsenc.c b/arm/android/third_party/ffmpeg/libavcodec/fitsenc.c index 12952278..86ea11f0 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/fitsenc.c +++ b/arm/android/third_party/ffmpeg/libavcodec/fitsenc.c @@ -104,6 +104,7 @@ static int fits_encode_frame(AVCodecContext *avctx, AVPacket *pkt, bytes_left = padded_data_size - data_size; memset(bytestream, 0, bytes_left); + pkt->flags |= AV_PKT_FLAG_KEY; *got_packet = 1; return 0; diff --git a/arm/android/third_party/ffmpeg/libavcodec/flacdec.c b/arm/android/third_party/ffmpeg/libavcodec/flacdec.c index cc778a8d..524a0469 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/flacdec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/flacdec.c @@ -513,7 +513,7 @@ static int decode_subframe_lpc_33bps(FLACContext *s, int64_t *decoded, for (i = pred_order; i < s->blocksize; i++, decoded++) { int64_t sum = 0; for (j = 0; j < pred_order; j++) - sum += (int64_t)coeffs[j] * decoded[j]; + sum += (int64_t)coeffs[j] * (uint64_t)decoded[j]; decoded[j] = residual[i] + (sum >> qlevel); } diff --git a/arm/android/third_party/ffmpeg/libavcodec/flicvideo.c b/arm/android/third_party/ffmpeg/libavcodec/flicvideo.c index 228f6527..e4b334e1 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/flicvideo.c +++ b/arm/android/third_party/ffmpeg/libavcodec/flicvideo.c @@ -473,7 +473,11 @@ static int flic_decode_frame_8BPP(AVCodecContext *avctx, /* make the palette available on the way out */ memcpy(s->frame->data[1], s->palette, AVPALETTE_SIZE); if (s->new_palette) { +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS s->frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif s->new_palette = 0; } diff --git a/arm/android/third_party/ffmpeg/libavcodec/fmvc.c b/arm/android/third_party/ffmpeg/libavcodec/fmvc.c index 3ee915cc..5e26a541 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/fmvc.c +++ b/arm/android/third_party/ffmpeg/libavcodec/fmvc.c @@ -433,7 +433,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) return ret; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_I; src = s->buffer; @@ -519,7 +519,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) return ret; - frame->key_frame = 0; + frame->flags &= ~AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_P; ssrc = s->buffer; diff --git a/arm/android/third_party/ffmpeg/libavcodec/fraps.c b/arm/android/third_party/ffmpeg/libavcodec/fraps.c index f0a4c4c2..834e6576 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/fraps.c +++ b/arm/android/third_party/ffmpeg/libavcodec/fraps.c @@ -216,7 +216,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *f, } f->pict_type = AV_PICTURE_TYPE_I; - f->key_frame = 1; + f->flags |= AV_FRAME_FLAG_KEY; avctx->pix_fmt = version & 1 ? is_pal ? AV_PIX_FMT_PAL8 : AV_PIX_FMT_BGR24 : AV_PIX_FMT_YUVJ420P; avctx->color_range = version & 1 ? AVCOL_RANGE_UNSPECIFIED diff --git a/arm/android/third_party/ffmpeg/libavcodec/frwu.c b/arm/android/third_party/ffmpeg/libavcodec/frwu.c index cf183f84..70bc1367 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/frwu.c +++ b/arm/android/third_party/ffmpeg/libavcodec/frwu.c @@ -63,7 +63,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *pic, return ret; pic->pict_type = AV_PICTURE_TYPE_I; - pic->key_frame = 1; + pic->flags |= AV_FRAME_FLAG_KEY; for (field = 0; field < 2; field++) { int i; diff --git a/arm/android/third_party/ffmpeg/libavcodec/ftr.c b/arm/android/third_party/ffmpeg/libavcodec/ftr.c index 74a2c10b..7cf1b158 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/ftr.c +++ b/arm/android/third_party/ffmpeg/libavcodec/ftr.c @@ -203,6 +203,10 @@ const FFCodec ff_ftr_decoder = { .close = ftr_close, .flush = ftr_flush, .priv_data_size = sizeof(FTRContext), - .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1, + .p.capabilities = +#if FF_API_SUBFRAMES + AV_CODEC_CAP_SUBFRAMES | +#endif + AV_CODEC_CAP_DR1, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, }; diff --git a/arm/android/third_party/ffmpeg/libavcodec/g2meet.c b/arm/android/third_party/ffmpeg/libavcodec/g2meet.c index 32b966e8..2dfa73df 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/g2meet.c +++ b/arm/android/third_party/ffmpeg/libavcodec/g2meet.c @@ -145,7 +145,8 @@ typedef struct G2MContext { int got_header; uint8_t *framebuf; - int framebuf_stride, old_width, old_height; + int framebuf_stride; + unsigned int framebuf_allocated; uint8_t *synth_tile, *jpeg_tile, *epic_buf, *epic_buf_base; int tile_stride, epic_buf_stride, old_tile_w, old_tile_h; @@ -1160,14 +1161,13 @@ static int g2m_init_buffers(G2MContext *c) { int aligned_height; - if (!c->framebuf || c->old_width < c->width || c->old_height < c->height) { - c->framebuf_stride = FFALIGN(c->width + 15, 16) * 3; - aligned_height = c->height + 15; - av_free(c->framebuf); - c->framebuf = av_calloc(c->framebuf_stride, aligned_height); - if (!c->framebuf) - return AVERROR(ENOMEM); - } + c->framebuf_stride = FFALIGN(c->width + 15, 16) * 3; + aligned_height = c->height + 15; + + av_fast_mallocz(&c->framebuf, &c->framebuf_allocated, c->framebuf_stride * aligned_height); + if (!c->framebuf) + return AVERROR(ENOMEM); + if (!c->synth_tile || !c->jpeg_tile || (c->compression == 2 && !c->epic_buf_base) || c->old_tile_w < c->tile_width || @@ -1560,7 +1560,10 @@ static int g2m_decode_frame(AVCodecContext *avctx, AVFrame *pic, if ((ret = ff_get_buffer(avctx, pic, 0)) < 0) return ret; - pic->key_frame = got_header; + if (got_header) + pic->flags |= AV_FRAME_FLAG_KEY; + else + pic->flags &= ~AV_FRAME_FLAG_KEY; pic->pict_type = got_header ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; for (i = 0; i < avctx->height; i++) @@ -1617,6 +1620,7 @@ static av_cold int g2m_decode_end(AVCodecContext *avctx) av_freep(&c->jpeg_tile); av_freep(&c->cursor); av_freep(&c->framebuf); + c->framebuf_allocated = 0; return 0; } diff --git a/arm/android/third_party/ffmpeg/libavcodec/g723_1dec.c b/arm/android/third_party/ffmpeg/libavcodec/g723_1dec.c index 55e20de5..5fe4a21d 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/g723_1dec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/g723_1dec.c @@ -1118,6 +1118,10 @@ const FFCodec ff_g723_1_decoder = { .priv_data_size = sizeof(G723_1_Context), .init = g723_1_decode_init, FF_CODEC_DECODE_CB(g723_1_decode_frame), - .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1, + .p.capabilities = +#if FF_API_SUBFRAMES + AV_CODEC_CAP_SUBFRAMES | +#endif + AV_CODEC_CAP_DR1, .p.priv_class = &g723_1dec_class, }; diff --git a/arm/android/third_party/ffmpeg/libavcodec/g729dec.c b/arm/android/third_party/ffmpeg/libavcodec/g729dec.c index f783812c..33e1fb9c 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/g729dec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/g729dec.c @@ -760,7 +760,11 @@ const FFCodec ff_g729_decoder = { .init = decoder_init, FF_CODEC_DECODE_CB(decode_frame), .close = decode_close, - .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1, + .p.capabilities = +#if FF_API_SUBFRAMES + AV_CODEC_CAP_SUBFRAMES | +#endif + AV_CODEC_CAP_DR1, }; const FFCodec ff_acelp_kelvin_decoder = { @@ -772,5 +776,9 @@ const FFCodec ff_acelp_kelvin_decoder = { .init = decoder_init, FF_CODEC_DECODE_CB(decode_frame), .close = decode_close, - .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1, + .p.capabilities = +#if FF_API_SUBFRAMES + AV_CODEC_CAP_SUBFRAMES | +#endif + AV_CODEC_CAP_DR1, }; diff --git a/arm/android/third_party/ffmpeg/libavcodec/g729postfilter.c b/arm/android/third_party/ffmpeg/libavcodec/g729postfilter.c index f3cacbac..26e937f0 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/g729postfilter.c +++ b/arm/android/third_party/ffmpeg/libavcodec/g729postfilter.c @@ -353,7 +353,7 @@ static int16_t long_term_filter(AudioDSPContext *adsp, int pitch_delay_int, if (tmp > 0) L_temp0 >>= tmp; else - L_temp1 >>= -tmp; + L_temp1 >>= FFMIN(-tmp, 31); /* Check if longer filter increases the values of R'(k). */ if (L_temp1 > L_temp0) { diff --git a/arm/android/third_party/ffmpeg/libavcodec/gemdec.c b/arm/android/third_party/ffmpeg/libavcodec/gemdec.c index c8fd8dcd..9e2a50c7 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/gemdec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/gemdec.c @@ -180,8 +180,12 @@ static int gem_decode_frame(AVCodecContext *avctx, AVFrame *p, return ret; p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS p->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif palette = (uint32_t *)p->data[1]; if (tag == AV_RB32("STTT")) { diff --git a/arm/android/third_party/ffmpeg/libavcodec/gif_parser.c b/arm/android/third_party/ffmpeg/libavcodec/gif_parser.c index 4c18c00d..aa07585f 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/gif_parser.c +++ b/arm/android/third_party/ffmpeg/libavcodec/gif_parser.c @@ -24,9 +24,6 @@ * GIF parser */ -#include "libavutil/bswap.h" -#include "libavutil/common.h" - #include "gif.h" #include "parser.h" @@ -50,11 +47,13 @@ typedef struct GIFParseContext { int block_size; int etype; int delay; + int keyframe; } GIFParseContext; static int gif_find_frame_end(GIFParseContext *g, const uint8_t *buf, int buf_size, void *logctx) { + ParseContext *pc = &g->pc; int index, next = END_NOT_FOUND; for (index = 0; index < buf_size; index++) { @@ -63,9 +62,10 @@ static int gif_find_frame_end(GIFParseContext *g, const uint8_t *buf, !memcmp(buf + index, gif89a_sig, 6)) { g->state = GIF_HEADER; g->found_sig++; + g->keyframe = 1; } else if (buf[index] == GIF_EXTENSION_INTRODUCER) { g->state = GIF_EXTENSION; - g->found_start = 1; + g->found_start = pc->frame_start_found = 1; } else if (buf[index] == GIF_IMAGE_SEPARATOR) { g->state = GIF_IMAGE; } else if (buf[index] == GIF_TRAILER) { @@ -93,7 +93,7 @@ static int gif_find_frame_end(GIFParseContext *g, const uint8_t *buf, } else if (g->state == GIF_EXTENSION) { if (g->found_start && g->found_end && g->found_sig) { next = index; - g->found_start = 0; + g->found_start = pc->frame_start_found = 0; g->found_end = 0; g->index = 0; g->gct_flag = 0; @@ -140,7 +140,7 @@ static int gif_find_frame_end(GIFParseContext *g, const uint8_t *buf, } g->index++; } else if (g->state == GIF_IMAGE) { - if (g->index == 8) { + if (g->index == 9) { g->gct_flag = !!(buf[index] & 0x80); g->gct_size = 3 * (1 << ((buf[index] & 0x07) + 1)); } @@ -165,14 +165,24 @@ static int gif_parse(AVCodecParserContext *s, AVCodecContext *avctx, GIFParseContext *g = s->priv_data; int next; - next = gif_find_frame_end(g, buf, buf_size, avctx); - if (ff_combine_frame(&g->pc, next, &buf, &buf_size) < 0) { - *poutbuf = NULL; - *poutbuf_size = 0; - return buf_size; + *poutbuf_size = 0; + *poutbuf = NULL; + + if (s->flags & PARSER_FLAG_COMPLETE_FRAMES) { + next = buf_size; + } else { + next = gif_find_frame_end(g, buf, buf_size, avctx); + if (ff_combine_frame(&g->pc, next, &buf, &buf_size) < 0) { + *poutbuf = NULL; + *poutbuf_size = 0; + return buf_size; + } } - s->duration = g->delay; + s->duration = g->delay ? g->delay : 10; + s->key_frame = g->keyframe; + s->pict_type = g->keyframe ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; + g->keyframe = 0; *poutbuf = buf; *poutbuf_size = buf_size; diff --git a/arm/android/third_party/ffmpeg/libavcodec/gifdec.c b/arm/android/third_party/ffmpeg/libavcodec/gifdec.c index f47390c3..0835c5bd 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/gifdec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/gifdec.c @@ -501,7 +501,7 @@ static int gif_decode_frame(AVCodecContext *avctx, AVFrame *rframe, return AVERROR(ENOMEM); s->frame->pict_type = AV_PICTURE_TYPE_I; - s->frame->key_frame = 1; + s->frame->flags |= AV_FRAME_FLAG_KEY; s->keyframe_ok = 1; } else { if (!s->keyframe_ok) { @@ -513,7 +513,7 @@ static int gif_decode_frame(AVCodecContext *avctx, AVFrame *rframe, return ret; s->frame->pict_type = AV_PICTURE_TYPE_P; - s->frame->key_frame = 0; + s->frame->flags &= ~AV_FRAME_FLAG_KEY; } ret = gif_parse_next_image(s, s->frame); diff --git a/arm/android/third_party/ffmpeg/libavcodec/h261dec.c b/arm/android/third_party/ffmpeg/libavcodec/h261dec.c index 84962939..620b7eef 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/h261dec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/h261dec.c @@ -643,7 +643,10 @@ retry: // for skipping the frame s->current_picture.f->pict_type = s->pict_type; - s->current_picture.f->key_frame = s->pict_type == AV_PICTURE_TYPE_I; + if (s->pict_type == AV_PICTURE_TYPE_I) + s->current_picture.f->flags |= AV_FRAME_FLAG_KEY; + else + s->current_picture.f->flags &= ~AV_FRAME_FLAG_KEY; if ((avctx->skip_frame >= AVDISCARD_NONREF && s->pict_type == AV_PICTURE_TYPE_B) || (avctx->skip_frame >= AVDISCARD_NONKEY && s->pict_type != AV_PICTURE_TYPE_I) || diff --git a/arm/android/third_party/ffmpeg/libavcodec/h264_parser.c b/arm/android/third_party/ffmpeg/libavcodec/h264_parser.c index 19a23f0a..6ea4d534 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/h264_parser.c +++ b/arm/android/third_party/ffmpeg/libavcodec/h264_parser.c @@ -568,7 +568,7 @@ static inline int parse_nal_units(AVCodecParserContext *s, if (p->sei.common.unregistered.x264_build < 44U) den *= 2; av_reduce(&avctx->framerate.den, &avctx->framerate.num, - sps->num_units_in_tick * avctx->ticks_per_frame, den, 1 << 30); + sps->num_units_in_tick * 2, den, 1 << 30); } av_freep(&rbsp.rbsp_buffer); @@ -625,7 +625,7 @@ static int h264_parse(AVCodecParserContext *s, parse_nal_units(s, avctx, buf, buf_size); if (avctx->framerate.num) - time_base = av_inv_q(av_mul_q(avctx->framerate, (AVRational){avctx->ticks_per_frame, 1})); + time_base = av_inv_q(av_mul_q(avctx->framerate, (AVRational){2, 1})); if (p->sei.picture_timing.cpb_removal_delay >= 0) { s->dts_sync_point = p->sei.buffering_period.present; s->dts_ref_dts_delta = p->sei.picture_timing.cpb_removal_delay; diff --git a/arm/android/third_party/ffmpeg/libavcodec/h264_picture.c b/arm/android/third_party/ffmpeg/libavcodec/h264_picture.c index 2661ff46..dcaf0fdb 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/h264_picture.c +++ b/arm/android/third_party/ffmpeg/libavcodec/h264_picture.c @@ -154,8 +154,7 @@ int ff_h264_replace_picture(H264Context *h, H264Picture *dst, const H264Picture av_assert0(src->tf.f == src->f); dst->tf.f = dst->f; - ff_thread_release_ext_buffer(h->avctx, &dst->tf); - ret = ff_thread_ref_frame(&dst->tf, &src->tf); + ret = ff_thread_replace_frame(h->avctx, &dst->tf, &src->tf); if (ret < 0) goto fail; diff --git a/arm/android/third_party/ffmpeg/libavcodec/h264_slice.c b/arm/android/third_party/ffmpeg/libavcodec/h264_slice.c index 7767e16c..be7a8e0b 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/h264_slice.c +++ b/arm/android/third_party/ffmpeg/libavcodec/h264_slice.c @@ -501,7 +501,7 @@ FF_ENABLE_DEPRECATION_WARNINGS * in later. * See decode_nal_units(). */ - pic->f->key_frame = 0; + pic->f->flags &= ~AV_FRAME_FLAG_KEY; pic->mmco_reset = 0; pic->recovered = 0; pic->invalid_gap = 0; @@ -809,8 +809,15 @@ static enum AVPixelFormat get_pixel_format(H264Context *h, int force_callback) *fmt++ = AV_PIX_FMT_YUV444P10; } else if (CHROMA422(h)) *fmt++ = AV_PIX_FMT_YUV422P10; - else + else { +#if CONFIG_H264_VAAPI_HWACCEL + // Just add as candidate. Whether VAProfileH264High10 usable or + // not is decided by vaapi_decode_make_config() defined in FFmpeg + // and vaQueryCodingProfile() defined in libva. + *fmt++ = AV_PIX_FMT_VAAPI; +#endif *fmt++ = AV_PIX_FMT_YUV420P10; + } break; case 12: if (CHROMA444(h)) { @@ -950,7 +957,7 @@ static int h264_slice_header_init(H264Context *h) if (h->x264_build < 44U) den *= 2; av_reduce(&h->avctx->framerate.den, &h->avctx->framerate.num, - sps->num_units_in_tick * h->avctx->ticks_per_frame, den, 1 << 30); + sps->num_units_in_tick * 2, den, 1 << 30); } ff_h264_free_tables(h); @@ -1148,9 +1155,10 @@ static int h264_export_frame_props(H264Context *h) const SPS *sps = h->ps.sps; H264Picture *cur = h->cur_pic_ptr; AVFrame *out = cur->f; + int interlaced_frame = 0, top_field_first = 0; int ret; - out->interlaced_frame = 0; + out->flags &= ~AV_FRAME_FLAG_INTERLACED; out->repeat_pict = 0; /* Signal interlacing information externally. */ @@ -1174,15 +1182,15 @@ static int h264_export_frame_props(H264Context *h) break; case H264_SEI_PIC_STRUCT_TOP_FIELD: case H264_SEI_PIC_STRUCT_BOTTOM_FIELD: - out->interlaced_frame = 1; + interlaced_frame = 1; break; case H264_SEI_PIC_STRUCT_TOP_BOTTOM: case H264_SEI_PIC_STRUCT_BOTTOM_TOP: if (FIELD_OR_MBAFF_PICTURE(h)) - out->interlaced_frame = 1; + interlaced_frame = 1; else // try to flag soft telecine progressive - out->interlaced_frame = h->prev_interlaced_frame; + interlaced_frame = !!h->prev_interlaced_frame; break; case H264_SEI_PIC_STRUCT_TOP_BOTTOM_TOP: case H264_SEI_PIC_STRUCT_BOTTOM_TOP_BOTTOM: @@ -1201,35 +1209,34 @@ static int h264_export_frame_props(H264Context *h) if ((pt->ct_type & 3) && pt->pic_struct <= H264_SEI_PIC_STRUCT_BOTTOM_TOP) - out->interlaced_frame = (pt->ct_type & (1 << 1)) != 0; + interlaced_frame = ((pt->ct_type & (1 << 1)) != 0); } else { /* Derive interlacing flag from used decoding process. */ - out->interlaced_frame = FIELD_OR_MBAFF_PICTURE(h); + interlaced_frame = !!FIELD_OR_MBAFF_PICTURE(h); } - h->prev_interlaced_frame = out->interlaced_frame; + h->prev_interlaced_frame = interlaced_frame; if (cur->field_poc[0] != cur->field_poc[1]) { /* Derive top_field_first from field pocs. */ - out->top_field_first = cur->field_poc[0] < cur->field_poc[1]; + top_field_first = (cur->field_poc[0] < cur->field_poc[1]); } else { if (sps->pic_struct_present_flag && h->sei.picture_timing.present) { /* Use picture timing SEI information. Even if it is a * information of a past frame, better than nothing. */ if (h->sei.picture_timing.pic_struct == H264_SEI_PIC_STRUCT_TOP_BOTTOM || h->sei.picture_timing.pic_struct == H264_SEI_PIC_STRUCT_TOP_BOTTOM_TOP) - out->top_field_first = 1; - else - out->top_field_first = 0; - } else if (out->interlaced_frame) { + top_field_first = 1; + } else if (interlaced_frame) { /* Default to top field first when pic_struct_present_flag * is not set but interlaced frame detected */ - out->top_field_first = 1; - } else { + top_field_first = 1; + } // else /* Most likely progressive */ - out->top_field_first = 0; - } } + out->flags |= (AV_FRAME_FLAG_INTERLACED * interlaced_frame) | + (AV_FRAME_FLAG_TOP_FIELD_FIRST * top_field_first); + ret = ff_h2645_sei_to_frame(out, &h->sei.common, AV_CODEC_ID_H264, h->avctx, &sps->vui, sps->bit_depth_luma, sps->bit_depth_chroma, cur->poc + (unsigned)(h->poc_offset << 5)); @@ -1319,7 +1326,7 @@ static int h264_select_output_frame(H264Context *h) out = h->delayed_pic[0]; out_idx = 0; for (i = 1; h->delayed_pic[i] && - !h->delayed_pic[i]->f->key_frame && + !(h->delayed_pic[i]->f->flags & AV_FRAME_FLAG_KEY) && !h->delayed_pic[i]->mmco_reset; i++) if (h->delayed_pic[i]->poc < out->poc) { @@ -1327,7 +1334,7 @@ static int h264_select_output_frame(H264Context *h) out_idx = i; } if (h->avctx->has_b_frames == 0 && - (h->delayed_pic[0]->f->key_frame || h->delayed_pic[0]->mmco_reset)) + ((h->delayed_pic[0]->f->flags & AV_FRAME_FLAG_KEY) || h->delayed_pic[0]->mmco_reset)) h->next_outputed_poc = INT_MIN; out_of_order = out->poc < h->next_outputed_poc; @@ -1338,7 +1345,7 @@ static int h264_select_output_frame(H264Context *h) } if (!out_of_order && pics > h->avctx->has_b_frames) { h->next_output_pic = out; - if (out_idx == 0 && h->delayed_pic[0] && (h->delayed_pic[0]->f->key_frame || h->delayed_pic[0]->mmco_reset)) { + if (out_idx == 0 && h->delayed_pic[0] && ((h->delayed_pic[0]->f->flags & AV_FRAME_FLAG_KEY) || h->delayed_pic[0]->mmco_reset)) { h->next_outputed_poc = INT_MIN; } else h->next_outputed_poc = out->poc; @@ -1628,7 +1635,7 @@ static int h264_field_start(H264Context *h, const H264SliceContext *sl, } } - h->cur_pic_ptr->f->key_frame |= (nal->type == H264_NAL_IDR_SLICE); + h->cur_pic_ptr->f->flags |= AV_FRAME_FLAG_KEY * !!(nal->type == H264_NAL_IDR_SLICE); if (nal->type == H264_NAL_IDR_SLICE || (h->recovery_frame == h->poc.frame_num && nal->ref_idc)) { diff --git a/arm/android/third_party/ffmpeg/libavcodec/h264dec.c b/arm/android/third_party/ffmpeg/libavcodec/h264dec.c index 9db2bf62..859260f7 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/h264dec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/h264dec.c @@ -382,7 +382,11 @@ static av_cold int h264_decode_init(AVCodecContext *avctx) return AVERROR_UNKNOWN; } +#if FF_API_TICKS_PER_FRAME +FF_DISABLE_DEPRECATION_WARNINGS avctx->ticks_per_frame = 2; +FF_ENABLE_DEPRECATION_WARNINGS +#endif if (!avctx->internal->is_copy) { if (avctx->extradata_size > 0 && avctx->extradata) { @@ -849,7 +853,7 @@ static int output_frame(H264Context *h, AVFrame *dst, H264Picture *srcp) av_dict_set(&dst->metadata, "stereo_mode", ff_h264_sei_stereo_mode(&h->sei.common.frame_packing), 0); if (srcp->sei_recovery_frame_cnt == 0) - dst->key_frame = 1; + dst->flags |= AV_FRAME_FLAG_KEY; if (h->avctx->export_side_data & AV_CODEC_EXPORT_DATA_VIDEO_ENC_PARAMS) { ret = h264_export_enc_params(dst, srcp); @@ -951,7 +955,7 @@ static int send_next_delayed_frame(H264Context *h, AVFrame *dst_frame, out_idx = 0; for (i = 1; h->delayed_pic[i] && - !h->delayed_pic[i]->f->key_frame && + !(h->delayed_pic[i]->f->flags & AV_FRAME_FLAG_KEY) && !h->delayed_pic[i]->mmco_reset; i++) if (h->delayed_pic[i]->poc < out->poc) { diff --git a/arm/android/third_party/ffmpeg/libavcodec/hapdec.c b/arm/android/third_party/ffmpeg/libavcodec/hapdec.c index 3df69e63..fee3c04d 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/hapdec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/hapdec.c @@ -328,7 +328,7 @@ static int hap_decode(AVCodecContext *avctx, AVFrame *frame, /* Frame is ready to be output */ frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; *got_frame = 1; return avpkt->size; diff --git a/arm/android/third_party/ffmpeg/libavcodec/hdrdec.c b/arm/android/third_party/ffmpeg/libavcodec/hdrdec.c index 99822774..9b6395bb 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/hdrdec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/hdrdec.c @@ -212,7 +212,7 @@ convert: } } - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; p->pict_type = AV_PICTURE_TYPE_I; *got_frame = 1; diff --git a/arm/android/third_party/ffmpeg/libavcodec/hevc_ps.c b/arm/android/third_party/ffmpeg/libavcodec/hevc_ps.c index 348e4d8d..043e1bf3 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/hevc_ps.c +++ b/arm/android/third_party/ffmpeg/libavcodec/hevc_ps.c @@ -927,8 +927,18 @@ int ff_hevc_parse_sps(HEVCSPS *sps, GetBitContext *gb, unsigned int *sps_id, sps->output_window = sps->pic_conf_win; } - sps->bit_depth = get_ue_golomb_long(gb) + 8; - bit_depth_chroma = get_ue_golomb_long(gb) + 8; + sps->bit_depth = get_ue_golomb_31(gb) + 8; + if (sps->bit_depth > 16) { + av_log(avctx, AV_LOG_ERROR, "Luma bit depth (%d) is out of range\n", + sps->bit_depth); + return AVERROR_INVALIDDATA; + } + bit_depth_chroma = get_ue_golomb_31(gb) + 8; + if (bit_depth_chroma > 16) { + av_log(avctx, AV_LOG_ERROR, "Chroma bit depth (%d) is out of range\n", + bit_depth_chroma); + return AVERROR_INVALIDDATA; + } if (sps->chroma_format_idc && bit_depth_chroma != sps->bit_depth) { av_log(avctx, AV_LOG_ERROR, "Luma bit depth (%d) is different from chroma bit depth (%d), " @@ -1140,17 +1150,24 @@ int ff_hevc_parse_sps(HEVCSPS *sps, GetBitContext *gb, unsigned int *sps_id, sps->sps_curr_pic_ref_enabled_flag = get_bits1(gb); sps->palette_mode_enabled_flag = get_bits1(gb); if (sps->palette_mode_enabled_flag) { - sps->palette_max_size = get_ue_golomb_long(gb); - sps->delta_palette_max_predictor_size = get_ue_golomb_long(gb); + sps->palette_max_size = get_ue_golomb(gb); + sps->delta_palette_max_predictor_size = get_ue_golomb(gb); sps->sps_palette_predictor_initializers_present_flag = get_bits1(gb); if (sps->sps_palette_predictor_initializers_present_flag) { - sps->sps_num_palette_predictor_initializers_minus1 = get_ue_golomb_long(gb); + sps->sps_num_palette_predictor_initializers = get_ue_golomb(gb) + 1; + if (sps->sps_num_palette_predictor_initializers > HEVC_MAX_PALETTE_PREDICTOR_SIZE) { + av_log(avctx, AV_LOG_ERROR, + "sps_num_palette_predictor_initializers out of range: %u\n", + sps->sps_num_palette_predictor_initializers); + return AVERROR_INVALIDDATA; + } num_comps = !sps->chroma_format_idc ? 1 : 3; - for (int comp = 0; comp < num_comps; comp++) - for (i = 0; i <= sps->sps_num_palette_predictor_initializers_minus1; i++) - sps->sps_palette_predictor_initializer[comp][i] = - get_bits(gb, !comp ? sps->bit_depth : sps->bit_depth_chroma); + for (int comp = 0; comp < num_comps; comp++) { + int bit_depth = !comp ? sps->bit_depth : sps->bit_depth_chroma; + for (i = 0; i < sps->sps_num_palette_predictor_initializers; i++) + sps->sps_palette_predictor_initializer[comp][i] = get_bits(gb, bit_depth); + } } } sps->motion_vector_resolution_control_idc = get_bits(gb, 2); @@ -1324,7 +1341,7 @@ static void colour_mapping_octants(GetBitContext *gb, HEVCPPS *pps, int inp_dept int idx_y, int idx_cb, int idx_cr, int inp_length) { unsigned int split_octant_flag, part_num_y, coded_res_flag, res_coeff_q, res_coeff_r; - int bit_depth_cm_input_y, bit_depth_cm_output_y, cm_res_bits; + int cm_res_bits; part_num_y = 1 << pps->cm_y_part_num_log2; @@ -1346,10 +1363,9 @@ static void colour_mapping_octants(GetBitContext *gb, HEVCPPS *pps, int inp_dept if (coded_res_flag) for (int c = 0; c < 3; c++) { res_coeff_q = get_ue_golomb_long(gb); - bit_depth_cm_input_y = 8 + pps->luma_bit_depth_cm_input_minus8; - bit_depth_cm_output_y = 8 + pps->luma_bit_depth_cm_output_minus8; - cm_res_bits = FFMAX(0, 10 + bit_depth_cm_input_y - bit_depth_cm_output_y - - pps->cm_res_quant_bits - (pps->cm_delta_flc_bits_minus1 + 1)); + cm_res_bits = FFMAX(0, 10 + pps->luma_bit_depth_cm_input - + pps->luma_bit_depth_cm_output - + pps->cm_res_quant_bits - pps->cm_delta_flc_bits); res_coeff_r = cm_res_bits ? get_bits(gb, cm_res_bits) : 0; if (res_coeff_q || res_coeff_r) skip_bits1(gb); @@ -1358,22 +1374,27 @@ static void colour_mapping_octants(GetBitContext *gb, HEVCPPS *pps, int inp_dept } } -static void colour_mapping_table(GetBitContext *gb, HEVCPPS *pps) +static int colour_mapping_table(GetBitContext *gb, AVCodecContext *avctx, HEVCPPS *pps) { - pps->num_cm_ref_layers_minus1 = get_ue_golomb_long(gb); - for (int i = 0; i <= pps->num_cm_ref_layers_minus1; i++) + pps->num_cm_ref_layers = get_ue_golomb(gb) + 1; + if (pps->num_cm_ref_layers > 62) { + av_log(avctx, AV_LOG_ERROR, + "num_cm_ref_layers_minus1 shall be in the range [0, 61].\n"); + return AVERROR_INVALIDDATA; + } + for (int i = 0; i < pps->num_cm_ref_layers; i++) pps->cm_ref_layer_id[i] = get_bits(gb, 6); pps->cm_octant_depth = get_bits(gb, 2); pps->cm_y_part_num_log2 = get_bits(gb, 2); - pps->luma_bit_depth_cm_input_minus8 = get_ue_golomb_long(gb); - pps->chroma_bit_depth_cm_input_minus8 = get_ue_golomb_long(gb); - pps->luma_bit_depth_cm_output_minus8 = get_ue_golomb_long(gb); - pps->chroma_bit_depth_cm_output_minus8 = get_ue_golomb_long(gb); + pps->luma_bit_depth_cm_input = get_ue_golomb(gb) + 8; + pps->chroma_bit_depth_cm_input = get_ue_golomb(gb) + 8; + pps->luma_bit_depth_cm_output = get_ue_golomb(gb) + 8; + pps->chroma_bit_depth_cm_output = get_ue_golomb(gb) + 8; pps->cm_res_quant_bits = get_bits(gb, 2); - pps->cm_delta_flc_bits_minus1 = get_bits(gb, 2); + pps->cm_delta_flc_bits = get_bits(gb, 2) + 1; if (pps->cm_octant_depth == 1) { pps->cm_adapt_threshold_u_delta = get_se_golomb_long(gb); @@ -1381,17 +1402,22 @@ static void colour_mapping_table(GetBitContext *gb, HEVCPPS *pps) } colour_mapping_octants(gb, pps, 0, 0, 0, 0, 1 << pps->cm_octant_depth); + + return 0; } static int pps_multilayer_extension(GetBitContext *gb, AVCodecContext *avctx, - HEVCPPS *pps, HEVCSPS *sps) + HEVCPPS *pps, HEVCSPS *sps, HEVCVPS *vps) { pps->poc_reset_info_present_flag = get_bits1(gb); pps->pps_infer_scaling_list_flag = get_bits1(gb); if (pps->pps_infer_scaling_list_flag) pps->pps_scaling_list_ref_layer_id = get_bits(gb, 6); - pps->num_ref_loc_offsets = get_ue_golomb_long(gb); + pps->num_ref_loc_offsets = get_ue_golomb(gb); + if (pps->num_ref_loc_offsets > vps->vps_max_layers - 1) + return AVERROR_INVALIDDATA; + for (int i = 0; i < pps->num_ref_loc_offsets; i++) { pps->ref_loc_offset_layer_id[i] = get_bits(gb, 6); pps->scaled_ref_layer_offset_present_flag[i] = get_bits1(gb); @@ -1412,16 +1438,19 @@ static int pps_multilayer_extension(GetBitContext *gb, AVCodecContext *avctx, pps->resample_phase_set_present_flag[i] = get_bits1(gb); if (pps->resample_phase_set_present_flag[i]) { - pps->phase_hor_luma[pps->ref_loc_offset_layer_id[i]] = get_ue_golomb_long(gb); - pps->phase_ver_luma[pps->ref_loc_offset_layer_id[i]] = get_ue_golomb_long(gb); - pps->phase_hor_chroma_plus8[pps->ref_loc_offset_layer_id[i]] = get_ue_golomb_long(gb); - pps->phase_ver_chroma_plus8[pps->ref_loc_offset_layer_id[i]] = get_ue_golomb_long(gb); + pps->phase_hor_luma[pps->ref_loc_offset_layer_id[i]] = get_ue_golomb_31(gb); + pps->phase_ver_luma[pps->ref_loc_offset_layer_id[i]] = get_ue_golomb_31(gb); + pps->phase_hor_chroma[pps->ref_loc_offset_layer_id[i]] = get_ue_golomb(gb) - 8; + pps->phase_ver_chroma[pps->ref_loc_offset_layer_id[i]] = get_ue_golomb(gb) - 8; } } pps->colour_mapping_enabled_flag = get_bits1(gb); - if (pps->colour_mapping_enabled_flag) - colour_mapping_table(gb, pps); + if (pps->colour_mapping_enabled_flag) { + int ret = colour_mapping_table(gb, avctx, pps); + if (ret < 0) + return ret; + } return 0; } @@ -1476,33 +1505,33 @@ static int pps_range_extensions(GetBitContext *gb, AVCodecContext *avctx, HEVCPPS *pps, HEVCSPS *sps) { if (pps->transform_skip_enabled_flag) { - pps->log2_max_transform_skip_block_size = get_ue_golomb_long(gb) + 2; + pps->log2_max_transform_skip_block_size = get_ue_golomb_31(gb) + 2; } pps->cross_component_prediction_enabled_flag = get_bits1(gb); pps->chroma_qp_offset_list_enabled_flag = get_bits1(gb); if (pps->chroma_qp_offset_list_enabled_flag) { - pps->diff_cu_chroma_qp_offset_depth = get_ue_golomb_long(gb); - pps->chroma_qp_offset_list_len_minus1 = get_ue_golomb_long(gb); + pps->diff_cu_chroma_qp_offset_depth = get_ue_golomb_31(gb); + pps->chroma_qp_offset_list_len_minus1 = get_ue_golomb_31(gb); if (pps->chroma_qp_offset_list_len_minus1 > 5) { av_log(avctx, AV_LOG_ERROR, "chroma_qp_offset_list_len_minus1 shall be in the range [0, 5].\n"); return AVERROR_INVALIDDATA; } for (int i = 0; i <= pps->chroma_qp_offset_list_len_minus1; i++) { - pps->cb_qp_offset_list[i] = get_se_golomb_long(gb); + pps->cb_qp_offset_list[i] = get_se_golomb(gb); if (pps->cb_qp_offset_list[i]) { av_log(avctx, AV_LOG_WARNING, "cb_qp_offset_list not tested yet.\n"); } - pps->cr_qp_offset_list[i] = get_se_golomb_long(gb); + pps->cr_qp_offset_list[i] = get_se_golomb(gb); if (pps->cr_qp_offset_list[i]) { av_log(avctx, AV_LOG_WARNING, "cb_qp_offset_list not tested yet.\n"); } } } - pps->log2_sao_offset_scale_luma = get_ue_golomb_long(gb); - pps->log2_sao_offset_scale_chroma = get_ue_golomb_long(gb); + pps->log2_sao_offset_scale_luma = get_ue_golomb_31(gb); + pps->log2_sao_offset_scale_chroma = get_ue_golomb_31(gb); if ( pps->log2_sao_offset_scale_luma > FFMAX(sps->bit_depth - 10, 0) || pps->log2_sao_offset_scale_chroma > FFMAX(sps->bit_depth_chroma - 10, 0) @@ -1520,9 +1549,9 @@ static int pps_scc_extension(GetBitContext *gb, AVCodecContext *avctx, pps->pps_curr_pic_ref_enabled_flag = get_bits1(gb); if (pps->residual_adaptive_colour_transform_enabled_flag = get_bits1(gb)) { pps->pps_slice_act_qp_offsets_present_flag = get_bits1(gb); - pps->pps_act_y_qp_offset = get_se_golomb_long(gb) - 5; - pps->pps_act_cb_qp_offset = get_se_golomb_long(gb) - 5; - pps->pps_act_cr_qp_offset = get_se_golomb_long(gb) - 3; + pps->pps_act_y_qp_offset = get_se_golomb(gb) - 5; + pps->pps_act_cb_qp_offset = get_se_golomb(gb) - 5; + pps->pps_act_cr_qp_offset = get_se_golomb(gb) - 3; #define CHECK_QP_OFFSET(name) (pps->pps_act_ ## name ## _qp_offset <= -12 || \ pps->pps_act_ ## name ## _qp_offset >= 12) @@ -1536,17 +1565,28 @@ static int pps_scc_extension(GetBitContext *gb, AVCodecContext *avctx, } if (pps->pps_palette_predictor_initializers_present_flag = get_bits1(gb)) { - if ((pps->pps_num_palette_predictor_initializers = get_ue_golomb_long(gb)) > 0) { + pps->pps_num_palette_predictor_initializers = get_ue_golomb(gb); + if (pps->pps_num_palette_predictor_initializers > 0) { + if (pps->pps_num_palette_predictor_initializers > HEVC_MAX_PALETTE_PREDICTOR_SIZE) { + av_log(avctx, AV_LOG_ERROR, + "pps_num_palette_predictor_initializers out of range: %u\n", + pps->pps_num_palette_predictor_initializers); + return AVERROR_INVALIDDATA; + } pps->monochrome_palette_flag = get_bits1(gb); - pps->luma_bit_depth_entry_minus8 = get_ue_golomb_long(gb); + pps->luma_bit_depth_entry = get_ue_golomb_31(gb) + 8; if (!pps->monochrome_palette_flag) - pps->chroma_bit_depth_entry_minus8 = get_ue_golomb_long(gb); + pps->chroma_bit_depth_entry = get_ue_golomb_31(gb) + 8; + + if (pps->chroma_bit_depth_entry > 16 || pps->chroma_bit_depth_entry > 16) + return AVERROR_INVALIDDATA; + num_comps = pps->monochrome_palette_flag ? 1 : 3; - for (int comp = 0; comp < num_comps; comp++) + for (int comp = 0; comp < num_comps; comp++) { + int bit_depth = !comp ? pps->luma_bit_depth_entry : pps->chroma_bit_depth_entry; for (int i = 0; i < pps->pps_num_palette_predictor_initializers; i++) - pps->pps_palette_predictor_initializer[comp][i] = - get_bits(gb, 8 + (!comp ? pps->luma_bit_depth_entry_minus8 : - pps->chroma_bit_depth_entry_minus8)); + pps->pps_palette_predictor_initializer[comp][i] = get_bits(gb, bit_depth); + } } } @@ -1689,6 +1729,7 @@ int ff_hevc_decode_nal_pps(GetBitContext *gb, AVCodecContext *avctx, HEVCParamSets *ps) { HEVCSPS *sps = NULL; + HEVCVPS *vps = NULL; int i, ret = 0; unsigned int pps_id = 0; ptrdiff_t nal_size; @@ -1749,6 +1790,7 @@ int ff_hevc_decode_nal_pps(GetBitContext *gb, AVCodecContext *avctx, goto err; } sps = (HEVCSPS *)ps->sps_list[pps->sps_id]->data; + vps = (HEVCVPS *)ps->vps_list[sps->vps_id]->data; pps->dependent_slice_segments_enabled_flag = get_bits1(gb); pps->output_flag_present_flag = get_bits1(gb); @@ -1758,8 +1800,14 @@ int ff_hevc_decode_nal_pps(GetBitContext *gb, AVCodecContext *avctx, pps->cabac_init_present_flag = get_bits1(gb); - pps->num_ref_idx_l0_default_active = get_ue_golomb_long(gb) + 1; - pps->num_ref_idx_l1_default_active = get_ue_golomb_long(gb) + 1; + pps->num_ref_idx_l0_default_active = get_ue_golomb_31(gb) + 1; + pps->num_ref_idx_l1_default_active = get_ue_golomb_31(gb) + 1; + if (pps->num_ref_idx_l0_default_active >= HEVC_MAX_REFS || + pps->num_ref_idx_l1_default_active >= HEVC_MAX_REFS) { + av_log(avctx, AV_LOG_ERROR, "Too many default refs in PPS: %d/%d.\n", + pps->num_ref_idx_l0_default_active, pps->num_ref_idx_l1_default_active); + goto err; + } pps->pic_init_qp_minus26 = get_se_golomb(gb); @@ -1917,7 +1965,7 @@ int ff_hevc_decode_nal_pps(GetBitContext *gb, AVCodecContext *avctx, } if (pps->pps_multilayer_extension_flag) { - if ((ret = pps_multilayer_extension(gb, avctx, pps, sps)) < 0) + if ((ret = pps_multilayer_extension(gb, avctx, pps, sps, vps)) < 0) goto err; } diff --git a/arm/android/third_party/ffmpeg/libavcodec/hevc_ps.h b/arm/android/third_party/ffmpeg/libavcodec/hevc_ps.h index 1f704108..2124deb9 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/hevc_ps.h +++ b/arm/android/third_party/ffmpeg/libavcodec/hevc_ps.h @@ -219,7 +219,7 @@ typedef struct HEVCSPS { int palette_max_size; int delta_palette_max_predictor_size; int sps_palette_predictor_initializers_present_flag; - int sps_num_palette_predictor_initializers_minus1; + int sps_num_palette_predictor_initializers; int sps_palette_predictor_initializer[3][HEVC_MAX_PALETTE_PREDICTOR_SIZE]; int motion_vector_resolution_control_idc; int intra_boundary_filtering_disabled_flag; @@ -314,34 +314,34 @@ typedef struct HEVCPPS { uint8_t poc_reset_info_present_flag; uint8_t pps_infer_scaling_list_flag; uint8_t pps_scaling_list_ref_layer_id; - uint16_t num_ref_loc_offsets; + uint8_t num_ref_loc_offsets; uint8_t ref_loc_offset_layer_id[64]; uint8_t scaled_ref_layer_offset_present_flag[64]; - int8_t scaled_ref_layer_left_offset[64]; - int8_t scaled_ref_layer_top_offset[64]; - int8_t scaled_ref_layer_right_offset[64]; - int8_t scaled_ref_layer_bottom_offset[64]; + int16_t scaled_ref_layer_left_offset[64]; + int16_t scaled_ref_layer_top_offset[64]; + int16_t scaled_ref_layer_right_offset[64]; + int16_t scaled_ref_layer_bottom_offset[64]; uint8_t ref_region_offset_present_flag[64]; - int8_t ref_region_left_offset[64]; - int8_t ref_region_top_offset[64]; - int8_t ref_region_right_offset[64]; - int8_t ref_region_bottom_offset[64]; + int16_t ref_region_left_offset[64]; + int16_t ref_region_top_offset[64]; + int16_t ref_region_right_offset[64]; + int16_t ref_region_bottom_offset[64]; uint8_t resample_phase_set_present_flag[64]; - uint16_t phase_hor_luma[64]; - uint16_t phase_ver_luma[64]; - uint16_t phase_hor_chroma_plus8[64]; - uint16_t phase_ver_chroma_plus8[64]; + uint8_t phase_hor_luma[64]; + uint8_t phase_ver_luma[64]; + int8_t phase_hor_chroma[64]; + int8_t phase_ver_chroma[64]; uint8_t colour_mapping_enabled_flag; - uint16_t num_cm_ref_layers_minus1; - uint8_t cm_ref_layer_id[63]; + uint8_t num_cm_ref_layers; + uint8_t cm_ref_layer_id[62]; uint8_t cm_octant_depth; uint8_t cm_y_part_num_log2; - uint16_t luma_bit_depth_cm_input_minus8; - uint16_t chroma_bit_depth_cm_input_minus8; - uint16_t luma_bit_depth_cm_output_minus8; - uint16_t chroma_bit_depth_cm_output_minus8; + uint8_t luma_bit_depth_cm_input; + uint8_t chroma_bit_depth_cm_input; + uint8_t luma_bit_depth_cm_output; + uint8_t chroma_bit_depth_cm_output; uint8_t cm_res_quant_bits; - uint8_t cm_delta_flc_bits_minus1; + uint8_t cm_delta_flc_bits; int8_t cm_adapt_threshold_u_delta; int8_t cm_adapt_threshold_v_delta; @@ -358,9 +358,9 @@ typedef struct HEVCPPS { uint8_t pps_palette_predictor_initializers_present_flag; uint8_t pps_num_palette_predictor_initializers; uint8_t monochrome_palette_flag; - uint8_t luma_bit_depth_entry_minus8; - uint8_t chroma_bit_depth_entry_minus8; - uint8_t pps_palette_predictor_initializer[3][HEVC_MAX_PALETTE_PREDICTOR_SIZE]; + uint8_t luma_bit_depth_entry; + uint8_t chroma_bit_depth_entry; + uint16_t pps_palette_predictor_initializer[3][HEVC_MAX_PALETTE_PREDICTOR_SIZE]; // Inferred parameters unsigned int *column_width; ///< ColumnWidth diff --git a/arm/android/third_party/ffmpeg/libavcodec/hevc_refs.c b/arm/android/third_party/ffmpeg/libavcodec/hevc_refs.c index 96153a24..e9be02c4 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/hevc_refs.c +++ b/arm/android/third_party/ffmpeg/libavcodec/hevc_refs.c @@ -111,8 +111,11 @@ static HEVCFrame *alloc_frame(HEVCContext *s) for (j = 0; j < frame->ctb_count; j++) frame->rpl_tab[j] = (RefPicListTab *)frame->rpl_buf->data; - frame->frame->top_field_first = s->sei.picture_timing.picture_struct == AV_PICTURE_STRUCTURE_TOP_FIELD; - frame->frame->interlaced_frame = (s->sei.picture_timing.picture_struct == AV_PICTURE_STRUCTURE_TOP_FIELD) || (s->sei.picture_timing.picture_struct == AV_PICTURE_STRUCTURE_BOTTOM_FIELD); + if (s->sei.picture_timing.picture_struct == AV_PICTURE_STRUCTURE_TOP_FIELD) + frame->frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST; + if ((s->sei.picture_timing.picture_struct == AV_PICTURE_STRUCTURE_TOP_FIELD) || + (s->sei.picture_timing.picture_struct == AV_PICTURE_STRUCTURE_BOTTOM_FIELD)) + frame->frame->flags |= AV_FRAME_FLAG_INTERLACED; if (s->avctx->hwaccel) { const AVHWAccel *hwaccel = s->avctx->hwaccel; diff --git a/arm/android/third_party/ffmpeg/libavcodec/hevcdec.c b/arm/android/third_party/ffmpeg/libavcodec/hevcdec.c index 1a0beac9..7e1bf4e9 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/hevcdec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/hevcdec.c @@ -773,11 +773,11 @@ static int hls_slice_header(HEVCContext *s) sh->nb_refs[L1] = s->ps.pps->num_ref_idx_l1_default_active; if (get_bits1(gb)) { // num_ref_idx_active_override_flag - sh->nb_refs[L0] = get_ue_golomb_long(gb) + 1; + sh->nb_refs[L0] = get_ue_golomb_31(gb) + 1; if (sh->slice_type == HEVC_SLICE_B) - sh->nb_refs[L1] = get_ue_golomb_long(gb) + 1; + sh->nb_refs[L1] = get_ue_golomb_31(gb) + 1; } - if (sh->nb_refs[L0] > HEVC_MAX_REFS || sh->nb_refs[L1] > HEVC_MAX_REFS) { + if (sh->nb_refs[L0] >= HEVC_MAX_REFS || sh->nb_refs[L1] >= HEVC_MAX_REFS) { av_log(s->avctx, AV_LOG_ERROR, "Too many refs: %d/%d.\n", sh->nb_refs[L0], sh->nb_refs[L1]); return AVERROR_INVALIDDATA; @@ -2497,7 +2497,7 @@ static void hls_decode_neighbour(HEVCLocalContext *lc, int x_ctb, int y_ctb, lc->ctb_up_left_flag = ((x_ctb > 0) && (y_ctb > 0) && (ctb_addr_in_slice-1 >= s->ps.sps->ctb_width) && (s->ps.pps->tile_id[ctb_addr_ts] == s->ps.pps->tile_id[s->ps.pps->ctb_addr_rs_to_ts[ctb_addr_rs-1 - s->ps.sps->ctb_width]])); } -static int hls_decode_entry(AVCodecContext *avctxt, void *isFilterThread) +static int hls_decode_entry(AVCodecContext *avctxt, void *arg) { HEVCContext *s = avctxt->priv_data; HEVCLocalContext *const lc = s->HEVClc; @@ -2561,14 +2561,10 @@ static int hls_decode_entry(AVCodecContext *avctxt, void *isFilterThread) static int hls_slice_data(HEVCContext *s) { - int arg[2]; - int ret[2]; + int ret = 0; - arg[0] = 0; - arg[1] = 1; - - s->avctx->execute(s->avctx, hls_decode_entry, arg, ret , 1, sizeof(int)); - return ret[0]; + s->avctx->execute(s->avctx, hls_decode_entry, NULL, &ret , 1, 0); + return ret; } static int hls_decode_entry_wpp(AVCodecContext *avctxt, void *hevc_lclist, int job, int self_id) @@ -2914,7 +2910,10 @@ static int hevc_frame_start(HEVCContext *s) goto fail; } - s->ref->frame->key_frame = IS_IRAP(s); + if (IS_IRAP(s)) + s->ref->frame->flags |= AV_FRAME_FLAG_KEY; + else + s->ref->frame->flags &= ~AV_FRAME_FLAG_KEY; s->ref->needs_fg = s->sei.common.film_grain_characteristics.present && !(s->avctx->export_side_data & AV_CODEC_EXPORT_DATA_FILM_GRAIN) && diff --git a/arm/android/third_party/ffmpeg/libavcodec/hnm4video.c b/arm/android/third_party/ffmpeg/libavcodec/hnm4video.c index f223bb82..51e75789 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/hnm4video.c +++ b/arm/android/third_party/ffmpeg/libavcodec/hnm4video.c @@ -420,7 +420,7 @@ static int hnm_decode_frame(AVCodecContext *avctx, AVFrame *frame, postprocess_current_frame(avctx); copy_processed_frame(avctx, frame); frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; memcpy(frame->data[1], hnm->palette, 256 * 4); *got_frame = 1; } else if (chunk_id == HNM4_CHUNK_ID_IU) { @@ -438,7 +438,7 @@ static int hnm_decode_frame(AVCodecContext *avctx, AVFrame *frame, } copy_processed_frame(avctx, frame); frame->pict_type = AV_PICTURE_TYPE_P; - frame->key_frame = 0; + frame->flags &= ~AV_FRAME_FLAG_KEY; memcpy(frame->data[1], hnm->palette, 256 * 4); *got_frame = 1; FFSWAP(uint8_t *, hnm->current, hnm->previous); diff --git a/arm/android/third_party/ffmpeg/libavcodec/hq_hqa.c b/arm/android/third_party/ffmpeg/libavcodec/hq_hqa.c index 6ce73b7a..db0ac7d9 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/hq_hqa.c +++ b/arm/android/third_party/ffmpeg/libavcodec/hq_hqa.c @@ -354,7 +354,7 @@ static int hq_hqa_decode_frame(AVCodecContext *avctx, AVFrame *pic, return ret; } - pic->key_frame = 1; + pic->flags |= AV_FRAME_FLAG_KEY; pic->pict_type = AV_PICTURE_TYPE_I; *got_frame = 1; diff --git a/arm/android/third_party/ffmpeg/libavcodec/hqx.c b/arm/android/third_party/ffmpeg/libavcodec/hqx.c index 60839465..6554b15e 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/hqx.c +++ b/arm/android/third_party/ffmpeg/libavcodec/hqx.c @@ -504,7 +504,7 @@ static int hqx_decode_frame(AVCodecContext *avctx, AVFrame *frame, avctx->execute2(avctx, decode_slice_thread, NULL, NULL, 16); - ctx->pic->key_frame = 1; + ctx->pic->flags |= AV_FRAME_FLAG_KEY; ctx->pic->pict_type = AV_PICTURE_TYPE_I; *got_picture_ptr = 1; diff --git a/arm/android/third_party/ffmpeg/libavcodec/huffyuvdec.c b/arm/android/third_party/ffmpeg/libavcodec/huffyuvdec.c index 868700ce..c9fcec30 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/huffyuvdec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/huffyuvdec.c @@ -695,9 +695,9 @@ static void decode_422_bitstream(HYuvDecContext *s, int count) /* TODO instead of restarting the read when the code isn't in the first level * of the joint table, jump into the 2nd level of the individual table. */ #define READ_2PIX_PLANE16(dst0, dst1, plane){\ - dst0 = get_vlc2(&s->gb, s->vlc[plane].table, VLC_BITS, 3)<<2;\ + dst0 = get_vlc2(&s->gb, s->vlc[plane].table, VLC_BITS, 3)*4;\ dst0 += get_bits(&s->gb, 2);\ - dst1 = get_vlc2(&s->gb, s->vlc[plane].table, VLC_BITS, 3)<<2;\ + dst1 = get_vlc2(&s->gb, s->vlc[plane].table, VLC_BITS, 3)*4;\ dst1 += get_bits(&s->gb, 2);\ } static void decode_plane_bitstream(HYuvDecContext *s, int width, int plane) diff --git a/arm/android/third_party/ffmpeg/libavcodec/idcinvideo.c b/arm/android/third_party/ffmpeg/libavcodec/idcinvideo.c index f6b8b3cd..d9e46335 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/idcinvideo.c +++ b/arm/android/third_party/ffmpeg/libavcodec/idcinvideo.c @@ -224,7 +224,14 @@ static int idcin_decode_frame(AVCodecContext *avctx, AVFrame *frame, if (idcin_decode_vlcs(s, frame)) return AVERROR_INVALIDDATA; - frame->palette_has_changed = ff_copy_palette(s->pal, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS + frame->palette_has_changed = +#endif + ff_copy_palette(s->pal, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_ENABLE_DEPRECATION_WARNINGS +#endif /* make the palette available on the way out */ memcpy(frame->data[1], s->pal, AVPALETTE_SIZE); diff --git a/arm/android/third_party/ffmpeg/libavcodec/iff.c b/arm/android/third_party/ffmpeg/libavcodec/iff.c index e02d2e77..faf4e21c 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/iff.c +++ b/arm/android/third_party/ffmpeg/libavcodec/iff.c @@ -1887,10 +1887,10 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, } if (avpkt->flags & AV_PKT_FLAG_KEY) { - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_I; } else { - frame->key_frame = 0; + frame->flags &= ~AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_P; } diff --git a/arm/android/third_party/ffmpeg/libavcodec/imm4.c b/arm/android/third_party/ffmpeg/libavcodec/imm4.c index ccec5dff..b95ad869 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/imm4.c +++ b/arm/android/third_party/ffmpeg/libavcodec/imm4.c @@ -420,11 +420,11 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, switch (type) { case 0x19781977: - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_I; break; case 0x12250926: - frame->key_frame = 0; + frame->flags &= ~AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_P; break; default: @@ -434,7 +434,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, if (avctx->width != width || avctx->height != height) { - if (!frame->key_frame) { + if (!(frame->flags & AV_FRAME_FLAG_KEY)) { av_log(avctx, AV_LOG_ERROR, "Frame size change is unsupported.\n"); return AVERROR_INVALIDDATA; } @@ -445,10 +445,10 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, if (ret < 0) return ret; - if ((ret = ff_get_buffer(avctx, frame, frame->key_frame ? AV_GET_BUFFER_FLAG_REF : 0)) < 0) + if ((ret = ff_get_buffer(avctx, frame, (frame->flags & AV_FRAME_FLAG_KEY) ? AV_GET_BUFFER_FLAG_REF : 0)) < 0) return ret; - if (frame->key_frame) { + if (frame->flags & AV_FRAME_FLAG_KEY) { ret = decode_intra(avctx, gb, frame); if (ret < 0) return ret; diff --git a/arm/android/third_party/ffmpeg/libavcodec/imx.c b/arm/android/third_party/ffmpeg/libavcodec/imx.c index 44bab23c..0d9d9b5b 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/imx.c +++ b/arm/android/third_party/ffmpeg/libavcodec/imx.c @@ -58,11 +58,19 @@ static int imx_decode_frame(AVCodecContext *avctx, AVFrame *rframe, return ret; if (ff_copy_palette(imx->pal, avpkt, avctx)) { +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = 1; - frame->key_frame = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif + frame->flags |= AV_FRAME_FLAG_KEY; } else { - frame->key_frame = 0; + frame->flags &= ~AV_FRAME_FLAG_KEY; +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = 0; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } bytestream2_init(&gb, avpkt->data, avpkt->size); @@ -92,7 +100,7 @@ static int imx_decode_frame(AVCodecContext *avctx, AVFrame *rframe, break; } - frame->key_frame = 0; + frame->flags &= ~AV_FRAME_FLAG_KEY; break; case 1: if (len == 0) { @@ -114,7 +122,7 @@ static int imx_decode_frame(AVCodecContext *avctx, AVFrame *rframe, break; } - frame->key_frame = 0; + frame->flags &= ~AV_FRAME_FLAG_KEY; } else { while (len > 0) { fill = bytestream2_get_byte(&gb); @@ -150,7 +158,7 @@ static int imx_decode_frame(AVCodecContext *avctx, AVFrame *rframe, } } - frame->pict_type = frame->key_frame ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; + frame->pict_type = (frame->flags & AV_FRAME_FLAG_KEY) ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; if ((ret = av_frame_ref(rframe, frame)) < 0) return ret; diff --git a/arm/android/third_party/ffmpeg/libavcodec/internal.h b/arm/android/third_party/ffmpeg/libavcodec/internal.h index a283c52e..dceae182 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/internal.h +++ b/arm/android/third_party/ffmpeg/libavcodec/internal.h @@ -148,8 +148,6 @@ typedef struct AVCodecInternal { AVFrame *buffer_frame; int draining_done; - int showed_multi_packet_warning; - /* to prevent infinite loop on errors when draining */ int nb_draining_errors; diff --git a/arm/android/third_party/ffmpeg/libavcodec/interplayacm.c b/arm/android/third_party/ffmpeg/libavcodec/interplayacm.c index a0b9655e..057ab16e 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/interplayacm.c +++ b/arm/android/third_party/ffmpeg/libavcodec/interplayacm.c @@ -37,6 +37,7 @@ static int mul_3x5 [5 * 5 * 5]; static int mul_2x11[11 * 11]; typedef struct InterplayACMContext { + AVCodecContext *avctx; GetBitContext gb; uint8_t *bitstream; int max_framesize; @@ -77,6 +78,7 @@ static av_cold int decode_init(AVCodecContext *avctx) static AVOnce init_static_once = AV_ONCE_INIT; InterplayACMContext *s = avctx->priv_data; + s->avctx = avctx; if (avctx->extradata_size < 14) return AVERROR_INVALIDDATA; @@ -343,7 +345,7 @@ static int t15(InterplayACMContext *s, unsigned ind, unsigned col) /* b = (x1) + (x2 * 3) + (x3 * 9) */ b = get_bits(gb, 5); if (b > 26) { - av_log(NULL, AV_LOG_ERROR, "Too large b = %d > 26\n", b); + av_log(s->avctx, AV_LOG_ERROR, "Too large b = %d > 26\n", b); return AVERROR_INVALIDDATA; } @@ -372,7 +374,7 @@ static int t27(InterplayACMContext *s, unsigned ind, unsigned col) /* b = (x1) + (x2 * 5) + (x3 * 25) */ b = get_bits(gb, 7); if (b > 124) { - av_log(NULL, AV_LOG_ERROR, "Too large b = %d > 124\n", b); + av_log(s->avctx, AV_LOG_ERROR, "Too large b = %d > 124\n", b); return AVERROR_INVALIDDATA; } @@ -400,7 +402,7 @@ static int t37(InterplayACMContext *s, unsigned ind, unsigned col) /* b = (x1) + (x2 * 11) */ b = get_bits(gb, 7); if (b > 120) { - av_log(NULL, AV_LOG_ERROR, "Too large b = %d > 120\n", b); + av_log(s->avctx, AV_LOG_ERROR, "Too large b = %d > 120\n", b); return AVERROR_INVALIDDATA; } diff --git a/arm/android/third_party/ffmpeg/libavcodec/interplayvideo.c b/arm/android/third_party/ffmpeg/libavcodec/interplayvideo.c index 1a3461bf..1f0414bb 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/interplayvideo.c +++ b/arm/android/third_party/ffmpeg/libavcodec/interplayvideo.c @@ -1315,7 +1315,14 @@ static int ipvideo_decode_frame(AVCodecContext *avctx, AVFrame *frame, return ret; if (!s->is_16bpp) { - frame->palette_has_changed = ff_copy_palette(s->pal, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS + frame->palette_has_changed = +#endif + ff_copy_palette(s->pal, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_ENABLE_DEPRECATION_WARNINGS +#endif } switch (frame_format) { diff --git a/arm/android/third_party/ffmpeg/libavcodec/ituh263enc.c b/arm/android/third_party/ffmpeg/libavcodec/ituh263enc.c index c30ecad4..97abfb3f 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/ituh263enc.c +++ b/arm/android/third_party/ffmpeg/libavcodec/ituh263enc.c @@ -865,6 +865,11 @@ av_cold void ff_h263_encode_init(MpegEncContext *s) s->c_dc_scale_table= ff_mpeg1_dc_scale_table; } + if (s->lmin > s->lmax) { + av_log(s->avctx, AV_LOG_WARNING, "Clipping lmin value to %d\n", s->lmax); + s->lmin = s->lmax; + } + ff_thread_once(&init_static_once, h263_encode_init_static); } diff --git a/arm/android/third_party/ffmpeg/libavcodec/j2kenc.c b/arm/android/third_party/ffmpeg/libavcodec/j2kenc.c index 6406f90a..2b0c58cf 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/j2kenc.c +++ b/arm/android/third_party/ffmpeg/libavcodec/j2kenc.c @@ -115,6 +115,7 @@ typedef struct { int width, height; ///< image width and height uint8_t cbps[4]; ///< bits per sample in particular components + uint8_t comp_remap[4]; int chroma_shift[2]; uint8_t planar; int ncomponents; @@ -319,8 +320,8 @@ static int put_siz(Jpeg2000EncoderContext *s) for (i = 0; i < s->ncomponents; i++){ // Ssiz_i XRsiz_i, YRsiz_i bytestream_put_byte(&s->buf, s->cbps[i] - 1); - bytestream_put_byte(&s->buf, i?1<chroma_shift[0]:1); - bytestream_put_byte(&s->buf, i?1<chroma_shift[1]:1); + bytestream_put_byte(&s->buf, (i+1&2)?1<chroma_shift[0]:1); + bytestream_put_byte(&s->buf, (i+1&2)?1<chroma_shift[1]:1); } return 0; } @@ -431,7 +432,7 @@ static void compute_rates(Jpeg2000EncoderContext* s) for (compno = 0; compno < s->ncomponents; compno++) { int tilew = tile->comp[compno].coord[0][1] - tile->comp[compno].coord[0][0]; int tileh = tile->comp[compno].coord[1][1] - tile->comp[compno].coord[1][0]; - int scale = (compno?1 << s->chroma_shift[0]:1) * (compno?1 << s->chroma_shift[1]:1); + int scale = ((compno+1&2)?1 << s->chroma_shift[0]:1) * ((compno+1&2)?1 << s->chroma_shift[1]:1); for (layno = 0; layno < s->nlayers; layno++) { if (s->layer_rates[layno] > 0) { tile->layer_rates[layno] += (double)(tilew * tileh) * s->ncomponents * s->cbps[compno] / @@ -483,7 +484,7 @@ static int init_tiles(Jpeg2000EncoderContext *s) comp->coord[0][1] = comp->coord_o[0][1] = FFMIN((tilex+1)*s->tile_width, s->width); comp->coord[1][0] = comp->coord_o[1][0] = tiley * s->tile_height; comp->coord[1][1] = comp->coord_o[1][1] = FFMIN((tiley+1)*s->tile_height, s->height); - if (compno > 0) + if (compno + 1 & 2) for (i = 0; i < 2; i++) for (j = 0; j < 2; j++) comp->coord[i][j] = comp->coord_o[i][j] = ff_jpeg2000_ceildivpow2(comp->coord[i][j], s->chroma_shift[i]); @@ -492,8 +493,8 @@ static int init_tiles(Jpeg2000EncoderContext *s) codsty, qntsty, s->cbps[compno], - compno?1<chroma_shift[0]:1, - compno?1<chroma_shift[1]:1, + (compno+1&2)?1<chroma_shift[0]:1, + (compno+1&2)?1<chroma_shift[1]:1, s->avctx )) < 0) return ret; @@ -512,17 +513,18 @@ static int init_tiles(Jpeg2000EncoderContext *s) Jpeg2000Tile *tile = s->tile + tileno; \ if (s->planar){ \ for (compno = 0; compno < s->ncomponents; compno++){ \ + int icompno = s->comp_remap[compno]; \ Jpeg2000Component *comp = tile->comp + compno; \ int *dst = comp->i_data; \ int cbps = s->cbps[compno]; \ - line = (const PIXEL*)s->picture->data[compno] \ - + comp->coord[1][0] * (s->picture->linesize[compno] / sizeof(PIXEL)) \ + line = (const PIXEL*)s->picture->data[icompno] \ + + comp->coord[1][0] * (s->picture->linesize[icompno] / sizeof(PIXEL)) \ + comp->coord[0][0]; \ for (y = comp->coord[1][0]; y < comp->coord[1][1]; y++){ \ const PIXEL *ptr = line; \ for (x = comp->coord[0][0]; x < comp->coord[0][1]; x++) \ *dst++ = *ptr++ - (1 << (cbps - 1)); \ - line += s->picture->linesize[compno] / sizeof(PIXEL); \ + line += s->picture->linesize[icompno] / sizeof(PIXEL); \ } \ } \ } else{ \ @@ -721,11 +723,10 @@ static void encode_cblk(Jpeg2000EncoderContext *s, Jpeg2000T1Context *t1, Jpeg20 if (max == 0){ cblk->nonzerobits = 0; - bpno = 0; } else{ cblk->nonzerobits = av_log2(max) + 1 - NMSEDEC_FRACBITS; - bpno = cblk->nonzerobits - 1; } + bpno = cblk->nonzerobits - 1; cblk->data[0] = 0; ff_mqc_initenc(&t1->mqc, cblk->data + 1); @@ -1008,7 +1009,7 @@ static int encode_packets(Jpeg2000EncoderContext *s, Jpeg2000Tile *tile, int til Jpeg2000Component *comp = tile->comp + compno; uint8_t reducedresno = codsty->nreslevels - 1 -reslevelno; // ==> N_L - r Jpeg2000ResLevel *reslevel = comp->reslevel + reslevelno; - int log_subsampling[2] = { compno?s->chroma_shift[0]:0, compno?s->chroma_shift[1]:0}; + int log_subsampling[2] = { (compno+1&2)?s->chroma_shift[0]:0, (compno+1&2)?s->chroma_shift[1]:0}; unsigned prcx, prcy; int trx0, try0; @@ -1069,7 +1070,7 @@ static int encode_packets(Jpeg2000EncoderContext *s, Jpeg2000Tile *tile, int til for (x = tile_coord[0][0]; x < tile_coord[0][1]; x = (x/step_x + 1)*step_x) { for (compno = 0; compno < s->ncomponents; compno++) { Jpeg2000Component *comp = tile->comp + compno; - int log_subsampling[2] = { compno?s->chroma_shift[0]:0, compno?s->chroma_shift[1]:0}; + int log_subsampling[2] = { (compno+1&2)?s->chroma_shift[0]:0, (compno+1&2)?s->chroma_shift[1]:0}; for (reslevelno = 0; reslevelno < codsty->nreslevels; reslevelno++) { unsigned prcx, prcy; @@ -1115,7 +1116,7 @@ static int encode_packets(Jpeg2000EncoderContext *s, Jpeg2000Tile *tile, int til case JPEG2000_PGOD_CPRL: for (compno = 0; compno < s->ncomponents; compno++) { Jpeg2000Component *comp = tile->comp + compno; - int log_subsampling[2] = { compno?s->chroma_shift[0]:0, compno?s->chroma_shift[1]:0}; + int log_subsampling[2] = { (compno+1&2)?s->chroma_shift[0]:0, (compno+1&2)?s->chroma_shift[1]:0}; step_x = 32; step_y = 32; @@ -1531,6 +1532,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, int tileno, ret; Jpeg2000EncoderContext *s = avctx->priv_data; uint8_t *chunkstart, *jp2cstart, *jp2hstart; + const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt); if ((ret = ff_alloc_packet(avctx, pkt, avctx->width*avctx->height*9 + AV_INPUT_BUFFER_MIN_SIZE)) < 0) return ret; @@ -1543,7 +1545,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, s->lambda = s->picture->quality * LAMBDA_SCALE; - if (avctx->pix_fmt == AV_PIX_FMT_BGR48 || avctx->pix_fmt == AV_PIX_FMT_GRAY16) + if (s->cbps[0] > 8) copy_frame_16(s); else copy_frame_8(s); @@ -1587,7 +1589,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, bytestream_put_byte(&s->buf, 1); bytestream_put_byte(&s->buf, 0); bytestream_put_byte(&s->buf, 0); - if (avctx->pix_fmt == AV_PIX_FMT_RGB24 || avctx->pix_fmt == AV_PIX_FMT_PAL8) { + if ((desc->flags & AV_PIX_FMT_FLAG_RGB) || avctx->pix_fmt == AV_PIX_FMT_PAL8) { bytestream_put_be32(&s->buf, 16); } else if (s->ncomponents == 1) { bytestream_put_be32(&s->buf, 17); @@ -1717,6 +1719,7 @@ static av_cold int j2kenc_init(AVCodecContext *avctx) Jpeg2000EncoderContext *s = avctx->priv_data; Jpeg2000CodingStyle *codsty = &s->codsty; Jpeg2000QuantStyle *qntsty = &s->qntsty; + const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt); s->avctx = avctx; av_log(s->avctx, AV_LOG_DEBUG, "init\n"); @@ -1729,7 +1732,7 @@ static av_cold int j2kenc_init(AVCodecContext *avctx) if (avctx->pix_fmt == AV_PIX_FMT_PAL8 && (s->pred != FF_DWT97_INT || s->format != CODEC_JP2)) { av_log(s->avctx, AV_LOG_WARNING, "Forcing lossless jp2 for pal8\n"); - s->pred = FF_DWT97_INT; + s->pred = 1; s->format = CODEC_JP2; } @@ -1759,24 +1762,23 @@ static av_cold int j2kenc_init(AVCodecContext *avctx) s->width = avctx->width; s->height = avctx->height; - for (i = 0; i < 3; i++) { - if (avctx->pix_fmt == AV_PIX_FMT_GRAY16 || avctx->pix_fmt == AV_PIX_FMT_RGB48) - s->cbps[i] = 16; - else - s->cbps[i] = 8; + s->ncomponents = desc->nb_components; + for (i = 0; i < 4; i++) { + s->cbps[i] = desc->comp[i].depth; + s->comp_remap[i] = i; //default } - if (avctx->pix_fmt == AV_PIX_FMT_RGB24 || avctx->pix_fmt == AV_PIX_FMT_RGB48){ - s->ncomponents = 3; - } else if (avctx->pix_fmt == AV_PIX_FMT_GRAY8 || avctx->pix_fmt == AV_PIX_FMT_PAL8 || avctx->pix_fmt == AV_PIX_FMT_GRAY16){ - s->ncomponents = 1; - } else{ // planar YUV + if ((desc->flags & AV_PIX_FMT_FLAG_PLANAR) && s->ncomponents > 1) { s->planar = 1; - s->ncomponents = 3; ret = av_pix_fmt_get_chroma_sub_sample(avctx->pix_fmt, s->chroma_shift, s->chroma_shift + 1); if (ret) return ret; + if (desc->flags & AV_PIX_FMT_FLAG_RGB) { + s->comp_remap[0] = 2; + s->comp_remap[1] = 0; + s->comp_remap[2] = 1; + } } ff_thread_once(&init_static_once, init_luts); @@ -1810,7 +1812,7 @@ static const AVOption options[] = { { "tile_height", "Tile Height", OFFSET(tile_height), AV_OPT_TYPE_INT, { .i64 = 256 }, 1, 1<<30, VE, }, { "pred", "DWT Type", OFFSET(pred), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VE, "pred" }, { "dwt97int", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 0 }, INT_MIN, INT_MAX, VE, "pred" }, - { "dwt53", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 0 }, INT_MIN, INT_MAX, VE, "pred" }, + { "dwt53", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 1 }, INT_MIN, INT_MAX, VE, "pred" }, { "sop", "SOP marker", OFFSET(sop), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VE, }, { "eph", "EPH marker", OFFSET(eph), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VE, }, { "prog", "Progression Order", OFFSET(prog), AV_OPT_TYPE_INT, { .i64 = 0 }, JPEG2000_PGOD_LRCP, JPEG2000_PGOD_CPRL, VE, "prog" }, @@ -1835,17 +1837,30 @@ const FFCodec ff_jpeg2000_encoder = { CODEC_LONG_NAME("JPEG 2000"), .p.type = AVMEDIA_TYPE_VIDEO, .p.id = AV_CODEC_ID_JPEG2000, - .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE, + .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE | + AV_CODEC_CAP_FRAME_THREADS, .priv_data_size = sizeof(Jpeg2000EncoderContext), .init = j2kenc_init, FF_CODEC_ENCODE_CB(encode_frame), .close = j2kenc_destroy, .p.pix_fmts = (const enum AVPixelFormat[]) { - AV_PIX_FMT_RGB24, AV_PIX_FMT_YUV444P, AV_PIX_FMT_GRAY8, - AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV422P, - AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUV411P, + AV_PIX_FMT_RGB24, AV_PIX_FMT_RGB48, + AV_PIX_FMT_GBR24P,AV_PIX_FMT_GBRP9, AV_PIX_FMT_GBRP10, AV_PIX_FMT_GBRP12, AV_PIX_FMT_GBRP14, AV_PIX_FMT_GBRP16, + AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY9, AV_PIX_FMT_GRAY10, AV_PIX_FMT_GRAY12, AV_PIX_FMT_GRAY14, AV_PIX_FMT_GRAY16, + AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV420P9, AV_PIX_FMT_YUV420P10, AV_PIX_FMT_YUV420P12, AV_PIX_FMT_YUV420P14, AV_PIX_FMT_YUV420P16, + AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV422P9, AV_PIX_FMT_YUV422P10, AV_PIX_FMT_YUV422P12, AV_PIX_FMT_YUV422P14, AV_PIX_FMT_YUV422P16, + AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV444P9, AV_PIX_FMT_YUV444P10, AV_PIX_FMT_YUV444P12, AV_PIX_FMT_YUV444P14, AV_PIX_FMT_YUV444P16, + AV_PIX_FMT_YUV440P, AV_PIX_FMT_YUV440P10, AV_PIX_FMT_YUV440P12, + AV_PIX_FMT_YUV411P, + AV_PIX_FMT_YUV410P, + AV_PIX_FMT_YA8, AV_PIX_FMT_YA16, + AV_PIX_FMT_RGBA, AV_PIX_FMT_RGBA64, + AV_PIX_FMT_GBRAP, AV_PIX_FMT_GBRAP10, AV_PIX_FMT_GBRAP12, AV_PIX_FMT_GBRAP16, + AV_PIX_FMT_YUVA420P, AV_PIX_FMT_YUVA420P9, AV_PIX_FMT_YUVA420P10, AV_PIX_FMT_YUVA420P16, + AV_PIX_FMT_YUVA422P, AV_PIX_FMT_YUVA422P9, AV_PIX_FMT_YUVA422P10, AV_PIX_FMT_YUVA422P16, + AV_PIX_FMT_YUVA444P, AV_PIX_FMT_YUVA444P9, AV_PIX_FMT_YUVA444P10, AV_PIX_FMT_YUVA444P16, + AV_PIX_FMT_PAL8, - AV_PIX_FMT_RGB48, AV_PIX_FMT_GRAY16, AV_PIX_FMT_NONE }, .p.priv_class = &j2k_class, diff --git a/arm/android/third_party/ffmpeg/libavcodec/jpeg2000.h b/arm/android/third_party/ffmpeg/libavcodec/jpeg2000.h index e5ecb4cb..d004c08f 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/jpeg2000.h +++ b/arm/android/third_party/ffmpeg/libavcodec/jpeg2000.h @@ -111,7 +111,7 @@ enum Jpeg2000Quantsty { // quantization style #define JPEG2000_CSTY_SOP 0x02 // SOP marker present #define JPEG2000_CSTY_EPH 0x04 // EPH marker present #define JPEG2000_CTSY_HTJ2K_F 0x40 // Only HT code-blocks (Rec. ITU-T T.814 | ISO/IEC 15444-15) are present -#define JPEG2000_CTSY_HTJ2K_M 0xC0 // HT code blocks (Rec. ITU-T T.814 | ISO/IEC 15444-15) can be present +#define JPEG2000_CTSY_HTJ2K_M 0xC0 // HT code-blocks (Rec. ITU-T T.814 | ISO/IEC 15444-15) can be present // Progression orders #define JPEG2000_PGOD_LRCP 0x00 // Layer-resolution level-component-position progression @@ -189,6 +189,9 @@ typedef struct Jpeg2000Cblk { Jpeg2000Pass *passes; Jpeg2000Layer *layers; int coord[2][2]; // border coordinates {{x0, x1}, {y0, y1}} + /* specific to HT code-blocks */ + int zbp; + int pass_lengths[2]; } Jpeg2000Cblk; // code block typedef struct Jpeg2000Prec { diff --git a/arm/android/third_party/ffmpeg/libavcodec/jpeg2000dec.c b/arm/android/third_party/ffmpeg/libavcodec/jpeg2000dec.c index c2b81ec1..0e95cca6 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/jpeg2000dec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/jpeg2000dec.c @@ -42,6 +42,8 @@ #include "jpeg2000.h" #include "jpeg2000dsp.h" #include "profiles.h" +#include "jpeg2000dec.h" +#include "jpeg2000htdec.h" #define JP2_SIG_TYPE 0x6A502020 #define JP2_SIG_VALUE 0x0D0A870A @@ -51,93 +53,6 @@ #define HAD_COC 0x01 #define HAD_QCC 0x02 -#define MAX_POCS 32 - -typedef struct Jpeg2000POCEntry { - uint16_t LYEpoc; - uint16_t CSpoc; - uint16_t CEpoc; - uint8_t RSpoc; - uint8_t REpoc; - uint8_t Ppoc; -} Jpeg2000POCEntry; - -typedef struct Jpeg2000POC { - Jpeg2000POCEntry poc[MAX_POCS]; - int nb_poc; - int is_default; -} Jpeg2000POC; - -typedef struct Jpeg2000TilePart { - uint8_t tile_index; // Tile index who refers the tile-part - const uint8_t *tp_end; - GetByteContext header_tpg; // bit stream of header if PPM header is used - GetByteContext tpg; // bit stream in tile-part -} Jpeg2000TilePart; - -/* RMK: For JPEG2000 DCINEMA 3 tile-parts in a tile - * one per component, so tile_part elements have a size of 3 */ -typedef struct Jpeg2000Tile { - Jpeg2000Component *comp; - uint8_t properties[4]; - Jpeg2000CodingStyle codsty[4]; - Jpeg2000QuantStyle qntsty[4]; - Jpeg2000POC poc; - Jpeg2000TilePart tile_part[32]; - uint8_t has_ppt; // whether this tile has a ppt marker - uint8_t *packed_headers; // contains packed headers. Used only along with PPT marker - int packed_headers_size; // size in bytes of the packed headers - GetByteContext packed_headers_stream; // byte context corresponding to packed headers - uint16_t tp_idx; // Tile-part index - int coord[2][2]; // border coordinates {{x0, x1}, {y0, y1}} -} Jpeg2000Tile; - -typedef struct Jpeg2000DecoderContext { - AVClass *class; - AVCodecContext *avctx; - GetByteContext g; - - int width, height; - int image_offset_x, image_offset_y; - int tile_offset_x, tile_offset_y; - uint8_t cbps[4]; // bits per sample in particular components - uint8_t sgnd[4]; // if a component is signed - uint8_t properties[4]; - - uint8_t has_ppm; - uint8_t *packed_headers; // contains packed headers. Used only along with PPM marker - int packed_headers_size; - GetByteContext packed_headers_stream; - uint8_t in_tile_headers; - - int cdx[4], cdy[4]; - int precision; - int ncomponents; - int colour_space; - uint32_t palette[256]; - int8_t pal8; - int cdef[4]; - int tile_width, tile_height; - unsigned numXtiles, numYtiles; - int maxtilelen; - AVRational sar; - - Jpeg2000CodingStyle codsty[4]; - Jpeg2000QuantStyle qntsty[4]; - Jpeg2000POC poc; - uint8_t roi_shift[4]; - - int bit_index; - - int curtileno; - - Jpeg2000Tile *tile; - Jpeg2000DSPContext dsp; - - /*options parameters*/ - int reduction_factor; -} Jpeg2000DecoderContext; - /* get_bits functions for JPEG2000 packet bitstream * It is a get_bit function with a bit-stuffing routine. If the value of the * byte is 0xFF, the next byte includes an extra zero bit stuffed into the MSB. @@ -449,6 +364,10 @@ static int get_siz(Jpeg2000DecoderContext *s) s->cdx[0] == s->cdx[1] && s->cdy[0] == s->cdy[1]) { s->avctx->pix_fmt = AV_PIX_FMT_YA8; i = 0; + } else if (ncomponents == 2 && s->precision == 16 && + s->cdx[0] == s->cdx[1] && s->cdy[0] == s->cdy[1]) { + s->avctx->pix_fmt = AV_PIX_FMT_YA16; + i = 0; } else if (ncomponents == 1 && s->precision == 8) { s->avctx->pix_fmt = AV_PIX_FMT_GRAY8; i = 0; @@ -522,12 +441,12 @@ static int get_cox(Jpeg2000DecoderContext *s, Jpeg2000CodingStyle *c) c->cblk_style = bytestream2_get_byteu(&s->g); if (c->cblk_style != 0) { // cblk style if (c->cblk_style & JPEG2000_CTSY_HTJ2K_M || c->cblk_style & JPEG2000_CTSY_HTJ2K_F) { - av_log(s->avctx, AV_LOG_ERROR, "Support for High throughput JPEG 2000 is not yet available\n"); - return AVERROR_PATCHWELCOME; + av_log(s->avctx,AV_LOG_TRACE,"High Throughput jpeg 2000 codestream.\n"); + } else { + av_log(s->avctx, AV_LOG_WARNING, "extra cblk styles %X\n", c->cblk_style); + if (c->cblk_style & JPEG2000_CBLK_BYPASS) + av_log(s->avctx, AV_LOG_WARNING, "Selective arithmetic coding bypass\n"); } - av_log(s->avctx, AV_LOG_WARNING, "extra cblk styles %X\n", c->cblk_style); - if (c->cblk_style & JPEG2000_CBLK_BYPASS) - av_log(s->avctx, AV_LOG_WARNING, "Selective arithmetic coding bypass\n"); } c->transform = bytestream2_get_byteu(&s->g); // DWT transformation type /* set integer 9/7 DWT in case of BITEXACT flag */ @@ -1152,13 +1071,15 @@ static int jpeg2000_decode_packet(Jpeg2000DecoderContext *s, Jpeg2000Tile *tile, return incl; if (!cblk->npasses) { - int v = expn[bandno] + numgbits - 1 - - tag_tree_decode(s, prec->zerobits + cblkno, 100); + int zbp = tag_tree_decode(s, prec->zerobits + cblkno, 100); + int v = expn[bandno] + numgbits - 1 - zbp; + if (v < 0 || v > 30) { av_log(s->avctx, AV_LOG_ERROR, "nonzerobits %d invalid or unsupported\n", v); return AVERROR_INVALIDDATA; } + cblk->zbp = zbp; cblk->nonzerobits = v; } if ((newpasses = getnpasses(s)) < 0) @@ -1199,8 +1120,23 @@ static int jpeg2000_decode_packet(Jpeg2000DecoderContext *s, Jpeg2000Tile *tile, } } - if ((ret = get_bits(s, av_log2(newpasses1) + cblk->lblock)) < 0) - return ret; + if (newpasses > 1 && (codsty->cblk_style & JPEG2000_CTSY_HTJ2K_F)) { + // Retrieve pass lengths for each pass + int href_passes = (cblk->npasses + newpasses - 1) % 3; + int eb = av_log2(newpasses - href_passes); + int extra_bit = newpasses > 2 ? 1 : 0; + if ((ret = get_bits(s, llen + eb + 3)) < 0) + return ret; + cblk->pass_lengths[0] = ret; + if ((ret = get_bits(s, llen + 3 + extra_bit)) < 0) + return ret; + cblk->pass_lengths[1] = ret; + ret = cblk->pass_lengths[0] + cblk->pass_lengths[1]; + } else { + if ((ret = get_bits(s, av_log2(newpasses1) + cblk->lblock)) < 0) + return ret; + cblk->pass_lengths[0] = ret; + } if (ret > cblk->data_allocated) { size_t new_size = FFMAX(2*cblk->data_allocated, ret); void *new = av_realloc(cblk->data, new_size); @@ -1949,9 +1885,12 @@ static inline void tile_codeblocks(const Jpeg2000DecoderContext *s, Jpeg2000Tile /* Loop on tile components */ for (compno = 0; compno < s->ncomponents; compno++) { - Jpeg2000Component *comp = tile->comp + compno; - Jpeg2000CodingStyle *codsty = tile->codsty + compno; + Jpeg2000Component *comp = tile->comp + compno; + Jpeg2000CodingStyle *codsty = tile->codsty + compno; + Jpeg2000QuantStyle *quantsty = tile->qntsty + compno; + int coded = 0; + int subbandno = 0; t1.stride = (1<log2_cblk_width) + 2; @@ -1959,7 +1898,7 @@ static inline void tile_codeblocks(const Jpeg2000DecoderContext *s, Jpeg2000Tile for (reslevelno = 0; reslevelno < codsty->nreslevels2decode; reslevelno++) { Jpeg2000ResLevel *rlevel = comp->reslevel + reslevelno; /* Loop on bands */ - for (bandno = 0; bandno < rlevel->nbands; bandno++) { + for (bandno = 0; bandno < rlevel->nbands; bandno++, subbandno++) { int nb_precincts, precno; Jpeg2000Band *band = rlevel->band + bandno; int cblkno = 0, bandpos; @@ -1979,12 +1918,23 @@ static inline void tile_codeblocks(const Jpeg2000DecoderContext *s, Jpeg2000Tile for (cblkno = 0; cblkno < prec->nb_codeblocks_width * prec->nb_codeblocks_height; cblkno++) { - int x, y; + int x, y, ret; + /* See Rec. ITU-T T.800, Equation E-2 */ + int magp = quantsty->expn[subbandno] + quantsty->nguardbits - 1; + Jpeg2000Cblk *cblk = prec->cblk + cblkno; - int ret = decode_cblk(s, codsty, &t1, cblk, - cblk->coord[0][1] - cblk->coord[0][0], - cblk->coord[1][1] - cblk->coord[1][0], - bandpos, comp->roi_shift); + + if (codsty->cblk_style & JPEG2000_CTSY_HTJ2K_F) + ret = ff_jpeg2000_decode_htj2k(s, codsty, &t1, cblk, + cblk->coord[0][1] - cblk->coord[0][0], + cblk->coord[1][1] - cblk->coord[1][0], + magp, comp->roi_shift); + else + ret = decode_cblk(s, codsty, &t1, cblk, + cblk->coord[0][1] - cblk->coord[0][0], + cblk->coord[1][1] - cblk->coord[1][0], + bandpos, comp->roi_shift); + if (ret) coded = 1; else @@ -2532,7 +2482,7 @@ static int jpeg2000_decode_frame(AVCodecContext *avctx, AVFrame *picture, if ((ret = ff_thread_get_buffer(avctx, picture, 0)) < 0) goto end; picture->pict_type = AV_PICTURE_TYPE_I; - picture->key_frame = 1; + picture->flags |= AV_FRAME_FLAG_KEY; if (ret = jpeg2000_read_bitstream_packets(s)) goto end; diff --git a/arm/android/third_party/ffmpeg/libavcodec/jpeg2000dec.h b/arm/android/third_party/ffmpeg/libavcodec/jpeg2000dec.h new file mode 100644 index 00000000..d0ca6e7a --- /dev/null +++ b/arm/android/third_party/ffmpeg/libavcodec/jpeg2000dec.h @@ -0,0 +1,119 @@ +/* + * JPEG 2000 image decoder + * Copyright (c) 2007 Kamil Nowosad + * Copyright (c) 2013 Nicolas Bertrand + * Copyright (c) 2022 Caleb Etemesi + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_JPEG2000DEC_H +#define AVCODEC_JPEG2000DEC_H + +#include "bytestream.h" +#include "jpeg2000.h" +#include "jpeg2000dsp.h" + + +#define MAX_POCS 32 + +typedef struct Jpeg2000POCEntry { + uint16_t LYEpoc; + uint16_t CSpoc; + uint16_t CEpoc; + uint8_t RSpoc; + uint8_t REpoc; + uint8_t Ppoc; +} Jpeg2000POCEntry; + +typedef struct Jpeg2000POC { + Jpeg2000POCEntry poc[MAX_POCS]; + int nb_poc; + int is_default; +} Jpeg2000POC; + +typedef struct Jpeg2000TilePart { + uint8_t tile_index; // Tile index who refers the tile-part + const uint8_t *tp_end; + GetByteContext header_tpg; // bit stream of header if PPM header is used + GetByteContext tpg; // bit stream in tile-part +} Jpeg2000TilePart; + +/* RMK: For JPEG2000 DCINEMA 3 tile-parts in a tile + * one per component, so tile_part elements have a size of 3 */ +typedef struct Jpeg2000Tile { + Jpeg2000Component *comp; + uint8_t properties[4]; + Jpeg2000CodingStyle codsty[4]; + Jpeg2000QuantStyle qntsty[4]; + Jpeg2000POC poc; + Jpeg2000TilePart tile_part[32]; + uint8_t has_ppt; // whether this tile has a ppt marker + uint8_t *packed_headers; // contains packed headers. Used only along with PPT marker + int packed_headers_size; // size in bytes of the packed headers + GetByteContext packed_headers_stream; // byte context corresponding to packed headers + uint16_t tp_idx; // Tile-part index + int coord[2][2]; // border coordinates {{x0, x1}, {y0, y1}} +} Jpeg2000Tile; + +typedef struct Jpeg2000DecoderContext { + AVClass *class; + AVCodecContext *avctx; + GetByteContext g; + + int width, height; + int image_offset_x, image_offset_y; + int tile_offset_x, tile_offset_y; + uint8_t cbps[4]; // bits per sample in particular components + uint8_t sgnd[4]; // if a component is signed + uint8_t properties[4]; + + uint8_t has_ppm; + uint8_t *packed_headers; // contains packed headers. Used only along with PPM marker + int packed_headers_size; + GetByteContext packed_headers_stream; + uint8_t in_tile_headers; + + int cdx[4], cdy[4]; + int precision; + int ncomponents; + int colour_space; + uint32_t palette[256]; + int8_t pal8; + int cdef[4]; + int tile_width, tile_height; + unsigned numXtiles, numYtiles; + int maxtilelen; + AVRational sar; + + Jpeg2000CodingStyle codsty[4]; + Jpeg2000QuantStyle qntsty[4]; + Jpeg2000POC poc; + uint8_t roi_shift[4]; + + int bit_index; + + int curtileno; + + Jpeg2000Tile *tile; + Jpeg2000DSPContext dsp; + + /*options parameters*/ + int reduction_factor; +} Jpeg2000DecoderContext; + +#endif //AVCODEC_JPEG2000DEC_H diff --git a/arm/android/third_party/ffmpeg/libavcodec/jpeg2000htdec.c b/arm/android/third_party/ffmpeg/libavcodec/jpeg2000htdec.c new file mode 100644 index 00000000..51cd96e0 --- /dev/null +++ b/arm/android/third_party/ffmpeg/libavcodec/jpeg2000htdec.c @@ -0,0 +1,1451 @@ +/* + * Copyright (c) 2022 Caleb Etemesi + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/* + * Copyright 2019 - 2021, Osamu Watanabe + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its contributors + * may be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include "libavutil/attributes.h" +#include "libavutil/common.h" +#include "libavutil/avassert.h" +#include "jpeg2000htdec.h" +#include "jpeg2000.h" +#include "jpeg2000dec.h" + +#define J2K_Q1 0 +#define J2K_Q2 1 + +#define HT_SHIFT_SIGMA 0 +#define HT_SHIFT_SCAN 4 +#define HT_SHIFT_REF 3 +#define HT_SHIFT_REF_IND 2 + +/* See Rec. ITU-T T.800, Table 2 */ +const static uint8_t mel_e[13] = { 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 4, 5 }; + +static const uint16_t dec_cxt_vlc_table1[1024]; +static const uint16_t dec_cxt_vlc_table0[1024]; + +typedef struct StateVars { + int32_t pos; + uint32_t bits; + uint32_t tmp; + uint32_t last; + uint8_t bits_left; + uint64_t bit_buf; +} StateVars; + +typedef struct MelDecoderState { + uint8_t k; + uint8_t run; + uint8_t one; +} MelDecoderState; + +/** + * Given a precomputed c, checks whether n % d == 0. c is precomputed from d + * using precompute_c(). + */ +av_always_inline +static uint32_t is_divisible(uint32_t n, uint64_t c) +{ + return n * c <= c - 1; +} + +/** + * Precompute the number c used by is_divisible(). + */ +av_always_inline +static uint64_t precompute_c(uint32_t d) +{ + return 1 + (0xffffffffffffffffull / d); +} + +static void jpeg2000_init_zero(StateVars *s) +{ + s->bits_left = 0; + s->bit_buf = 0; + s->tmp = 0; + s->bits = 0; + s->pos = 0; + s->last = 0; +} + +static void jpeg2000_init_mel(StateVars *s, uint32_t Pcup) +{ + jpeg2000_init_zero(s); + s->pos = Pcup; +} + +static void jpeg2000_init_mag_ref(StateVars *s, uint32_t Lref) +{ + s->pos = Lref - 2; + s->bits = 0; + s->last = 0xFF; + s->tmp = 0; + s->bits_left = 0; + s->bit_buf = 0; +} + +static void jpeg2000_init_mel_decoder(MelDecoderState *mel_state) +{ + mel_state->k = 0; + mel_state->run = 0; + mel_state->one = 0; +} + +/** + * Refill the buffer backwards in little endian while skipping over stuffing + * bits. Stuffing bits are those that appear in the position of any byte whose + * LSBs are all 1's if the last consumed byte was larger than 0x8F. + */ +static int jpeg2000_bitbuf_refill_backwards(StateVars *buffer, const uint8_t *array) +{ + uint64_t tmp = 0; + int32_t position = buffer->pos; + uint32_t new_bits = 32; + + if (buffer->bits_left >= 32) + return 0; // enough data, no need to pull in more bits + + /** + * We are reading bytes from end to start and need to handle being close to + * the end. Subtracting by 4 means we will read some of the bytes of the MEL + * byte stream since the MEL byte stream ends at the start of the VLC byte + * stream. This is okay as they are masked away since we check for cases + * where that occurs (when the position is less than 4). + */ + position -= 4; + + tmp = AV_RB32(&array[position + 1]); + + if (buffer->pos < 4){ + /* mask un-needed bits if we are close to input end */ + uint64_t mask = (1ull << (buffer->pos + 1) * 8) - 1; + tmp &= mask; + } + + /** + * Unstuff bits. Load a temporary byte, which precedes the position we + * currently at, to ensure that we can also un-stuff if the stuffed bit is + * the bottom most bits. + */ + tmp <<= 8; + tmp |= array[buffer->pos + 1]; + + if ((tmp & 0x7FFF000000) > 0x7F8F000000) { + tmp &= 0x7FFFFFFFFF; + new_bits--; + } + if ((tmp & 0x007FFF0000) > 0x007F8F0000) { + tmp = (tmp & 0x007FFFFFFF) + ((tmp & 0xFF00000000) >> 1); + new_bits--; + } + if ((tmp & 0x00007FFF00) > 0x00007F8F00) { + tmp = (tmp & 0x00007FFFFF) + ((tmp & 0xFFFF000000) >> 1); + new_bits--; + } + if ((tmp & 0x0000007FFF) > 0x0000007F8F) { + tmp = (tmp & 0x0000007FFF) + ((tmp & 0xFFFFFF0000) >> 1); + new_bits--; + } + + tmp >>= 8; // Remove temporary byte loaded + + /* Add bits to the MSB of the bit buffer */ + buffer->bit_buf |= tmp << buffer->bits_left; + buffer->bits_left += new_bits; + buffer->pos = FFMAX(0, position); + return 0; +} + +/** + * Refill the bit-buffer reading new bits going forward + * in the stream while skipping over stuffed bits. + */ +static void jpeg2000_bitbuf_refill_forward(StateVars *buffer, const uint8_t *array, + uint32_t length) +{ + while (buffer->bits_left < 32) { + buffer->tmp = 0xFF; + buffer->bits = (buffer->last == 0xFF) ? 7 : 8; + if (buffer->pos <= length) { + buffer->tmp = array[buffer->pos]; + buffer->pos += 1; + buffer->last = buffer->tmp; + } + buffer->bit_buf |= ((uint64_t) buffer->tmp) << buffer->bits_left; + buffer->bits_left += buffer->bits; + } +} + +/** + * Drops bits from lower bits in the bit buffer. buf contains the bit buffers. + * nbits is the number of bits to remove. + */ +av_always_inline +static void jpeg2000_bitbuf_drop_bits_lsb(StateVars *buf, uint8_t nbits) +{ + av_assert2(buf->bits_left >= nbits); // cannot read more bits than available + buf->bit_buf >>= nbits; + buf->bits_left -= nbits; +} + +/** + * Get bits from the bit buffer reading them from the least significant bits + * moving to the most significant bits. In case there are fewer bits, refill + * from buf moving backwards. + */ +av_always_inline +static uint64_t jpeg2000_bitbuf_get_bits_lsb(StateVars *bit_stream, uint8_t nbits, + const uint8_t *buf) +{ + uint64_t bits; + uint64_t mask = (1ull << nbits) - 1; + if (bit_stream->bits_left < nbits) + jpeg2000_bitbuf_refill_backwards(bit_stream, buf); + bits = bit_stream->bit_buf & mask; + jpeg2000_bitbuf_drop_bits_lsb(bit_stream, nbits); + return bits; +} + +/** + * Get bits from the bit buffer reading them from the least significant bits + * moving to the most significant bits. In case there are fewer bits, refill from + * buf moving forward. + */ +av_always_inline +static uint64_t jpeg2000_bitbuf_get_bits_lsb_forward(StateVars *bit_stream, + uint8_t nbits, const uint8_t *buf, + uint32_t length) +{ + uint64_t bits; + uint64_t mask = (1ull << nbits) - 1; + + if (bit_stream->bits_left <= nbits) + jpeg2000_bitbuf_refill_forward(bit_stream, buf, length); + bits = bit_stream->bit_buf & mask; + jpeg2000_bitbuf_drop_bits_lsb(bit_stream, nbits); + return bits; +} + +/** + * Look ahead bit buffer without discarding bits. + */ +av_always_inline +static uint64_t jpeg2000_bitbuf_peek_bits_lsb(StateVars *stream, uint8_t nbits) +{ + uint64_t mask = (1ull << nbits) - 1; + return stream->bit_buf & mask; +} + +static void jpeg2000_init_vlc(StateVars *s, uint32_t Lcup, uint32_t Pcup, + const uint8_t *Dcup) +{ + s->bits_left = 0; + s->bit_buf = 0; + s->pos = Lcup - 2 - Pcup; + s->last = Dcup[Lcup - 2]; + s->tmp = (s->last) >> 4; + s->bits = ((s->tmp & 7) < 7) ? 4 : 3; + + jpeg2000_bitbuf_refill_backwards(s, Dcup + Pcup); + jpeg2000_bitbuf_drop_bits_lsb(s, 4); +} + +/** + * Decode prefix codes for VLC segment. See Rec. ITU-T T.814, 7.3.5. + */ +av_always_inline +static int jpeg2000_decode_ctx_vlc(const Jpeg2000DecoderContext *s, + StateVars *vlc_stream, const uint16_t *table, + const uint8_t *Dcup, uint8_t *sig_pat, + uint8_t *res_off, uint8_t *emb_pat_k, + uint8_t *emb_pat_1, uint8_t pos, + uint32_t Pcup, uint16_t context) +{ + uint32_t value; + uint8_t len; + uint64_t index; + uint64_t code_word; + + jpeg2000_bitbuf_refill_backwards(vlc_stream, Dcup + Pcup); + + code_word = vlc_stream->bit_buf & 0x7f; + index = code_word + (context << 7); + + av_assert0(index < 1024); // The CxtVLC table has 1024 entries. + + value = table[index]; + + len = (value & 0x000F) >> 1; + + res_off[pos] = (uint8_t) (value & 1); + sig_pat[pos] = (uint8_t) ((value & 0x00F0) >> 4); + emb_pat_k[pos] = (uint8_t) ((value & 0x0F00) >> 8); + emb_pat_1[pos] = (uint8_t) ((value & 0xF000) >> 12); + + jpeg2000_bitbuf_drop_bits_lsb(vlc_stream, len); + return 0; +} + +/** + * Decode variable length u-vlc prefix. See decodeUPrefix procedure at Rec. + * ITU-T T.814, 7.3.6. + */ +av_always_inline +static uint8_t vlc_decode_u_prefix(StateVars *vlc_stream, const uint8_t *refill_array) +{ + static const uint8_t return_value[8] = { 5, 1, 2, 1, 3, 1, 2, 1 }; + static const uint8_t drop_bits[8] = { 3, 1, 2, 1, 3, 1, 2, 1 }; + + uint8_t bits; + + if (vlc_stream->bits_left < 3) + jpeg2000_bitbuf_refill_backwards(vlc_stream, refill_array); + + bits = jpeg2000_bitbuf_peek_bits_lsb(vlc_stream, 3); + + jpeg2000_bitbuf_drop_bits_lsb(vlc_stream, drop_bits[bits]); + return return_value[bits]; +} + +/** + * Decode variable length u-vlc suffix. See decodeUSuffix procedure at Rec. + * ITU-T T.814, 7.3.6. + */ +av_always_inline +static uint8_t vlc_decode_u_suffix(StateVars *vlc_stream, uint8_t suffix, + const uint8_t *refill_array) +{ + static const int mask[] = { 1, 31 }; + static const int drop_bits[] = { 1, 5 }; + + uint8_t bits; + int cond = suffix != 3; + if (suffix < 3) + return 0; + + if (vlc_stream->bits_left < 5) + jpeg2000_bitbuf_refill_backwards(vlc_stream, refill_array); + + bits = jpeg2000_bitbuf_peek_bits_lsb(vlc_stream, 5); + + jpeg2000_bitbuf_drop_bits_lsb(vlc_stream, drop_bits[cond]); + return bits & mask[cond]; +} + +/** + * Decode u-vlc extension values. See decodeUExtension procedure at Rec. ITU-T + * T.814, 7.3.6. + */ +av_always_inline +static uint8_t vlc_decode_u_extension(StateVars *vlc_stream, uint8_t suffix, + const uint8_t *refill_array) +{ + return jpeg2000_bitbuf_get_bits_lsb(vlc_stream, 4 * (suffix >= 28), refill_array); +} + +/** + * Magnitude and Sign decode procedures. See decodeMagSgnValue procedure at Rec. + * ITU-T T.814, 7.3.8. + */ +av_always_inline +static int32_t jpeg2000_decode_mag_sgn(StateVars *mag_sgn_stream, int32_t m_n, + int32_t i_n, const uint8_t *buf, uint32_t length) +{ + int32_t val = 0; + if (m_n > 0) { + val = jpeg2000_bitbuf_get_bits_lsb_forward(mag_sgn_stream,m_n,buf,length); + val += (i_n << m_n); + } + return val; +} + +av_always_inline +static void recover_mag_sgn(StateVars *mag_sgn, uint8_t pos, uint16_t q, int32_t m_n[2], + int32_t known_1[2], const uint8_t emb_pat_1[2], + int32_t v[2][4], int32_t m[2][4], uint8_t *E, + uint32_t *mu_n, const uint8_t *Dcup, uint32_t Pcup, + uint32_t pLSB) +{ + for (int i = 0; i < 4; i++) { + int32_t n = 4 * q + i; + m_n[pos] = m[pos][i]; + known_1[pos] = (emb_pat_1[pos] >> i) & 1; + v[pos][i] = jpeg2000_decode_mag_sgn(mag_sgn, m_n[pos], known_1[pos], Dcup, Pcup); + + if (m_n[pos] != 0) { + E[n] = 32 - ff_clz(v[pos][i] | 1); + mu_n[n] = (v[pos][i] >> 1) + 1; + mu_n[n] <<= pLSB; + mu_n[n] |= ((uint32_t) (v[pos][i] & 1)) << 31; // sign bit. + } + } +} + +static int jpeg2000_import_bit(StateVars *stream, const uint8_t *array, uint32_t length) +{ + int cond = stream->pos <= length; + int pos = FFMIN(stream->pos, length); + if (stream->bits == 0) { + stream->bits = (stream->tmp == 0xFF) ? 7 : 8; + stream->pos += cond; + stream->tmp = cond ? array[pos] : 0xFF; + } + stream->bits -= 1; + return (stream->tmp >> stream->bits) & 1; +} + +static int jpeg2000_peek_bit(StateVars *stream, const uint8_t *array, uint32_t length) +{ + if (stream->bits == 0) { + int cond = stream->pos <= length; + int pos = FFMIN(stream->pos, length); + stream->bits = (stream->tmp == 0xFF) ? 7 : 8; + stream->pos += cond; + stream->tmp = cond ? array[pos] : 0xFF; + } + return (stream->tmp >> stream->bits) & 1; +} + +static int jpeg2000_decode_mel_sym(MelDecoderState *mel_state, + StateVars *mel_stream, + const uint8_t *Dcup, + uint32_t Lcup) +{ + + if (mel_state->run == 0 && mel_state->one == 0) { + uint8_t eval; + uint8_t bit; + + eval = mel_e[mel_state->k]; + bit = jpeg2000_import_bit(mel_stream, Dcup, Lcup); + if (bit == 1) { + mel_state->run = 1 << eval; + mel_state->k = FFMIN(12, mel_state->k + 1); + } else { + mel_state->run = 0; + while (eval > 0) { + bit = jpeg2000_import_bit(mel_stream, Dcup, Lcup); + mel_state->run = (2 * (mel_state->run)) + bit; + eval -= 1; + } + mel_state->k = FFMAX(0, mel_state->k - 1); + mel_state->one = 1; + } + } + if (mel_state->run > 0) { + mel_state->run -= 1; + return 0; + } else { + mel_state->one = 0; + return 1; + } +} + +/** + * Magref decoding procedures. + */ +av_always_inline +static int jpeg2000_import_magref_bit(StateVars *stream, const uint8_t *array, + uint32_t length) +{ + return jpeg2000_bitbuf_get_bits_lsb(stream, 1, array); +} + +/** + * Signal EMB decode. + */ +static int jpeg2000_decode_sig_emb(const Jpeg2000DecoderContext *s, MelDecoderState *mel_state, + StateVars *mel_stream, StateVars *vlc_stream, + const uint16_t *vlc_table, const uint8_t *Dcup, + uint8_t *sig_pat, uint8_t *res_off, uint8_t *emb_pat_k, + uint8_t *emb_pat_1, uint8_t pos, uint16_t context, + uint32_t Lcup, uint32_t Pcup) +{ + if (context == 0) { + uint8_t sym; + sym = jpeg2000_decode_mel_sym(mel_state, mel_stream, Dcup, Lcup); + if (sym == 0) { + sig_pat[pos] = 0; + res_off[pos] = 0; + emb_pat_k[pos] = 0; + emb_pat_1[pos] = 0; + return 0; + } + } + return jpeg2000_decode_ctx_vlc(s, vlc_stream, vlc_table, Dcup, sig_pat, + res_off, emb_pat_k, emb_pat_1, pos, Pcup, + context); +} + +av_always_inline +static int jpeg2000_get_state(int x1, int x2, int width, int shift_by, + const uint8_t *block_states) +{ + return (block_states[(x1 + 1) * (width + 2) + (x2 + 1)] >> shift_by) & 1; +} + +av_always_inline +static void jpeg2000_modify_state(int x1, int x2, int width, + int value, uint8_t *block_states) +{ + block_states[(x1 + 1) * (width + 2) + (x2 + 1)] |= value; +} + +av_always_inline +static int jpeg2000_decode_ht_cleanup_segment(const Jpeg2000DecoderContext *s, + Jpeg2000Cblk *cblk, Jpeg2000T1Context *t1, + MelDecoderState *mel_state, + StateVars *mel_stream, StateVars *vlc_stream, + StateVars *mag_sgn_stream, const uint8_t *Dcup, + uint32_t Lcup, uint32_t Pcup, uint8_t pLSB, + int width, int height, int32_t *sample_buf, + uint8_t *block_states) +{ + uint16_t q = 0; // Represents current quad position + uint16_t q1, q2; + uint16_t context1, context2; + uint16_t context = 0; + + uint8_t sig_pat[2] = { 0 }; // significance pattern + uint8_t res_off[2] = { 0 }; // residual offset + uint8_t emb_pat_k[2] = { 0 }; // exponent Max Bound pattern K + uint8_t emb_pat_1[2] = { 0 }; // exponent Max Bound pattern 1 + uint8_t gamma[2] = { 0 }; + + uint8_t E_n[2] = { 0 }; + uint8_t E_ne[2] = { 0 }; + uint8_t E_nw[2] = { 0 }; + uint8_t E_nf[2] = { 0 }; + + uint8_t max_e[2] = { 0 }; + uint8_t u_pfx[2] = { 0 }; + uint8_t u_sfx[2] = { 0 }; + uint8_t u_ext[2] = { 0 }; + + int32_t u[2] = { 0 }; + int32_t U[2] = { 0 }; // exponent bound + int32_t m_n[2] = { 0 }; + int32_t known_1[2] = { 0 }; + + int32_t m[2][4] = { 0 }; + int32_t v[2][4] = { 0 }; + + uint8_t kappa[2] = { 1, 1 }; + + int ret = 0; + + int sp; + + uint64_t c; + + uint8_t *sigma; + uint32_t *mu; + + const uint8_t *vlc_buf = Dcup + Pcup; + + /* convert to raster-scan */ + const uint16_t is_border_x = width % 2; + const uint16_t is_border_y = height % 2; + + const uint16_t quad_width = ff_jpeg2000_ceildivpow2(width, 1); + const uint16_t quad_height = ff_jpeg2000_ceildivpow2(height, 1); + + size_t buf_size = 4 * quad_width * quad_height; + + uint8_t *sigma_n = av_calloc(buf_size, sizeof(uint8_t)); + uint8_t *E = av_calloc(buf_size, sizeof(uint8_t)); + uint32_t *mu_n = av_calloc(buf_size, sizeof(uint32_t)); + + if (!sigma_n || !E || !mu_n) { + ret = AVERROR(ENOMEM); + goto free; + } + + sigma = sigma_n; + mu = mu_n; + + while (q < quad_width - 1) { + q1 = q; + q2 = q1 + 1; + + if ((ret = jpeg2000_decode_sig_emb(s, mel_state, mel_stream, vlc_stream, + dec_cxt_vlc_table0, Dcup, sig_pat, res_off, + emb_pat_k, emb_pat_1, J2K_Q1, context, Lcup, + Pcup)) < 0) + goto free; + + for (int i = 0; i < 4; i++) + sigma_n[4 * q1 + i] = (sig_pat[J2K_Q1] >> i) & 1; + + /* calculate context */ + context = sigma_n[4 * q1]; // f + context |= sigma_n[4 * q1 + 1]; // sf + context += sigma_n[4 * q1 + 2] << 1; // w << 1 + context += sigma_n[4 * q1 + 3] << 2; + + if ((ret = jpeg2000_decode_sig_emb(s, mel_state, mel_stream, vlc_stream, + dec_cxt_vlc_table0, Dcup, sig_pat, res_off, + emb_pat_k, emb_pat_1, J2K_Q2, context, Lcup, + Pcup)) < 0) + goto free; + + for (int i = 0; i < 4; i++) + sigma_n[4 * q2 + i] = (sig_pat[J2K_Q2] >> i) & 1; + + /* calculate context for the next quad */ + context = sigma_n[4 * q2]; // f + context |= sigma_n[4 * q2 + 1]; // sf + context += sigma_n[4 * q2 + 2] << 1; // w << 1 + context += sigma_n[4 * q2 + 3] << 2; // sw << 2 + + u[0] = 0; + u[1] = 0; + + jpeg2000_bitbuf_refill_backwards(vlc_stream, vlc_buf); + + if (res_off[J2K_Q1] == 1 && res_off[J2K_Q2] == 1) { + + if (jpeg2000_decode_mel_sym(mel_state, mel_stream, Dcup, Lcup) == 1) { + + u_pfx[J2K_Q1] = vlc_decode_u_prefix(vlc_stream, vlc_buf); + u_pfx[J2K_Q2] = vlc_decode_u_prefix(vlc_stream, vlc_buf); + + u_sfx[J2K_Q1] = vlc_decode_u_suffix(vlc_stream, u_pfx[J2K_Q1], vlc_buf); + u_sfx[J2K_Q2] = vlc_decode_u_suffix(vlc_stream, u_pfx[J2K_Q2], vlc_buf); + + u_ext[J2K_Q1] = vlc_decode_u_extension(vlc_stream, u_sfx[J2K_Q1], vlc_buf); + u_ext[J2K_Q2] = vlc_decode_u_extension(vlc_stream, u_sfx[J2K_Q2], vlc_buf); + + u[J2K_Q1] = 2 + u_pfx[J2K_Q1] + u_sfx[J2K_Q1] + (u_ext[J2K_Q1] * 4); + u[J2K_Q2] = 2 + u_pfx[J2K_Q2] + u_sfx[J2K_Q2] + (u_ext[J2K_Q2] * 4); + + } else { + u_pfx[J2K_Q1] = vlc_decode_u_prefix(vlc_stream, vlc_buf); + + if (u_pfx[J2K_Q1] > 2) { + u[J2K_Q2] = jpeg2000_bitbuf_get_bits_lsb(vlc_stream, 1, vlc_buf) + 1; + u_sfx[J2K_Q1] = vlc_decode_u_suffix(vlc_stream, u_pfx[J2K_Q1], vlc_buf); + u_ext[J2K_Q1] = vlc_decode_u_extension(vlc_stream, u_sfx[J2K_Q1], vlc_buf); + } else { + u_pfx[J2K_Q2] = vlc_decode_u_prefix(vlc_stream, vlc_buf); + u_sfx[J2K_Q1] = vlc_decode_u_suffix(vlc_stream, u_pfx[J2K_Q1], vlc_buf); + u_sfx[J2K_Q2] = vlc_decode_u_suffix(vlc_stream, u_pfx[J2K_Q2], vlc_buf); + u_ext[J2K_Q1] = vlc_decode_u_extension(vlc_stream, u_sfx[J2K_Q1], vlc_buf); + u_ext[J2K_Q2] = vlc_decode_u_extension(vlc_stream, u_sfx[J2K_Q2], vlc_buf); + u[J2K_Q2] = u_pfx[J2K_Q2] + u_sfx[J2K_Q2] + (u_ext[J2K_Q2] * 4); + } + /* See Rec. ITU-T T.814, 7.3.6(3) */ + u[J2K_Q1] = u_pfx[J2K_Q1] + u_sfx[J2K_Q1] + (u_ext[J2K_Q1] * 4); + } + + } else if (res_off[J2K_Q1] == 1 || res_off[J2K_Q2] == 1) { + uint8_t pos = res_off[J2K_Q1] == 1 ? 0 : 1; + u_pfx[pos] = vlc_decode_u_prefix(vlc_stream, vlc_buf); + u_sfx[pos] = vlc_decode_u_suffix(vlc_stream, u_pfx[pos], vlc_buf); + u_ext[pos] = vlc_decode_u_extension(vlc_stream, u_sfx[pos], vlc_buf); + u[pos] = u_pfx[pos] + u_sfx[pos] + (u_ext[pos] * 4); + } + U[J2K_Q1] = kappa[J2K_Q1] + u[J2K_Q1]; + U[J2K_Q2] = kappa[J2K_Q2] + u[J2K_Q2]; + + for (int i = 0; i < 4; i++) { + m[J2K_Q1][i] = sigma_n[4 * q1 + i] * U[J2K_Q1] - ((emb_pat_k[J2K_Q1] >> i) & 1); + m[J2K_Q2][i] = sigma_n[4 * q2 + i] * U[J2K_Q2] - ((emb_pat_k[J2K_Q2] >> i) & 1); + } + + recover_mag_sgn(mag_sgn_stream, J2K_Q1, q1, m_n, known_1, emb_pat_1, v, m, + E, mu_n, Dcup, Pcup, pLSB); + + recover_mag_sgn(mag_sgn_stream, J2K_Q2, q2, m_n, known_1, emb_pat_1, v, m, + E, mu_n, Dcup, Pcup, pLSB); + + q += 2; // Move to the next quad pair + } + + if (quad_width % 2 == 1) { + q1 = q; + + if ((ret = jpeg2000_decode_sig_emb(s, mel_state, mel_stream, vlc_stream, + dec_cxt_vlc_table0, Dcup, sig_pat, res_off, + emb_pat_k, emb_pat_1, J2K_Q1, context, Lcup, + Pcup)) < 0) + goto free; + + for (int i = 0; i < 4; i++) + sigma_n[4 * q1 + i] = (sig_pat[J2K_Q1] >> i) & 1; + + u[J2K_Q1] = 0; + + if (res_off[J2K_Q1] == 1) { + u_pfx[J2K_Q1] = vlc_decode_u_prefix(vlc_stream, vlc_buf); + u_sfx[J2K_Q1] = vlc_decode_u_suffix(vlc_stream, u_pfx[J2K_Q1], vlc_buf); + u_ext[J2K_Q1] = vlc_decode_u_extension(vlc_stream, u_sfx[J2K_Q1], vlc_buf); + u[J2K_Q1] = u_pfx[J2K_Q1] + u_sfx[J2K_Q1] + (u_ext[J2K_Q1] * 4); + } + + U[J2K_Q1] = kappa[J2K_Q1] + u[J2K_Q1]; + + for (int i = 0; i < 4; i++) + m[J2K_Q1][i] = sigma_n[4 * q1 + i] * U[J2K_Q1] - ((emb_pat_k[J2K_Q1] >> i) & 1); + + recover_mag_sgn(mag_sgn_stream, J2K_Q1, q1, m_n, known_1, emb_pat_1, v, m, + E, mu_n, Dcup, Pcup, pLSB); + + q++; // move to next quad pair + } + + /** + * Initial line pair end. As an optimization, we can replace modulo + * operations with checking if a number is divisible , since that's the only + * thing we need. This is paired with is_divisible. Credits to Daniel Lemire + * blog post [1]. + * + * [1] + * https://lemire.me/blog/2019/02/08/faster-remainders-when-the-divisor-is-a-constant-beating-compilers-and-libdivide/ + * + * It's UB on zero, but the spec doesn't allow a quad being zero, so we + * error out early in case that's the case. + */ + c = precompute_c(quad_width); + + for (int row = 1; row < quad_height; row++) { + while ((q - (row * quad_width)) < quad_width - 1 && q < (quad_height * quad_width)) { + q1 = q; + q2 = q + 1; + context1 = sigma_n[4 * (q1 - quad_width) + 1]; + context1 += sigma_n[4 * (q1 - quad_width) + 3] << 2; // ne + + if (!is_divisible(q1, c)) { + context1 |= sigma_n[4 * (q1 - quad_width) - 1]; // nw + context1 += (sigma_n[4 * q1 - 1] | sigma_n[4 * q1 - 2]) << 1; // sw | q + } + if (!is_divisible(q1 + 1, c)) + context1 |= sigma_n[4 * (q1 - quad_width) + 5] << 2; + + if ((ret = jpeg2000_decode_sig_emb(s, mel_state, mel_stream, vlc_stream, + dec_cxt_vlc_table1, Dcup, sig_pat, res_off, + emb_pat_k, emb_pat_1, J2K_Q1, context1, Lcup, + Pcup)) + < 0) + goto free; + + for (int i = 0; i < 4; i++) + sigma_n[4 * q1 + i] = (sig_pat[J2K_Q1] >> i) & 1; + + context2 = sigma_n[4 * (q2 - quad_width) + 1]; + context2 += sigma_n[4 * (q2 - quad_width) + 3] << 2; + + if (!is_divisible(q2, c)) { + context2 |= sigma_n[4 * (q2 - quad_width) - 1]; + context2 += (sigma_n[4 * q2 - 1] | sigma_n[4 * q2 - 2]) << 1; + } + if (!is_divisible(q2 + 1, c)) + context2 |= sigma_n[4 * (q2 - quad_width) + 5] << 2; + + if ((ret = jpeg2000_decode_sig_emb(s, mel_state, mel_stream, vlc_stream, + dec_cxt_vlc_table1, Dcup, sig_pat, res_off, + emb_pat_k, emb_pat_1, J2K_Q2, context2, Lcup, + Pcup)) + < 0) + goto free; + + for (int i = 0; i < 4; i++) + sigma_n[4 * q2 + i] = (sig_pat[J2K_Q2] >> i) & 1; + + u[J2K_Q1] = 0; + u[J2K_Q2] = 0; + + jpeg2000_bitbuf_refill_backwards(vlc_stream, vlc_buf); + + if (res_off[J2K_Q1] == 1 && res_off[J2K_Q2] == 1) { + u_pfx[J2K_Q1] = vlc_decode_u_prefix(vlc_stream, vlc_buf); + u_pfx[J2K_Q2] = vlc_decode_u_prefix(vlc_stream, vlc_buf); + + u_sfx[J2K_Q1] = vlc_decode_u_suffix(vlc_stream, u_pfx[J2K_Q1], vlc_buf); + u_sfx[J2K_Q2] = vlc_decode_u_suffix(vlc_stream, u_pfx[J2K_Q2], vlc_buf); + + u_ext[J2K_Q1] = vlc_decode_u_extension(vlc_stream, u_sfx[J2K_Q1], vlc_buf); + u_ext[J2K_Q2] = vlc_decode_u_extension(vlc_stream, u_sfx[J2K_Q2], vlc_buf); + + u[J2K_Q1] = u_pfx[J2K_Q1] + u_sfx[J2K_Q1] + (u_ext[J2K_Q1] << 2); + u[J2K_Q2] = u_pfx[J2K_Q2] + u_sfx[J2K_Q2] + (u_ext[J2K_Q2] << 2); + + } else if (res_off[J2K_Q1] == 1 || res_off[J2K_Q2] == 1) { + uint8_t pos = res_off[J2K_Q1] == 1 ? 0 : 1; + + u_pfx[pos] = vlc_decode_u_prefix(vlc_stream, vlc_buf); + u_sfx[pos] = vlc_decode_u_suffix(vlc_stream, u_pfx[pos], vlc_buf); + u_ext[pos] = vlc_decode_u_extension(vlc_stream, u_sfx[pos], vlc_buf); + + u[pos] = u_pfx[pos] + u_sfx[pos] + (u_ext[pos] << 2); + } + sp = sig_pat[J2K_Q1]; + + gamma[J2K_Q1] = 1; + + if (sp == 0 || sp == 1 || sp == 2 || sp == 4 || sp == 8) + gamma[J2K_Q1] = 0; + + sp = sig_pat[J2K_Q2]; + + gamma[J2K_Q2] = 1; + + if (sp == 0 || sp == 1 || sp == 2 || sp == 4 || sp == 8) + gamma[J2K_Q2] = 0; + + E_n[J2K_Q1] = E[4 * (q1 - quad_width) + 1]; + E_n[J2K_Q2] = E[4 * (q2 - quad_width) + 1]; + + E_ne[J2K_Q1] = E[4 * (q1 - quad_width) + 3]; + E_ne[J2K_Q2] = E[4 * (q2 - quad_width) + 3]; + + E_nw[J2K_Q1] = (!is_divisible(q1, c)) * E[FFMAX((4 * (q1 - quad_width) - 1), 0)]; + E_nw[J2K_Q2] = (!is_divisible(q2, c)) * E[FFMAX((4 * (q2 - quad_width) - 1), 0)]; + + E_nf[J2K_Q1] = (!is_divisible(q1 + 1, c)) * E[4 * (q1 - quad_width) + 5]; + E_nf[J2K_Q2] = (!is_divisible(q2 + 1, c)) * E[4 * (q2 - quad_width) + 5]; + + max_e[J2K_Q1] = FFMAX(E_nw[J2K_Q1], FFMAX3(E_n[J2K_Q1], E_ne[J2K_Q1], E_nf[J2K_Q1])); + max_e[J2K_Q2] = FFMAX(E_nw[J2K_Q2], FFMAX3(E_n[J2K_Q2], E_ne[J2K_Q2], E_nf[J2K_Q2])); + + kappa[J2K_Q1] = FFMAX(1, gamma[J2K_Q1] * (max_e[J2K_Q1] - 1)); + kappa[J2K_Q2] = FFMAX(1, gamma[J2K_Q2] * (max_e[J2K_Q2] - 1)); + + U[J2K_Q1] = kappa[J2K_Q1] + u[J2K_Q1]; + U[J2K_Q2] = kappa[J2K_Q2] + u[J2K_Q2]; + + for (int i = 0; i < 4; i++) { + m[J2K_Q1][i] = sigma_n[4 * q1 + i] * U[J2K_Q1] - ((emb_pat_k[J2K_Q1] >> i) & 1); + m[J2K_Q2][i] = sigma_n[4 * q2 + i] * U[J2K_Q2] - ((emb_pat_k[J2K_Q2] >> i) & 1); + } + recover_mag_sgn(mag_sgn_stream, J2K_Q1, q1, m_n, known_1, emb_pat_1, v, m, + E, mu_n, Dcup, Pcup, pLSB); + + recover_mag_sgn(mag_sgn_stream, J2K_Q2, q2, m_n, known_1, emb_pat_1, v, m, + E, mu_n, Dcup, Pcup, pLSB); + + q += 2; // Move to the next quad pair + } + + if (quad_width % 2 == 1) { + q1 = q; + + /* calculate context for current quad */ + context1 = sigma_n[4 * (q1 - quad_width) + 1]; + context1 += (sigma_n[4 * (q1 - quad_width) + 3] << 2); + + if (!is_divisible(q1, c)) { + context1 |= sigma_n[4 * (q1 - quad_width) - 1]; + context1 += (sigma_n[4 * q1 - 1] | sigma_n[4 * q1 - 2]) << 1; + } + if (!is_divisible(q1 + 1, c)) + context1 |= sigma_n[4 * (q1 - quad_width) + 5] << 2; + + if ((ret = jpeg2000_decode_sig_emb(s, mel_state, mel_stream, vlc_stream, + dec_cxt_vlc_table1, Dcup, sig_pat, res_off, + emb_pat_k, emb_pat_1, J2K_Q1, context1, Lcup, + Pcup)) < 0) + goto free; + + for (int i = 0; i < 4; i++) + sigma_n[4 * q1 + i] = (sig_pat[J2K_Q1] >> i) & 1; + + u[J2K_Q1] = 0; + + /* Recover mag_sgn value */ + if (res_off[J2K_Q1] == 1) { + u_pfx[J2K_Q1] = vlc_decode_u_prefix(vlc_stream, vlc_buf); + u_sfx[J2K_Q1] = vlc_decode_u_suffix(vlc_stream, u_pfx[J2K_Q1], vlc_buf); + u_ext[J2K_Q1] = vlc_decode_u_extension(vlc_stream, u_sfx[J2K_Q1], vlc_buf); + + u[J2K_Q1] = u_pfx[J2K_Q1] + u_sfx[J2K_Q1] + (u_ext[J2K_Q1] << 2); + } + + sp = sig_pat[J2K_Q1]; + + gamma[J2K_Q1] = 1; + + if (sp == 0 || sp == 1 || sp == 2 || sp == 4 || sp == 8) + gamma[J2K_Q1] = 0; + + E_n[J2K_Q1] = E[4 * (q1 - quad_width) + 1]; + + E_ne[J2K_Q1] = E[4 * (q1 - quad_width) + 3]; + + E_nw[J2K_Q1] = (!is_divisible(q1, c)) * E[FFMAX((4 * (q1 - quad_width) - 1), 0)]; + + E_nf[J2K_Q1] = (!is_divisible(q1 + 1, c)) * E[4 * (q1 - quad_width) + 5]; + + max_e[J2K_Q1] = FFMAX(E_nw[J2K_Q1], FFMAX3(E_n[J2K_Q1], E_ne[J2K_Q1], E_nf[J2K_Q1])); + + kappa[J2K_Q1] = FFMAX(1, gamma[J2K_Q1] * (max_e[J2K_Q1] - 1)); + + U[J2K_Q1] = kappa[J2K_Q1] + u[J2K_Q1]; + + for (int i = 0; i < 4; i++) + m[J2K_Q1][i] = sigma_n[4 * q1 + i] * U[J2K_Q1] - ((emb_pat_k[J2K_Q1] >> i) & 1); + + recover_mag_sgn(mag_sgn_stream, J2K_Q1, q1, m_n, known_1, emb_pat_1, v, m, + E, mu_n, Dcup, Pcup, pLSB); + q += 1; + } + } + + // convert to raster-scan + for (int y = 0; y < quad_height; y++) { + for (int x = 0; x < quad_width; x++) { + int j1, j2; + int x1, x2 , x3; + + j1 = 2 * y; + j2 = 2 * x; + + sample_buf[j2 + (j1 * width)] = (int32_t)*mu; + jpeg2000_modify_state(j1, j2, width, *sigma, block_states); + sigma += 1; + mu += 1; + + x1 = y != quad_height - 1 || is_border_y == 0; + sample_buf[j2 + ((j1 + 1) * width)] = ((int32_t)*mu) * x1; + jpeg2000_modify_state(j1 + 1, j2, width, (*sigma) * x1, block_states); + sigma += 1; + mu += 1; + + x2 = x != quad_width - 1 || is_border_x == 0; + sample_buf[(j2 + 1) + (j1 * width)] = ((int32_t)*mu) * x2; + jpeg2000_modify_state(j1, j2 + 1, width, (*sigma) * x2, block_states); + sigma += 1; + mu += 1; + + x3 = x1 | x2; + sample_buf[(j2 + 1) + (j1 + 1) * width] = ((int32_t)*mu) * x3; + jpeg2000_modify_state(j1 + 1, j2 + 1, width, (*sigma) * x3, block_states); + sigma += 1; + mu += 1; + } + } + ret = 1; +free: + av_freep(&sigma_n); + av_freep(&E); + av_freep(&mu_n); + return ret; +} + +static void jpeg2000_calc_mbr(uint8_t *mbr, const uint16_t i, const uint16_t j, + const uint32_t mbr_info, uint8_t causal_cond, + uint8_t *block_states, int width) +{ + int local_mbr = 0; + + local_mbr |= jpeg2000_get_state(i - 1, j - 1, width, HT_SHIFT_SIGMA, block_states); + local_mbr |= jpeg2000_get_state(i - 1, j + 0, width, HT_SHIFT_SIGMA, block_states); + local_mbr |= jpeg2000_get_state(i - 1, j + 1, width, HT_SHIFT_SIGMA, block_states); + + local_mbr |= jpeg2000_get_state(i + 0, j - 1, width, HT_SHIFT_SIGMA, block_states); + local_mbr |= jpeg2000_get_state(i + 0, j + 1, width, HT_SHIFT_SIGMA, block_states); + + local_mbr |= jpeg2000_get_state(i + 1, j - 1, width, HT_SHIFT_SIGMA, block_states) * causal_cond; + local_mbr |= jpeg2000_get_state(i + 1, j + 0, width, HT_SHIFT_SIGMA, block_states) * causal_cond; + local_mbr |= jpeg2000_get_state(i + 1, j + 1, width, HT_SHIFT_SIGMA, block_states) * causal_cond; + + local_mbr |= jpeg2000_get_state(i - 1, j - 1, width, HT_SHIFT_REF, block_states) * + jpeg2000_get_state(i - 1, j - 1, width, HT_SHIFT_SCAN, block_states); + local_mbr |= jpeg2000_get_state(i - 1, j + 0, width, HT_SHIFT_REF, block_states) * + jpeg2000_get_state(i - 1, j - 1, width, HT_SHIFT_SCAN, block_states); + local_mbr |= jpeg2000_get_state(i - 1, j + 1, width, HT_SHIFT_REF, block_states) * + jpeg2000_get_state(i - 1, j + 1, width, HT_SHIFT_SCAN, block_states); + + local_mbr |= jpeg2000_get_state(i + 0, j - 1, width, HT_SHIFT_REF, block_states) * + jpeg2000_get_state(i + 0, j - 1, width, HT_SHIFT_SCAN, block_states); + local_mbr |= jpeg2000_get_state(i + 0, j + 1, width, HT_SHIFT_REF, block_states) * + jpeg2000_get_state(i + 0, j + 1, width, HT_SHIFT_SCAN, block_states); + + local_mbr |= jpeg2000_get_state(i + 1, j - 1, width, HT_SHIFT_REF, block_states) * + jpeg2000_get_state(i + 1, j - 1, width, HT_SHIFT_SCAN, block_states) * causal_cond; + local_mbr |= jpeg2000_get_state(i + 1, j + 0, width, HT_SHIFT_REF, block_states) * + jpeg2000_get_state(i + 1, j + 0, width, HT_SHIFT_SCAN, block_states) * causal_cond; + local_mbr |= jpeg2000_get_state(i + 1, j + 1, width, HT_SHIFT_REF, block_states) * + jpeg2000_get_state(i + 1, j + 1, width, HT_SHIFT_SCAN, block_states) * causal_cond; + + *mbr |= local_mbr; +} + +static void jpeg2000_process_stripes_block(StateVars *sig_prop, int i_s, int j_s, + int width, int height, int stride, int pLSB, + int32_t *sample_buf, uint8_t *block_states, + uint8_t *magref_segment, uint32_t magref_length) +{ + for (int j = j_s; j < j_s + width; j++) { + uint32_t mbr_info = 0; + for (int i = i_s; i < i_s + height; i++) { + int modify_state, cond; + uint8_t bit; + uint8_t causal_cond = i != (i_s + height - 1); + int32_t *sp = &sample_buf[j + (i * (stride - 2))]; + uint8_t mbr = 0; + + if (jpeg2000_get_state(i, j, stride - 2, HT_SHIFT_SIGMA, block_states) == 0) + jpeg2000_calc_mbr(&mbr, i, j, mbr_info & 0x1EF, causal_cond, block_states, stride - 2); + mbr_info >>= 3; + cond = mbr != 0; + bit = jpeg2000_peek_bit(sig_prop, magref_segment, magref_length); + *sp |= (bit * cond) << pLSB; + sig_prop->bits -= cond; + modify_state = (((1 << HT_SHIFT_REF_IND) | (1 << HT_SHIFT_REF)) * cond) | 1 << HT_SHIFT_SCAN; + jpeg2000_modify_state(i, j, stride - 2, modify_state, block_states); + } + } +} + +/** + * See procedure decodeSigPropMag at Rec. ITU-T T.814, 7.4. +*/ +av_noinline +static void jpeg2000_decode_sigprop_segment(Jpeg2000Cblk *cblk, uint16_t width, + uint16_t height, uint8_t *magref_segment, + uint32_t magref_length, uint8_t pLSB, + int32_t *sample_buf, uint8_t *block_states) +{ + StateVars sp_dec; + + const uint16_t num_v_stripe = height / 4; + const uint16_t num_h_stripe = width / 4; + int b_width = 4; + int b_height = 4; + int stride = width + 2; + + int last_width; + uint16_t i = 0, j = 0; + + jpeg2000_init_zero(&sp_dec); + + for (int n1 = 0; n1 < num_v_stripe; n1++) { + j = 0; + for (int n2 = 0; n2 < num_h_stripe; n2++) { + jpeg2000_process_stripes_block(&sp_dec, i, j, b_width, b_height, stride, + pLSB, sample_buf, block_states, magref_segment, + magref_length); + j += 4; + } + last_width = width % 4; + if (last_width) + jpeg2000_process_stripes_block(&sp_dec, i, j, last_width, b_height, stride, + pLSB, sample_buf, block_states, magref_segment, + magref_length); + i += 4; + } + + /* Decode remaining height stripes */ + b_height = height % 4; + j = 0; + for (int n2 = 0; n2 < num_h_stripe; n2++) { + jpeg2000_process_stripes_block(&sp_dec, i, j, b_width, b_height, stride, + pLSB, sample_buf, block_states, magref_segment, + magref_length); + j += 4; + } + last_width = width % 4; + if (last_width) + jpeg2000_process_stripes_block(&sp_dec, i, j, last_width, b_height, stride, + pLSB, sample_buf, block_states, magref_segment, + magref_length); +} + +/** + * See procedure decodeSigPropMag at Rec. ITU-T T.814, 7.5. +*/ +static int +jpeg2000_decode_magref_segment(Jpeg2000Cblk *cblk, uint16_t width, uint16_t block_height, uint8_t *magref_segment, + uint32_t magref_length, uint8_t pLSB, int32_t *sample_buf, uint8_t *block_states) +{ + + StateVars mag_ref = { 0 }; + const uint16_t num_v_stripe = block_height / 4; + uint16_t height = 4; + uint16_t i_start = 0; + int32_t *sp; + + jpeg2000_init_mag_ref(&mag_ref, magref_length); + + for (int n1 = 0; n1 < num_v_stripe; n1++) { + for (int j = 0; j < width; j++) { + for (int i = i_start; i < i_start + height; i++) { + /** + * We move column wise, going from one quad to another. See + * Rec. ITU-T T.814, Figure 7. + */ + sp = &sample_buf[j + i * width]; + if (jpeg2000_get_state(i, j, width, HT_SHIFT_SIGMA, block_states) != 0) { + jpeg2000_modify_state(i, j, width, 1 << HT_SHIFT_REF_IND, block_states); + *sp |= jpeg2000_import_magref_bit(&mag_ref, magref_segment, magref_length) << pLSB; + } + } + } + i_start += 4; + } + height = block_height % 4; + for (int j = 0; j < width; j++) { + for (int i = i_start; i < i_start + height; i++) { + sp = &sample_buf[j + i * width]; + if (jpeg2000_get_state(i, j, width, HT_SHIFT_SIGMA, block_states) != 0) { + jpeg2000_modify_state(i, j, width, 1 << HT_SHIFT_REF_IND, block_states); + *sp |= jpeg2000_import_magref_bit(&mag_ref, magref_segment, magref_length) << pLSB; + } + } + } + return 1; +} + + +int +ff_jpeg2000_decode_htj2k(const Jpeg2000DecoderContext *s, Jpeg2000CodingStyle *codsty, Jpeg2000T1Context *t1, Jpeg2000Cblk *cblk, + int width, int height, int magp, uint8_t roi_shift) +{ + uint8_t p0 = 0; // Number of placeholder passes + uint32_t Lcup; // Length of HT cleanup segment + uint32_t Lref; // Length of Refinement segment + uint32_t Scup; // HT cleanup segment suffix length + uint32_t Pcup; // HT cleanup segment prefix length + + uint8_t S_blk; // Number of skipped magnitude bitplanes + uint8_t pLSB; + + uint8_t *Dcup; // Byte of an HT cleanup segment + uint8_t *Dref; // Byte of an HT refinement segment + + int z_blk; // Number of ht coding pass + + uint8_t empty_passes; + + StateVars mag_sgn; // Magnitude and Sign + StateVars mel; // Adaptive run-length coding + StateVars vlc; // Variable Length coding + StateVars sig_prop; // Significance propagation + + MelDecoderState mel_state; + + int ret; + + /* Temporary buffers */ + int32_t *sample_buf; + uint8_t *block_states; + + int32_t n, val; // Post-processing + + int32_t M_b = magp; + + /* codeblock size as constrained by Rec. ITU-T T.800, Table A.18 */ + av_assert0(width <= 1024U && height <= 1024U); + av_assert0(width * height <= 4096); + av_assert0(width * height > 0); + + memset(t1->data, 0, t1->stride * height * sizeof(*t1->data)); + memset(t1->flags, 0, t1->stride * (height + 2) * sizeof(*t1->flags)); + + if (cblk->npasses == 0) + return 0; + + if (cblk->npasses > 3) + p0 = 0; + else if (cblk->length == 0) + p0 = 1; + + empty_passes = p0 * 3; + z_blk = cblk->npasses - empty_passes; + + if (z_blk <= 0) + return 0; // No passes within this set, continue + + Lcup = cblk->pass_lengths[0]; + Lref = cblk->pass_lengths[1]; + + if (Lcup < 2) { + av_log(s->avctx, AV_LOG_ERROR, + "Cleanup pass length must be at least 2 bytes in length\n"); + return AVERROR_INVALIDDATA; + } + Dcup = cblk->data; + Dref = cblk->data + Lcup; // Dref comes after the refinement segment + S_blk = p0 + cblk->zbp; + pLSB = 30 - S_blk; + + Scup = (Dcup[Lcup - 1] << 4) + (Dcup[Lcup - 2] & 0x0F); + + if (Scup < 2 || Scup > Lcup || Scup > 4079) { + av_log(s->avctx, AV_LOG_ERROR, "Cleanup pass suffix length is invalid %d\n", + Scup); + ret = AVERROR_INVALIDDATA; + goto free; + } + Pcup = Lcup - Scup; + + /* modDcup shall be done before the creation of vlc instance. */ + Dcup[Lcup - 1] = 0xFF; + Dcup[Lcup - 2] |= 0x0F; + + /* Magnitude and refinement */ + jpeg2000_init_zero(&mag_sgn); + jpeg2000_bitbuf_refill_forward(&mag_sgn, Dcup, Pcup); + + /* Significance propagation */ + jpeg2000_init_zero(&sig_prop); + + /* Adaptive run length */ + jpeg2000_init_mel(&mel, Pcup); + + /* Variable Length coding */ + jpeg2000_init_vlc(&vlc, Lcup, Pcup, Dcup); + + jpeg2000_init_mel_decoder(&mel_state); + + sample_buf = av_calloc((width + 4) * (height + 4), sizeof(int32_t)); + block_states = av_calloc((width + 4) * (height + 4), sizeof(uint8_t)); + + if (!sample_buf || !block_states) { + ret = AVERROR(ENOMEM); + goto free; + } + if ((ret = jpeg2000_decode_ht_cleanup_segment(s, cblk, t1, &mel_state, &mel, &vlc, + &mag_sgn, Dcup, Lcup, Pcup, pLSB, width, + height, sample_buf, block_states)) < 0) + goto free; + + if (cblk->npasses > 1) + jpeg2000_decode_sigprop_segment(cblk, width, height, Dref, Lref, + pLSB - 1, sample_buf, block_states); + + if (cblk->npasses > 2) + if ((ret = jpeg2000_decode_magref_segment(cblk, width, height, Dref, Lref, + pLSB - 1, sample_buf, block_states)) < 0) + goto free; + + pLSB = 31 - M_b; + + /* Reconstruct the sample values */ + for (int y = 0; y < height; y++) { + for (int x = 0; x < width; x++) { + n = x + (y * t1->stride); + val = sample_buf[x + (y * width)]; + /* Convert sign-magnitude to two's complement. */ + val = val >> 31 ? 0x80000000 - val : val; + val >>= (pLSB - 1); + t1->data[n] = val; + } + } +free: + av_freep(&sample_buf); + av_freep(&block_states); + return ret; +} + +/** + * CtxVLC tables (see Rec. ITU-T T.800, Annex C) as found at + * https://github.com/osamu620/OpenHTJ2K (author: Osamu Watanabe) + */ +static const uint16_t dec_cxt_vlc_table1[1024] = { + 0x0016, 0x006A, 0x0046, 0x00DD, 0x0086, 0x888B, 0x0026, 0x444D, 0x0016, 0x00AA, 0x0046, 0x88AD, 0x0086, + 0x003A, 0x0026, 0x00DE, 0x0016, 0x00CA, 0x0046, 0x009D, 0x0086, 0x005A, 0x0026, 0x222D, 0x0016, 0x009A, + 0x0046, 0x007D, 0x0086, 0x01FD, 0x0026, 0x007E, 0x0016, 0x006A, 0x0046, 0x88CD, 0x0086, 0x888B, 0x0026, + 0x111D, 0x0016, 0x00AA, 0x0046, 0x005D, 0x0086, 0x003A, 0x0026, 0x00EE, 0x0016, 0x00CA, 0x0046, 0x00BD, + 0x0086, 0x005A, 0x0026, 0x11FF, 0x0016, 0x009A, 0x0046, 0x003D, 0x0086, 0x04ED, 0x0026, 0x2AAF, 0x0016, + 0x006A, 0x0046, 0x00DD, 0x0086, 0x888B, 0x0026, 0x444D, 0x0016, 0x00AA, 0x0046, 0x88AD, 0x0086, 0x003A, + 0x0026, 0x44EF, 0x0016, 0x00CA, 0x0046, 0x009D, 0x0086, 0x005A, 0x0026, 0x222D, 0x0016, 0x009A, 0x0046, + 0x007D, 0x0086, 0x01FD, 0x0026, 0x00BE, 0x0016, 0x006A, 0x0046, 0x88CD, 0x0086, 0x888B, 0x0026, 0x111D, + 0x0016, 0x00AA, 0x0046, 0x005D, 0x0086, 0x003A, 0x0026, 0x4CCF, 0x0016, 0x00CA, 0x0046, 0x00BD, 0x0086, + 0x005A, 0x0026, 0x00FE, 0x0016, 0x009A, 0x0046, 0x003D, 0x0086, 0x04ED, 0x0026, 0x006F, 0x0002, 0x0088, + 0x0002, 0x005C, 0x0002, 0x0018, 0x0002, 0x00DE, 0x0002, 0x0028, 0x0002, 0x009C, 0x0002, 0x004A, 0x0002, + 0x007E, 0x0002, 0x0088, 0x0002, 0x00CC, 0x0002, 0x0018, 0x0002, 0x888F, 0x0002, 0x0028, 0x0002, 0x00FE, + 0x0002, 0x003A, 0x0002, 0x222F, 0x0002, 0x0088, 0x0002, 0x04FD, 0x0002, 0x0018, 0x0002, 0x00BE, 0x0002, + 0x0028, 0x0002, 0x00BF, 0x0002, 0x004A, 0x0002, 0x006E, 0x0002, 0x0088, 0x0002, 0x00AC, 0x0002, 0x0018, + 0x0002, 0x444F, 0x0002, 0x0028, 0x0002, 0x00EE, 0x0002, 0x003A, 0x0002, 0x113F, 0x0002, 0x0088, 0x0002, + 0x005C, 0x0002, 0x0018, 0x0002, 0x00CF, 0x0002, 0x0028, 0x0002, 0x009C, 0x0002, 0x004A, 0x0002, 0x006F, + 0x0002, 0x0088, 0x0002, 0x00CC, 0x0002, 0x0018, 0x0002, 0x009F, 0x0002, 0x0028, 0x0002, 0x00EF, 0x0002, + 0x003A, 0x0002, 0x233F, 0x0002, 0x0088, 0x0002, 0x04FD, 0x0002, 0x0018, 0x0002, 0x00AF, 0x0002, 0x0028, + 0x0002, 0x44FF, 0x0002, 0x004A, 0x0002, 0x005F, 0x0002, 0x0088, 0x0002, 0x00AC, 0x0002, 0x0018, 0x0002, + 0x007F, 0x0002, 0x0028, 0x0002, 0x00DF, 0x0002, 0x003A, 0x0002, 0x111F, 0x0002, 0x0028, 0x0002, 0x005C, + 0x0002, 0x008A, 0x0002, 0x00BF, 0x0002, 0x0018, 0x0002, 0x00FE, 0x0002, 0x00CC, 0x0002, 0x007E, 0x0002, + 0x0028, 0x0002, 0x8FFF, 0x0002, 0x004A, 0x0002, 0x007F, 0x0002, 0x0018, 0x0002, 0x00DF, 0x0002, 0x00AC, + 0x0002, 0x133F, 0x0002, 0x0028, 0x0002, 0x222D, 0x0002, 0x008A, 0x0002, 0x00BE, 0x0002, 0x0018, 0x0002, + 0x44EF, 0x0002, 0x2AAD, 0x0002, 0x006E, 0x0002, 0x0028, 0x0002, 0x15FF, 0x0002, 0x004A, 0x0002, 0x009E, + 0x0002, 0x0018, 0x0002, 0x00CF, 0x0002, 0x003C, 0x0002, 0x223F, 0x0002, 0x0028, 0x0002, 0x005C, 0x0002, + 0x008A, 0x0002, 0x2BBF, 0x0002, 0x0018, 0x0002, 0x04EF, 0x0002, 0x00CC, 0x0002, 0x006F, 0x0002, 0x0028, + 0x0002, 0x27FF, 0x0002, 0x004A, 0x0002, 0x009F, 0x0002, 0x0018, 0x0002, 0x00DE, 0x0002, 0x00AC, 0x0002, + 0x444F, 0x0002, 0x0028, 0x0002, 0x222D, 0x0002, 0x008A, 0x0002, 0x8AAF, 0x0002, 0x0018, 0x0002, 0x00EE, + 0x0002, 0x2AAD, 0x0002, 0x005F, 0x0002, 0x0028, 0x0002, 0x44FF, 0x0002, 0x004A, 0x0002, 0x888F, 0x0002, + 0x0018, 0x0002, 0xAAAF, 0x0002, 0x003C, 0x0002, 0x111F, 0x0004, 0x8FFD, 0x0028, 0x005C, 0x0004, 0x00BC, + 0x008A, 0x66FF, 0x0004, 0x00CD, 0x0018, 0x111D, 0x0004, 0x009C, 0x003A, 0x8AAF, 0x0004, 0x00FC, 0x0028, + 0x133D, 0x0004, 0x00AC, 0x004A, 0x3BBF, 0x0004, 0x2BBD, 0x0018, 0x5FFF, 0x0004, 0x006C, 0x157D, 0x455F, + 0x0004, 0x2FFD, 0x0028, 0x222D, 0x0004, 0x22AD, 0x008A, 0x44EF, 0x0004, 0x00CC, 0x0018, 0x4FFF, 0x0004, + 0x007C, 0x003A, 0x447F, 0x0004, 0x04DD, 0x0028, 0x233D, 0x0004, 0x009D, 0x004A, 0x00DE, 0x0004, 0x88BD, + 0x0018, 0xAFFF, 0x0004, 0x115D, 0x1FFD, 0x444F, 0x0004, 0x8FFD, 0x0028, 0x005C, 0x0004, 0x00BC, 0x008A, + 0x8CEF, 0x0004, 0x00CD, 0x0018, 0x111D, 0x0004, 0x009C, 0x003A, 0x888F, 0x0004, 0x00FC, 0x0028, 0x133D, + 0x0004, 0x00AC, 0x004A, 0x44DF, 0x0004, 0x2BBD, 0x0018, 0x8AFF, 0x0004, 0x006C, 0x157D, 0x006F, 0x0004, + 0x2FFD, 0x0028, 0x222D, 0x0004, 0x22AD, 0x008A, 0x00EE, 0x0004, 0x00CC, 0x0018, 0x2EEF, 0x0004, 0x007C, + 0x003A, 0x277F, 0x0004, 0x04DD, 0x0028, 0x233D, 0x0004, 0x009D, 0x004A, 0x1BBF, 0x0004, 0x88BD, 0x0018, + 0x37FF, 0x0004, 0x115D, 0x1FFD, 0x333F, 0x0002, 0x0088, 0x0002, 0x02ED, 0x0002, 0x00CA, 0x0002, 0x4CCF, + 0x0002, 0x0048, 0x0002, 0x23FF, 0x0002, 0x001A, 0x0002, 0x888F, 0x0002, 0x0088, 0x0002, 0x006C, 0x0002, + 0x002A, 0x0002, 0x00AF, 0x0002, 0x0048, 0x0002, 0x22EF, 0x0002, 0x00AC, 0x0002, 0x005F, 0x0002, 0x0088, + 0x0002, 0x444D, 0x0002, 0x00CA, 0x0002, 0xCCCF, 0x0002, 0x0048, 0x0002, 0x00FE, 0x0002, 0x001A, 0x0002, + 0x006F, 0x0002, 0x0088, 0x0002, 0x005C, 0x0002, 0x002A, 0x0002, 0x009F, 0x0002, 0x0048, 0x0002, 0x00DF, + 0x0002, 0x03FD, 0x0002, 0x222F, 0x0002, 0x0088, 0x0002, 0x02ED, 0x0002, 0x00CA, 0x0002, 0x8CCF, 0x0002, + 0x0048, 0x0002, 0x11FF, 0x0002, 0x001A, 0x0002, 0x007E, 0x0002, 0x0088, 0x0002, 0x006C, 0x0002, 0x002A, + 0x0002, 0x007F, 0x0002, 0x0048, 0x0002, 0x00EE, 0x0002, 0x00AC, 0x0002, 0x003E, 0x0002, 0x0088, 0x0002, + 0x444D, 0x0002, 0x00CA, 0x0002, 0x00BE, 0x0002, 0x0048, 0x0002, 0x00BF, 0x0002, 0x001A, 0x0002, 0x003F, + 0x0002, 0x0088, 0x0002, 0x005C, 0x0002, 0x002A, 0x0002, 0x009E, 0x0002, 0x0048, 0x0002, 0x00DE, 0x0002, + 0x03FD, 0x0002, 0x111F, 0x0004, 0x8AED, 0x0048, 0x888D, 0x0004, 0x00DC, 0x00CA, 0x3FFF, 0x0004, 0xCFFD, + 0x002A, 0x003D, 0x0004, 0x00BC, 0x005A, 0x8DDF, 0x0004, 0x8FFD, 0x0048, 0x006C, 0x0004, 0x027D, 0x008A, + 0x99FF, 0x0004, 0x00EC, 0x00FA, 0x003C, 0x0004, 0x00AC, 0x001A, 0x009F, 0x0004, 0x2FFD, 0x0048, 0x007C, + 0x0004, 0x44CD, 0x00CA, 0x67FF, 0x0004, 0x1FFD, 0x002A, 0x444D, 0x0004, 0x00AD, 0x005A, 0x8CCF, 0x0004, + 0x4FFD, 0x0048, 0x445D, 0x0004, 0x01BD, 0x008A, 0x4EEF, 0x0004, 0x45DD, 0x00FA, 0x111D, 0x0004, 0x009C, + 0x001A, 0x222F, 0x0004, 0x8AED, 0x0048, 0x888D, 0x0004, 0x00DC, 0x00CA, 0xAFFF, 0x0004, 0xCFFD, 0x002A, + 0x003D, 0x0004, 0x00BC, 0x005A, 0x11BF, 0x0004, 0x8FFD, 0x0048, 0x006C, 0x0004, 0x027D, 0x008A, 0x22EF, + 0x0004, 0x00EC, 0x00FA, 0x003C, 0x0004, 0x00AC, 0x001A, 0x227F, 0x0004, 0x2FFD, 0x0048, 0x007C, 0x0004, + 0x44CD, 0x00CA, 0x5DFF, 0x0004, 0x1FFD, 0x002A, 0x444D, 0x0004, 0x00AD, 0x005A, 0x006F, 0x0004, 0x4FFD, + 0x0048, 0x445D, 0x0004, 0x01BD, 0x008A, 0x11DF, 0x0004, 0x45DD, 0x00FA, 0x111D, 0x0004, 0x009C, 0x001A, + 0x155F, 0x0006, 0x00FC, 0x0018, 0x111D, 0x0048, 0x888D, 0x00AA, 0x4DDF, 0x0006, 0x2AAD, 0x005A, 0x67FF, + 0x0028, 0x223D, 0x00BC, 0xAAAF, 0x0006, 0x00EC, 0x0018, 0x5FFF, 0x0048, 0x006C, 0x008A, 0xCCCF, 0x0006, + 0x009D, 0x00CA, 0x44EF, 0x0028, 0x003C, 0x8FFD, 0x137F, 0x0006, 0x8EED, 0x0018, 0x1FFF, 0x0048, 0x007C, + 0x00AA, 0x4CCF, 0x0006, 0x227D, 0x005A, 0x1DDF, 0x0028, 0x444D, 0x4FFD, 0x155F, 0x0006, 0x00DC, 0x0018, + 0x2EEF, 0x0048, 0x445D, 0x008A, 0x22BF, 0x0006, 0x009C, 0x00CA, 0x8CDF, 0x0028, 0x222D, 0x2FFD, 0x226F, + 0x0006, 0x00FC, 0x0018, 0x111D, 0x0048, 0x888D, 0x00AA, 0x1BBF, 0x0006, 0x2AAD, 0x005A, 0x33FF, 0x0028, + 0x223D, 0x00BC, 0x8AAF, 0x0006, 0x00EC, 0x0018, 0x9BFF, 0x0048, 0x006C, 0x008A, 0x8ABF, 0x0006, 0x009D, + 0x00CA, 0x4EEF, 0x0028, 0x003C, 0x8FFD, 0x466F, 0x0006, 0x8EED, 0x0018, 0xCFFF, 0x0048, 0x007C, 0x00AA, + 0x8CCF, 0x0006, 0x227D, 0x005A, 0xAEEF, 0x0028, 0x444D, 0x4FFD, 0x477F, 0x0006, 0x00DC, 0x0018, 0xAFFF, + 0x0048, 0x445D, 0x008A, 0x2BBF, 0x0006, 0x009C, 0x00CA, 0x44DF, 0x0028, 0x222D, 0x2FFD, 0x133F, 0x00F6, + 0xAFFD, 0x1FFB, 0x003C, 0x0008, 0x23BD, 0x007A, 0x11DF, 0x00F6, 0x45DD, 0x2FFB, 0x4EEF, 0x00DA, 0x177D, + 0xCFFD, 0x377F, 0x00F6, 0x3FFD, 0x8FFB, 0x111D, 0x0008, 0x009C, 0x005A, 0x1BBF, 0x00F6, 0x00CD, 0x00BA, + 0x8DDF, 0x4FFB, 0x006C, 0x9BFD, 0x455F, 0x00F6, 0x67FD, 0x1FFB, 0x002C, 0x0008, 0x00AC, 0x007A, 0x009F, + 0x00F6, 0x00AD, 0x2FFB, 0x7FFF, 0x00DA, 0x004C, 0x5FFD, 0x477F, 0x00F6, 0x00EC, 0x8FFB, 0x001C, 0x0008, + 0x008C, 0x005A, 0x888F, 0x00F6, 0x00CC, 0x00BA, 0x2EEF, 0x4FFB, 0x115D, 0x8AED, 0x113F, 0x00F6, 0xAFFD, + 0x1FFB, 0x003C, 0x0008, 0x23BD, 0x007A, 0x1DDF, 0x00F6, 0x45DD, 0x2FFB, 0xBFFF, 0x00DA, 0x177D, 0xCFFD, + 0x447F, 0x00F6, 0x3FFD, 0x8FFB, 0x111D, 0x0008, 0x009C, 0x005A, 0x277F, 0x00F6, 0x00CD, 0x00BA, 0x22EF, + 0x4FFB, 0x006C, 0x9BFD, 0x444F, 0x00F6, 0x67FD, 0x1FFB, 0x002C, 0x0008, 0x00AC, 0x007A, 0x11BF, 0x00F6, + 0x00AD, 0x2FFB, 0xFFFF, 0x00DA, 0x004C, 0x5FFD, 0x233F, 0x00F6, 0x00EC, 0x8FFB, 0x001C, 0x0008, 0x008C, + 0x005A, 0x006F, 0x00F6, 0x00CC, 0x00BA, 0x8BBF, 0x4FFB, 0x115D, 0x8AED, 0x222F}; + +static const uint16_t dec_cxt_vlc_table0[1024] = { + 0x0026, 0x00AA, 0x0046, 0x006C, 0x0086, 0x8AED, 0x0018, 0x8DDF, 0x0026, 0x01BD, 0x0046, 0x5FFF, 0x0086, + 0x027D, 0x005A, 0x155F, 0x0026, 0x003A, 0x0046, 0x444D, 0x0086, 0x4CCD, 0x0018, 0xCCCF, 0x0026, 0x2EFD, + 0x0046, 0x99FF, 0x0086, 0x009C, 0x00CA, 0x133F, 0x0026, 0x00AA, 0x0046, 0x445D, 0x0086, 0x8CCD, 0x0018, + 0x11DF, 0x0026, 0x4FFD, 0x0046, 0xCFFF, 0x0086, 0x009D, 0x005A, 0x007E, 0x0026, 0x003A, 0x0046, 0x1FFF, + 0x0086, 0x88AD, 0x0018, 0x00BE, 0x0026, 0x8FFD, 0x0046, 0x4EEF, 0x0086, 0x888D, 0x00CA, 0x111F, 0x0026, + 0x00AA, 0x0046, 0x006C, 0x0086, 0x8AED, 0x0018, 0x45DF, 0x0026, 0x01BD, 0x0046, 0x22EF, 0x0086, 0x027D, + 0x005A, 0x227F, 0x0026, 0x003A, 0x0046, 0x444D, 0x0086, 0x4CCD, 0x0018, 0x11BF, 0x0026, 0x2EFD, 0x0046, + 0x00FE, 0x0086, 0x009C, 0x00CA, 0x223F, 0x0026, 0x00AA, 0x0046, 0x445D, 0x0086, 0x8CCD, 0x0018, 0x00DE, + 0x0026, 0x4FFD, 0x0046, 0xABFF, 0x0086, 0x009D, 0x005A, 0x006F, 0x0026, 0x003A, 0x0046, 0x6EFF, 0x0086, + 0x88AD, 0x0018, 0x2AAF, 0x0026, 0x8FFD, 0x0046, 0x00EE, 0x0086, 0x888D, 0x00CA, 0x222F, 0x0004, 0x00CA, + 0x0088, 0x027D, 0x0004, 0x4CCD, 0x0028, 0x00FE, 0x0004, 0x2AFD, 0x0048, 0x005C, 0x0004, 0x009D, 0x0018, + 0x00DE, 0x0004, 0x01BD, 0x0088, 0x006C, 0x0004, 0x88AD, 0x0028, 0x11DF, 0x0004, 0x8AED, 0x0048, 0x003C, + 0x0004, 0x888D, 0x0018, 0x111F, 0x0004, 0x00CA, 0x0088, 0x006D, 0x0004, 0x88CD, 0x0028, 0x88FF, 0x0004, + 0x8BFD, 0x0048, 0x444D, 0x0004, 0x009C, 0x0018, 0x00BE, 0x0004, 0x4EFD, 0x0088, 0x445D, 0x0004, 0x00AC, + 0x0028, 0x00EE, 0x0004, 0x45DD, 0x0048, 0x222D, 0x0004, 0x003D, 0x0018, 0x007E, 0x0004, 0x00CA, 0x0088, + 0x027D, 0x0004, 0x4CCD, 0x0028, 0x1FFF, 0x0004, 0x2AFD, 0x0048, 0x005C, 0x0004, 0x009D, 0x0018, 0x11BF, + 0x0004, 0x01BD, 0x0088, 0x006C, 0x0004, 0x88AD, 0x0028, 0x22EF, 0x0004, 0x8AED, 0x0048, 0x003C, 0x0004, + 0x888D, 0x0018, 0x227F, 0x0004, 0x00CA, 0x0088, 0x006D, 0x0004, 0x88CD, 0x0028, 0x4EEF, 0x0004, 0x8BFD, + 0x0048, 0x444D, 0x0004, 0x009C, 0x0018, 0x2AAF, 0x0004, 0x4EFD, 0x0088, 0x445D, 0x0004, 0x00AC, 0x0028, + 0x8DDF, 0x0004, 0x45DD, 0x0048, 0x222D, 0x0004, 0x003D, 0x0018, 0x155F, 0x0004, 0x005A, 0x0088, 0x006C, + 0x0004, 0x88DD, 0x0028, 0x23FF, 0x0004, 0x11FD, 0x0048, 0x444D, 0x0004, 0x00AD, 0x0018, 0x00BE, 0x0004, + 0x137D, 0x0088, 0x155D, 0x0004, 0x00CC, 0x0028, 0x00DE, 0x0004, 0x02ED, 0x0048, 0x111D, 0x0004, 0x009D, + 0x0018, 0x007E, 0x0004, 0x005A, 0x0088, 0x455D, 0x0004, 0x44CD, 0x0028, 0x00EE, 0x0004, 0x1FFD, 0x0048, + 0x003C, 0x0004, 0x00AC, 0x0018, 0x555F, 0x0004, 0x47FD, 0x0088, 0x113D, 0x0004, 0x02BD, 0x0028, 0x477F, + 0x0004, 0x4CDD, 0x0048, 0x8FFF, 0x0004, 0x009C, 0x0018, 0x222F, 0x0004, 0x005A, 0x0088, 0x006C, 0x0004, + 0x88DD, 0x0028, 0x00FE, 0x0004, 0x11FD, 0x0048, 0x444D, 0x0004, 0x00AD, 0x0018, 0x888F, 0x0004, 0x137D, + 0x0088, 0x155D, 0x0004, 0x00CC, 0x0028, 0x8CCF, 0x0004, 0x02ED, 0x0048, 0x111D, 0x0004, 0x009D, 0x0018, + 0x006F, 0x0004, 0x005A, 0x0088, 0x455D, 0x0004, 0x44CD, 0x0028, 0x1DDF, 0x0004, 0x1FFD, 0x0048, 0x003C, + 0x0004, 0x00AC, 0x0018, 0x227F, 0x0004, 0x47FD, 0x0088, 0x113D, 0x0004, 0x02BD, 0x0028, 0x22BF, 0x0004, + 0x4CDD, 0x0048, 0x22EF, 0x0004, 0x009C, 0x0018, 0x233F, 0x0006, 0x4DDD, 0x4FFB, 0xCFFF, 0x0018, 0x113D, + 0x005A, 0x888F, 0x0006, 0x23BD, 0x008A, 0x00EE, 0x002A, 0x155D, 0xAAFD, 0x277F, 0x0006, 0x44CD, 0x8FFB, + 0x44EF, 0x0018, 0x467D, 0x004A, 0x2AAF, 0x0006, 0x00AC, 0x555B, 0x99DF, 0x1FFB, 0x003C, 0x5FFD, 0x266F, + 0x0006, 0x1DDD, 0x4FFB, 0x6EFF, 0x0018, 0x177D, 0x005A, 0x1BBF, 0x0006, 0x88AD, 0x008A, 0x5DDF, 0x002A, + 0x444D, 0x2FFD, 0x667F, 0x0006, 0x00CC, 0x8FFB, 0x2EEF, 0x0018, 0x455D, 0x004A, 0x119F, 0x0006, 0x009C, + 0x555B, 0x8CCF, 0x1FFB, 0x111D, 0x8CED, 0x006E, 0x0006, 0x4DDD, 0x4FFB, 0x3FFF, 0x0018, 0x113D, 0x005A, + 0x11BF, 0x0006, 0x23BD, 0x008A, 0x8DDF, 0x002A, 0x155D, 0xAAFD, 0x222F, 0x0006, 0x44CD, 0x8FFB, 0x00FE, + 0x0018, 0x467D, 0x004A, 0x899F, 0x0006, 0x00AC, 0x555B, 0x00DE, 0x1FFB, 0x003C, 0x5FFD, 0x446F, 0x0006, + 0x1DDD, 0x4FFB, 0x9BFF, 0x0018, 0x177D, 0x005A, 0x00BE, 0x0006, 0x88AD, 0x008A, 0xCDDF, 0x002A, 0x444D, + 0x2FFD, 0x007E, 0x0006, 0x00CC, 0x8FFB, 0x4EEF, 0x0018, 0x455D, 0x004A, 0x377F, 0x0006, 0x009C, 0x555B, + 0x8BBF, 0x1FFB, 0x111D, 0x8CED, 0x233F, 0x0004, 0x00AA, 0x0088, 0x047D, 0x0004, 0x01DD, 0x0028, 0x11DF, + 0x0004, 0x27FD, 0x0048, 0x005C, 0x0004, 0x8AAD, 0x0018, 0x2BBF, 0x0004, 0x009C, 0x0088, 0x006C, 0x0004, + 0x00CC, 0x0028, 0x00EE, 0x0004, 0x8CED, 0x0048, 0x222D, 0x0004, 0x888D, 0x0018, 0x007E, 0x0004, 0x00AA, + 0x0088, 0x006D, 0x0004, 0x88CD, 0x0028, 0x00FE, 0x0004, 0x19FD, 0x0048, 0x003C, 0x0004, 0x2AAD, 0x0018, + 0xAAAF, 0x0004, 0x8BFD, 0x0088, 0x005D, 0x0004, 0x00BD, 0x0028, 0x4CCF, 0x0004, 0x44ED, 0x0048, 0x4FFF, + 0x0004, 0x223D, 0x0018, 0x111F, 0x0004, 0x00AA, 0x0088, 0x047D, 0x0004, 0x01DD, 0x0028, 0x99FF, 0x0004, + 0x27FD, 0x0048, 0x005C, 0x0004, 0x8AAD, 0x0018, 0x00BE, 0x0004, 0x009C, 0x0088, 0x006C, 0x0004, 0x00CC, + 0x0028, 0x00DE, 0x0004, 0x8CED, 0x0048, 0x222D, 0x0004, 0x888D, 0x0018, 0x444F, 0x0004, 0x00AA, 0x0088, + 0x006D, 0x0004, 0x88CD, 0x0028, 0x2EEF, 0x0004, 0x19FD, 0x0048, 0x003C, 0x0004, 0x2AAD, 0x0018, 0x447F, + 0x0004, 0x8BFD, 0x0088, 0x005D, 0x0004, 0x00BD, 0x0028, 0x009F, 0x0004, 0x44ED, 0x0048, 0x67FF, 0x0004, + 0x223D, 0x0018, 0x133F, 0x0006, 0x00CC, 0x008A, 0x9DFF, 0x2FFB, 0x467D, 0x1FFD, 0x99BF, 0x0006, 0x2AAD, + 0x002A, 0x66EF, 0x4FFB, 0x005C, 0x2EED, 0x377F, 0x0006, 0x89BD, 0x004A, 0x00FE, 0x8FFB, 0x006C, 0x67FD, + 0x889F, 0x0006, 0x888D, 0x001A, 0x5DDF, 0x00AA, 0x222D, 0x89DD, 0x444F, 0x0006, 0x2BBD, 0x008A, 0xCFFF, + 0x2FFB, 0x226D, 0x009C, 0x00BE, 0x0006, 0xAAAD, 0x002A, 0x1DDF, 0x4FFB, 0x003C, 0x4DDD, 0x466F, 0x0006, + 0x8AAD, 0x004A, 0xAEEF, 0x8FFB, 0x445D, 0x8EED, 0x177F, 0x0006, 0x233D, 0x001A, 0x4CCF, 0x00AA, 0xAFFF, + 0x88CD, 0x133F, 0x0006, 0x00CC, 0x008A, 0x77FF, 0x2FFB, 0x467D, 0x1FFD, 0x3BBF, 0x0006, 0x2AAD, 0x002A, + 0x00EE, 0x4FFB, 0x005C, 0x2EED, 0x007E, 0x0006, 0x89BD, 0x004A, 0x4EEF, 0x8FFB, 0x006C, 0x67FD, 0x667F, + 0x0006, 0x888D, 0x001A, 0x00DE, 0x00AA, 0x222D, 0x89DD, 0x333F, 0x0006, 0x2BBD, 0x008A, 0x57FF, 0x2FFB, + 0x226D, 0x009C, 0x199F, 0x0006, 0xAAAD, 0x002A, 0x99DF, 0x4FFB, 0x003C, 0x4DDD, 0x155F, 0x0006, 0x8AAD, + 0x004A, 0xCEEF, 0x8FFB, 0x445D, 0x8EED, 0x277F, 0x0006, 0x233D, 0x001A, 0x1BBF, 0x00AA, 0x3FFF, 0x88CD, + 0x111F, 0x0006, 0x45DD, 0x2FFB, 0x111D, 0x0018, 0x467D, 0x8FFD, 0xCCCF, 0x0006, 0x19BD, 0x004A, 0x22EF, + 0x002A, 0x222D, 0x3FFD, 0x888F, 0x0006, 0x00CC, 0x008A, 0x00FE, 0x0018, 0x115D, 0xCFFD, 0x8AAF, 0x0006, + 0x00AC, 0x003A, 0x8CDF, 0x1FFB, 0x133D, 0x66FD, 0x466F, 0x0006, 0x8CCD, 0x2FFB, 0x5FFF, 0x0018, 0x006C, + 0x4FFD, 0xABBF, 0x0006, 0x22AD, 0x004A, 0x00EE, 0x002A, 0x233D, 0xAEFD, 0x377F, 0x0006, 0x2BBD, 0x008A, + 0x55DF, 0x0018, 0x005C, 0x177D, 0x119F, 0x0006, 0x009C, 0x003A, 0x4CCF, 0x1FFB, 0x333D, 0x8EED, 0x444F, + 0x0006, 0x45DD, 0x2FFB, 0x111D, 0x0018, 0x467D, 0x8FFD, 0x99BF, 0x0006, 0x19BD, 0x004A, 0x2EEF, 0x002A, + 0x222D, 0x3FFD, 0x667F, 0x0006, 0x00CC, 0x008A, 0x4EEF, 0x0018, 0x115D, 0xCFFD, 0x899F, 0x0006, 0x00AC, + 0x003A, 0x00DE, 0x1FFB, 0x133D, 0x66FD, 0x226F, 0x0006, 0x8CCD, 0x2FFB, 0x9BFF, 0x0018, 0x006C, 0x4FFD, + 0x00BE, 0x0006, 0x22AD, 0x004A, 0x1DDF, 0x002A, 0x233D, 0xAEFD, 0x007E, 0x0006, 0x2BBD, 0x008A, 0xCEEF, + 0x0018, 0x005C, 0x177D, 0x277F, 0x0006, 0x009C, 0x003A, 0x8BBF, 0x1FFB, 0x333D, 0x8EED, 0x455F, 0x1FF9, + 0x1DDD, 0xAFFB, 0x00DE, 0x8FF9, 0x001C, 0xFFFB, 0x477F, 0x4FF9, 0x177D, 0x3FFB, 0x3BBF, 0x2FF9, 0xAEEF, + 0x8EED, 0x444F, 0x1FF9, 0x22AD, 0x000A, 0x8BBF, 0x8FF9, 0x00FE, 0xCFFD, 0x007E, 0x4FF9, 0x115D, 0x5FFB, + 0x577F, 0x2FF9, 0x8DDF, 0x2EED, 0x333F, 0x1FF9, 0x2BBD, 0xAFFB, 0x88CF, 0x8FF9, 0xBFFF, 0xFFFB, 0x377F, + 0x4FF9, 0x006D, 0x3FFB, 0x00BE, 0x2FF9, 0x66EF, 0x9FFD, 0x133F, 0x1FF9, 0x009D, 0x000A, 0xABBF, 0x8FF9, + 0xDFFF, 0x6FFD, 0x006E, 0x4FF9, 0x002C, 0x5FFB, 0x888F, 0x2FF9, 0xCDDF, 0x4DDD, 0x222F, 0x1FF9, 0x1DDD, + 0xAFFB, 0x4CCF, 0x8FF9, 0x001C, 0xFFFB, 0x277F, 0x4FF9, 0x177D, 0x3FFB, 0x99BF, 0x2FF9, 0xCEEF, 0x8EED, + 0x004E, 0x1FF9, 0x22AD, 0x000A, 0x00AE, 0x8FF9, 0x7FFF, 0xCFFD, 0x005E, 0x4FF9, 0x115D, 0x5FFB, 0x009E, + 0x2FF9, 0x5DDF, 0x2EED, 0x003E, 0x1FF9, 0x2BBD, 0xAFFB, 0x00CE, 0x8FF9, 0xEFFF, 0xFFFB, 0x667F, 0x4FF9, + 0x006D, 0x3FFB, 0x8AAF, 0x2FF9, 0x00EE, 0x9FFD, 0x233F, 0x1FF9, 0x009D, 0x000A, 0x1BBF, 0x8FF9, 0x4EEF, + 0x6FFD, 0x455F, 0x4FF9, 0x002C, 0x5FFB, 0x008E, 0x2FF9, 0x99DF, 0x4DDD, 0x111F}; diff --git a/arm/android/third_party/ffmpeg/libavcodec/jpeg2000htdec.h b/arm/android/third_party/ffmpeg/libavcodec/jpeg2000htdec.h new file mode 100644 index 00000000..572d095c --- /dev/null +++ b/arm/android/third_party/ffmpeg/libavcodec/jpeg2000htdec.h @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2022 Caleb Etemesi + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_JPEG2000HTDEC_H +#define AVCODEC_JPEG2000HTDEC_H + +#include "jpeg2000dec.h" + +/** + * HT Block decoder as specified in Rec. ITU-T T.814 | ISO/IEC 15444-15 + */ + +int ff_jpeg2000_decode_htj2k(const Jpeg2000DecoderContext *s, Jpeg2000CodingStyle *codsty, + Jpeg2000T1Context *t1, Jpeg2000Cblk *cblk, int width, + int height, int magp, uint8_t roi_shift); + +#endif /* AVCODEC_JPEG2000HTDEC_H */ diff --git a/arm/android/third_party/ffmpeg/libavcodec/jvdec.c b/arm/android/third_party/ffmpeg/libavcodec/jvdec.c index e0287a9c..13ede906 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/jvdec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/jvdec.c @@ -37,7 +37,9 @@ typedef struct JvContext { BlockDSPContext bdsp; AVFrame *frame; uint32_t palette[AVPALETTE_COUNT]; +#if FF_API_PALETTE_HAS_CHANGED int palette_has_changed; +#endif } JvContext; static av_cold int decode_init(AVCodecContext *avctx) @@ -207,14 +209,20 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, s->palette[i] = 0xFFU << 24 | pal << 2 | ((pal >> 4) & 0x30303); buf += 3; } +#if FF_API_PALETTE_HAS_CHANGED s->palette_has_changed = 1; +#endif } if (video_size) { - s->frame->key_frame = 1; + s->frame->flags |= AV_FRAME_FLAG_KEY; s->frame->pict_type = AV_PICTURE_TYPE_I; +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS s->frame->palette_has_changed = s->palette_has_changed; s->palette_has_changed = 0; +FF_ENABLE_DEPRECATION_WARNINGS +#endif memcpy(s->frame->data[1], s->palette, AVPALETTE_SIZE); if ((ret = av_frame_ref(rframe, s->frame)) < 0) diff --git a/arm/android/third_party/ffmpeg/libavcodec/kmvc.c b/arm/android/third_party/ffmpeg/libavcodec/kmvc.c index 153cea03..83aba4b2 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/kmvc.c +++ b/arm/android/third_party/ffmpeg/libavcodec/kmvc.c @@ -273,7 +273,14 @@ static int decode_frame(AVCodecContext * avctx, AVFrame *frame, if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) return ret; - frame->palette_has_changed = ff_copy_palette(ctx->pal, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS + frame->palette_has_changed = +#endif + ff_copy_palette(ctx->pal, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_ENABLE_DEPRECATION_WARNINGS +#endif header = bytestream2_get_byte(&ctx->g); @@ -288,15 +295,19 @@ static int decode_frame(AVCodecContext * avctx, AVFrame *frame, } if (header & KMVC_KEYFRAME) { - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_I; } else { - frame->key_frame = 0; + frame->flags &= ~AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_P; } if (header & KMVC_PALETTE) { +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif // palette starts from index 1 and has 127 entries for (i = 1; i <= ctx->palsize; i++) { ctx->pal[i] = 0xFFU << 24 | bytestream2_get_be24(&ctx->g); @@ -305,7 +316,11 @@ static int decode_frame(AVCodecContext * avctx, AVFrame *frame, if (ctx->setpal) { ctx->setpal = 0; +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } /* make the palette available on the way out */ diff --git a/arm/android/third_party/ffmpeg/libavcodec/lagarith.c b/arm/android/third_party/ffmpeg/libavcodec/lagarith.c index 78ccbc15..ebc1f761 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/lagarith.c +++ b/arm/android/third_party/ffmpeg/libavcodec/lagarith.c @@ -550,7 +550,7 @@ static int lag_decode_frame(AVCodecContext *avctx, AVFrame *p, int i, j, planes = 3; int ret = 0; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; p->pict_type = AV_PICTURE_TYPE_I; frametype = buf[0]; diff --git a/arm/android/third_party/ffmpeg/libavcodec/lcldec.c b/arm/android/third_party/ffmpeg/libavcodec/lcldec.c index 5cc0a29b..ed78d9d5 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/lcldec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/lcldec.c @@ -152,6 +152,8 @@ static int zlib_decomp(AVCodecContext *avctx, const uint8_t *src, int src_len, i if (expected != (unsigned int)zstream->total_out) { av_log(avctx, AV_LOG_ERROR, "Decoded size differs (%d != %lu)\n", expected, zstream->total_out); + if (expected > (unsigned int)zstream->total_out) + return (unsigned int)zstream->total_out; return AVERROR_UNKNOWN; } return zstream->total_out; @@ -169,8 +171,8 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, int row, col; unsigned char *encoded = avpkt->data, *outptr; uint8_t *y_out, *u_out, *v_out; - unsigned int width = avctx->width; // Real image width - unsigned int height = avctx->height; // Real image height + int width = avctx->width; // Real image width + int height = avctx->height; // Real image height unsigned int mszh_dlen; unsigned char yq, y1q, uq, vq; int uqvq, ret; @@ -219,7 +221,9 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, if (c->decomp_size != mszh_dlen) { av_log(avctx, AV_LOG_ERROR, "Decoded size differs (%d != %d)\n", c->decomp_size, mszh_dlen); - return AVERROR_INVALIDDATA; + if (c->decomp_size != mszh_dlen && + c->decomp_size != mszh_dlen + 2) // YUV420 306x306 is missing 2 bytes + return AVERROR_INVALIDDATA; } encoded = c->decomp_buf; len = mszh_dlen; @@ -276,12 +280,13 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, ret = zlib_decomp(avctx, buf + 8 + mthread_inlen, len - 8 - mthread_inlen, mthread_outlen, mthread_outlen); if (ret < 0) return ret; + len = c->decomp_size; } else { int ret = zlib_decomp(avctx, buf, len, 0, c->decomp_size); if (ret < 0) return ret; + len = ret; } encoded = c->decomp_buf; - len = c->decomp_size; break; #endif default: @@ -403,6 +408,11 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, v_out[ col >> 1 ] = *encoded++ + 128; v_out[(col >> 1) + 1] = *encoded++ + 128; } + if (col && col < width) { + u_out[ col >> 1 ] = u_out[(col>>1) - 1]; + v_out[ col >> 1 ] = v_out[(col>>1) - 1]; + } + y_out -= frame->linesize[0]; u_out -= frame->linesize[1]; v_out -= frame->linesize[2]; @@ -424,6 +434,10 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, u_out[col >> 2] = *encoded++ + 128; v_out[col >> 2] = *encoded++ + 128; } + if (col && col < width) { + u_out[col >> 2] = u_out[(col>>2) - 1]; + v_out[col >> 2] = v_out[(col>>2) - 1]; + } y_out -= frame->linesize[0]; u_out -= frame->linesize[1]; v_out -= frame->linesize[2]; @@ -464,7 +478,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, return AVERROR_INVALIDDATA; } - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_I; *got_frame = 1; @@ -481,6 +495,7 @@ static av_cold int decode_init(AVCodecContext *avctx) FFALIGN(avctx->height, 4); unsigned int max_decomp_size; int subsample_h, subsample_v; + int partial_h_supported = 0; if (avctx->extradata_size < 8) { av_log(avctx, AV_LOG_ERROR, "Extradata size too small.\n"); @@ -502,26 +517,24 @@ static av_cold int decode_init(AVCodecContext *avctx) av_log(avctx, AV_LOG_DEBUG, "Image type is YUV 1:1:1.\n"); break; case IMGTYPE_YUV422: - c->decomp_size = basesize * 2; + c->decomp_size = (avctx->width & ~3) * avctx->height * 2; max_decomp_size = max_basesize * 2; avctx->pix_fmt = AV_PIX_FMT_YUV422P; av_log(avctx, AV_LOG_DEBUG, "Image type is YUV 4:2:2.\n"); - if (avctx->width % 4) { - avpriv_request_sample(avctx, "Unsupported dimensions"); - return AVERROR_INVALIDDATA; - } + partial_h_supported = 1; break; case IMGTYPE_RGB24: - c->decomp_size = basesize * 3; + c->decomp_size = FFALIGN(avctx->width*3, 4) * avctx->height; max_decomp_size = max_basesize * 3; avctx->pix_fmt = AV_PIX_FMT_BGR24; av_log(avctx, AV_LOG_DEBUG, "Image type is RGB 24.\n"); break; case IMGTYPE_YUV411: - c->decomp_size = basesize / 2 * 3; + c->decomp_size = (avctx->width & ~3) * avctx->height / 2 * 3; max_decomp_size = max_basesize / 2 * 3; avctx->pix_fmt = AV_PIX_FMT_YUV411P; av_log(avctx, AV_LOG_DEBUG, "Image type is YUV 4:1:1.\n"); + partial_h_supported = 1; break; case IMGTYPE_YUV211: c->decomp_size = basesize * 2; @@ -541,7 +554,7 @@ static av_cold int decode_init(AVCodecContext *avctx) } av_pix_fmt_get_chroma_sub_sample(avctx->pix_fmt, &subsample_h, &subsample_v); - if (avctx->width % (1<height % (1<width % (1<height % (1<decoder, AOMD_GET_FRAME_FLAGS, &flags); if (ret == AOM_CODEC_OK) { - picture->key_frame = !!(flags & AOM_FRAME_IS_KEY); + if (flags & AOM_FRAME_IS_KEY) + picture->flags |= AV_FRAME_FLAG_KEY; + else + picture->flags &= ~AV_FRAME_FLAG_KEY; if (flags & (AOM_FRAME_IS_KEY | AOM_FRAME_IS_INTRAONLY)) picture->pict_type = AV_PICTURE_TYPE_I; else if (flags & AOM_FRAME_IS_SWITCH) diff --git a/arm/android/third_party/ffmpeg/libavcodec/libaomenc.c b/arm/android/third_party/ffmpeg/libavcodec/libaomenc.c index 0b88102c..16747e7e 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/libaomenc.c +++ b/arm/android/third_party/ffmpeg/libavcodec/libaomenc.c @@ -1295,8 +1295,18 @@ static int aom_encode(AVCodecContext *avctx, AVPacket *pkt, if (frame->duration > ULONG_MAX) { av_log(avctx, AV_LOG_WARNING, "Frame duration too large: %"PRId64"\n", frame->duration); - } else - duration = frame->duration ? frame->duration : avctx->ticks_per_frame; + } else if (frame->duration) + duration = frame->duration; + else if (avctx->framerate.num > 0 && avctx->framerate.den > 0) + duration = av_rescale_q(1, av_inv_q(avctx->framerate), avctx->time_base); + else +FF_DISABLE_DEPRECATION_WARNINGS + duration = +#if FF_API_TICKS_PER_FRAME + avctx->ticks_per_frame ? avctx->ticks_per_frame : +#endif + 1; +FF_ENABLE_DEPRECATION_WARNINGS switch (frame->color_range) { case AVCOL_RANGE_MPEG: diff --git a/arm/android/third_party/ffmpeg/libavcodec/libdav1d.c b/arm/android/third_party/ffmpeg/libavcodec/libdav1d.c index ddf2311a..c263157a 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/libdav1d.c +++ b/arm/android/third_party/ffmpeg/libavcodec/libdav1d.c @@ -30,6 +30,7 @@ #include "libavutil/opt.h" #include "atsc_a53.h" +#include "av1_parse.h" #include "avcodec.h" #include "bytestream.h" #include "codec_internal.h" @@ -154,12 +155,9 @@ static void libdav1d_init_params(AVCodecContext *c, const Dav1dSequenceHeader *s else c->pix_fmt = pix_fmt[seq->layout][seq->hbd]; - if (seq->num_units_in_tick && seq->time_scale) { - av_reduce(&c->framerate.den, &c->framerate.num, - seq->num_units_in_tick, seq->time_scale, INT_MAX); - if (seq->equal_picture_interval) - c->ticks_per_frame = seq->num_ticks_per_picture; - } + c->framerate = ff_av1_framerate(seq->num_ticks_per_picture, + (unsigned)seq->num_units_in_tick, + (unsigned)seq->time_scale); if (seq->film_grain_present) c->properties |= FF_CODEC_PROPERTY_FILM_GRAIN; @@ -278,6 +276,15 @@ static av_cold int libdav1d_init(AVCodecContext *c) if (res < 0) return AVERROR(ENOMEM); +#if FF_DAV1D_VERSION_AT_LEAST(6,7) + res = dav1d_get_frame_delay(&s); + if (res < 0) // Should not happen + return AVERROR_EXTERNAL; + + // When dav1d_get_frame_delay() returns 1, there's no delay whatsoever + c->delay = res > 1 ? res : 0; +#endif + return 0; } @@ -309,20 +316,14 @@ static void libdav1d_user_data_free(const uint8_t *data, void *opaque) { av_packet_free(&pkt); } -static int libdav1d_receive_frame(AVCodecContext *c, AVFrame *frame) +static int libdav1d_receive_frame_internal(AVCodecContext *c, Dav1dPicture *p) { Libdav1dContext *dav1d = c->priv_data; Dav1dData *data = &dav1d->data; - Dav1dPicture pic = { 0 }, *p = &pic; - AVPacket *pkt; - OpaqueData *od = NULL; -#if FF_DAV1D_VERSION_AT_LEAST(5,1) - enum Dav1dEventFlags event_flags = 0; -#endif int res; if (!data->sz) { - pkt = av_packet_alloc(); + AVPacket *pkt = av_packet_alloc(); if (!pkt) return AVERROR(ENOMEM); @@ -334,6 +335,8 @@ static int libdav1d_receive_frame(AVCodecContext *c, AVFrame *frame) } if (pkt->size) { + OpaqueData *od = NULL; + res = dav1d_data_wrap(data, pkt->data, pkt->size, libdav1d_data_free, pkt->buf); if (res < 0) { @@ -393,12 +396,31 @@ FF_ENABLE_DEPRECATION_WARNINGS if (res < 0) { if (res == AVERROR(EINVAL)) res = AVERROR_INVALIDDATA; - else if (res == AVERROR(EAGAIN) && c->internal->draining) - res = AVERROR_EOF; - - return res; + else if (res == AVERROR(EAGAIN)) + res = c->internal->draining ? AVERROR_EOF : 1; } + return res; +} + +static int libdav1d_receive_frame(AVCodecContext *c, AVFrame *frame) +{ + Libdav1dContext *dav1d = c->priv_data; + Dav1dPicture pic = { 0 }, *p = &pic; + AVPacket *pkt; + OpaqueData *od = NULL; +#if FF_DAV1D_VERSION_AT_LEAST(5,1) + enum Dav1dEventFlags event_flags = 0; +#endif + int res; + + do { + res = libdav1d_receive_frame_internal(c, p); + } while (res > 0); + + if (res < 0) + return res; + av_assert0(p->data[0] && p->allocator_data); // This requires the custom allocator above @@ -463,7 +485,10 @@ FF_ENABLE_DEPRECATION_WARNINGS goto fail; frame->pkt_dts = pkt->pts; - frame->key_frame = p->frame_hdr->frame_type == DAV1D_FRAME_TYPE_KEY; + if (p->frame_hdr->frame_type == DAV1D_FRAME_TYPE_KEY) + frame->flags |= AV_FRAME_FLAG_KEY; + else + frame->flags &= ~AV_FRAME_FLAG_KEY; switch (p->frame_hdr->frame_type) { case DAV1D_FRAME_TYPE_KEY: @@ -511,10 +536,16 @@ FF_ENABLE_DEPRECATION_WARNINGS light->MaxFALL = p->content_light->max_frame_average_light_level; } if (p->itut_t35) { +#if FF_DAV1D_VERSION_AT_LEAST(6,9) + for (size_t i = 0; i < p->n_itut_t35; i++) { + const Dav1dITUTT35 *itut_t35 = &p->itut_t35[i]; +#else + const Dav1dITUTT35 *itut_t35 = p->itut_t35; +#endif GetByteContext gb; int provider_code; - bytestream2_init(&gb, p->itut_t35->payload, p->itut_t35->payload_size); + bytestream2_init(&gb, itut_t35->payload, itut_t35->payload_size); provider_code = bytestream2_get_be16(&gb); switch (provider_code) { @@ -546,7 +577,7 @@ FF_ENABLE_DEPRECATION_WARNINGS int provider_oriented_code = bytestream2_get_be16(&gb); int application_identifier = bytestream2_get_byte(&gb); - if (p->itut_t35->country_code != 0xB5 || + if (itut_t35->country_code != 0xB5 || provider_oriented_code != 1 || application_identifier != 4) break; @@ -565,6 +596,9 @@ FF_ENABLE_DEPRECATION_WARNINGS default: // ignore unsupported provider codes break; } +#if FF_DAV1D_VERSION_AT_LEAST(6,9) + } +#endif } if (p->frame_hdr->film_grain.present && (!dav1d->apply_grain || (c->export_side_data & AV_CODEC_EXPORT_DATA_FILM_GRAIN))) { diff --git a/arm/android/third_party/ffmpeg/libavcodec/libfdk-aacenc.c b/arm/android/third_party/ffmpeg/libavcodec/libfdk-aacenc.c index eb97e0fb..e08c6a0c 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/libfdk-aacenc.c +++ b/arm/android/third_party/ffmpeg/libavcodec/libfdk-aacenc.c @@ -55,6 +55,7 @@ typedef struct AACContext { int metadata_mode; AACENC_MetaData metaDataSetup; int delay_sent; + int frame_length; AudioFrameQueue afq; } AACContext; @@ -78,6 +79,7 @@ static const AVOption aac_enc_options[] = { { "comp_profile", "The desired compression profile for AAC DRC", offsetof(AACContext, comp_profile), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 256, AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM }, { "comp_target_ref", "Expected target reference level at decoder side in dB (for clipping prevention/limiter)", offsetof(AACContext, comp_target_ref), AV_OPT_TYPE_INT, { .i64 = 0.0 }, -31.75, 0, AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM }, { "prog_ref", "The program reference level or dialog level in dB", offsetof(AACContext, prog_ref), AV_OPT_TYPE_INT, { .i64 = 0.0 }, -31.75, 0, AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM }, + { "frame_length", "The desired frame length", offsetof(AACContext, frame_length), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 1024, AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM }, FF_AAC_PROFILE_OPTS { NULL } }; @@ -132,6 +134,44 @@ static int aac_encode_close(AVCodecContext *avctx) return 0; } +static void aac_encode_flush(AVCodecContext *avctx) +{ + AACContext *s = avctx->priv_data; + AACENC_BufDesc in_buf = { 0 }, out_buf = { 0 }; + AACENC_InArgs in_args = { 0 }; + AACENC_OutArgs out_args; + int64_t pts, duration; + uint8_t dummy_in[1], dummy_out[1]; + int in_buffer_identifiers[] = { IN_AUDIO_DATA, IN_METADATA_SETUP }; + int in_buffer_element_sizes[] = { 2, sizeof(AACENC_MetaData) }; + int in_buffer_sizes[] = { 0, sizeof(s->metaDataSetup) }; + int out_buffer_identifier = OUT_BITSTREAM_DATA; + int out_buffer_size = sizeof(dummy_out), out_buffer_element_size = 1; + void* inBuffer[] = { dummy_in, &s->metaDataSetup }; + void *out_ptr = dummy_out; + AACENC_ERROR err; + + ff_af_queue_remove(&s->afq, s->afq.frame_count, &pts, &duration); + + in_buf.bufs = (void **)inBuffer; + in_buf.numBufs = s->metadata_mode == 0 ? 1 : 2; + in_buf.bufferIdentifiers = in_buffer_identifiers; + in_buf.bufSizes = in_buffer_sizes; + in_buf.bufElSizes = in_buffer_element_sizes; + + out_buf.numBufs = 1; + out_buf.bufs = &out_ptr; + out_buf.bufferIdentifiers = &out_buffer_identifier; + out_buf.bufSizes = &out_buffer_size; + out_buf.bufElSizes = &out_buffer_element_size; + + err = aacEncEncode(s->handle, &in_buf, &out_buf, &in_args, &out_args); + if (err != AACENC_OK) { + av_log(avctx, AV_LOG_ERROR, "Unexpected error while flushing: %s\n", + aac_get_error(err)); + } +} + static av_cold int aac_encode_init(AVCodecContext *avctx) { AACContext *s = avctx->priv_data; @@ -166,6 +206,15 @@ static av_cold int aac_encode_init(AVCodecContext *avctx) } } + if (s->frame_length >= 0) { + if ((err = aacEncoder_SetParam(s->handle, AACENC_GRANULE_LENGTH, + s->frame_length)) != AACENC_OK) { + av_log(avctx, AV_LOG_ERROR, "Unable to set granule length: %s\n", + aac_get_error(err)); + goto error; + } + } + if ((err = aacEncoder_SetParam(s->handle, AACENC_SAMPLERATE, avctx->sample_rate)) != AACENC_OK) { av_log(avctx, AV_LOG_ERROR, "Unable to set the sample rate %d: %s\n", @@ -561,11 +610,13 @@ const FFCodec ff_libfdk_aac_encoder = { .p.type = AVMEDIA_TYPE_AUDIO, .p.id = AV_CODEC_ID_AAC, .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY | + AV_CODEC_CAP_ENCODER_FLUSH | AV_CODEC_CAP_SMALL_LAST_FRAME, .caps_internal = FF_CODEC_CAP_NOT_INIT_THREADSAFE, .priv_data_size = sizeof(AACContext), .init = aac_encode_init, FF_CODEC_ENCODE_CB(aac_encode_frame), + .flush = aac_encode_flush, .close = aac_encode_close, .p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE }, diff --git a/arm/android/third_party/ffmpeg/libavcodec/libjxldec.c b/arm/android/third_party/ffmpeg/libavcodec/libjxldec.c index 045a1535..65966b7b 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/libjxldec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/libjxldec.c @@ -411,7 +411,7 @@ static int libjxl_decode_frame(AVCodecContext *avctx, AVFrame *frame, int *got_f /* full image is one frame, even if animated */ av_log(avctx, AV_LOG_DEBUG, "FULL_IMAGE event emitted\n"); frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; if (ctx->iccp) { AVFrameSideData *sd = av_frame_new_side_data_from_buf(frame, AV_FRAME_DATA_ICC_PROFILE, ctx->iccp); if (!sd) diff --git a/arm/android/third_party/ffmpeg/libavcodec/libjxlenc.c b/arm/android/third_party/ffmpeg/libavcodec/libjxlenc.c index 897452f5..d707f3a6 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/libjxlenc.c +++ b/arm/android/third_party/ffmpeg/libavcodec/libjxlenc.c @@ -335,11 +335,11 @@ static int libjxl_encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFra break; case AVCOL_TRC_GAMMA22: jxl_color.transfer_function = JXL_TRANSFER_FUNCTION_GAMMA; - jxl_color.gamma = 2.2; + jxl_color.gamma = 1/2.2f; break; case AVCOL_TRC_GAMMA28: jxl_color.transfer_function = JXL_TRANSFER_FUNCTION_GAMMA; - jxl_color.gamma = 2.8; + jxl_color.gamma = 1/2.8f; break; default: if (pix_desc->flags & AV_PIX_FMT_FLAG_FLOAT) { diff --git a/arm/android/third_party/ffmpeg/libavcodec/libkvazaar.c b/arm/android/third_party/ffmpeg/libavcodec/libkvazaar.c index 168486f4..2ef34dd8 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/libkvazaar.c +++ b/arm/android/third_party/ffmpeg/libavcodec/libkvazaar.c @@ -85,13 +85,14 @@ static av_cold int libkvazaar_init(AVCodecContext *avctx) cfg->framerate_num = avctx->framerate.num; cfg->framerate_denom = avctx->framerate.den; } else { - if (avctx->ticks_per_frame > INT_MAX / avctx->time_base.num) { - av_log(avctx, AV_LOG_ERROR, - "Could not set framerate for kvazaar: integer overflow\n"); - return AVERROR(EINVAL); - } cfg->framerate_num = avctx->time_base.den; - cfg->framerate_denom = avctx->time_base.num * avctx->ticks_per_frame; +FF_DISABLE_DEPRECATION_WARNINGS + cfg->framerate_denom = avctx->time_base.num +#if FF_API_TICKS_PER_FRAME + * avctx->ticks_per_frame +#endif + ; +FF_ENABLE_DEPRECATION_WARNINGS } cfg->target_bitrate = avctx->bit_rate; cfg->vui.sar_width = avctx->sample_aspect_ratio.num; diff --git a/arm/android/third_party/ffmpeg/libavcodec/libmp3lame.c b/arm/android/third_party/ffmpeg/libavcodec/libmp3lame.c index e119189f..312bc423 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/libmp3lame.c +++ b/arm/android/third_party/ffmpeg/libavcodec/libmp3lame.c @@ -55,6 +55,8 @@ typedef struct LAMEContext { float *samples_flt[2]; AudioFrameQueue afq; AVFloatDSPContext *fdsp; + int copyright; + int original; } LAMEContext; @@ -137,6 +139,12 @@ static av_cold int mp3lame_encode_init(AVCodecContext *avctx) /* bit reservoir usage */ lame_set_disable_reservoir(s->gfp, !s->reservoir); + /* copyright flag */ + lame_set_copyright(s->gfp, s->copyright); + + /* original flag */ + lame_set_original(s->gfp, s->original); + /* set specified parameters */ if (lame_init_params(s->gfp) < 0) { ret = AVERROR_EXTERNAL; @@ -303,9 +311,11 @@ static int mp3lame_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, #define OFFSET(x) offsetof(LAMEContext, x) #define AE AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM static const AVOption options[] = { - { "reservoir", "use bit reservoir", OFFSET(reservoir), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, AE }, - { "joint_stereo", "use joint stereo", OFFSET(joint_stereo), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, AE }, - { "abr", "use ABR", OFFSET(abr), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, AE }, + { "reservoir", "use bit reservoir", OFFSET(reservoir), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, AE }, + { "joint_stereo", "use joint stereo", OFFSET(joint_stereo), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, AE }, + { "abr", "use ABR", OFFSET(abr), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, AE }, + { "copyright", "set copyright flag", OFFSET(copyright), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, AE}, + { "original", "set original flag", OFFSET(original), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, AE}, { NULL }, }; diff --git a/arm/android/third_party/ffmpeg/libavcodec/libopenh264enc.c b/arm/android/third_party/ffmpeg/libavcodec/libopenh264enc.c index 8b4755f5..5b59af6f 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/libopenh264enc.c +++ b/arm/android/third_party/ffmpeg/libavcodec/libopenh264enc.c @@ -139,12 +139,13 @@ static av_cold int svc_encode_init(AVCodecContext *avctx) if (avctx->framerate.num > 0 && avctx->framerate.den > 0) { param.fMaxFrameRate = av_q2d(avctx->framerate); } else { - if (avctx->ticks_per_frame > INT_MAX / avctx->time_base.num) { - av_log(avctx, AV_LOG_ERROR, - "Could not set framerate for libopenh264enc: integer overflow\n"); - return AVERROR(EINVAL); - } - param.fMaxFrameRate = 1.0 / av_q2d(avctx->time_base) / FFMAX(avctx->ticks_per_frame, 1); +FF_DISABLE_DEPRECATION_WARNINGS + param.fMaxFrameRate = 1.0 / av_q2d(avctx->time_base) +#if FF_API_TICKS_PER_FRAME + / FFMAX(avctx->ticks_per_frame, 1) +#endif + ; +FF_ENABLE_DEPRECATION_WARNINGS } param.iPicWidth = avctx->width; param.iPicHeight = avctx->height; @@ -311,15 +312,15 @@ static av_cold int svc_encode_init(AVCodecContext *avctx) #if OPENH264_VER_AT_LEAST(1, 6) param.sSpatialLayers[0].uiVideoFormat = VF_UNDEF; + if (avctx->color_range != AVCOL_RANGE_UNSPECIFIED) { - param.sSpatialLayers[0].bVideoSignalTypePresent = true; param.sSpatialLayers[0].bFullRange = (avctx->color_range == AVCOL_RANGE_JPEG); - } + } else if (avctx->pix_fmt == AV_PIX_FMT_YUVJ420P) + param.sSpatialLayers[0].bFullRange = 1; if (avctx->colorspace != AVCOL_SPC_UNSPECIFIED || avctx->color_primaries != AVCOL_PRI_UNSPECIFIED || avctx->color_trc != AVCOL_TRC_UNSPECIFIED) { - param.sSpatialLayers[0].bVideoSignalTypePresent = true; param.sSpatialLayers[0].bColorDescriptionPresent = true; } @@ -329,6 +330,9 @@ static av_cold int svc_encode_init(AVCodecContext *avctx) param.sSpatialLayers[0].uiColorPrimaries = avctx->color_primaries; if (avctx->color_trc != AVCOL_TRC_UNSPECIFIED) param.sSpatialLayers[0].uiTransferCharacteristics = avctx->color_trc; + + param.sSpatialLayers[0].bVideoSignalTypePresent = + (param.sSpatialLayers[0].bFullRange || param.sSpatialLayers[0].bColorDescriptionPresent); #endif if ((*s->encoder)->InitializeExt(s->encoder, ¶m) != cmResultSuccess) { @@ -443,6 +447,7 @@ const FFCodec ff_libopenh264_encoder = { .caps_internal = FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_AUTO_THREADS, .p.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, + AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_NONE }, .defaults = svc_enc_defaults, .p.priv_class = &class, diff --git a/arm/android/third_party/ffmpeg/libavcodec/librav1e.c b/arm/android/third_party/ffmpeg/libavcodec/librav1e.c index 08affabe..56539435 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/librav1e.c +++ b/arm/android/third_party/ffmpeg/libavcodec/librav1e.c @@ -219,10 +219,15 @@ static av_cold int librav1e_encode_init(AVCodecContext *avctx) avctx->framerate.den, avctx->framerate.num }); } else { +FF_DISABLE_DEPRECATION_WARNINGS rav1e_config_set_time_base(cfg, (RaRational) { - avctx->time_base.num * avctx->ticks_per_frame, - avctx->time_base.den + avctx->time_base.num +#if FF_API_TICKS_PER_FRAME + * avctx->ticks_per_frame +#endif + , avctx->time_base.den }); +FF_ENABLE_DEPRECATION_WARNINGS } if ((avctx->flags & AV_CODEC_FLAG_PASS1 || avctx->flags & AV_CODEC_FLAG_PASS2) && !avctx->bit_rate) { diff --git a/arm/android/third_party/ffmpeg/libavcodec/librsvgdec.c b/arm/android/third_party/ffmpeg/libavcodec/librsvgdec.c index 9c8aa2de..2f160edc 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/librsvgdec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/librsvgdec.c @@ -73,7 +73,7 @@ static int librsvg_decode_frame(AVCodecContext *avctx, AVFrame *frame, if ((ret = ff_get_buffer(avctx, frame, 0))) return ret; frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; image = cairo_image_surface_create_for_data(frame->data[0], CAIRO_FORMAT_ARGB32, frame->width, frame->height, diff --git a/arm/android/third_party/ffmpeg/libavcodec/libspeexdec.c b/arm/android/third_party/ffmpeg/libavcodec/libspeexdec.c index 47fc5d6a..84b30849 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/libspeexdec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/libspeexdec.c @@ -195,7 +195,11 @@ const FFCodec ff_libspeex_decoder = { CODEC_LONG_NAME("libspeex Speex"), .p.type = AVMEDIA_TYPE_AUDIO, .p.id = AV_CODEC_ID_SPEEX, - .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF, + .p.capabilities = +#if FF_API_SUBFRAMES + AV_CODEC_CAP_SUBFRAMES | +#endif + AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF, .p.wrapper_name = "libspeex", .caps_internal = FF_CODEC_CAP_NOT_INIT_THREADSAFE, .priv_data_size = sizeof(LibSpeexContext), diff --git a/arm/android/third_party/ffmpeg/libavcodec/libsvtav1.c b/arm/android/third_party/ffmpeg/libavcodec/libsvtav1.c index 9174e275..718a04d2 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/libsvtav1.c +++ b/arm/android/third_party/ffmpeg/libavcodec/libsvtav1.c @@ -170,7 +170,7 @@ static int config_enc_params(EbSvtAv1EncConfiguration *param, param->look_ahead_distance = svt_enc->la_depth; #endif - if (svt_enc->enc_mode >= 0) + if (svt_enc->enc_mode >= -1) param->enc_mode = svt_enc->enc_mode; if (avctx->bit_rate) { @@ -250,7 +250,13 @@ static int config_enc_params(EbSvtAv1EncConfiguration *param, param->frame_rate_denominator = avctx->framerate.den; } else { param->frame_rate_numerator = avctx->time_base.den; - param->frame_rate_denominator = avctx->time_base.num * avctx->ticks_per_frame; +FF_DISABLE_DEPRECATION_WARNINGS + param->frame_rate_denominator = avctx->time_base.num +#if FF_API_TICKS_PER_FRAME + * avctx->ticks_per_frame +#endif + ; +FF_ENABLE_DEPRECATION_WARNINGS } /* 2 = IDR, closed GOP, 1 = CRA, open GOP */ @@ -593,7 +599,7 @@ static const AVOption options[] = { { "high", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 1 }, 0, 0, VE, "tier" }, #endif { "preset", "Encoding preset", - OFFSET(enc_mode), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, MAX_ENC_PRESET, VE }, + OFFSET(enc_mode), AV_OPT_TYPE_INT, { .i64 = -2 }, -2, MAX_ENC_PRESET, VE }, FF_AV1_PROFILE_OPTS diff --git a/arm/android/third_party/ffmpeg/libavcodec/libuavs3d.c b/arm/android/third_party/ffmpeg/libavcodec/libuavs3d.c index 5c08d2b8..66e8d310 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/libuavs3d.c +++ b/arm/android/third_party/ffmpeg/libavcodec/libuavs3d.c @@ -96,7 +96,10 @@ FF_ENABLE_DEPRECATION_WARNINGS av_log(NULL, AV_LOG_WARNING, "Error frame type in uavs3d: %d.\n", dec_frame->type); } else { frm->pict_type = ff_avs3_image_type[dec_frame->type]; - frm->key_frame = (frm->pict_type == AV_PICTURE_TYPE_I); + if (frm->pict_type == AV_PICTURE_TYPE_I) + frm->flags |= AV_FRAME_FLAG_KEY; + else + frm->flags &= ~AV_FRAME_FLAG_KEY; } for (i = 0; i < 3; i++) { diff --git a/arm/android/third_party/ffmpeg/libavcodec/libvpxenc.c b/arm/android/third_party/ffmpeg/libavcodec/libvpxenc.c index a20e9498..8833df2d 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/libvpxenc.c +++ b/arm/android/third_party/ffmpeg/libavcodec/libvpxenc.c @@ -1692,6 +1692,7 @@ static int vpx_encode(AVCodecContext *avctx, AVPacket *pkt, const struct vpx_codec_enc_cfg *enccfg = ctx->encoder.config.enc; vpx_svc_layer_id_t layer_id; int layer_id_valid = 0; + unsigned long duration = 0; if (avctx->qmax >= 0 && enccfg->rc_max_quantizer != avctx->qmax) { struct vpx_codec_enc_cfg cfg = *enccfg; @@ -1820,8 +1821,24 @@ static int vpx_encode(AVCodecContext *avctx, AVPacket *pkt, #endif } + if (frame && frame->duration > ULONG_MAX) { + av_log(avctx, AV_LOG_WARNING, + "Frame duration too large: %"PRId64"\n", frame->duration); + } else if (frame && frame->duration) + duration = frame->duration; + else if (avctx->framerate.num > 0 && avctx->framerate.den > 0) + duration = av_rescale_q(1, av_inv_q(avctx->framerate), avctx->time_base); + else +FF_DISABLE_DEPRECATION_WARNINGS + duration = +#if FF_API_TICKS_PER_FRAME + avctx->ticks_per_frame ? avctx->ticks_per_frame : +#endif + 1; +FF_ENABLE_DEPRECATION_WARNINGS + res = vpx_codec_encode(&ctx->encoder, rawimg, timestamp, - avctx->ticks_per_frame, flags, ctx->deadline); + duration, flags, ctx->deadline); if (res != VPX_CODEC_OK) { log_encoder_error(avctx, "Error encoding frame"); return AVERROR_INVALIDDATA; @@ -1829,7 +1846,7 @@ static int vpx_encode(AVCodecContext *avctx, AVPacket *pkt, if (ctx->is_alpha) { res = vpx_codec_encode(&ctx->encoder_alpha, rawimg_alpha, timestamp, - avctx->ticks_per_frame, flags, ctx->deadline); + duration, flags, ctx->deadline); if (res != VPX_CODEC_OK) { log_encoder_error(avctx, "Error encoding alpha frame"); return AVERROR_INVALIDDATA; diff --git a/arm/android/third_party/ffmpeg/libavcodec/libx264.c b/arm/android/third_party/ffmpeg/libavcodec/libx264.c index cf7a9a78..774c23da 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/libx264.c +++ b/arm/android/third_party/ffmpeg/libavcodec/libx264.c @@ -151,7 +151,7 @@ static int encode_nals(AVCodecContext *ctx, AVPacket *pkt, { X264Context *x4 = ctx->priv_data; uint8_t *p; - uint64_t size = x4->sei_size; + uint64_t size = FFMAX(x4->sei_size, 0); int ret; if (!nnal) @@ -178,8 +178,8 @@ static int encode_nals(AVCodecContext *ctx, AVPacket *pkt, memcpy(p, x4->sei, x4->sei_size); p += x4->sei_size; size -= x4->sei_size; - x4->sei_size = 0; - av_freep(&x4->sei); + /* Keep the value around in case of flush */ + x4->sei_size = -x4->sei_size; } /* x264 guarantees the payloads of the NALs @@ -196,9 +196,9 @@ static void reconfig_encoder(AVCodecContext *ctx, const AVFrame *frame) if (x4->avcintra_class < 0) { - if (x4->params.b_interlaced && x4->params.b_tff != frame->top_field_first) { + if (x4->params.b_interlaced && x4->params.b_tff != !!(frame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST)) { - x4->params.b_tff = frame->top_field_first; + x4->params.b_tff = !!(frame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST); x264_encoder_reconfig(x4->enc, &x4->params); } if (x4->params.vui.i_sar_height*ctx->sample_aspect_ratio.num != ctx->sample_aspect_ratio.den * x4->params.vui.i_sar_width) { @@ -339,7 +339,7 @@ static int setup_roi(AVCodecContext *ctx, x264_picture_t *pic, int bit_depth, av_log(ctx, AV_LOG_WARNING, "Adaptive quantization must be enabled to use ROI encoding, skipping ROI.\n"); } return 0; - } else if (frame->interlaced_frame) { + } else if (frame->flags & AV_FRAME_FLAG_INTERLACED) { if (!x4->roi_warned) { x4->roi_warned = 1; av_log(ctx, AV_LOG_WARNING, "interlaced_frame not supported for ROI encoding yet, skipping ROI.\n"); @@ -664,6 +664,24 @@ FF_ENABLE_DEPRECATION_WARNINGS return 0; } +static void X264_flush(AVCodecContext *avctx) +{ + X264Context *x4 = avctx->priv_data; + x264_nal_t *nal; + int nnal, ret; + x264_picture_t pic_out = {0}; + + do { + ret = x264_encoder_encode(x4->enc, &nal, &nnal, NULL, &pic_out); + } while (ret > 0 && x264_encoder_delayed_frames(x4->enc)); + + for (int i = 0; i < x4->nb_reordered_opaque; i++) + opaque_uninit(&x4->reordered_opaque[i]); + + if (x4->sei_size < 0) + x4->sei_size = -x4->sei_size; +} + static av_cold int X264_close(AVCodecContext *avctx) { X264Context *x4 = avctx->priv_data; @@ -1016,7 +1034,13 @@ static av_cold int X264_init(AVCodecContext *avctx) x4->params.i_fps_den = avctx->framerate.den; } else { x4->params.i_fps_num = avctx->time_base.den; - x4->params.i_fps_den = avctx->time_base.num * avctx->ticks_per_frame; +FF_DISABLE_DEPRECATION_WARNINGS + x4->params.i_fps_den = avctx->time_base.num +#if FF_API_TICKS_PER_FRAME + * avctx->ticks_per_frame +#endif + ; +FF_ENABLE_DEPRECATION_WARNINGS } x4->params.analyse.b_psnr = avctx->flags & AV_CODEC_FLAG_PSNR; @@ -1351,12 +1375,14 @@ FFCodec ff_libx264_encoder = { .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY | AV_CODEC_CAP_OTHER_THREADS | AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE | + AV_CODEC_CAP_ENCODER_FLUSH | AV_CODEC_CAP_ENCODER_RECON_FRAME, .p.priv_class = &x264_class, .p.wrapper_name = "libx264", .priv_data_size = sizeof(X264Context), .init = X264_init, FF_CODEC_ENCODE_CB(X264_frame), + .flush = X264_flush, .close = X264_close, .defaults = x264_defaults, #if X264_BUILD < 153 diff --git a/arm/android/third_party/ffmpeg/libavcodec/libx265.c b/arm/android/third_party/ffmpeg/libavcodec/libx265.c index 420d0953..873b3021 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/libx265.c +++ b/arm/android/third_party/ffmpeg/libavcodec/libx265.c @@ -220,7 +220,13 @@ static av_cold int libx265_encode_init(AVCodecContext *avctx) ctx->params->fpsDenom = avctx->framerate.den; } else { ctx->params->fpsNum = avctx->time_base.den; - ctx->params->fpsDenom = avctx->time_base.num * avctx->ticks_per_frame; +FF_DISABLE_DEPRECATION_WARNINGS + ctx->params->fpsDenom = avctx->time_base.num +#if FF_API_TICKS_PER_FRAME + * avctx->ticks_per_frame +#endif + ; +FF_ENABLE_DEPRECATION_WARNINGS } ctx->params->sourceWidth = avctx->width; ctx->params->sourceHeight = avctx->height; diff --git a/arm/android/third_party/ffmpeg/libavcodec/loco.c b/arm/android/third_party/ffmpeg/libavcodec/loco.c index d57a6731..3d118232 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/loco.c +++ b/arm/android/third_party/ffmpeg/libavcodec/loco.c @@ -206,7 +206,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, if ((ret = ff_get_buffer(avctx, p, 0)) < 0) return ret; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; #define ADVANCE_BY_DECODED do { \ if (decoded < 0 || decoded >= buf_size) goto buf_too_small; \ diff --git a/arm/android/third_party/ffmpeg/libavcodec/lscrdec.c b/arm/android/third_party/ffmpeg/libavcodec/lscrdec.c index 76a46751..415914bf 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/lscrdec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/lscrdec.c @@ -154,10 +154,13 @@ static int decode_frame_lscr(AVCodecContext *avctx, AVFrame *rframe, size = bytestream2_get_le32(gb); - frame->key_frame = (nb_blocks == 1) && - (w == avctx->width) && - (h == avctx->height) && - (x == 0) && (y == 0); + if ((nb_blocks == 1) && + (w == avctx->width) && + (h == avctx->height) && + (x == 0) && (y == 0)) + frame->flags |= AV_FRAME_FLAG_KEY; + else + frame->flags &= ~AV_FRAME_FLAG_KEY; bytestream2_seek(gb, 2 + nb_blocks * 12 + offset, SEEK_SET); csize = bytestream2_get_be32(gb); @@ -199,7 +202,7 @@ static int decode_frame_lscr(AVCodecContext *avctx, AVFrame *rframe, } } - frame->pict_type = frame->key_frame ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; + frame->pict_type = (frame->flags & AV_FRAME_FLAG_KEY) ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; if ((ret = av_frame_ref(rframe, frame)) < 0) return ret; diff --git a/arm/android/third_party/ffmpeg/libavcodec/m101.c b/arm/android/third_party/ffmpeg/libavcodec/m101.c index 3def577b..43a3c7bb 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/m101.c +++ b/arm/android/third_party/ffmpeg/libavcodec/m101.c @@ -67,15 +67,17 @@ static int m101_decode_frame(AVCodecContext *avctx, AVFrame *frame, if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) return ret; frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; - frame->interlaced_frame = ((avctx->extradata[3*4] & 3) != 3); - if (frame->interlaced_frame) - frame->top_field_first = avctx->extradata[3*4] & 1; + frame->flags |= AV_FRAME_FLAG_KEY; + if ((avctx->extradata[3*4] & 3) != 3) { + frame->flags |= AV_FRAME_FLAG_INTERLACED; + if (avctx->extradata[3*4] & 1) + frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST; + } for (y = 0; y < avctx->height; y++) { int src_y = y; - if (frame->interlaced_frame) - src_y = ((y&1)^frame->top_field_first) ? y/2 : (y/2 + avctx->height/2); + if (frame->flags & AV_FRAME_FLAG_INTERLACED) + src_y = ((y&1) ^ !!(frame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST)) ? y/2 : (y/2 + avctx->height/2); if (bits == 8) { uint8_t *line = frame->data[0] + y*frame->linesize[0]; memcpy(line, buf + src_y*stride, 2*avctx->width); diff --git a/arm/android/third_party/ffmpeg/libavcodec/magicyuv.c b/arm/android/third_party/ffmpeg/libavcodec/magicyuv.c index 62263409..7898cd5b 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/magicyuv.c +++ b/arm/android/third_party/ffmpeg/libavcodec/magicyuv.c @@ -637,7 +637,7 @@ static int magy_decode_frame(AVCodecContext *avctx, AVFrame *p, return ret; p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; if ((ret = ff_thread_get_buffer(avctx, p, 0)) < 0) return ret; diff --git a/arm/android/third_party/ffmpeg/libavcodec/mdec.c b/arm/android/third_party/ffmpeg/libavcodec/mdec.c index 640b671a..44b12471 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/mdec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/mdec.c @@ -177,7 +177,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, if ((ret = ff_thread_get_buffer(avctx, frame, 0)) < 0) return ret; frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; av_fast_padded_malloc(&a->bitstream_buffer, &a->bitstream_buffer_size, buf_size); if (!a->bitstream_buffer) diff --git a/arm/android/third_party/ffmpeg/libavcodec/me_cmp.c b/arm/android/third_party/ffmpeg/libavcodec/me_cmp.c index e2f9f84b..cd05e63f 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/me_cmp.c +++ b/arm/android/third_party/ffmpeg/libavcodec/me_cmp.c @@ -473,8 +473,9 @@ static int zero_cmp(MpegEncContext *s, const uint8_t *a, const uint8_t *b, return 0; } -void ff_set_cmp(MECmpContext *c, me_cmp_func *cmp, int type) +int ff_set_cmp(MECmpContext *c, me_cmp_func *cmp, int type) { + int ret = 0; int i; memset(cmp, 0, sizeof(void *) * 6); @@ -533,9 +534,13 @@ void ff_set_cmp(MECmpContext *c, me_cmp_func *cmp, int type) #endif default: av_log(NULL, AV_LOG_ERROR, - "internal error in cmp function selection\n"); + "invalid cmp function selection\n"); + ret = -1; + break; } } + + return ret; } #define BUTTERFLY2(o1, o2, i1, i2) \ diff --git a/arm/android/third_party/ffmpeg/libavcodec/me_cmp.h b/arm/android/third_party/ffmpeg/libavcodec/me_cmp.h index 90ea76c8..aefd32a7 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/me_cmp.h +++ b/arm/android/third_party/ffmpeg/libavcodec/me_cmp.h @@ -89,7 +89,7 @@ void ff_me_cmp_init_ppc(MECmpContext *c, AVCodecContext *avctx); void ff_me_cmp_init_x86(MECmpContext *c, AVCodecContext *avctx); void ff_me_cmp_init_mips(MECmpContext *c, AVCodecContext *avctx); -void ff_set_cmp(MECmpContext *c, me_cmp_func *cmp, int type); +int ff_set_cmp(MECmpContext *c, me_cmp_func *cmp, int type); void ff_dsputil_init_dwt(MECmpContext *c); diff --git a/arm/android/third_party/ffmpeg/libavcodec/mediacodec_wrapper.c b/arm/android/third_party/ffmpeg/libavcodec/mediacodec_wrapper.c index d1fb640e..eb69ad7e 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/mediacodec_wrapper.c +++ b/arm/android/third_party/ffmpeg/libavcodec/mediacodec_wrapper.c @@ -319,10 +319,49 @@ int ff_AMediaCodecProfile_getProfileFromAVCodecContext(AVCodecContext *avctx) static const int HEVCProfileMain10HDR10 = 0x1000; static const int HEVCProfileMain10HDR10Plus = 0x2000; + static const int VP9Profile0 = 0x01; + static const int VP9Profile1 = 0x02; + static const int VP9Profile2 = 0x04; + static const int VP9Profile3 = 0x08; + static const int VP9Profile2HDR = 0x1000; + static const int VP9Profile3HDR = 0x2000; + static const int VP9Profile2HDR10Plus = 0x4000; + static const int VP9Profile3HDR10Plus = 0x8000; + + static const int MPEG4ProfileSimple = 0x01; + static const int MPEG4ProfileSimpleScalable = 0x02; + static const int MPEG4ProfileCore = 0x04; + static const int MPEG4ProfileMain = 0x08; + static const int MPEG4ProfileNbit = 0x10; + static const int MPEG4ProfileScalableTexture = 0x20; + static const int MPEG4ProfileSimpleFBA = 0x80; + static const int MPEG4ProfileSimpleFace = 0x40; + static const int MPEG4ProfileBasicAnimated = 0x100; + static const int MPEG4ProfileHybrid = 0x200; + static const int MPEG4ProfileAdvancedRealTime = 0x400; + static const int MPEG4ProfileCoreScalable = 0x800; + static const int MPEG4ProfileAdvancedCoding = 0x1000; + static const int MPEG4ProfileAdvancedCore = 0x2000; + static const int MPEG4ProfileAdvancedScalable = 0x4000; + static const int MPEG4ProfileAdvancedSimple = 0x8000; + + + static const int AV1ProfileMain8 = 0x1; + static const int AV1ProfileMain10 = 0x2; + static const int AV1ProfileMain10HDR10 = 0x1000; + static const int AV1ProfileMain10HDR10Plus = 0x2000; + // Unused yet. (void)AVCProfileConstrainedHigh; (void)HEVCProfileMain10HDR10; (void)HEVCProfileMain10HDR10Plus; + (void)VP9Profile2HDR; + (void)VP9Profile3HDR; + (void)VP9Profile2HDR10Plus; + (void)VP9Profile3HDR10Plus; + (void)AV1ProfileMain10; + (void)AV1ProfileMain10HDR10; + (void)AV1ProfileMain10HDR10Plus; if (avctx->codec_id == AV_CODEC_ID_H264) { switch(avctx->profile) { @@ -357,6 +396,65 @@ int ff_AMediaCodecProfile_getProfileFromAVCodecContext(AVCodecContext *avctx) case FF_PROFILE_HEVC_MAIN_10: return HEVCProfileMain10; } + } else if (avctx->codec_id == AV_CODEC_ID_VP9) { + switch (avctx->profile) { + case FF_PROFILE_VP9_0: + return VP9Profile0; + case FF_PROFILE_VP9_1: + return VP9Profile1; + case FF_PROFILE_VP9_2: + return VP9Profile2; + case FF_PROFILE_VP9_3: + return VP9Profile3; + } + } else if(avctx->codec_id == AV_CODEC_ID_MPEG4) { + switch (avctx->profile) + { + case FF_PROFILE_MPEG4_SIMPLE: + return MPEG4ProfileSimple; + case FF_PROFILE_MPEG4_SIMPLE_SCALABLE: + return MPEG4ProfileSimpleScalable; + case FF_PROFILE_MPEG4_CORE: + return MPEG4ProfileCore; + case FF_PROFILE_MPEG4_MAIN: + return MPEG4ProfileMain; + case FF_PROFILE_MPEG4_N_BIT: + return MPEG4ProfileNbit; + case FF_PROFILE_MPEG4_SCALABLE_TEXTURE: + return MPEG4ProfileScalableTexture; + case FF_PROFILE_MPEG4_SIMPLE_FACE_ANIMATION: + return MPEG4ProfileSimpleFBA; + case FF_PROFILE_MPEG4_BASIC_ANIMATED_TEXTURE: + return MPEG4ProfileBasicAnimated; + case FF_PROFILE_MPEG4_HYBRID: + return MPEG4ProfileHybrid; + case FF_PROFILE_MPEG4_ADVANCED_REAL_TIME: + return MPEG4ProfileAdvancedRealTime; + case FF_PROFILE_MPEG4_CORE_SCALABLE: + return MPEG4ProfileCoreScalable; + case FF_PROFILE_MPEG4_ADVANCED_CODING: + return MPEG4ProfileAdvancedCoding; + case FF_PROFILE_MPEG4_ADVANCED_CORE: + return MPEG4ProfileAdvancedCore; + case FF_PROFILE_MPEG4_ADVANCED_SCALABLE_TEXTURE: + return MPEG4ProfileAdvancedScalable; + case FF_PROFILE_MPEG4_ADVANCED_SIMPLE: + return MPEG4ProfileAdvancedSimple; + case FF_PROFILE_MPEG4_SIMPLE_STUDIO: + // Studio profiles are not supported by mediacodec. + default: + break; + } + } else if(avctx->codec_id == AV_CODEC_ID_AV1) { + switch (avctx->profile) + { + case FF_PROFILE_AV1_MAIN: + return AV1ProfileMain8; + case FF_PROFILE_AV1_HIGH: + case FF_PROFILE_AV1_PROFESSIONAL: + default: + break; + } } return -1; diff --git a/arm/android/third_party/ffmpeg/libavcodec/mediacodecenc.c b/arm/android/third_party/ffmpeg/libavcodec/mediacodecenc.c index 2ab56597..d23745c1 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/mediacodecenc.c +++ b/arm/android/third_party/ffmpeg/libavcodec/mediacodecenc.c @@ -164,6 +164,18 @@ static av_cold int mediacodec_init(AVCodecContext *avctx) case AV_CODEC_ID_HEVC: codec_mime = "video/hevc"; break; + case AV_CODEC_ID_VP8: + codec_mime = "video/x-vnd.on2.vp8"; + break; + case AV_CODEC_ID_VP9: + codec_mime = "video/x-vnd.on2.vp9"; + break; + case AV_CODEC_ID_MPEG4: + codec_mime = "video/mp4v-es"; + break; + case AV_CODEC_ID_AV1: + codec_mime = "video/av01"; + break; default: av_assert0(0); } @@ -317,6 +329,10 @@ static av_cold int mediacodec_init(AVCodecContext *avctx) goto bailout; mediacodec_output_format(avctx); + if (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) + av_log(avctx, AV_LOG_WARNING, + "Mediacodec encoder doesn't support AV_CODEC_FLAG_GLOBAL_HEADER. " + "Use extract_extradata bsf when necessary.\n"); s->frame = av_frame_alloc(); if (!s->frame) @@ -764,3 +780,223 @@ static const AVOption hevc_options[] = { DECLARE_MEDIACODEC_ENCODER(hevc, "H.265", AV_CODEC_ID_HEVC) #endif // CONFIG_HEVC_MEDIACODEC_ENCODER + +#if CONFIG_VP8_MEDIACODEC_ENCODER + +enum MediaCodecVP8Level { + VP8Level_Version0 = 0x01, + VP8Level_Version1 = 0x02, + VP8Level_Version2 = 0x04, + VP8Level_Version3 = 0x08, +}; + +static const AVOption vp8_options[] = { + COMMON_OPTION + { "level", "Specify tier and level", + OFFSET(level), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, VE, "level" }, + { "V0", "Level Version 0", + 0, AV_OPT_TYPE_CONST, { .i64 = VP8Level_Version0 }, 0, 0, VE, "level" }, + { "V1", "Level Version 1", + 0, AV_OPT_TYPE_CONST, { .i64 = VP8Level_Version1 }, 0, 0, VE, "level" }, + { "V2", "Level Version 2", + 0, AV_OPT_TYPE_CONST, { .i64 = VP8Level_Version2 }, 0, 0, VE, "level" }, + { "V3", "Level Version 3", + 0, AV_OPT_TYPE_CONST, { .i64 = VP8Level_Version3 }, 0, 0, VE, "level" }, + { NULL, } +}; + +DECLARE_MEDIACODEC_ENCODER(vp8, "VP8", AV_CODEC_ID_VP8) + +#endif // CONFIG_VP8_MEDIACODEC_ENCODER + +#if CONFIG_VP9_MEDIACODEC_ENCODER + +enum MediaCodecVP9Level { + VP9Level1 = 0x1, + VP9Level11 = 0x2, + VP9Level2 = 0x4, + VP9Level21 = 0x8, + VP9Level3 = 0x10, + VP9Level31 = 0x20, + VP9Level4 = 0x40, + VP9Level41 = 0x80, + VP9Level5 = 0x100, + VP9Level51 = 0x200, + VP9Level52 = 0x400, + VP9Level6 = 0x800, + VP9Level61 = 0x1000, + VP9Level62 = 0x2000, +}; + +static const AVOption vp9_options[] = { + COMMON_OPTION + { "level", "Specify tier and level", + OFFSET(level), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, VE, "level" }, + { "1", "Level 1", + 0, AV_OPT_TYPE_CONST, { .i64 = VP9Level1 }, 0, 0, VE, "level" }, + { "1.1", "Level 1.1", + 0, AV_OPT_TYPE_CONST, { .i64 = VP9Level11 }, 0, 0, VE, "level" }, + { "2", "Level 2", + 0, AV_OPT_TYPE_CONST, { .i64 = VP9Level2 }, 0, 0, VE, "level" }, + { "2.1", "Level 2.1", + 0, AV_OPT_TYPE_CONST, { .i64 = VP9Level21 }, 0, 0, VE, "level" }, + { "3", "Level 3", + 0, AV_OPT_TYPE_CONST, { .i64 = VP9Level3 }, 0, 0, VE, "level" }, + { "3.1", "Level 3.1", + 0, AV_OPT_TYPE_CONST, { .i64 = VP9Level31 }, 0, 0, VE, "level" }, + { "4", "Level 4", + 0, AV_OPT_TYPE_CONST, { .i64 = VP9Level4 }, 0, 0, VE, "level" }, + { "4.1", "Level 4.1", + 0, AV_OPT_TYPE_CONST, { .i64 = VP9Level41 }, 0, 0, VE, "level" }, + { "5", "Level 5", + 0, AV_OPT_TYPE_CONST, { .i64 = VP9Level5 }, 0, 0, VE, "level" }, + { "5.1", "Level 5.1", + 0, AV_OPT_TYPE_CONST, { .i64 = VP9Level51 }, 0, 0, VE, "level" }, + { "5.2", "Level 5.2", + 0, AV_OPT_TYPE_CONST, { .i64 = VP9Level52 }, 0, 0, VE, "level" }, + { "6", "Level 6", + 0, AV_OPT_TYPE_CONST, { .i64 = VP9Level6 }, 0, 0, VE, "level" }, + { "6.1", "Level 4.1", + 0, AV_OPT_TYPE_CONST, { .i64 = VP9Level61 }, 0, 0, VE, "level" }, + { "6.2", "Level 6.2", + 0, AV_OPT_TYPE_CONST, { .i64 = VP9Level62 }, 0, 0, VE, "level" }, + { NULL, } +}; + +DECLARE_MEDIACODEC_ENCODER(vp9, "VP9", AV_CODEC_ID_VP9) + +#endif // CONFIG_VP9_MEDIACODEC_ENCODER + +#if CONFIG_MPEG4_MEDIACODEC_ENCODER + +enum MediaCodecMpeg4Level { + MPEG4Level0 = 0x01, + MPEG4Level0b = 0x02, + MPEG4Level1 = 0x04, + MPEG4Level2 = 0x08, + MPEG4Level3 = 0x10, + MPEG4Level3b = 0x18, + MPEG4Level4 = 0x20, + MPEG4Level4a = 0x40, + MPEG4Level5 = 0x80, + MPEG4Level6 = 0x100, +}; + +static const AVOption mpeg4_options[] = { + COMMON_OPTION + { "level", "Specify tier and level", + OFFSET(level), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, VE, "level" }, + { "0", "Level 0", + 0, AV_OPT_TYPE_CONST, { .i64 = MPEG4Level0 }, 0, 0, VE, "level" }, + { "0b", "Level 0b", + 0, AV_OPT_TYPE_CONST, { .i64 = MPEG4Level0b }, 0, 0, VE, "level" }, + { "1", "Level 1", + 0, AV_OPT_TYPE_CONST, { .i64 = MPEG4Level1 }, 0, 0, VE, "level" }, + { "2", "Level 2", + 0, AV_OPT_TYPE_CONST, { .i64 = MPEG4Level2 }, 0, 0, VE, "level" }, + { "3", "Level 3", + 0, AV_OPT_TYPE_CONST, { .i64 = MPEG4Level3 }, 0, 0, VE, "level" }, + { "3b", "Level 3b", + 0, AV_OPT_TYPE_CONST, { .i64 = MPEG4Level3b }, 0, 0, VE, "level" }, + { "4", "Level 4", + 0, AV_OPT_TYPE_CONST, { .i64 = MPEG4Level4 }, 0, 0, VE, "level" }, + { "4a", "Level 4a", + 0, AV_OPT_TYPE_CONST, { .i64 = MPEG4Level4a }, 0, 0, VE, "level" }, + { "5", "Level 5", + 0, AV_OPT_TYPE_CONST, { .i64 = MPEG4Level5 }, 0, 0, VE, "level" }, + { "6", "Level 6", + 0, AV_OPT_TYPE_CONST, { .i64 = MPEG4Level6 }, 0, 0, VE, "level" }, + { NULL, } +}; + +DECLARE_MEDIACODEC_ENCODER(mpeg4, "MPEG-4", AV_CODEC_ID_MPEG4) + +#endif // CONFIG_MPEG4_MEDIACODEC_ENCODER + +#if CONFIG_AV1_MEDIACODEC_ENCODER + +enum MediaCodecAV1Level { + AV1Level2 = 0x1, + AV1Level21 = 0x2, + AV1Level22 = 0x4, + AV1Level23 = 0x8, + AV1Level3 = 0x10, + AV1Level31 = 0x20, + AV1Level32 = 0x40, + AV1Level33 = 0x80, + AV1Level4 = 0x100, + AV1Level41 = 0x200, + AV1Level42 = 0x400, + AV1Level43 = 0x800, + AV1Level5 = 0x1000, + AV1Level51 = 0x2000, + AV1Level52 = 0x4000, + AV1Level53 = 0x8000, + AV1Level6 = 0x10000, + AV1Level61 = 0x20000, + AV1Level62 = 0x40000, + AV1Level63 = 0x80000, + AV1Level7 = 0x100000, + AV1Level71 = 0x200000, + AV1Level72 = 0x400000, + AV1Level73 = 0x800000, +}; + +static const AVOption av1_options[] = { + COMMON_OPTION + { "level", "Specify tier and level", + OFFSET(level), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, VE, "level" }, + { "2", "Level 2", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level2 }, 0, 0, VE, "level" }, + { "2.1", "Level 2.1", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level21 }, 0, 0, VE, "level" }, + { "2.2", "Level 2.2", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level22 }, 0, 0, VE, "level" }, + { "2.3", "Level 2.3", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level23 }, 0, 0, VE, "level" }, + { "3", "Level 3", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level3 }, 0, 0, VE, "level" }, + { "3.1", "Level 3.1", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level31 }, 0, 0, VE, "level" }, + { "3.2", "Level 3.2", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level32 }, 0, 0, VE, "level" }, + { "3.3", "Level 3.3", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level33 }, 0, 0, VE, "level" }, + { "4", "Level 4", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level4 }, 0, 0, VE, "level" }, + { "4.1", "Level 4.1", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level41 }, 0, 0, VE, "level" }, + { "4.2", "Level 4.2", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level42 }, 0, 0, VE, "level" }, + { "4.3", "Level 4.3", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level43 }, 0, 0, VE, "level" }, + { "5", "Level 5", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level5 }, 0, 0, VE, "level" }, + { "5.1", "Level 5.1", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level51 }, 0, 0, VE, "level" }, + { "5.2", "Level 5.2", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level52 }, 0, 0, VE, "level" }, + { "5.3", "Level 5.3", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level53 }, 0, 0, VE, "level" }, + { "6", "Level 6", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level6 }, 0, 0, VE, "level" }, + { "6.1", "Level 6.1", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level61 }, 0, 0, VE, "level" }, + { "6.2", "Level 6.2", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level62 }, 0, 0, VE, "level" }, + { "6.3", "Level 6.3", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level63 }, 0, 0, VE, "level" }, + { "7", "Level 7", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level7 }, 0, 0, VE, "level" }, + { "7.1", "Level 7.1", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level71 }, 0, 0, VE, "level" }, + { "7.2", "Level 7.2", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level72 }, 0, 0, VE, "level" }, + { "7.3", "Level 7.3", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level73 }, 0, 0, VE, "level" }, + { NULL, } +}; + +DECLARE_MEDIACODEC_ENCODER(av1, "AV1", AV_CODEC_ID_AV1) + +#endif // CONFIG_AV1_MEDIACODEC_ENCODER diff --git a/arm/android/third_party/ffmpeg/libavcodec/mfenc.c b/arm/android/third_party/ffmpeg/libavcodec/mfenc.c index f3415df1..8d950a31 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/mfenc.c +++ b/arm/android/third_party/ffmpeg/libavcodec/mfenc.c @@ -659,7 +659,11 @@ static int mf_encv_output_adjust(AVCodecContext *avctx, IMFMediaType *type) framerate = avctx->framerate; } else { framerate = av_inv_q(avctx->time_base); +#if FF_API_TICKS_PER_FRAME +FF_DISABLE_DEPRECATION_WARNINGS framerate.den *= avctx->ticks_per_frame; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } ff_MFSetAttributeRatio((IMFAttributes *)type, &MF_MT_FRAME_RATE, framerate.num, framerate.den); diff --git a/arm/android/third_party/ffmpeg/libavcodec/midivid.c b/arm/android/third_party/ffmpeg/libavcodec/midivid.c index 599d5c8f..70730231 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/midivid.c +++ b/arm/android/third_party/ffmpeg/libavcodec/midivid.c @@ -222,7 +222,10 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, return ret; frame->pict_type = key ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; - frame->key_frame = key; + if (key) + frame->flags |= AV_FRAME_FLAG_KEY; + else + frame->flags &= ~AV_FRAME_FLAG_KEY; *got_frame = 1; return avpkt->size; diff --git a/arm/android/third_party/ffmpeg/libavcodec/misc4.c b/arm/android/third_party/ffmpeg/libavcodec/misc4.c index 1bf162e1..72ac944e 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/misc4.c +++ b/arm/android/third_party/ffmpeg/libavcodec/misc4.c @@ -179,7 +179,10 @@ const FFCodec ff_misc4_decoder = { .priv_data_size = sizeof(MISC4Context), .init = misc4_init, FF_CODEC_DECODE_CB(misc4_decode), - .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_SUBFRAMES | + .p.capabilities = AV_CODEC_CAP_DR1 | +#if FF_API_SUBFRAMES + AV_CODEC_CAP_SUBFRAMES | +#endif AV_CODEC_CAP_CHANNEL_CONF, .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE }, diff --git a/arm/android/third_party/ffmpeg/libavcodec/mjpegdec.c b/arm/android/third_party/ffmpeg/libavcodec/mjpegdec.c index c833d66c..ab7fa738 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/mjpegdec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/mjpegdec.c @@ -441,8 +441,8 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s) s->height < ((s->orig_height * 3) / 4)) { s->interlaced = 1; s->bottom_field = s->interlace_polarity; - s->picture_ptr->interlaced_frame = 1; - s->picture_ptr->top_field_first = !s->interlace_polarity; + s->picture_ptr->flags |= AV_FRAME_FLAG_INTERLACED; + s->picture_ptr->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST * !s->interlace_polarity; height *= 2; } @@ -545,6 +545,18 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s) } av_assert0(s->nb_components == 4); break; + case 0x11412100: + if (s->bits > 8) + goto unk_pixfmt; + if (s->component_id[0] == 'R' && s->component_id[1] == 'G' && s->component_id[2] == 'B') { + s->avctx->pix_fmt = AV_PIX_FMT_GBRP; + s->upscale_h[0] = 4; + s->upscale_h[1] = 0; + s->upscale_h[2] = 1; + } else { + goto unk_pixfmt; + } + break; case 0x22111122: case 0x22111111: if (s->adobe_transform == 0 && s->bits <= 8) { @@ -571,10 +583,15 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s) case 0x22221100: case 0x22112200: case 0x11222200: - if (s->bits <= 8) s->avctx->pix_fmt = s->cs_itu601 ? AV_PIX_FMT_YUV444P : AV_PIX_FMT_YUVJ444P; - else + if (s->bits > 8) goto unk_pixfmt; - s->avctx->color_range = s->cs_itu601 ? AVCOL_RANGE_MPEG : AVCOL_RANGE_JPEG; + if (s->adobe_transform == 0 || s->component_id[0] == 'R' && + s->component_id[1] == 'G' && s->component_id[2] == 'B') { + s->avctx->pix_fmt = AV_PIX_FMT_GBRP; + } else { + s->avctx->pix_fmt = s->cs_itu601 ? AV_PIX_FMT_YUV444P : AV_PIX_FMT_YUVJ444P; + s->avctx->color_range = s->cs_itu601 ? AVCOL_RANGE_MPEG : AVCOL_RANGE_JPEG; + } break; case 0x11000000: case 0x13000000: @@ -599,7 +616,7 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s) if (s->bits <= 8) s->avctx->pix_fmt = AV_PIX_FMT_GBRP; else goto unk_pixfmt; - s->upscale_v[0] = s->upscale_v[1] = 1; + s->upscale_v[1] = s->upscale_v[2] = 1; } else { if (pix_fmt_id == 0x14111100) s->upscale_v[1] = s->upscale_v[2] = 1; @@ -614,13 +631,22 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s) if (s->bits <= 8) s->avctx->pix_fmt = AV_PIX_FMT_GBRP; else goto unk_pixfmt; - s->upscale_h[0] = s->upscale_h[1] = 1; + s->upscale_h[1] = s->upscale_h[2] = 1; } else { if (s->bits <= 8) s->avctx->pix_fmt = s->cs_itu601 ? AV_PIX_FMT_YUV422P : AV_PIX_FMT_YUVJ422P; else s->avctx->pix_fmt = AV_PIX_FMT_YUV422P16; s->avctx->color_range = s->cs_itu601 ? AVCOL_RANGE_MPEG : AVCOL_RANGE_JPEG; } break; + case 0x11311100: + if (s->bits > 8) + goto unk_pixfmt; + if (s->component_id[0] == 'R' && s->component_id[1] == 'G' && s->component_id[2] == 'B') + s->avctx->pix_fmt = AV_PIX_FMT_GBRP; + else + goto unk_pixfmt; + s->upscale_h[0] = s->upscale_h[2] = 2; + break; case 0x31111100: if (s->bits > 8) goto unk_pixfmt; @@ -630,6 +656,7 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s) break; case 0x22121100: case 0x22111200: + case 0x41211100: if (s->bits <= 8) s->avctx->pix_fmt = s->cs_itu601 ? AV_PIX_FMT_YUV422P : AV_PIX_FMT_YUVJ422P; else goto unk_pixfmt; @@ -673,10 +700,6 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s) avpriv_report_missing_feature(s->avctx, "Lowres for weird subsampling"); return AVERROR_PATCHWELCOME; } - if ((AV_RB32(s->upscale_h) || AV_RB32(s->upscale_v)) && s->progressive && s->avctx->pix_fmt == AV_PIX_FMT_GBRP) { - avpriv_report_missing_feature(s->avctx, "progressive for weird subsampling"); - return AVERROR_PATCHWELCOME; - } if (s->ls) { memset(s->upscale_h, 0, sizeof(s->upscale_h)); memset(s->upscale_v, 0, sizeof(s->upscale_v)); @@ -722,7 +745,7 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s) if (s->avctx->skip_frame == AVDISCARD_ALL) { s->picture_ptr->pict_type = AV_PICTURE_TYPE_I; - s->picture_ptr->key_frame = 1; + s->picture_ptr->flags |= AV_FRAME_FLAG_KEY; s->got_picture = 1; return 0; } @@ -731,7 +754,7 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s) if (ff_get_buffer(s->avctx, s->picture_ptr, AV_GET_BUFFER_FLAG_REF) < 0) return -1; s->picture_ptr->pict_type = AV_PICTURE_TYPE_I; - s->picture_ptr->key_frame = 1; + s->picture_ptr->flags |= AV_FRAME_FLAG_KEY; s->got_picture = 1; // Lets clear the palette to avoid leaving uninitialized values in it @@ -1697,9 +1720,6 @@ int ff_mjpeg_decode_sos(MJpegDecodeContext *s, const uint8_t *mb_bitmask, s->h_scount[i] = s->h_count[index]; s->v_scount[i] = s->v_count[index]; - if((nb_components == 1 || nb_components == 3) && s->nb_components == 3 && s->avctx->pix_fmt == AV_PIX_FMT_GBR24P) - index = (index+2)%3; - s->comp_index[i] = index; s->dc_index[i] = get_bits(&s->gb, 4); @@ -2607,6 +2627,8 @@ the_end: avctx->pix_fmt == AV_PIX_FMT_YUVJ440P || avctx->pix_fmt == AV_PIX_FMT_YUV440P || avctx->pix_fmt == AV_PIX_FMT_YUVA444P || + avctx->pix_fmt == AV_PIX_FMT_YUVJ422P || + avctx->pix_fmt == AV_PIX_FMT_YUV422P || avctx->pix_fmt == AV_PIX_FMT_YUVJ420P || avctx->pix_fmt == AV_PIX_FMT_YUV420P || avctx->pix_fmt == AV_PIX_FMT_YUV420P16|| @@ -2656,6 +2678,24 @@ the_end: for (index = w - 3; index > 0; index--) { line[index] = (line[index / 3] + line[(index + 1) / 3] + line[(index + 2) / 3] + 1) / 3; } + } else if (s->upscale_h[p] == 4){ + if (is16bit) { + uint16_t *line16 = (uint16_t *) line; + line16[w - 1] = line16[(w - 1) >> 2]; + if (w > 1) + line16[w - 2] = (line16[(w - 1) >> 2] * 3 + line16[(w - 2) >> 2]) >> 2; + if (w > 2) + line16[w - 3] = (line16[(w - 1) >> 2] + line16[(w - 2) >> 2]) >> 1; + } else { + line[w - 1] = line[(w - 1) >> 2]; + if (w > 1) + line[w - 2] = (line[(w - 1) >> 2] * 3 + line[(w - 2) >> 2]) >> 2; + if (w > 2) + line[w - 3] = (line[(w - 1) >> 2] + line[(w - 2) >> 2]) >> 1; + } + for (index = w - 4; index > 0; index--) + line[index] = (line[(index + 3) >> 2] + line[(index + 2) >> 2] + + line[(index + 1) >> 2] + line[index >> 2]) >> 2; } line += s->linesize[p]; } @@ -2722,6 +2762,15 @@ the_end: } } } + + if (s->avctx->pix_fmt == AV_PIX_FMT_GBRP) { + av_assert0(s->nb_components == 3); + FFSWAP(uint8_t *, frame->data[0], frame->data[2]); + FFSWAP(uint8_t *, frame->data[0], frame->data[1]); + FFSWAP(int, frame->linesize[0], frame->linesize[2]); + FFSWAP(int, frame->linesize[0], frame->linesize[1]); + } + if (s->adobe_transform == 0 && s->avctx->pix_fmt == AV_PIX_FMT_GBRAP) { int w = s->picture_ptr->width; int h = s->picture_ptr->height; @@ -3003,6 +3052,8 @@ static void smv_process_frame(AVCodecContext *avctx, AVFrame *frame) frame->crop_top = FFMIN(s->smv_next_frame * avctx->height, frame->height); frame->crop_bottom = frame->height - (s->smv_next_frame + 1) * avctx->height; + if (s->smv_frame->pts != AV_NOPTS_VALUE) + s->smv_frame->pts += s->smv_frame->duration; s->smv_next_frame = (s->smv_next_frame + 1) % s->smv_frames_per_jpeg; if (s->smv_next_frame == 0) @@ -3013,26 +3064,20 @@ static int smvjpeg_receive_frame(AVCodecContext *avctx, AVFrame *frame) { MJpegDecodeContext *s = avctx->priv_data; AVPacket *const pkt = avctx->internal->in_pkt; - int64_t pkt_dts; int got_frame = 0; int ret; - if (s->smv_next_frame > 0) { - av_assert0(s->smv_frame->buf[0]); - ret = av_frame_ref(frame, s->smv_frame); - if (ret < 0) - return ret; - - smv_process_frame(avctx, frame); - return 0; - } + if (s->smv_next_frame > 0) + goto return_frame; ret = ff_decode_get_packet(avctx, pkt); if (ret < 0) return ret; - ret = ff_mjpeg_decode_frame(avctx, frame, &got_frame, pkt); - pkt_dts = pkt->dts; + av_frame_unref(s->smv_frame); + + ret = ff_mjpeg_decode_frame(avctx, s->smv_frame, &got_frame, pkt); + s->smv_frame->pkt_dts = pkt->dts; av_packet_unref(pkt); if (ret < 0) return ret; @@ -3040,11 +3085,12 @@ static int smvjpeg_receive_frame(AVCodecContext *avctx, AVFrame *frame) if (!got_frame) return AVERROR(EAGAIN); - frame->pkt_dts = pkt_dts; + // packet duration covers all the frames in the packet + s->smv_frame->duration /= s->smv_frames_per_jpeg; - av_assert0(frame->buf[0]); - av_frame_unref(s->smv_frame); - ret = av_frame_ref(s->smv_frame, frame); +return_frame: + av_assert0(s->smv_frame->buf[0]); + ret = av_frame_ref(frame, s->smv_frame); if (ret < 0) return ret; diff --git a/arm/android/third_party/ffmpeg/libavcodec/mmaldec.c b/arm/android/third_party/ffmpeg/libavcodec/mmaldec.c index 3092f585..9bfb6778 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/mmaldec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/mmaldec.c @@ -622,8 +622,10 @@ static int ffmal_copy_frame(AVCodecContext *avctx, AVFrame *frame, MMALDecodeContext *ctx = avctx->priv_data; int ret = 0; - frame->interlaced_frame = ctx->interlaced_frame; - frame->top_field_first = ctx->top_field_first; + if (ctx->interlaced_frame) + frame->flags |= AV_FRAME_FLAG_INTERLACED; + if (ctx->top_field_first) + frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST; if (avctx->pix_fmt == AV_PIX_FMT_MMAL) { if (!ctx->pool_out) diff --git a/arm/android/third_party/ffmpeg/libavcodec/mobiclip.c b/arm/android/third_party/ffmpeg/libavcodec/mobiclip.c index c3b2383d..381b492d 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/mobiclip.c +++ b/arm/android/third_party/ffmpeg/libavcodec/mobiclip.c @@ -1235,7 +1235,7 @@ static int mobiclip_decode(AVCodecContext *avctx, AVFrame *rframe, if (get_bits1(gb)) { frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; s->moflex = get_bits1(gb); s->dct_tab_idx = get_bits1(gb); @@ -1256,7 +1256,7 @@ static int mobiclip_decode(AVCodecContext *avctx, AVFrame *rframe, memset(motion, 0, s->motion_size); frame->pict_type = AV_PICTURE_TYPE_P; - frame->key_frame = 0; + frame->flags &= ~AV_FRAME_FLAG_KEY; s->dct_tab_idx = 0; ret = setup_qtables(avctx, s->quantizer + (int64_t)get_se_golomb(gb)); diff --git a/arm/android/third_party/ffmpeg/libavcodec/motion_est.c b/arm/android/third_party/ffmpeg/libavcodec/motion_est.c index d17ffe42..df9d1bef 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/motion_est.c +++ b/arm/android/third_party/ffmpeg/libavcodec/motion_est.c @@ -309,6 +309,7 @@ int ff_init_me(MpegEncContext *s){ MotionEstContext * const c= &s->me; int cache_size= FFMIN(ME_MAP_SIZE>>ME_MAP_SHIFT, 1<avctx->dia_size)&255, FFABS(s->avctx->pre_dia_size)&255); + int ret; if(FFMIN(s->avctx->dia_size, s->avctx->pre_dia_size) < -FFMIN(ME_MAP_SIZE, MAX_SAB_SIZE)){ av_log(s->avctx, AV_LOG_ERROR, "ME_MAP size is too small for SAB diamond\n"); @@ -324,10 +325,12 @@ int ff_init_me(MpegEncContext *s){ av_log(s->avctx, AV_LOG_INFO, "ME_MAP size may be a little small for the selected diamond size\n"); } - ff_set_cmp(&s->mecc, s->mecc.me_pre_cmp, c->avctx->me_pre_cmp); - ff_set_cmp(&s->mecc, s->mecc.me_cmp, c->avctx->me_cmp); - ff_set_cmp(&s->mecc, s->mecc.me_sub_cmp, c->avctx->me_sub_cmp); - ff_set_cmp(&s->mecc, s->mecc.mb_cmp, c->avctx->mb_cmp); + ret = ff_set_cmp(&s->mecc, s->mecc.me_pre_cmp, c->avctx->me_pre_cmp); + ret |= ff_set_cmp(&s->mecc, s->mecc.me_cmp, c->avctx->me_cmp); + ret |= ff_set_cmp(&s->mecc, s->mecc.me_sub_cmp, c->avctx->me_sub_cmp); + ret |= ff_set_cmp(&s->mecc, s->mecc.mb_cmp, c->avctx->mb_cmp); + if (ret < 0) + return ret; c->flags = get_flags(c, 0, c->avctx->me_cmp &FF_CMP_CHROMA); c->sub_flags= get_flags(c, 0, c->avctx->me_sub_cmp&FF_CMP_CHROMA); diff --git a/arm/android/third_party/ffmpeg/libavcodec/mpeg12dec.c b/arm/android/third_party/ffmpeg/libavcodec/mpeg12dec.c index 2b9fb8cb..52fc78a8 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/mpeg12dec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/mpeg12dec.c @@ -1265,7 +1265,11 @@ static int mpeg_decode_postinit(AVCodecContext *avctx) if (avctx->codec_id == AV_CODEC_ID_MPEG1VIDEO) { // MPEG-1 fps avctx->framerate = ff_mpeg12_frame_rate_tab[s1->frame_rate_index]; +#if FF_API_TICKS_PER_FRAME +FF_DISABLE_DEPRECATION_WARNINGS avctx->ticks_per_frame = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif avctx->chroma_sample_location = AVCHROMA_LOC_CENTER; } else { // MPEG-2 @@ -1275,7 +1279,11 @@ static int mpeg_decode_postinit(AVCodecContext *avctx) ff_mpeg12_frame_rate_tab[s1->frame_rate_index].num * s1->frame_rate_ext.num, ff_mpeg12_frame_rate_tab[s1->frame_rate_index].den * s1->frame_rate_ext.den, 1 << 30); +#if FF_API_TICKS_PER_FRAME +FF_DISABLE_DEPRECATION_WARNINGS avctx->ticks_per_frame = 2; +FF_ENABLE_DEPRECATION_WARNINGS +#endif switch (s->chroma_format) { case 1: avctx->chroma_sample_location = AVCHROMA_LOC_LEFT; break; @@ -1343,7 +1351,10 @@ static int mpeg1_decode_picture(AVCodecContext *avctx, const uint8_t *buf, s->mpeg_f_code[1][1] = f_code; } s->current_picture.f->pict_type = s->pict_type; - s->current_picture.f->key_frame = s->pict_type == AV_PICTURE_TYPE_I; + if (s->pict_type == AV_PICTURE_TYPE_I) + s->current_picture.f->flags |= AV_FRAME_FLAG_KEY; + else + s->current_picture.f->flags &= ~AV_FRAME_FLAG_KEY; if (avctx->debug & FF_DEBUG_PICT_INFO) av_log(avctx, AV_LOG_DEBUG, @@ -1525,7 +1536,10 @@ static int mpeg_decode_picture_coding_extension(Mpeg1Context *s1) } else s->pict_type = AV_PICTURE_TYPE_B; s->current_picture.f->pict_type = s->pict_type; - s->current_picture.f->key_frame = s->pict_type == AV_PICTURE_TYPE_I; + if (s->pict_type == AV_PICTURE_TYPE_I) + s->current_picture.f->flags |= AV_FRAME_FLAG_KEY; + else + s->current_picture.f->flags &= ~AV_FRAME_FLAG_KEY; } s->intra_dc_precision = get_bits(&s->gb, 2); @@ -3046,7 +3060,7 @@ static int ipu_decode_frame(AVCodecContext *avctx, AVFrame *frame, return AVERROR_INVALIDDATA; frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; *got_frame = 1; return avpkt->size; diff --git a/arm/android/third_party/ffmpeg/libavcodec/mpeg12enc.c b/arm/android/third_party/ffmpeg/libavcodec/mpeg12enc.c index a932b596..4aa45e9e 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/mpeg12enc.c +++ b/arm/android/third_party/ffmpeg/libavcodec/mpeg12enc.c @@ -290,7 +290,7 @@ static void mpeg1_encode_sequence_header(MpegEncContext *s) AVRational aspect_ratio = s->avctx->sample_aspect_ratio; int aspect_ratio_info; - if (!s->current_picture.f->key_frame) + if (!(s->current_picture.f->flags & AV_FRAME_FLAG_KEY)) return; if (aspect_ratio.num == 0 || aspect_ratio.den == 0) @@ -530,7 +530,7 @@ void ff_mpeg1_encode_picture_header(MpegEncContext *s) if (s->progressive_sequence) put_bits(&s->pb, 1, 0); /* no repeat */ else - put_bits(&s->pb, 1, s->current_picture_ptr->f->top_field_first); + put_bits(&s->pb, 1, !!(s->current_picture_ptr->f->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST)); /* XXX: optimize the generation of this flag with entropy measures */ s->frame_pred_frame_dct = s->progressive_sequence; diff --git a/arm/android/third_party/ffmpeg/libavcodec/mpeg4videoenc.c b/arm/android/third_party/ffmpeg/libavcodec/mpeg4videoenc.c index c3e9ebea..777635c4 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/mpeg4videoenc.c +++ b/arm/android/third_party/ffmpeg/libavcodec/mpeg4videoenc.c @@ -1101,7 +1101,7 @@ int ff_mpeg4_encode_picture_header(MpegEncContext *s) } put_bits(&s->pb, 3, 0); /* intra dc VLC threshold */ if (!s->progressive_sequence) { - put_bits(&s->pb, 1, s->current_picture_ptr->f->top_field_first); + put_bits(&s->pb, 1, !!(s->current_picture_ptr->f->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST)); put_bits(&s->pb, 1, s->alternate_scan); } // FIXME sprite stuff diff --git a/arm/android/third_party/ffmpeg/libavcodec/mpegvideo_dec.c b/arm/android/third_party/ffmpeg/libavcodec/mpegvideo_dec.c index 522a0aad..765ccd0b 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/mpegvideo_dec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/mpegvideo_dec.c @@ -331,19 +331,22 @@ FF_ENABLE_DEPRECATION_WARNINGS s->current_picture_ptr = pic; // FIXME use only the vars from current_pic - s->current_picture_ptr->f->top_field_first = s->top_field_first; + s->current_picture_ptr->f->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST * !!s->top_field_first; if (s->codec_id == AV_CODEC_ID_MPEG1VIDEO || s->codec_id == AV_CODEC_ID_MPEG2VIDEO) { if (s->picture_structure != PICT_FRAME) - s->current_picture_ptr->f->top_field_first = - (s->picture_structure == PICT_TOP_FIELD) == s->first_field; + s->current_picture_ptr->f->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST * + ((s->picture_structure == PICT_TOP_FIELD) == s->first_field); } - s->current_picture_ptr->f->interlaced_frame = !s->progressive_frame && - !s->progressive_sequence; + s->current_picture_ptr->f->flags |= AV_FRAME_FLAG_INTERLACED * (!s->progressive_frame && + !s->progressive_sequence); s->current_picture_ptr->field_picture = s->picture_structure != PICT_FRAME; s->current_picture_ptr->f->pict_type = s->pict_type; - s->current_picture_ptr->f->key_frame = s->pict_type == AV_PICTURE_TYPE_I; + if (s->pict_type == AV_PICTURE_TYPE_I) + s->current_picture.f->flags |= AV_FRAME_FLAG_KEY; + else + s->current_picture.f->flags &= ~AV_FRAME_FLAG_KEY; if ((ret = ff_mpeg_ref_picture(s->avctx, &s->current_picture, s->current_picture_ptr)) < 0) @@ -382,7 +385,7 @@ FF_ENABLE_DEPRECATION_WARNINGS s->last_picture_ptr = &s->picture[idx]; s->last_picture_ptr->reference = 3; - s->last_picture_ptr->f->key_frame = 0; + s->last_picture_ptr->f->flags &= ~AV_FRAME_FLAG_KEY; s->last_picture_ptr->f->pict_type = AV_PICTURE_TYPE_P; if (alloc_picture(s, s->last_picture_ptr) < 0) { @@ -424,7 +427,7 @@ FF_ENABLE_DEPRECATION_WARNINGS s->next_picture_ptr = &s->picture[idx]; s->next_picture_ptr->reference = 3; - s->next_picture_ptr->f->key_frame = 0; + s->next_picture_ptr->f->flags &= ~AV_FRAME_FLAG_KEY; s->next_picture_ptr->f->pict_type = AV_PICTURE_TYPE_P; if (alloc_picture(s, s->next_picture_ptr) < 0) { diff --git a/arm/android/third_party/ffmpeg/libavcodec/mpegvideo_enc.c b/arm/android/third_party/ffmpeg/libavcodec/mpegvideo_enc.c index 7d3c8875..9bdf5dbe 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/mpegvideo_enc.c +++ b/arm/android/third_party/ffmpeg/libavcodec/mpegvideo_enc.c @@ -798,6 +798,11 @@ av_cold int ff_mpv_encode_init(AVCodecContext *avctx) AV_CODEC_FLAG_INTERLACED_ME) || s->alternate_scan); + if (s->lmin > s->lmax) { + av_log(avctx, AV_LOG_WARNING, "Clipping lmin value to %d\n", s->lmax); + s->lmin = s->lmax; + } + /* init */ ff_mpv_idct_init(s); if ((ret = ff_mpv_common_init(s)) < 0) @@ -902,8 +907,10 @@ av_cold int ff_mpv_encode_init(AVCodecContext *avctx) s->quant_precision = 5; - ff_set_cmp(&s->mecc, s->mecc.ildct_cmp, avctx->ildct_cmp); - ff_set_cmp(&s->mecc, s->mecc.frame_skip_cmp, s->frame_skip_cmp); + ret = ff_set_cmp(&s->mecc, s->mecc.ildct_cmp, avctx->ildct_cmp); + ret |= ff_set_cmp(&s->mecc, s->mecc.frame_skip_cmp, s->frame_skip_cmp); + if (ret < 0) + return AVERROR(EINVAL); if (CONFIG_H263_ENCODER && s->out_format == FMT_H263) { ff_h263_encode_init(s); @@ -1696,7 +1703,10 @@ static int frame_start(MpegEncContext *s) } s->current_picture_ptr->f->pict_type = s->pict_type; - s->current_picture_ptr->f->key_frame = s->pict_type == AV_PICTURE_TYPE_I; + if (s->pict_type == AV_PICTURE_TYPE_I) + s->current_picture.f->flags |= AV_FRAME_FLAG_KEY; + else + s->current_picture.f->flags &= ~AV_FRAME_FLAG_KEY; ff_mpeg_unref_picture(s->avctx, &s->current_picture); if ((ret = ff_mpeg_ref_picture(s->avctx, &s->current_picture, @@ -1972,7 +1982,7 @@ vbv_retry: return ret; } - if (s->current_picture.f->key_frame) + if (s->current_picture.f->flags & AV_FRAME_FLAG_KEY) pkt->flags |= AV_PKT_FLAG_KEY; if (s->mb_info) av_packet_shrink_side_data(pkt, AV_PKT_DATA_H263_MB_INFO, s->mb_info_size); @@ -3776,12 +3786,17 @@ static int encode_picture(MpegEncContext *s) } //FIXME var duplication - s->current_picture_ptr->f->key_frame = - s->current_picture.f->key_frame = s->pict_type == AV_PICTURE_TYPE_I; //FIXME pic_ptr + if (s->pict_type == AV_PICTURE_TYPE_I) { + s->current_picture_ptr->f->flags |= AV_FRAME_FLAG_KEY; //FIXME pic_ptr + s->current_picture.f->flags |= AV_FRAME_FLAG_KEY; + } else { + s->current_picture_ptr->f->flags &= ~AV_FRAME_FLAG_KEY; //FIXME pic_ptr + s->current_picture.f->flags &= ~AV_FRAME_FLAG_KEY; + } s->current_picture_ptr->f->pict_type = s->current_picture.f->pict_type = s->pict_type; - if (s->current_picture.f->key_frame) + if (s->current_picture.f->flags & AV_FRAME_FLAG_KEY) s->picture_in_gop_number=0; s->mb_x = s->mb_y = 0; diff --git a/arm/android/third_party/ffmpeg/libavcodec/mpegvideo_parser.c b/arm/android/third_party/ffmpeg/libavcodec/mpegvideo_parser.c index 8e7e88ff..1204789c 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/mpegvideo_parser.c +++ b/arm/android/third_party/ffmpeg/libavcodec/mpegvideo_parser.c @@ -129,6 +129,7 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s, s->pict_type = (buf[1] >> 3) & 7; if (bytes_left >= 4) vbv_delay = ((buf[1] & 0x07) << 13) | (buf[2] << 5) | (buf[3] >> 3); + s->repeat_pict = 1; } break; case SEQ_START_CODE: @@ -144,7 +145,11 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s, pc->frame_rate = avctx->framerate = ff_mpeg12_frame_rate_tab[frame_rate_index]; bit_rate = (buf[4]<<10) | (buf[5]<<2) | (buf[6]>>6); avctx->codec_id = AV_CODEC_ID_MPEG1VIDEO; +#if FF_API_TICKS_PER_FRAME +FF_DISABLE_DEPRECATION_WARNINGS avctx->ticks_per_frame = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } break; case EXT_START_CODE: @@ -176,7 +181,11 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s, avctx->framerate.num = pc->frame_rate.num * (frame_rate_ext_n + 1); avctx->framerate.den = pc->frame_rate.den * (frame_rate_ext_d + 1); avctx->codec_id = AV_CODEC_ID_MPEG2VIDEO; +#if FF_API_TICKS_PER_FRAME +FF_DISABLE_DEPRECATION_WARNINGS avctx->ticks_per_frame = 2; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } break; case 0x8: /* picture coding extension */ @@ -186,7 +195,6 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s, progressive_frame = buf[4] & (1 << 7); /* check if we must repeat the frame */ - s->repeat_pict = 1; if (repeat_first_field) { if (pc->progressive_sequence) { if (top_field_first) diff --git a/arm/android/third_party/ffmpeg/libavcodec/mscc.c b/arm/android/third_party/ffmpeg/libavcodec/mscc.c index e8406aa2..d1d23e67 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/mscc.c +++ b/arm/android/third_party/ffmpeg/libavcodec/mscc.c @@ -150,7 +150,11 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, const uint8_t *pal = av_packet_get_side_data(avpkt, AV_PKT_DATA_PALETTE, &size); if (pal && size == AVPALETTE_SIZE) { +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif for (j = 0; j < 256; j++) s->pal[j] = 0xFF000000 | AV_RL32(pal + j * 4); } else if (pal) { @@ -200,7 +204,7 @@ inflate_error: s->uncomp_buf + s->bpp * j * avctx->width, s->bpp * avctx->width); } - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_I; *got_frame = 1; diff --git a/arm/android/third_party/ffmpeg/libavcodec/msmpeg4enc.c b/arm/android/third_party/ffmpeg/libavcodec/msmpeg4enc.c index 54121438..9828901b 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/msmpeg4enc.c +++ b/arm/android/third_party/ffmpeg/libavcodec/msmpeg4enc.c @@ -280,7 +280,19 @@ void ff_msmpeg4_encode_picture_header(MpegEncContext * s) void ff_msmpeg4_encode_ext_header(MpegEncContext * s) { - unsigned fps = s->avctx->time_base.den / s->avctx->time_base.num / FFMAX(s->avctx->ticks_per_frame, 1); + unsigned fps; + + if (s->avctx->framerate.num > 0 && s->avctx->framerate.den > 0) + fps = s->avctx->framerate.num / s->avctx->framerate.den; + else +FF_DISABLE_DEPRECATION_WARNINGS + fps = s->avctx->time_base.den / s->avctx->time_base.num +#if FF_API_TICKS_PER_FRAME + / FFMAX(s->avctx->ticks_per_frame, 1) +#endif + ; +FF_ENABLE_DEPRECATION_WARNINGS + put_bits(&s->pb, 5, FFMIN(fps, 31)); //yes 29.97 -> 29 put_bits(&s->pb, 11, FFMIN(s->bit_rate / 1024, 2047)); diff --git a/arm/android/third_party/ffmpeg/libavcodec/msp2dec.c b/arm/android/third_party/ffmpeg/libavcodec/msp2dec.c index 9c51c35c..30a2825e 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/msp2dec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/msp2dec.c @@ -47,7 +47,7 @@ static int msp2_decode_frame(AVCodecContext *avctx, AVFrame *p, return ret; p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; bytestream2_init(&idx, buf, 2 * avctx->height); buf += 2 * avctx->height; diff --git a/arm/android/third_party/ffmpeg/libavcodec/msrle.c b/arm/android/third_party/ffmpeg/libavcodec/msrle.c index b6fa7f7a..51e843e4 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/msrle.c +++ b/arm/android/third_party/ffmpeg/libavcodec/msrle.c @@ -95,7 +95,14 @@ static int msrle_decode_frame(AVCodecContext *avctx, AVFrame *rframe, return ret; if (avctx->bits_per_coded_sample > 1 && avctx->bits_per_coded_sample <= 8) { - s->frame->palette_has_changed = ff_copy_palette(s->pal, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS + s->frame->palette_has_changed = +#endif + ff_copy_palette(s->pal, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_ENABLE_DEPRECATION_WARNINGS +#endif /* make the palette available */ memcpy(s->frame->data[1], s->pal, AVPALETTE_SIZE); diff --git a/arm/android/third_party/ffmpeg/libavcodec/mss1.c b/arm/android/third_party/ffmpeg/libavcodec/mss1.c index 77585210..fb5fc34e 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/mss1.c +++ b/arm/android/third_party/ffmpeg/libavcodec/mss1.c @@ -165,12 +165,12 @@ static int mss1_decode_frame(AVCodecContext *avctx, AVFrame *rframe, c->corrupted = 0; ff_mss12_slicecontext_reset(&ctx->sc); pal_changed = decode_pal(c, &acoder); - ctx->pic->key_frame = 1; + ctx->pic->flags |= AV_FRAME_FLAG_KEY; ctx->pic->pict_type = AV_PICTURE_TYPE_I; } else { if (c->corrupted) return AVERROR_INVALIDDATA; - ctx->pic->key_frame = 0; + ctx->pic->flags &= ~AV_FRAME_FLAG_KEY; ctx->pic->pict_type = AV_PICTURE_TYPE_P; } c->corrupted = ff_mss12_decode_rect(&ctx->sc, &acoder, 0, 0, @@ -178,7 +178,11 @@ static int mss1_decode_frame(AVCodecContext *avctx, AVFrame *rframe, if (c->corrupted) return AVERROR_INVALIDDATA; memcpy(ctx->pic->data[1], c->pal, AVPALETTE_SIZE); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS ctx->pic->palette_has_changed = pal_changed; +FF_ENABLE_DEPRECATION_WARNINGS +#endif if ((ret = av_frame_ref(rframe, ctx->pic)) < 0) return ret; diff --git a/arm/android/third_party/ffmpeg/libavcodec/mss2.c b/arm/android/third_party/ffmpeg/libavcodec/mss2.c index 1d1ed11f..98103f7f 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/mss2.c +++ b/arm/android/third_party/ffmpeg/libavcodec/mss2.c @@ -660,7 +660,10 @@ static int mss2_decode_frame(AVCodecContext *avctx, AVFrame *frame, frame->linesize[0] * (avctx->height - 1); c->rgb_stride = -frame->linesize[0]; - frame->key_frame = keyframe; + if (keyframe) + frame->flags |= AV_FRAME_FLAG_KEY; + else + frame->flags &= ~AV_FRAME_FLAG_KEY; frame->pict_type = keyframe ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; if (is_555) { diff --git a/arm/android/third_party/ffmpeg/libavcodec/mss3.c b/arm/android/third_party/ffmpeg/libavcodec/mss3.c index 023f110e..2701e9b9 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/mss3.c +++ b/arm/android/third_party/ffmpeg/libavcodec/mss3.c @@ -740,7 +740,10 @@ static int mss3_decode_frame(AVCodecContext *avctx, AVFrame *rframe, if ((ret = ff_reget_buffer(avctx, c->pic, 0)) < 0) return ret; - c->pic->key_frame = keyframe; + if (keyframe) + c->pic->flags |= AV_FRAME_FLAG_KEY; + else + c->pic->flags &= ~AV_FRAME_FLAG_KEY; c->pic->pict_type = keyframe ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; if (!bytestream2_get_bytes_left(&gb)) { if ((ret = av_frame_ref(rframe, c->pic)) < 0) diff --git a/arm/android/third_party/ffmpeg/libavcodec/mss4.c b/arm/android/third_party/ffmpeg/libavcodec/mss4.c index dceb42da..75f31bed 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/mss4.c +++ b/arm/android/third_party/ffmpeg/libavcodec/mss4.c @@ -503,7 +503,10 @@ static int mss4_decode_frame(AVCodecContext *avctx, AVFrame *rframe, if ((ret = ff_reget_buffer(avctx, c->pic, 0)) < 0) return ret; - c->pic->key_frame = (frame_type == INTRA_FRAME); + if (frame_type == INTRA_FRAME) + c->pic->flags |= AV_FRAME_FLAG_KEY; + else + c->pic->flags &= ~AV_FRAME_FLAG_KEY; c->pic->pict_type = (frame_type == INTRA_FRAME) ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; if (frame_type == SKIP_FRAME) { diff --git a/arm/android/third_party/ffmpeg/libavcodec/msvideo1.c b/arm/android/third_party/ffmpeg/libavcodec/msvideo1.c index 9903ff36..ca4583d8 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/msvideo1.c +++ b/arm/android/third_party/ffmpeg/libavcodec/msvideo1.c @@ -312,7 +312,14 @@ static int msvideo1_decode_frame(AVCodecContext *avctx, AVFrame *rframe, return ret; if (s->mode_8bit) { - s->frame->palette_has_changed = ff_copy_palette(s->pal, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS + s->frame->palette_has_changed = +#endif + ff_copy_palette(s->pal, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_ENABLE_DEPRECATION_WARNINGS +#endif } if (s->mode_8bit) diff --git a/arm/android/third_party/ffmpeg/libavcodec/msvideo1enc.c b/arm/android/third_party/ffmpeg/libavcodec/msvideo1enc.c index 36cfd39a..1fb8be88 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/msvideo1enc.c +++ b/arm/android/third_party/ffmpeg/libavcodec/msvideo1enc.c @@ -84,6 +84,8 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, if(!c->prev) c->prev = av_malloc(avctx->width * 3 * (avctx->height + 3)); + if (!c->prev) + return AVERROR(ENOMEM); prevptr = c->prev + avctx->width * 3 * (FFALIGN(avctx->height, 4) - 1); src = (const uint16_t*)(p->data[0] + p->linesize[0]*(FFALIGN(avctx->height, 4) - 1)); if(c->keyint >= avctx->keyint_min) diff --git a/arm/android/third_party/ffmpeg/libavcodec/mv30.c b/arm/android/third_party/ffmpeg/libavcodec/mv30.c index 24b04400..c2d05470 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/mv30.c +++ b/arm/android/third_party/ffmpeg/libavcodec/mv30.c @@ -623,9 +623,8 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, get_qtable(s->intraq_tab[0], s->intra_quant, luma_tab); get_qtable(s->intraq_tab[1], s->intra_quant, chroma_tab); - frame->key_frame = s->is_inter == 0; - - if (frame->key_frame) { + if (s->is_inter == 0) { + frame->flags |= AV_FRAME_FLAG_KEY; ret = decode_intra(avctx, gb, frame); if (ret < 0) return ret; @@ -638,6 +637,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, return AVERROR_INVALIDDATA; } + frame->flags &= ~AV_FRAME_FLAG_KEY; ret = decode_inter(avctx, gb, frame, s->prev_frame); if (ret < 0) return ret; diff --git a/arm/android/third_party/ffmpeg/libavcodec/mvcdec.c b/arm/android/third_party/ffmpeg/libavcodec/mvcdec.c index 1e99f44a..6c971f70 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/mvcdec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/mvcdec.c @@ -247,7 +247,7 @@ static int mvc_decode_frame(AVCodecContext *avctx, AVFrame *frame, return ret; frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; *got_frame = 1; diff --git a/arm/android/third_party/ffmpeg/libavcodec/mvha.c b/arm/android/third_party/ffmpeg/libavcodec/mvha.c index 55056c91..8fb4a69e 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/mvha.c +++ b/arm/android/third_party/ffmpeg/libavcodec/mvha.c @@ -272,7 +272,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, } frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; *got_frame = 1; return avpkt->size; diff --git a/arm/android/third_party/ffmpeg/libavcodec/mwsc.c b/arm/android/third_party/ffmpeg/libavcodec/mwsc.c index f57648bb..c7045ac7 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/mwsc.c +++ b/arm/android/third_party/ffmpeg/libavcodec/mwsc.c @@ -119,10 +119,13 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, bytestream2_init(&gbp, s->prev_frame->data[0], avctx->height * s->prev_frame->linesize[0]); bytestream2_init_writer(&pb, frame->data[0], avctx->height * frame->linesize[0]); - frame->key_frame = rle_uncompress(&gb, &pb, &gbp, avctx->width, avctx->height, avctx->width * 3, - frame->linesize[0], s->prev_frame->linesize[0]); + if (rle_uncompress(&gb, &pb, &gbp, avctx->width, avctx->height, avctx->width * 3, + frame->linesize[0], s->prev_frame->linesize[0])) + frame->flags |= AV_FRAME_FLAG_KEY; + else + frame->flags &= ~AV_FRAME_FLAG_KEY; - frame->pict_type = frame->key_frame ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; + frame->pict_type = (frame->flags & AV_FRAME_FLAG_KEY) ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; av_frame_unref(s->prev_frame); if ((ret = av_frame_ref(s->prev_frame, frame)) < 0) diff --git a/arm/android/third_party/ffmpeg/libavcodec/mxpegdec.c b/arm/android/third_party/ffmpeg/libavcodec/mxpegdec.c index 760b12f0..73df2ff9 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/mxpegdec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/mxpegdec.c @@ -286,11 +286,11 @@ static int mxpeg_decode_frame(AVCodecContext *avctx, AVFrame *rframe, AV_GET_BUFFER_FLAG_REF)) < 0) return ret; jpg->picture_ptr->pict_type = AV_PICTURE_TYPE_P; - jpg->picture_ptr->key_frame = 0; + jpg->picture_ptr->flags &= ~AV_FRAME_FLAG_KEY; jpg->got_picture = 1; } else { jpg->picture_ptr->pict_type = AV_PICTURE_TYPE_I; - jpg->picture_ptr->key_frame = 1; + jpg->picture_ptr->flags |= AV_FRAME_FLAG_KEY; } if (s->got_mxm_bitmask) { diff --git a/arm/android/third_party/ffmpeg/libavcodec/notchlc.c b/arm/android/third_party/ffmpeg/libavcodec/notchlc.c index 90704e1a..d973c83a 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/notchlc.c +++ b/arm/android/third_party/ffmpeg/libavcodec/notchlc.c @@ -514,7 +514,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, return ret; p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; *got_frame = 1; diff --git a/arm/android/third_party/ffmpeg/libavcodec/nuv.c b/arm/android/third_party/ffmpeg/libavcodec/nuv.c index d5391eee..82048e93 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/nuv.c +++ b/arm/android/third_party/ffmpeg/libavcodec/nuv.c @@ -263,7 +263,10 @@ retry: } c->pic->pict_type = keyframe ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; - c->pic->key_frame = keyframe; + if (keyframe) + c->pic->flags |= AV_FRAME_FLAG_KEY; + else + c->pic->flags &= ~AV_FRAME_FLAG_KEY; // decompress/copy/whatever data switch (comptype) { case NUV_LZO: diff --git a/arm/android/third_party/ffmpeg/libavcodec/nvdec_mpeg12.c b/arm/android/third_party/ffmpeg/libavcodec/nvdec_mpeg12.c index e1073558..3b9ff607 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/nvdec_mpeg12.c +++ b/arm/android/third_party/ffmpeg/libavcodec/nvdec_mpeg12.c @@ -83,8 +83,9 @@ static int nvdec_mpeg12_start_frame(AVCodecContext *avctx, const uint8_t *buffer }; for (i = 0; i < 64; ++i) { - ppc->QuantMatrixIntra[i] = s->intra_matrix[i]; - ppc->QuantMatrixInter[i] = s->inter_matrix[i]; + int n = s->idsp.idct_permutation[i]; + ppc->QuantMatrixIntra[i] = s->intra_matrix[n]; + ppc->QuantMatrixInter[i] = s->inter_matrix[n]; } return 0; diff --git a/arm/android/third_party/ffmpeg/libavcodec/nvdec_mpeg4.c b/arm/android/third_party/ffmpeg/libavcodec/nvdec_mpeg4.c index eac138cc..c193f6b6 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/nvdec_mpeg4.c +++ b/arm/android/third_party/ffmpeg/libavcodec/nvdec_mpeg4.c @@ -88,8 +88,9 @@ static int nvdec_mpeg4_start_frame(AVCodecContext *avctx, const uint8_t *buffer, }; for (i = 0; i < 64; ++i) { - ppc->QuantMatrixIntra[i] = s->intra_matrix[i]; - ppc->QuantMatrixInter[i] = s->inter_matrix[i]; + int n = s->idsp.idct_permutation[i]; + ppc->QuantMatrixIntra[i] = s->intra_matrix[n]; + ppc->QuantMatrixInter[i] = s->inter_matrix[n]; } // We need to pass the full frame buffer and not just the slice diff --git a/arm/android/third_party/ffmpeg/libavcodec/nvenc.c b/arm/android/third_party/ffmpeg/libavcodec/nvenc.c index 9acf3e86..c1798ce5 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/nvenc.c +++ b/arm/android/third_party/ffmpeg/libavcodec/nvenc.c @@ -1571,7 +1571,13 @@ static av_cold int nvenc_setup_encoder(AVCodecContext *avctx) ctx->init_encode_params.frameRateDen = avctx->framerate.den; } else { ctx->init_encode_params.frameRateNum = avctx->time_base.den; - ctx->init_encode_params.frameRateDen = avctx->time_base.num * avctx->ticks_per_frame; +FF_DISABLE_DEPRECATION_WARNINGS + ctx->init_encode_params.frameRateDen = avctx->time_base.num +#if FF_API_TICKS_PER_FRAME + * avctx->ticks_per_frame +#endif + ; +FF_ENABLE_DEPRECATION_WARNINGS } ctx->init_encode_params.enableEncodeAsync = 0; @@ -2266,7 +2272,14 @@ static int nvenc_set_timestamp(AVCodecContext *avctx, dts = reorder_queue_dequeue(ctx->reorder_queue, avctx, pkt); if (avctx->codec_descriptor->props & AV_CODEC_PROP_REORDER) { - pkt->dts = dts - FFMAX(ctx->encode_config.frameIntervalP - 1, 0) * FFMAX(avctx->ticks_per_frame, 1); +FF_DISABLE_DEPRECATION_WARNINGS + pkt->dts = dts - + FFMAX(ctx->encode_config.frameIntervalP - 1, 0) +#if FF_API_TICKS_PER_FRAME + * FFMAX(avctx->ticks_per_frame, 1) +#endif + * FFMAX(avctx->time_base.num, 1); +FF_ENABLE_DEPRECATION_WARNINGS } else { pkt->dts = pkt->pts; } @@ -2633,7 +2646,7 @@ static int nvenc_send_frame(AVCodecContext *avctx, const AVFrame *frame) pic_params.outputBitstream = in_surf->output_surface; if (avctx->flags & AV_CODEC_FLAG_INTERLACED_DCT) { - if (frame->top_field_first) + if (frame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST) pic_params.pictureStruct = NV_ENC_PIC_STRUCT_FIELD_TOP_BOTTOM; else pic_params.pictureStruct = NV_ENC_PIC_STRUCT_FIELD_BOTTOM_TOP; diff --git a/arm/android/third_party/ffmpeg/libavcodec/options_table.h b/arm/android/third_party/ffmpeg/libavcodec/options_table.h index f331ce28..03059cc3 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/options_table.h +++ b/arm/android/third_party/ffmpeg/libavcodec/options_table.h @@ -259,8 +259,8 @@ static const AVOption avcodec_options[] = { {"default" , "discard useless frames", 0, AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_DEFAULT }, INT_MIN, INT_MAX, V|D, "avdiscard"}, {"noref" , "discard all non-reference frames", 0, AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_NONREF }, INT_MIN, INT_MAX, V|D, "avdiscard"}, {"bidir" , "discard all bidirectional frames", 0, AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_BIDIR }, INT_MIN, INT_MAX, V|D, "avdiscard"}, -{"nokey" , "discard all frames except keyframes", 0, AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_NONKEY }, INT_MIN, INT_MAX, V|D, "avdiscard"}, {"nointra" , "discard all frames except I frames", 0, AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_NONINTRA}, INT_MIN, INT_MAX, V|D, "avdiscard"}, +{"nokey" , "discard all frames except keyframes", 0, AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_NONKEY }, INT_MIN, INT_MAX, V|D, "avdiscard"}, {"all" , "discard all frames", 0, AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_ALL }, INT_MIN, INT_MAX, V|D, "avdiscard"}, {"bidir_refine", "refine the two motion vectors used in bidirectional macroblocks", OFFSET(bidir_refine), AV_OPT_TYPE_INT, {.i64 = 1 }, 0, 4, V|E}, {"keyint_min", "minimum interval between IDR-frames", OFFSET(keyint_min), AV_OPT_TYPE_INT, {.i64 = 25 }, INT_MIN, INT_MAX, V|E}, @@ -276,7 +276,9 @@ static const AVOption avcodec_options[] = { #endif {"rc_max_vbv_use", NULL, OFFSET(rc_max_available_vbv_use), AV_OPT_TYPE_FLOAT, {.dbl = 0 }, 0.0, FLT_MAX, V|E}, {"rc_min_vbv_use", NULL, OFFSET(rc_min_vbv_overflow_use), AV_OPT_TYPE_FLOAT, {.dbl = 3 }, 0.0, FLT_MAX, V|E}, +#if FF_API_TICKS_PER_FRAME {"ticks_per_frame", NULL, OFFSET(ticks_per_frame), AV_OPT_TYPE_INT, {.i64 = 1 }, 1, INT_MAX, A|V|E|D}, +#endif {"color_primaries", "color primaries", OFFSET(color_primaries), AV_OPT_TYPE_INT, {.i64 = AVCOL_PRI_UNSPECIFIED }, 1, INT_MAX, V|E|D, "color_primaries_type"}, {"bt709", "BT.709", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_PRI_BT709 }, INT_MIN, INT_MAX, V|E|D, "color_primaries_type"}, {"unknown", "Unspecified", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_PRI_UNSPECIFIED }, INT_MIN, INT_MAX, V|E|D, "color_primaries_type"}, diff --git a/arm/android/third_party/ffmpeg/libavcodec/pafvideo.c b/arm/android/third_party/ffmpeg/libavcodec/pafvideo.c index 458fe9ff..14eb4243 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/pafvideo.c +++ b/arm/android/third_party/ffmpeg/libavcodec/pafvideo.c @@ -296,10 +296,10 @@ static int paf_video_decode(AVCodecContext *avctx, AVFrame *rframe, if (code & 0x20) { // frame is keyframe memset(c->pic->data[1], 0, AVPALETTE_SIZE); c->current_frame = 0; - c->pic->key_frame = 1; + c->pic->flags |= AV_FRAME_FLAG_KEY; c->pic->pict_type = AV_PICTURE_TYPE_I; } else { - c->pic->key_frame = 0; + c->pic->flags &= ~AV_FRAME_FLAG_KEY; c->pic->pict_type = AV_PICTURE_TYPE_P; } @@ -327,7 +327,11 @@ static int paf_video_decode(AVCodecContext *avctx, AVFrame *rframe, b = b << 2 | b >> 4; *out++ = (0xFFU << 24) | (r << 16) | (g << 8) | b; } +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS c->pic->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } c->dirty[c->current_frame] = 1; diff --git a/arm/android/third_party/ffmpeg/libavcodec/parser.c b/arm/android/third_party/ffmpeg/libavcodec/parser.c index 49de7e6a..efc28b89 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/parser.c +++ b/arm/android/third_party/ffmpeg/libavcodec/parser.c @@ -166,6 +166,10 @@ int av_parser_parse2(AVCodecParserContext *s, AVCodecContext *avctx, #define FILL(name) if(s->name > 0 && avctx->name <= 0) avctx->name = s->name if (avctx->codec_type == AVMEDIA_TYPE_VIDEO) { FILL(field_order); + FILL(coded_width); + FILL(coded_height); + FILL(width); + FILL(height); } /* update the file pointer */ diff --git a/arm/android/third_party/ffmpeg/libavcodec/pcm_rechunk_bsf.c b/arm/android/third_party/ffmpeg/libavcodec/pcm_rechunk_bsf.c index 108d9e90..28b5722a 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/pcm_rechunk_bsf.c +++ b/arm/android/third_party/ffmpeg/libavcodec/pcm_rechunk_bsf.c @@ -139,6 +139,7 @@ static int rechunk_filter(AVBSFContext *ctx, AVPacket *pkt) av_packet_move_ref(pkt, s->out_pkt); return send_packet(s, nb_samples, pkt); } + av_assert0(!s->in_pkt->size); } else if (s->in_pkt->size > data_size) { ret = av_packet_ref(pkt, s->in_pkt); if (ret < 0) @@ -151,7 +152,8 @@ static int rechunk_filter(AVBSFContext *ctx, AVPacket *pkt) av_packet_move_ref(pkt, s->in_pkt); return send_packet(s, nb_samples, pkt); } - } + } else + av_packet_unref(s->in_pkt); ret = ff_bsf_get_packet_ref(ctx, s->in_pkt); if (ret == AVERROR_EOF && s->out_pkt->size) { diff --git a/arm/android/third_party/ffmpeg/libavcodec/pdvdec.c b/arm/android/third_party/ffmpeg/libavcodec/pdvdec.c new file mode 100644 index 00000000..d50c4e72 --- /dev/null +++ b/arm/android/third_party/ffmpeg/libavcodec/pdvdec.c @@ -0,0 +1,141 @@ +/* + * PDV video format + * + * Copyright (c) 2023 Paul B Mahol + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "avcodec.h" +#include "codec_internal.h" +#include "decode.h" +#include "zlib_wrapper.h" + +#include + +typedef struct PDVContext { + AVFrame *previous_frame; + FFZStream zstream; +} PDVContext; + +static av_cold int decode_init(AVCodecContext *avctx) +{ + PDVContext *s = avctx->priv_data; + + avctx->pix_fmt = AV_PIX_FMT_MONOBLACK; + + s->previous_frame = av_frame_alloc(); + if (!s->previous_frame) + return AVERROR(ENOMEM); + + return ff_inflate_init(&s->zstream, avctx); +} + +static av_cold int decode_end(AVCodecContext *avctx) +{ + PDVContext *s = avctx->priv_data; + + av_frame_free(&s->previous_frame); + ff_inflate_end(&s->zstream); + + return 0; +} + +static int decode_frame(AVCodecContext *avctx, AVFrame *frame, + int *got_frame, AVPacket *avpkt) +{ + PDVContext *s = avctx->priv_data; + AVFrame *prev_frame = s->previous_frame; + z_stream *const zstream = &s->zstream.zstream; + uint8_t *dst, *prev = prev_frame->data[0]; + int ret, zret; + + if (avctx->skip_frame >= AVDISCARD_ALL || + (avctx->skip_frame >= AVDISCARD_NONINTRA && + !(avpkt->flags & AV_PKT_FLAG_KEY))) + return avpkt->size; + + zret = inflateReset(zstream); + if (zret != Z_OK) { + av_log(avctx, AV_LOG_ERROR, "Could not reset inflate: %d.\n", zret); + return AVERROR_INVALIDDATA; + } + + if ((ret = ff_get_buffer(avctx, frame, AV_GET_BUFFER_FLAG_REF)) < 0) + return ret; + + zstream->next_in = avpkt->data; + zstream->avail_in = avpkt->size; + + dst = frame->data[0]; + for (int i = 0; i < avctx->height; i++) { + zstream->next_out = dst; + zstream->avail_out = (avctx->width + 7) >> 3; + + zret = inflate(zstream, Z_SYNC_FLUSH); + if (zret != Z_OK && zret != Z_STREAM_END) { + av_log(avctx, AV_LOG_ERROR, + "Inflate failed with return code: %d.\n", zret); + return AVERROR_INVALIDDATA; + } + + if (prev && !(avpkt->flags & AV_PKT_FLAG_KEY)) { + for (int j = 0; j < (avctx->width + 7) >> 3; j++) + dst[j] ^= prev[j]; + prev += prev_frame->linesize[0]; + } + + dst += frame->linesize[0]; + } + + av_frame_unref(s->previous_frame); + if ((ret = av_frame_ref(s->previous_frame, frame)) < 0) + return ret; + + if (avpkt->flags & AV_PKT_FLAG_KEY) { + frame->flags |= AV_FRAME_FLAG_KEY; + frame->pict_type = AV_PICTURE_TYPE_I; + } else { + frame->pict_type = AV_PICTURE_TYPE_P; + } + + *got_frame = 1; + + return avpkt->size; +} + +static void decode_flush(AVCodecContext *avctx) +{ + PDVContext *s = avctx->priv_data; + + av_frame_unref(s->previous_frame); +} + +const FFCodec ff_pdv_decoder = { + .p.name = "pdv", + CODEC_LONG_NAME("PDV (PlayDate Video)"), + .priv_data_size = sizeof(PDVContext), + .p.type = AVMEDIA_TYPE_VIDEO, + .p.id = AV_CODEC_ID_PDV, + .p.capabilities = AV_CODEC_CAP_DR1, + .caps_internal = FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM | + FF_CODEC_CAP_INIT_CLEANUP, + .init = decode_init, + .close = decode_end, + .flush = decode_flush, + FF_CODEC_DECODE_CB(decode_frame), +}; diff --git a/arm/android/third_party/ffmpeg/libavcodec/pgxdec.c b/arm/android/third_party/ffmpeg/libavcodec/pgxdec.c index e5d1df78..cc7cdb8c 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/pgxdec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/pgxdec.c @@ -140,7 +140,7 @@ static int pgx_decode_frame(AVCodecContext *avctx, AVFrame *p, if ((ret = ff_get_buffer(avctx, p, 0)) < 0) return ret; p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; avctx->bits_per_raw_sample = depth; if (bpp == 8) write_frame_8(p, &g, width, height, sign, depth); diff --git a/arm/android/third_party/ffmpeg/libavcodec/photocd.c b/arm/android/third_party/ffmpeg/libavcodec/photocd.c index 3030a80e..3a09b819 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/photocd.c +++ b/arm/android/third_party/ffmpeg/libavcodec/photocd.c @@ -332,7 +332,7 @@ static int photocd_decode_frame(AVCodecContext *avctx, AVFrame *p, return ret; p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; bytestream2_init(gb, avpkt->data, avpkt->size); diff --git a/arm/android/third_party/ffmpeg/libavcodec/pictordec.c b/arm/android/third_party/ffmpeg/libavcodec/pictordec.c index aef3d3de..5aaa725b 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/pictordec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/pictordec.c @@ -191,7 +191,11 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, return ret; memset(frame->data[0], 0, s->height * frame->linesize[0]); frame->pict_type = AV_PICTURE_TYPE_I; +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif pos_after_pal = bytestream2_tell(&s->g) + esize; palette = (uint32_t*)frame->data[1]; diff --git a/arm/android/third_party/ffmpeg/libavcodec/pixlet.c b/arm/android/third_party/ffmpeg/libavcodec/pixlet.c index b349d397..6e925308 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/pixlet.c +++ b/arm/android/third_party/ffmpeg/libavcodec/pixlet.c @@ -667,7 +667,7 @@ static int pixlet_decode_frame(AVCodecContext *avctx, AVFrame *p, bytestream2_skip(&ctx->gb, 8); p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; p->color_range = AVCOL_RANGE_JPEG; ret = ff_thread_get_buffer(avctx, p, 0); diff --git a/arm/android/third_party/ffmpeg/libavcodec/pngdec.c b/arm/android/third_party/ffmpeg/libavcodec/pngdec.c index 9403d72f..0369d1c4 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/pngdec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/pngdec.c @@ -98,6 +98,7 @@ typedef struct PNGDecContext { int bpp; int has_trns; uint8_t transparent_color_be[6]; + int significant_bits; uint32_t palette[256]; uint8_t *crow_buf; @@ -716,6 +717,14 @@ static int populate_avctx_color_fields(AVCodecContext *avctx, AVFrame *frame) avctx->colorspace = frame->colorspace = AVCOL_SPC_RGB; avctx->color_range = frame->color_range = AVCOL_RANGE_JPEG; + /* + * tRNS sets alpha depth to full, so we ignore sBIT if set. + * As a result we must wait until now to set + * avctx->bits_per_raw_sample in case tRNS appears after sBIT + */ + if (!s->has_trns && s->significant_bits > 0) + avctx->bits_per_raw_sample = s->significant_bits; + return 0; } @@ -725,6 +734,8 @@ static int decode_idat_chunk(AVCodecContext *avctx, PNGDecContext *s, int ret; size_t byte_depth = s->bit_depth > 8 ? 2 : 1; + if (!p) + return AVERROR_INVALIDDATA; if (!(s->hdr_state & PNG_IHDR)) { av_log(avctx, AV_LOG_ERROR, "IDAT without IHDR\n"); return AVERROR_INVALIDDATA; @@ -831,8 +842,8 @@ static int decode_idat_chunk(AVCodecContext *avctx, PNGDecContext *s, } p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; - p->interlaced_frame = !!s->interlace_type; + p->flags |= AV_FRAME_FLAG_KEY; + p->flags |= AV_FRAME_FLAG_INTERLACED * !!s->interlace_type; if ((ret = populate_avctx_color_fields(avctx, p)) < 0) return ret; @@ -963,7 +974,7 @@ static int decode_trns_chunk(AVCodecContext *avctx, PNGDecContext *s, return 0; } -static int decode_iccp_chunk(PNGDecContext *s, GetByteContext *gb, AVFrame *f) +static int decode_iccp_chunk(PNGDecContext *s, GetByteContext *gb) { int ret, cnt = 0; AVBPrint bp; @@ -996,6 +1007,41 @@ fail: return ret; } +static int decode_sbit_chunk(AVCodecContext *avctx, PNGDecContext *s, + GetByteContext *gb) +{ + int bits = 0; + int channels; + + if (!(s->hdr_state & PNG_IHDR)) { + av_log(avctx, AV_LOG_ERROR, "sBIT before IHDR\n"); + return AVERROR_INVALIDDATA; + } + + if (s->pic_state & PNG_IDAT) { + av_log(avctx, AV_LOG_ERROR, "sBIT after IDAT\n"); + return AVERROR_INVALIDDATA; + } + + channels = ff_png_get_nb_channels(s->color_type); + + if (bytestream2_get_bytes_left(gb) != channels) + return AVERROR_INVALIDDATA; + + for (int i = 0; i < channels; i++) { + int b = bytestream2_get_byteu(gb); + bits = FFMAX(b, bits); + } + + if (bits < 0 || bits > s->bit_depth) { + av_log(avctx, AV_LOG_ERROR, "Invalid significant bits: %d\n", bits); + return AVERROR_INVALIDDATA; + } + s->significant_bits = bits; + + return 0; +} + static void handle_small_bpp(PNGDecContext *s, AVFrame *p) { if (s->bits_per_pixel == 1 && s->color_type == PNG_COLOR_TYPE_PALETTE) { @@ -1422,7 +1468,7 @@ static int decode_frame_common(AVCodecContext *avctx, PNGDecContext *s, s->have_srgb = 1; break; case MKTAG('i', 'C', 'C', 'P'): { - if ((ret = decode_iccp_chunk(s, &gb_chunk, p)) < 0) + if ((ret = decode_iccp_chunk(s, &gb_chunk)) < 0) goto fail; break; } @@ -1440,6 +1486,10 @@ static int decode_frame_common(AVCodecContext *avctx, PNGDecContext *s, break; } + case MKTAG('s', 'B', 'I', 'T'): + if ((ret = decode_sbit_chunk(avctx, s, &gb_chunk)) < 0) + goto fail; + break; case MKTAG('g', 'A', 'M', 'A'): { AVBPrint bp; char *gamma_str; @@ -1467,6 +1517,9 @@ static int decode_frame_common(AVCodecContext *avctx, PNGDecContext *s, } exit_loop: + if (!p) + return AVERROR_INVALIDDATA; + if (avctx->codec_id == AV_CODEC_ID_PNG && avctx->skip_frame == AVDISCARD_ALL) { return 0; @@ -1679,7 +1732,7 @@ static int decode_frame_apng(AVCodecContext *avctx, AVFrame *p, if ((ret = inflateReset(&s->zstream.zstream)) != Z_OK) return AVERROR_EXTERNAL; bytestream2_init(&s->gb, avctx->extradata, avctx->extradata_size); - if ((ret = decode_frame_common(avctx, s, p, avpkt)) < 0) + if ((ret = decode_frame_common(avctx, s, NULL, avpkt)) < 0) return ret; } diff --git a/arm/android/third_party/ffmpeg/libavcodec/pngenc.c b/arm/android/third_party/ffmpeg/libavcodec/pngenc.c index 1489256d..21b033ea 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/pngenc.c +++ b/arm/android/third_party/ffmpeg/libavcodec/pngenc.c @@ -442,6 +442,12 @@ static int encode_headers(AVCodecContext *avctx, const AVFrame *pict) if (png_get_gama(pict->color_trc, s->buf)) png_write_chunk(&s->bytestream, MKTAG('g', 'A', 'M', 'A'), s->buf, 4); + if (avctx->bits_per_raw_sample > 0 && avctx->bits_per_raw_sample < s->bit_depth) { + int len = ff_png_get_nb_channels(s->color_type); + memset(s->buf, avctx->bits_per_raw_sample, len); + png_write_chunk(&s->bytestream, MKTAG('s', 'B', 'I', 'T'), s->buf, len); + } + /* put the palette if needed, must be after colorspace information */ if (s->color_type == PNG_COLOR_TYPE_PALETTE) { int has_alpha, alpha, i; diff --git a/arm/android/third_party/ffmpeg/libavcodec/pnmdec.c b/arm/android/third_party/ffmpeg/libavcodec/pnmdec.c index 978e4c03..72bc83b2 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/pnmdec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/pnmdec.c @@ -65,7 +65,7 @@ static int pnm_decode_frame(AVCodecContext *avctx, AVFrame *p, if ((ret = ff_get_buffer(avctx, p, 0)) < 0) return ret; p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; avctx->bits_per_raw_sample = av_log2(s->maxval) + 1; switch (avctx->pix_fmt) { diff --git a/arm/android/third_party/ffmpeg/libavcodec/proresdec2.c b/arm/android/third_party/ffmpeg/libavcodec/proresdec2.c index c821a078..6445d948 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/proresdec2.c +++ b/arm/android/third_party/ffmpeg/libavcodec/proresdec2.c @@ -252,8 +252,9 @@ static int decode_frame_header(ProresContext *ctx, const uint8_t *buf, ctx->scan = ctx->progressive_scan; // permuted } else { ctx->scan = ctx->interlaced_scan; // permuted - ctx->frame->interlaced_frame = 1; - ctx->frame->top_field_first = ctx->frame_type == 1; + ctx->frame->flags |= AV_FRAME_FLAG_INTERLACED; + if (ctx->frame_type == 1) + ctx->frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST; } if (ctx->alpha_info) { @@ -706,7 +707,7 @@ static int decode_slice_thread(AVCodecContext *avctx, void *arg, int jobnr, int dest_u = pic->data[1] + (slice->mb_y << 4) * chroma_stride + (slice->mb_x << mb_x_shift); dest_v = pic->data[2] + (slice->mb_y << 4) * chroma_stride + (slice->mb_x << mb_x_shift); - if (ctx->frame_type && ctx->first_field ^ ctx->frame->top_field_first) { + if (ctx->frame_type && ctx->first_field ^ !!(ctx->frame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST)) { dest_y += pic->linesize[0]; dest_u += pic->linesize[1]; dest_v += pic->linesize[2]; @@ -792,7 +793,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, ctx->frame = frame; ctx->frame->pict_type = AV_PICTURE_TYPE_I; - ctx->frame->key_frame = 1; + ctx->frame->flags |= AV_FRAME_FLAG_KEY; ctx->first_field = 1; buf += 8; diff --git a/arm/android/third_party/ffmpeg/libavcodec/proresenc_anatoliy.c b/arm/android/third_party/ffmpeg/libavcodec/proresenc_anatoliy.c index 09196c7a..fc48c97d 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/proresenc_anatoliy.c +++ b/arm/android/third_party/ffmpeg/libavcodec/proresenc_anatoliy.c @@ -746,7 +746,8 @@ static int prores_encode_frame(AVCodecContext *avctx, AVPacket *pkt, if (avctx->profile >= FF_PROFILE_PRORES_4444) /* 4444 or 4444 Xq */ frame_flags |= 0x40; /* 444 chroma */ if (ctx->is_interlaced) { - if (pict->top_field_first || !pict->interlaced_frame) { /* tff frame or progressive frame interpret as tff */ + if ((pict->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST) || !(pict->flags & AV_FRAME_FLAG_INTERLACED)) { + /* tff frame or progressive frame interpret as tff */ av_log(avctx, AV_LOG_DEBUG, "use interlaced encoding, top field first\n"); frame_flags |= 0x04; /* interlaced tff */ is_top_field_first = 1; diff --git a/arm/android/third_party/ffmpeg/libavcodec/proresenc_kostya.c b/arm/android/third_party/ffmpeg/libavcodec/proresenc_kostya.c index 1940e037..77ab5240 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/proresenc_kostya.c +++ b/arm/android/third_party/ffmpeg/libavcodec/proresenc_kostya.c @@ -585,7 +585,7 @@ static int encode_slice(AVCodecContext *avctx, const AVFrame *pic, if (ctx->pictures_per_frame == 1) line_add = 0; else - line_add = ctx->cur_picture_idx ^ !pic->top_field_first; + line_add = ctx->cur_picture_idx ^ !(pic->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST); if (ctx->force_quant) { qmat = ctx->quants[0]; @@ -838,7 +838,7 @@ static int find_slice_quant(AVCodecContext *avctx, if (ctx->pictures_per_frame == 1) line_add = 0; else - line_add = ctx->cur_picture_idx ^ !ctx->pic->top_field_first; + line_add = ctx->cur_picture_idx ^ !(ctx->pic->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST); mbs = x + mbs_per_slice; for (i = 0; i < ctx->num_planes; i++) { @@ -1045,7 +1045,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, frame_flags = ctx->chroma_factor << 6; if (avctx->flags & AV_CODEC_FLAG_INTERLACED_DCT) - frame_flags |= pic->top_field_first ? 0x04 : 0x08; + frame_flags |= (pic->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST) ? 0x04 : 0x08; bytestream_put_byte (&buf, frame_flags); bytestream_put_byte (&buf, 0); // reserved diff --git a/arm/android/third_party/ffmpeg/libavcodec/prosumer.c b/arm/android/third_party/ffmpeg/libavcodec/prosumer.c index e199d1aa..a1ed6a9e 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/prosumer.c +++ b/arm/android/third_party/ffmpeg/libavcodec/prosumer.c @@ -195,7 +195,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, } frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; *got_frame = 1; return avpkt->size; diff --git a/arm/android/third_party/ffmpeg/libavcodec/psd.c b/arm/android/third_party/ffmpeg/libavcodec/psd.c index ee96bd12..d3456e6b 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/psd.c +++ b/arm/android/third_party/ffmpeg/libavcodec/psd.c @@ -532,7 +532,11 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *picture, } if (s->color_mode == PSD_INDEXED) { +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS picture->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif memcpy(picture->data[1], s->palette, AVPALETTE_SIZE); } diff --git a/arm/android/third_party/ffmpeg/libavcodec/pthread_frame.c b/arm/android/third_party/ffmpeg/libavcodec/pthread_frame.c index 74864e19..773e78ae 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/pthread_frame.c +++ b/arm/android/third_party/ffmpeg/libavcodec/pthread_frame.c @@ -286,7 +286,11 @@ static int update_context_from_thread(AVCodecContext *dst, AVCodecContext *src, dst->level = src->level; dst->bits_per_raw_sample = src->bits_per_raw_sample; +#if FF_API_TICKS_PER_FRAME +FF_DISABLE_DEPRECATION_WARNINGS dst->ticks_per_frame = src->ticks_per_frame; +FF_ENABLE_DEPRECATION_WARNINGS +#endif dst->color_primaries = src->color_primaries; dst->color_trc = src->color_trc; diff --git a/arm/android/third_party/ffmpeg/libavcodec/qdrw.c b/arm/android/third_party/ffmpeg/libavcodec/qdrw.c index e41451e9..21a53b8e 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/qdrw.c +++ b/arm/android/third_party/ffmpeg/libavcodec/qdrw.c @@ -384,7 +384,11 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, ret = parse_palette(avctx, &gbc, (uint32_t *)p->data[1], colors, flags & 0x8000); if (ret < 0) return ret; +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS p->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif /* jump to image data */ bytestream2_skip(&gbc, 18); @@ -503,7 +507,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, if (*got_frame) { p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; return avpkt->size; } else { diff --git a/arm/android/third_party/ffmpeg/libavcodec/qoidec.c b/arm/android/third_party/ffmpeg/libavcodec/qoidec.c index 9414d2fb..37bc2084 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/qoidec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/qoidec.c @@ -106,7 +106,7 @@ static int qoi_decode_frame(AVCodecContext *avctx, AVFrame *p, memcpy(&dst[off_x * channels], px, channels); } - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; p->pict_type = AV_PICTURE_TYPE_I; *got_frame = 1; diff --git a/arm/android/third_party/ffmpeg/libavcodec/qpeg.c b/arm/android/third_party/ffmpeg/libavcodec/qpeg.c index 5bca338a..1f76ebc5 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/qpeg.c +++ b/arm/android/third_party/ffmpeg/libavcodec/qpeg.c @@ -297,14 +297,24 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, } /* make the palette available on the way out */ - p->palette_has_changed = ff_copy_palette(a->pal, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS + p->palette_has_changed = +#endif + ff_copy_palette(a->pal, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_ENABLE_DEPRECATION_WARNINGS +#endif memcpy(p->data[1], a->pal, AVPALETTE_SIZE); av_frame_unref(ref); if ((ret = av_frame_ref(ref, p)) < 0) return ret; - p->key_frame = intra; + if (intra) + p->flags |= AV_FRAME_FLAG_KEY; + else + p->flags &= ~AV_FRAME_FLAG_KEY; p->pict_type = intra ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; *got_frame = 1; diff --git a/arm/android/third_party/ffmpeg/libavcodec/qsv_internal.h b/arm/android/third_party/ffmpeg/libavcodec/qsv_internal.h index 5119ef4d..c2d301b4 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/qsv_internal.h +++ b/arm/android/third_party/ffmpeg/libavcodec/qsv_internal.h @@ -23,9 +23,9 @@ #include "config.h" -#if CONFIG_VAAPI +#if CONFIG_VAAPI && !defined(_WIN32) // Do not enable for libva-win32 on Windows #define AVCODEC_QSV_LINUX_SESSION_HANDLE -#endif //CONFIG_VAAPI +#endif //CONFIG_VAAPI && !defined(_WIN32) #ifdef AVCODEC_QSV_LINUX_SESSION_HANDLE #include @@ -35,7 +35,6 @@ #endif #include #include -#include #include "libavutil/hwcontext_vaapi.h" #endif diff --git a/arm/android/third_party/ffmpeg/libavcodec/qsvdec.c b/arm/android/third_party/ffmpeg/libavcodec/qsvdec.c index 6bc85116..da700f25 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/qsvdec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/qsvdec.c @@ -828,14 +828,18 @@ static int qsv_decode(AVCodecContext *avctx, QSVContext *q, outsurf->Info.PicStruct & MFX_PICSTRUCT_FRAME_TRIPLING ? 4 : outsurf->Info.PicStruct & MFX_PICSTRUCT_FRAME_DOUBLING ? 2 : outsurf->Info.PicStruct & MFX_PICSTRUCT_FIELD_REPEATED ? 1 : 0; - frame->top_field_first = - outsurf->Info.PicStruct & MFX_PICSTRUCT_FIELD_TFF; - frame->interlaced_frame = + frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST * + !!(outsurf->Info.PicStruct & MFX_PICSTRUCT_FIELD_TFF); + frame->flags |= AV_FRAME_FLAG_INTERLACED * !(outsurf->Info.PicStruct & MFX_PICSTRUCT_PROGRESSIVE); frame->pict_type = ff_qsv_map_pictype(aframe.frame->dec_info.FrameType); //Key frame is IDR frame is only suitable for H264. For HEVC, IRAPs are key frames. - if (avctx->codec_id == AV_CODEC_ID_H264) - frame->key_frame = !!(aframe.frame->dec_info.FrameType & MFX_FRAMETYPE_IDR); + if (avctx->codec_id == AV_CODEC_ID_H264) { + if (aframe.frame->dec_info.FrameType & MFX_FRAMETYPE_IDR) + frame->flags |= AV_FRAME_FLAG_KEY; + else + frame->flags &= ~AV_FRAME_FLAG_KEY; + } /* update the surface properties */ if (avctx->pix_fmt == AV_PIX_FMT_QSV) diff --git a/arm/android/third_party/ffmpeg/libavcodec/qsvenc.c b/arm/android/third_party/ffmpeg/libavcodec/qsvenc.c index c975302b..0ed1f757 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/qsvenc.c +++ b/arm/android/third_party/ffmpeg/libavcodec/qsvenc.c @@ -1947,8 +1947,8 @@ static int submit_frame(QSVEncContext *q, const AVFrame *frame, qf->surface.Info = q->param.mfx.FrameInfo; qf->surface.Info.PicStruct = - !frame->interlaced_frame ? MFX_PICSTRUCT_PROGRESSIVE : - frame->top_field_first ? MFX_PICSTRUCT_FIELD_TFF : + !(frame->flags & AV_FRAME_FLAG_INTERLACED) ? MFX_PICSTRUCT_PROGRESSIVE : + (frame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST) ? MFX_PICSTRUCT_FIELD_TFF : MFX_PICSTRUCT_FIELD_BFF; if (frame->repeat_pict == 1) qf->surface.Info.PicStruct |= MFX_PICSTRUCT_FIELD_REPEATED; @@ -2402,7 +2402,7 @@ static int encode_frame(AVCodecContext *avctx, QSVEncContext *q, goto free; } - if (ret == MFX_WRN_INCOMPATIBLE_VIDEO_PARAM && frame && frame->interlaced_frame) + if (ret == MFX_WRN_INCOMPATIBLE_VIDEO_PARAM && frame && (frame->flags & AV_FRAME_FLAG_INTERLACED)) print_interlace_msg(avctx, q); ret = 0; diff --git a/arm/android/third_party/ffmpeg/libavcodec/qtrle.c b/arm/android/third_party/ffmpeg/libavcodec/qtrle.c index 5cb18c86..9b016d7e 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/qtrle.c +++ b/arm/android/third_party/ffmpeg/libavcodec/qtrle.c @@ -537,7 +537,14 @@ static int qtrle_decode_frame(AVCodecContext *avctx, AVFrame *rframe, } if(has_palette) { - s->frame->palette_has_changed = ff_copy_palette(s->pal, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS + s->frame->palette_has_changed = +#endif + ff_copy_palette(s->pal, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_ENABLE_DEPRECATION_WARNINGS +#endif /* make the palette available on the way out */ memcpy(s->frame->data[1], s->pal, AVPALETTE_SIZE); diff --git a/arm/android/third_party/ffmpeg/libavcodec/r210dec.c b/arm/android/third_party/ffmpeg/libavcodec/r210dec.c index ae80f46e..fe6a0259 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/r210dec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/r210dec.c @@ -57,7 +57,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *pic, return ret; pic->pict_type = AV_PICTURE_TYPE_I; - pic->key_frame = 1; + pic->flags |= AV_FRAME_FLAG_KEY; g_line = pic->data[0]; b_line = pic->data[1]; r_line = pic->data[2]; diff --git a/arm/android/third_party/ffmpeg/libavcodec/rasc.c b/arm/android/third_party/ffmpeg/libavcodec/rasc.c index cfa3d6b0..4d057e80 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/rasc.c +++ b/arm/android/third_party/ffmpeg/libavcodec/rasc.c @@ -740,7 +740,10 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, if (!s->skip_cursor) draw_cursor(avctx); - s->frame->key_frame = intra; + if (intra) + s->frame->flags |= AV_FRAME_FLAG_KEY; + else + s->frame->flags &= ~AV_FRAME_FLAG_KEY; s->frame->pict_type = intra ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; *got_frame = 1; diff --git a/arm/android/third_party/ffmpeg/libavcodec/ratecontrol.c b/arm/android/third_party/ffmpeg/libavcodec/ratecontrol.c index 6a40f9cb..649f570c 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/ratecontrol.c +++ b/arm/android/third_party/ffmpeg/libavcodec/ratecontrol.c @@ -57,7 +57,16 @@ void ff_write_pass1_stats(MpegEncContext *s) static double get_fps(AVCodecContext *avctx) { - return 1.0 / av_q2d(avctx->time_base) / FFMAX(avctx->ticks_per_frame, 1); + if (avctx->framerate.num > 0 && avctx->framerate.den > 0) + return av_q2d(avctx->framerate); + +FF_DISABLE_DEPRECATION_WARNINGS + return 1.0 / av_q2d(avctx->time_base) +#if FF_API_TICKS_PER_FRAME + / FFMAX(avctx->ticks_per_frame, 1) +#endif + ; +FF_ENABLE_DEPRECATION_WARNINGS } static inline double qp2bits(RateControlEntry *rce, double qp) diff --git a/arm/android/third_party/ffmpeg/libavcodec/rawdec.c b/arm/android/third_party/ffmpeg/libavcodec/rawdec.c index c20c317f..8e9358f9 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/rawdec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/rawdec.c @@ -227,15 +227,16 @@ static int raw_decode(AVCodecContext *avctx, AVFrame *frame, need_copy = !avpkt->buf || context->is_1_2_4_8_bpp || context->is_yuv2 || context->is_lt_16bpp; frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; res = ff_decode_frame_props(avctx, frame); if (res < 0) return res; if (context->tff >= 0) { - frame->interlaced_frame = 1; - frame->top_field_first = context->tff; + frame->flags |= AV_FRAME_FLAG_INTERLACED; + if (context->tff == 1) + frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST; } if ((res = av_image_check_size(avctx->width, avctx->height, 0, avctx)) < 0) @@ -372,7 +373,11 @@ static int raw_decode(AVCodecContext *avctx, AVFrame *frame, } if (ff_copy_palette(context->palette->data, avpkt, avctx)) { +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } else if (context->is_nut_pal8) { int vid_size = avctx->width * avctx->height; int pal_size = avpkt->size - vid_size; @@ -380,7 +385,11 @@ static int raw_decode(AVCodecContext *avctx, AVFrame *frame, if (avpkt->size > vid_size && pal_size <= AVPALETTE_SIZE) { const uint8_t *pal = avpkt->data + vid_size; memcpy(context->palette->data, pal, pal_size); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } } } @@ -459,9 +468,9 @@ static int raw_decode(AVCodecContext *avctx, AVFrame *frame, } if (avctx->field_order > AV_FIELD_PROGRESSIVE) { /* we have interlaced material flagged in container */ - frame->interlaced_frame = 1; + frame->flags |= AV_FRAME_FLAG_INTERLACED; if (avctx->field_order == AV_FIELD_TT || avctx->field_order == AV_FIELD_TB) - frame->top_field_first = 1; + frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST; } *got_frame = 1; diff --git a/arm/android/third_party/ffmpeg/libavcodec/rka.c b/arm/android/third_party/ffmpeg/libavcodec/rka.c index 2212e3f9..3e86d838 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/rka.c +++ b/arm/android/third_party/ffmpeg/libavcodec/rka.c @@ -737,7 +737,7 @@ static int decode_filter(RKAContext *s, ChContext *ctx, ACoder *ac, int off, uns } ctx->buf0[off] = ctx->buf1[off] + ctx->buf0[off + -1]; } else { - val *= 1 << ctx->cmode; + val *= 1U << ctx->cmode; sum += ctx->buf0[off + -1] + val; switch (s->bps) { case 16: sum = av_clip_int16(sum); break; diff --git a/arm/android/third_party/ffmpeg/libavcodec/rkmppdec.c b/arm/android/third_party/ffmpeg/libavcodec/rkmppdec.c index 8bf7c6ed..5768568b 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/rkmppdec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/rkmppdec.c @@ -404,8 +404,10 @@ static int rkmpp_retrieve_frame(AVCodecContext *avctx, AVFrame *frame) frame->colorspace = mpp_frame_get_colorspace(mppframe); mode = mpp_frame_get_mode(mppframe); - frame->interlaced_frame = ((mode & MPP_FRAME_FLAG_FIELD_ORDER_MASK) == MPP_FRAME_FLAG_DEINTERLACED); - frame->top_field_first = ((mode & MPP_FRAME_FLAG_FIELD_ORDER_MASK) == MPP_FRAME_FLAG_TOP_FIRST); + if ((mode & MPP_FRAME_FLAG_FIELD_ORDER_MASK) == MPP_FRAME_FLAG_DEINTERLACED) + frame->flags |= AV_FRAME_FLAG_INTERLACED; + if ((mode & MPP_FRAME_FLAG_FIELD_ORDER_MASK) == MPP_FRAME_FLAG_TOP_FIRST) + frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST; mppformat = mpp_frame_get_fmt(mppframe); drmformat = rkmpp_get_frameformat(mppformat); diff --git a/arm/android/third_party/ffmpeg/libavcodec/rscc.c b/arm/android/third_party/ffmpeg/libavcodec/rscc.c index 61a25df3..ace9aeeb 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/rscc.c +++ b/arm/android/third_party/ffmpeg/libavcodec/rscc.c @@ -339,14 +339,21 @@ static int rscc_decode_frame(AVCodecContext *avctx, AVFrame *frame, /* Keyframe when the number of pixels updated matches the whole surface */ if (pixel_size == ctx->inflated_size) { frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; } else { frame->pict_type = AV_PICTURE_TYPE_P; } /* Palette handling */ if (avctx->pix_fmt == AV_PIX_FMT_PAL8) { - frame->palette_has_changed = ff_copy_palette(ctx->palette, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS + frame->palette_has_changed = +#endif + ff_copy_palette(ctx->palette, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_ENABLE_DEPRECATION_WARNINGS +#endif memcpy(frame->data[1], ctx->palette, AVPALETTE_SIZE); } // We only return a picture when enough of it is undamaged, this avoids copying nearly broken frames around diff --git a/arm/android/third_party/ffmpeg/libavcodec/rv34.c b/arm/android/third_party/ffmpeg/libavcodec/rv34.c index 45f64666..51f18147 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/rv34.c +++ b/arm/android/third_party/ffmpeg/libavcodec/rv34.c @@ -1692,6 +1692,8 @@ int ff_rv34_decode_frame(AVCodecContext *avctx, AVFrame *pict, int i; r->tmp_b_block_base = av_malloc(s->linesize * 48); + if (!r->tmp_b_block_base) + return AVERROR(ENOMEM); for (i = 0; i < 2; i++) r->tmp_b_block_y[i] = r->tmp_b_block_base + i * 16 * s->linesize; diff --git a/arm/android/third_party/ffmpeg/libavcodec/sanm.c b/arm/android/third_party/ffmpeg/libavcodec/sanm.c index bec3c770..b70daab7 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/sanm.c +++ b/arm/android/third_party/ffmpeg/libavcodec/sanm.c @@ -1484,11 +1484,13 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, return ret; ctx->rotate_code = header.rotate_code; - if ((ctx->frame->key_frame = !header.seq_num)) { + if (!header.seq_num) { + ctx->frame->flags |= AV_FRAME_FLAG_KEY; ctx->frame->pict_type = AV_PICTURE_TYPE_I; fill_frame(ctx->frm1, ctx->npixels, header.bg_color); fill_frame(ctx->frm2, ctx->npixels, header.bg_color); } else { + ctx->frame->flags &= ~AV_FRAME_FLAG_KEY; ctx->frame->pict_type = AV_PICTURE_TYPE_P; } diff --git a/arm/android/third_party/ffmpeg/libavcodec/scpr.c b/arm/android/third_party/ffmpeg/libavcodec/scpr.c index 7630adb3..b096965d 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/scpr.c +++ b/arm/android/third_party/ffmpeg/libavcodec/scpr.c @@ -516,18 +516,18 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, s->version = 1; s->get_freq = get_freq0; s->decode = decode0; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; ret = decompress_i(avctx, (uint32_t *)s->current_frame->data[0], s->current_frame->linesize[0] / 4); } else if (type == 18) { s->version = 2; s->get_freq = get_freq; s->decode = decode; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; ret = decompress_i(avctx, (uint32_t *)s->current_frame->data[0], s->current_frame->linesize[0] / 4); } else if (type == 34) { - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; s->version = 3; ret = decompress_i3(avctx, (uint32_t *)s->current_frame->data[0], s->current_frame->linesize[0] / 4); @@ -538,7 +538,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, if (bytestream2_get_bytes_left(gb) < 3) return AVERROR_INVALIDDATA; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; bytestream2_skip(gb, 1); if (avctx->bits_per_coded_sample == 16) { uint16_t value = bytestream2_get_le16(gb); @@ -557,7 +557,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, dst += s->current_frame->linesize[0] / 4; } } else if (type == 0 || type == 1) { - frame->key_frame = 0; + frame->flags &= ~AV_FRAME_FLAG_KEY; if (s->version == 1 || s->version == 2) ret = decompress_p(avctx, (uint32_t *)s->current_frame->data[0], @@ -612,7 +612,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, } } - frame->pict_type = frame->key_frame ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; + frame->pict_type = (frame->flags & AV_FRAME_FLAG_KEY) ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; FFSWAP(AVFrame *, s->current_frame, s->last_frame); diff --git a/arm/android/third_party/ffmpeg/libavcodec/screenpresso.c b/arm/android/third_party/ffmpeg/libavcodec/screenpresso.c index 0d9e4850..b2715499 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/screenpresso.c +++ b/arm/android/third_party/ffmpeg/libavcodec/screenpresso.c @@ -173,7 +173,7 @@ static int screenpresso_decode_frame(AVCodecContext *avctx, AVFrame *frame, /* Usual properties */ if (keyframe) { frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; } else { frame->pict_type = AV_PICTURE_TYPE_P; } diff --git a/arm/android/third_party/ffmpeg/libavcodec/sga.c b/arm/android/third_party/ffmpeg/libavcodec/sga.c index d3f49242..eae691ad 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/sga.c +++ b/arm/android/third_party/ffmpeg/libavcodec/sga.c @@ -497,9 +497,13 @@ static int sga_decode_frame(AVCodecContext *avctx, AVFrame *frame, } memcpy(frame->data[1], s->pal, AVPALETTE_SIZE); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; *got_frame = 1; diff --git a/arm/android/third_party/ffmpeg/libavcodec/sgidec.c b/arm/android/third_party/ffmpeg/libavcodec/sgidec.c index 92083f23..04a347c5 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/sgidec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/sgidec.c @@ -249,7 +249,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, break; } p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; /* Skip header. */ bytestream2_seek(&g, SGI_HEADER_SIZE, SEEK_SET); diff --git a/arm/android/third_party/ffmpeg/libavcodec/sgirledec.c b/arm/android/third_party/ffmpeg/libavcodec/sgirledec.c index 9e3a220a..18bf8081 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/sgirledec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/sgirledec.c @@ -124,7 +124,7 @@ static int sgirle_decode_frame(AVCodecContext *avctx, AVFrame *frame, return ret; frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; *got_frame = 1; diff --git a/arm/android/third_party/ffmpeg/libavcodec/sheervideo.c b/arm/android/third_party/ffmpeg/libavcodec/sheervideo.c index eee60147..d9c94ea9 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/sheervideo.c +++ b/arm/android/third_party/ffmpeg/libavcodec/sheervideo.c @@ -1973,7 +1973,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, } p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; if ((ret = ff_thread_get_buffer(avctx, p, 0)) < 0) return ret; diff --git a/arm/android/third_party/ffmpeg/libavcodec/shorten.c b/arm/android/third_party/ffmpeg/libavcodec/shorten.c index 1b2abd76..eca0c4e8 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/shorten.c +++ b/arm/android/third_party/ffmpeg/libavcodec/shorten.c @@ -814,8 +814,10 @@ const FFCodec ff_shorten_decoder = { FF_CODEC_DECODE_CB(shorten_decode_frame), .p.capabilities = AV_CODEC_CAP_CHANNEL_CONF | AV_CODEC_CAP_DELAY | - AV_CODEC_CAP_DR1 | - AV_CODEC_CAP_SUBFRAMES , +#if FF_API_SUBFRAMES + AV_CODEC_CAP_SUBFRAMES | +#endif + AV_CODEC_CAP_DR1, .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P, AV_SAMPLE_FMT_U8P, AV_SAMPLE_FMT_NONE }, diff --git a/arm/android/third_party/ffmpeg/libavcodec/smacker.c b/arm/android/third_party/ffmpeg/libavcodec/smacker.c index 4b05575e..7ee9fe85 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/smacker.c +++ b/arm/android/third_party/ffmpeg/libavcodec/smacker.c @@ -107,16 +107,16 @@ enum SmkBlockTypes { * Can read SMKTREE_DECODE_MAX_RECURSION before the first check; * does not overread gb on success. */ -static int smacker_decode_tree(GetBitContext *gb, HuffContext *hc, int length) +static int smacker_decode_tree(AVCodecContext *avctx, GetBitContext *gb, HuffContext *hc, int length) { if (length > SMKTREE_DECODE_MAX_RECURSION || length > 3 * SMKTREE_BITS) { - av_log(NULL, AV_LOG_ERROR, "Maximum tree recursion level exceeded.\n"); + av_log(avctx, AV_LOG_ERROR, "Maximum tree recursion level exceeded.\n"); return AVERROR_INVALIDDATA; } if(!get_bits1(gb)){ //Leaf if (hc->current >= 256) { - av_log(NULL, AV_LOG_ERROR, "Tree size exceeded!\n"); + av_log(avctx, AV_LOG_ERROR, "Tree size exceeded!\n"); return AVERROR_INVALIDDATA; } if (get_bits_left(gb) < 8) @@ -126,10 +126,10 @@ static int smacker_decode_tree(GetBitContext *gb, HuffContext *hc, int length) } else { //Node int r; length++; - r = smacker_decode_tree(gb, hc, length); + r = smacker_decode_tree(avctx, gb, hc, length); if(r) return r; - return smacker_decode_tree(gb, hc, length); + return smacker_decode_tree(avctx, gb, hc, length); } } @@ -138,7 +138,7 @@ static int smacker_decode_tree(GetBitContext *gb, HuffContext *hc, int length) * * Checks before the first read, can overread by 6 * SMKTREE_BITS on success. */ -static int smacker_decode_bigtree(GetBitContext *gb, DBCtx *ctx, int length) +static int smacker_decode_bigtree(AVCodecContext *avctx, GetBitContext *gb, DBCtx *ctx, int length) { // Larger length can cause segmentation faults due to too deep recursion. if (length > SMKTREE_DECODE_BIG_MAX_RECURSION) { @@ -176,12 +176,12 @@ static int smacker_decode_bigtree(GetBitContext *gb, DBCtx *ctx, int length) int r = 0, r_new, t; t = ctx->current++; - r = smacker_decode_bigtree(gb, ctx, length + 1); + r = smacker_decode_bigtree(avctx, gb, ctx, length + 1); if(r < 0) return r; ctx->values[t] = SMK_NODE | r; r++; - r_new = smacker_decode_bigtree(gb, ctx, length + 1); + r_new = smacker_decode_bigtree(avctx, gb, ctx, length + 1); if (r_new < 0) return r_new; return r + r_new; @@ -215,7 +215,7 @@ static int smacker_decode_header_tree(SmackVContext *smk, GetBitContext *gb, int i ? "high" : "low"); continue; } - err = smacker_decode_tree(gb, &h, 0); + err = smacker_decode_tree(smk->avctx, gb, &h, 0); if (err < 0) goto error; skip_bits1(gb); @@ -253,7 +253,7 @@ static int smacker_decode_header_tree(SmackVContext *smk, GetBitContext *gb, int } *recodes = ctx.values; - err = smacker_decode_bigtree(gb, &ctx, 0); + err = smacker_decode_bigtree(smk->avctx, gb, &ctx, 0); if (err < 0) goto error; skip_bits1(gb); @@ -392,12 +392,18 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, pal = (uint32_t*)smk->pic->data[1]; bytestream2_init(&gb2, avpkt->data, avpkt->size); flags = bytestream2_get_byteu(&gb2); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS smk->pic->palette_has_changed = flags & 1; - smk->pic->key_frame = !!(flags & 2); - if (smk->pic->key_frame) +FF_ENABLE_DEPRECATION_WARNINGS +#endif + if (flags & 2) { + smk->pic->flags |= AV_FRAME_FLAG_KEY; smk->pic->pict_type = AV_PICTURE_TYPE_I; - else + } else { + smk->pic->flags &= ~AV_FRAME_FLAG_KEY; smk->pic->pict_type = AV_PICTURE_TYPE_P; + } for(i = 0; i < 256; i++) *pal++ = 0xFFU << 24 | bytestream2_get_be24u(&gb2); @@ -649,7 +655,7 @@ static int smka_decode_frame(AVCodecContext *avctx, AVFrame *frame, HuffContext h; h.current = 0; skip_bits1(&gb); - if ((ret = smacker_decode_tree(&gb, &h, 0)) < 0) + if ((ret = smacker_decode_tree(avctx, &gb, &h, 0)) < 0) goto error; skip_bits1(&gb); if (h.current > 1) { diff --git a/arm/android/third_party/ffmpeg/libavcodec/smc.c b/arm/android/third_party/ffmpeg/libavcodec/smc.c index 2b10e743..3e8a89ce 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/smc.c +++ b/arm/android/third_party/ffmpeg/libavcodec/smc.c @@ -437,7 +437,14 @@ static int smc_decode_frame(AVCodecContext *avctx, AVFrame *rframe, if ((ret = ff_reget_buffer(avctx, s->frame, 0)) < 0) return ret; - s->frame->palette_has_changed = ff_copy_palette(s->pal, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS + s->frame->palette_has_changed = +#endif + ff_copy_palette(s->pal, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_ENABLE_DEPRECATION_WARNINGS +#endif bytestream2_init(&gb, buf, buf_size); ret = smc_decode_stream(s, &gb); diff --git a/arm/android/third_party/ffmpeg/libavcodec/snow.c b/arm/android/third_party/ffmpeg/libavcodec/snow.c index b6c8d5e2..5eb3ee1e 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/snow.c +++ b/arm/android/third_party/ffmpeg/libavcodec/snow.c @@ -606,7 +606,7 @@ int ff_snow_frame_start(SnowContext *s){ }else{ int i; for(i=0; imax_ref_frames && s->last_picture[i]->data[0]; i++) - if(i && s->last_picture[i-1]->key_frame) + if(i && (s->last_picture[i-1]->flags & AV_FRAME_FLAG_KEY)) break; s->ref_frames= i; if(s->ref_frames==0){ @@ -617,7 +617,10 @@ int ff_snow_frame_start(SnowContext *s){ if ((ret = ff_snow_get_buffer(s, s->current_picture)) < 0) return ret; - s->current_picture->key_frame= s->keyframe; + if (s->keyframe) + s->current_picture->flags |= AV_FRAME_FLAG_KEY; + else + s->current_picture->flags &= ~AV_FRAME_FLAG_KEY; return 0; } diff --git a/arm/android/third_party/ffmpeg/libavcodec/snowenc.c b/arm/android/third_party/ffmpeg/libavcodec/snowenc.c index 4cf7ff11..1360343a 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/snowenc.c +++ b/arm/android/third_party/ffmpeg/libavcodec/snowenc.c @@ -130,8 +130,10 @@ static av_cold int encode_init(AVCodecContext *avctx) if (ret) return ret; - ff_set_cmp(&s->mecc, s->mecc.me_cmp, s->avctx->me_cmp); - ff_set_cmp(&s->mecc, s->mecc.me_sub_cmp, s->avctx->me_sub_cmp); + ret = ff_set_cmp(&s->mecc, s->mecc.me_cmp, s->avctx->me_cmp); + ret |= ff_set_cmp(&s->mecc, s->mecc.me_sub_cmp, s->avctx->me_sub_cmp); + if (ret < 0) + return AVERROR(EINVAL); s->input_picture = av_frame_alloc(); if (!s->input_picture) @@ -1761,7 +1763,7 @@ redo_frame: ff_build_rac_states(c, (1LL<<32)/20, 256-8); pic->pict_type= AV_PICTURE_TYPE_I; s->keyframe=1; - s->current_picture->key_frame=1; + s->current_picture->flags |= AV_FRAME_FLAG_KEY; goto redo_frame; } @@ -1889,7 +1891,7 @@ redo_frame: } pkt->size = ff_rac_terminate(c, 0); - if (s->current_picture->key_frame) + if (s->current_picture->flags & AV_FRAME_FLAG_KEY) pkt->flags |= AV_PKT_FLAG_KEY; *got_packet = 1; diff --git a/arm/android/third_party/ffmpeg/libavcodec/sonic.c b/arm/android/third_party/ffmpeg/libavcodec/sonic.c index 62e6193a..0544fecf 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/sonic.c +++ b/arm/android/third_party/ffmpeg/libavcodec/sonic.c @@ -473,7 +473,7 @@ static void predictor_init_state(int *k, int *state, int order) static int predictor_calc_error(int *k, int *state, int order, int error) { - int i, x = error - shift_down(k[order-1] * (unsigned)state[order-1], LATTICE_SHIFT); + int i, x = error - (unsigned)shift_down(k[order-1] * (unsigned)state[order-1], LATTICE_SHIFT); #if 1 int *k_ptr = &(k[order-2]), @@ -1013,7 +1013,7 @@ static int sonic_decode_frame(AVCodecContext *avctx, AVFrame *frame, if (s->lossless) quant = 1; else - quant = get_symbol(&c, state, 0) * SAMPLE_FACTOR; + quant = get_symbol(&c, state, 0) * (unsigned)SAMPLE_FACTOR; // av_log(NULL, AV_LOG_INFO, "quant: %d\n", quant); diff --git a/arm/android/third_party/ffmpeg/libavcodec/speedhqdec.c b/arm/android/third_party/ffmpeg/libavcodec/speedhqdec.c index e1e6f9a5..ff106009 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/speedhqdec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/speedhqdec.c @@ -436,7 +436,7 @@ static int speedhq_decode_frame(AVCodecContext *avctx, AVFrame *frame, if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) { return ret; } - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; if (second_field_offset == 4 || second_field_offset == (buf_size-4)) { /* diff --git a/arm/android/third_party/ffmpeg/libavcodec/svq3.c b/arm/android/third_party/ffmpeg/libavcodec/svq3.c index df514030..2d03dbc4 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/svq3.c +++ b/arm/android/third_party/ffmpeg/libavcodec/svq3.c @@ -1408,7 +1408,10 @@ static int svq3_decode_frame(AVCodecContext *avctx, AVFrame *rframe, /* for skipping the frame */ s->cur_pic->f->pict_type = s->pict_type; - s->cur_pic->f->key_frame = (s->pict_type == AV_PICTURE_TYPE_I); + if (s->pict_type == AV_PICTURE_TYPE_I) + s->cur_pic->f->flags |= AV_FRAME_FLAG_KEY; + else + s->cur_pic->f->flags &= ~AV_FRAME_FLAG_KEY; ret = get_buffer(avctx, s->cur_pic); if (ret < 0) diff --git a/arm/android/third_party/ffmpeg/libavcodec/tak.c b/arm/android/third_party/ffmpeg/libavcodec/tak.c index f26574c9..99678e98 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/tak.c +++ b/arm/android/third_party/ffmpeg/libavcodec/tak.c @@ -92,10 +92,10 @@ int ff_tak_check_crc(const uint8_t *buf, unsigned int buf_size) return 0; } -void ff_tak_parse_streaminfo(TAKStreamInfo *s, GetBitContext *gb) +static int tak_parse_streaminfo(TAKStreamInfo *s, GetBitContext *gb) { uint64_t channel_mask = 0; - int frame_type, i; + int frame_type, i, ret; s->codec = get_bits(gb, TAK_ENCODER_CODEC_BITS); skip_bits(gb, TAK_ENCODER_PROFILE_BITS); @@ -124,7 +124,13 @@ void ff_tak_parse_streaminfo(TAKStreamInfo *s, GetBitContext *gb) } s->ch_layout = channel_mask; - s->frame_samples = tak_get_nb_samples(s->sample_rate, frame_type); + + ret = tak_get_nb_samples(s->sample_rate, frame_type); + if (ret < 0) + return ret; + s->frame_samples = ret; + + return 0; } int avpriv_tak_parse_streaminfo(TAKStreamInfo *s, const uint8_t *buf, int size) @@ -135,9 +141,7 @@ int avpriv_tak_parse_streaminfo(TAKStreamInfo *s, const uint8_t *buf, int size) if (ret < 0) return AVERROR_INVALIDDATA; - ff_tak_parse_streaminfo(s, &gb); - - return 0; + return tak_parse_streaminfo(s, &gb); } int ff_tak_decode_frame_header(AVCodecContext *avctx, GetBitContext *gb, @@ -159,7 +163,9 @@ int ff_tak_decode_frame_header(AVCodecContext *avctx, GetBitContext *gb, } if (ti->flags & TAK_FRAME_FLAG_HAS_INFO) { - ff_tak_parse_streaminfo(ti, gb); + int ret = tak_parse_streaminfo(ti, gb); + if (ret < 0) + return ret; if (get_bits(gb, 6)) skip_bits(gb, 25); @@ -169,6 +175,9 @@ int ff_tak_decode_frame_header(AVCodecContext *avctx, GetBitContext *gb, if (ti->flags & TAK_FRAME_FLAG_HAS_METADATA) return AVERROR_INVALIDDATA; + if (get_bits_left(gb) < 24) + return AVERROR_INVALIDDATA; + skip_bits(gb, 24); return 0; diff --git a/arm/android/third_party/ffmpeg/libavcodec/tak.h b/arm/android/third_party/ffmpeg/libavcodec/tak.h index 60691189..5e43598d 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/tak.h +++ b/arm/android/third_party/ffmpeg/libavcodec/tak.h @@ -149,8 +149,6 @@ int ff_tak_check_crc(const uint8_t *buf, unsigned int buf_size); */ int avpriv_tak_parse_streaminfo(TAKStreamInfo *s, const uint8_t *buf, int size); -void ff_tak_parse_streaminfo(TAKStreamInfo *s, GetBitContext *gb); - /** * Validate and decode a frame header. * @param avctx AVCodecContext to use as av_log() context diff --git a/arm/android/third_party/ffmpeg/libavcodec/targa.c b/arm/android/third_party/ffmpeg/libavcodec/targa.c index 07005f2b..59fdc428 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/targa.c +++ b/arm/android/third_party/ffmpeg/libavcodec/targa.c @@ -249,7 +249,11 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, } break; } +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS p->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } } diff --git a/arm/android/third_party/ffmpeg/libavcodec/targa_y216dec.c b/arm/android/third_party/ffmpeg/libavcodec/targa_y216dec.c index d5234c16..2874a51a 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/targa_y216dec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/targa_y216dec.c @@ -47,7 +47,7 @@ static int y216_decode_frame(AVCodecContext *avctx, AVFrame *pic, if ((ret = ff_get_buffer(avctx, pic, 0)) < 0) return ret; - pic->key_frame = 1; + pic->flags |= AV_FRAME_FLAG_KEY; pic->pict_type = AV_PICTURE_TYPE_I; y = (uint16_t *)pic->data[0]; diff --git a/arm/android/third_party/ffmpeg/libavcodec/tdsc.c b/arm/android/third_party/ffmpeg/libavcodec/tdsc.c index b5ab2e17..739738d9 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/tdsc.c +++ b/arm/android/third_party/ffmpeg/libavcodec/tdsc.c @@ -612,7 +612,7 @@ static int tdsc_decode_frame(AVCodecContext *avctx, AVFrame *frame, /* Frame is ready to be output */ if (keyframe) { frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; } else { frame->pict_type = AV_PICTURE_TYPE_P; } diff --git a/arm/android/third_party/ffmpeg/libavcodec/tests/avcodec.c b/arm/android/third_party/ffmpeg/libavcodec/tests/avcodec.c index 4c173042..d78447d0 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/tests/avcodec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/tests/avcodec.c @@ -149,8 +149,7 @@ int main(void){ FF_CODEC_CAP_SETS_FRAME_PROPS) || codec->capabilities & (AV_CODEC_CAP_AVOID_PROBING | AV_CODEC_CAP_CHANNEL_CONF | - AV_CODEC_CAP_DRAW_HORIZ_BAND | - AV_CODEC_CAP_SUBFRAMES)) + AV_CODEC_CAP_DRAW_HORIZ_BAND)) ERR("Encoder %s has decoder-only capabilities set\n"); if (codec->capabilities & AV_CODEC_CAP_FRAME_THREADS && codec->capabilities & AV_CODEC_CAP_ENCODER_FLUSH) diff --git a/arm/android/third_party/ffmpeg/libavcodec/threadframe.h b/arm/android/third_party/ffmpeg/libavcodec/threadframe.h index d2f93c5c..d581c408 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/threadframe.h +++ b/arm/android/third_party/ffmpeg/libavcodec/threadframe.h @@ -84,6 +84,9 @@ void ff_thread_release_ext_buffer(AVCodecContext *avctx, ThreadFrame *f); int ff_thread_ref_frame(ThreadFrame *dst, const ThreadFrame *src); +int ff_thread_replace_frame(AVCodecContext *avctx, ThreadFrame *dst, + const ThreadFrame *src); + int ff_thread_can_start_frame(AVCodecContext *avctx); #endif diff --git a/arm/android/third_party/ffmpeg/libavcodec/tiertexseqv.c b/arm/android/third_party/ffmpeg/libavcodec/tiertexseqv.c index 19c0671b..cdc88555 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/tiertexseqv.c +++ b/arm/android/third_party/ffmpeg/libavcodec/tiertexseqv.c @@ -182,7 +182,11 @@ static int seqvideo_decode(SeqVideoContext *seq, const unsigned char *data, int c[j] = (*data << 2) | (*data >> 4); palette[i] = 0xFFU << 24 | AV_RB24(c); } +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS seq->frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } if (flags & 2) { diff --git a/arm/android/third_party/ffmpeg/libavcodec/tiff.c b/arm/android/third_party/ffmpeg/libavcodec/tiff.c index 1a1879de..14896459 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/tiff.c +++ b/arm/android/third_party/ffmpeg/libavcodec/tiff.c @@ -1036,7 +1036,7 @@ static int dng_decode_tiles(AVCodecContext *avctx, AVFrame *frame, /* Frame is ready to be output */ frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; return avpkt->size; } @@ -1451,7 +1451,7 @@ static int tiff_decode_tag(TiffContext *s, AVFrame *frame) break; case TIFF_GRAY_RESPONSE_CURVE: case DNG_LINEARIZATION_TABLE: - if (count > FF_ARRAY_ELEMS(s->dng_lut)) + if (count < 1 || count > FF_ARRAY_ELEMS(s->dng_lut)) return AVERROR_INVALIDDATA; for (int i = 0; i < count; i++) s->dng_lut[i] = ff_tget(&s->gb, type, s->le); @@ -2379,6 +2379,7 @@ again: } } + p->flags |= AV_FRAME_FLAG_KEY; *got_frame = 1; return avpkt->size; diff --git a/arm/android/third_party/ffmpeg/libavcodec/tmv.c b/arm/android/third_party/ffmpeg/libavcodec/tmv.c index cdb83452..2a7e1a10 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/tmv.c +++ b/arm/android/third_party/ffmpeg/libavcodec/tmv.c @@ -57,10 +57,14 @@ static int tmv_decode_frame(AVCodecContext *avctx, AVFrame *frame, } frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; dst = frame->data[0]; +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif memcpy(frame->data[1], ff_cga_palette, 16 * 4); memset(frame->data[1] + 16 * 4, 0, AVPALETTE_SIZE - 16 * 4); diff --git a/arm/android/third_party/ffmpeg/libavcodec/truemotion2.c b/arm/android/third_party/ffmpeg/libavcodec/truemotion2.c index b168b9cd..73c93359 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/truemotion2.c +++ b/arm/android/third_party/ffmpeg/libavcodec/truemotion2.c @@ -930,11 +930,13 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, } offset += t; } - p->key_frame = tm2_decode_blocks(l, p); - if (p->key_frame) + if (tm2_decode_blocks(l, p)) { + p->flags |= AV_FRAME_FLAG_KEY; p->pict_type = AV_PICTURE_TYPE_I; - else + } else { + p->flags &= ~AV_FRAME_FLAG_KEY; p->pict_type = AV_PICTURE_TYPE_P; + } l->cur = !l->cur; *got_frame = 1; diff --git a/arm/android/third_party/ffmpeg/libavcodec/truemotion2rt.c b/arm/android/third_party/ffmpeg/libavcodec/truemotion2rt.c index c6015b27..4f8590fc 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/truemotion2rt.c +++ b/arm/android/third_party/ffmpeg/libavcodec/truemotion2rt.c @@ -202,7 +202,7 @@ static int truemotion2rt_decode_frame(AVCodecContext *avctx, AVFrame *p, } p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; *got_frame = 1; return avpkt->size; diff --git a/arm/android/third_party/ffmpeg/libavcodec/tscc.c b/arm/android/third_party/ffmpeg/libavcodec/tscc.c index 0ebe641a..346d93e1 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/tscc.c +++ b/arm/android/third_party/ffmpeg/libavcodec/tscc.c @@ -106,7 +106,11 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, /* make the palette available on the way out */ if (c->avctx->pix_fmt == AV_PIX_FMT_PAL8) { +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = palette_has_changed; +FF_ENABLE_DEPRECATION_WARNINGS +#endif memcpy(frame->data[1], c->pal, AVPALETTE_SIZE); } diff --git a/arm/android/third_party/ffmpeg/libavcodec/utils.c b/arm/android/third_party/ffmpeg/libavcodec/utils.c index 599da21d..a8514ba6 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/utils.c +++ b/arm/android/third_party/ffmpeg/libavcodec/utils.c @@ -317,7 +317,7 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height, } if (s->codec_id == AV_CODEC_ID_IFF_ILBM) { - w_align = FFMAX(w_align, 8); + w_align = FFMAX(w_align, 16); } *width = FFALIGN(*width, w_align); @@ -915,6 +915,27 @@ int ff_thread_ref_frame(ThreadFrame *dst, const ThreadFrame *src) return 0; } +int ff_thread_replace_frame(AVCodecContext *avctx, ThreadFrame *dst, + const ThreadFrame *src) +{ + int ret; + + dst->owner[0] = src->owner[0]; + dst->owner[1] = src->owner[1]; + + ret = av_frame_replace(dst->f, src->f); + if (ret < 0) + return ret; + + ret = av_buffer_replace(&dst->progress, src->progress); + if (ret < 0) { + ff_thread_release_ext_buffer(dst->owner[0], dst); + return ret; + } + + return 0; +} + #if !HAVE_THREADS int ff_thread_get_buffer(AVCodecContext *avctx, AVFrame *f, int flags) diff --git a/arm/android/third_party/ffmpeg/libavcodec/utvideodec.c b/arm/android/third_party/ffmpeg/libavcodec/utvideodec.c index 9face52d..66c84352 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/utvideodec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/utvideodec.c @@ -869,9 +869,10 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, break; } - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_I; - frame->interlaced_frame = !!c->interlaced; + if (c->interlaced) + frame->flags |= AV_FRAME_FLAG_INTERLACED; *got_frame = 1; diff --git a/arm/android/third_party/ffmpeg/libavcodec/v210dec.c b/arm/android/third_party/ffmpeg/libavcodec/v210dec.c index 43b92f6e..814d65bb 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/v210dec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/v210dec.c @@ -187,7 +187,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *pic, return ret; pic->pict_type = AV_PICTURE_TYPE_I; - pic->key_frame = 1; + pic->flags |= AV_FRAME_FLAG_KEY; if (stride) { td.stride = stride; @@ -207,9 +207,9 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *pic, if (avctx->field_order > AV_FIELD_PROGRESSIVE) { /* we have interlaced material flagged in container */ - pic->interlaced_frame = 1; + pic->flags |= AV_FRAME_FLAG_INTERLACED; if (avctx->field_order == AV_FIELD_TT || avctx->field_order == AV_FIELD_TB) - pic->top_field_first = 1; + pic->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST; } *got_frame = 1; diff --git a/arm/android/third_party/ffmpeg/libavcodec/v210x.c b/arm/android/third_party/ffmpeg/libavcodec/v210x.c index 96594e2a..55630fa2 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/v210x.c +++ b/arm/android/third_party/ffmpeg/libavcodec/v210x.c @@ -62,7 +62,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *pic, vdst = (uint16_t *)pic->data[2]; yend = ydst + width; pic->pict_type = AV_PICTURE_TYPE_I; - pic->key_frame = 1; + pic->flags |= AV_FRAME_FLAG_KEY; for (;;) { uint32_t v = av_be2ne32(*src++); diff --git a/arm/android/third_party/ffmpeg/libavcodec/v308dec.c b/arm/android/third_party/ffmpeg/libavcodec/v308dec.c index a81771fc..4bc4ea4e 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/v308dec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/v308dec.c @@ -48,7 +48,7 @@ static int v308_decode_frame(AVCodecContext *avctx, AVFrame *pic, if ((ret = ff_get_buffer(avctx, pic, 0)) < 0) return ret; - pic->key_frame = 1; + pic->flags |= AV_FRAME_FLAG_KEY; pic->pict_type = AV_PICTURE_TYPE_I; y = pic->data[0]; diff --git a/arm/android/third_party/ffmpeg/libavcodec/v408dec.c b/arm/android/third_party/ffmpeg/libavcodec/v408dec.c index edc9976d..191c050f 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/v408dec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/v408dec.c @@ -51,7 +51,7 @@ static int v408_decode_frame(AVCodecContext *avctx, AVFrame *pic, if ((ret = ff_get_buffer(avctx, pic, 0)) < 0) return ret; - pic->key_frame = 1; + pic->flags |= AV_FRAME_FLAG_KEY; pic->pict_type = AV_PICTURE_TYPE_I; y = pic->data[0]; diff --git a/arm/android/third_party/ffmpeg/libavcodec/v410dec.c b/arm/android/third_party/ffmpeg/libavcodec/v410dec.c index fb859e8c..35e4a8ae 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/v410dec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/v410dec.c @@ -102,7 +102,7 @@ static int v410_decode_frame(AVCodecContext *avctx, AVFrame *pic, if ((ret = ff_thread_get_buffer(avctx, pic, 0)) < 0) return ret; - pic->key_frame = 1; + pic->flags |= AV_FRAME_FLAG_KEY; pic->pict_type = AV_PICTURE_TYPE_I; td.buf = src; diff --git a/arm/android/third_party/ffmpeg/libavcodec/v4l2_buffers.c b/arm/android/third_party/ffmpeg/libavcodec/v4l2_buffers.c index 3f547106..22771356 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/v4l2_buffers.c +++ b/arm/android/third_party/ffmpeg/libavcodec/v4l2_buffers.c @@ -427,7 +427,8 @@ int ff_v4l2_buffer_buf_to_avframe(AVFrame *frame, V4L2Buffer *avbuf) return ret; /* 2. get frame information */ - frame->key_frame = !!(avbuf->buf.flags & V4L2_BUF_FLAG_KEYFRAME); + if (avbuf->buf.flags & V4L2_BUF_FLAG_KEYFRAME) + frame->flags |= AV_FRAME_FLAG_KEY; frame->color_primaries = v4l2_get_color_primaries(avbuf); frame->colorspace = v4l2_get_color_space(avbuf); frame->color_range = v4l2_get_color_range(avbuf); diff --git a/arm/android/third_party/ffmpeg/libavcodec/vaapi_decode.c b/arm/android/third_party/ffmpeg/libavcodec/vaapi_decode.c index ab8c12e3..dd55cbd6 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/vaapi_decode.c +++ b/arm/android/third_party/ffmpeg/libavcodec/vaapi_decode.c @@ -398,6 +398,11 @@ static const struct { MAP(MPEG4, MPEG4_ADVANCED_SIMPLE, MPEG4AdvancedSimple), MAP(MPEG4, MPEG4_MAIN, MPEG4Main ), +#if VA_CHECK_VERSION(1, 18, 0) + MAP(H264, H264_HIGH_10_INTRA, + H264High10 ), + MAP(H264, H264_HIGH_10, H264High10 ), +#endif MAP(H264, H264_CONSTRAINED_BASELINE, H264ConstrainedBaseline), MAP(H264, H264_MAIN, H264Main ), diff --git a/arm/android/third_party/ffmpeg/libavcodec/vaapi_encode_h264.c b/arm/android/third_party/ffmpeg/libavcodec/vaapi_encode_h264.c index 645f6a97..9ad017d5 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/vaapi_encode_h264.c +++ b/arm/android/third_party/ffmpeg/libavcodec/vaapi_encode_h264.c @@ -23,6 +23,7 @@ #include "libavutil/avassert.h" #include "libavutil/common.h" +#include "libavutil/pixdesc.h" #include "libavutil/internal.h" #include "libavutil/opt.h" @@ -301,10 +302,21 @@ static int vaapi_encode_h264_init_sequence_params(AVCodecContext *avctx) H264RawPPS *pps = &priv->raw_pps; VAEncSequenceParameterBufferH264 *vseq = ctx->codec_sequence_params; VAEncPictureParameterBufferH264 *vpic = ctx->codec_picture_params; + const AVPixFmtDescriptor *desc; + int bit_depth; memset(sps, 0, sizeof(*sps)); memset(pps, 0, sizeof(*pps)); + desc = av_pix_fmt_desc_get(priv->common.input_frames->sw_format); + av_assert0(desc); + if (desc->nb_components == 1 || desc->log2_chroma_w != 1 || desc->log2_chroma_h != 1) { + av_log(avctx, AV_LOG_ERROR, "Chroma format of input pixel format " + "%s is not supported.\n", desc->name); + return AVERROR(EINVAL); + } + bit_depth = desc->comp[0].depth; + sps->nal_unit_header.nal_ref_idc = 3; sps->nal_unit_header.nal_unit_type = H264_NAL_SPS; @@ -314,11 +326,11 @@ static int vaapi_encode_h264_init_sequence_params(AVCodecContext *avctx) avctx->profile == FF_PROFILE_H264_MAIN) sps->constraint_set1_flag = 1; - if (avctx->profile == FF_PROFILE_H264_HIGH) + if (avctx->profile == FF_PROFILE_H264_HIGH || avctx->profile == FF_PROFILE_H264_HIGH_10) sps->constraint_set3_flag = ctx->gop_size == 1; if (avctx->profile == FF_PROFILE_H264_MAIN || - avctx->profile == FF_PROFILE_H264_HIGH) { + avctx->profile == FF_PROFILE_H264_HIGH || avctx->profile == FF_PROFILE_H264_HIGH_10) { sps->constraint_set4_flag = 1; sps->constraint_set5_flag = ctx->b_per_p == 0; } @@ -359,6 +371,8 @@ static int vaapi_encode_h264_init_sequence_params(AVCodecContext *avctx) sps->seq_parameter_set_id = 0; sps->chroma_format_idc = 1; + sps->bit_depth_luma_minus8 = bit_depth - 8; + sps->bit_depth_chroma_minus8 = bit_depth - 8; sps->log2_max_frame_num_minus4 = 4; sps->pic_order_cnt_type = ctx->max_b_depth ? 0 : 2; @@ -1144,6 +1158,9 @@ static av_cold int vaapi_encode_h264_configure(AVCodecContext *avctx) } static const VAAPIEncodeProfile vaapi_encode_h264_profiles[] = { +#if VA_CHECK_VERSION(1, 18, 0) + { FF_PROFILE_H264_HIGH_10, 10, 3, 1, 1, VAProfileH264High10 }, +#endif { FF_PROFILE_H264_HIGH, 8, 3, 1, 1, VAProfileH264High }, { FF_PROFILE_H264_MAIN, 8, 3, 1, 1, VAProfileH264Main }, { FF_PROFILE_H264_CONSTRAINED_BASELINE, @@ -1208,10 +1225,9 @@ static av_cold int vaapi_encode_h264_init(AVCodecContext *avctx) av_log(avctx, AV_LOG_ERROR, "H.264 extended profile " "is not supported.\n"); return AVERROR_PATCHWELCOME; - case FF_PROFILE_H264_HIGH_10: case FF_PROFILE_H264_HIGH_10_INTRA: - av_log(avctx, AV_LOG_ERROR, "H.264 10-bit profiles " - "are not supported.\n"); + av_log(avctx, AV_LOG_ERROR, "H.264 high 10 intra profile " + "is not supported.\n"); return AVERROR_PATCHWELCOME; case FF_PROFILE_H264_HIGH_422: case FF_PROFILE_H264_HIGH_422_INTRA: @@ -1304,6 +1320,7 @@ static const AVOption vaapi_encode_h264_options[] = { { PROFILE("constrained_baseline", FF_PROFILE_H264_CONSTRAINED_BASELINE) }, { PROFILE("main", FF_PROFILE_H264_MAIN) }, { PROFILE("high", FF_PROFILE_H264_HIGH) }, + { PROFILE("high10", FF_PROFILE_H264_HIGH_10) }, #undef PROFILE { "level", "Set level (level_idc)", diff --git a/arm/android/third_party/ffmpeg/libavcodec/vaapi_hevc.c b/arm/android/third_party/ffmpeg/libavcodec/vaapi_hevc.c index 984af75c..8b12484f 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/vaapi_hevc.c +++ b/arm/android/third_party/ffmpeg/libavcodec/vaapi_hevc.c @@ -60,10 +60,10 @@ static void fill_vaapi_pic(VAPictureHEVC *va_pic, const HEVCFrame *pic, int rps_ if (pic->flags & HEVC_FRAME_FLAG_LONG_REF) va_pic->flags |= VA_PICTURE_HEVC_LONG_TERM_REFERENCE; - if (pic->frame->interlaced_frame) { + if (pic->frame->flags & AV_FRAME_FLAG_INTERLACED) { va_pic->flags |= VA_PICTURE_HEVC_FIELD_PIC; - if (!pic->frame->top_field_first) + if (!(pic->frame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST)) va_pic->flags |= VA_PICTURE_HEVC_BOTTOM_FIELD; } } @@ -259,7 +259,7 @@ static int vaapi_hevc_start_frame(AVCodecContext *avctx, pre_palette_size = pps->pps_palette_predictor_initializers_present_flag ? pps->pps_num_palette_predictor_initializers : (sps->sps_palette_predictor_initializers_present_flag ? - sps->sps_num_palette_predictor_initializers_minus1 + 1 : + sps->sps_num_palette_predictor_initializers : 0); if (avctx->profile == FF_PROFILE_HEVC_SCC) { diff --git a/arm/android/third_party/ffmpeg/libavcodec/vb.c b/arm/android/third_party/ffmpeg/libavcodec/vb.c index 8b0e2164..5744faa9 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/vb.c +++ b/arm/android/third_party/ffmpeg/libavcodec/vb.c @@ -230,7 +230,11 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, } memcpy(frame->data[1], c->pal, AVPALETTE_SIZE); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = flags & VB_HAS_PALETTE; +FF_ENABLE_DEPRECATION_WARNINGS +#endif outptr = frame->data[0]; srcptr = c->frame; diff --git a/arm/android/third_party/ffmpeg/libavcodec/vble.c b/arm/android/third_party/ffmpeg/libavcodec/vble.c index 9307b0d1..7711bf1b 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/vble.c +++ b/arm/android/third_party/ffmpeg/libavcodec/vble.c @@ -135,7 +135,7 @@ static int vble_decode_frame(AVCodecContext *avctx, AVFrame *pic, return ret; /* Set flags */ - pic->key_frame = 1; + pic->flags |= AV_FRAME_FLAG_KEY; pic->pict_type = AV_PICTURE_TYPE_I; /* Version should always be 1 */ diff --git a/arm/android/third_party/ffmpeg/libavcodec/vbndec.c b/arm/android/third_party/ffmpeg/libavcodec/vbndec.c index d92dcd46..02ed43f8 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/vbndec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/vbndec.c @@ -151,7 +151,7 @@ static int vbn_decode_frame(AVCodecContext *avctx, goto out; frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; if (format == VBN_FORMAT_RAW) { uint8_t *flipped = frame->data[0] + frame->linesize[0] * (frame->height - 1); diff --git a/arm/android/third_party/ffmpeg/libavcodec/vc1.c b/arm/android/third_party/ffmpeg/libavcodec/vc1.c index d4014d25..795c6db5 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/vc1.c +++ b/arm/android/third_party/ffmpeg/libavcodec/vc1.c @@ -418,6 +418,14 @@ static int decode_sequence_header_adv(VC1Context *v, GetBitContext *gb) v->s.loop_filter, v->chromaformat, v->broadcast, v->interlace, v->tfcntrflag, v->finterpflag); +#if FF_API_TICKS_PER_FRAME +FF_DISABLE_DEPRECATION_WARNINGS + if (v->broadcast) { // Pulldown may be present + v->s.avctx->ticks_per_frame = 2; + } +FF_ENABLE_DEPRECATION_WARNINGS +#endif + v->psf = get_bits1(gb); if (v->psf) { //PsF, 6.1.13 av_log(v->s.avctx, AV_LOG_ERROR, "Progressive Segmented Frame mode: not supported (yet)\n"); @@ -467,9 +475,6 @@ static int decode_sequence_header_adv(VC1Context *v, GetBitContext *gb) v->s.avctx->framerate.num = ff_vc1_fps_nr[nr - 1] * 1000; } } - if (v->broadcast) { // Pulldown may be present - v->s.avctx->ticks_per_frame = 2; - } } if (get_bits1(gb)) { diff --git a/arm/android/third_party/ffmpeg/libavcodec/vc1_mc.c b/arm/android/third_party/ffmpeg/libavcodec/vc1_mc.c index 1b8d8799..8f0b3f6f 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/vc1_mc.c +++ b/arm/android/third_party/ffmpeg/libavcodec/vc1_mc.c @@ -233,7 +233,7 @@ void ff_vc1_mc_1mv(VC1Context *v, int dir) luty = v->last_luty; lutuv = v->last_lutuv; use_ic = v->last_use_ic; - interlace = s->last_picture.f->interlaced_frame; + interlace = !!(s->last_picture.f->flags & AV_FRAME_FLAG_INTERLACED); } } else { srcY = s->next_picture.f->data[0]; @@ -242,7 +242,7 @@ void ff_vc1_mc_1mv(VC1Context *v, int dir) luty = v->next_luty; lutuv = v->next_lutuv; use_ic = v->next_use_ic; - interlace = s->next_picture.f->interlaced_frame; + interlace = !!(s->next_picture.f->flags & AV_FRAME_FLAG_INTERLACED); } if (!srcY || !srcU) { @@ -482,13 +482,13 @@ void ff_vc1_mc_4mv_luma(VC1Context *v, int n, int dir, int avg) srcY = s->last_picture.f->data[0]; luty = v->last_luty; use_ic = v->last_use_ic; - interlace = s->last_picture.f->interlaced_frame; + interlace = !!(s->last_picture.f->flags & AV_FRAME_FLAG_INTERLACED); } } else { srcY = s->next_picture.f->data[0]; luty = v->next_luty; use_ic = v->next_use_ic; - interlace = s->next_picture.f->interlaced_frame; + interlace = !!(s->next_picture.f->flags & AV_FRAME_FLAG_INTERLACED); } if (!srcY) { @@ -708,14 +708,14 @@ void ff_vc1_mc_4mv_chroma(VC1Context *v, int dir) srcV = s->last_picture.f->data[2]; lutuv = v->last_lutuv; use_ic = v->last_use_ic; - interlace = s->last_picture.f->interlaced_frame; + interlace = !!(s->last_picture.f->flags & AV_FRAME_FLAG_INTERLACED); } } else { srcU = s->next_picture.f->data[1]; srcV = s->next_picture.f->data[2]; lutuv = v->next_lutuv; use_ic = v->next_use_ic; - interlace = s->next_picture.f->interlaced_frame; + interlace = !!(s->next_picture.f->flags & AV_FRAME_FLAG_INTERLACED); } if (!srcU) { @@ -884,13 +884,13 @@ void ff_vc1_mc_4mv_chroma4(VC1Context *v, int dir, int dir2, int avg) srcV = s->next_picture.f->data[2]; lutuv = v->next_lutuv; use_ic = v->next_use_ic; - interlace = s->next_picture.f->interlaced_frame; + interlace = !!(s->next_picture.f->flags & AV_FRAME_FLAG_INTERLACED); } else { srcU = s->last_picture.f->data[1]; srcV = s->last_picture.f->data[2]; lutuv = v->last_lutuv; use_ic = v->last_use_ic; - interlace = s->last_picture.f->interlaced_frame; + interlace = !!(s->last_picture.f->flags & AV_FRAME_FLAG_INTERLACED); } if (!srcU) return; @@ -1034,7 +1034,7 @@ void ff_vc1_interp_mc(VC1Context *v) srcU = s->next_picture.f->data[1]; srcV = s->next_picture.f->data[2]; - interlace = s->next_picture.f->interlaced_frame; + interlace = !!(s->next_picture.f->flags & AV_FRAME_FLAG_INTERLACED); src_x = s->mb_x * 16 + (mx >> 2); src_y = s->mb_y * 16 + (my >> 2); diff --git a/arm/android/third_party/ffmpeg/libavcodec/vc1_parser.c b/arm/android/third_party/ffmpeg/libavcodec/vc1_parser.c index 4167215f..ec284dca 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/vc1_parser.c +++ b/arm/android/third_party/ffmpeg/libavcodec/vc1_parser.c @@ -89,11 +89,10 @@ static void vc1_extract_header(AVCodecParserContext *s, AVCodecContext *avctx, else s->pict_type = vpc->v.s.pict_type; - if (avctx->ticks_per_frame > 1){ + if (vpc->v.broadcast){ // process pulldown flags s->repeat_pict = 1; // Pulldown flags are only valid when 'broadcast' has been set. - // So ticks_per_frame will be 2 if (vpc->v.rff){ // repeat field s->repeat_pict = 2; diff --git a/arm/android/third_party/ffmpeg/libavcodec/vc1dec.c b/arm/android/third_party/ffmpeg/libavcodec/vc1dec.c index 5cb4c544..9e343d00 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/vc1dec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/vc1dec.c @@ -836,6 +836,7 @@ static int vc1_decode_frame(AVCodecContext *avctx, AVFrame *pict, const uint8_t *rawbuf; int raw_size; } *slices = NULL, *tmp; + unsigned slices_allocated = 0; v->second_field = 0; @@ -859,6 +860,7 @@ static int vc1_decode_frame(AVCodecContext *avctx, AVFrame *pict, //for advanced profile we may need to parse and unescape data if (avctx->codec_id == AV_CODEC_ID_VC1 || avctx->codec_id == AV_CODEC_ID_VC1IMAGE) { int buf_size2 = 0; + size_t next_allocated = 0; buf2 = av_mallocz(buf_size + AV_INPUT_BUFFER_PADDING_SIZE); if (!buf2) return AVERROR(ENOMEM); @@ -882,7 +884,8 @@ static int vc1_decode_frame(AVCodecContext *avctx, AVFrame *pict, int buf_size3; if (avctx->hwaccel) buf_start_second_field = start; - tmp = av_realloc_array(slices, sizeof(*slices), n_slices+1); + av_size_mult(sizeof(*slices), n_slices+1, &next_allocated); + tmp = next_allocated ? av_fast_realloc(slices, &slices_allocated, next_allocated) : NULL; if (!tmp) { ret = AVERROR(ENOMEM); goto err; @@ -911,7 +914,8 @@ static int vc1_decode_frame(AVCodecContext *avctx, AVFrame *pict, break; case VC1_CODE_SLICE: { int buf_size3; - tmp = av_realloc_array(slices, sizeof(*slices), n_slices+1); + av_size_mult(sizeof(*slices), n_slices+1, &next_allocated); + tmp = next_allocated ? av_fast_realloc(slices, &slices_allocated, next_allocated) : NULL; if (!tmp) { ret = AVERROR(ENOMEM); goto err; @@ -946,7 +950,8 @@ static int vc1_decode_frame(AVCodecContext *avctx, AVFrame *pict, } else { // found field marker, unescape second field if (avctx->hwaccel) buf_start_second_field = divider; - tmp = av_realloc_array(slices, sizeof(*slices), n_slices+1); + av_size_mult(sizeof(*slices), n_slices+1, &next_allocated); + tmp = next_allocated ? av_fast_realloc(slices, &slices_allocated, next_allocated) : NULL; if (!tmp) { ret = AVERROR(ENOMEM); goto err; @@ -1055,7 +1060,10 @@ static int vc1_decode_frame(AVCodecContext *avctx, AVFrame *pict, // for skipping the frame s->current_picture.f->pict_type = s->pict_type; - s->current_picture.f->key_frame = s->pict_type == AV_PICTURE_TYPE_I; + if (s->pict_type == AV_PICTURE_TYPE_I) + s->current_picture.f->flags |= AV_FRAME_FLAG_KEY; + else + s->current_picture.f->flags &= ~AV_FRAME_FLAG_KEY; /* skip B-frames if we don't have reference frames */ if (!s->last_picture_ptr && s->pict_type == AV_PICTURE_TYPE_B) { @@ -1073,13 +1081,12 @@ static int vc1_decode_frame(AVCodecContext *avctx, AVFrame *pict, } v->s.current_picture_ptr->field_picture = v->field_mode; - v->s.current_picture_ptr->f->interlaced_frame = (v->fcm != PROGRESSIVE); - v->s.current_picture_ptr->f->top_field_first = v->tff; + v->s.current_picture_ptr->f->flags |= AV_FRAME_FLAG_INTERLACED * (v->fcm != PROGRESSIVE); + v->s.current_picture_ptr->f->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST * !!v->tff; // process pulldown flags s->current_picture_ptr->f->repeat_pict = 0; // Pulldown flags are only valid when 'broadcast' has been set. - // So ticks_per_frame will be 2 if (v->rff) { // repeat field s->current_picture_ptr->f->repeat_pict = 1; diff --git a/arm/android/third_party/ffmpeg/libavcodec/vcr1.c b/arm/android/third_party/ffmpeg/libavcodec/vcr1.c index 853d4459..771337e2 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/vcr1.c +++ b/arm/android/third_party/ffmpeg/libavcodec/vcr1.c @@ -63,7 +63,7 @@ static int vcr1_decode_frame(AVCodecContext *avctx, AVFrame *p, if ((ret = ff_get_buffer(avctx, p, 0)) < 0) return ret; p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; for (i = 0; i < 16; i++) { a->delta[i] = *bytestream++; diff --git a/arm/android/third_party/ffmpeg/libavcodec/vdpau_mpeg12.c b/arm/android/third_party/ffmpeg/libavcodec/vdpau_mpeg12.c index 354239ca..79007aa1 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/vdpau_mpeg12.c +++ b/arm/android/third_party/ffmpeg/libavcodec/vdpau_mpeg12.c @@ -75,8 +75,9 @@ static int vdpau_mpeg_start_frame(AVCodecContext *avctx, info->f_code[1][0] = s->mpeg_f_code[1][0]; info->f_code[1][1] = s->mpeg_f_code[1][1]; for (i = 0; i < 64; ++i) { - info->intra_quantizer_matrix[i] = s->intra_matrix[i]; - info->non_intra_quantizer_matrix[i] = s->inter_matrix[i]; + int n = s->idsp.idct_permutation[i]; + info->intra_quantizer_matrix[i] = s->intra_matrix[n]; + info->non_intra_quantizer_matrix[i] = s->inter_matrix[n]; } return ff_vdpau_common_start_frame(pic_ctx, buffer, size); diff --git a/arm/android/third_party/ffmpeg/libavcodec/vdpau_mpeg4.c b/arm/android/third_party/ffmpeg/libavcodec/vdpau_mpeg4.c index 6e082eef..1211b1df 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/vdpau_mpeg4.c +++ b/arm/android/third_party/ffmpeg/libavcodec/vdpau_mpeg4.c @@ -74,8 +74,9 @@ static int vdpau_mpeg4_start_frame(AVCodecContext *avctx, info->alternate_vertical_scan_flag = s->alternate_scan; info->top_field_first = s->top_field_first; for (i = 0; i < 64; ++i) { - info->intra_quantizer_matrix[i] = s->intra_matrix[i]; - info->non_intra_quantizer_matrix[i] = s->inter_matrix[i]; + int n = s->idsp.idct_permutation[i]; + info->intra_quantizer_matrix[i] = s->intra_matrix[n]; + info->non_intra_quantizer_matrix[i] = s->inter_matrix[n]; } ff_vdpau_common_start_frame(pic_ctx, buffer, size); diff --git a/arm/android/third_party/ffmpeg/libavcodec/version.h b/arm/android/third_party/ffmpeg/libavcodec/version.h index 7acb261b..c2007219 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/version.h +++ b/arm/android/third_party/ffmpeg/libavcodec/version.h @@ -29,8 +29,8 @@ #include "version_major.h" -#define LIBAVCODEC_VERSION_MINOR 7 -#define LIBAVCODEC_VERSION_MICRO 100 +#define LIBAVCODEC_VERSION_MINOR 14 +#define LIBAVCODEC_VERSION_MICRO 101 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ LIBAVCODEC_VERSION_MINOR, \ diff --git a/arm/android/third_party/ffmpeg/libavcodec/version_major.h b/arm/android/third_party/ffmpeg/libavcodec/version_major.h index 40db2134..2f5138d0 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/version_major.h +++ b/arm/android/third_party/ffmpeg/libavcodec/version_major.h @@ -46,6 +46,8 @@ #define FF_API_VT_HWACCEL_CONTEXT (LIBAVCODEC_VERSION_MAJOR < 61) #define FF_API_AVCTX_FRAME_NUMBER (LIBAVCODEC_VERSION_MAJOR < 61) #define FF_API_SLICE_OFFSET (LIBAVCODEC_VERSION_MAJOR < 61) +#define FF_API_SUBFRAMES (LIBAVCODEC_VERSION_MAJOR < 61) +#define FF_API_TICKS_PER_FRAME (LIBAVCODEC_VERSION_MAJOR < 61) // reminder to remove CrystalHD decoders on next major bump #define FF_CODEC_CRYSTAL_HD (LIBAVCODEC_VERSION_MAJOR < 61) diff --git a/arm/android/third_party/ffmpeg/libavcodec/videotoolbox.c b/arm/android/third_party/ffmpeg/libavcodec/videotoolbox.c index e42fea6f..64443255 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/videotoolbox.c +++ b/arm/android/third_party/ffmpeg/libavcodec/videotoolbox.c @@ -799,6 +799,9 @@ static CFDictionaryRef videotoolbox_buffer_attributes_create(int width, static CFDictionaryRef videotoolbox_decoder_config_create(CMVideoCodecType codec_type, AVCodecContext *avctx) { + CFMutableDictionaryRef avc_info; + CFDataRef data = NULL; + CFMutableDictionaryRef config_info = CFDictionaryCreateMutable(kCFAllocatorDefault, 0, &kCFTypeDictionaryKeyCallBacks, @@ -810,9 +813,6 @@ static CFDictionaryRef videotoolbox_decoder_config_create(CMVideoCodecType codec kVTVideoDecoderSpecification_RequireHardwareAcceleratedVideoDecoder, kCFBooleanTrue); - CFMutableDictionaryRef avc_info; - CFDataRef data = NULL; - avc_info = CFDictionaryCreateMutable(kCFAllocatorDefault, 1, &kCFTypeDictionaryKeyCallBacks, @@ -1072,13 +1072,14 @@ static int videotoolbox_hevc_end_frame(AVCodecContext *avctx) HEVCContext *h = avctx->priv_data; AVFrame *frame = h->ref->frame; VTContext *vtctx = avctx->internal->hwaccel_priv_data; + int ret; h->output_frame->crop_right = 0; h->output_frame->crop_left = 0; h->output_frame->crop_top = 0; h->output_frame->crop_bottom = 0; - int ret = ff_videotoolbox_common_end_frame(avctx, frame); + ret = ff_videotoolbox_common_end_frame(avctx, frame); vtctx->bitstream_size = 0; return ret; } @@ -1132,15 +1133,17 @@ static int videotoolbox_prores_end_frame(AVCodecContext *avctx) } static enum AVPixelFormat videotoolbox_best_pixel_format(AVCodecContext *avctx) { + int depth; const AVPixFmtDescriptor *descriptor = av_pix_fmt_desc_get(avctx->sw_pix_fmt); if (!descriptor) return AV_PIX_FMT_NV12; // same as av_videotoolbox_alloc_context() - int depth = descriptor->comp[0].depth; if (descriptor->flags & AV_PIX_FMT_FLAG_ALPHA) return AV_PIX_FMT_AYUV64; + depth = descriptor->comp[0].depth; + #if HAVE_KCVPIXELFORMATTYPE_444YPCBCR16BIPLANARVIDEORANGE if (depth > 10) return descriptor->log2_chroma_w == 0 ? AV_PIX_FMT_P416 : AV_PIX_FMT_P216; @@ -1194,6 +1197,7 @@ int ff_videotoolbox_common_init(AVCodecContext *avctx) VTContext *vtctx = avctx->internal->hwaccel_priv_data; AVHWFramesContext *hw_frames; int err; + bool full_range; vtctx->logctx = avctx; @@ -1241,7 +1245,7 @@ int ff_videotoolbox_common_init(AVCodecContext *avctx) goto fail; } - bool full_range = avctx->color_range == AVCOL_RANGE_JPEG; + full_range = avctx->color_range == AVCOL_RANGE_JPEG; vtctx->vt_ctx->cv_pix_fmt_type = av_map_videotoolbox_format_from_pixfmt2(hw_frames->sw_format, full_range); if (!vtctx->vt_ctx->cv_pix_fmt_type) { diff --git a/arm/android/third_party/ffmpeg/libavcodec/videotoolboxenc.c b/arm/android/third_party/ffmpeg/libavcodec/videotoolboxenc.c index 56971471..b017c90c 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/videotoolboxenc.c +++ b/arm/android/third_party/ffmpeg/libavcodec/videotoolboxenc.c @@ -63,7 +63,21 @@ typedef OSStatus (*getParameterSetAtIndex)(CMFormatDescriptionRef videoDesc, size_t *parameterSetCountOut, int *NALUnitHeaderLengthOut); -//These symbols may not be present +/* + * Symbols that aren't available in MacOS 10.8 and iOS 8.0 need to be accessed + * from compat_keys, or it will cause compiler errors when compiling for older + * OS versions. + * + * For example, kVTCompressionPropertyKey_H264EntropyMode was added in + * MacOS 10.9. If this constant were used directly, a compiler would generate + * an error when it has access to the MacOS 10.8 headers, but does not have + * 10.9 headers. + * + * Runtime errors will still occur when unknown keys are set. A warning is + * logged and encoding continues where possible. + * + * When adding new symbols, they should be loaded/set in loadVTEncSymbols(). + */ static struct{ CFStringRef kCVImageBufferColorPrimaries_ITU_R_2020; CFStringRef kCVImageBufferTransferFunction_ITU_R_2020; @@ -105,6 +119,7 @@ static struct{ CFStringRef kVTVideoEncoderSpecification_EnableHardwareAcceleratedVideoEncoder; CFStringRef kVTVideoEncoderSpecification_RequireHardwareAcceleratedVideoEncoder; + CFStringRef kVTVideoEncoderSpecification_EnableLowLatencyRateControl; getParameterSetAtIndex CMVideoFormatDescriptionGetHEVCParameterSetAtIndex; } compat_keys; @@ -120,7 +135,7 @@ do{ \ static pthread_once_t once_ctrl = PTHREAD_ONCE_INIT; -static void loadVTEncSymbols(){ +static void loadVTEncSymbols(void){ compat_keys.CMVideoFormatDescriptionGetHEVCParameterSetAtIndex = (getParameterSetAtIndex)dlsym( RTLD_DEFAULT, @@ -171,6 +186,8 @@ static void loadVTEncSymbols(){ "EnableHardwareAcceleratedVideoEncoder"); GET_SYM(kVTVideoEncoderSpecification_RequireHardwareAcceleratedVideoEncoder, "RequireHardwareAcceleratedVideoEncoder"); + GET_SYM(kVTVideoEncoderSpecification_EnableLowLatencyRateControl, + "EnableLowLatencyRateControl"); } typedef enum VT_H264Profile { @@ -1245,6 +1262,13 @@ static int vtenc_create_encoder(AVCodecContext *avctx, compat_keys.kVTCompressionPropertyKey_TargetQualityForAlpha, alpha_quality_num); CFRelease(alpha_quality_num); + + if (status) { + av_log(avctx, + AV_LOG_ERROR, + "Error setting alpha quality: %d\n", + status); + } } } @@ -1441,6 +1465,17 @@ static int vtenc_create_encoder(AVCodecContext *avctx, } } + // low-latency mode: eliminate frame reordering, follow a one-in-one-out encoding mode + if ((avctx->flags & AV_CODEC_FLAG_LOW_DELAY) && avctx->codec_id == AV_CODEC_ID_H264) { + status = VTSessionSetProperty(vtctx->session, + compat_keys.kVTVideoEncoderSpecification_EnableLowLatencyRateControl, + kCFBooleanTrue); + + if (status) { + av_log(avctx, AV_LOG_ERROR, "Error setting low latency property: %d\n", status); + } + } + status = VTCompressionSessionPrepareToEncodeFrames(vtctx->session); if (status) { av_log(avctx, AV_LOG_ERROR, "Error: cannot prepare encoder: %d\n", status); @@ -1650,8 +1685,8 @@ static int find_sei_end(AVCodecContext *avctx, { int nal_type; size_t sei_payload_size = 0; - *sei_end = NULL; uint8_t *nal_start = nal_data; + *sei_end = NULL; if (!nal_size) return 0; @@ -2041,7 +2076,7 @@ static int vtenc_cm_to_avpacket( return AVERROR_EXTERNAL; } - int status = get_params_size(avctx, vid_fmt, &header_size); + status = get_params_size(avctx, vid_fmt, &header_size); if (status) return status; } diff --git a/arm/android/third_party/ffmpeg/libavcodec/vmnc.c b/arm/android/third_party/ffmpeg/libavcodec/vmnc.c index 8daaf08c..17e3a2f3 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/vmnc.c +++ b/arm/android/third_party/ffmpeg/libavcodec/vmnc.c @@ -339,7 +339,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, if ((ret = ff_reget_buffer(avctx, c->pic, 0)) < 0) return ret; - c->pic->key_frame = 0; + c->pic->flags &= ~AV_FRAME_FLAG_KEY; c->pic->pict_type = AV_PICTURE_TYPE_P; // restore screen after cursor @@ -441,7 +441,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, bytestream2_skip(gb, 4); break; case MAGIC_WMVi: // ServerInitialization struct - c->pic->key_frame = 1; + c->pic->flags |= AV_FRAME_FLAG_KEY; c->pic->pict_type = AV_PICTURE_TYPE_I; depth = bytestream2_get_byte(gb); if (depth != c->bpp) { diff --git a/arm/android/third_party/ffmpeg/libavcodec/vorbisdec.c b/arm/android/third_party/ffmpeg/libavcodec/vorbisdec.c index e9dad4ef..1d2a0997 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/vorbisdec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/vorbisdec.c @@ -368,6 +368,10 @@ static int vorbis_parse_setup_hdr_codebooks(vorbis_context *vc) unsigned codebook_value_bits = get_bits(gb, 4) + 1; unsigned codebook_sequence_p = get_bits1(gb); + if (!isfinite(codebook_minimum_value) || !isfinite(codebook_delta_value)) { + ret = AVERROR_INVALIDDATA; + goto error; + } ff_dlog(NULL, " We expect %d numbers for building the codevectors. \n", codebook_lookup_values); ff_dlog(NULL, " delta %f minmum %f \n", diff --git a/arm/android/third_party/ffmpeg/libavcodec/vp3.c b/arm/android/third_party/ffmpeg/libavcodec/vp3.c index 9660def6..9e097c89 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/vp3.c +++ b/arm/android/third_party/ffmpeg/libavcodec/vp3.c @@ -2353,6 +2353,8 @@ static av_cold int vp3_decode_init(AVCodecContext *avctx) s->avctx = avctx; s->width = FFALIGN(avctx->coded_width, 16); s->height = FFALIGN(avctx->coded_height, 16); + if (s->width < 18) + return AVERROR_PATCHWELCOME; if (avctx->codec_id != AV_CODEC_ID_THEORA) avctx->pix_fmt = AV_PIX_FMT_YUV420P; avctx->chroma_sample_location = AVCHROMA_LOC_CENTER; @@ -2675,7 +2677,10 @@ static int vp3_decode_frame(AVCodecContext *avctx, AVFrame *frame, s->current_frame.f->pict_type = s->keyframe ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; - s->current_frame.f->key_frame = s->keyframe; + if (s->keyframe) + s->current_frame.f->flags |= AV_FRAME_FLAG_KEY; + else + s->current_frame.f->flags &= ~AV_FRAME_FLAG_KEY; if ((ret = ff_thread_get_ext_buffer(avctx, &s->current_frame, AV_GET_BUFFER_FLAG_REF)) < 0) goto error; @@ -2919,7 +2924,9 @@ static int theora_decode_header(AVCodecContext *avctx, GetBitContext *gb) /* sanity check */ if (av_image_check_size(visible_width, visible_height, 0, avctx) < 0 || visible_width + offset_x > s->width || - visible_height + offset_y > s->height) { + visible_height + offset_y > s->height || + visible_width < 18 + ) { av_log(avctx, AV_LOG_ERROR, "Invalid frame dimensions - w:%d h:%d x:%d y:%d (%dx%d).\n", visible_width, visible_height, offset_x, offset_y, @@ -2965,6 +2972,8 @@ static int theora_decode_header(AVCodecContext *avctx, GetBitContext *gb) } else avctx->pix_fmt = AV_PIX_FMT_YUV420P; + if (s->width < 18) + return AVERROR_PATCHWELCOME; ret = ff_set_dimensions(avctx, s->width, s->height); if (ret < 0) return ret; diff --git a/arm/android/third_party/ffmpeg/libavcodec/vp5.c b/arm/android/third_party/ffmpeg/libavcodec/vp5.c index 57933350..78d4b38c 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/vp5.c +++ b/arm/android/third_party/ffmpeg/libavcodec/vp5.c @@ -44,10 +44,13 @@ static int vp5_parse_header(VP56Context *s, const uint8_t *buf, int buf_size) ret = ff_vpx_init_range_decoder(&s->c, buf, buf_size); if (ret < 0) return ret; - s->frames[VP56_FRAME_CURRENT]->key_frame = !vpx_rac_get(c); + if (!vpx_rac_get(c)) + s->frames[VP56_FRAME_CURRENT]->flags |= AV_FRAME_FLAG_KEY; + else + s->frames[VP56_FRAME_CURRENT]->flags &= ~AV_FRAME_FLAG_KEY; vpx_rac_get(c); ff_vp56_init_dequant(s, vp56_rac_gets(c, 6)); - if (s->frames[VP56_FRAME_CURRENT]->key_frame) + if (s->frames[VP56_FRAME_CURRENT]->flags & AV_FRAME_FLAG_KEY) { int render_x, render_y; @@ -148,7 +151,7 @@ static int vp5_parse_coeff_models(VP56Context *s) if (vpx_rac_get_prob_branchy(c, vp5_dccv_pct[pt][node])) { def_prob[node] = vp56_rac_gets_nn(c, 7); model->coeff_dccv[pt][node] = def_prob[node]; - } else if (s->frames[VP56_FRAME_CURRENT]->key_frame) { + } else if (s->frames[VP56_FRAME_CURRENT]->flags & AV_FRAME_FLAG_KEY) { model->coeff_dccv[pt][node] = def_prob[node]; } @@ -159,7 +162,7 @@ static int vp5_parse_coeff_models(VP56Context *s) if (vpx_rac_get_prob_branchy(c, vp5_ract_pct[ct][pt][cg][node])) { def_prob[node] = vp56_rac_gets_nn(c, 7); model->coeff_ract[pt][ct][cg][node] = def_prob[node]; - } else if (s->frames[VP56_FRAME_CURRENT]->key_frame) { + } else if (s->frames[VP56_FRAME_CURRENT]->flags & AV_FRAME_FLAG_KEY) { model->coeff_ract[pt][ct][cg][node] = def_prob[node]; } diff --git a/arm/android/third_party/ffmpeg/libavcodec/vp56.c b/arm/android/third_party/ffmpeg/libavcodec/vp56.c index bd994428..a5c5b236 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/vp56.c +++ b/arm/android/third_party/ffmpeg/libavcodec/vp56.c @@ -350,7 +350,7 @@ static void vp56_mc(VP56Context *s, int b, int plane, uint8_t *src, if (s->avctx->skip_loop_filter >= AVDISCARD_ALL || (s->avctx->skip_loop_filter >= AVDISCARD_NONKEY - && !s->frames[VP56_FRAME_CURRENT]->key_frame)) + && !(s->frames[VP56_FRAME_CURRENT]->flags & AV_FRAME_FLAG_KEY))) deblock_filtering = 0; dx = s->mv[b].x / s->vp56_coord_div[b]; @@ -493,7 +493,7 @@ static int vp56_decode_mb(VP56Context *s, int row, int col, int is_alpha) VP56mb mb_type; int ret; - if (s->frames[VP56_FRAME_CURRENT]->key_frame) + if (s->frames[VP56_FRAME_CURRENT]->flags & AV_FRAME_FLAG_KEY) mb_type = VP56_MB_INTRA; else mb_type = vp56_decode_mv(s, row, col); @@ -511,7 +511,7 @@ static int vp56_conceal_mb(VP56Context *s, int row, int col, int is_alpha) { VP56mb mb_type; - if (s->frames[VP56_FRAME_CURRENT]->key_frame) + if (s->frames[VP56_FRAME_CURRENT]->flags & AV_FRAME_FLAG_KEY) mb_type = VP56_MB_INTRA; else mb_type = vp56_conceal_mv(s, row, col); @@ -596,6 +596,7 @@ int ff_vp56_decode_frame(AVCodecContext *avctx, AVFrame *rframe, if (s->alpha_context) av_frame_unref(s->alpha_context->frames[i]); } + s->frames[VP56_FRAME_CURRENT]->flags |= AV_FRAME_FLAG_KEY; //FIXME } ret = ff_get_buffer(avctx, p, AV_GET_BUFFER_FLAG_REF); @@ -670,7 +671,7 @@ static int ff_vp56_decode_mbs(AVCodecContext *avctx, void *data, int res; int damaged = 0; - if (p->key_frame) { + if (p->flags & AV_FRAME_FLAG_KEY) { p->pict_type = AV_PICTURE_TYPE_I; s->default_models_init(s); for (block=0; blockmb_height*s->mb_width; block++) @@ -762,7 +763,7 @@ static int ff_vp56_decode_mbs(AVCodecContext *avctx, void *data, s->have_undamaged_frame = 1; next: - if (p->key_frame || s->golden_frame) { + if ((p->flags & AV_FRAME_FLAG_KEY) || s->golden_frame) { av_frame_unref(s->frames[VP56_FRAME_GOLDEN]); if ((res = av_frame_ref(s->frames[VP56_FRAME_GOLDEN], p)) < 0) return res; diff --git a/arm/android/third_party/ffmpeg/libavcodec/vp6.c b/arm/android/third_party/ffmpeg/libavcodec/vp6.c index 9bbfa0eb..7a519cf1 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/vp6.c +++ b/arm/android/third_party/ffmpeg/libavcodec/vp6.c @@ -57,10 +57,13 @@ static int vp6_parse_header(VP56Context *s, const uint8_t *buf, int buf_size) int ret; int separated_coeff = buf[0] & 1; - s->frames[VP56_FRAME_CURRENT]->key_frame = !(buf[0] & 0x80); + if (!(buf[0] & 0x80)) + s->frames[VP56_FRAME_CURRENT]->flags |= AV_FRAME_FLAG_KEY; + else + s->frames[VP56_FRAME_CURRENT]->flags &= ~AV_FRAME_FLAG_KEY; ff_vp56_init_dequant(s, (buf[0] >> 1) & 0x3F); - if (s->frames[VP56_FRAME_CURRENT]->key_frame) { + if (s->frames[VP56_FRAME_CURRENT]->flags & AV_FRAME_FLAG_KEY) { sub_version = buf[1] >> 3; if (sub_version > 8) return AVERROR_INVALIDDATA; @@ -299,7 +302,7 @@ static int vp6_parse_coeff_models(VP56Context *s) if (vpx_rac_get_prob_branchy(c, vp6_dccv_pct[pt][node])) { def_prob[node] = vp56_rac_gets_nn(c, 7); model->coeff_dccv[pt][node] = def_prob[node]; - } else if (s->frames[VP56_FRAME_CURRENT]->key_frame) { + } else if (s->frames[VP56_FRAME_CURRENT]->flags & AV_FRAME_FLAG_KEY) { model->coeff_dccv[pt][node] = def_prob[node]; } @@ -322,7 +325,7 @@ static int vp6_parse_coeff_models(VP56Context *s) if (vpx_rac_get_prob_branchy(c, vp6_ract_pct[ct][pt][cg][node])) { def_prob[node] = vp56_rac_gets_nn(c, 7); model->coeff_ract[pt][ct][cg][node] = def_prob[node]; - } else if (s->frames[VP56_FRAME_CURRENT]->key_frame) { + } else if (s->frames[VP56_FRAME_CURRENT]->flags & AV_FRAME_FLAG_KEY) { model->coeff_ract[pt][ct][cg][node] = def_prob[node]; } diff --git a/arm/android/third_party/ffmpeg/libavcodec/vp8.c b/arm/android/third_party/ffmpeg/libavcodec/vp8.c index db2419de..2ab06c82 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/vp8.c +++ b/arm/android/third_party/ffmpeg/libavcodec/vp8.c @@ -2732,7 +2732,10 @@ int vp78_decode_frame(AVCodecContext *avctx, AVFrame *rframe, int *got_frame, goto err; } - curframe->tf.f->key_frame = s->keyframe; + if (s->keyframe) + curframe->tf.f->flags |= AV_FRAME_FLAG_KEY; + else + curframe->tf.f->flags &= ~AV_FRAME_FLAG_KEY; curframe->tf.f->pict_type = s->keyframe ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; if ((ret = vp8_alloc_frame(s, curframe, referenced)) < 0) diff --git a/arm/android/third_party/ffmpeg/libavcodec/vp8data.c b/arm/android/third_party/ffmpeg/libavcodec/vp8data.c new file mode 100644 index 00000000..85740692 --- /dev/null +++ b/arm/android/third_party/ffmpeg/libavcodec/vp8data.c @@ -0,0 +1,42 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include + +// cat 1 and 2 are defined in vp8data.h +static const uint8_t vp8_dct_cat3_prob[] = { + 173, 148, 140, 0 +}; +static const uint8_t vp8_dct_cat4_prob[] = { + 176, 155, 140, 135, 0 +}; +static const uint8_t vp8_dct_cat5_prob[] = { + 180, 157, 141, 134, 130, 0 +}; +static const uint8_t vp8_dct_cat6_prob[] = { + 254, 254, 243, 230, 196, 177, 153, 140, 133, 130, 129, 0 +}; + +// only used for cat3 and above; cat 1 and 2 are referenced directly. +const uint8_t *const ff_vp8_dct_cat_prob[] = { + vp8_dct_cat3_prob, + vp8_dct_cat4_prob, + vp8_dct_cat5_prob, + vp8_dct_cat6_prob, +}; + diff --git a/arm/android/third_party/ffmpeg/libavcodec/vp8data.h b/arm/android/third_party/ffmpeg/libavcodec/vp8data.h index 1fcce134..8b8f1ed1 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/vp8data.h +++ b/arm/android/third_party/ffmpeg/libavcodec/vp8data.h @@ -339,26 +339,8 @@ static const uint8_t vp8_dct_cat1_prob[] = { static const uint8_t vp8_dct_cat2_prob[] = { 165, 145, 0 }; -static const uint8_t vp8_dct_cat3_prob[] = { - 173, 148, 140, 0 -}; -static const uint8_t vp8_dct_cat4_prob[] = { - 176, 155, 140, 135, 0 -}; -static const uint8_t vp8_dct_cat5_prob[] = { - 180, 157, 141, 134, 130, 0 -}; -static const uint8_t vp8_dct_cat6_prob[] = { - 254, 254, 243, 230, 196, 177, 153, 140, 133, 130, 129, 0 -}; -// only used for cat3 and above; cat 1 and 2 are referenced directly -const uint8_t *const ff_vp8_dct_cat_prob[] = { - vp8_dct_cat3_prob, - vp8_dct_cat4_prob, - vp8_dct_cat5_prob, - vp8_dct_cat6_prob, -}; +extern const uint8_t *const ff_vp8_dct_cat_prob[]; static const uint8_t vp8_token_default_probs[4][8][3][NUM_DCT_TOKENS - 1] = { { diff --git a/arm/android/third_party/ffmpeg/libavcodec/vp9.c b/arm/android/third_party/ffmpeg/libavcodec/vp9.c index 7ff387fa..d8a31507 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/vp9.c +++ b/arm/android/third_party/ffmpeg/libavcodec/vp9.c @@ -1613,7 +1613,10 @@ static int vp9_decode_frame(AVCodecContext *avctx, AVFrame *frame, if ((ret = vp9_frame_alloc(avctx, &s->s.frames[CUR_FRAME])) < 0) return ret; f = s->s.frames[CUR_FRAME].tf.f; - f->key_frame = s->s.h.keyframe; + if (s->s.h.keyframe) + f->flags |= AV_FRAME_FLAG_KEY; + else + f->flags &= ~AV_FRAME_FLAG_KEY; f->pict_type = (s->s.h.keyframe || s->s.h.intraonly) ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; if (s->s.frames[REF_FRAME_SEGMAP].tf.f->buf[0] && diff --git a/arm/android/third_party/ffmpeg/libavcodec/vqavideo.c b/arm/android/third_party/ffmpeg/libavcodec/vqavideo.c index 0573696d..2977cf9a 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/vqavideo.c +++ b/arm/android/third_party/ffmpeg/libavcodec/vqavideo.c @@ -809,7 +809,11 @@ static int vqa_decode_frame(AVCodecContext *avctx, AVFrame *rframe, /* make the palette available on the way out */ memcpy(s->frame->data[1], s->palette, PALETTE_COUNT * 4); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS s->frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } else if (avctx->pix_fmt == AV_PIX_FMT_RGB555LE) { if ((res = vqa_decode_frame_hicolor(s, s->frame)) < 0) return res; diff --git a/arm/android/third_party/ffmpeg/libavcodec/wavarc.c b/arm/android/third_party/ffmpeg/libavcodec/wavarc.c index 8d37af95..7bfc276d 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/wavarc.c +++ b/arm/android/third_party/ffmpeg/libavcodec/wavarc.c @@ -343,13 +343,15 @@ static int decode_2slp(AVCodecContext *avctx, break; case 0: order = get_urice(gb, 2); + if ((unsigned)order >= FF_ARRAY_ELEMS(s->filter[ch])) + return AVERROR_INVALIDDATA; for (int o = 0; o < order; o++) s->filter[ch][o] = get_srice(gb, 2); for (int n = 0; n < s->nb_samples; n++) { int sum = 15; for (int o = 0; o < order; o++) - sum += s->filter[ch][o] * samples[n + 70 - o - 1]; + sum += s->filter[ch][o] * (unsigned)samples[n + 70 - o - 1]; samples[n + 70] = get_srice(gb, k) + (sum >> 4); } @@ -452,7 +454,7 @@ fail: const int *src = s->samples[ch] + s->offset; for (int n = 0; n < frame->nb_samples; n++) - dst[n] = src[n] * (1 << s->shift) + 0x80U; + dst[n] = src[n] * (1U << s->shift) + 0x80U; } break; case AV_SAMPLE_FMT_S16P: @@ -461,7 +463,7 @@ fail: const int *src = s->samples[ch] + s->offset; for (int n = 0; n < frame->nb_samples; n++) - dst[n] = src[n] * (1 << s->shift); + dst[n] = src[n] * (1U << s->shift); } break; } @@ -497,7 +499,9 @@ const FFCodec ff_wavarc_decoder = { FF_CODEC_DECODE_CB(wavarc_decode), .close = wavarc_close, .p.capabilities = AV_CODEC_CAP_DR1 | +#if FF_API_SUBFRAMES AV_CODEC_CAP_SUBFRAMES | +#endif AV_CODEC_CAP_DELAY, .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_U8P, AV_SAMPLE_FMT_S16P, diff --git a/arm/android/third_party/ffmpeg/libavcodec/wavpackenc.c b/arm/android/third_party/ffmpeg/libavcodec/wavpackenc.c index 3d2d4536..9271e879 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/wavpackenc.c +++ b/arm/android/third_party/ffmpeg/libavcodec/wavpackenc.c @@ -2824,7 +2824,7 @@ static void fill_buffer(WavPackEncodeContext *s, switch (s->avctx->sample_fmt) { case AV_SAMPLE_FMT_U8P: - COPY_SAMPLES(int8_t, 0x80, 0); + COPY_SAMPLES(uint8_t, 0x80, 0); break; case AV_SAMPLE_FMT_S16P: COPY_SAMPLES(int16_t, 0, 0); diff --git a/arm/android/third_party/ffmpeg/libavcodec/wbmpdec.c b/arm/android/third_party/ffmpeg/libavcodec/wbmpdec.c index 8b105bc1..3b5753ab 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/wbmpdec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/wbmpdec.c @@ -74,7 +74,7 @@ static int wbmp_decode_frame(AVCodecContext *avctx, AVFrame *p, else readbits(p->data[0], width, height, p->linesize[0], gb.buffer, gb.buffer_end - gb.buffer); - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; p->pict_type = AV_PICTURE_TYPE_I; *got_frame = 1; diff --git a/arm/android/third_party/ffmpeg/libavcodec/wcmv.c b/arm/android/third_party/ffmpeg/libavcodec/wcmv.c index 097ac8b8..b2413ee9 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/wcmv.c +++ b/arm/android/third_party/ffmpeg/libavcodec/wcmv.c @@ -195,7 +195,10 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, } } - s->prev_frame->key_frame = intra; + if (intra) + s->prev_frame->flags |= AV_FRAME_FLAG_KEY; + else + s->prev_frame->flags &= ~AV_FRAME_FLAG_KEY; s->prev_frame->pict_type = intra ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; if ((ret = av_frame_ref(frame, s->prev_frame)) < 0) diff --git a/arm/android/third_party/ffmpeg/libavcodec/webp.c b/arm/android/third_party/ffmpeg/libavcodec/webp.c index b4357f95..d35cb66f 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/webp.c +++ b/arm/android/third_party/ffmpeg/libavcodec/webp.c @@ -1186,7 +1186,7 @@ static int vp8_lossless_decode_frame(AVCodecContext *avctx, AVFrame *p, *got_frame = 1; p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; ret = data_size; free_and_return: diff --git a/arm/android/third_party/ffmpeg/libavcodec/wmalosslessdec.c b/arm/android/third_party/ffmpeg/libavcodec/wmalosslessdec.c index d545d848..5d1c7ac6 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/wmalosslessdec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/wmalosslessdec.c @@ -1334,7 +1334,11 @@ const FFCodec ff_wmalossless_decoder = { .close = decode_close, FF_CODEC_DECODE_CB(decode_packet), .flush = flush, - .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY, + .p.capabilities = +#if FF_API_SUBFRAMES + AV_CODEC_CAP_SUBFRAMES | +#endif + AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P, AV_SAMPLE_FMT_S32P, diff --git a/arm/android/third_party/ffmpeg/libavcodec/wmaprodec.c b/arm/android/third_party/ffmpeg/libavcodec/wmaprodec.c index 35e9caec..f523f363 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/wmaprodec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/wmaprodec.c @@ -2094,7 +2094,11 @@ const FFCodec ff_wmapro_decoder = { .init = wmapro_decode_init, .close = wmapro_decode_end, FF_CODEC_DECODE_CB(wmapro_decode_packet), - .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1, + .p.capabilities = +#if FF_API_SUBFRAMES + AV_CODEC_CAP_SUBFRAMES | +#endif + AV_CODEC_CAP_DR1, .flush = wmapro_flush, .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_NONE }, @@ -2111,7 +2115,11 @@ const FFCodec ff_xma1_decoder = { .close = xma_decode_end, FF_CODEC_DECODE_CB(xma_decode_packet), .flush = xma_flush, - .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY, + .p.capabilities = +#if FF_API_SUBFRAMES + AV_CODEC_CAP_SUBFRAMES | +#endif + AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY, .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_NONE }, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, @@ -2127,7 +2135,11 @@ const FFCodec ff_xma2_decoder = { .close = xma_decode_end, FF_CODEC_DECODE_CB(xma_decode_packet), .flush = xma_flush, - .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY, + .p.capabilities = +#if FF_API_SUBFRAMES + AV_CODEC_CAP_SUBFRAMES | +#endif + AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY, .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_NONE }, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, diff --git a/arm/android/third_party/ffmpeg/libavcodec/wmavoice.c b/arm/android/third_party/ffmpeg/libavcodec/wmavoice.c index bb98f841..44fda0e2 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/wmavoice.c +++ b/arm/android/third_party/ffmpeg/libavcodec/wmavoice.c @@ -2004,7 +2004,11 @@ const FFCodec ff_wmavoice_decoder = { .init = wmavoice_decode_init, .close = wmavoice_decode_end, FF_CODEC_DECODE_CB(wmavoice_decode_packet), - .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY, + .p.capabilities = +#if FF_API_SUBFRAMES + AV_CODEC_CAP_SUBFRAMES | +#endif + AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, .flush = wmavoice_flush, }; diff --git a/arm/android/third_party/ffmpeg/libavcodec/wnv1.c b/arm/android/third_party/ffmpeg/libavcodec/wnv1.c index 88532ee4..5c57db00 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/wnv1.c +++ b/arm/android/third_party/ffmpeg/libavcodec/wnv1.c @@ -69,7 +69,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, if ((ret = ff_get_buffer(avctx, p, 0)) < 0) return ret; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; if ((ret = init_get_bits8(&gb, buf + 8, buf_size - 8)) < 0) return ret; diff --git a/arm/android/third_party/ffmpeg/libavcodec/x86/cabac.h b/arm/android/third_party/ffmpeg/libavcodec/x86/cabac.h index b046a56a..ce2aefcb 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/x86/cabac.h +++ b/arm/android/third_party/ffmpeg/libavcodec/x86/cabac.h @@ -178,7 +178,7 @@ #if HAVE_7REGS && !BROKEN_COMPILER #define get_cabac_inline get_cabac_inline_x86 static -#if defined(_WIN32) && !defined(_WIN64) && defined(__clang__) +#if ARCH_X86_32 av_noinline #else av_always_inline diff --git a/arm/android/third_party/ffmpeg/libavcodec/xbmdec.c b/arm/android/third_party/ffmpeg/libavcodec/xbmdec.c index a0cc1cb8..ecfc957a 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/xbmdec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/xbmdec.c @@ -130,7 +130,7 @@ static int xbm_decode_frame(AVCodecContext *avctx, AVFrame *p, } } - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; p->pict_type = AV_PICTURE_TYPE_I; *got_frame = 1; diff --git a/arm/android/third_party/ffmpeg/libavcodec/xl.c b/arm/android/third_party/ffmpeg/libavcodec/xl.c index 283cd39a..f008d56e 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/xl.c +++ b/arm/android/third_party/ffmpeg/libavcodec/xl.c @@ -60,7 +60,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, if ((ret = ff_get_buffer(avctx, p, 0)) < 0) return ret; p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; Y = p->data[0]; U = p->data[1]; diff --git a/arm/android/third_party/ffmpeg/libavcodec/xpmdec.c b/arm/android/third_party/ffmpeg/libavcodec/xpmdec.c index 2550afb9..5bc02378 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/xpmdec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/xpmdec.c @@ -422,7 +422,7 @@ static int xpm_decode_frame(AVCodecContext *avctx, AVFrame *p, ptr += mod_strcspn(ptr, ",") + 1; } - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; p->pict_type = AV_PICTURE_TYPE_I; *got_frame = 1; diff --git a/arm/android/third_party/ffmpeg/libavcodec/xwddec.c b/arm/android/third_party/ffmpeg/libavcodec/xwddec.c index 6c5bc44a..f691587b 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/xwddec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/xwddec.c @@ -216,7 +216,7 @@ static int xwd_decode_frame(AVCodecContext *avctx, AVFrame *p, if ((ret = ff_get_buffer(avctx, p, 0)) < 0) return ret; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; p->pict_type = AV_PICTURE_TYPE_I; if (avctx->pix_fmt == AV_PIX_FMT_PAL8) { diff --git a/arm/android/third_party/ffmpeg/libavcodec/y41pdec.c b/arm/android/third_party/ffmpeg/libavcodec/y41pdec.c index b461f349..14e36dc9 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/y41pdec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/y41pdec.c @@ -51,7 +51,7 @@ static int y41p_decode_frame(AVCodecContext *avctx, AVFrame *pic, if ((ret = ff_get_buffer(avctx, pic, 0)) < 0) return ret; - pic->key_frame = 1; + pic->flags |= AV_FRAME_FLAG_KEY; pic->pict_type = AV_PICTURE_TYPE_I; for (i = avctx->height - 1; i >= 0 ; i--) { diff --git a/arm/android/third_party/ffmpeg/libavcodec/ylc.c b/arm/android/third_party/ffmpeg/libavcodec/ylc.c index 29c10f05..c0c4d27c 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/ylc.c +++ b/arm/android/third_party/ffmpeg/libavcodec/ylc.c @@ -427,7 +427,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, } p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; *got_frame = 1; return avpkt->size; diff --git a/arm/android/third_party/ffmpeg/libavcodec/yop.c b/arm/android/third_party/ffmpeg/libavcodec/yop.c index 14244c94..1294c5cc 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/yop.c +++ b/arm/android/third_party/ffmpeg/libavcodec/yop.c @@ -232,7 +232,11 @@ static int yop_decode_frame(AVCodecContext *avctx, AVFrame *rframe, (palette[i + firstcolor] >> 6) & 0x30303; } +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif for (y = 0; y < avctx->height; y += 2) { for (x = 0; x < avctx->width; x += 2) { diff --git a/arm/android/third_party/ffmpeg/libavcodec/yuv4dec.c b/arm/android/third_party/ffmpeg/libavcodec/yuv4dec.c index 15424b19..ad83a212 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/yuv4dec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/yuv4dec.c @@ -46,7 +46,7 @@ static int yuv4_decode_frame(AVCodecContext *avctx, AVFrame *pic, if ((ret = ff_get_buffer(avctx, pic, 0)) < 0) return ret; - pic->key_frame = 1; + pic->flags |= AV_FRAME_FLAG_KEY; pic->pict_type = AV_PICTURE_TYPE_I; y = pic->data[0]; diff --git a/arm/android/third_party/ffmpeg/libavcodec/zerocodec.c b/arm/android/third_party/ffmpeg/libavcodec/zerocodec.c index 42fb24ff..6c3bcebc 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/zerocodec.c +++ b/arm/android/third_party/ffmpeg/libavcodec/zerocodec.c @@ -40,7 +40,7 @@ static int zerocodec_decode_frame(AVCodecContext *avctx, AVFrame *pic, int i, j, zret, ret; if (avpkt->flags & AV_PKT_FLAG_KEY) { - pic->key_frame = 1; + pic->flags |= AV_FRAME_FLAG_KEY; pic->pict_type = AV_PICTURE_TYPE_I; } else { if (!prev) { @@ -50,7 +50,7 @@ static int zerocodec_decode_frame(AVCodecContext *avctx, AVFrame *pic, prev += (avctx->height - 1) * prev_pic->linesize[0]; - pic->key_frame = 0; + pic->flags &= ~AV_FRAME_FLAG_KEY; pic->pict_type = AV_PICTURE_TYPE_P; } diff --git a/arm/android/third_party/ffmpeg/libavcodec/zmbv.c b/arm/android/third_party/ffmpeg/libavcodec/zmbv.c index 0b448518..d309a861 100644 --- a/arm/android/third_party/ffmpeg/libavcodec/zmbv.c +++ b/arm/android/third_party/ffmpeg/libavcodec/zmbv.c @@ -559,11 +559,11 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, return ret; if (c->flags & ZMBV_KEYFRAME) { - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_I; zmbv_decode_intra(c); } else { - frame->key_frame = 0; + frame->flags &= ~AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_P; if (c->decomp_len < 2LL * ((c->width + c->bw - 1) / c->bw) * ((c->height + c->bh - 1) / c->bh)) return AVERROR_INVALIDDATA; diff --git a/arm/android/third_party/ffmpeg/libavutil/frame.c b/arm/android/third_party/ffmpeg/libavutil/frame.c index c905e8d6..b6cee2d8 100644 --- a/arm/android/third_party/ffmpeg/libavutil/frame.c +++ b/arm/android/third_party/ffmpeg/libavutil/frame.c @@ -55,7 +55,6 @@ FF_DISABLE_DEPRECATION_WARNINGS FF_ENABLE_DEPRECATION_WARNINGS #endif frame->time_base = (AVRational){ 0, 1 }; - frame->key_frame = 1; frame->sample_aspect_ratio = (AVRational){ 0, 1 }; frame->format = -1; /* unknown */ frame->extended_data = frame->data; @@ -265,7 +264,11 @@ static int frame_copy_props(AVFrame *dst, const AVFrame *src, int force_copy) { int ret; +#if FF_API_FRAME_KEY +FF_DISABLE_DEPRECATION_WARNINGS dst->key_frame = src->key_frame; +FF_ENABLE_DEPRECATION_WARNINGS +#endif dst->pict_type = src->pict_type; dst->sample_aspect_ratio = src->sample_aspect_ratio; dst->crop_top = src->crop_top; @@ -275,9 +278,17 @@ static int frame_copy_props(AVFrame *dst, const AVFrame *src, int force_copy) dst->pts = src->pts; dst->duration = src->duration; dst->repeat_pict = src->repeat_pict; +#if FF_API_INTERLACED_FRAME +FF_DISABLE_DEPRECATION_WARNINGS dst->interlaced_frame = src->interlaced_frame; dst->top_field_first = src->top_field_first; +FF_ENABLE_DEPRECATION_WARNINGS +#endif +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS dst->palette_has_changed = src->palette_has_changed; +FF_ENABLE_DEPRECATION_WARNINGS +#endif dst->sample_rate = src->sample_rate; dst->opaque = src->opaque; dst->pkt_dts = src->pkt_dts; @@ -468,6 +479,133 @@ fail: return ret; } +int av_frame_replace(AVFrame *dst, const AVFrame *src) +{ + int ret = 0; + + if (dst == src) + return AVERROR(EINVAL); + + if (!src->buf[0]) { + av_frame_unref(dst); + + /* duplicate the frame data if it's not refcounted */ + if ( src->data[0] || src->data[1] + || src->data[2] || src->data[3]) + return av_frame_ref(dst, src); + + ret = frame_copy_props(dst, src, 0); + if (ret < 0) + goto fail; + } + + dst->format = src->format; + dst->width = src->width; + dst->height = src->height; + dst->nb_samples = src->nb_samples; +#if FF_API_OLD_CHANNEL_LAYOUT +FF_DISABLE_DEPRECATION_WARNINGS + dst->channels = src->channels; + dst->channel_layout = src->channel_layout; + if (!av_channel_layout_check(&src->ch_layout)) { + av_channel_layout_uninit(&dst->ch_layout); + if (src->channel_layout) + av_channel_layout_from_mask(&dst->ch_layout, src->channel_layout); + else { + dst->ch_layout.nb_channels = src->channels; + dst->ch_layout.order = AV_CHANNEL_ORDER_UNSPEC; + } + } else { +#endif + ret = av_channel_layout_copy(&dst->ch_layout, &src->ch_layout); + if (ret < 0) + goto fail; +#if FF_API_OLD_CHANNEL_LAYOUT + } +FF_ENABLE_DEPRECATION_WARNINGS +#endif + + wipe_side_data(dst); + av_dict_free(&dst->metadata); + ret = frame_copy_props(dst, src, 0); + if (ret < 0) + goto fail; + + /* replace the buffers */ + for (int i = 0; i < FF_ARRAY_ELEMS(src->buf); i++) { + ret = av_buffer_replace(&dst->buf[i], src->buf[i]); + if (ret < 0) + goto fail; + } + + if (src->extended_buf) { + if (dst->nb_extended_buf != src->nb_extended_buf) { + int nb_extended_buf = FFMIN(dst->nb_extended_buf, src->nb_extended_buf); + void *tmp; + + for (int i = nb_extended_buf; i < dst->nb_extended_buf; i++) + av_buffer_unref(&dst->extended_buf[i]); + + tmp = av_realloc_array(dst->extended_buf, sizeof(*dst->extended_buf), + src->nb_extended_buf); + if (!tmp) { + ret = AVERROR(ENOMEM); + goto fail; + } + dst->extended_buf = tmp; + dst->nb_extended_buf = src->nb_extended_buf; + + memset(&dst->extended_buf[nb_extended_buf], 0, + (src->nb_extended_buf - nb_extended_buf) * sizeof(*dst->extended_buf)); + } + + for (int i = 0; i < src->nb_extended_buf; i++) { + ret = av_buffer_replace(&dst->extended_buf[i], src->extended_buf[i]); + if (ret < 0) + goto fail; + } + } else if (dst->extended_buf) { + for (int i = 0; i < dst->nb_extended_buf; i++) + av_buffer_unref(&dst->extended_buf[i]); + av_freep(&dst->extended_buf); + } + + ret = av_buffer_replace(&dst->hw_frames_ctx, src->hw_frames_ctx); + if (ret < 0) + goto fail; + + if (dst->extended_data != dst->data) + av_freep(&dst->extended_data); + + if (src->extended_data != src->data) { + int ch = dst->ch_layout.nb_channels; + + if (!ch) { + ret = AVERROR(EINVAL); + goto fail; + } + + if (ch > SIZE_MAX / sizeof(*dst->extended_data)) + goto fail; + + dst->extended_data = av_memdup(src->extended_data, sizeof(*dst->extended_data) * ch); + if (!dst->extended_data) { + ret = AVERROR(ENOMEM); + goto fail; + } + } else + dst->extended_data = dst->data; + + memcpy(dst->data, src->data, sizeof(src->data)); + memcpy(dst->linesize, src->linesize, sizeof(src->linesize)); + + return 0; + +fail: + av_frame_unref(dst); + return ret; +} + AVFrame *av_frame_clone(const AVFrame *src) { AVFrame *ret = av_frame_alloc(); @@ -600,7 +738,7 @@ int av_frame_copy_props(AVFrame *dst, const AVFrame *src) return frame_copy_props(dst, src, 1); } -AVBufferRef *av_frame_get_plane_buffer(AVFrame *frame, int plane) +AVBufferRef *av_frame_get_plane_buffer(const AVFrame *frame, int plane) { uint8_t *data; int planes; diff --git a/arm/android/third_party/ffmpeg/libavutil/frame.h b/arm/android/third_party/ffmpeg/libavutil/frame.h index 7be1b87c..575ded3c 100644 --- a/arm/android/third_party/ffmpeg/libavutil/frame.h +++ b/arm/android/third_party/ffmpeg/libavutil/frame.h @@ -416,10 +416,15 @@ typedef struct AVFrame { */ int format; +#if FF_API_FRAME_KEY /** * 1 -> keyframe, 0-> not + * + * @deprecated Use AV_FRAME_FLAG_KEY instead */ + attribute_deprecated int key_frame; +#endif /** * Picture type of the frame. @@ -486,25 +491,50 @@ typedef struct AVFrame { void *opaque; /** - * When decoding, this signals how much the picture must be delayed. - * extra_delay = repeat_pict / (2*fps) + * Number of fields in this frame which should be repeated, i.e. the total + * duration of this frame should be repeat_pict + 2 normal field durations. + * + * For interlaced frames this field may be set to 1, which signals that this + * frame should be presented as 3 fields: beginning with the first field (as + * determined by AV_FRAME_FLAG_TOP_FIELD_FIRST being set or not), followed + * by the second field, and then the first field again. + * + * For progressive frames this field may be set to a multiple of 2, which + * signals that this frame's duration should be (repeat_pict + 2) / 2 + * normal frame durations. + * + * @note This field is computed from MPEG2 repeat_first_field flag and its + * associated flags, H.264 pic_struct from picture timing SEI, and + * their analogues in other codecs. Typically it should only be used when + * higher-layer timing information is not available. */ int repeat_pict; +#if FF_API_INTERLACED_FRAME /** * The content of the picture is interlaced. + * + * @deprecated Use AV_FRAME_FLAG_INTERLACED instead */ + attribute_deprecated int interlaced_frame; /** * If the content is interlaced, is top field displayed first. + * + * @deprecated Use AV_FRAME_FLAG_TOP_FIELD_FIRST instead */ + attribute_deprecated int top_field_first; +#endif +#if FF_API_PALETTE_HAS_CHANGED /** * Tell user application that palette has changed from previous frame. */ + attribute_deprecated int palette_has_changed; +#endif #if FF_API_REORDERED_OPAQUE /** @@ -584,10 +614,23 @@ typedef struct AVFrame { * The frame data may be corrupted, e.g. due to decoding errors. */ #define AV_FRAME_FLAG_CORRUPT (1 << 0) +/** + * A flag to mark frames that are keyframes. + */ +#define AV_FRAME_FLAG_KEY (1 << 1) /** * A flag to mark the frames which need to be decoded, but shouldn't be output. */ #define AV_FRAME_FLAG_DISCARD (1 << 2) +/** + * A flag to mark frames whose content is interlaced. + */ +#define AV_FRAME_FLAG_INTERLACED (1 << 3) +/** + * A flag to mark frames where the top field is displayed first if the content + * is interlaced. + */ +#define AV_FRAME_FLAG_TOP_FIELD_FIRST (1 << 4) /** * @} */ @@ -795,6 +838,19 @@ void av_frame_free(AVFrame **frame); */ int av_frame_ref(AVFrame *dst, const AVFrame *src); +/** + * Ensure the destination frame refers to the same data described by the source + * frame, either by creating a new reference for each AVBufferRef from src if + * they differ from those in dst, by allocating new buffers and copying data if + * src is not reference counted, or by unrefencing it if src is empty. + * + * Frame properties on dst will be replaced by those from src. + * + * @return 0 on success, a negative AVERROR on error. On error, dst is + * unreferenced. + */ +int av_frame_replace(AVFrame *dst, const AVFrame *src); + /** * Create a new frame that references the same data as src. * @@ -903,7 +959,7 @@ int av_frame_copy_props(AVFrame *dst, const AVFrame *src); * @return the buffer reference that contains the plane or NULL if the input * frame is not valid. */ -AVBufferRef *av_frame_get_plane_buffer(AVFrame *frame, int plane); +AVBufferRef *av_frame_get_plane_buffer(const AVFrame *frame, int plane); /** * Add a new side data to a frame. diff --git a/arm/android/third_party/ffmpeg/libavutil/hdr_dynamic_metadata.c b/arm/android/third_party/ffmpeg/libavutil/hdr_dynamic_metadata.c index d458788c..7033f060 100644 --- a/arm/android/third_party/ffmpeg/libavutil/hdr_dynamic_metadata.c +++ b/arm/android/third_party/ffmpeg/libavutil/hdr_dynamic_metadata.c @@ -18,14 +18,13 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "avassert.h" #include "hdr_dynamic_metadata.h" #include "mem.h" #include "libavcodec/defs.h" #include "libavcodec/get_bits.h" #include "libavcodec/put_bits.h" -#define T35_PAYLOAD_MAX_SIZE 907 - static const int64_t luminance_den = 1; static const int32_t peak_luminance_den = 15; static const int64_t rgb_den = 100000; @@ -62,14 +61,14 @@ AVDynamicHDRPlus *av_dynamic_hdr_plus_create_side_data(AVFrame *frame) int av_dynamic_hdr_plus_from_t35(AVDynamicHDRPlus *s, const uint8_t *data, size_t size) { - uint8_t padded_buf[T35_PAYLOAD_MAX_SIZE + AV_INPUT_BUFFER_PADDING_SIZE]; + uint8_t padded_buf[AV_HDR_PLUS_MAX_PAYLOAD_SIZE + AV_INPUT_BUFFER_PADDING_SIZE]; GetBitContext gbc, *gb = &gbc; int ret; if (!s) return AVERROR(ENOMEM); - if (size > T35_PAYLOAD_MAX_SIZE) + if (size > AV_HDR_PLUS_MAX_PAYLOAD_SIZE) return AVERROR(EINVAL); memcpy(padded_buf, data, size); @@ -243,8 +242,10 @@ int av_dynamic_hdr_plus_to_t35(const AVDynamicHDRPlus *s, uint8_t **data, size_t size_t size_bits, size_bytes; PutBitContext pbc, *pb = &pbc; - if (!s || !data) + if (!s) return AVERROR(EINVAL); + if ((!data || *data) && !size) + return AVERROR(EINVAL); /** * Buffer size per CTA-861-H p.253-254: @@ -296,9 +297,20 @@ int av_dynamic_hdr_plus_to_t35(const AVDynamicHDRPlus *s, uint8_t **data, size_t size_bytes = (size_bits + 7) / 8; - buf = av_mallocz(size_bytes); - if (!buf) - return AVERROR(ENOMEM); + av_assert0(size_bytes <= AV_HDR_PLUS_MAX_PAYLOAD_SIZE); + + if (!data) { + *size = size_bytes; + return 0; + } else if (*data) { + if (*size < size_bytes) + return AVERROR_BUFFER_TOO_SMALL; + buf = *data; + } else { + buf = av_malloc(size_bytes); + if (!buf) + return AVERROR(ENOMEM); + } init_put_bits(pb, buf, size_bytes); diff --git a/arm/android/third_party/ffmpeg/libavutil/hdr_dynamic_metadata.h b/arm/android/third_party/ffmpeg/libavutil/hdr_dynamic_metadata.h index 771bb8f4..09e9d8bb 100644 --- a/arm/android/third_party/ffmpeg/libavutil/hdr_dynamic_metadata.h +++ b/arm/android/third_party/ffmpeg/libavutil/hdr_dynamic_metadata.h @@ -353,13 +353,21 @@ AVDynamicHDRPlus *av_dynamic_hdr_plus_create_side_data(AVFrame *frame); int av_dynamic_hdr_plus_from_t35(AVDynamicHDRPlus *s, const uint8_t *data, size_t size); +#define AV_HDR_PLUS_MAX_PAYLOAD_SIZE 907 + /** * Serialize dynamic HDR10+ metadata to a user data registered ITU-T T.35 buffer, * excluding the first 48 bytes of the header, and beginning with the application mode. * @param s A pointer containing the decoded AVDynamicHDRPlus structure. - * @param data A pointer to a byte buffer to be allocated and filled - * with the serialized metadata. - * @param size A pointer to a size to be set to the returned buffer's size (optional). + * @param data[in,out] A pointer to pointer to a byte buffer to be filled with the + * serialized metadata. + * If *data is NULL, a buffer be will be allocated and a pointer to + * it stored in its place. The caller assumes ownership of the buffer. + * May be NULL, in which case the function will only store the + * required buffer size in *size. + * @param size[in,out] A pointer to a size to be set to the returned buffer's size. + * If *data is not NULL, *size must contain the size of the input + * buffer. May be NULL only if *data is NULL. * * @return >= 0 on success. Otherwise, returns the appropriate AVERROR. */ diff --git a/arm/android/third_party/ffmpeg/libavutil/hwcontext_qsv.c b/arm/android/third_party/ffmpeg/libavutil/hwcontext_qsv.c index 67804288..4ed4242d 100644 --- a/arm/android/third_party/ffmpeg/libavutil/hwcontext_qsv.c +++ b/arm/android/third_party/ffmpeg/libavutil/hwcontext_qsv.c @@ -2126,8 +2126,6 @@ static int qsv_device_create(AVHWDeviceContext *ctx, const char *device, "\"%s\".\n", e->value); return AVERROR(EINVAL); } - } else if (CONFIG_VAAPI) { - child_device_type = AV_HWDEVICE_TYPE_VAAPI; #if QSV_ONEVPL } else if (CONFIG_D3D11VA) { // Use D3D11 by default if d3d11va is enabled av_log(ctx, AV_LOG_VERBOSE, @@ -2147,11 +2145,23 @@ static int qsv_device_create(AVHWDeviceContext *ctx, const char *device, } else if (CONFIG_D3D11VA) { child_device_type = AV_HWDEVICE_TYPE_D3D11VA; #endif + } else if (CONFIG_VAAPI) { + child_device_type = AV_HWDEVICE_TYPE_VAAPI; } else { av_log(ctx, AV_LOG_ERROR, "No supported child device type is enabled\n"); return AVERROR(ENOSYS); } +#if CONFIG_VAAPI && defined(_WIN32) + /* AV_HWDEVICE_TYPE_VAAPI on Windows/Libva-win32 not supported */ + /* Reject user specified child_device_type or CONFIG_VAAPI on Windows */ + if (child_device_type == AV_HWDEVICE_TYPE_VAAPI) { + av_log(ctx, AV_LOG_ERROR, "VAAPI child device type not supported for oneVPL on Windows" + "\"%s\".\n", e->value); + return AVERROR(EINVAL); + } +#endif + child_device_opts = NULL; switch (child_device_type) { #if CONFIG_VAAPI diff --git a/arm/android/third_party/ffmpeg/libavutil/hwcontext_vaapi.c b/arm/android/third_party/ffmpeg/libavutil/hwcontext_vaapi.c index 90c2c191..6c3a227d 100644 --- a/arm/android/third_party/ffmpeg/libavutil/hwcontext_vaapi.c +++ b/arm/android/third_party/ffmpeg/libavutil/hwcontext_vaapi.c @@ -18,6 +18,15 @@ #include "config.h" +#if HAVE_VAAPI_WIN32 +# include +#define COBJMACROS +# include +# include +# include "compat/w32dlfcn.h" +# include +typedef HRESULT (WINAPI *PFN_CREATE_DXGI_FACTORY)(REFIID riid, void **ppFactory); +#endif #if HAVE_VAAPI_X11 # include #endif @@ -1663,7 +1672,7 @@ static int vaapi_device_create(AVHWDeviceContext *ctx, const char *device, VAAPIDevicePriv *priv; VADisplay display = NULL; const AVDictionaryEntry *ent; - int try_drm, try_x11, try_all; + int try_drm, try_x11, try_win32, try_all; priv = av_mallocz(sizeof(*priv)); if (!priv) @@ -1676,11 +1685,13 @@ static int vaapi_device_create(AVHWDeviceContext *ctx, const char *device, ent = av_dict_get(opts, "connection_type", NULL, 0); if (ent) { - try_all = try_drm = try_x11 = 0; + try_all = try_drm = try_x11 = try_win32 = 0; if (!strcmp(ent->value, "drm")) { try_drm = 1; } else if (!strcmp(ent->value, "x11")) { try_x11 = 1; + } else if (!strcmp(ent->value, "win32")) { + try_win32 = 1; } else { av_log(ctx, AV_LOG_ERROR, "Invalid connection type %s.\n", ent->value); @@ -1690,6 +1701,7 @@ static int vaapi_device_create(AVHWDeviceContext *ctx, const char *device, try_all = 1; try_drm = HAVE_VAAPI_DRM; try_x11 = HAVE_VAAPI_X11; + try_win32 = HAVE_VAAPI_WIN32; } #if HAVE_VAAPI_DRM @@ -1797,6 +1809,68 @@ static int vaapi_device_create(AVHWDeviceContext *ctx, const char *device, } #endif +#if HAVE_VAAPI_WIN32 + if (!display && try_win32) { + // Try to create a display from the specified device, if any. + if (!device) { + display = vaGetDisplayWin32(NULL); + } else { + IDXGIFactory2 *pDXGIFactory = NULL; + IDXGIAdapter *pAdapter = NULL; +#if !HAVE_UWP + HANDLE dxgi = dlopen("dxgi.dll", 0); + if (!dxgi) { + av_log(ctx, AV_LOG_ERROR, "Failed to load dxgi.dll\n"); + return AVERROR_UNKNOWN; + } + PFN_CREATE_DXGI_FACTORY pfnCreateDXGIFactory = + (PFN_CREATE_DXGI_FACTORY)dlsym(dxgi, "CreateDXGIFactory"); + if (!pfnCreateDXGIFactory) { + av_log(ctx, AV_LOG_ERROR, "CreateDXGIFactory load failed\n"); + dlclose(dxgi); + return AVERROR_UNKNOWN; + } +#else + // In UWP (which lacks LoadLibrary), CreateDXGIFactory isn't + // available, only CreateDXGIFactory1 + PFN_CREATE_DXGI_FACTORY pfnCreateDXGIFactory = + (PFN_CREATE_DXGI_FACTORY)CreateDXGIFactory1; +#endif + if (SUCCEEDED(pfnCreateDXGIFactory(&IID_IDXGIFactory2, + (void **)&pDXGIFactory))) { + int adapter = atoi(device); + if (SUCCEEDED(IDXGIFactory2_EnumAdapters(pDXGIFactory, + adapter, + &pAdapter))) { + DXGI_ADAPTER_DESC desc; + if (SUCCEEDED(IDXGIAdapter2_GetDesc(pAdapter, &desc))) { + av_log(ctx, AV_LOG_INFO, + "Using device %04x:%04x (%ls) - LUID %lu %ld.\n", + desc.VendorId, desc.DeviceId, desc.Description, + desc.AdapterLuid.LowPart, + desc.AdapterLuid.HighPart); + display = vaGetDisplayWin32(&desc.AdapterLuid); + } + IDXGIAdapter_Release(pAdapter); + } + IDXGIFactory2_Release(pDXGIFactory); + } +#if !HAVE_UWP + dlclose(dxgi); +#endif + } + + if (!display) { + av_log(ctx, AV_LOG_ERROR, "Cannot open a VA display " + "from Win32 display.\n"); + return AVERROR_UNKNOWN; + } + + av_log(ctx, AV_LOG_VERBOSE, "Opened VA display via " + "Win32 display.\n"); + } +#endif + if (!display) { if (device) av_log(ctx, AV_LOG_ERROR, "No VA display found for " diff --git a/arm/android/third_party/ffmpeg/libavutil/internal.h b/arm/android/third_party/ffmpeg/libavutil/internal.h index 941830c6..a71c39e0 100644 --- a/arm/android/third_party/ffmpeg/libavutil/internal.h +++ b/arm/android/third_party/ffmpeg/libavutil/internal.h @@ -40,7 +40,6 @@ #include #include "config.h" #include "attributes.h" -#include "timer.h" #include "macros.h" #include "pixfmt.h" diff --git a/arm/android/third_party/ffmpeg/libavutil/mathematics.h b/arm/android/third_party/ffmpeg/libavutil/mathematics.h index e4aff1e9..3e7b52ee 100644 --- a/arm/android/third_party/ffmpeg/libavutil/mathematics.h +++ b/arm/android/third_party/ffmpeg/libavutil/mathematics.h @@ -36,30 +36,81 @@ #ifndef M_E #define M_E 2.7182818284590452354 /* e */ #endif +#ifndef M_Ef +#define M_Ef 2.7182818284590452354f /* e */ +#endif #ifndef M_LN2 #define M_LN2 0.69314718055994530942 /* log_e 2 */ #endif +#ifndef M_LN2f +#define M_LN2f 0.69314718055994530942f /* log_e 2 */ +#endif #ifndef M_LN10 #define M_LN10 2.30258509299404568402 /* log_e 10 */ #endif +#ifndef M_LN10f +#define M_LN10f 2.30258509299404568402f /* log_e 10 */ +#endif #ifndef M_LOG2_10 #define M_LOG2_10 3.32192809488736234787 /* log_2 10 */ #endif +#ifndef M_LOG2_10f +#define M_LOG2_10f 3.32192809488736234787f /* log_2 10 */ +#endif #ifndef M_PHI #define M_PHI 1.61803398874989484820 /* phi / golden ratio */ #endif +#ifndef M_PHIf +#define M_PHIf 1.61803398874989484820f /* phi / golden ratio */ +#endif #ifndef M_PI #define M_PI 3.14159265358979323846 /* pi */ #endif +#ifndef M_PIf +#define M_PIf 3.14159265358979323846f /* pi */ +#endif #ifndef M_PI_2 #define M_PI_2 1.57079632679489661923 /* pi/2 */ #endif +#ifndef M_PI_2f +#define M_PI_2f 1.57079632679489661923f /* pi/2 */ +#endif +#ifndef M_PI_4 +#define M_PI_4 0.78539816339744830962 /* pi/4 */ +#endif +#ifndef M_PI_4f +#define M_PI_4f 0.78539816339744830962f /* pi/4 */ +#endif +#ifndef M_1_PI +#define M_1_PI 0.31830988618379067154 /* 1/pi */ +#endif +#ifndef M_1_PIf +#define M_1_PIf 0.31830988618379067154f /* 1/pi */ +#endif +#ifndef M_2_PI +#define M_2_PI 0.63661977236758134308 /* 2/pi */ +#endif +#ifndef M_2_PIf +#define M_2_PIf 0.63661977236758134308f /* 2/pi */ +#endif +#ifndef M_2_SQRTPI +#define M_2_SQRTPI 1.12837916709551257390 /* 2/sqrt(pi) */ +#endif +#ifndef M_2_SQRTPIf +#define M_2_SQRTPIf 1.12837916709551257390f /* 2/sqrt(pi) */ +#endif #ifndef M_SQRT1_2 #define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */ #endif +#ifndef M_SQRT1_2f +#define M_SQRT1_2f 0.70710678118654752440f /* 1/sqrt(2) */ +#endif #ifndef M_SQRT2 #define M_SQRT2 1.41421356237309504880 /* sqrt(2) */ #endif +#ifndef M_SQRT2f +#define M_SQRT2f 1.41421356237309504880f /* sqrt(2) */ +#endif #ifndef NAN #define NAN av_int2float(0x7fc00000) #endif diff --git a/arm/android/third_party/ffmpeg/libavutil/riscv/bswap.h b/arm/android/third_party/ffmpeg/libavutil/riscv/bswap.h index de1429c0..ce75de97 100644 --- a/arm/android/third_party/ffmpeg/libavutil/riscv/bswap.h +++ b/arm/android/third_party/ffmpeg/libavutil/riscv/bswap.h @@ -23,52 +23,10 @@ #include "config.h" #include "libavutil/attributes.h" -#if defined (__riscv_zbb) && (__riscv_zbb > 0) && HAVE_INLINE_ASM +#if defined (__GNUC__) || defined (__clang__) +#define av_bswap16 __builtin_bswap16 +#define av_bswap32 __builtin_bswap32 +#define av_bswap64 __builtin_bswap64 +#endif -static av_always_inline av_const uintptr_t av_bswap_xlen(uintptr_t x) -{ - uintptr_t y; - - __asm__("rev8 %0, %1" : "=r" (y) : "r" (x)); - return y; -} - -#define av_bswap16 av_bswap16 - -static av_always_inline av_const uint_fast16_t av_bswap16(uint_fast16_t x) -{ - return av_bswap_xlen(x) >> (__riscv_xlen - 16); -} - -#if (__riscv_xlen == 32) -#define av_bswap32 av_bswap_xlen -#define av_bswap64 av_bswap64 - -static av_always_inline av_const uint64_t av_bswap64(uint64_t x) -{ - return (((uint64_t)av_bswap32(x)) << 32) | av_bswap32(x >> 32); -} - -#else -#define av_bswap32 av_bswap32 - -static av_always_inline av_const uint_fast32_t av_bswap32(uint_fast32_t x) -{ - return av_bswap_xlen(x) >> (__riscv_xlen - 32); -} - -#if (__riscv_xlen == 64) -#define av_bswap64 av_bswap_xlen - -#else -#define av_bswap64 av_bswap64 - -static av_always_inline av_const uint_fast64_t av_bswap64(uint_fast64_t x) -{ - return av_bswap_xlen(x) >> (__riscv_xlen - 64); -} - -#endif /* __riscv_xlen > 64 */ -#endif /* __riscv_xlen > 32 */ -#endif /* __riscv_zbb */ #endif /* AVUTIL_RISCV_BSWAP_H */ diff --git a/arm/android/third_party/ffmpeg/libavutil/riscv/intmath.h b/arm/android/third_party/ffmpeg/libavutil/riscv/intmath.h index 45bce9a0..ae9ee777 100644 --- a/arm/android/third_party/ffmpeg/libavutil/riscv/intmath.h +++ b/arm/android/third_party/ffmpeg/libavutil/riscv/intmath.h @@ -69,35 +69,13 @@ static av_always_inline av_const int av_clip_intp2_rvi(int a, int p) return b; } -#if defined (__riscv_zbb) && (__riscv_zbb > 0) && HAVE_INLINE_ASM - -#define av_popcount av_popcount_rvb -static av_always_inline av_const int av_popcount_rvb(uint32_t x) -{ - int ret; - +#if defined (__GNUC__) || defined (__clang__) +#define av_popcount __builtin_popcount #if (__riscv_xlen >= 64) - __asm__ ("cpopw %0, %1\n" : "=r" (ret) : "r" (x)); +#define av_popcount64 __builtin_popcountl #else - __asm__ ("cpop %0, %1\n" : "=r" (ret) : "r" (x)); +#define av_popcount64 __builtin_popcountll #endif - return ret; -} - -#if (__riscv_xlen >= 64) -#define av_popcount64 av_popcount64_rvb -static av_always_inline av_const int av_popcount64_rvb(uint64_t x) -{ - int ret; - -#if (__riscv_xlen >= 128) - __asm__ ("cpopd %0, %1\n" : "=r" (ret) : "r" (x)); -#else - __asm__ ("cpop %0, %1\n" : "=r" (ret) : "r" (x)); #endif - return ret; -} -#endif /* __riscv_xlen >= 64 */ -#endif /* __riscv_zbb */ #endif /* AVUTIL_RISCV_INTMATH_H */ diff --git a/arm/android/third_party/ffmpeg/libavutil/tests/hwdevice.c b/arm/android/third_party/ffmpeg/libavutil/tests/hwdevice.c index 7eb355c9..c5758661 100644 --- a/arm/android/third_party/ffmpeg/libavutil/tests/hwdevice.c +++ b/arm/android/third_party/ffmpeg/libavutil/tests/hwdevice.c @@ -140,7 +140,7 @@ static const struct { { AV_HWDEVICE_TYPE_OPENCL, { "0.0", "0.1", "1.0", "1.1" } }, { AV_HWDEVICE_TYPE_VAAPI, - { "/dev/dri/renderD128", "/dev/dri/renderD129", ":0" } }, + { "/dev/dri/renderD128", "/dev/dri/renderD129", ":0", "0", "1" } }, }; static int test_device_type(enum AVHWDeviceType type) diff --git a/arm/android/third_party/ffmpeg/libavutil/tx_priv.h b/arm/android/third_party/ffmpeg/libavutil/tx_priv.h index 72f336ee..d5ff8e14 100644 --- a/arm/android/third_party/ffmpeg/libavutil/tx_priv.h +++ b/arm/android/third_party/ffmpeg/libavutil/tx_priv.h @@ -102,6 +102,12 @@ typedef void TXComplex; #define FOLD(a, b) ((a) + (b)) +#define BF(x, y, a, b) \ + do { \ + x = (a) - (b); \ + y = (a) + (b); \ + } while (0) + #elif defined(TX_INT32) /* Properly rounds the result */ @@ -132,14 +138,14 @@ typedef void TXComplex; #define FOLD(x, y) ((int32_t)((x) + (unsigned)(y) + 32) >> 6) -#endif /* TX_INT32 */ - #define BF(x, y, a, b) \ do { \ - x = (a) - (b); \ - y = (a) + (b); \ + x = (a) - (unsigned)(b); \ + y = (a) + (unsigned)(b); \ } while (0) +#endif /* TX_INT32 */ + #define CMUL3(c, a, b) CMUL((c).re, (c).im, (a).re, (a).im, (b).re, (b).im) /* Codelet flags, used to pick codelets. Must be a superset of enum AVTXFlags, diff --git a/arm/android/third_party/ffmpeg/libavutil/version.h b/arm/android/third_party/ffmpeg/libavutil/version.h index a232381b..8c7ea1a4 100644 --- a/arm/android/third_party/ffmpeg/libavutil/version.h +++ b/arm/android/third_party/ffmpeg/libavutil/version.h @@ -79,7 +79,7 @@ */ #define LIBAVUTIL_VERSION_MAJOR 58 -#define LIBAVUTIL_VERSION_MINOR 5 +#define LIBAVUTIL_VERSION_MINOR 9 #define LIBAVUTIL_VERSION_MICRO 100 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ @@ -115,6 +115,9 @@ #define FF_API_FRAME_PICTURE_NUMBER (LIBAVUTIL_VERSION_MAJOR < 59) #define FF_API_HDR_VIVID_THREE_SPLINE (LIBAVUTIL_VERSION_MAJOR < 59) #define FF_API_FRAME_PKT (LIBAVUTIL_VERSION_MAJOR < 59) +#define FF_API_INTERLACED_FRAME (LIBAVUTIL_VERSION_MAJOR < 59) +#define FF_API_FRAME_KEY (LIBAVUTIL_VERSION_MAJOR < 59) +#define FF_API_PALETTE_HAS_CHANGED (LIBAVUTIL_VERSION_MAJOR < 59) /** * @} diff --git a/arm/android/third_party/ffmpeg/libavutil/wchar_filename.h b/arm/android/third_party/ffmpeg/libavutil/wchar_filename.h index 9a04a069..fbc0a551 100644 --- a/arm/android/third_party/ffmpeg/libavutil/wchar_filename.h +++ b/arm/android/third_party/ffmpeg/libavutil/wchar_filename.h @@ -32,7 +32,8 @@ static inline int utf8towchar(const char *filename_utf8, wchar_t **filename_w) num_chars = MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, filename_utf8, -1, NULL, 0); if (num_chars <= 0) { *filename_w = NULL; - return 0; + errno = EINVAL; + return -1; } *filename_w = (wchar_t *)av_calloc(num_chars, sizeof(wchar_t)); if (!*filename_w) { @@ -52,7 +53,8 @@ static inline int wchartocp(unsigned int code_page, const wchar_t *filename_w, NULL, 0, NULL, NULL); if (num_chars <= 0) { *filename = NULL; - return 0; + errno = EINVAL; + return -1; } *filename = (char*)av_malloc_array(num_chars, sizeof *filename); if (!*filename) { diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/android/arm-neon/config.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/android/arm-neon/config.h index 3af8cb51..2f8b5417 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/android/arm-neon/config.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/android/arm-neon/config.h @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/android/arm-neon/config_components.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/android/arm-neon/config_components.h index 9c6d1229..c06a0e4c 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/android/arm-neon/config_components.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/android/arm-neon/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/android/arm-neon/libavutil/ffversion.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/android/arm-neon/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/android/arm-neon/libavutil/ffversion.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/android/arm-neon/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/android/arm64/config.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/android/arm64/config.h index df04fd3b..675e3425 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/android/arm64/config.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/android/arm64/config.h @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/android/arm64/config_components.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/android/arm64/config_components.h index 9c6d1229..c06a0e4c 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/android/arm64/config_components.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/android/arm64/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/android/arm64/libavutil/ffversion.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/android/arm64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/android/arm64/libavutil/ffversion.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/android/arm64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/android/ia32/config.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/android/ia32/config.h index 41b24690..729d4f8e 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/android/ia32/config.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/android/ia32/config.h @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/android/ia32/config_components.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/android/ia32/config_components.h index 9c6d1229..c06a0e4c 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/android/ia32/config_components.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/android/ia32/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/android/ia32/libavutil/ffversion.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/android/ia32/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/android/ia32/libavutil/ffversion.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/android/ia32/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/android/x64/config.asm b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/android/x64/config.asm index ae8d78e4..a06dae35 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/android/x64/config.asm +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/android/x64/config.asm @@ -329,6 +329,7 @@ %define HAVE_BCRYPT 0 %define HAVE_VAAPI_DRM 0 %define HAVE_VAAPI_X11 0 +%define HAVE_VAAPI_WIN32 0 %define HAVE_VDPAU_X11 0 %define HAVE_PTHREADS 1 %define HAVE_OS2THREADS 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/android/x64/config.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/android/x64/config.h index c5d8b813..b8bb12f7 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/android/x64/config.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/android/x64/config.h @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/android/x64/config_components.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/android/x64/config_components.h index 9c6d1229..c06a0e4c 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/android/x64/config_components.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/android/x64/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/android/x64/libavutil/ffversion.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/android/x64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/android/x64/libavutil/ffversion.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/android/x64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/ios/arm64/config.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/ios/arm64/config.h index 9842b9cb..741f2c7f 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/ios/arm64/config.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/ios/arm64/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME darwin #define av_restrict restrict #define EXTERN_PREFIX "_" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/ios/arm64/config_components.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/ios/arm64/config_components.h index 7a829ad1..d0311ac8 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/ios/arm64/config_components.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/ios/arm64/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/ios/arm64/libavutil/ffversion.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/ios/arm64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/ios/arm64/libavutil/ffversion.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/ios/arm64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/ios/x64/config.asm b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/ios/x64/config.asm index 9bdc5d84..a0131929 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/ios/x64/config.asm +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/ios/x64/config.asm @@ -329,6 +329,7 @@ %define HAVE_BCRYPT 0 %define HAVE_VAAPI_DRM 0 %define HAVE_VAAPI_X11 0 +%define HAVE_VAAPI_WIN32 0 %define HAVE_VDPAU_X11 0 %define HAVE_PTHREADS 1 %define HAVE_OS2THREADS 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/ios/x64/config.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/ios/x64/config.h index 638ac95a..c0ccfb3a 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/ios/x64/config.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/ios/x64/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME darwin #define av_restrict restrict #define EXTERN_PREFIX "_" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/ios/x64/config_components.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/ios/x64/config_components.h index 3604442a..0bf0c781 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/ios/x64/config_components.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/ios/x64/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/ios/x64/libavutil/ffversion.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/ios/x64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/ios/x64/libavutil/ffversion.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/ios/x64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux-noasm/x64/config.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux-noasm/x64/config.h index a20c23ae..6af805b6 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux-noasm/x64/config.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux-noasm/x64/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME linux #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux-noasm/x64/config_components.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux-noasm/x64/config_components.h index 3604442a..0bf0c781 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux-noasm/x64/config_components.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux-noasm/x64/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux-noasm/x64/libavutil/ffversion.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux-noasm/x64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux-noasm/x64/libavutil/ffversion.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux-noasm/x64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/arm-neon/config.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/arm-neon/config.h index 6468423b..09a1519c 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/arm-neon/config.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/arm-neon/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME linux #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/arm-neon/config_components.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/arm-neon/config_components.h index 7a829ad1..d0311ac8 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/arm-neon/config_components.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/arm-neon/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/arm-neon/libavutil/ffversion.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/arm-neon/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/arm-neon/libavutil/ffversion.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/arm-neon/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/arm/config.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/arm/config.h index adf4a40e..622f33cd 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/arm/config.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/arm/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME linux #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/arm/config_components.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/arm/config_components.h index 7a829ad1..d0311ac8 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/arm/config_components.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/arm/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/arm/libavutil/ffversion.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/arm/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/arm/libavutil/ffversion.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/arm/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/arm64/config.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/arm64/config.h index 688ed85c..5cc92ff0 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/arm64/config.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/arm64/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME linux #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/arm64/config_components.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/arm64/config_components.h index 7a829ad1..d0311ac8 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/arm64/config_components.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/arm64/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/arm64/libavutil/ffversion.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/arm64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/arm64/libavutil/ffversion.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/arm64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/config.asm b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/config.asm index 277c96b3..53d8e0d2 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/config.asm +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/config.asm @@ -329,6 +329,7 @@ %define HAVE_BCRYPT 0 %define HAVE_VAAPI_DRM 0 %define HAVE_VAAPI_X11 0 +%define HAVE_VAAPI_WIN32 0 %define HAVE_VDPAU_X11 0 %define HAVE_PTHREADS 1 %define HAVE_OS2THREADS 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/config.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/config.h index 7c61d0f9..14e73271 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/config.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME linux #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/config_components.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/config_components.h index 7a829ad1..d0311ac8 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/config_components.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/libavutil/ffversion.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/libavutil/ffversion.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/x64/config.asm b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/x64/config.asm index 363c3e99..33f1bde5 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/x64/config.asm +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/x64/config.asm @@ -329,6 +329,7 @@ %define HAVE_BCRYPT 0 %define HAVE_VAAPI_DRM 0 %define HAVE_VAAPI_X11 0 +%define HAVE_VAAPI_WIN32 0 %define HAVE_VDPAU_X11 0 %define HAVE_PTHREADS 1 %define HAVE_OS2THREADS 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/x64/config.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/x64/config.h index 980103a0..a726c3f0 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/x64/config.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/x64/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME linux #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/x64/config_components.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/x64/config_components.h index 7a829ad1..d0311ac8 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/x64/config_components.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/x64/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/x64/libavutil/ffversion.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/x64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/x64/libavutil/ffversion.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/linux/x64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/mac/arm64/config.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/mac/arm64/config.h index 9842b9cb..741f2c7f 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/mac/arm64/config.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/mac/arm64/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME darwin #define av_restrict restrict #define EXTERN_PREFIX "_" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/mac/arm64/config_components.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/mac/arm64/config_components.h index 7a829ad1..d0311ac8 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/mac/arm64/config_components.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/mac/arm64/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/mac/arm64/libavutil/ffversion.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/mac/arm64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/mac/arm64/libavutil/ffversion.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/mac/arm64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/mac/x64/config.asm b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/mac/x64/config.asm index ab3a7b36..d419ad37 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/mac/x64/config.asm +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/mac/x64/config.asm @@ -329,6 +329,7 @@ %define HAVE_BCRYPT 0 %define HAVE_VAAPI_DRM 0 %define HAVE_VAAPI_X11 0 +%define HAVE_VAAPI_WIN32 0 %define HAVE_VDPAU_X11 0 %define HAVE_PTHREADS 1 %define HAVE_OS2THREADS 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/mac/x64/config.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/mac/x64/config.h index 74559a44..13863d1a 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/mac/x64/config.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/mac/x64/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME darwin #define av_restrict restrict #define EXTERN_PREFIX "_" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/mac/x64/config_components.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/mac/x64/config_components.h index 7a829ad1..d0311ac8 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/mac/x64/config_components.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/mac/x64/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/mac/x64/libavutil/ffversion.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/mac/x64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/mac/x64/libavutil/ffversion.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/mac/x64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/win/arm64/config.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/win/arm64/config.h index 9d27a8d2..d8b32c92 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/win/arm64/config.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/win/arm64/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME win32 #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 0 #define HAVE_OS2THREADS 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/win/arm64/config_components.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/win/arm64/config_components.h index 7a829ad1..d0311ac8 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/win/arm64/config_components.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/win/arm64/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/win/arm64/libavutil/ffversion.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/win/arm64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/win/arm64/libavutil/ffversion.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/win/arm64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/win/ia32/config.asm b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/win/ia32/config.asm index 210035ac..1291ace3 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/win/ia32/config.asm +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/win/ia32/config.asm @@ -329,6 +329,7 @@ %define HAVE_BCRYPT 0 %define HAVE_VAAPI_DRM 0 %define HAVE_VAAPI_X11 0 +%define HAVE_VAAPI_WIN32 0 %define HAVE_VDPAU_X11 0 %define HAVE_PTHREADS 0 %define HAVE_OS2THREADS 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/win/ia32/config.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/win/ia32/config.h index c32a7fc3..153a93b8 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/win/ia32/config.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/win/ia32/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME win32 #define av_restrict restrict #define EXTERN_PREFIX "_" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 0 #define HAVE_OS2THREADS 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/win/ia32/config_components.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/win/ia32/config_components.h index 7a829ad1..d0311ac8 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/win/ia32/config_components.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/win/ia32/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/win/ia32/libavutil/ffversion.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/win/ia32/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/win/ia32/libavutil/ffversion.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/win/ia32/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/win/x64/config.asm b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/win/x64/config.asm index 1034b066..388c3281 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/win/x64/config.asm +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/win/x64/config.asm @@ -329,6 +329,7 @@ %define HAVE_BCRYPT 0 %define HAVE_VAAPI_DRM 0 %define HAVE_VAAPI_X11 0 +%define HAVE_VAAPI_WIN32 0 %define HAVE_VDPAU_X11 0 %define HAVE_PTHREADS 0 %define HAVE_OS2THREADS 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/win/x64/config.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/win/x64/config.h index 726a429a..5a13a177 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/win/x64/config.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/win/x64/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME win64 #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 0 #define HAVE_OS2THREADS 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/win/x64/config_components.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/win/x64/config_components.h index 7a829ad1..d0311ac8 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/win/x64/config_components.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/win/x64/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/win/x64/libavutil/ffversion.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/win/x64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/win/x64/libavutil/ffversion.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chrome/win/x64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux-noasm/x64/config.h b/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux-noasm/x64/config.h index a90cc618..0e9cc30a 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux-noasm/x64/config.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux-noasm/x64/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME linux #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux-noasm/x64/config_components.h b/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux-noasm/x64/config_components.h index bc677e76..fa52167a 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux-noasm/x64/config_components.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux-noasm/x64/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux-noasm/x64/libavutil/ffversion.h b/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux-noasm/x64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux-noasm/x64/libavutil/ffversion.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux-noasm/x64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm-neon/config.h b/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm-neon/config.h index 41e80127..a5a56eee 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm-neon/config.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm-neon/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME linux #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm-neon/config_components.h b/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm-neon/config_components.h index bc677e76..fa52167a 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm-neon/config_components.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm-neon/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm-neon/libavutil/ffversion.h b/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm-neon/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm-neon/libavutil/ffversion.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm-neon/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm/config.h b/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm/config.h index 6060fd5b..26110295 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm/config.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME linux #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm/config_components.h b/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm/config_components.h index bc677e76..fa52167a 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm/config_components.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm/libavutil/ffversion.h b/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm/libavutil/ffversion.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm64/config.h b/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm64/config.h index 3c47e083..1be92fdf 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm64/config.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm64/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME linux #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm64/config_components.h b/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm64/config_components.h index bc677e76..fa52167a 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm64/config_components.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm64/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm64/libavutil/ffversion.h b/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm64/libavutil/ffversion.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/config.asm b/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/config.asm index b257dadf..22bde70a 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/config.asm +++ b/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/config.asm @@ -329,6 +329,7 @@ %define HAVE_BCRYPT 0 %define HAVE_VAAPI_DRM 0 %define HAVE_VAAPI_X11 0 +%define HAVE_VAAPI_WIN32 0 %define HAVE_VDPAU_X11 0 %define HAVE_PTHREADS 1 %define HAVE_OS2THREADS 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/config.h b/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/config.h index 85a361dd..5e48bbcf 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/config.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME linux #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/config_components.h b/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/config_components.h index bc677e76..fa52167a 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/config_components.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/libavutil/ffversion.h b/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/libavutil/ffversion.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/config.asm b/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/config.asm index deb21917..274919d1 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/config.asm +++ b/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/config.asm @@ -329,6 +329,7 @@ %define HAVE_BCRYPT 0 %define HAVE_VAAPI_DRM 0 %define HAVE_VAAPI_X11 0 +%define HAVE_VAAPI_WIN32 0 %define HAVE_VDPAU_X11 0 %define HAVE_PTHREADS 1 %define HAVE_OS2THREADS 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/config.h b/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/config.h index d4b533e2..8bbfde8d 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/config.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME linux #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/config_components.h b/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/config_components.h index bc677e76..fa52167a 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/config_components.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/libavutil/ffversion.h b/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/libavutil/ffversion.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/android/arm-neon/config.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/android/arm-neon/config.h index f8fdbf28..0b224436 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/android/arm-neon/config.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/android/arm-neon/config.h @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/android/arm-neon/config_components.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/android/arm-neon/config_components.h index 012c89d9..46a1c423 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/android/arm-neon/config_components.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/android/arm-neon/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/android/arm-neon/libavutil/ffversion.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/android/arm-neon/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/android/arm-neon/libavutil/ffversion.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/android/arm-neon/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/android/arm64/config.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/android/arm64/config.h index 146d72b6..bc50a3da 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/android/arm64/config.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/android/arm64/config.h @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/android/arm64/config_components.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/android/arm64/config_components.h index 012c89d9..46a1c423 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/android/arm64/config_components.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/android/arm64/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/android/arm64/libavutil/ffversion.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/android/arm64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/android/arm64/libavutil/ffversion.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/android/arm64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/android/ia32/config.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/android/ia32/config.h index a2b1cb8b..402c4f5d 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/android/ia32/config.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/android/ia32/config.h @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/android/ia32/config_components.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/android/ia32/config_components.h index 012c89d9..46a1c423 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/android/ia32/config_components.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/android/ia32/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/android/ia32/libavutil/ffversion.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/android/ia32/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/android/ia32/libavutil/ffversion.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/android/ia32/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/android/x64/config.asm b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/android/x64/config.asm index b811591a..1fa00fd2 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/android/x64/config.asm +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/android/x64/config.asm @@ -329,6 +329,7 @@ %define HAVE_BCRYPT 0 %define HAVE_VAAPI_DRM 0 %define HAVE_VAAPI_X11 0 +%define HAVE_VAAPI_WIN32 0 %define HAVE_VDPAU_X11 0 %define HAVE_PTHREADS 1 %define HAVE_OS2THREADS 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/android/x64/config.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/android/x64/config.h index 0d90febd..29332059 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/android/x64/config.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/android/x64/config.h @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/android/x64/config_components.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/android/x64/config_components.h index 012c89d9..46a1c423 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/android/x64/config_components.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/android/x64/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/android/x64/libavutil/ffversion.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/android/x64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/android/x64/libavutil/ffversion.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/android/x64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/ios/arm64/config.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/ios/arm64/config.h index c7cc4537..55203e0f 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/ios/arm64/config.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/ios/arm64/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME darwin #define av_restrict restrict #define EXTERN_PREFIX "_" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/ios/arm64/config_components.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/ios/arm64/config_components.h index 90533701..6f3ae35a 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/ios/arm64/config_components.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/ios/arm64/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/ios/arm64/libavutil/ffversion.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/ios/arm64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/ios/arm64/libavutil/ffversion.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/ios/arm64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/ios/x64/config.asm b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/ios/x64/config.asm index 36e5a1e6..a8832e99 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/ios/x64/config.asm +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/ios/x64/config.asm @@ -329,6 +329,7 @@ %define HAVE_BCRYPT 0 %define HAVE_VAAPI_DRM 0 %define HAVE_VAAPI_X11 0 +%define HAVE_VAAPI_WIN32 0 %define HAVE_VDPAU_X11 0 %define HAVE_PTHREADS 1 %define HAVE_OS2THREADS 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/ios/x64/config.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/ios/x64/config.h index 5db229d8..ac8416b0 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/ios/x64/config.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/ios/x64/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME darwin #define av_restrict restrict #define EXTERN_PREFIX "_" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/ios/x64/config_components.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/ios/x64/config_components.h index d85ee4cc..18d38c48 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/ios/x64/config_components.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/ios/x64/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/ios/x64/libavutil/ffversion.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/ios/x64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/ios/x64/libavutil/ffversion.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/ios/x64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux-noasm/x64/config.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux-noasm/x64/config.h index 64a29625..508898c8 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux-noasm/x64/config.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux-noasm/x64/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME linux #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux-noasm/x64/config_components.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux-noasm/x64/config_components.h index 90533701..6f3ae35a 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux-noasm/x64/config_components.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux-noasm/x64/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux-noasm/x64/libavutil/ffversion.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux-noasm/x64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux-noasm/x64/libavutil/ffversion.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux-noasm/x64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/arm-neon/config.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/arm-neon/config.h index bb0f9b68..38e66b4b 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/arm-neon/config.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/arm-neon/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME linux #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/arm-neon/config_components.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/arm-neon/config_components.h index 90533701..6f3ae35a 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/arm-neon/config_components.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/arm-neon/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/arm-neon/libavutil/ffversion.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/arm-neon/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/arm-neon/libavutil/ffversion.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/arm-neon/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/arm/config.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/arm/config.h index 7fe09eb0..53902563 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/arm/config.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/arm/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME linux #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/arm/config_components.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/arm/config_components.h index 90533701..6f3ae35a 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/arm/config_components.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/arm/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/arm/libavutil/ffversion.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/arm/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/arm/libavutil/ffversion.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/arm/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/arm64/config.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/arm64/config.h index 2883146f..dae4f17a 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/arm64/config.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/arm64/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME linux #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/arm64/config_components.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/arm64/config_components.h index 90533701..6f3ae35a 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/arm64/config_components.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/arm64/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/arm64/libavutil/ffversion.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/arm64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/arm64/libavutil/ffversion.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/arm64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/config.asm b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/config.asm index 038ff00b..0ad6241d 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/config.asm +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/config.asm @@ -329,6 +329,7 @@ %define HAVE_BCRYPT 0 %define HAVE_VAAPI_DRM 0 %define HAVE_VAAPI_X11 0 +%define HAVE_VAAPI_WIN32 0 %define HAVE_VDPAU_X11 0 %define HAVE_PTHREADS 1 %define HAVE_OS2THREADS 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/config.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/config.h index 81193551..36ea4c75 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/config.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME linux #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/config_components.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/config_components.h index 90533701..6f3ae35a 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/config_components.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/libavutil/ffversion.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/libavutil/ffversion.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/x64/config.asm b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/x64/config.asm index bcb04508..87ed69fc 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/x64/config.asm +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/x64/config.asm @@ -329,6 +329,7 @@ %define HAVE_BCRYPT 0 %define HAVE_VAAPI_DRM 0 %define HAVE_VAAPI_X11 0 +%define HAVE_VAAPI_WIN32 0 %define HAVE_VDPAU_X11 0 %define HAVE_PTHREADS 1 %define HAVE_OS2THREADS 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/x64/config.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/x64/config.h index c3f700a3..183bc7f7 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/x64/config.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/x64/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME linux #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/x64/config_components.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/x64/config_components.h index 90533701..6f3ae35a 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/x64/config_components.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/x64/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/x64/libavutil/ffversion.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/x64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/x64/libavutil/ffversion.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/linux/x64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/mac/arm64/config.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/mac/arm64/config.h index c7cc4537..55203e0f 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/mac/arm64/config.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/mac/arm64/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME darwin #define av_restrict restrict #define EXTERN_PREFIX "_" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/mac/arm64/config_components.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/mac/arm64/config_components.h index 90533701..6f3ae35a 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/mac/arm64/config_components.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/mac/arm64/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/mac/arm64/libavutil/ffversion.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/mac/arm64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/mac/arm64/libavutil/ffversion.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/mac/arm64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/mac/x64/config.asm b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/mac/x64/config.asm index f4b4466e..9276b180 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/mac/x64/config.asm +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/mac/x64/config.asm @@ -329,6 +329,7 @@ %define HAVE_BCRYPT 0 %define HAVE_VAAPI_DRM 0 %define HAVE_VAAPI_X11 0 +%define HAVE_VAAPI_WIN32 0 %define HAVE_VDPAU_X11 0 %define HAVE_PTHREADS 1 %define HAVE_OS2THREADS 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/mac/x64/config.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/mac/x64/config.h index 772619b7..e0c55bf0 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/mac/x64/config.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/mac/x64/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME darwin #define av_restrict restrict #define EXTERN_PREFIX "_" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/mac/x64/config_components.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/mac/x64/config_components.h index 90533701..6f3ae35a 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/mac/x64/config_components.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/mac/x64/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/mac/x64/libavutil/ffversion.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/mac/x64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/mac/x64/libavutil/ffversion.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/mac/x64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/win/arm64/config.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/win/arm64/config.h index 06a3a485..0fc3ad3f 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/win/arm64/config.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/win/arm64/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME win32 #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 0 #define HAVE_OS2THREADS 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/win/arm64/config_components.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/win/arm64/config_components.h index 90533701..6f3ae35a 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/win/arm64/config_components.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/win/arm64/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/win/arm64/libavutil/ffversion.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/win/arm64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/win/arm64/libavutil/ffversion.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/win/arm64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/win/ia32/config.asm b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/win/ia32/config.asm index bf0b069b..2fdb72be 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/win/ia32/config.asm +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/win/ia32/config.asm @@ -329,6 +329,7 @@ %define HAVE_BCRYPT 0 %define HAVE_VAAPI_DRM 0 %define HAVE_VAAPI_X11 0 +%define HAVE_VAAPI_WIN32 0 %define HAVE_VDPAU_X11 0 %define HAVE_PTHREADS 0 %define HAVE_OS2THREADS 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/win/ia32/config.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/win/ia32/config.h index c83c01e8..26bf57b3 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/win/ia32/config.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/win/ia32/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME win32 #define av_restrict restrict #define EXTERN_PREFIX "_" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 0 #define HAVE_OS2THREADS 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/win/ia32/config_components.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/win/ia32/config_components.h index 90533701..6f3ae35a 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/win/ia32/config_components.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/win/ia32/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/win/ia32/libavutil/ffversion.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/win/ia32/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/win/ia32/libavutil/ffversion.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/win/ia32/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/win/x64/config.asm b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/win/x64/config.asm index a8264dd3..11ea6353 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/win/x64/config.asm +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/win/x64/config.asm @@ -329,6 +329,7 @@ %define HAVE_BCRYPT 0 %define HAVE_VAAPI_DRM 0 %define HAVE_VAAPI_X11 0 +%define HAVE_VAAPI_WIN32 0 %define HAVE_VDPAU_X11 0 %define HAVE_PTHREADS 0 %define HAVE_OS2THREADS 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/win/x64/config.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/win/x64/config.h index bd879c84..75f478ac 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/win/x64/config.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/win/x64/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME win64 #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 0 #define HAVE_OS2THREADS 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/win/x64/config_components.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/win/x64/config_components.h index 90533701..6f3ae35a 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/win/x64/config_components.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/win/x64/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/win/x64/libavutil/ffversion.h b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/win/x64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/win/x64/libavutil/ffversion.h +++ b/arm/raspi/third_party/ffmpeg/chromium/config/Chromium/win/x64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/arm/raspi/third_party/ffmpeg/chromium/patches/README b/arm/raspi/third_party/ffmpeg/chromium/patches/README index 11fa345f..b5675cfe 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/patches/README +++ b/arm/raspi/third_party/ffmpeg/chromium/patches/README @@ -953,3 +953,18 @@ Affects: libavcodec/libx264.c libavutil/frame.h +------------------------------------------------------------------ +commit 13156c083ffe746a0f5908778c6fc6d165217af0 +Author: Frank Liberato +Date: Wed May 24 05:24:25 2023 +0000 + + Replace #include "" with #include <> + + generate_gn.py assumes that "includes" can be found in the current + directory, while can be ignored. Rather than try to + teach it how to search include paths, change the one instance in + ffmpeg of "stdint.h" to . + +Affects: + libavcodec/vp8data.c + diff --git a/arm/raspi/third_party/ffmpeg/chromium/patches/config_flag_changes.txt b/arm/raspi/third_party/ffmpeg/chromium/patches/config_flag_changes.txt index 94ab5cf9..db1c38b5 100644 --- a/arm/raspi/third_party/ffmpeg/chromium/patches/config_flag_changes.txt +++ b/arm/raspi/third_party/ffmpeg/chromium/patches/config_flag_changes.txt @@ -1,33 +1,12 @@ -+ CONFIG_AVIO_HTTP_SERVE_FILES_EXAMPLE 1 -+ CONFIG_AVIO_READ_CALLBACK_EXAMPLE 1 -+ CONFIG_DECODE_FILTER_AUDIO_EXAMPLE 0 -+ CONFIG_DECODE_FILTER_VIDEO_EXAMPLE 0 -+ CONFIG_DEMUX_DECODE_EXAMPLE 1 -+ CONFIG_HSTACK_QSV_FILTER 0 -+ CONFIG_LIBARIBCAPTION 0 -+ CONFIG_LIBARIBCAPTION_DECODER 0 -+ CONFIG_MUX_EXAMPLE 0 -+ CONFIG_QSV_DECODE_EXAMPLE 0 -+ CONFIG_REMUX_EXAMPLE 1 -+ CONFIG_RESAMPLE_AUDIO_EXAMPLE 0 -+ CONFIG_RKA_DECODER 0 -+ CONFIG_RKA_DEMUXER 0 -+ CONFIG_SCALE_VIDEO_EXAMPLE 0 -+ CONFIG_SDNS_DEMUXER 0 -+ CONFIG_SHOW_METADATA_EXAMPLE 1 -+ CONFIG_TRANSCODE_EXAMPLE 0 -+ CONFIG_VSTACK_QSV_FILTER 0 -+ CONFIG_XSTACK_QSV_FILTER 0 -- CONFIG_AVIO_READING_EXAMPLE 1 -- CONFIG_DEMUXING_DECODING_EXAMPLE 1 -- CONFIG_FILTERING_AUDIO_EXAMPLE 0 -- CONFIG_FILTERING_VIDEO_EXAMPLE 0 -- CONFIG_HTTP_MULTICLIENT_EXAMPLE 0 -- CONFIG_HTTP_MULTICLIENT_EXAMPLE 1 -- CONFIG_METADATA_EXAMPLE 1 -- CONFIG_MUXING_EXAMPLE 0 -- CONFIG_QSVDEC_EXAMPLE 0 -- CONFIG_REMUXING_EXAMPLE 1 -- CONFIG_RESAMPLING_AUDIO_EXAMPLE 0 -- CONFIG_SCALING_VIDEO_EXAMPLE 0 -- CONFIG_TRANSCODING_EXAMPLE 0 ++ CONFIG_AFIREQSRC_FILTER 0 ++ CONFIG_ARLS_FILTER 0 ++ CONFIG_AV1_MEDIACODEC_ENCODER 0 ++ CONFIG_CCREPACK_FILTER 0 ++ CONFIG_MPEG4_MEDIACODEC_ENCODER 0 ++ CONFIG_PDV_DECODER 0 ++ CONFIG_PDV_DEMUXER 0 ++ CONFIG_VP8_MEDIACODEC_ENCODER 0 ++ CONFIG_VP9_MEDIACODEC_ENCODER 0 ++ CONFIG_ZONEPLATE_FILTER 0 ++ HAVE_VAAPI_WIN32 0 +- CONFIG_LIBOPENJPEG_DECODER 0 diff --git a/arm/raspi/third_party/ffmpeg/chromium/scripts/build_ffmpeg.py b/arm/raspi/third_party/ffmpeg/chromium/scripts/build_ffmpeg.py index f8a6cb27..e126807d 100755 --- a/arm/raspi/third_party/ffmpeg/chromium/scripts/build_ffmpeg.py +++ b/arm/raspi/third_party/ffmpeg/chromium/scripts/build_ffmpeg.py @@ -731,10 +731,6 @@ def ConfigureAndBuild(target_arch, target_os, host_os, host_arch, parallel_jobs, configure_flags['Common'].extend([ # --optflags doesn't append multiple entries, so set all at once. '--optflags="-O3"', - '--extra-cflags=-mavx', - '--extra-cflags=-maes', - '--extra-cflags=-mpclmul', - '--extra-cflags=-O3', '--enable-decoder=theora,vp8', '--enable-parser=vp3,vp8', ]) @@ -748,10 +744,6 @@ def ConfigureAndBuild(target_arch, target_os, host_os, host_arch, parallel_jobs, else: configure_flags['Common'].extend([ '--enable-lto', - '--extra-cflags=-O3', - '--extra-cflags=-mavx', - '--extra-cflags=-maes', - '--extra-cflags=-mpclmul', '--arch=x86_64', '--target-os=linux', ]) @@ -1011,9 +1003,9 @@ def ConfigureAndBuild(target_arch, target_os, host_os, host_arch, parallel_jobs, # Google Chrome & ChromeOS specific configuration. configure_flags['Chrome'].extend([ - '--enable-decoder=aac,h264,mp3,eac3,ac3,hevc,mpeg4,mpegvideo,mp2,mp1,flac', - '--enable-demuxer=aac,mp3,mov,dtshd,dts,avi,mpegvideo,m4v,h264,vc1,flac', - '--enable-parser=aac,h264,hevc,mpegaudio,mpeg4video,mpegvideo,ac3,h261,vc1,h263,flac', + '--enable-decoder=aac,h264,mp3,hevc', + '--enable-demuxer=aac,mp3', + '--enable-parser=aac,h264,hevc', ]) # Google ChromeOS specific configuration. @@ -1024,12 +1016,6 @@ def ConfigureAndBuild(target_arch, target_os, host_os, host_arch, parallel_jobs, '--enable-decoder=mpeg4', '--enable-parser=h263,mpeg4video', '--enable-demuxer=avi', - # Enable playing Android 3gp files. - '--enable-demuxer=amr', - '--enable-decoder=amrnb,amrwb', - # Wav files for playing phone messages. - '--enable-decoder=gsm_ms', - '--enable-parser=gsm', ]) configure_flags['ChromeAndroid'].extend([ diff --git a/arm/raspi/third_party/ffmpeg/chromium/scripts/generate_gn.py b/arm/raspi/third_party/ffmpeg/chromium/scripts/generate_gn.py index d36b0a22..c7869a7d 100755 --- a/arm/raspi/third_party/ffmpeg/chromium/scripts/generate_gn.py +++ b/arm/raspi/third_party/ffmpeg/chromium/scripts/generate_gn.py @@ -700,11 +700,11 @@ LICENSE_EXCEPTIONS = [ # Regex to find lines matching #include "some_dir\some_file.h". # Also works for assembly files that use %include. -INCLUDE_REGEX = re.compile('[#%]\s*include\s+"([^"]+)"') +INCLUDE_REGEX = re.compile('^\s*[#%]\s*include\s+"([^"]+)"') # Regex to find whacky includes that we might be overlooking (e.g. using macros # or defines). -EXOTIC_INCLUDE_REGEX = re.compile('[#%]\s*include\s+[^"<\s].+') +EXOTIC_INCLUDE_REGEX = re.compile('^\s*[#%]\s*include\s+[^"<\s].+') # Prefix added to renamed files as part of RENAME_PREFIX = 'autorename' @@ -782,7 +782,7 @@ def GetIncludedSources(file_path, source_dir, include_set, scan_only=False): elif include_file_path in MUST_BE_MISSING_INCLUDE_FILES: continue else: - exit('Failed to find file ' + include_file_path) + exit('Failed to find file ' + include_file_path + " in " + file_path) # At this point we've found the file. Check if its in our ignore list which # means that the list should be updated to no longer mention this file. diff --git a/arm/raspi/third_party/ffmpeg/ffmpeg_generated.gni b/arm/raspi/third_party/ffmpeg/ffmpeg_generated.gni index f81acaff..13e31ffb 100644 --- a/arm/raspi/third_party/ffmpeg/ffmpeg_generated.gni +++ b/arm/raspi/third_party/ffmpeg/ffmpeg_generated.gni @@ -472,6 +472,23 @@ if ((is_android && current_cpu == "arm" && arm_use_neon) || (use_linux_config && ] } +if ((is_apple) || (is_win) || (use_linux_config)) { + ffmpeg_c_sources += [ + "libavcodec/autorename_libavcodec_videodsp.c", + "libavcodec/h264pred.c", + "libavcodec/hpeldsp.c", + "libavcodec/jpegquanttables.c", + "libavcodec/vp3.c", + "libavcodec/vp3_parser.c", + "libavcodec/vp3dsp.c", + "libavcodec/vp8.c", + "libavcodec/vp8_parser.c", + "libavcodec/vp8data.c", + "libavcodec/vp8dsp.c", + "libavcodec/vpx_rac.c", + ] +} + if ((is_android && current_cpu == "x64") || (is_android && current_cpu == "x86") || (is_apple && current_cpu == "x64") || (is_win && current_cpu == "x64") || (is_win && current_cpu == "x86") || (use_linux_config && current_cpu == "x64") || (use_linux_config && current_cpu == "x86")) { ffmpeg_c_sources += [ "libavcodec/x86/autorename_libavcodec_x86_vorbisdsp_init.c", @@ -506,22 +523,6 @@ if ((is_android && current_cpu == "arm64") || (is_apple && current_cpu == "arm64 ] } -if ((is_apple) || (is_win) || (use_linux_config)) { - ffmpeg_c_sources += [ - "libavcodec/autorename_libavcodec_videodsp.c", - "libavcodec/h264pred.c", - "libavcodec/hpeldsp.c", - "libavcodec/jpegquanttables.c", - "libavcodec/vp3.c", - "libavcodec/vp3_parser.c", - "libavcodec/vp3dsp.c", - "libavcodec/vp8.c", - "libavcodec/vp8_parser.c", - "libavcodec/vp8dsp.c", - "libavcodec/vpx_rac.c", - ] -} - if ((is_apple && current_cpu == "arm64") || (is_win && current_cpu == "arm64") || (use_linux_config && current_cpu == "arm64")) { ffmpeg_c_sources += [ "libavcodec/aarch64/h264pred_init.c", @@ -546,6 +547,7 @@ if ((is_apple && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (is_w ffmpeg_gas_sources += [ "libavcodec/aarch64/autorename_libavcodec_aarch64_hevcdsp_idct_neon.S", "libavcodec/aarch64/autorename_libavcodec_aarch64_hevcdsp_sao_neon.S", + "libavcodec/aarch64/hevcdsp_deblock_neon.S", "libavcodec/aarch64/hevcdsp_qpel_neon.S" ] diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/012v.c b/arm/raspi/third_party/ffmpeg/libavcodec/012v.c index f0197cd8..fa5eb0f9 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/012v.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/012v.c @@ -65,7 +65,7 @@ static int zero12v_decode_frame(AVCodecContext *avctx, AVFrame *pic, return ret; pic->pict_type = AV_PICTURE_TYPE_I; - pic->key_frame = 1; + pic->flags |= AV_FRAME_FLAG_KEY; line_end = avpkt->data + stride; for (line = 0; line < avctx->height; line++) { diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/4xm.c b/arm/raspi/third_party/ffmpeg/libavcodec/4xm.c index fab3fb5b..411e50da 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/4xm.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/4xm.c @@ -957,7 +957,10 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *picture, return AVERROR_INVALIDDATA; } - picture->key_frame = picture->pict_type == AV_PICTURE_TYPE_I; + if (picture->pict_type == AV_PICTURE_TYPE_I) + picture->flags |= AV_FRAME_FLAG_KEY; + else + picture->flags &= ~AV_FRAME_FLAG_KEY; av_image_copy_plane(picture->data[0], picture->linesize[0], (const uint8_t*)f->frame_buffer, avctx->width * 2, diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/8bps.c b/arm/raspi/third_party/ffmpeg/libavcodec/8bps.c index 90d6c96f..af98f62f 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/8bps.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/8bps.c @@ -47,8 +47,6 @@ typedef struct EightBpsContext { unsigned char planes; unsigned char planemap[4]; - - uint32_t pal[256]; } EightBpsContext; static int decode_frame(AVCodecContext *avctx, AVFrame *frame, @@ -123,9 +121,14 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, } if (avctx->bits_per_coded_sample <= 8) { - frame->palette_has_changed = ff_copy_palette(c->pal, avpkt, avctx); - - memcpy (frame->data[1], c->pal, AVPALETTE_SIZE); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS + frame->palette_has_changed = +#endif + ff_copy_palette(frame->data[1], avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_ENABLE_DEPRECATION_WARNINGS +#endif } *got_frame = 1; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/Makefile b/arm/raspi/third_party/ffmpeg/libavcodec/Makefile index 711d2690..9c382400 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/Makefile +++ b/arm/raspi/third_party/ffmpeg/libavcodec/Makefile @@ -253,6 +253,7 @@ OBJS-$(CONFIG_AURA2_DECODER) += aura.o OBJS-$(CONFIG_AV1_DECODER) += av1dec.o OBJS-$(CONFIG_AV1_CUVID_DECODER) += cuviddec.o OBJS-$(CONFIG_AV1_MEDIACODEC_DECODER) += mediacodecdec.o +OBJS-$(CONFIG_AV1_MEDIACODEC_ENCODER) += mediacodecenc.o OBJS-$(CONFIG_AV1_NVENC_ENCODER) += nvenc_av1.o nvenc.o OBJS-$(CONFIG_AV1_QSV_ENCODER) += qsvenc_av1.o OBJS-$(CONFIG_AVRN_DECODER) += avrndec.o @@ -469,7 +470,7 @@ OBJS-$(CONFIG_JACOSUB_DECODER) += jacosubdec.o ass.o OBJS-$(CONFIG_JPEG2000_ENCODER) += j2kenc.o mqcenc.o mqc.o jpeg2000.o \ jpeg2000dwt.o OBJS-$(CONFIG_JPEG2000_DECODER) += jpeg2000dec.o jpeg2000.o jpeg2000dsp.o \ - jpeg2000dwt.o mqcdec.o mqc.o + jpeg2000dwt.o mqcdec.o mqc.o jpeg2000htdec.o OBJS-$(CONFIG_JPEGLS_DECODER) += jpeglsdec.o jpegls.o OBJS-$(CONFIG_JPEGLS_ENCODER) += jpeglsenc.o jpegls.o OBJS-$(CONFIG_JV_DECODER) += jvdec.o @@ -542,6 +543,7 @@ OBJS-$(CONFIG_MPEG4_DECODER) += mpeg4videodsp.o xvididct.o OBJS-$(CONFIG_MPEG4_ENCODER) += mpeg4videoenc.o OBJS-$(CONFIG_MPEG4_CUVID_DECODER) += cuviddec.o OBJS-$(CONFIG_MPEG4_MEDIACODEC_DECODER) += mediacodecdec.o +OBJS-$(CONFIG_MPEG4_MEDIACODEC_ENCODER) += mediacodecenc.o OBJS-$(CONFIG_MPEG4_OMX_ENCODER) += omx.o OBJS-$(CONFIG_MPEG4_V4L2M2M_DECODER) += v4l2_m2m_dec.o OBJS-$(CONFIG_MPEG4_V4L2M2M_ENCODER) += v4l2_m2m_enc.o @@ -582,6 +584,7 @@ OBJS-$(CONFIG_PBM_DECODER) += pnmdec.o pnm.o OBJS-$(CONFIG_PBM_ENCODER) += pnmenc.o OBJS-$(CONFIG_PCX_DECODER) += pcx.o OBJS-$(CONFIG_PCX_ENCODER) += pcxenc.o +OBJS-$(CONFIG_PDV_DECODER) += pdvdec.o OBJS-$(CONFIG_PFM_DECODER) += pnmdec.o pnm.o OBJS-$(CONFIG_PFM_ENCODER) += pnmenc.o OBJS-$(CONFIG_PGM_DECODER) += pnmdec.o pnm.o @@ -760,10 +763,11 @@ OBJS-$(CONFIG_VP3_DECODER) += vp3.o jpegquanttables.o OBJS-$(CONFIG_VP5_DECODER) += vp5.o vp56.o vp56data.o vpx_rac.o OBJS-$(CONFIG_VP6_DECODER) += vp6.o vp56.o vp56data.o \ vp6dsp.o vpx_rac.o -OBJS-$(CONFIG_VP7_DECODER) += vp8.o vpx_rac.o -OBJS-$(CONFIG_VP8_DECODER) += vp8.o vpx_rac.o +OBJS-$(CONFIG_VP7_DECODER) += vp8.o vp8data.o vpx_rac.o +OBJS-$(CONFIG_VP8_DECODER) += vp8.o vp8data.o vpx_rac.o OBJS-$(CONFIG_VP8_CUVID_DECODER) += cuviddec.o OBJS-$(CONFIG_VP8_MEDIACODEC_DECODER) += mediacodecdec.o +OBJS-$(CONFIG_VP8_MEDIACODEC_ENCODER) += mediacodecenc.o OBJS-$(CONFIG_VP8_QSV_DECODER) += qsvdec.o OBJS-$(CONFIG_VP8_RKMPP_DECODER) += rkmppdec.o OBJS-$(CONFIG_VP8_VAAPI_ENCODER) += vaapi_encode_vp8.o @@ -774,6 +778,7 @@ OBJS-$(CONFIG_VP9_DECODER) += vp9.o vp9data.o vp9dsp.o vp9lpf.o vp9r vp9dsp_8bpp.o vp9dsp_10bpp.o vp9dsp_12bpp.o OBJS-$(CONFIG_VP9_CUVID_DECODER) += cuviddec.o OBJS-$(CONFIG_VP9_MEDIACODEC_DECODER) += mediacodecdec.o +OBJS-$(CONFIG_VP9_MEDIACODEC_ENCODER) += mediacodecenc.o OBJS-$(CONFIG_VP9_RKMPP_DECODER) += rkmppdec.o OBJS-$(CONFIG_VP9_VAAPI_ENCODER) += vaapi_encode_vp9.o OBJS-$(CONFIG_VP9_QSV_ENCODER) += qsvenc_vp9.o @@ -1083,7 +1088,7 @@ OBJS-$(CONFIG_LIBARIBCAPTION_DECODER) += libaribcaption.o ass.o OBJS-$(CONFIG_LIBCELT_DECODER) += libcelt_dec.o OBJS-$(CONFIG_LIBCODEC2_DECODER) += libcodec2.o OBJS-$(CONFIG_LIBCODEC2_ENCODER) += libcodec2.o -OBJS-$(CONFIG_LIBDAV1D_DECODER) += libdav1d.o +OBJS-$(CONFIG_LIBDAV1D_DECODER) += libdav1d.o av1_parse.o OBJS-$(CONFIG_LIBDAVS2_DECODER) += libdavs2.o OBJS-$(CONFIG_LIBFDK_AAC_DECODER) += libfdk-aacdec.o OBJS-$(CONFIG_LIBFDK_AAC_ENCODER) += libfdk-aacenc.o @@ -1102,7 +1107,6 @@ OBJS-$(CONFIG_LIBOPENCORE_AMRNB_ENCODER) += libopencore-amr.o OBJS-$(CONFIG_LIBOPENCORE_AMRWB_DECODER) += libopencore-amr.o OBJS-$(CONFIG_LIBOPENH264_DECODER) += libopenh264dec.o libopenh264.o OBJS-$(CONFIG_LIBOPENH264_ENCODER) += libopenh264enc.o libopenh264.o -OBJS-$(CONFIG_LIBOPENJPEG_DECODER) += libopenjpegdec.o OBJS-$(CONFIG_LIBOPENJPEG_ENCODER) += libopenjpegenc.o OBJS-$(CONFIG_LIBOPUS_DECODER) += libopusdec.o libopus.o \ vorbis_data.o @@ -1141,7 +1145,7 @@ OBJS-$(CONFIG_AC3_PARSER) += aac_ac3_parser.o ac3tab.o \ ac3_channel_layout_tab.o OBJS-$(CONFIG_ADX_PARSER) += adx_parser.o OBJS-$(CONFIG_AMR_PARSER) += amr_parser.o -OBJS-$(CONFIG_AV1_PARSER) += av1_parser.o +OBJS-$(CONFIG_AV1_PARSER) += av1_parser.o av1_parse.o OBJS-$(CONFIG_AVS2_PARSER) += avs2.o avs2_parser.o OBJS-$(CONFIG_AVS3_PARSER) += avs3_parser.o OBJS-$(CONFIG_BMP_PARSER) += bmp_parser.o diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/aacpsy.c b/arm/raspi/third_party/ffmpeg/libavcodec/aacpsy.c index 4c5ab2c9..933369e4 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/aacpsy.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/aacpsy.c @@ -267,7 +267,7 @@ static av_cold void lame_window_init(AacPsyContext *ctx, AVCodecContext *avctx) AacPsyChannel *pch = &ctx->ch[i]; if (avctx->flags & AV_CODEC_FLAG_QSCALE) - pch->attack_threshold = psy_vbr_map[avctx->global_quality / FF_QP2LAMBDA].st_lrm; + pch->attack_threshold = psy_vbr_map[av_clip(avctx->global_quality / FF_QP2LAMBDA, 0, 10)].st_lrm; else pch->attack_threshold = lame_calc_attack_threshold(avctx->bit_rate / avctx->ch_layout.nb_channels / 1000); diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/aarch64/Makefile b/arm/raspi/third_party/ffmpeg/libavcodec/aarch64/Makefile index 02fb51c3..21619164 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/aarch64/Makefile +++ b/arm/raspi/third_party/ffmpeg/libavcodec/aarch64/Makefile @@ -65,7 +65,8 @@ NEON-OBJS-$(CONFIG_VP9_DECODER) += aarch64/vp9itxfm_16bpp_neon.o \ aarch64/vp9lpf_neon.o \ aarch64/vp9mc_16bpp_neon.o \ aarch64/vp9mc_neon.o -NEON-OBJS-$(CONFIG_HEVC_DECODER) += aarch64/hevcdsp_idct_neon.o \ +NEON-OBJS-$(CONFIG_HEVC_DECODER) += aarch64/hevcdsp_deblock_neon.o \ + aarch64/hevcdsp_idct_neon.o \ aarch64/hevcdsp_init_aarch64.o \ aarch64/hevcdsp_qpel_neon.o \ aarch64/hevcdsp_sao_neon.o diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/aarch64/hevcdsp_deblock_neon.S b/arm/raspi/third_party/ffmpeg/libavcodec/aarch64/hevcdsp_deblock_neon.S new file mode 100644 index 00000000..8227f656 --- /dev/null +++ b/arm/raspi/third_party/ffmpeg/libavcodec/aarch64/hevcdsp_deblock_neon.S @@ -0,0 +1,183 @@ +/* -*-arm64-*- + * vim: syntax=arm64asm + * + * Copyright (c) 2014 Seppo Tomperi + * Copyright (c) 2023 J. Dekker + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + + +#include "libavutil/aarch64/asm.S" +#include "neon.S" + +.macro hevc_loop_filter_chroma_start bitdepth + mov x4, x30 + ldr w14, [x2] + ldr w15, [x2, #4] +.if \bitdepth > 8 + lsl w14, w14, #(\bitdepth - 8) + lsl w15, w15, #(\bitdepth - 8) +.endif + adds w2, w14, w15 + b.eq 1f + dup v16.4h, w14 + dup v17.4h, w15 + trn1 v16.2d, v16.2d, v17.2d +.if \bitdepth > 8 + mvni v19.8h, #((0xff << (\bitdepth - 8)) & 0xff), lsl #8 + movi v18.8h, #0 +.endif + neg v17.8h, v16.8h +.endm + +.macro hevc_loop_filter_chroma_body bitdepth +.if \bitdepth <= 8 + uxtl v20.8h, v0.8b // p1 + uxtl v1.8h, v1.8b // p0 + uxtl v2.8h, v2.8b // q0 + uxtl v23.8h, v3.8b // q1 + va .req v20 + vb .req v23 +.else // required to specify both cases as we are unable to do: v0 .req v20 + va .req v0 + vb .req v3 +.endif + sub v5.8h, v2.8h, v1.8h // q0 - p0 + sub v6.8h, va.8h, vb.8h // p1 - q1 + shl v5.8h, v5.8h, #2 + add v5.8h, v6.8h, v5.8h + srshr v5.8h, v5.8h, #3 + clip v17.8h, v16.8h, v5.8h + sqadd v1.8h, v1.8h, v5.8h // p0 + delta + sqsub v2.8h, v2.8h, v5.8h // q0 - delta +.if \bitdepth <= 8 + sqxtun v1.8b, v1.8h + sqxtun v2.8b, v2.8h +.else + clip v18.8h, v19.8h, v1.8h, v2.8h +.endif +.unreq va +.unreq vb +.endm + +function hevc_loop_filter_chroma_body_8_neon, export=0 + hevc_loop_filter_chroma_body 8 + ret +endfunc + +function hevc_loop_filter_chroma_body_10_neon, export=0 +hevc_loop_filter_chroma_body_12_neon: + hevc_loop_filter_chroma_body 10 + ret +endfunc + +// void ff_hevc_h_loop_filter_chroma_8_neon(uint8_t *_pix, ptrdiff_t _stride, int *_tc, uint8_t *_no_p, uint8_t *_no_q); + +.macro hevc_h_loop_filter_chroma bitdepth +function ff_hevc_h_loop_filter_chroma_\bitdepth\()_neon, export=1 + hevc_loop_filter_chroma_start \bitdepth + sub x0, x0, x1, lsl #1 +.if \bitdepth > 8 + ld1 {v0.8h}, [x0], x1 + ld1 {v1.8h}, [x0], x1 + ld1 {v2.8h}, [x0], x1 + ld1 {v3.8h}, [x0] +.else + ld1 {v0.8b}, [x0], x1 + ld1 {v1.8b}, [x0], x1 + ld1 {v2.8b}, [x0], x1 + ld1 {v3.8b}, [x0] +.endif + sub x0, x0, x1, lsl #1 + bl hevc_loop_filter_chroma_body_\bitdepth\()_neon +.if \bitdepth > 8 + st1 {v1.8h}, [x0], x1 + st1 {v2.8h}, [x0] +.else + st1 {v1.8b}, [x0], x1 + st1 {v2.8b}, [x0] +.endif +1: ret x4 +endfunc +.endm + +.macro hevc_v_loop_filter_chroma bitdepth +function ff_hevc_v_loop_filter_chroma_\bitdepth\()_neon, export=1 + hevc_loop_filter_chroma_start \bitdepth +.if \bitdepth > 8 + sub x0, x0, #4 + add x3, x0, x1 + lsl x1, x1, #1 + ld1 {v0.d}[0], [x0], x1 + ld1 {v1.d}[0], [x3], x1 + ld1 {v2.d}[0], [x0], x1 + ld1 {v3.d}[0], [x3], x1 + ld1 {v0.d}[1], [x0], x1 + ld1 {v1.d}[1], [x3], x1 + ld1 {v2.d}[1], [x0], x1 + ld1 {v3.d}[1], [x3], x1 + transpose_4x8H v0, v1, v2, v3, v28, v29, v30, v31 +.else + sub x0, x0, #2 + add x3, x0, x1 + lsl x1, x1, #1 + ld1 {v0.s}[0], [x0], x1 + ld1 {v1.s}[0], [x3], x1 + ld1 {v2.s}[0], [x0], x1 + ld1 {v3.s}[0], [x3], x1 + ld1 {v0.s}[1], [x0], x1 + ld1 {v1.s}[1], [x3], x1 + ld1 {v2.s}[1], [x0], x1 + ld1 {v3.s}[1], [x3], x1 + transpose_4x8B v0, v1, v2, v3, v28, v29, v30, v31 +.endif + sub x0, x0, x1, lsl #2 + sub x3, x3, x1, lsl #2 + bl hevc_loop_filter_chroma_body_\bitdepth\()_neon +.if \bitdepth > 8 + transpose_4x8H v0, v1, v2, v3, v28, v29, v30, v31 + st1 {v0.d}[0], [x0], x1 + st1 {v1.d}[0], [x3], x1 + st1 {v2.d}[0], [x0], x1 + st1 {v3.d}[0], [x3], x1 + st1 {v0.d}[1], [x0], x1 + st1 {v1.d}[1], [x3], x1 + st1 {v2.d}[1], [x0], x1 + st1 {v3.d}[1], [x3] +.else + transpose_4x8B v0, v1, v2, v3, v28, v29, v30, v31 + st1 {v0.s}[0], [x0], x1 + st1 {v1.s}[0], [x3], x1 + st1 {v2.s}[0], [x0], x1 + st1 {v3.s}[0], [x3], x1 + st1 {v0.s}[1], [x0], x1 + st1 {v1.s}[1], [x3], x1 + st1 {v2.s}[1], [x0], x1 + st1 {v3.s}[1], [x3] +.endif +1: ret x4 +endfunc +.endm + +hevc_h_loop_filter_chroma 8 +hevc_h_loop_filter_chroma 10 +hevc_h_loop_filter_chroma 12 + +hevc_v_loop_filter_chroma 8 +hevc_v_loop_filter_chroma 10 +hevc_v_loop_filter_chroma 12 diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/aarch64/hevcdsp_idct_neon.S b/arm/raspi/third_party/ffmpeg/libavcodec/aarch64/hevcdsp_idct_neon.S index 3e59dd20..b7f23386 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/aarch64/hevcdsp_idct_neon.S +++ b/arm/raspi/third_party/ffmpeg/libavcodec/aarch64/hevcdsp_idct_neon.S @@ -6,6 +6,7 @@ * Ported from arm/hevcdsp_idct_neon.S by * Copyright (c) 2020 Reimar Döffinger * Copyright (c) 2023 J. Dekker + * Copyright (c) 2023 xu fulong <839789740@qq.com> * * This file is part of FFmpeg. * @@ -477,34 +478,52 @@ endfunc sqrshrn2 \out3\().8h, \in7, \shift .endm -.macro transpose16_4x4_2 r0, r1, r2, r3 +// use temp register to transpose, then we can reuse it +.macro transpose16_4x4_2 r0, r1, r2, r3, tmp0, tmp1, tmp2, tmp3, tmp4, tmp5 // lower halves - trn1 v2.4h, \r0\().4h, \r1\().4h - trn2 v3.4h, \r0\().4h, \r1\().4h - trn1 v4.4h, \r2\().4h, \r3\().4h - trn2 v5.4h, \r2\().4h, \r3\().4h - trn1 v6.2s, v2.2s, v4.2s - trn2 v7.2s, v2.2s, v4.2s - trn1 v2.2s, v3.2s, v5.2s - trn2 v4.2s, v3.2s, v5.2s - mov \r0\().d[0], v6.d[0] - mov \r2\().d[0], v7.d[0] - mov \r1\().d[0], v2.d[0] - mov \r3\().d[0], v4.d[0] + trn1 \tmp0\().4h, \r0\().4h, \r1\().4h + trn2 \tmp1\().4h, \r0\().4h, \r1\().4h + trn1 \tmp2\().4h, \r2\().4h, \r3\().4h + trn2 \tmp3\().4h, \r2\().4h, \r3\().4h + trn1 \tmp4\().2s, \tmp0\().2s, \tmp2\().2s + trn2 \tmp5\().2s, \tmp0\().2s, \tmp2\().2s + trn1 \tmp0\().2s, \tmp1\().2s, \tmp3\().2s + trn2 \tmp2\().2s, \tmp1\().2s, \tmp3\().2s + mov \r0\().d[0], \tmp4\().d[0] + mov \r2\().d[0], \tmp5\().d[0] + mov \r1\().d[0], \tmp0\().d[0] + mov \r3\().d[0], \tmp2\().d[0] // upper halves in reverse order - trn1 v2.8h, \r3\().8h, \r2\().8h - trn2 v3.8h, \r3\().8h, \r2\().8h - trn1 v4.8h, \r1\().8h, \r0\().8h - trn2 v5.8h, \r1\().8h, \r0\().8h - trn1 v6.4s, v2.4s, v4.4s - trn2 v7.4s, v2.4s, v4.4s - trn1 v2.4s, v3.4s, v5.4s - trn2 v4.4s, v3.4s, v5.4s - mov \r3\().d[1], v6.d[1] - mov \r1\().d[1], v7.d[1] - mov \r2\().d[1], v2.d[1] - mov \r0\().d[1], v4.d[1] + trn1 \tmp0\().8h, \r3\().8h, \r2\().8h + trn2 \tmp1\().8h, \r3\().8h, \r2\().8h + trn1 \tmp2\().8h, \r1\().8h, \r0\().8h + trn2 \tmp3\().8h, \r1\().8h, \r0\().8h + trn1 \tmp4\().4s, \tmp0\().4s, \tmp2\().4s + trn2 \tmp5\().4s, \tmp0\().4s, \tmp2\().4s + trn1 \tmp0\().4s, \tmp1\().4s, \tmp3\().4s + trn2 \tmp2\().4s, \tmp1\().4s, \tmp3\().4s + mov \r3\().d[1], \tmp4\().d[1] + mov \r1\().d[1], \tmp5\().d[1] + mov \r2\().d[1], \tmp0\().d[1] + mov \r0\().d[1], \tmp2\().d[1] +.endm + +// stores in0, in2, in4, in6 ascending from off1 and +// stores in1, in3, in5, in7 descending from off2 +.macro store_to_stack off1, off2, in0, in2, in4, in6, in7, in5, in3, in1 + add x1, sp, #\off1 + add x3, sp, #\off2 + mov x2, #-16 + mov x4, #16 + st1 {\in0}, [x1], x4 + st1 {\in1}, [x3], x2 + st1 {\in2}, [x1], x4 + st1 {\in3}, [x3], x2 + st1 {\in4}, [x1], x4 + st1 {\in5}, [x3], x2 + st1 {\in6}, [x1] + st1 {\in7}, [x3] .endm .macro tr_16x4 name, shift, offset, step @@ -543,27 +562,34 @@ function func_tr_16x4_\name add x4, sp, #\offset ld1 {v16.4s-v19.4s}, [x4], #64 - butterfly16 v16.4s, v21.4s, v17.4s, v22.4s, v18.4s, v23.4s, v19.4s, v24.4s + .if \shift > 0 scale v29, v30, v31, v24, v20.4s, v16.4s, v21.4s, v17.4s, v22.4s, v18.4s, v23.4s, v19.4s, \shift - transpose16_4x4_2 v29, v30, v31, v24 + transpose16_4x4_2 v29, v30, v31, v24, v2, v3, v4, v5, v6, v7 mov x1, x6 add x3, x6, #(24 +3*32) mov x2, #32 mov x4, #-32 store16 v29.d, v30.d, v31.d, v24.d, x4 + .else + store_to_stack \offset, (\offset + 240), v20.4s, v21.4s, v22.4s, v23.4s, v19.4s, v18.4s, v17.4s, v16.4s + .endif add x4, sp, #(\offset + 64) ld1 {v16.4s-v19.4s}, [x4] butterfly16 v16.4s, v25.4s, v17.4s, v26.4s, v18.4s, v27.4s, v19.4s, v28.4s + .if \shift > 0 scale v29, v30, v31, v20, v20.4s, v16.4s, v25.4s, v17.4s, v26.4s, v18.4s, v27.4s, v19.4s, \shift - transpose16_4x4_2 v29, v30, v31, v20 + transpose16_4x4_2 v29, v30, v31, v20, v2, v3, v4, v5, v6, v7 add x1, x6, #8 add x3, x6, #(16 + 3 * 32) mov x2, #32 mov x4, #-32 store16 v29.d, v30.d, v31.d, v20.d, x4 + .else + store_to_stack (\offset + 64), (\offset + 176), v20.4s, v25.4s, v26.4s, v27.4s, v19.4s, v18.4s, v17.4s, v16.4s + .endif ret endfunc @@ -596,6 +622,203 @@ function ff_hevc_idct_16x16_\bitdepth\()_neon, export=1 endfunc .endm +.macro load32 + add x1, x5, #64 + add x3, x1, #128 + mov x2, #256 + ld1 {v4.d}[0], [x1], x2 + ld1 {v4.d}[1], [x3], x2 + ld1 {v5.d}[0], [x1], x2 + ld1 {v5.d}[1], [x3], x2 + ld1 {v6.d}[0], [x1], x2 + ld1 {v6.d}[1], [x3], x2 + ld1 {v7.d}[0], [x1], x2 + ld1 {v7.d}[1], [x3], x2 + ld1 {v16.d}[0], [x1], x2 + ld1 {v16.d}[1], [x3], x2 + ld1 {v17.d}[0], [x1], x2 + ld1 {v17.d}[1], [x3], x2 + ld1 {v18.d}[0], [x1], x2 + ld1 {v18.d}[1], [x3], x2 + ld1 {v19.d}[0], [x1], x2 + ld1 {v19.d}[1], [x3], x2 +.endm + +.macro add_member32 in, t0, t1, t2, t3, op0, op1, op2, op3, p + sum_sub v24.4s, \in, \t0, \op0, \p + sum_sub v25.4s, \in, \t1, \op1, \p + sum_sub v26.4s, \in, \t2, \op2, \p + sum_sub v27.4s, \in, \t3, \op3, \p +.endm + +.macro butterfly32 in0, in1, in2, in3, out + add \out, \in0, \in1 + sub \in0, \in0, \in1 + add \in1, \in2, \in3 + sub \in2, \in2, \in3 +.endm + +.macro multiply in + smull v24.4s, v4.4h, \in\().h[0] + smull v25.4s, v4.4h, \in\().h[1] + smull v26.4s, v4.4h, \in\().h[2] + smull v27.4s, v4.4h, \in\().h[3] +.endm + +.macro scale_store shift + ld1 {v28.8h-v31.8h}, [x4], #64 + butterfly32 v28.4s, v24.4s, v29.4s, v25.4s, v2.4s + butterfly32 v30.4s, v26.4s, v31.4s, v27.4s, v3.4s + scale v20, v21, v22, v23, v2.4s, v28.4s, v24.4s, v29.4s, v3.4s, v30.4s, v26.4s, v31.4s, \shift + + transpose16_4x4_2 v20, v21, v22, v23, v24, v25, v26, v27, v28, v29 + store16 v20.d, v21.d, v22.d, v23.d, x8 + + // reload coefficients + ld1 {v2.4h-v3.4h}, [x9] +.endm + +function tr_block1 + multiply v0 + add_member32 v4.8h, v0.h[1], v1.h[0], v1.h[3], v2.h[2], +, +, +, +, 2 + add_member32 v5.4h, v0.h[2], v1.h[3], v3.h[0], v3.h[2], +, +, +, - + add_member32 v5.8h, v0.h[3], v2.h[2], v3.h[2], v1.h[3], +, +, -, -, 2 + add_member32 v6.4h, v1.h[0], v3.h[1], v2.h[1], v0.h[0], +, +, -, - + add_member32 v6.8h, v1.h[1], v3.h[3], v1.h[0], v1.h[2], +, -, -, -, 2 + add_member32 v7.4h, v1.h[2], v3.h[0], v0.h[0], v3.h[1], +, -, -, - + add_member32 v7.8h, v1.h[3], v2.h[1], v1.h[1], v2.h[3], +, -, -, +, 2 + add_member32 v16.4h, v2.h[0], v1.h[2], v2.h[2], v1.h[0], +, -, -, + + add_member32 v16.8h, v2.h[1], v0.h[3], v3.h[3], v0.h[2], +, -, -, +, 2 + add_member32 v17.4h, v2.h[2], v0.h[1], v2.h[3], v2.h[1], +, -, +, + + add_member32 v17.8h, v2.h[3], v0.h[2], v1.h[2], v3.h[3], +, -, +, -, 2 + add_member32 v18.4h, v3.h[0], v1.h[1], v0.h[1], v2.h[0], +, -, +, - + add_member32 v18.8h, v3.h[1], v2.h[0], v0.h[3], v0.h[1], +, -, +, -, 2 + add_member32 v19.4h, v3.h[2], v2.h[3], v2.h[0], v1.h[1], +, -, +, - + add_member32 v19.8h, v3.h[3], v3.h[2], v3.h[1], v3.h[0], +, -, +, -, 2 + ret +endfunc + +function tr_block2 + multiply v1 + add_member32 v4.8h, v3.h[1], v3.h[3], v3.h[0], v2.h[1], +, -, -, -, 2 + add_member32 v5.4h, v2.h[1], v1.h[0], v0.h[0], v1.h[1], -, -, -, - + add_member32 v5.8h, v0.h[0], v1.h[2], v3.h[1], v2.h[3], -, -, -, +, 2 + add_member32 v6.4h, v2.h[0], v3.h[2], v1.h[1], v0.h[3], -, +, +, + + add_member32 v6.8h, v3.h[2], v0.h[3], v1.h[3], v3.h[1], +, +, +, -, 2 + add_member32 v7.4h, v1.h[1], v1.h[3], v2.h[3], v0.h[0], +, +, -, - + add_member32 v7.8h, v0.h[3], v3.h[1], v0.h[1], v3.h[3], +, -, -, +, 2 + add_member32 v16.4h, v3.h[0], v0.h[2], v3.h[2], v0.h[1], +, -, -, + + add_member32 v16.8h, v2.h[2], v2.h[0], v1.h[0], v3.h[2], -, -, +, +, 2 + add_member32 v17.4h, v0.h[1], v3.h[0], v2.h[0], v0.h[2], -, +, +, - + add_member32 v17.8h, v1.h[3], v0.h[1], v2.h[2], v3.h[0], -, +, -, -, 2 + add_member32 v18.4h, v3.h[3], v2.h[1], v0.h[2], v1.h[0], +, +, -, + + add_member32 v18.8h, v1.h[2], v2.h[3], v3.h[3], v2.h[2], +, -, -, +, 2 + add_member32 v19.4h, v0.h[2], v0.h[1], v0.h[3], v1.h[2], +, -, +, - + add_member32 v19.8h, v2.h[3], v2.h[2], v2.h[1], v2.h[0], +, -, +, -, 2 + ret +endfunc + +function tr_block3 + multiply v2 + add_member32 v4.8h, v1.h[2], v0.h[3], v0.h[0], v0.h[2], -, -, -, -, 2 + add_member32 v5.4h, v2.h[2], v3.h[3], v2.h[3], v1.h[2], -, -, +, + + add_member32 v5.8h, v1.h[0], v0.h[2], v2.h[1], v3.h[3], +, +, +, -, 2 + add_member32 v6.4h, v3.h[0], v2.h[2], v0.h[1], v1.h[3], +, -, -, - + add_member32 v6.8h, v0.h[2], v2.h[0], v3.h[0], v0.h[0], -, -, +, +, 2 + add_member32 v7.4h, v3.h[2], v1.h[0], v2.h[0], v2.h[2], -, +, +, - + add_member32 v7.8h, v0.h[0], v3.h[2], v0.h[2], v3.h[0], +, +, -, -, 2 + add_member32 v16.4h, v3.h[3], v0.h[1], v3.h[1], v0.h[3], -, -, +, + + add_member32 v16.8h, v0.h[1], v2.h[3], v1.h[3], v1.h[1], -, +, +, -, 2 + add_member32 v17.4h, v3.h[1], v1.h[3], v0.h[3], v3.h[2], +, +, -, + + add_member32 v17.8h, v0.h[3], v1.h[1], v3.h[2], v2.h[0], +, -, +, +, 2 + add_member32 v18.4h, v2.h[3], v3.h[1], v1.h[2], v0.h[1], -, -, +, - + add_member32 v18.8h, v1.h[1], v0.h[0], v1.h[0], v2.h[1], -, +, -, +, 2 + add_member32 v19.4h, v2.h[1], v3.h[0], v3.h[3], v3.h[1], +, -, +, + + add_member32 v19.8h, v1.h[3], v1.h[2], v1.h[1], v1.h[0], +, -, +, -, 2 + ret +endfunc + +function tr_block4 + multiply v3 + add_member32 v4.8h, v1.h[1], v2.h[0], v2.h[3], v3.h[2], -, -, -, -, 2 + add_member32 v5.4h, v0.h[0], v0.h[3], v2.h[0], v3.h[1], +, +, +, + + add_member32 v5.8h, v2.h[0], v0.h[0], v1.h[1], v3.h[0], -, -, -, -, 2 + add_member32 v6.4h, v3.h[3], v1.h[2], v0.h[2], v2.h[3], +, +, +, + + add_member32 v6.8h, v2.h[1], v2.h[3], v0.h[0], v2.h[2], +, -, -, -, 2 + add_member32 v7.4h, v0.h[2], v3.h[3], v0.h[3], v2.h[1], -, -, +, + + add_member32 v7.8h, v1.h[0], v2.h[2], v1.h[2], v2.h[0], +, +, -, -, 2 + add_member32 v16.4h, v2.h[3], v1.h[1], v2.h[1], v1.h[3], -, -, +, + + add_member32 v16.8h, v3.h[1], v0.h[1], v3.h[0], v1.h[2], -, +, -, -, 2 + add_member32 v17.4h, v1.h[2], v1.h[0], v3.h[3], v1.h[1], +, -, +, + + add_member32 v17.8h, v0.h[1], v2.h[1], v3.h[1], v1.h[0], -, +, +, -, 2 + add_member32 v18.4h, v1.h[3], v3.h[2], v2.h[2], v0.h[3], +, -, -, + + add_member32 v18.8h, v3.h[2], v3.h[0], v1.h[3], v0.h[2], -, -, +, -, 2 + add_member32 v19.4h, v2.h[2], v1.h[3], v1.h[0], v0.h[1], -, +, -, + + add_member32 v19.8h, v0.h[3], v0.h[2], v0.h[1], v0.h[0], +, -, +, -, 2 + ret +endfunc + +.macro tr_32x4 name, shift +function func_tr_32x4_\name + mov x10, x30 + bl func_tr_16x4_noscale + + load32 + movrel x9, trans, 32 + ld1 {v0.4h-v1.4h}, [x9], #16 + ld1 {v2.4h-v3.4h}, [x9] + add x4, sp, #2048 + mov x2, #64 + mov x8, #-64 + + bl tr_block1 + mov x1, x11 + add x3, x11, #(56 + 3 * 64) + scale_store \shift + + bl tr_block2 + add x1, x11, #8 + add x3, x11, #(48 + 3 * 64) + scale_store \shift + + bl tr_block3 + add x1, x11, #16 + add x3, x11, #(40 + 3 * 64) + scale_store \shift + + bl tr_block4 + add x1, x11, #24 + add x3, x11, #(32 + 3 * 64) + scale_store \shift + + br x10 +endfunc +.endm + +.macro idct_32x32 bitdepth +function ff_hevc_idct_32x32_\bitdepth\()_neon, export=1 + mov x15, x30 + // allocate a temp buffer + sub sp, sp, #2432 + +.irp i, 0, 1, 2, 3, 4, 5, 6, 7 + add x5, x0, #(8 * \i) + add x11, sp, #(8 * \i * 32) + bl func_tr_32x4_firstpass +.endr + +.irp i, 0, 1, 2, 3, 4, 5, 6, 7 + add x5, sp, #(8 * \i) + add x11, x0, #(8 * \i * 32) + bl func_tr_32x4_secondpass_\bitdepth +.endr + + add sp, sp, #2432 + mov x30, x15 + ret +endfunc +.endm + idct_4x4 8 idct_4x4 10 @@ -605,10 +828,68 @@ idct_8x8 10 tr_16x4 firstpass, 7, 512, 1 tr_16x4 secondpass_8, 20 - 8, 512, 1 tr_16x4 secondpass_10, 20 - 10, 512, 1 +tr_16x4 noscale, 0, 2048, 4 idct_16x16 8 idct_16x16 10 +.ltorg +tr_32x4 firstpass, 7 +tr_32x4 secondpass_8, 20 - 8 +tr_32x4 secondpass_10, 20 - 10 +.ltorg + +idct_32x32 8 +idct_32x32 10 + +.macro tr4_luma_shift r0, r1, r2, r3, shift + saddl v0.4s, \r0, \r2 // c0 = src0 + src2 + saddl v1.4s, \r2, \r3 // c1 = src2 + src3 + ssubl v2.4s, \r0, \r3 // c2 = src0 - src3 + smull v3.4s, \r1, v21.4h // c3 = 74 * src1 + + saddl v7.4s, \r0, \r3 // src0 + src3 + ssubw v7.4s, v7.4s, \r2 // src0 - src2 + src3 + mul v7.4s, v7.4s, v18.4s // dst2 = 74 * (src0 - src2 + src3) + + mul v5.4s, v0.4s, v19.4s // 29 * c0 + mul v6.4s, v1.4s, v20.4s // 55 * c1 + add v5.4s, v5.4s, v6.4s // 29 * c0 + 55 * c1 + add v5.4s, v5.4s, v3.4s // dst0 = 29 * c0 + 55 * c1 + c3 + + mul v1.4s, v1.4s, v19.4s // 29 * c1 + mul v6.4s, v2.4s, v20.4s // 55 * c2 + sub v6.4s, v6.4s, v1.4s // 55 * c2 - 29 * c1 + add v6.4s, v6.4s, v3.4s // dst1 = 55 * c2 - 29 * c1 + c3 + + mul v0.4s, v0.4s, v20.4s // 55 * c0 + mul v2.4s, v2.4s, v19.4s // 29 * c2 + add v0.4s, v0.4s, v2.4s // 55 * c0 + 29 * c2 + sub v0.4s, v0.4s, v3.4s // dst3 = 55 * c0 + 29 * c2 - c3 + + sqrshrn \r0, v5.4s, \shift + sqrshrn \r1, v6.4s, \shift + sqrshrn \r2, v7.4s, \shift + sqrshrn \r3, v0.4s, \shift +.endm + +function ff_hevc_transform_luma_4x4_neon_8, export=1 + ld1 {v28.4h-v31.4h}, [x0] + movi v18.4s, #74 + movi v19.4s, #29 + movi v20.4s, #55 + movi v21.4h, #74 + + tr4_luma_shift v28.4h, v29.4h, v30.4h, v31.4h, #7 + transpose_4x4H v28, v29, v30, v31, v22, v23, v24, v25 + + tr4_luma_shift v28.4h, v29.4h, v30.4h, v31.4h, #12 + transpose_4x4H v28, v29, v30, v31, v22, v23, v24, v25 + + st1 {v28.4h-v31.4h}, [x0] + ret +endfunc + // void ff_hevc_idct_NxN_dc_DEPTH_neon(int16_t *coeffs) .macro idct_dc size, bitdepth function ff_hevc_idct_\size\()x\size\()_dc_\bitdepth\()_neon, export=1 diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/aarch64/hevcdsp_init_aarch64.c b/arm/raspi/third_party/ffmpeg/libavcodec/aarch64/hevcdsp_init_aarch64.c index 1deefca0..be1049a2 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/aarch64/hevcdsp_init_aarch64.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/aarch64/hevcdsp_init_aarch64.c @@ -1,5 +1,6 @@ /* * Copyright (c) 2020 Reimar Döffinger + * Copyright (c) 2023 xu fulong <839789740@qq.com> * * This file is part of FFmpeg. * @@ -25,6 +26,18 @@ #include "libavutil/aarch64/cpu.h" #include "libavcodec/hevcdsp.h" +void ff_hevc_v_loop_filter_chroma_8_neon(uint8_t *_pix, ptrdiff_t _stride, + const int *_tc, const uint8_t *_no_p, const uint8_t *_no_q); +void ff_hevc_v_loop_filter_chroma_10_neon(uint8_t *_pix, ptrdiff_t _stride, + const int *_tc, const uint8_t *_no_p, const uint8_t *_no_q); +void ff_hevc_v_loop_filter_chroma_12_neon(uint8_t *_pix, ptrdiff_t _stride, + const int *_tc, const uint8_t *_no_p, const uint8_t *_no_q); +void ff_hevc_h_loop_filter_chroma_8_neon(uint8_t *_pix, ptrdiff_t _stride, + const int *_tc, const uint8_t *_no_p, const uint8_t *_no_q); +void ff_hevc_h_loop_filter_chroma_10_neon(uint8_t *_pix, ptrdiff_t _stride, + const int *_tc, const uint8_t *_no_p, const uint8_t *_no_q); +void ff_hevc_h_loop_filter_chroma_12_neon(uint8_t *_pix, ptrdiff_t _stride, + const int *_tc, const uint8_t *_no_p, const uint8_t *_no_q); void ff_hevc_add_residual_4x4_8_neon(uint8_t *_dst, const int16_t *coeffs, ptrdiff_t stride); void ff_hevc_add_residual_4x4_10_neon(uint8_t *_dst, const int16_t *coeffs, @@ -55,6 +68,8 @@ void ff_hevc_idct_8x8_8_neon(int16_t *coeffs, int col_limit); void ff_hevc_idct_8x8_10_neon(int16_t *coeffs, int col_limit); void ff_hevc_idct_16x16_8_neon(int16_t *coeffs, int col_limit); void ff_hevc_idct_16x16_10_neon(int16_t *coeffs, int col_limit); +void ff_hevc_idct_32x32_8_neon(int16_t *coeffs, int col_limit); +void ff_hevc_idct_32x32_10_neon(int16_t *coeffs, int col_limit); void ff_hevc_idct_4x4_dc_8_neon(int16_t *coeffs); void ff_hevc_idct_8x8_dc_8_neon(int16_t *coeffs); void ff_hevc_idct_16x16_dc_8_neon(int16_t *coeffs); @@ -63,6 +78,7 @@ void ff_hevc_idct_4x4_dc_10_neon(int16_t *coeffs); void ff_hevc_idct_8x8_dc_10_neon(int16_t *coeffs); void ff_hevc_idct_16x16_dc_10_neon(int16_t *coeffs); void ff_hevc_idct_32x32_dc_10_neon(int16_t *coeffs); +void ff_hevc_transform_luma_4x4_neon_8(int16_t *coeffs); void ff_hevc_sao_band_filter_8x8_8_neon(uint8_t *_dst, const uint8_t *_src, ptrdiff_t stride_dst, ptrdiff_t stride_src, const int16_t *sao_offset_val, int sao_left_class, @@ -117,6 +133,8 @@ av_cold void ff_hevc_dsp_init_aarch64(HEVCDSPContext *c, const int bit_depth) if (!have_neon(av_get_cpu_flags())) return; if (bit_depth == 8) { + c->hevc_h_loop_filter_chroma = ff_hevc_h_loop_filter_chroma_8_neon; + c->hevc_v_loop_filter_chroma = ff_hevc_v_loop_filter_chroma_8_neon; c->add_residual[0] = ff_hevc_add_residual_4x4_8_neon; c->add_residual[1] = ff_hevc_add_residual_8x8_8_neon; c->add_residual[2] = ff_hevc_add_residual_16x16_8_neon; @@ -124,10 +142,12 @@ av_cold void ff_hevc_dsp_init_aarch64(HEVCDSPContext *c, const int bit_depth) c->idct[0] = ff_hevc_idct_4x4_8_neon; c->idct[1] = ff_hevc_idct_8x8_8_neon; c->idct[2] = ff_hevc_idct_16x16_8_neon; + c->idct[3] = ff_hevc_idct_32x32_8_neon; c->idct_dc[0] = ff_hevc_idct_4x4_dc_8_neon; c->idct_dc[1] = ff_hevc_idct_8x8_dc_8_neon; c->idct_dc[2] = ff_hevc_idct_16x16_dc_8_neon; c->idct_dc[3] = ff_hevc_idct_32x32_dc_8_neon; + c->transform_4x4_luma = ff_hevc_transform_luma_4x4_neon_8; c->sao_band_filter[0] = c->sao_band_filter[1] = c->sao_band_filter[2] = @@ -167,6 +187,8 @@ av_cold void ff_hevc_dsp_init_aarch64(HEVCDSPContext *c, const int bit_depth) c->put_hevc_qpel_bi[9][0][1] = ff_hevc_put_hevc_qpel_bi_h16_8_neon; } if (bit_depth == 10) { + c->hevc_h_loop_filter_chroma = ff_hevc_h_loop_filter_chroma_10_neon; + c->hevc_v_loop_filter_chroma = ff_hevc_v_loop_filter_chroma_10_neon; c->add_residual[0] = ff_hevc_add_residual_4x4_10_neon; c->add_residual[1] = ff_hevc_add_residual_8x8_10_neon; c->add_residual[2] = ff_hevc_add_residual_16x16_10_neon; @@ -174,12 +196,15 @@ av_cold void ff_hevc_dsp_init_aarch64(HEVCDSPContext *c, const int bit_depth) c->idct[0] = ff_hevc_idct_4x4_10_neon; c->idct[1] = ff_hevc_idct_8x8_10_neon; c->idct[2] = ff_hevc_idct_16x16_10_neon; + c->idct[3] = ff_hevc_idct_32x32_10_neon; c->idct_dc[0] = ff_hevc_idct_4x4_dc_10_neon; c->idct_dc[1] = ff_hevc_idct_8x8_dc_10_neon; c->idct_dc[2] = ff_hevc_idct_16x16_dc_10_neon; c->idct_dc[3] = ff_hevc_idct_32x32_dc_10_neon; } if (bit_depth == 12) { + c->hevc_h_loop_filter_chroma = ff_hevc_h_loop_filter_chroma_12_neon; + c->hevc_v_loop_filter_chroma = ff_hevc_v_loop_filter_chroma_12_neon; c->add_residual[0] = ff_hevc_add_residual_4x4_12_neon; c->add_residual[1] = ff_hevc_add_residual_8x8_12_neon; c->add_residual[2] = ff_hevc_add_residual_16x16_12_neon; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/adpcm.c b/arm/raspi/third_party/ffmpeg/libavcodec/adpcm.c index 45169693..59b9ef34 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/adpcm.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/adpcm.c @@ -1579,11 +1579,11 @@ static int adpcm_decode_frame(AVCodecContext *avctx, AVFrame *frame, nibble[0] = sign_extend(byte & 15, 4); nibble[1] = sign_extend(byte >> 4, 4); - out[2+n*2] = (nibble[0]*(scale<<14) + (history[0]*29336) - (history[1]*13136)) >> 14; + out[2+n*2] = nibble[0]*scale + ((history[0]*3667 - history[1]*1642) >> 11); history[1] = history[0]; history[0] = out[2+n*2]; - out[2+n*2+1] = (nibble[1]*(scale<<14) + (history[0]*29336) - (history[1]*13136)) >> 14; + out[2+n*2+1] = nibble[1]*scale + ((history[0]*3667 - history[1]*1642) >> 11); history[1] = history[0]; history[0] = out[2+n*2+1]; } diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/agm.c b/arm/raspi/third_party/ffmpeg/libavcodec/agm.c index b37f1a42..55cf0b47 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/agm.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/agm.c @@ -1100,7 +1100,10 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, return AVERROR_INVALIDDATA; s->key_frame = (avpkt->flags & AV_PKT_FLAG_KEY); - frame->key_frame = s->key_frame; + if (s->key_frame) + frame->flags |= AV_FRAME_FLAG_KEY; + else + frame->flags &= ~AV_FRAME_FLAG_KEY; frame->pict_type = s->key_frame ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; if (!s->key_frame) { @@ -1171,7 +1174,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, if ((ret = ff_get_buffer(avctx, frame, AV_GET_BUFFER_FLAG_REF)) < 0) return ret; - if (frame->key_frame) { + if (frame->flags & AV_FRAME_FLAG_KEY) { if (!s->dct && !s->rgb) ret = decode_raw_intra(avctx, gbyte, frame); else if (!s->dct && s->rgb) diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/aic.c b/arm/raspi/third_party/ffmpeg/libavcodec/aic.c index 7ba1c02f..f8b0f603 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/aic.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/aic.c @@ -393,7 +393,7 @@ static int aic_decode_frame(AVCodecContext *avctx, AVFrame *frame, ctx->frame = frame; ctx->frame->pict_type = AV_PICTURE_TYPE_I; - ctx->frame->key_frame = 1; + ctx->frame->flags |= AV_FRAME_FLAG_KEY; off = FFALIGN(AIC_HDR_SIZE + ctx->num_x_slices * ctx->mb_height * 2, 4); diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/aliaspixdec.c b/arm/raspi/third_party/ffmpeg/libavcodec/aliaspixdec.c index 45155d79..72f810d4 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/aliaspixdec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/aliaspixdec.c @@ -70,7 +70,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *f, return ret; f->pict_type = AV_PICTURE_TYPE_I; - f->key_frame = 1; + f->flags |= AV_FRAME_FLAG_KEY; x = 0; y = 1; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/allcodecs.c b/arm/raspi/third_party/ffmpeg/libavcodec/allcodecs.c index 3cbb9334..184bb852 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/allcodecs.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/allcodecs.c @@ -251,6 +251,7 @@ extern const FFCodec ff_pbm_encoder; extern const FFCodec ff_pbm_decoder; extern const FFCodec ff_pcx_encoder; extern const FFCodec ff_pcx_decoder; +extern const FFCodec ff_pdv_decoder; extern const FFCodec ff_pfm_encoder; extern const FFCodec ff_pfm_decoder; extern const FFCodec ff_pgm_encoder; @@ -782,7 +783,6 @@ extern const FFCodec ff_libopencore_amrnb_encoder; extern const FFCodec ff_libopencore_amrnb_decoder; extern const FFCodec ff_libopencore_amrwb_decoder; extern const FFCodec ff_libopenjpeg_encoder; -extern const FFCodec ff_libopenjpeg_decoder; extern const FFCodec ff_libopus_encoder; extern const FFCodec ff_libopus_decoder; extern const FFCodec ff_librav1e_encoder; @@ -836,6 +836,7 @@ extern const FFCodec ff_libaom_av1_decoder; extern const FFCodec ff_av1_decoder; extern const FFCodec ff_av1_cuvid_decoder; extern const FFCodec ff_av1_mediacodec_decoder; +extern const FFCodec ff_av1_mediacodec_encoder; extern const FFCodec ff_av1_nvenc_encoder; extern const FFCodec ff_av1_qsv_decoder; extern const FFCodec ff_av1_qsv_encoder; @@ -873,17 +874,20 @@ extern const FFCodec ff_mpeg2_qsv_encoder; extern const FFCodec ff_mpeg2_vaapi_encoder; extern const FFCodec ff_mpeg4_cuvid_decoder; extern const FFCodec ff_mpeg4_mediacodec_decoder; +extern const FFCodec ff_mpeg4_mediacodec_encoder; extern const FFCodec ff_mpeg4_omx_encoder; extern const FFCodec ff_mpeg4_v4l2m2m_encoder; extern const FFCodec ff_prores_videotoolbox_encoder; extern const FFCodec ff_vc1_cuvid_decoder; extern const FFCodec ff_vp8_cuvid_decoder; extern const FFCodec ff_vp8_mediacodec_decoder; +extern const FFCodec ff_vp8_mediacodec_encoder; extern const FFCodec ff_vp8_qsv_decoder; extern const FFCodec ff_vp8_v4l2m2m_encoder; extern const FFCodec ff_vp8_vaapi_encoder; extern const FFCodec ff_vp9_cuvid_decoder; extern const FFCodec ff_vp9_mediacodec_decoder; +extern const FFCodec ff_vp9_mediacodec_encoder; extern const FFCodec ff_vp9_qsv_decoder; extern const FFCodec ff_vp9_vaapi_encoder; extern const FFCodec ff_vp9_qsv_encoder; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/alsdec.c b/arm/raspi/third_party/ffmpeg/libavcodec/alsdec.c index 4605b224..c64d1032 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/alsdec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/alsdec.c @@ -2190,6 +2190,10 @@ const FFCodec ff_als_decoder = { .close = decode_end, FF_CODEC_DECODE_CB(decode_frame), .flush = flush, - .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF, + .p.capabilities = +#if FF_API_SUBFRAMES + AV_CODEC_CAP_SUBFRAMES | +#endif + AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, }; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/amfenc_av1.c b/arm/raspi/third_party/ffmpeg/libavcodec/amfenc_av1.c index 8093cb73..ad09b791 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/amfenc_av1.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/amfenc_av1.c @@ -117,7 +117,13 @@ static av_cold int amf_encode_init_av1(AVCodecContext* avctx) framerate = AMFConstructRate(avctx->framerate.num, avctx->framerate.den); } else { - framerate = AMFConstructRate(avctx->time_base.den, avctx->time_base.num * avctx->ticks_per_frame); +FF_DISABLE_DEPRECATION_WARNINGS + framerate = AMFConstructRate(avctx->time_base.den, avctx->time_base.num +#if FF_API_TICKS_PER_FRAME + * avctx->ticks_per_frame +#endif + ); +FF_ENABLE_DEPRECATION_WARNINGS } if ((ret = ff_amf_encode_init(avctx)) < 0) diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/amfenc_h264.c b/arm/raspi/third_party/ffmpeg/libavcodec/amfenc_h264.c index eaf7f974..d2fc3397 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/amfenc_h264.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/amfenc_h264.c @@ -142,7 +142,13 @@ static av_cold int amf_encode_init_h264(AVCodecContext *avctx) if (avctx->framerate.num > 0 && avctx->framerate.den > 0) { framerate = AMFConstructRate(avctx->framerate.num, avctx->framerate.den); } else { - framerate = AMFConstructRate(avctx->time_base.den, avctx->time_base.num * avctx->ticks_per_frame); +FF_DISABLE_DEPRECATION_WARNINGS + framerate = AMFConstructRate(avctx->time_base.den, avctx->time_base.num +#if FF_API_TICKS_PER_FRAME + * avctx->ticks_per_frame +#endif + ); +FF_ENABLE_DEPRECATION_WARNINGS } if ((ret = ff_amf_encode_init(avctx)) != 0) diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/amfenc_hevc.c b/arm/raspi/third_party/ffmpeg/libavcodec/amfenc_hevc.c index 9b46946f..674a4095 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/amfenc_hevc.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/amfenc_hevc.c @@ -109,7 +109,13 @@ static av_cold int amf_encode_init_hevc(AVCodecContext *avctx) if (avctx->framerate.num > 0 && avctx->framerate.den > 0) { framerate = AMFConstructRate(avctx->framerate.num, avctx->framerate.den); } else { - framerate = AMFConstructRate(avctx->time_base.den, avctx->time_base.num * avctx->ticks_per_frame); +FF_DISABLE_DEPRECATION_WARNINGS + framerate = AMFConstructRate(avctx->time_base.den, avctx->time_base.num +#if FF_API_TICKS_PER_FRAME + * avctx->ticks_per_frame +#endif + ); +FF_ENABLE_DEPRECATION_WARNINGS } if ((ret = ff_amf_encode_init(avctx)) < 0) diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/ansi.c b/arm/raspi/third_party/ffmpeg/libavcodec/ansi.c index c1e31266..49c3770c 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/ansi.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/ansi.c @@ -262,7 +262,11 @@ static int execute_code(AVCodecContext * avctx, int c) AV_GET_BUFFER_FLAG_REF)) < 0) return ret; s->frame->pict_type = AV_PICTURE_TYPE_I; +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS s->frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif set_palette((uint32_t *)s->frame->data[1]); erase_screen(avctx); } else if (c == 'l') { @@ -371,7 +375,11 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, } s->frame->pict_type = AV_PICTURE_TYPE_I; +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS s->frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif set_palette((uint32_t *)s->frame->data[1]); if (!s->first_frame) { erase_screen(avctx); diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/apac.c b/arm/raspi/third_party/ffmpeg/libavcodec/apac.c index 3408f752..b6cb6c66 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/apac.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/apac.c @@ -269,8 +269,10 @@ const FFCodec ff_apac_decoder = { FF_CODEC_DECODE_CB(apac_decode), .close = apac_close, .p.capabilities = AV_CODEC_CAP_DELAY | - AV_CODEC_CAP_DR1 | - AV_CODEC_CAP_SUBFRAMES, +#if FF_API_SUBFRAMES + AV_CODEC_CAP_SUBFRAMES | +#endif + AV_CODEC_CAP_DR1, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_U8P, AV_SAMPLE_FMT_S16P, diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/apedec.c b/arm/raspi/third_party/ffmpeg/libavcodec/apedec.c index c08d13d6..613c76df 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/apedec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/apedec.c @@ -944,7 +944,7 @@ static void long_filter_high_3800(int32_t *buffer, int order, int shift, int len { int i, j; int32_t dotprod, sign; - int32_t coeffs[256], delay[256]; + int32_t coeffs[256], delay[256+256], *delayp = delay; if (order >= length) return; @@ -955,14 +955,28 @@ static void long_filter_high_3800(int32_t *buffer, int order, int shift, int len for (i = order; i < length; i++) { dotprod = 0; sign = APESIGN(buffer[i]); - for (j = 0; j < order; j++) { - dotprod += delay[j] * (unsigned)coeffs[j]; - coeffs[j] += ((delay[j] >> 31) | 1) * sign; + if (sign == 1) { + for (j = 0; j < order; j++) { + dotprod += delayp[j] * (unsigned)coeffs[j]; + coeffs[j] += (delayp[j] >> 31) | 1; + } + } else if (sign == -1) { + for (j = 0; j < order; j++) { + dotprod += delayp[j] * (unsigned)coeffs[j]; + coeffs[j] -= (delayp[j] >> 31) | 1; + } + } else { + for (j = 0; j < order; j++) { + dotprod += delayp[j] * (unsigned)coeffs[j]; + } } buffer[i] -= (unsigned)(dotprod >> shift); - for (j = 0; j < order - 1; j++) - delay[j] = delay[j + 1]; - delay[order - 1] = buffer[i]; + delayp ++; + delayp[order - 1] = buffer[i]; + if (delayp - delay == 256) { + memcpy(delay, delayp, sizeof(*delay)*256); + delayp = delay; + } } } @@ -1666,7 +1680,11 @@ const FFCodec ff_ape_decoder = { .init = ape_decode_init, .close = ape_decode_close, FF_CODEC_DECODE_CB(ape_decode_frame), - .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DELAY | + .p.capabilities = +#if FF_API_SUBFRAMES + AV_CODEC_CAP_SUBFRAMES | +#endif + AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, .flush = ape_flush, diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/arbc.c b/arm/raspi/third_party/ffmpeg/libavcodec/arbc.c index 343c5669..1b349f4d 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/arbc.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/arbc.c @@ -171,7 +171,10 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, return ret; frame->pict_type = prev_pixels <= 0 ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; - frame->key_frame = prev_pixels <= 0; + if (prev_pixels <= 0) + frame->flags |= AV_FRAME_FLAG_KEY; + else + frame->flags &= ~AV_FRAME_FLAG_KEY; *got_frame = 1; return avpkt->size; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/argo.c b/arm/raspi/third_party/ffmpeg/libavcodec/argo.c index 9bedb139..589feed4 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/argo.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/argo.c @@ -666,7 +666,10 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, return ret; frame->pict_type = s->key ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; - frame->key_frame = s->key; + if (s->key) + frame->flags |= AV_FRAME_FLAG_KEY; + else + frame->flags &= ~AV_FRAME_FLAG_KEY; *got_frame = 1; return avpkt->size; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/asvdec.c b/arm/raspi/third_party/ffmpeg/libavcodec/asvdec.c index 699aab9f..62295b2d 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/asvdec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/asvdec.c @@ -245,7 +245,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, if ((ret = ff_get_buffer(avctx, p, 0)) < 0) return ret; p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; if (avctx->codec_id == AV_CODEC_ID_ASV1) { av_fast_padded_malloc(&a->bitstream_buffer, &a->bitstream_buffer_size, diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/atrac3.c b/arm/raspi/third_party/ffmpeg/libavcodec/atrac3.c index 7415da59..5851ee02 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/atrac3.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/atrac3.c @@ -1026,7 +1026,11 @@ const FFCodec ff_atrac3_decoder = { .init = atrac3_decode_init, .close = atrac3_decode_close, FF_CODEC_DECODE_CB(atrac3_decode_frame), - .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1, + .p.capabilities = +#if FF_API_SUBFRAMES + AV_CODEC_CAP_SUBFRAMES | +#endif + AV_CODEC_CAP_DR1, .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_NONE }, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, @@ -1041,7 +1045,11 @@ const FFCodec ff_atrac3al_decoder = { .init = atrac3_decode_init, .close = atrac3_decode_close, FF_CODEC_DECODE_CB(atrac3al_decode_frame), - .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1, + .p.capabilities = +#if FF_API_SUBFRAMES + AV_CODEC_CAP_SUBFRAMES | +#endif + AV_CODEC_CAP_DR1, .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_NONE }, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/atrac9dec.c b/arm/raspi/third_party/ffmpeg/libavcodec/atrac9dec.c index 60962b16..8a694045 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/atrac9dec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/atrac9dec.c @@ -1003,5 +1003,9 @@ const FFCodec ff_atrac9_decoder = { FF_CODEC_DECODE_CB(atrac9_decode_frame), .flush = atrac9_decode_flush, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, - .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF, + .p.capabilities = +#if FF_API_SUBFRAMES + AV_CODEC_CAP_SUBFRAMES | +#endif + AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF, }; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/av1_parse.c b/arm/raspi/third_party/ffmpeg/libavcodec/av1_parse.c index 59ea0bc6..06163681 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/av1_parse.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/av1_parse.c @@ -56,7 +56,7 @@ int ff_av1_extract_obu(AV1OBU *obu, const uint8_t *buf, int length, void *logctx int ff_av1_packet_split(AV1Packet *pkt, const uint8_t *buf, int length, void *logctx) { GetByteContext bc; - int ret, consumed; + int consumed; bytestream2_init(&bc, buf, length); pkt->nb_obus = 0; @@ -88,16 +88,14 @@ int ff_av1_packet_split(AV1Packet *pkt, const uint8_t *buf, int length, void *lo obu->size_bits = get_obu_bit_length(obu->data, obu->size, obu->type); - if (obu->size_bits < 0 || (!obu->size_bits && obu->type != AV1_OBU_TEMPORAL_DELIMITER)) { + if (obu->size_bits < 0 || + (obu->size_bits == 0 && (obu->type != AV1_OBU_TEMPORAL_DELIMITER && + obu->type != AV1_OBU_PADDING))) { av_log(logctx, AV_LOG_ERROR, "Invalid OBU of type %d, skipping.\n", obu->type); continue; } pkt->nb_obus++; - - ret = init_get_bits(&obu->gb, obu->data, obu->size_bits); - if (ret < 0) - return ret; } return 0; @@ -108,3 +106,17 @@ void ff_av1_packet_uninit(AV1Packet *pkt) av_freep(&pkt->obus); pkt->obus_allocated = pkt->obus_allocated_size = 0; } + +AVRational ff_av1_framerate(int64_t ticks_per_frame, int64_t units_per_tick, + int64_t time_scale) +{ + AVRational fr; + + if (ticks_per_frame && units_per_tick && time_scale && + ticks_per_frame < INT64_MAX / units_per_tick && + av_reduce(&fr.den, &fr.num, units_per_tick * ticks_per_frame, + time_scale, INT_MAX)) + return fr; + + return (AVRational){ 0, 1 }; +} diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/av1_parse.h b/arm/raspi/third_party/ffmpeg/libavcodec/av1_parse.h index f4a5d283..d0abd7ac 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/av1_parse.h +++ b/arm/raspi/third_party/ffmpeg/libavcodec/av1_parse.h @@ -49,9 +49,6 @@ typedef struct AV1OBU { int raw_size; const uint8_t *raw_data; - /** GetBitContext initialized to the start of the payload */ - GetBitContext gb; - int type; int temporal_id; @@ -181,4 +178,7 @@ static inline int get_obu_bit_length(const uint8_t *buf, int size, int type) return size; } +AVRational ff_av1_framerate(int64_t ticks_per_frame, int64_t units_per_tick, + int64_t time_scale); + #endif /* AVCODEC_AV1_PARSE_H */ diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/av1_parser.c b/arm/raspi/third_party/ffmpeg/libavcodec/av1_parser.c index 14dae92f..2b79493b 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/av1_parser.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/av1_parser.c @@ -21,6 +21,8 @@ */ #include "libavutil/avassert.h" + +#include "av1_parse.h" #include "cbs.h" #include "cbs_av1.h" #include "parser.h" @@ -162,11 +164,10 @@ static int av1_parser_parse(AVCodecParserContext *ctx, avctx->color_trc = (enum AVColorTransferCharacteristic) color->transfer_characteristics; avctx->color_range = color->color_range ? AVCOL_RANGE_JPEG : AVCOL_RANGE_MPEG; - if (seq->timing_info_present_flag) { - const AV1RawTimingInfo *timing = &seq->timing_info; - av_reduce(&avctx->framerate.den, &avctx->framerate.num, - timing->num_units_in_display_tick, timing->time_scale, INT_MAX); - } + if (seq->timing_info_present_flag) + avctx->framerate = ff_av1_framerate(1LL + seq->timing_info.num_ticks_per_picture_minus_1, + seq->timing_info.num_units_in_display_tick, + seq->timing_info.time_scale); end: ff_cbs_fragment_reset(td); diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/av1dec.c b/arm/raspi/third_party/ffmpeg/libavcodec/av1dec.c index 807852e3..d46ee483 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/av1dec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/av1dec.c @@ -26,6 +26,7 @@ #include "libavutil/pixdesc.h" #include "libavutil/opt.h" #include "avcodec.h" +#include "av1_parse.h" #include "av1dec.h" #include "atsc_a53.h" #include "bytestream.h" @@ -709,15 +710,10 @@ static int set_context_with_sequence(AVCodecContext *avctx, } avctx->sample_aspect_ratio = (AVRational) { 1, 1 }; - if (seq->timing_info.num_units_in_display_tick && - seq->timing_info.time_scale) { - av_reduce(&avctx->framerate.den, &avctx->framerate.num, - seq->timing_info.num_units_in_display_tick, - seq->timing_info.time_scale, - INT_MAX); - if (seq->timing_info.equal_picture_interval) - avctx->ticks_per_frame = seq->timing_info.num_ticks_per_picture_minus_1 + 1; - } + if (seq->timing_info_present_flag) + avctx->framerate = ff_av1_framerate(1LL + seq->timing_info.num_ticks_per_picture_minus_1, + seq->timing_info.num_units_in_display_tick, + seq->timing_info.time_scale); return 0; } @@ -846,7 +842,10 @@ static int av1_frame_alloc(AVCodecContext *avctx, AV1Frame *f) goto fail; frame = f->f; - frame->key_frame = header->frame_type == AV1_FRAME_KEY; + if (header->frame_type == AV1_FRAME_KEY) + frame->flags |= AV_FRAME_FLAG_KEY; + else + frame->flags &= ~AV_FRAME_FLAG_KEY; switch (header->frame_type) { case AV1_FRAME_KEY: diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/avcodec.c b/arm/raspi/third_party/ffmpeg/libavcodec/avcodec.c index fb136229..5a96899d 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/avcodec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/avcodec.c @@ -44,10 +44,11 @@ int avcodec_default_execute(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2), void *arg, int *ret, int count, int size) { - int i; + size_t i; for (i = 0; i < count; i++) { - int r = func(c, (char *)arg + i * size); + size_t offset = i * size; + int r = func(c, FF_PTR_ADD((char *)arg, offset)); if (ret) ret[i] = r; } diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/avcodec.h b/arm/raspi/third_party/ffmpeg/libavcodec/avcodec.h index eaaa0e2e..d6a4622f 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/avcodec.h +++ b/arm/raspi/third_party/ffmpeg/libavcodec/avcodec.h @@ -556,14 +556,22 @@ typedef struct AVCodecContext { */ AVRational time_base; +#if FF_API_TICKS_PER_FRAME /** * For some codecs, the time base is closer to the field rate than the frame rate. * Most notably, H.264 and MPEG-2 specify time_base as half of frame duration * if no telecine is used ... * * Set to time_base ticks per frame. Default 1, e.g., H.264/MPEG-2 set it to 2. + * + * @deprecated + * - decoding: Use AVCodecDescriptor.props & AV_CODEC_PROP_FIELDS + * - encoding: Set AVCodecContext.framerate instead + * */ + attribute_deprecated int ticks_per_frame; +#endif /** * Codec delay. @@ -1016,8 +1024,11 @@ typedef struct AVCodecContext { /** * MPEG vs JPEG YUV range. - * - encoding: Set by user - * - decoding: Set by libavcodec + * - encoding: Set by user to override the default output color range value, + * If not specified, libavcodec sets the color range depending on the + * output format. + * - decoding: Set by libavcodec, can be set by the user to propagate the + * color range to components reading from the decoder context. */ enum AVColorRange color_range; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/avrndec.c b/arm/raspi/third_party/ffmpeg/libavcodec/avrndec.c index ef194058..97d28246 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/avrndec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/avrndec.c @@ -68,7 +68,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, if ((ret = ff_get_buffer(avctx, p, 0)) < 0) return ret; p->pict_type= AV_PICTURE_TYPE_I; - p->key_frame= 1; + p->flags |= AV_FRAME_FLAG_KEY; if(a->interlace) { buf += (true_height - avctx->height)*avctx->width; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/avs.c b/arm/raspi/third_party/ffmpeg/libavcodec/avs.c index a1c9d3c4..b53175f6 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/avs.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/avs.c @@ -61,7 +61,7 @@ static int avs_decode_frame(AVCodecContext * avctx, AVFrame *picture, if ((ret = ff_reget_buffer(avctx, p, 0)) < 0) return ret; p->pict_type = AV_PICTURE_TYPE_P; - p->key_frame = 0; + p->flags &= ~AV_FRAME_FLAG_KEY; out = p->data[0]; stride = p->linesize[0]; @@ -97,7 +97,7 @@ static int avs_decode_frame(AVCodecContext * avctx, AVFrame *picture, switch (sub_type) { case AVS_I_FRAME: p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; case AVS_P_FRAME_3X3: vect_w = 3; vect_h = 3; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/avuidec.c b/arm/raspi/third_party/ffmpeg/libavcodec/avuidec.c index ba157e16..48b23d48 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/avuidec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/avuidec.c @@ -71,7 +71,7 @@ static int avui_decode_frame(AVCodecContext *avctx, AVFrame *pic, if ((ret = ff_get_buffer(avctx, pic, 0)) < 0) return ret; - pic->key_frame = 1; + pic->flags |= AV_FRAME_FLAG_KEY; pic->pict_type = AV_PICTURE_TYPE_I; if (!interlaced) { diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/bethsoftvideo.c b/arm/raspi/third_party/ffmpeg/libavcodec/bethsoftvideo.c index e095d04f..6de50282 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/bethsoftvideo.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/bethsoftvideo.c @@ -63,7 +63,11 @@ static int set_palette(BethsoftvidContext *ctx, GetByteContext *g) palette[a] = 0xFFU << 24 | bytestream2_get_be24u(g) * 4; palette[a] |= palette[a] >> 6 & 0x30303; } +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS ctx->frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif return 0; } diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/bfi.c b/arm/raspi/third_party/ffmpeg/libavcodec/bfi.c index c2682724..901669a3 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/bfi.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/bfi.c @@ -68,7 +68,7 @@ static int bfi_decode_frame(AVCodecContext *avctx, AVFrame *frame, /* Set frame parameters and palette, if necessary */ if (!avctx->frame_num) { frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; /* Setting the palette */ if (avctx->extradata_size > 768) { av_log(avctx, AV_LOG_ERROR, "Palette is too large.\n"); @@ -84,11 +84,19 @@ static int bfi_decode_frame(AVCodecContext *avctx, AVFrame *frame, pal++; } memcpy(bfi->pal, frame->data[1], sizeof(bfi->pal)); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } else { frame->pict_type = AV_PICTURE_TYPE_P; - frame->key_frame = 0; + frame->flags &= ~AV_FRAME_FLAG_KEY; +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = 0; +FF_ENABLE_DEPRECATION_WARNINGS +#endif memcpy(frame->data[1], bfi->pal, sizeof(bfi->pal)); } diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/bintext.c b/arm/raspi/third_party/ffmpeg/libavcodec/bintext.c index ce814f76..b20d6ce1 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/bintext.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/bintext.c @@ -157,7 +157,11 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, if ((ret = ff_get_buffer(avctx, s->frame, 0)) < 0) return ret; s->frame->pict_type = AV_PICTURE_TYPE_I; +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS s->frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif memcpy(s->frame->data[1], s->palette, 16 * 4); if (avctx->codec_id == AV_CODEC_ID_XBIN) { diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/bitpacked_dec.c b/arm/raspi/third_party/ffmpeg/libavcodec/bitpacked_dec.c index a1ffef18..c88f8619 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/bitpacked_dec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/bitpacked_dec.c @@ -134,7 +134,7 @@ static int bitpacked_decode(AVCodecContext *avctx, AVFrame *frame, return res; frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; *got_frame = 1; return buf_size; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/bmp.c b/arm/raspi/third_party/ffmpeg/libavcodec/bmp.c index d7e01f07..d117c06c 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/bmp.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/bmp.c @@ -210,7 +210,7 @@ static int bmp_decode_frame(AVCodecContext *avctx, AVFrame *p, if ((ret = ff_get_buffer(avctx, p, 0)) < 0) return ret; p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; buf = buf0 + hsize; dsize = buf_size - hsize; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/bmvvideo.c b/arm/raspi/third_party/ffmpeg/libavcodec/bmvvideo.c index 92ce41c8..20f07ca5 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/bmvvideo.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/bmvvideo.c @@ -251,7 +251,11 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, } memcpy(frame->data[1], c->pal, AVPALETTE_SIZE); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = type & BMV_PALETTE; +FF_ENABLE_DEPRECATION_WARNINGS +#endif outptr = frame->data[0]; srcptr = c->frame; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/bonk.c b/arm/raspi/third_party/ffmpeg/libavcodec/bonk.c index 5f510e49..fbea91c7 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/bonk.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/bonk.c @@ -155,6 +155,7 @@ static int intlist_read(BonkContext *s, int *buf, int entries, int base_2_part) int n_zeros = 0, step = 256, dominant = 0; int pos = 0, level = 0; BitCount *bits = s->bits; + int passes = 1; memset(buf, 0, entries * sizeof(*buf)); if (base_2_part) { @@ -216,24 +217,28 @@ static int intlist_read(BonkContext *s, int *buf, int entries, int base_2_part) x = 0; n_zeros = 0; for (i = 0; n_zeros < entries; i++) { + if (x >= max_x) + return AVERROR_INVALIDDATA; + if (pos >= entries) { pos = 0; - level += 1 << low_bits; + level += passes << low_bits; + passes = 1; + if (bits[x].bit && bits[x].count > entries - n_zeros) + passes = bits[x].count / (entries - n_zeros); } if (level > 1 << 16) return AVERROR_INVALIDDATA; - if (x >= max_x) - return AVERROR_INVALIDDATA; - if (buf[pos] >= level) { if (bits[x].bit) - buf[pos] += 1 << low_bits; + buf[pos] += passes << low_bits; else n_zeros++; - bits[x].count--; + av_assert1(bits[x].count >= passes); + bits[x].count -= passes; x += bits[x].count == 0; } @@ -265,14 +270,14 @@ static inline int shift(int a, int b) static int predictor_calc_error(int *k, int *state, int order, int error) { - int i, x = error - shift_down(k[order-1] * state[order-1], LATTICE_SHIFT); + int i, x = error - shift_down(k[order-1] * (unsigned)state[order-1], LATTICE_SHIFT); int *k_ptr = &(k[order-2]), *state_ptr = &(state[order-2]); for (i = order-2; i >= 0; i--, k_ptr--, state_ptr--) { unsigned k_value = *k_ptr, state_value = *state_ptr; - x -= shift_down(k_value * state_value, LATTICE_SHIFT); + x -= shift_down(k_value * (unsigned)state_value, LATTICE_SHIFT); state_ptr[1] = state_value + shift_down(k_value * x, LATTICE_SHIFT); } @@ -423,8 +428,10 @@ const FFCodec ff_bonk_decoder = { FF_CODEC_DECODE_CB(bonk_decode), .close = bonk_close, .p.capabilities = AV_CODEC_CAP_DELAY | - AV_CODEC_CAP_DR1 | - AV_CODEC_CAP_SUBFRAMES, +#if FF_API_SUBFRAMES + AV_CODEC_CAP_SUBFRAMES | +#endif + AV_CODEC_CAP_DR1, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P, AV_SAMPLE_FMT_NONE }, diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/brenderpix.c b/arm/raspi/third_party/ffmpeg/libavcodec/brenderpix.c index e95ab3d4..70a3e6be 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/brenderpix.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/brenderpix.c @@ -245,7 +245,11 @@ static int pix_decode_frame(AVCodecContext *avctx, AVFrame *frame, *pal_out++ = (0xFFU << 24) | bytestream2_get_be32u(&gb); bytestream2_skip(&gb, 8); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif chunk_type = bytestream2_get_be32(&gb); } else if (avctx->pix_fmt == AV_PIX_FMT_PAL8) { @@ -257,7 +261,11 @@ static int pix_decode_frame(AVCodecContext *avctx, AVFrame *frame, "Using default palette, colors might be off.\n"); memcpy(pal_out, std_pal_table, sizeof(uint32_t) * 256); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } data_len = bytestream2_get_be32(&gb); @@ -278,7 +286,7 @@ static int pix_decode_frame(AVCodecContext *avctx, AVFrame *frame, bytes_per_scanline, hdr.height); frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; *got_frame = 1; return avpkt->size; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/bytestream.h b/arm/raspi/third_party/ffmpeg/libavcodec/bytestream.h index d0033f14..67080604 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/bytestream.h +++ b/arm/raspi/third_party/ffmpeg/libavcodec/bytestream.h @@ -180,7 +180,7 @@ static av_always_inline void bytestream2_skipu(GetByteContext *g, static av_always_inline void bytestream2_skip_p(PutByteContext *p, unsigned int size) { - int size2; + unsigned int size2; if (p->eof) return; size2 = FFMIN(p->buffer_end - p->buffer, size); @@ -268,7 +268,7 @@ static av_always_inline unsigned int bytestream2_get_buffer(GetByteContext *g, uint8_t *dst, unsigned int size) { - int size2 = FFMIN(g->buffer_end - g->buffer, size); + unsigned int size2 = FFMIN(g->buffer_end - g->buffer, size); memcpy(dst, g->buffer, size2); g->buffer += size2; return size2; @@ -287,7 +287,7 @@ static av_always_inline unsigned int bytestream2_put_buffer(PutByteContext *p, const uint8_t *src, unsigned int size) { - int size2; + unsigned int size2; if (p->eof) return 0; size2 = FFMIN(p->buffer_end - p->buffer, size); @@ -311,7 +311,7 @@ static av_always_inline void bytestream2_set_buffer(PutByteContext *p, const uint8_t c, unsigned int size) { - int size2; + unsigned int size2; if (p->eof) return; size2 = FFMIN(p->buffer_end - p->buffer, size); @@ -348,7 +348,7 @@ static av_always_inline unsigned int bytestream2_copy_buffer(PutByteContext *p, GetByteContext *g, unsigned int size) { - int size2; + unsigned int size2; if (p->eof) return 0; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/c93.c b/arm/raspi/third_party/ffmpeg/libavcodec/c93.c index bfcbc7c1..2a4fe459 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/c93.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/c93.c @@ -147,10 +147,10 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, b = bytestream2_get_byte(&gb); if (b & C93_FIRST_FRAME) { newpic->pict_type = AV_PICTURE_TYPE_I; - newpic->key_frame = 1; + newpic->flags |= AV_FRAME_FLAG_KEY; } else { newpic->pict_type = AV_PICTURE_TYPE_P; - newpic->key_frame = 0; + newpic->flags &= ~AV_FRAME_FLAG_KEY; } for (y = 0; y < HEIGHT; y += 8) { @@ -246,7 +246,11 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, for (i = 0; i < 256; i++) { palette[i] = 0xFFU << 24 | bytestream2_get_be24(&gb); } +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS newpic->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } else { if (oldpic->data[1]) memcpy(newpic->data[1], oldpic->data[1], 256 * 4); diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/cavs_parser.c b/arm/raspi/third_party/ffmpeg/libavcodec/cavs_parser.c index 03f392c2..4a03effd 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/cavs_parser.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/cavs_parser.c @@ -59,12 +59,11 @@ static int cavs_find_frame_end(ParseContext *pc, const uint8_t *buf, return 0; for(; i SLICE_MAX_START_CODE){ - pc->frame_start_found=0; - pc->state=-1; - return i-3; - } + if (state == PIC_I_START_CODE || state == PIC_PB_START_CODE || + state == CAVS_START_CODE) { + pc->frame_start_found=0; + pc->state=-1; + return i-3; } } } diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/cavsdec.c b/arm/raspi/third_party/ffmpeg/libavcodec/cavsdec.c index b1fa9a98..37071dfb 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/cavsdec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/cavsdec.c @@ -1020,6 +1020,9 @@ static int decode_pic(AVSContext *h) skip_bits(&h->gb, 1); //marker_bit } + if (get_bits_left(&h->gb) < 23) + return AVERROR_INVALIDDATA; + ret = ff_get_buffer(h->avctx, h->cur.f, h->cur.f->pict_type == AV_PICTURE_TYPE_B ? 0 : AV_GET_BUFFER_FLAG_REF); if (ret < 0) diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/cbs_av1.c b/arm/raspi/third_party/ffmpeg/libavcodec/cbs_av1.c index 45e1288a..8788fee0 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/cbs_av1.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/cbs_av1.c @@ -1306,9 +1306,16 @@ static void cbs_av1_free_metadata(void *unit, uint8_t *content) md = &obu->obu.metadata; switch (md->metadata_type) { + case AV1_METADATA_TYPE_HDR_CLL: + case AV1_METADATA_TYPE_HDR_MDCV: + case AV1_METADATA_TYPE_SCALABILITY: + case AV1_METADATA_TYPE_TIMECODE: + break; case AV1_METADATA_TYPE_ITUT_T35: av_buffer_unref(&md->metadata.itut_t35.payload_ref); break; + default: + av_buffer_unref(&md->metadata.unknown.payload_ref); } av_free(content); } diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/cbs_av1.h b/arm/raspi/third_party/ffmpeg/libavcodec/cbs_av1.h index 1fc80dcf..36848d44 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/cbs_av1.h +++ b/arm/raspi/third_party/ffmpeg/libavcodec/cbs_av1.h @@ -370,6 +370,12 @@ typedef struct AV1RawMetadataTimecode { uint32_t time_offset_value; } AV1RawMetadataTimecode; +typedef struct AV1RawMetadataUnknown { + uint8_t *payload; + AVBufferRef *payload_ref; + size_t payload_size; +} AV1RawMetadataUnknown; + typedef struct AV1RawMetadata { uint64_t metadata_type; union { @@ -378,6 +384,7 @@ typedef struct AV1RawMetadata { AV1RawMetadataScalability scalability; AV1RawMetadataITUTT35 itut_t35; AV1RawMetadataTimecode timecode; + AV1RawMetadataUnknown unknown; } metadata; } AV1RawMetadata; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/cbs_av1_syntax_template.c b/arm/raspi/third_party/ffmpeg/libavcodec/cbs_av1_syntax_template.c index e95925a4..8f4640d1 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/cbs_av1_syntax_template.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/cbs_av1_syntax_template.c @@ -176,7 +176,7 @@ static int FUNC(decoder_model_info)(CodedBitstreamContext *ctx, RWContext *rw, int err; fb(5, buffer_delay_length_minus_1); - fb(32, num_units_in_decoding_tick); + fc(32, num_units_in_decoding_tick, 1, MAX_UINT_BITS(32)); fb(5, buffer_removal_time_length_minus_1); fb(5, frame_presentation_time_length_minus_1); @@ -1843,6 +1843,8 @@ static int FUNC(metadata_hdr_cll)(CodedBitstreamContext *ctx, RWContext *rw, { int err; + HEADER("HDR CLL Metadata"); + fb(16, max_cll); fb(16, max_fall); @@ -1854,6 +1856,8 @@ static int FUNC(metadata_hdr_mdcv)(CodedBitstreamContext *ctx, RWContext *rw, { int err, i; + HEADER("HDR MDCV Metadata"); + for (i = 0; i < 3; i++) { fbs(16, primary_chromaticity_x[i], 1, i); fbs(16, primary_chromaticity_y[i], 1, i); @@ -1920,6 +1924,8 @@ static int FUNC(metadata_scalability)(CodedBitstreamContext *ctx, RWContext *rw, { int err; + HEADER("Scalability Metadata"); + fb(8, scalability_mode_idc); if (current->scalability_mode_idc == AV1_SCALABILITY_SS) @@ -1934,6 +1940,8 @@ static int FUNC(metadata_itut_t35)(CodedBitstreamContext *ctx, RWContext *rw, int err; size_t i; + HEADER("ITU-T T.35 Metadata"); + fb(8, itu_t_t35_country_code); if (current->itu_t_t35_country_code == 0xff) fb(8, itu_t_t35_country_code_extension_byte); @@ -1961,6 +1969,8 @@ static int FUNC(metadata_timecode)(CodedBitstreamContext *ctx, RWContext *rw, { int err; + HEADER("Timecode Metadata"); + fb(5, counting_type); flag(full_timestamp_flag); flag(discontinuity_flag); @@ -1994,6 +2004,29 @@ static int FUNC(metadata_timecode)(CodedBitstreamContext *ctx, RWContext *rw, return 0; } +static int FUNC(metadata_unknown)(CodedBitstreamContext *ctx, RWContext *rw, + AV1RawMetadataUnknown *current) +{ + int err; + size_t i; + + HEADER("Unknown Metadata"); + +#ifdef READ + current->payload_size = cbs_av1_get_payload_bytes_left(rw); + + current->payload_ref = av_buffer_alloc(current->payload_size); + if (!current->payload_ref) + return AVERROR(ENOMEM); + current->payload = current->payload_ref->data; +#endif + + for (i = 0; i < current->payload_size; i++) + fbs(8, payload[i], 1, i); + + return 0; +} + static int FUNC(metadata_obu)(CodedBitstreamContext *ctx, RWContext *rw, AV1RawMetadata *current) { @@ -2018,8 +2051,7 @@ static int FUNC(metadata_obu)(CodedBitstreamContext *ctx, RWContext *rw, CHECK(FUNC(metadata_timecode)(ctx, rw, ¤t->metadata.timecode)); break; default: - // Unknown metadata type. - return AVERROR_PATCHWELCOME; + CHECK(FUNC(metadata_unknown)(ctx, rw, ¤t->metadata.unknown)); } return 0; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/ccaption_dec.c b/arm/raspi/third_party/ffmpeg/libavcodec/ccaption_dec.c index 661a4951..f91c92b3 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/ccaption_dec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/ccaption_dec.c @@ -262,7 +262,6 @@ typedef struct CCaptionSubContext { static av_cold int init_decoder(AVCodecContext *avctx) { - int ret; CCaptionSubContext *ctx = avctx->priv_data; av_bprint_init(&ctx->buffer[0], 0, AV_BPRINT_SIZE_UNLIMITED); @@ -272,7 +271,7 @@ static av_cold int init_decoder(AVCodecContext *avctx) ctx->bg_color = CCCOL_BLACK; ctx->rollup = 2; ctx->cursor_row = 10; - ret = ff_ass_subtitle_header(avctx, "Monospace", + return ff_ass_subtitle_header(avctx, "Monospace", ASS_DEFAULT_FONT_SIZE, ASS_DEFAULT_COLOR, ASS_DEFAULT_BACK_COLOR, @@ -281,11 +280,6 @@ static av_cold int init_decoder(AVCodecContext *avctx) ASS_DEFAULT_UNDERLINE, 3, ASS_DEFAULT_ALIGNMENT); - if (ret < 0) { - return ret; - } - - return ret; } static av_cold int close_decoder(AVCodecContext *avctx) @@ -900,6 +894,7 @@ static int decode(AVCodecContext *avctx, AVSubtitle *sub, ret = ff_ass_add_rect2(sub, ctx->buffer[bidx].str, ctx->readorder++, 0, NULL, NULL, &nb_rect_allocated); if (ret < 0) return ret; + av_bprint_clear(&ctx->buffer[bidx]); sub->pts = ctx->buffer_time[1]; sub->end_display_time = av_rescale_q(ctx->buffer_time[1] - ctx->buffer_time[0], AV_TIME_BASE_Q, ms_tb); diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/cdgraphics.c b/arm/raspi/third_party/ffmpeg/libavcodec/cdgraphics.c index 431e99cd..0c5022a5 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/cdgraphics.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/cdgraphics.c @@ -125,7 +125,11 @@ static void cdg_load_palette(CDGraphicsContext *cc, uint8_t *data, int low) b = ((color ) & 0x000F) * 17; palette[i + array_offset] = (uint32_t)cc->alpha[i + array_offset] << 24 | r << 16 | g << 8 | b; } +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS cc->frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } static int cdg_tile_block(CDGraphicsContext *cc, uint8_t *data, int b) diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/cdtoons.c b/arm/raspi/third_party/ffmpeg/libavcodec/cdtoons.c index 3ebed226..94c49f0c 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/cdtoons.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/cdtoons.c @@ -384,7 +384,11 @@ static int cdtoons_decode_frame(AVCodecContext *avctx, AVFrame *rframe, } /* first palette entry indicates transparency */ c->pal[0] = 0; +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS c->frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } } diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/cdxl.c b/arm/raspi/third_party/ffmpeg/libavcodec/cdxl.c index ad2cfd97..085ae97c 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/cdxl.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/cdxl.c @@ -305,7 +305,7 @@ static int cdxl_decode_frame(AVCodecContext *avctx, AVFrame *p, if ((ret = ff_get_buffer(avctx, p, 0)) < 0) return ret; p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; if (encoding) { av_fast_padded_malloc(&c->new_video, &c->new_video_size, diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/cfhd.c b/arm/raspi/third_party/ffmpeg/libavcodec/cfhd.c index c23eb069..42d7dcc3 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/cfhd.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/cfhd.c @@ -1087,8 +1087,8 @@ finish: dst += dst_linesize; } } else { - av_log(avctx, AV_LOG_DEBUG, "interlaced frame ? %d", pic->interlaced_frame); - pic->interlaced_frame = 1; + av_log(avctx, AV_LOG_DEBUG, "interlaced frame ? %d", !!(pic->flags & AV_FRAME_FLAG_INTERLACED)); + pic->flags |= AV_FRAME_FLAG_INTERLACED; low = s->plane[plane].subband[0]; high = s->plane[plane].subband[7]; output = s->plane[plane].l_h[6]; @@ -1284,7 +1284,7 @@ finish: dst += dst_linesize; } } else { - pic->interlaced_frame = 1; + pic->flags |= AV_FRAME_FLAG_INTERLACED; low = s->plane[plane].l_h[7]; high = s->plane[plane].subband[14]; output = s->plane[plane].l_h[6]; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/cinepak.c b/arm/raspi/third_party/ffmpeg/libavcodec/cinepak.c index 282614fd..2ec0ce88 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/cinepak.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/cinepak.c @@ -379,7 +379,7 @@ static int cinepak_decode (CinepakContext *s) num_strips = FFMIN(num_strips, MAX_STRIPS); - s->frame->key_frame = 0; + s->frame->flags &= ~AV_FRAME_FLAG_KEY; for (i=0; i < num_strips; i++) { if ((s->data + 12) > eod) @@ -395,7 +395,7 @@ static int cinepak_decode (CinepakContext *s) s->strips[i].x2 = AV_RB16 (&s->data[10]); if (s->strips[i].id == 0x10) - s->frame->key_frame = 1; + s->frame->flags |= AV_FRAME_FLAG_KEY; strip_size = AV_RB24 (&s->data[1]) - 12; if (strip_size < 0) @@ -476,7 +476,14 @@ static int cinepak_decode_frame(AVCodecContext *avctx, AVFrame *rframe, return ret; if (s->palette_video) { - s->frame->palette_has_changed = ff_copy_palette(s->pal, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS + s->frame->palette_has_changed = +#endif + ff_copy_palette(s->pal, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_ENABLE_DEPRECATION_WARNINGS +#endif } if ((ret = cinepak_decode(s)) < 0) { diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/clearvideo.c b/arm/raspi/third_party/ffmpeg/libavcodec/clearvideo.c index e77661d1..f84e3e6e 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/clearvideo.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/clearvideo.c @@ -511,7 +511,7 @@ static int clv_decode_frame(AVCodecContext *avctx, AVFrame *rframe, if ((ret = ff_reget_buffer(avctx, c->pic, 0)) < 0) return ret; - c->pic->key_frame = 1; + c->pic->flags |= AV_FRAME_FLAG_KEY; c->pic->pict_type = AV_PICTURE_TYPE_I; bytestream2_get_be32(&gb); // frame size; @@ -605,7 +605,7 @@ static int clv_decode_frame(AVCodecContext *avctx, AVFrame *rframe, } extend_edges(c->pic, c->tile_size); - c->pic->key_frame = 0; + c->pic->flags &= ~AV_FRAME_FLAG_KEY; c->pic->pict_type = AV_PICTURE_TYPE_P; } diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/cljrdec.c b/arm/raspi/third_party/ffmpeg/libavcodec/cljrdec.c index 914f853c..a4baa015 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/cljrdec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/cljrdec.c @@ -51,7 +51,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, if ((ret = ff_get_buffer(avctx, p, 0)) < 0) return ret; p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; init_get_bits(&gb, buf, buf_size * 8); diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/cllc.c b/arm/raspi/third_party/ffmpeg/libavcodec/cllc.c index 911717b6..52cb86e5 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/cllc.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/cllc.c @@ -460,7 +460,7 @@ static int cllc_decode_frame(AVCodecContext *avctx, AVFrame *pic, return AVERROR_INVALIDDATA; } - pic->key_frame = 1; + pic->flags |= AV_FRAME_FLAG_KEY; pic->pict_type = AV_PICTURE_TYPE_I; *got_picture_ptr = 1; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/codec.h b/arm/raspi/third_party/ffmpeg/libavcodec/codec.h index 3b1995bc..7a932d75 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/codec.h +++ b/arm/raspi/third_party/ffmpeg/libavcodec/codec.h @@ -80,6 +80,7 @@ */ #define AV_CODEC_CAP_SMALL_LAST_FRAME (1 << 6) +#if FF_API_SUBFRAMES /** * Codec can output multiple frames per AVPacket * Normally demuxers return one frame at a time, demuxers which do not do @@ -92,6 +93,8 @@ * as a last resort. */ #define AV_CODEC_CAP_SUBFRAMES (1 << 8) +#endif + /** * Codec is experimental and is thus avoided in favor of non experimental * encoders diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/codec_desc.c b/arm/raspi/third_party/ffmpeg/libavcodec/codec_desc.c index efdcb59b..49dddd1a 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/codec_desc.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/codec_desc.c @@ -38,14 +38,20 @@ static const AVCodecDescriptor codec_descriptors[] = { .type = AVMEDIA_TYPE_VIDEO, .name = "mpeg1video", .long_name = NULL_IF_CONFIG_SMALL("MPEG-1 video"), - .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER, + .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER | + // FIXME this is strigly speaking not true, as MPEG-1 does + // not allow field coding, but our mpeg12 code (decoder and + // parser) can sometimes change codec id at runtime, so + // this is safer + AV_CODEC_PROP_FIELDS, }, { .id = AV_CODEC_ID_MPEG2VIDEO, .type = AVMEDIA_TYPE_VIDEO, .name = "mpeg2video", .long_name = NULL_IF_CONFIG_SMALL("MPEG-2 video"), - .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER, + .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER | + AV_CODEC_PROP_FIELDS, .profiles = NULL_IF_CONFIG_SMALL(ff_mpeg2_video_profiles), }, { @@ -225,7 +231,8 @@ static const AVCodecDescriptor codec_descriptors[] = { .type = AVMEDIA_TYPE_VIDEO, .name = "h264", .long_name = NULL_IF_CONFIG_SMALL("H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10"), - .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_LOSSLESS | AV_CODEC_PROP_REORDER, + .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_LOSSLESS | + AV_CODEC_PROP_REORDER | AV_CODEC_PROP_FIELDS, .profiles = NULL_IF_CONFIG_SMALL(ff_h264_profiles), }, { @@ -529,7 +536,8 @@ static const AVCodecDescriptor codec_descriptors[] = { .type = AVMEDIA_TYPE_VIDEO, .name = "vc1", .long_name = NULL_IF_CONFIG_SMALL("SMPTE VC-1"), - .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER, + .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER | + AV_CODEC_PROP_FIELDS, .profiles = NULL_IF_CONFIG_SMALL(ff_vc1_profiles), }, { @@ -1923,6 +1931,13 @@ static const AVCodecDescriptor codec_descriptors[] = { .long_name = NULL_IF_CONFIG_SMALL("ViewQuest VQC"), .props = AV_CODEC_PROP_LOSSY, }, + { + .id = AV_CODEC_ID_PDV, + .type = AVMEDIA_TYPE_VIDEO, + .name = "pdv", + .long_name = NULL_IF_CONFIG_SMALL("PDV (PlayDate Video)"), + .props = AV_CODEC_PROP_LOSSY, + }, /* various PCM "codecs" */ { diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/codec_desc.h b/arm/raspi/third_party/ffmpeg/libavcodec/codec_desc.h index 126b52df..dd449111 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/codec_desc.h +++ b/arm/raspi/third_party/ffmpeg/libavcodec/codec_desc.h @@ -90,6 +90,12 @@ typedef struct AVCodecDescriptor { * equal. */ #define AV_CODEC_PROP_REORDER (1 << 3) + +/** + * Video codec supports separate coding of fields in interlaced frames. + */ +#define AV_CODEC_PROP_FIELDS (1 << 4) + /** * Subtitle codec is bitmap based * Decoded AVSubtitle data can be read from the AVSubtitleRect->pict field. diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/codec_id.h b/arm/raspi/third_party/ffmpeg/libavcodec/codec_id.h index 64df9699..70800ec2 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/codec_id.h +++ b/arm/raspi/third_party/ffmpeg/libavcodec/codec_id.h @@ -320,6 +320,7 @@ enum AVCodecID { AV_CODEC_ID_WBMP, AV_CODEC_ID_MEDIA100, AV_CODEC_ID_VQC, + AV_CODEC_ID_PDV, /* various PCM "codecs" */ AV_CODEC_ID_FIRST_AUDIO = 0x10000, ///< A dummy id pointing at the start of audio codecs diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/codec_par.c b/arm/raspi/third_party/ffmpeg/libavcodec/codec_par.c index abda649a..775c1870 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/codec_par.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/codec_par.c @@ -46,6 +46,7 @@ static void codec_parameters_reset(AVCodecParameters *par) par->color_space = AVCOL_SPC_UNSPECIFIED; par->chroma_location = AVCHROMA_LOC_UNSPECIFIED; par->sample_aspect_ratio = (AVRational){ 0, 1 }; + par->framerate = (AVRational){ 0, 1 }; par->profile = FF_PROFILE_UNKNOWN; par->level = FF_LEVEL_UNKNOWN; } @@ -126,6 +127,7 @@ int avcodec_parameters_from_context(AVCodecParameters *par, par->chroma_location = codec->chroma_sample_location; par->sample_aspect_ratio = codec->sample_aspect_ratio; par->video_delay = codec->has_b_frames; + par->framerate = codec->framerate; break; case AVMEDIA_TYPE_AUDIO: par->format = codec->sample_fmt; @@ -207,6 +209,7 @@ int avcodec_parameters_to_context(AVCodecContext *codec, codec->chroma_sample_location = par->chroma_location; codec->sample_aspect_ratio = par->sample_aspect_ratio; codec->has_b_frames = par->video_delay; + codec->framerate = par->framerate; break; case AVMEDIA_TYPE_AUDIO: codec->sample_fmt = par->format; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/codec_par.h b/arm/raspi/third_party/ffmpeg/libavcodec/codec_par.h index f51d27c5..add90fdb 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/codec_par.h +++ b/arm/raspi/third_party/ffmpeg/libavcodec/codec_par.h @@ -211,6 +211,18 @@ typedef struct AVCodecParameters { * Audio only. The channel layout and number of channels. */ AVChannelLayout ch_layout; + + /** + * Video only. Number of frames per second, for streams with constant frame + * durations. Should be set to { 0, 1 } when some frames have differing + * durations or if the value is not known. + * + * @note This field correponds to values that are stored in codec-level + * headers and is typically overridden by container/transport-layer + * timestamps, when available. It should thus be used only as a last resort, + * when no higher-level timing information is available. + */ + AVRational framerate; } AVCodecParameters; /** diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/cpia.c b/arm/raspi/third_party/ffmpeg/libavcodec/cpia.c index bfd270da..f62100c4 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/cpia.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/cpia.c @@ -94,10 +94,10 @@ static int cpia_decode_frame(AVCodecContext *avctx, AVFrame *rframe, if (header[28] == NOT_COMPRESSED) { frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; } else { frame->pict_type = AV_PICTURE_TYPE_P; - frame->key_frame = 0; + frame->flags &= ~AV_FRAME_FLAG_KEY; } // Get buffer filled with previous frame diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/cri.c b/arm/raspi/third_party/ffmpeg/libavcodec/cri.c index 5761152c..0380a0c6 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/cri.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/cri.c @@ -408,7 +408,7 @@ skip: } p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; *got_frame = 1; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/crystalhd.c b/arm/raspi/third_party/ffmpeg/libavcodec/crystalhd.c index a48d60f1..86f6cfa6 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/crystalhd.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/crystalhd.c @@ -543,9 +543,9 @@ static inline CopyRet copy_frame(AVCodecContext *avctx, av_image_copy_plane(dst, dStride, src, sStride, bwidth, height); } - frame->interlaced_frame = interlaced; + frame->flags |= AV_FRAME_FLAG_INTERLACED * !!interlaced; if (interlaced) - frame->top_field_first = !bottom_first; + frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST * !bottom_first; frame->pts = pkt_pts; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/cscd.c b/arm/raspi/third_party/ffmpeg/libavcodec/cscd.c index b4ed3332..23dd2df9 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/cscd.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/cscd.c @@ -110,12 +110,12 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, // flip upside down, add difference frame if (buf[0] & 1) { // keyframe c->pic->pict_type = AV_PICTURE_TYPE_I; - c->pic->key_frame = 1; + c->pic->flags |= AV_FRAME_FLAG_KEY; copy_frame_default(c->pic, c->decomp_buf, c->linelen, c->height); } else { c->pic->pict_type = AV_PICTURE_TYPE_P; - c->pic->key_frame = 0; + c->pic->flags &= ~AV_FRAME_FLAG_KEY; add_frame_default(c->pic, c->decomp_buf, c->linelen, c->height); } diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/cuviddec.c b/arm/raspi/third_party/ffmpeg/libavcodec/cuviddec.c index 76e70aa6..3d43bbd4 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/cuviddec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/cuviddec.c @@ -599,7 +599,10 @@ static int cuvid_output_frame(AVCodecContext *avctx, AVFrame *frame) goto error; } - frame->key_frame = ctx->key_frame[parsed_frame.dispinfo.picture_index]; + if (ctx->key_frame[parsed_frame.dispinfo.picture_index]) + frame->flags |= AV_FRAME_FLAG_KEY; + else + frame->flags &= ~AV_FRAME_FLAG_KEY; ctx->key_frame[parsed_frame.dispinfo.picture_index] = 0; frame->width = avctx->width; @@ -631,10 +634,11 @@ FF_DISABLE_DEPRECATION_WARNINGS FF_ENABLE_DEPRECATION_WARNINGS #endif - frame->interlaced_frame = !parsed_frame.is_deinterlacing && !parsed_frame.dispinfo.progressive_frame; + if (!parsed_frame.is_deinterlacing && !parsed_frame.dispinfo.progressive_frame) + frame->flags |= AV_FRAME_FLAG_INTERLACED; - if (frame->interlaced_frame) - frame->top_field_first = parsed_frame.dispinfo.top_field_first; + if ((frame->flags & AV_FRAME_FLAG_INTERLACED) && parsed_frame.dispinfo.top_field_first) + frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST; } else if (ctx->decoder_flushing) { ret = AVERROR_EOF; } else { diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/dds.c b/arm/raspi/third_party/ffmpeg/libavcodec/dds.c index 4bb425db..31a327a5 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/dds.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/dds.c @@ -651,7 +651,11 @@ static int dds_decode(AVCodecContext *avctx, AVFrame *frame, ((unsigned)frame->data[1][3+i*4]<<24) ); } +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif if (bytestream2_get_bytes_left(gbc) < frame->height * frame->width / 2) { av_log(avctx, AV_LOG_ERROR, "Buffer is too small (%d < %d).\n", @@ -682,7 +686,11 @@ static int dds_decode(AVCodecContext *avctx, AVFrame *frame, ((unsigned)frame->data[1][3+i*4]<<24) ); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } if (bytestream2_get_bytes_left(gbc) < frame->height * linesize) { @@ -702,7 +710,7 @@ static int dds_decode(AVCodecContext *avctx, AVFrame *frame, /* Frame is ready to be output. */ frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; *got_frame = 1; return avpkt->size; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/decode.c b/arm/raspi/third_party/ffmpeg/libavcodec/decode.c index 40f5a3ba..360837a0 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/decode.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/decode.c @@ -423,13 +423,6 @@ FF_ENABLE_DEPRECATION_WARNINGS } } - if (avctx->codec->type == AVMEDIA_TYPE_AUDIO && - !avci->showed_multi_packet_warning && - ret >= 0 && ret != pkt->size && !(avctx->codec->capabilities & AV_CODEC_CAP_SUBFRAMES)) { - av_log(avctx, AV_LOG_WARNING, "Multiple frames in a packet.\n"); - avci->showed_multi_packet_warning = 1; - } - if (!got_frame) av_frame_unref(frame); @@ -570,6 +563,19 @@ static int decode_receive_frame_internal(AVCodecContext *avctx, AVFrame *frame) } if (!ret) { + if (avctx->codec_type != AVMEDIA_TYPE_VIDEO) + frame->flags |= AV_FRAME_FLAG_KEY; +#if FF_API_FRAME_KEY +FF_DISABLE_DEPRECATION_WARNINGS + frame->key_frame = !!(frame->flags & AV_FRAME_FLAG_KEY); +FF_ENABLE_DEPRECATION_WARNINGS +#endif +#if FF_API_INTERLACED_FRAME +FF_DISABLE_DEPRECATION_WARNINGS + frame->interlaced_frame = !!(frame->flags & AV_FRAME_FLAG_INTERLACED); + frame->top_field_first = !!(frame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST); +FF_ENABLE_DEPRECATION_WARNINGS +#endif frame->best_effort_timestamp = guess_correct_pts(avctx, frame->pts, frame->pkt_dts); diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/dfa.c b/arm/raspi/third_party/ffmpeg/libavcodec/dfa.c index 114c803f..9114feb0 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/dfa.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/dfa.c @@ -367,7 +367,11 @@ static int dfa_decode_frame(AVCodecContext *avctx, AVFrame *frame, s->pal[i] = bytestream2_get_be24(&gb) << 2; s->pal[i] |= 0xFFU << 24 | (s->pal[i] >> 6) & 0x30303; } +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } else if (chunk_type <= 9) { if (decoder[chunk_type - 2](&gb, s->frame_buf, avctx->width, avctx->height)) { av_log(avctx, AV_LOG_ERROR, "Error decoding %s chunk\n", diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/diracdec.c b/arm/raspi/third_party/ffmpeg/libavcodec/diracdec.c index 0ae582be..277c730c 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/diracdec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/diracdec.c @@ -2230,7 +2230,10 @@ static int dirac_decode_data_unit(AVCodecContext *avctx, const uint8_t *buf, int s->hq_picture = (parse_code & 0xF8) == 0xE8; /* [DIRAC_STD] is_hq_picture() */ s->dc_prediction = (parse_code & 0x28) == 0x08; /* [DIRAC_STD] using_dc_prediction() */ pic->reference = (parse_code & 0x0C) == 0x0C; /* [DIRAC_STD] is_reference() */ - pic->avframe->key_frame = s->num_refs == 0; /* [DIRAC_STD] is_intra() */ + if (s->num_refs == 0) /* [DIRAC_STD] is_intra() */ + pic->avframe->flags |= AV_FRAME_FLAG_KEY; + else + pic->avframe->flags &= ~AV_FRAME_FLAG_KEY; pic->avframe->pict_type = s->num_refs + 1; /* Definition of AVPictureType in avutil.h */ /* VC-2 Low Delay has a different parse code than the Dirac Low Delay */ diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/dnxhddec.c b/arm/raspi/third_party/ffmpeg/libavcodec/dnxhddec.c index d91a6bf1..84bd0e61 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/dnxhddec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/dnxhddec.c @@ -195,8 +195,9 @@ static int dnxhd_decode_header(DNXHDContext *ctx, AVFrame *frame, } if (buf[5] & 2) { /* interlaced */ ctx->cur_field = first_field ? buf[5] & 1 : !ctx->cur_field; - frame->interlaced_frame = 1; - frame->top_field_first = first_field ^ ctx->cur_field; + frame->flags |= AV_FRAME_FLAG_INTERLACED; + if (first_field ^ ctx->cur_field) + frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST; av_log(ctx->avctx, AV_LOG_DEBUG, "interlaced %d, cur field %d\n", buf[5] & 3, ctx->cur_field); } else { @@ -298,7 +299,7 @@ static int dnxhd_decode_header(DNXHDContext *ctx, AVFrame *frame, ctx->mb_width = (ctx->width + 15)>> 4; ctx->mb_height = AV_RB16(buf + 0x16c); - if ((ctx->height + 15) >> 4 == ctx->mb_height && frame->interlaced_frame) + if ((ctx->height + 15) >> 4 == ctx->mb_height && (frame->flags & AV_FRAME_FLAG_INTERLACED)) ctx->height <<= 1; av_log(ctx->avctx, AV_LOG_VERBOSE, "%dx%d, 4:%s %d bits, MBAFF=%d ACT=%d\n", @@ -316,7 +317,7 @@ static int dnxhd_decode_header(DNXHDContext *ctx, AVFrame *frame, } ctx->data_offset = 0x280; } - if ((ctx->mb_height << frame->interlaced_frame) > (ctx->height + 15) >> 4) { + if ((ctx->mb_height << !!(frame->flags & AV_FRAME_FLAG_INTERLACED)) > (ctx->height + 15) >> 4) { av_log(ctx->avctx, AV_LOG_ERROR, "mb height too big: %d\n", ctx->mb_height); return AVERROR_INVALIDDATA; @@ -530,7 +531,7 @@ static int dnxhd_decode_macroblock(const DNXHDContext *ctx, RowContext *row, return AVERROR_INVALIDDATA; } - if (frame->interlaced_frame) { + if (frame->flags & AV_FRAME_FLAG_INTERLACED) { dct_linesize_luma <<= 1; dct_linesize_chroma <<= 1; } @@ -539,7 +540,7 @@ static int dnxhd_decode_macroblock(const DNXHDContext *ctx, RowContext *row, dest_u = frame->data[1] + ((y * dct_linesize_chroma) << 4) + (x << (3 + shift1 + ctx->is_444)); dest_v = frame->data[2] + ((y * dct_linesize_chroma) << 4) + (x << (3 + shift1 + ctx->is_444)); - if (frame->interlaced_frame && ctx->cur_field) { + if ((frame->flags & AV_FRAME_FLAG_INTERLACED) && ctx->cur_field) { dest_y += frame->linesize[0]; dest_u += frame->linesize[1]; dest_v += frame->linesize[2]; @@ -652,14 +653,14 @@ decode_coding_unit: if ((ret = ff_thread_get_buffer(avctx, picture, 0)) < 0) return ret; picture->pict_type = AV_PICTURE_TYPE_I; - picture->key_frame = 1; + picture->flags |= AV_FRAME_FLAG_KEY; } ctx->buf_size = buf_size - ctx->data_offset; ctx->buf = buf + ctx->data_offset; avctx->execute2(avctx, dnxhd_decode_row, picture, NULL, ctx->mb_height); - if (first_field && picture->interlaced_frame) { + if (first_field && (picture->flags & AV_FRAME_FLAG_INTERLACED)) { buf += ctx->cid_table->coding_unit_size; buf_size -= ctx->cid_table->coding_unit_size; first_field = 0; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/dnxhdenc.c b/arm/raspi/third_party/ffmpeg/libavcodec/dnxhdenc.c index 176bf972..a1852fa6 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/dnxhdenc.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/dnxhdenc.c @@ -1251,7 +1251,8 @@ static void dnxhd_load_picture(DNXHDEncContext *ctx, const AVFrame *frame) ctx->thread[i]->dct_uv_offset = ctx->m.uvlinesize*8; } - ctx->cur_field = frame->interlaced_frame && !frame->top_field_first; + ctx->cur_field = (frame->flags & AV_FRAME_FLAG_INTERLACED) && + !(frame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST); } static int dnxhd_encode_picture(AVCodecContext *avctx, AVPacket *pkt, diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/dpcm.c b/arm/raspi/third_party/ffmpeg/libavcodec/dpcm.c index 6ea9e2c0..eff65874 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/dpcm.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/dpcm.c @@ -444,7 +444,7 @@ static int dpcm_decode_frame(AVCodecContext *avctx, AVFrame *frame, if (n & 0x80) s->sample[idx] = sign_extend((n & 0x7f) << 9, 16); else - s->sample[idx] += s->scale * wady_table[n & 0x7f]; + s->sample[idx] += s->scale * (unsigned)wady_table[n & 0x7f]; *output_samples++ = av_clip_int16(s->sample[idx]); idx ^= stereo; } diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/dpx.c b/arm/raspi/third_party/ffmpeg/libavcodec/dpx.c index 4f506084..31e4a3f8 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/dpx.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/dpx.c @@ -476,14 +476,31 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, avctx->colorspace = AVCOL_SPC_RGB; } + av_strlcpy(creator, avpkt->data + 160, 100); + creator[100] = '\0'; + av_dict_set(&p->metadata, "Creator", creator, 0); + + av_strlcpy(input_device, avpkt->data + 1556, 32); + input_device[32] = '\0'; + av_dict_set(&p->metadata, "Input Device", input_device, 0); + + // Some devices do not pad 10bit samples to whole 32bit words per row + if (!memcmp(input_device, "Scanity", 7) || + !memcmp(creator, "Lasergraphics Inc.", 18)) { + if (bits_per_color == 10) + unpadded_10bit = 1; + } + // Table 3c: Runs will always break at scan line boundaries. Packing // will always break to the next 32-bit word at scan-line boundaries. // Unfortunately, the encoder produced invalid files, so attempt // to detect it + // Also handle special case with unpadded content need_align = FFALIGN(stride, 4); - if (need_align*avctx->height + (int64_t)offset > avpkt->size) { + if (need_align*avctx->height + (int64_t)offset > avpkt->size && + (!unpadded_10bit || (avctx->width * avctx->height * elements + 2) / 3 * 4 + (int64_t)offset > avpkt->size)) { // Alignment seems unappliable, try without - if (stride*avctx->height + (int64_t)offset > avpkt->size) { + if (stride*avctx->height + (int64_t)offset > avpkt->size || unpadded_10bit) { av_log(avctx, AV_LOG_ERROR, "Overread buffer. Invalid header?\n"); return AVERROR_INVALIDDATA; } else { @@ -609,20 +626,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, if ((ret = ff_get_buffer(avctx, p, 0)) < 0) return ret; - av_strlcpy(creator, avpkt->data + 160, 100); - creator[100] = '\0'; - av_dict_set(&p->metadata, "Creator", creator, 0); - - av_strlcpy(input_device, avpkt->data + 1556, 32); - input_device[32] = '\0'; - av_dict_set(&p->metadata, "Input Device", input_device, 0); - - // Some devices do not pad 10bit samples to whole 32bit words per row - if (!memcmp(input_device, "Scanity", 7) || - !memcmp(creator, "Lasergraphics Inc.", 18)) { - unpadded_10bit = 1; - } - // Move pointer to offset from start of file buf = avpkt->data + offset; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/dsicinvideo.c b/arm/raspi/third_party/ffmpeg/libavcodec/dsicinvideo.c index 222044d1..000d79e1 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/dsicinvideo.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/dsicinvideo.c @@ -293,7 +293,11 @@ static int cinvideo_decode_frame(AVCodecContext *avctx, AVFrame *rframe, return res; memcpy(cin->frame->data[1], cin->palette, sizeof(cin->palette)); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS cin->frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif for (y = 0; y < cin->avctx->height; ++y) memcpy(cin->frame->data[0] + (cin->avctx->height - 1 - y) * cin->frame->linesize[0], cin->bitmap_table[CIN_CUR_BMP] + y * cin->avctx->width, diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/dv.h b/arm/raspi/third_party/ffmpeg/libavcodec/dv.h index 29f97b60..abff9f1e 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/dv.h +++ b/arm/raspi/third_party/ffmpeg/libavcodec/dv.h @@ -60,6 +60,12 @@ enum DVPackType { */ #define DV_MAX_FRAME_SIZE 576000 +// LCM of video framerate numerators +#define DV_TIMESCALE_VIDEO 60000 + +// LCM of audio sample rates +#define DV_TIMESCALE_AUDIO 14112000 + /** * maximum number of blocks per macroblock in any DV format */ diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/dvdec.c b/arm/raspi/third_party/ffmpeg/libavcodec/dvdec.c index afc4bb0b..750e25a4 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/dvdec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/dvdec.c @@ -646,7 +646,7 @@ static int dvvideo_decode_frame(AVCodecContext *avctx, AVFrame *frame, } s->frame = frame; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_I; avctx->pix_fmt = s->sys->pix_fmt; avctx->framerate = av_inv_q(s->sys->time_base); @@ -670,14 +670,14 @@ static int dvvideo_decode_frame(AVCodecContext *avctx, AVFrame *frame, /* Determine the codec's field order from the packet */ if ( *vsc_pack == DV_VIDEO_CONTROL ) { if (avctx->height == 720) { - frame->interlaced_frame = 0; - frame->top_field_first = 0; + frame->flags &= ~AV_FRAME_FLAG_INTERLACED; + frame->flags &= ~AV_FRAME_FLAG_TOP_FIELD_FIRST; } else if (avctx->height == 1080) { - frame->interlaced_frame = 1; - frame->top_field_first = (vsc_pack[3] & 0x40) == 0x40; + frame->flags |= AV_FRAME_FLAG_INTERLACED; + frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST * ((vsc_pack[3] & 0x40) == 0x40); } else { - frame->interlaced_frame = (vsc_pack[3] & 0x10) == 0x10; - frame->top_field_first = !(vsc_pack[3] & 0x40); + frame->flags |= AV_FRAME_FLAG_INTERLACED * ((vsc_pack[3] & 0x10) == 0x10); + frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST * !(vsc_pack[3] & 0x40); } } diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/dvenc.c b/arm/raspi/third_party/ffmpeg/libavcodec/dvenc.c index 11dd5763..7bd50174 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/dvenc.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/dvenc.c @@ -104,7 +104,9 @@ static av_cold int dvvideo_encode_init(AVCodecContext *avctx) ff_fdctdsp_init(&fdsp, avctx); ff_me_cmp_init(&mecc, avctx); ff_pixblockdsp_init(&pdsp, avctx); - ff_set_cmp(&mecc, mecc.ildct_cmp, avctx->ildct_cmp); + ret = ff_set_cmp(&mecc, mecc.ildct_cmp, avctx->ildct_cmp); + if (ret < 0) + return AVERROR(EINVAL); s->get_pixels = pdsp.get_pixels; s->ildct_cmp = mecc.ildct_cmp[5]; @@ -1046,9 +1048,9 @@ static inline int dv_write_pack(enum DVPackType pack_id, DVEncContext *c, int fs; if (c->avctx->height >= 720) - fs = c->avctx->height == 720 || c->frame->top_field_first ? 0x40 : 0x00; + fs = c->avctx->height == 720 || (c->frame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST) ? 0x40 : 0x00; else - fs = c->frame->top_field_first ? 0x00 : 0x40; + fs = (c->frame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST) ? 0x00 : 0x40; if (DV_PROFILE_IS_HD(c->sys) || (int)(av_q2d(c->avctx->sample_aspect_ratio) * diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/dxa.c b/arm/raspi/third_party/ffmpeg/libavcodec/dxa.c index 8d2d2d77..d903b7ec 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/dxa.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/dxa.c @@ -230,7 +230,11 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, if ((ret = ff_get_buffer(avctx, frame, AV_GET_BUFFER_FLAG_REF)) < 0) return ret; memcpy(frame->data[1], c->pal, AVPALETTE_SIZE); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = pc; +FF_ENABLE_DEPRECATION_WARNINGS +#endif outptr = frame->data[0]; srcptr = c->decomp_buf; @@ -258,19 +262,19 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, switch(compr){ case -1: - frame->key_frame = 0; + frame->flags &= ~AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_P; if (c->prev->data[0]) memcpy(frame->data[0], c->prev->data[0], frame->linesize[0] * avctx->height); else{ // Should happen only when first frame is 'NULL' memset(frame->data[0], 0, frame->linesize[0] * avctx->height); - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_I; } break; case 2: case 4: - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_I; for (j = 0; j < avctx->height; j++) { memcpy(outptr, srcptr, avctx->width); @@ -285,7 +289,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, if (!(avctx->flags2 & AV_CODEC_FLAG2_SHOW_ALL)) return AVERROR_INVALIDDATA; } - frame->key_frame = 0; + frame->flags &= ~AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_P; for (j = 0; j < avctx->height; j++) { if(tmpptr){ @@ -300,7 +304,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, break; case 12: // ScummVM coding case 13: - frame->key_frame = 0; + frame->flags &= ~AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_P; if (!c->prev->data[0]) { av_log(avctx, AV_LOG_ERROR, "Missing reference frame\n"); diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/dxtory.c b/arm/raspi/third_party/ffmpeg/libavcodec/dxtory.c index e13d2748..f36420cd 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/dxtory.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/dxtory.c @@ -864,7 +864,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *pic, return ret; pic->pict_type = AV_PICTURE_TYPE_I; - pic->key_frame = 1; + pic->flags |= AV_FRAME_FLAG_KEY; *got_frame = 1; return avpkt->size; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/dxv.c b/arm/raspi/third_party/ffmpeg/libavcodec/dxv.c index 7c848742..5923811b 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/dxv.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/dxv.c @@ -1220,7 +1220,7 @@ static int dxv_decode(AVCodecContext *avctx, AVFrame *frame, /* Frame is ready to be output. */ frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; *got_frame = 1; return avpkt->size; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/eacmv.c b/arm/raspi/third_party/ffmpeg/libavcodec/eacmv.c index 18f27dfd..e73e310c 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/eacmv.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/eacmv.c @@ -202,10 +202,10 @@ static int cmv_decode_frame(AVCodecContext *avctx, AVFrame *frame, buf += EA_PREAMBLE_SIZE; if ((buf[0]&1)) { // subtype cmv_decode_inter(s, frame, buf+2, buf_end); - frame->key_frame = 0; + frame->flags &= ~AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_P; }else{ - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_I; cmv_decode_intra(s, frame, buf+2, buf_end); } diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/eatgq.c b/arm/raspi/third_party/ffmpeg/libavcodec/eatgq.c index 01e1acd4..0f0ed358 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/eatgq.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/eatgq.c @@ -237,7 +237,7 @@ static int tgq_decode_frame(AVCodecContext *avctx, AVFrame *frame, if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) return ret; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_I; for (y = 0; y < FFALIGN(avctx->height, 16) >> 4; y++) diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/eatgv.c b/arm/raspi/third_party/ffmpeg/libavcodec/eatgv.c index 29f7ee12..a2aead46 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/eatgv.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/eatgv.c @@ -310,7 +310,7 @@ static int tgv_decode_frame(AVCodecContext *avctx, AVFrame *frame, if (chunk_type == kVGT_TAG) { int y; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_I; if (!s->frame_buffer && @@ -330,7 +330,7 @@ static int tgv_decode_frame(AVCodecContext *avctx, AVFrame *frame, av_log(avctx, AV_LOG_WARNING, "inter frame without corresponding intra frame\n"); return buf_size; } - frame->key_frame = 0; + frame->flags &= ~AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_P; if (tgv_decode_inter(s, frame, buf, buf_end) < 0) { av_log(avctx, AV_LOG_WARNING, "truncated inter frame\n"); diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/elbg.c b/arm/raspi/third_party/ffmpeg/libavcodec/elbg.c index d97a7bc3..7a6a84fb 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/elbg.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/elbg.c @@ -44,13 +44,13 @@ typedef struct cell_s { * ELBG internal data */ typedef struct ELBGContext { - int64_t error; + int error; int dim; int num_cb; int *codebook; cell **cells; - int64_t *utility; - int64_t *utility_inc; + int *utility; + int *utility_inc; int *nearest_cb; int *points; int *temp_points; @@ -75,9 +75,12 @@ static inline int distance_limited(int *a, int *b, int dim, int limit) { int i, dist=0; for (i=0; i limit) - return INT_MAX; + int64_t distance = a[i] - b[i]; + + distance *= distance; + if (dist >= limit - distance) + return limit; + dist += distance; } return dist; @@ -97,8 +100,12 @@ static inline void vect_division(int *res, int *vect, int div, int dim) static int eval_error_cell(ELBGContext *elbg, int *centroid, cell *cells) { int error=0; - for (; cells; cells=cells->next) - error += distance_limited(centroid, elbg->points + cells->index*elbg->dim, elbg->dim, INT_MAX); + for (; cells; cells=cells->next) { + int distance = distance_limited(centroid, elbg->points + cells->index*elbg->dim, elbg->dim, INT_MAX); + if (error >= INT_MAX - distance) + return INT_MAX; + error += distance; + } return error; } @@ -178,10 +185,13 @@ static int simple_lbg(ELBGContext *elbg, int dist[2] = {distance_limited(centroid[0], points + tempcell->index*dim, dim, INT_MAX), distance_limited(centroid[1], points + tempcell->index*dim, dim, INT_MAX)}; int idx = dist[0] > dist[1]; - newutility[idx] += dist[idx]; + if (newutility[idx] >= INT_MAX - dist[idx]) + newutility[idx] = INT_MAX; + else + newutility[idx] += dist[idx]; } - return newutility[0] + newutility[1]; + return (newutility[0] >= INT_MAX - newutility[1]) ? INT_MAX : newutility[0] + newutility[1]; } static void get_new_centroids(ELBGContext *elbg, int huc, int *newcentroid_i, @@ -253,9 +263,9 @@ static void evaluate_utility_inc(ELBGContext *elbg) int64_t inc=0; for (int i = 0; i < elbg->num_cb; i++) { - if (elbg->num_cb * elbg->utility[i] > elbg->error) + if (elbg->num_cb * (int64_t)elbg->utility[i] > elbg->error) inc += elbg->utility[i]; - elbg->utility_inc[i] = inc; + elbg->utility_inc[i] = FFMIN(inc, INT_MAX); } } @@ -278,7 +288,7 @@ static void update_utility_and_n_cb(ELBGContext *elbg, int idx, int newutility) */ static void try_shift_candidate(ELBGContext *elbg, int idx[3]) { - int j, k, cont=0; + int j, k, cont=0, tmp; int64_t olderror=0, newerror; int newutility[3]; int *newcentroid[3] = { @@ -305,12 +315,17 @@ static void try_shift_candidate(ELBGContext *elbg, int idx[3]) get_new_centroids(elbg, idx[1], newcentroid[0], newcentroid[1]); newutility[2] = eval_error_cell(elbg, newcentroid[2], elbg->cells[idx[0]]); - newutility[2] += eval_error_cell(elbg, newcentroid[2], elbg->cells[idx[2]]); + tmp = eval_error_cell(elbg, newcentroid[2], elbg->cells[idx[2]]); + newutility[2] = (tmp >= INT_MAX - newutility[2]) ? INT_MAX : newutility[2] + tmp; newerror = newutility[2]; - newerror += simple_lbg(elbg, elbg->dim, newcentroid, newutility, elbg->points, + tmp = simple_lbg(elbg, elbg->dim, newcentroid, newutility, elbg->points, elbg->cells[idx[1]]); + if (tmp >= INT_MAX - newerror) + newerror = INT_MAX; + else + newerror += tmp; if (olderror > newerror) { shift_codebook(elbg, idx, newcentroid); @@ -334,7 +349,7 @@ static void do_shiftings(ELBGContext *elbg) evaluate_utility_inc(elbg); for (idx[0]=0; idx[0] < elbg->num_cb; idx[0]++) - if (elbg->num_cb * elbg->utility[idx[0]] < elbg->error) { + if (elbg->num_cb * (int64_t)elbg->utility[idx[0]] < elbg->error) { if (elbg->utility_inc[elbg->num_cb - 1] == 0) return; @@ -352,9 +367,9 @@ static void do_elbg(ELBGContext *av_restrict elbg, int *points, int numpoints, int *const size_part = elbg->size_part; int i, j, steps = 0; int best_idx = 0; - int64_t last_error; + int last_error; - elbg->error = INT64_MAX; + elbg->error = INT_MAX; elbg->points = points; do { @@ -382,8 +397,9 @@ static void do_elbg(ELBGContext *av_restrict elbg, int *points, int numpoints, } } elbg->nearest_cb[i] = best_idx; - elbg->error += best_dist; - elbg->utility[elbg->nearest_cb[i]] += best_dist; + elbg->error = (elbg->error >= INT_MAX - best_dist) ? INT_MAX : elbg->error + best_dist; + elbg->utility[elbg->nearest_cb[i]] = (elbg->utility[elbg->nearest_cb[i]] >= INT_MAX - best_dist) ? + INT_MAX : elbg->utility[elbg->nearest_cb[i]] + best_dist; free_cells->index = i; free_cells->next = elbg->cells[elbg->nearest_cb[i]]; elbg->cells[elbg->nearest_cb[i]] = free_cells; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/encode.c b/arm/raspi/third_party/ffmpeg/libavcodec/encode.c index 041fc767..ab5f8896 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/encode.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/encode.c @@ -192,6 +192,21 @@ int ff_encode_get_frame(AVCodecContext *avctx, AVFrame *frame) av_frame_move_ref(frame, avci->buffer_frame); +#if FF_API_FRAME_KEY +FF_DISABLE_DEPRECATION_WARNINGS + if (frame->key_frame) + frame->flags |= AV_FRAME_FLAG_KEY; +FF_ENABLE_DEPRECATION_WARNINGS +#endif +#if FF_API_INTERLACED_FRAME +FF_DISABLE_DEPRECATION_WARNINGS + if (frame->interlaced_frame) + frame->flags |= AV_FRAME_FLAG_INTERLACED; + if (frame->top_field_first) + frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST; +FF_ENABLE_DEPRECATION_WARNINGS +#endif + return 0; } @@ -457,13 +472,6 @@ static int encode_send_frame_internal(AVCodecContext *avctx, const AVFrame *src) finish: -#if FF_API_PKT_DURATION -FF_DISABLE_DEPRECATION_WARNINGS - if (dst->pkt_duration && dst->pkt_duration != dst->duration) - dst->duration = dst->pkt_duration; -FF_ENABLE_DEPRECATION_WARNINGS -#endif - if (avctx->codec->type == AVMEDIA_TYPE_VIDEO) { ret = encode_generate_icc_profile(avctx, dst); if (ret < 0) @@ -574,6 +582,8 @@ static int encode_preinit_video(AVCodecContext *avctx) return AVERROR(EINVAL); } +#if FF_API_TICKS_PER_FRAME +FF_DISABLE_DEPRECATION_WARNINGS if (avctx->ticks_per_frame && avctx->time_base.num && avctx->ticks_per_frame > INT_MAX / avctx->time_base.num) { av_log(avctx, AV_LOG_ERROR, @@ -583,6 +593,8 @@ static int encode_preinit_video(AVCodecContext *avctx) avctx->time_base.den); return AVERROR(EINVAL); } +FF_ENABLE_DEPRECATION_WARNINGS +#endif if (avctx->hw_frames_ctx) { AVHWFramesContext *frames_ctx = (AVHWFramesContext*)avctx->hw_frames_ctx->data; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/error_resilience.c b/arm/raspi/third_party/ffmpeg/libavcodec/error_resilience.c index bd705006..2aa6f1d8 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/error_resilience.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/error_resilience.c @@ -805,7 +805,8 @@ void ff_er_frame_start(ERContext *s) static int er_supported(ERContext *s) { if(s->avctx->hwaccel && s->avctx->hwaccel->decode_slice || - !s->cur_pic.f + !s->cur_pic.f || + s->cur_pic.field_picture ) return 0; return 1; @@ -907,12 +908,6 @@ void ff_er_frame_end(ERContext *s) (s->avctx->skip_top + s->avctx->skip_bottom)) { return; } - - if (!s->warned_fields && (s->cur_pic.field_picture || s->cur_pic.f->interlaced_frame)) { - av_log(s->avctx, AV_LOG_WARNING, "Error concealment is not fully implemented for field pictures.\n"); - s->warned_fields = 1; - } - linesize = s->cur_pic.f->linesize; if ( s->avctx->codec_id == AV_CODEC_ID_MPEG2VIDEO diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/error_resilience.h b/arm/raspi/third_party/ffmpeg/libavcodec/error_resilience.h index 55efacac..47cc8a4f 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/error_resilience.h +++ b/arm/raspi/third_party/ffmpeg/libavcodec/error_resilience.h @@ -87,7 +87,6 @@ typedef struct ERContext { int (*mv)[2][4][2], int mb_x, int mb_y, int mb_intra, int mb_skipped); void *opaque; - int warned_fields; } ERContext; void ff_er_frame_start(ERContext *s); diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/escape124.c b/arm/raspi/third_party/ffmpeg/libavcodec/escape124.c index e8a8395f..592de09a 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/escape124.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/escape124.c @@ -155,7 +155,7 @@ static MacroBlock decode_macroblock(Escape124Context* s, GetBitContext* gb, // This condition can occur with invalid bitstreams and // *codebook_index == 2 - if (block_index >= s->codebooks[*codebook_index].size) + if (block_index >= s->codebooks[*codebook_index].size || !s->codebooks[*codebook_index].blocks) return (MacroBlock) { { 0 } }; return s->codebooks[*codebook_index].blocks[block_index]; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/exr.c b/arm/raspi/third_party/ffmpeg/libavcodec/exr.c index 2f1766c1..8cc6b056 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/exr.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/exr.c @@ -1930,8 +1930,10 @@ static int decode_header(EXRContext *s, AVFrame *frame) bytestream2_get_buffer(gb, key, FFMIN(sizeof(key) - 1, var_size)); if (strncmp("scanlineimage", key, var_size) && - strncmp("tiledimage", key, var_size)) - return AVERROR_PATCHWELCOME; + strncmp("tiledimage", key, var_size)) { + ret = AVERROR_PATCHWELCOME; + goto fail; + } continue; } else if ((var_size = check_header_variable(s, "preview", @@ -1939,12 +1941,16 @@ static int decode_header(EXRContext *s, AVFrame *frame) uint32_t pw = bytestream2_get_le32(gb); uint32_t ph = bytestream2_get_le32(gb); uint64_t psize = pw * ph; - if (psize > INT64_MAX / 4) - return AVERROR_INVALIDDATA; + if (psize > INT64_MAX / 4) { + ret = AVERROR_INVALIDDATA; + goto fail; + } psize *= 4; - if ((int64_t)psize >= bytestream2_get_bytes_left(gb)) - return AVERROR_INVALIDDATA; + if ((int64_t)psize >= bytestream2_get_bytes_left(gb)) { + ret = AVERROR_INVALIDDATA; + goto fail; + } bytestream2_skip(gb, psize); diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/ffv1dec.c b/arm/raspi/third_party/ffmpeg/libavcodec/ffv1dec.c index 180d24e6..54cf075b 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/ffv1dec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/ffv1dec.c @@ -217,13 +217,13 @@ static int decode_slice_header(const FFV1Context *f, FFV1Context *fs) ps = get_symbol(c, state, 0); if (ps == 1) { - f->cur->interlaced_frame = 1; - f->cur->top_field_first = 1; + f->cur->flags |= AV_FRAME_FLAG_INTERLACED; + f->cur->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST; } else if (ps == 2) { - f->cur->interlaced_frame = 1; - f->cur->top_field_first = 0; + f->cur->flags |= AV_FRAME_FLAG_INTERLACED; + f->cur->flags &= ~AV_FRAME_FLAG_TOP_FIELD_FIRST; } else if (ps == 3) { - f->cur->interlaced_frame = 0; + f->cur->flags &= ~AV_FRAME_FLAG_INTERLACED; } f->cur->sample_aspect_ratio.num = get_symbol(c, state, 0); f->cur->sample_aspect_ratio.den = get_symbol(c, state, 0); @@ -264,16 +264,16 @@ static int decode_slice(AVCodecContext *c, void *arg) for( si=0; fs != f->slice_context[si]; si ++) ; - if(f->fsrc && !p->key_frame) + if(f->fsrc && !(p->flags & AV_FRAME_FLAG_KEY)) ff_thread_await_progress(&f->last_picture, si, 0); - if(f->fsrc && !p->key_frame) { + if(f->fsrc && !(p->flags & AV_FRAME_FLAG_KEY)) { FFV1Context *fssrc = f->fsrc->slice_context[si]; FFV1Context *fsdst = f->slice_context[si]; av_assert1(fsdst->plane_count == fssrc->plane_count); av_assert1(fsdst == fs); - if (!p->key_frame) + if (!(p->flags & AV_FRAME_FLAG_KEY)) fsdst->slice_damaged |= fssrc->slice_damaged; for (i = 0; i < f->plane_count; i++) { @@ -310,7 +310,7 @@ static int decode_slice(AVCodecContext *c, void *arg) } if ((ret = ff_ffv1_init_slice_state(f, fs)) < 0) return ret; - if (f->cur->key_frame || fs->slice_reset_contexts) { + if ((f->cur->flags & AV_FRAME_FLAG_KEY) || fs->slice_reset_contexts) { ff_ffv1_clear_slice_state(f, fs); } else if (fs->slice_damaged) { return AVERROR_INVALIDDATA; @@ -439,6 +439,11 @@ static int read_extra_header(FFV1Context *f) av_log(f->avctx, AV_LOG_ERROR, "Invalid version in global header\n"); return AVERROR_INVALIDDATA; } + if (f->version > 4) { + av_log(f->avctx, AV_LOG_ERROR, "unsupported version %d\n", + f->version); + return AVERROR_PATCHWELCOME; + } if (f->version > 2) { c->bytestream_end -= 4; f->micro_version = get_symbol(c, state, 0); @@ -876,9 +881,9 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, if (f->version < 3 && avctx->field_order > AV_FIELD_PROGRESSIVE) { /* we have interlaced material flagged in container */ - p->interlaced_frame = 1; + p->flags |= AV_FRAME_FLAG_INTERLACED; if (avctx->field_order == AV_FIELD_TT || avctx->field_order == AV_FIELD_TB) - p->top_field_first = 1; + p->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST; } f->avctx = avctx; @@ -887,7 +892,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, p->pict_type = AV_PICTURE_TYPE_I; //FIXME I vs. P if (get_rac(c, &keystate)) { - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; f->key_frame_ok = 0; if ((ret = read_header(f)) < 0) return ret; @@ -898,7 +903,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, "Cannot decode non-keyframe without valid keyframe\n"); return AVERROR_INVALIDDATA; } - p->key_frame = 0; + p->flags &= ~AV_FRAME_FLAG_KEY; } if (f->ac != AC_GOLOMB_RICE) { @@ -922,7 +927,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, if (avctx->debug & FF_DEBUG_PICT_INFO) av_log(avctx, AV_LOG_DEBUG, "ver:%d keyframe:%d coder:%d ec:%d slices:%d bps:%d\n", - f->version, p->key_frame, f->ac, f->ec, f->slice_count, f->avctx->bits_per_raw_sample); + f->version, !!(p->flags & AV_FRAME_FLAG_KEY), f->ac, f->ec, f->slice_count, f->avctx->bits_per_raw_sample); ff_thread_finish_setup(avctx); diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/ffv1enc.c b/arm/raspi/third_party/ffmpeg/libavcodec/ffv1enc.c index fb12776c..746f7175 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/ffv1enc.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/ffv1enc.c @@ -916,10 +916,10 @@ static void encode_slice_header(FFV1Context *f, FFV1Context *fs) put_symbol(c, state, f->plane[j].quant_table_index, 0); av_assert0(f->plane[j].quant_table_index == f->context_model); } - if (!f->cur_enc_frame->interlaced_frame) + if (!(f->cur_enc_frame->flags & AV_FRAME_FLAG_INTERLACED)) put_symbol(c, state, 3, 0); else - put_symbol(c, state, 1 + !f->cur_enc_frame->top_field_first, 0); + put_symbol(c, state, 1 + !(f->cur_enc_frame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST), 0); put_symbol(c, state, f->cur_enc_frame->sample_aspect_ratio.num, 0); put_symbol(c, state, f->cur_enc_frame->sample_aspect_ratio.den, 0); if (f->version > 3) { diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/fic.c b/arm/raspi/third_party/ffmpeg/libavcodec/fic.c index 94cf4288..fb998021 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/fic.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/fic.c @@ -406,11 +406,11 @@ static int fic_decode_frame(AVCodecContext *avctx, AVFrame *rframe, NULL, nslices, sizeof(ctx->slice_data[0]))) < 0) return ret; - ctx->frame->key_frame = 1; + ctx->frame->flags |= AV_FRAME_FLAG_KEY; ctx->frame->pict_type = AV_PICTURE_TYPE_I; for (slice = 0; slice < nslices; slice++) { if (ctx->slice_data[slice].p_frame) { - ctx->frame->key_frame = 0; + ctx->frame->flags &= ~AV_FRAME_FLAG_KEY; ctx->frame->pict_type = AV_PICTURE_TYPE_P; break; } diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/fitsdec.c b/arm/raspi/third_party/ffmpeg/libavcodec/fitsdec.c index b9c51e70..284e945b 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/fitsdec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/fitsdec.c @@ -301,7 +301,7 @@ static int fits_decode_frame(AVCodecContext *avctx, AVFrame *p, } } - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; p->pict_type = AV_PICTURE_TYPE_I; *got_frame = 1; @@ -319,6 +319,7 @@ static const AVClass fits_decoder_class = { .item_name = av_default_item_name, .option = fits_options, .version = LIBAVUTIL_VERSION_INT, + .category = AV_CLASS_CATEGORY_DECODER, }; const FFCodec ff_fits_decoder = { diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/fitsenc.c b/arm/raspi/third_party/ffmpeg/libavcodec/fitsenc.c index 12952278..86ea11f0 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/fitsenc.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/fitsenc.c @@ -104,6 +104,7 @@ static int fits_encode_frame(AVCodecContext *avctx, AVPacket *pkt, bytes_left = padded_data_size - data_size; memset(bytestream, 0, bytes_left); + pkt->flags |= AV_PKT_FLAG_KEY; *got_packet = 1; return 0; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/flacdec.c b/arm/raspi/third_party/ffmpeg/libavcodec/flacdec.c index cc778a8d..524a0469 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/flacdec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/flacdec.c @@ -513,7 +513,7 @@ static int decode_subframe_lpc_33bps(FLACContext *s, int64_t *decoded, for (i = pred_order; i < s->blocksize; i++, decoded++) { int64_t sum = 0; for (j = 0; j < pred_order; j++) - sum += (int64_t)coeffs[j] * decoded[j]; + sum += (int64_t)coeffs[j] * (uint64_t)decoded[j]; decoded[j] = residual[i] + (sum >> qlevel); } diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/flicvideo.c b/arm/raspi/third_party/ffmpeg/libavcodec/flicvideo.c index 228f6527..e4b334e1 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/flicvideo.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/flicvideo.c @@ -473,7 +473,11 @@ static int flic_decode_frame_8BPP(AVCodecContext *avctx, /* make the palette available on the way out */ memcpy(s->frame->data[1], s->palette, AVPALETTE_SIZE); if (s->new_palette) { +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS s->frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif s->new_palette = 0; } diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/fmvc.c b/arm/raspi/third_party/ffmpeg/libavcodec/fmvc.c index 3ee915cc..5e26a541 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/fmvc.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/fmvc.c @@ -433,7 +433,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) return ret; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_I; src = s->buffer; @@ -519,7 +519,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) return ret; - frame->key_frame = 0; + frame->flags &= ~AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_P; ssrc = s->buffer; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/fraps.c b/arm/raspi/third_party/ffmpeg/libavcodec/fraps.c index f0a4c4c2..834e6576 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/fraps.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/fraps.c @@ -216,7 +216,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *f, } f->pict_type = AV_PICTURE_TYPE_I; - f->key_frame = 1; + f->flags |= AV_FRAME_FLAG_KEY; avctx->pix_fmt = version & 1 ? is_pal ? AV_PIX_FMT_PAL8 : AV_PIX_FMT_BGR24 : AV_PIX_FMT_YUVJ420P; avctx->color_range = version & 1 ? AVCOL_RANGE_UNSPECIFIED diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/frwu.c b/arm/raspi/third_party/ffmpeg/libavcodec/frwu.c index cf183f84..70bc1367 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/frwu.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/frwu.c @@ -63,7 +63,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *pic, return ret; pic->pict_type = AV_PICTURE_TYPE_I; - pic->key_frame = 1; + pic->flags |= AV_FRAME_FLAG_KEY; for (field = 0; field < 2; field++) { int i; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/ftr.c b/arm/raspi/third_party/ffmpeg/libavcodec/ftr.c index 74a2c10b..7cf1b158 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/ftr.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/ftr.c @@ -203,6 +203,10 @@ const FFCodec ff_ftr_decoder = { .close = ftr_close, .flush = ftr_flush, .priv_data_size = sizeof(FTRContext), - .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1, + .p.capabilities = +#if FF_API_SUBFRAMES + AV_CODEC_CAP_SUBFRAMES | +#endif + AV_CODEC_CAP_DR1, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, }; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/g2meet.c b/arm/raspi/third_party/ffmpeg/libavcodec/g2meet.c index 32b966e8..2dfa73df 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/g2meet.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/g2meet.c @@ -145,7 +145,8 @@ typedef struct G2MContext { int got_header; uint8_t *framebuf; - int framebuf_stride, old_width, old_height; + int framebuf_stride; + unsigned int framebuf_allocated; uint8_t *synth_tile, *jpeg_tile, *epic_buf, *epic_buf_base; int tile_stride, epic_buf_stride, old_tile_w, old_tile_h; @@ -1160,14 +1161,13 @@ static int g2m_init_buffers(G2MContext *c) { int aligned_height; - if (!c->framebuf || c->old_width < c->width || c->old_height < c->height) { - c->framebuf_stride = FFALIGN(c->width + 15, 16) * 3; - aligned_height = c->height + 15; - av_free(c->framebuf); - c->framebuf = av_calloc(c->framebuf_stride, aligned_height); - if (!c->framebuf) - return AVERROR(ENOMEM); - } + c->framebuf_stride = FFALIGN(c->width + 15, 16) * 3; + aligned_height = c->height + 15; + + av_fast_mallocz(&c->framebuf, &c->framebuf_allocated, c->framebuf_stride * aligned_height); + if (!c->framebuf) + return AVERROR(ENOMEM); + if (!c->synth_tile || !c->jpeg_tile || (c->compression == 2 && !c->epic_buf_base) || c->old_tile_w < c->tile_width || @@ -1560,7 +1560,10 @@ static int g2m_decode_frame(AVCodecContext *avctx, AVFrame *pic, if ((ret = ff_get_buffer(avctx, pic, 0)) < 0) return ret; - pic->key_frame = got_header; + if (got_header) + pic->flags |= AV_FRAME_FLAG_KEY; + else + pic->flags &= ~AV_FRAME_FLAG_KEY; pic->pict_type = got_header ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; for (i = 0; i < avctx->height; i++) @@ -1617,6 +1620,7 @@ static av_cold int g2m_decode_end(AVCodecContext *avctx) av_freep(&c->jpeg_tile); av_freep(&c->cursor); av_freep(&c->framebuf); + c->framebuf_allocated = 0; return 0; } diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/g723_1dec.c b/arm/raspi/third_party/ffmpeg/libavcodec/g723_1dec.c index 55e20de5..5fe4a21d 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/g723_1dec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/g723_1dec.c @@ -1118,6 +1118,10 @@ const FFCodec ff_g723_1_decoder = { .priv_data_size = sizeof(G723_1_Context), .init = g723_1_decode_init, FF_CODEC_DECODE_CB(g723_1_decode_frame), - .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1, + .p.capabilities = +#if FF_API_SUBFRAMES + AV_CODEC_CAP_SUBFRAMES | +#endif + AV_CODEC_CAP_DR1, .p.priv_class = &g723_1dec_class, }; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/g729dec.c b/arm/raspi/third_party/ffmpeg/libavcodec/g729dec.c index f783812c..33e1fb9c 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/g729dec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/g729dec.c @@ -760,7 +760,11 @@ const FFCodec ff_g729_decoder = { .init = decoder_init, FF_CODEC_DECODE_CB(decode_frame), .close = decode_close, - .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1, + .p.capabilities = +#if FF_API_SUBFRAMES + AV_CODEC_CAP_SUBFRAMES | +#endif + AV_CODEC_CAP_DR1, }; const FFCodec ff_acelp_kelvin_decoder = { @@ -772,5 +776,9 @@ const FFCodec ff_acelp_kelvin_decoder = { .init = decoder_init, FF_CODEC_DECODE_CB(decode_frame), .close = decode_close, - .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1, + .p.capabilities = +#if FF_API_SUBFRAMES + AV_CODEC_CAP_SUBFRAMES | +#endif + AV_CODEC_CAP_DR1, }; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/g729postfilter.c b/arm/raspi/third_party/ffmpeg/libavcodec/g729postfilter.c index f3cacbac..26e937f0 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/g729postfilter.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/g729postfilter.c @@ -353,7 +353,7 @@ static int16_t long_term_filter(AudioDSPContext *adsp, int pitch_delay_int, if (tmp > 0) L_temp0 >>= tmp; else - L_temp1 >>= -tmp; + L_temp1 >>= FFMIN(-tmp, 31); /* Check if longer filter increases the values of R'(k). */ if (L_temp1 > L_temp0) { diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/gemdec.c b/arm/raspi/third_party/ffmpeg/libavcodec/gemdec.c index c8fd8dcd..9e2a50c7 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/gemdec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/gemdec.c @@ -180,8 +180,12 @@ static int gem_decode_frame(AVCodecContext *avctx, AVFrame *p, return ret; p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS p->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif palette = (uint32_t *)p->data[1]; if (tag == AV_RB32("STTT")) { diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/gif_parser.c b/arm/raspi/third_party/ffmpeg/libavcodec/gif_parser.c index 4c18c00d..aa07585f 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/gif_parser.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/gif_parser.c @@ -24,9 +24,6 @@ * GIF parser */ -#include "libavutil/bswap.h" -#include "libavutil/common.h" - #include "gif.h" #include "parser.h" @@ -50,11 +47,13 @@ typedef struct GIFParseContext { int block_size; int etype; int delay; + int keyframe; } GIFParseContext; static int gif_find_frame_end(GIFParseContext *g, const uint8_t *buf, int buf_size, void *logctx) { + ParseContext *pc = &g->pc; int index, next = END_NOT_FOUND; for (index = 0; index < buf_size; index++) { @@ -63,9 +62,10 @@ static int gif_find_frame_end(GIFParseContext *g, const uint8_t *buf, !memcmp(buf + index, gif89a_sig, 6)) { g->state = GIF_HEADER; g->found_sig++; + g->keyframe = 1; } else if (buf[index] == GIF_EXTENSION_INTRODUCER) { g->state = GIF_EXTENSION; - g->found_start = 1; + g->found_start = pc->frame_start_found = 1; } else if (buf[index] == GIF_IMAGE_SEPARATOR) { g->state = GIF_IMAGE; } else if (buf[index] == GIF_TRAILER) { @@ -93,7 +93,7 @@ static int gif_find_frame_end(GIFParseContext *g, const uint8_t *buf, } else if (g->state == GIF_EXTENSION) { if (g->found_start && g->found_end && g->found_sig) { next = index; - g->found_start = 0; + g->found_start = pc->frame_start_found = 0; g->found_end = 0; g->index = 0; g->gct_flag = 0; @@ -140,7 +140,7 @@ static int gif_find_frame_end(GIFParseContext *g, const uint8_t *buf, } g->index++; } else if (g->state == GIF_IMAGE) { - if (g->index == 8) { + if (g->index == 9) { g->gct_flag = !!(buf[index] & 0x80); g->gct_size = 3 * (1 << ((buf[index] & 0x07) + 1)); } @@ -165,14 +165,24 @@ static int gif_parse(AVCodecParserContext *s, AVCodecContext *avctx, GIFParseContext *g = s->priv_data; int next; - next = gif_find_frame_end(g, buf, buf_size, avctx); - if (ff_combine_frame(&g->pc, next, &buf, &buf_size) < 0) { - *poutbuf = NULL; - *poutbuf_size = 0; - return buf_size; + *poutbuf_size = 0; + *poutbuf = NULL; + + if (s->flags & PARSER_FLAG_COMPLETE_FRAMES) { + next = buf_size; + } else { + next = gif_find_frame_end(g, buf, buf_size, avctx); + if (ff_combine_frame(&g->pc, next, &buf, &buf_size) < 0) { + *poutbuf = NULL; + *poutbuf_size = 0; + return buf_size; + } } - s->duration = g->delay; + s->duration = g->delay ? g->delay : 10; + s->key_frame = g->keyframe; + s->pict_type = g->keyframe ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; + g->keyframe = 0; *poutbuf = buf; *poutbuf_size = buf_size; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/gifdec.c b/arm/raspi/third_party/ffmpeg/libavcodec/gifdec.c index f47390c3..0835c5bd 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/gifdec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/gifdec.c @@ -501,7 +501,7 @@ static int gif_decode_frame(AVCodecContext *avctx, AVFrame *rframe, return AVERROR(ENOMEM); s->frame->pict_type = AV_PICTURE_TYPE_I; - s->frame->key_frame = 1; + s->frame->flags |= AV_FRAME_FLAG_KEY; s->keyframe_ok = 1; } else { if (!s->keyframe_ok) { @@ -513,7 +513,7 @@ static int gif_decode_frame(AVCodecContext *avctx, AVFrame *rframe, return ret; s->frame->pict_type = AV_PICTURE_TYPE_P; - s->frame->key_frame = 0; + s->frame->flags &= ~AV_FRAME_FLAG_KEY; } ret = gif_parse_next_image(s, s->frame); diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/h261dec.c b/arm/raspi/third_party/ffmpeg/libavcodec/h261dec.c index 84962939..620b7eef 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/h261dec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/h261dec.c @@ -643,7 +643,10 @@ retry: // for skipping the frame s->current_picture.f->pict_type = s->pict_type; - s->current_picture.f->key_frame = s->pict_type == AV_PICTURE_TYPE_I; + if (s->pict_type == AV_PICTURE_TYPE_I) + s->current_picture.f->flags |= AV_FRAME_FLAG_KEY; + else + s->current_picture.f->flags &= ~AV_FRAME_FLAG_KEY; if ((avctx->skip_frame >= AVDISCARD_NONREF && s->pict_type == AV_PICTURE_TYPE_B) || (avctx->skip_frame >= AVDISCARD_NONKEY && s->pict_type != AV_PICTURE_TYPE_I) || diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/h264_parser.c b/arm/raspi/third_party/ffmpeg/libavcodec/h264_parser.c index 19a23f0a..6ea4d534 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/h264_parser.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/h264_parser.c @@ -568,7 +568,7 @@ static inline int parse_nal_units(AVCodecParserContext *s, if (p->sei.common.unregistered.x264_build < 44U) den *= 2; av_reduce(&avctx->framerate.den, &avctx->framerate.num, - sps->num_units_in_tick * avctx->ticks_per_frame, den, 1 << 30); + sps->num_units_in_tick * 2, den, 1 << 30); } av_freep(&rbsp.rbsp_buffer); @@ -625,7 +625,7 @@ static int h264_parse(AVCodecParserContext *s, parse_nal_units(s, avctx, buf, buf_size); if (avctx->framerate.num) - time_base = av_inv_q(av_mul_q(avctx->framerate, (AVRational){avctx->ticks_per_frame, 1})); + time_base = av_inv_q(av_mul_q(avctx->framerate, (AVRational){2, 1})); if (p->sei.picture_timing.cpb_removal_delay >= 0) { s->dts_sync_point = p->sei.buffering_period.present; s->dts_ref_dts_delta = p->sei.picture_timing.cpb_removal_delay; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/h264_picture.c b/arm/raspi/third_party/ffmpeg/libavcodec/h264_picture.c index 2661ff46..dcaf0fdb 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/h264_picture.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/h264_picture.c @@ -154,8 +154,7 @@ int ff_h264_replace_picture(H264Context *h, H264Picture *dst, const H264Picture av_assert0(src->tf.f == src->f); dst->tf.f = dst->f; - ff_thread_release_ext_buffer(h->avctx, &dst->tf); - ret = ff_thread_ref_frame(&dst->tf, &src->tf); + ret = ff_thread_replace_frame(h->avctx, &dst->tf, &src->tf); if (ret < 0) goto fail; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/h264_slice.c b/arm/raspi/third_party/ffmpeg/libavcodec/h264_slice.c index 7767e16c..be7a8e0b 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/h264_slice.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/h264_slice.c @@ -501,7 +501,7 @@ FF_ENABLE_DEPRECATION_WARNINGS * in later. * See decode_nal_units(). */ - pic->f->key_frame = 0; + pic->f->flags &= ~AV_FRAME_FLAG_KEY; pic->mmco_reset = 0; pic->recovered = 0; pic->invalid_gap = 0; @@ -809,8 +809,15 @@ static enum AVPixelFormat get_pixel_format(H264Context *h, int force_callback) *fmt++ = AV_PIX_FMT_YUV444P10; } else if (CHROMA422(h)) *fmt++ = AV_PIX_FMT_YUV422P10; - else + else { +#if CONFIG_H264_VAAPI_HWACCEL + // Just add as candidate. Whether VAProfileH264High10 usable or + // not is decided by vaapi_decode_make_config() defined in FFmpeg + // and vaQueryCodingProfile() defined in libva. + *fmt++ = AV_PIX_FMT_VAAPI; +#endif *fmt++ = AV_PIX_FMT_YUV420P10; + } break; case 12: if (CHROMA444(h)) { @@ -950,7 +957,7 @@ static int h264_slice_header_init(H264Context *h) if (h->x264_build < 44U) den *= 2; av_reduce(&h->avctx->framerate.den, &h->avctx->framerate.num, - sps->num_units_in_tick * h->avctx->ticks_per_frame, den, 1 << 30); + sps->num_units_in_tick * 2, den, 1 << 30); } ff_h264_free_tables(h); @@ -1148,9 +1155,10 @@ static int h264_export_frame_props(H264Context *h) const SPS *sps = h->ps.sps; H264Picture *cur = h->cur_pic_ptr; AVFrame *out = cur->f; + int interlaced_frame = 0, top_field_first = 0; int ret; - out->interlaced_frame = 0; + out->flags &= ~AV_FRAME_FLAG_INTERLACED; out->repeat_pict = 0; /* Signal interlacing information externally. */ @@ -1174,15 +1182,15 @@ static int h264_export_frame_props(H264Context *h) break; case H264_SEI_PIC_STRUCT_TOP_FIELD: case H264_SEI_PIC_STRUCT_BOTTOM_FIELD: - out->interlaced_frame = 1; + interlaced_frame = 1; break; case H264_SEI_PIC_STRUCT_TOP_BOTTOM: case H264_SEI_PIC_STRUCT_BOTTOM_TOP: if (FIELD_OR_MBAFF_PICTURE(h)) - out->interlaced_frame = 1; + interlaced_frame = 1; else // try to flag soft telecine progressive - out->interlaced_frame = h->prev_interlaced_frame; + interlaced_frame = !!h->prev_interlaced_frame; break; case H264_SEI_PIC_STRUCT_TOP_BOTTOM_TOP: case H264_SEI_PIC_STRUCT_BOTTOM_TOP_BOTTOM: @@ -1201,35 +1209,34 @@ static int h264_export_frame_props(H264Context *h) if ((pt->ct_type & 3) && pt->pic_struct <= H264_SEI_PIC_STRUCT_BOTTOM_TOP) - out->interlaced_frame = (pt->ct_type & (1 << 1)) != 0; + interlaced_frame = ((pt->ct_type & (1 << 1)) != 0); } else { /* Derive interlacing flag from used decoding process. */ - out->interlaced_frame = FIELD_OR_MBAFF_PICTURE(h); + interlaced_frame = !!FIELD_OR_MBAFF_PICTURE(h); } - h->prev_interlaced_frame = out->interlaced_frame; + h->prev_interlaced_frame = interlaced_frame; if (cur->field_poc[0] != cur->field_poc[1]) { /* Derive top_field_first from field pocs. */ - out->top_field_first = cur->field_poc[0] < cur->field_poc[1]; + top_field_first = (cur->field_poc[0] < cur->field_poc[1]); } else { if (sps->pic_struct_present_flag && h->sei.picture_timing.present) { /* Use picture timing SEI information. Even if it is a * information of a past frame, better than nothing. */ if (h->sei.picture_timing.pic_struct == H264_SEI_PIC_STRUCT_TOP_BOTTOM || h->sei.picture_timing.pic_struct == H264_SEI_PIC_STRUCT_TOP_BOTTOM_TOP) - out->top_field_first = 1; - else - out->top_field_first = 0; - } else if (out->interlaced_frame) { + top_field_first = 1; + } else if (interlaced_frame) { /* Default to top field first when pic_struct_present_flag * is not set but interlaced frame detected */ - out->top_field_first = 1; - } else { + top_field_first = 1; + } // else /* Most likely progressive */ - out->top_field_first = 0; - } } + out->flags |= (AV_FRAME_FLAG_INTERLACED * interlaced_frame) | + (AV_FRAME_FLAG_TOP_FIELD_FIRST * top_field_first); + ret = ff_h2645_sei_to_frame(out, &h->sei.common, AV_CODEC_ID_H264, h->avctx, &sps->vui, sps->bit_depth_luma, sps->bit_depth_chroma, cur->poc + (unsigned)(h->poc_offset << 5)); @@ -1319,7 +1326,7 @@ static int h264_select_output_frame(H264Context *h) out = h->delayed_pic[0]; out_idx = 0; for (i = 1; h->delayed_pic[i] && - !h->delayed_pic[i]->f->key_frame && + !(h->delayed_pic[i]->f->flags & AV_FRAME_FLAG_KEY) && !h->delayed_pic[i]->mmco_reset; i++) if (h->delayed_pic[i]->poc < out->poc) { @@ -1327,7 +1334,7 @@ static int h264_select_output_frame(H264Context *h) out_idx = i; } if (h->avctx->has_b_frames == 0 && - (h->delayed_pic[0]->f->key_frame || h->delayed_pic[0]->mmco_reset)) + ((h->delayed_pic[0]->f->flags & AV_FRAME_FLAG_KEY) || h->delayed_pic[0]->mmco_reset)) h->next_outputed_poc = INT_MIN; out_of_order = out->poc < h->next_outputed_poc; @@ -1338,7 +1345,7 @@ static int h264_select_output_frame(H264Context *h) } if (!out_of_order && pics > h->avctx->has_b_frames) { h->next_output_pic = out; - if (out_idx == 0 && h->delayed_pic[0] && (h->delayed_pic[0]->f->key_frame || h->delayed_pic[0]->mmco_reset)) { + if (out_idx == 0 && h->delayed_pic[0] && ((h->delayed_pic[0]->f->flags & AV_FRAME_FLAG_KEY) || h->delayed_pic[0]->mmco_reset)) { h->next_outputed_poc = INT_MIN; } else h->next_outputed_poc = out->poc; @@ -1628,7 +1635,7 @@ static int h264_field_start(H264Context *h, const H264SliceContext *sl, } } - h->cur_pic_ptr->f->key_frame |= (nal->type == H264_NAL_IDR_SLICE); + h->cur_pic_ptr->f->flags |= AV_FRAME_FLAG_KEY * !!(nal->type == H264_NAL_IDR_SLICE); if (nal->type == H264_NAL_IDR_SLICE || (h->recovery_frame == h->poc.frame_num && nal->ref_idc)) { diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/h264dec.c b/arm/raspi/third_party/ffmpeg/libavcodec/h264dec.c index 9db2bf62..859260f7 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/h264dec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/h264dec.c @@ -382,7 +382,11 @@ static av_cold int h264_decode_init(AVCodecContext *avctx) return AVERROR_UNKNOWN; } +#if FF_API_TICKS_PER_FRAME +FF_DISABLE_DEPRECATION_WARNINGS avctx->ticks_per_frame = 2; +FF_ENABLE_DEPRECATION_WARNINGS +#endif if (!avctx->internal->is_copy) { if (avctx->extradata_size > 0 && avctx->extradata) { @@ -849,7 +853,7 @@ static int output_frame(H264Context *h, AVFrame *dst, H264Picture *srcp) av_dict_set(&dst->metadata, "stereo_mode", ff_h264_sei_stereo_mode(&h->sei.common.frame_packing), 0); if (srcp->sei_recovery_frame_cnt == 0) - dst->key_frame = 1; + dst->flags |= AV_FRAME_FLAG_KEY; if (h->avctx->export_side_data & AV_CODEC_EXPORT_DATA_VIDEO_ENC_PARAMS) { ret = h264_export_enc_params(dst, srcp); @@ -951,7 +955,7 @@ static int send_next_delayed_frame(H264Context *h, AVFrame *dst_frame, out_idx = 0; for (i = 1; h->delayed_pic[i] && - !h->delayed_pic[i]->f->key_frame && + !(h->delayed_pic[i]->f->flags & AV_FRAME_FLAG_KEY) && !h->delayed_pic[i]->mmco_reset; i++) if (h->delayed_pic[i]->poc < out->poc) { diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/hapdec.c b/arm/raspi/third_party/ffmpeg/libavcodec/hapdec.c index 3df69e63..fee3c04d 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/hapdec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/hapdec.c @@ -328,7 +328,7 @@ static int hap_decode(AVCodecContext *avctx, AVFrame *frame, /* Frame is ready to be output */ frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; *got_frame = 1; return avpkt->size; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/hdrdec.c b/arm/raspi/third_party/ffmpeg/libavcodec/hdrdec.c index 99822774..9b6395bb 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/hdrdec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/hdrdec.c @@ -212,7 +212,7 @@ convert: } } - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; p->pict_type = AV_PICTURE_TYPE_I; *got_frame = 1; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/hevc_ps.c b/arm/raspi/third_party/ffmpeg/libavcodec/hevc_ps.c index 348e4d8d..043e1bf3 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/hevc_ps.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/hevc_ps.c @@ -927,8 +927,18 @@ int ff_hevc_parse_sps(HEVCSPS *sps, GetBitContext *gb, unsigned int *sps_id, sps->output_window = sps->pic_conf_win; } - sps->bit_depth = get_ue_golomb_long(gb) + 8; - bit_depth_chroma = get_ue_golomb_long(gb) + 8; + sps->bit_depth = get_ue_golomb_31(gb) + 8; + if (sps->bit_depth > 16) { + av_log(avctx, AV_LOG_ERROR, "Luma bit depth (%d) is out of range\n", + sps->bit_depth); + return AVERROR_INVALIDDATA; + } + bit_depth_chroma = get_ue_golomb_31(gb) + 8; + if (bit_depth_chroma > 16) { + av_log(avctx, AV_LOG_ERROR, "Chroma bit depth (%d) is out of range\n", + bit_depth_chroma); + return AVERROR_INVALIDDATA; + } if (sps->chroma_format_idc && bit_depth_chroma != sps->bit_depth) { av_log(avctx, AV_LOG_ERROR, "Luma bit depth (%d) is different from chroma bit depth (%d), " @@ -1140,17 +1150,24 @@ int ff_hevc_parse_sps(HEVCSPS *sps, GetBitContext *gb, unsigned int *sps_id, sps->sps_curr_pic_ref_enabled_flag = get_bits1(gb); sps->palette_mode_enabled_flag = get_bits1(gb); if (sps->palette_mode_enabled_flag) { - sps->palette_max_size = get_ue_golomb_long(gb); - sps->delta_palette_max_predictor_size = get_ue_golomb_long(gb); + sps->palette_max_size = get_ue_golomb(gb); + sps->delta_palette_max_predictor_size = get_ue_golomb(gb); sps->sps_palette_predictor_initializers_present_flag = get_bits1(gb); if (sps->sps_palette_predictor_initializers_present_flag) { - sps->sps_num_palette_predictor_initializers_minus1 = get_ue_golomb_long(gb); + sps->sps_num_palette_predictor_initializers = get_ue_golomb(gb) + 1; + if (sps->sps_num_palette_predictor_initializers > HEVC_MAX_PALETTE_PREDICTOR_SIZE) { + av_log(avctx, AV_LOG_ERROR, + "sps_num_palette_predictor_initializers out of range: %u\n", + sps->sps_num_palette_predictor_initializers); + return AVERROR_INVALIDDATA; + } num_comps = !sps->chroma_format_idc ? 1 : 3; - for (int comp = 0; comp < num_comps; comp++) - for (i = 0; i <= sps->sps_num_palette_predictor_initializers_minus1; i++) - sps->sps_palette_predictor_initializer[comp][i] = - get_bits(gb, !comp ? sps->bit_depth : sps->bit_depth_chroma); + for (int comp = 0; comp < num_comps; comp++) { + int bit_depth = !comp ? sps->bit_depth : sps->bit_depth_chroma; + for (i = 0; i < sps->sps_num_palette_predictor_initializers; i++) + sps->sps_palette_predictor_initializer[comp][i] = get_bits(gb, bit_depth); + } } } sps->motion_vector_resolution_control_idc = get_bits(gb, 2); @@ -1324,7 +1341,7 @@ static void colour_mapping_octants(GetBitContext *gb, HEVCPPS *pps, int inp_dept int idx_y, int idx_cb, int idx_cr, int inp_length) { unsigned int split_octant_flag, part_num_y, coded_res_flag, res_coeff_q, res_coeff_r; - int bit_depth_cm_input_y, bit_depth_cm_output_y, cm_res_bits; + int cm_res_bits; part_num_y = 1 << pps->cm_y_part_num_log2; @@ -1346,10 +1363,9 @@ static void colour_mapping_octants(GetBitContext *gb, HEVCPPS *pps, int inp_dept if (coded_res_flag) for (int c = 0; c < 3; c++) { res_coeff_q = get_ue_golomb_long(gb); - bit_depth_cm_input_y = 8 + pps->luma_bit_depth_cm_input_minus8; - bit_depth_cm_output_y = 8 + pps->luma_bit_depth_cm_output_minus8; - cm_res_bits = FFMAX(0, 10 + bit_depth_cm_input_y - bit_depth_cm_output_y - - pps->cm_res_quant_bits - (pps->cm_delta_flc_bits_minus1 + 1)); + cm_res_bits = FFMAX(0, 10 + pps->luma_bit_depth_cm_input - + pps->luma_bit_depth_cm_output - + pps->cm_res_quant_bits - pps->cm_delta_flc_bits); res_coeff_r = cm_res_bits ? get_bits(gb, cm_res_bits) : 0; if (res_coeff_q || res_coeff_r) skip_bits1(gb); @@ -1358,22 +1374,27 @@ static void colour_mapping_octants(GetBitContext *gb, HEVCPPS *pps, int inp_dept } } -static void colour_mapping_table(GetBitContext *gb, HEVCPPS *pps) +static int colour_mapping_table(GetBitContext *gb, AVCodecContext *avctx, HEVCPPS *pps) { - pps->num_cm_ref_layers_minus1 = get_ue_golomb_long(gb); - for (int i = 0; i <= pps->num_cm_ref_layers_minus1; i++) + pps->num_cm_ref_layers = get_ue_golomb(gb) + 1; + if (pps->num_cm_ref_layers > 62) { + av_log(avctx, AV_LOG_ERROR, + "num_cm_ref_layers_minus1 shall be in the range [0, 61].\n"); + return AVERROR_INVALIDDATA; + } + for (int i = 0; i < pps->num_cm_ref_layers; i++) pps->cm_ref_layer_id[i] = get_bits(gb, 6); pps->cm_octant_depth = get_bits(gb, 2); pps->cm_y_part_num_log2 = get_bits(gb, 2); - pps->luma_bit_depth_cm_input_minus8 = get_ue_golomb_long(gb); - pps->chroma_bit_depth_cm_input_minus8 = get_ue_golomb_long(gb); - pps->luma_bit_depth_cm_output_minus8 = get_ue_golomb_long(gb); - pps->chroma_bit_depth_cm_output_minus8 = get_ue_golomb_long(gb); + pps->luma_bit_depth_cm_input = get_ue_golomb(gb) + 8; + pps->chroma_bit_depth_cm_input = get_ue_golomb(gb) + 8; + pps->luma_bit_depth_cm_output = get_ue_golomb(gb) + 8; + pps->chroma_bit_depth_cm_output = get_ue_golomb(gb) + 8; pps->cm_res_quant_bits = get_bits(gb, 2); - pps->cm_delta_flc_bits_minus1 = get_bits(gb, 2); + pps->cm_delta_flc_bits = get_bits(gb, 2) + 1; if (pps->cm_octant_depth == 1) { pps->cm_adapt_threshold_u_delta = get_se_golomb_long(gb); @@ -1381,17 +1402,22 @@ static void colour_mapping_table(GetBitContext *gb, HEVCPPS *pps) } colour_mapping_octants(gb, pps, 0, 0, 0, 0, 1 << pps->cm_octant_depth); + + return 0; } static int pps_multilayer_extension(GetBitContext *gb, AVCodecContext *avctx, - HEVCPPS *pps, HEVCSPS *sps) + HEVCPPS *pps, HEVCSPS *sps, HEVCVPS *vps) { pps->poc_reset_info_present_flag = get_bits1(gb); pps->pps_infer_scaling_list_flag = get_bits1(gb); if (pps->pps_infer_scaling_list_flag) pps->pps_scaling_list_ref_layer_id = get_bits(gb, 6); - pps->num_ref_loc_offsets = get_ue_golomb_long(gb); + pps->num_ref_loc_offsets = get_ue_golomb(gb); + if (pps->num_ref_loc_offsets > vps->vps_max_layers - 1) + return AVERROR_INVALIDDATA; + for (int i = 0; i < pps->num_ref_loc_offsets; i++) { pps->ref_loc_offset_layer_id[i] = get_bits(gb, 6); pps->scaled_ref_layer_offset_present_flag[i] = get_bits1(gb); @@ -1412,16 +1438,19 @@ static int pps_multilayer_extension(GetBitContext *gb, AVCodecContext *avctx, pps->resample_phase_set_present_flag[i] = get_bits1(gb); if (pps->resample_phase_set_present_flag[i]) { - pps->phase_hor_luma[pps->ref_loc_offset_layer_id[i]] = get_ue_golomb_long(gb); - pps->phase_ver_luma[pps->ref_loc_offset_layer_id[i]] = get_ue_golomb_long(gb); - pps->phase_hor_chroma_plus8[pps->ref_loc_offset_layer_id[i]] = get_ue_golomb_long(gb); - pps->phase_ver_chroma_plus8[pps->ref_loc_offset_layer_id[i]] = get_ue_golomb_long(gb); + pps->phase_hor_luma[pps->ref_loc_offset_layer_id[i]] = get_ue_golomb_31(gb); + pps->phase_ver_luma[pps->ref_loc_offset_layer_id[i]] = get_ue_golomb_31(gb); + pps->phase_hor_chroma[pps->ref_loc_offset_layer_id[i]] = get_ue_golomb(gb) - 8; + pps->phase_ver_chroma[pps->ref_loc_offset_layer_id[i]] = get_ue_golomb(gb) - 8; } } pps->colour_mapping_enabled_flag = get_bits1(gb); - if (pps->colour_mapping_enabled_flag) - colour_mapping_table(gb, pps); + if (pps->colour_mapping_enabled_flag) { + int ret = colour_mapping_table(gb, avctx, pps); + if (ret < 0) + return ret; + } return 0; } @@ -1476,33 +1505,33 @@ static int pps_range_extensions(GetBitContext *gb, AVCodecContext *avctx, HEVCPPS *pps, HEVCSPS *sps) { if (pps->transform_skip_enabled_flag) { - pps->log2_max_transform_skip_block_size = get_ue_golomb_long(gb) + 2; + pps->log2_max_transform_skip_block_size = get_ue_golomb_31(gb) + 2; } pps->cross_component_prediction_enabled_flag = get_bits1(gb); pps->chroma_qp_offset_list_enabled_flag = get_bits1(gb); if (pps->chroma_qp_offset_list_enabled_flag) { - pps->diff_cu_chroma_qp_offset_depth = get_ue_golomb_long(gb); - pps->chroma_qp_offset_list_len_minus1 = get_ue_golomb_long(gb); + pps->diff_cu_chroma_qp_offset_depth = get_ue_golomb_31(gb); + pps->chroma_qp_offset_list_len_minus1 = get_ue_golomb_31(gb); if (pps->chroma_qp_offset_list_len_minus1 > 5) { av_log(avctx, AV_LOG_ERROR, "chroma_qp_offset_list_len_minus1 shall be in the range [0, 5].\n"); return AVERROR_INVALIDDATA; } for (int i = 0; i <= pps->chroma_qp_offset_list_len_minus1; i++) { - pps->cb_qp_offset_list[i] = get_se_golomb_long(gb); + pps->cb_qp_offset_list[i] = get_se_golomb(gb); if (pps->cb_qp_offset_list[i]) { av_log(avctx, AV_LOG_WARNING, "cb_qp_offset_list not tested yet.\n"); } - pps->cr_qp_offset_list[i] = get_se_golomb_long(gb); + pps->cr_qp_offset_list[i] = get_se_golomb(gb); if (pps->cr_qp_offset_list[i]) { av_log(avctx, AV_LOG_WARNING, "cb_qp_offset_list not tested yet.\n"); } } } - pps->log2_sao_offset_scale_luma = get_ue_golomb_long(gb); - pps->log2_sao_offset_scale_chroma = get_ue_golomb_long(gb); + pps->log2_sao_offset_scale_luma = get_ue_golomb_31(gb); + pps->log2_sao_offset_scale_chroma = get_ue_golomb_31(gb); if ( pps->log2_sao_offset_scale_luma > FFMAX(sps->bit_depth - 10, 0) || pps->log2_sao_offset_scale_chroma > FFMAX(sps->bit_depth_chroma - 10, 0) @@ -1520,9 +1549,9 @@ static int pps_scc_extension(GetBitContext *gb, AVCodecContext *avctx, pps->pps_curr_pic_ref_enabled_flag = get_bits1(gb); if (pps->residual_adaptive_colour_transform_enabled_flag = get_bits1(gb)) { pps->pps_slice_act_qp_offsets_present_flag = get_bits1(gb); - pps->pps_act_y_qp_offset = get_se_golomb_long(gb) - 5; - pps->pps_act_cb_qp_offset = get_se_golomb_long(gb) - 5; - pps->pps_act_cr_qp_offset = get_se_golomb_long(gb) - 3; + pps->pps_act_y_qp_offset = get_se_golomb(gb) - 5; + pps->pps_act_cb_qp_offset = get_se_golomb(gb) - 5; + pps->pps_act_cr_qp_offset = get_se_golomb(gb) - 3; #define CHECK_QP_OFFSET(name) (pps->pps_act_ ## name ## _qp_offset <= -12 || \ pps->pps_act_ ## name ## _qp_offset >= 12) @@ -1536,17 +1565,28 @@ static int pps_scc_extension(GetBitContext *gb, AVCodecContext *avctx, } if (pps->pps_palette_predictor_initializers_present_flag = get_bits1(gb)) { - if ((pps->pps_num_palette_predictor_initializers = get_ue_golomb_long(gb)) > 0) { + pps->pps_num_palette_predictor_initializers = get_ue_golomb(gb); + if (pps->pps_num_palette_predictor_initializers > 0) { + if (pps->pps_num_palette_predictor_initializers > HEVC_MAX_PALETTE_PREDICTOR_SIZE) { + av_log(avctx, AV_LOG_ERROR, + "pps_num_palette_predictor_initializers out of range: %u\n", + pps->pps_num_palette_predictor_initializers); + return AVERROR_INVALIDDATA; + } pps->monochrome_palette_flag = get_bits1(gb); - pps->luma_bit_depth_entry_minus8 = get_ue_golomb_long(gb); + pps->luma_bit_depth_entry = get_ue_golomb_31(gb) + 8; if (!pps->monochrome_palette_flag) - pps->chroma_bit_depth_entry_minus8 = get_ue_golomb_long(gb); + pps->chroma_bit_depth_entry = get_ue_golomb_31(gb) + 8; + + if (pps->chroma_bit_depth_entry > 16 || pps->chroma_bit_depth_entry > 16) + return AVERROR_INVALIDDATA; + num_comps = pps->monochrome_palette_flag ? 1 : 3; - for (int comp = 0; comp < num_comps; comp++) + for (int comp = 0; comp < num_comps; comp++) { + int bit_depth = !comp ? pps->luma_bit_depth_entry : pps->chroma_bit_depth_entry; for (int i = 0; i < pps->pps_num_palette_predictor_initializers; i++) - pps->pps_palette_predictor_initializer[comp][i] = - get_bits(gb, 8 + (!comp ? pps->luma_bit_depth_entry_minus8 : - pps->chroma_bit_depth_entry_minus8)); + pps->pps_palette_predictor_initializer[comp][i] = get_bits(gb, bit_depth); + } } } @@ -1689,6 +1729,7 @@ int ff_hevc_decode_nal_pps(GetBitContext *gb, AVCodecContext *avctx, HEVCParamSets *ps) { HEVCSPS *sps = NULL; + HEVCVPS *vps = NULL; int i, ret = 0; unsigned int pps_id = 0; ptrdiff_t nal_size; @@ -1749,6 +1790,7 @@ int ff_hevc_decode_nal_pps(GetBitContext *gb, AVCodecContext *avctx, goto err; } sps = (HEVCSPS *)ps->sps_list[pps->sps_id]->data; + vps = (HEVCVPS *)ps->vps_list[sps->vps_id]->data; pps->dependent_slice_segments_enabled_flag = get_bits1(gb); pps->output_flag_present_flag = get_bits1(gb); @@ -1758,8 +1800,14 @@ int ff_hevc_decode_nal_pps(GetBitContext *gb, AVCodecContext *avctx, pps->cabac_init_present_flag = get_bits1(gb); - pps->num_ref_idx_l0_default_active = get_ue_golomb_long(gb) + 1; - pps->num_ref_idx_l1_default_active = get_ue_golomb_long(gb) + 1; + pps->num_ref_idx_l0_default_active = get_ue_golomb_31(gb) + 1; + pps->num_ref_idx_l1_default_active = get_ue_golomb_31(gb) + 1; + if (pps->num_ref_idx_l0_default_active >= HEVC_MAX_REFS || + pps->num_ref_idx_l1_default_active >= HEVC_MAX_REFS) { + av_log(avctx, AV_LOG_ERROR, "Too many default refs in PPS: %d/%d.\n", + pps->num_ref_idx_l0_default_active, pps->num_ref_idx_l1_default_active); + goto err; + } pps->pic_init_qp_minus26 = get_se_golomb(gb); @@ -1917,7 +1965,7 @@ int ff_hevc_decode_nal_pps(GetBitContext *gb, AVCodecContext *avctx, } if (pps->pps_multilayer_extension_flag) { - if ((ret = pps_multilayer_extension(gb, avctx, pps, sps)) < 0) + if ((ret = pps_multilayer_extension(gb, avctx, pps, sps, vps)) < 0) goto err; } diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/hevc_ps.h b/arm/raspi/third_party/ffmpeg/libavcodec/hevc_ps.h index 1f704108..2124deb9 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/hevc_ps.h +++ b/arm/raspi/third_party/ffmpeg/libavcodec/hevc_ps.h @@ -219,7 +219,7 @@ typedef struct HEVCSPS { int palette_max_size; int delta_palette_max_predictor_size; int sps_palette_predictor_initializers_present_flag; - int sps_num_palette_predictor_initializers_minus1; + int sps_num_palette_predictor_initializers; int sps_palette_predictor_initializer[3][HEVC_MAX_PALETTE_PREDICTOR_SIZE]; int motion_vector_resolution_control_idc; int intra_boundary_filtering_disabled_flag; @@ -314,34 +314,34 @@ typedef struct HEVCPPS { uint8_t poc_reset_info_present_flag; uint8_t pps_infer_scaling_list_flag; uint8_t pps_scaling_list_ref_layer_id; - uint16_t num_ref_loc_offsets; + uint8_t num_ref_loc_offsets; uint8_t ref_loc_offset_layer_id[64]; uint8_t scaled_ref_layer_offset_present_flag[64]; - int8_t scaled_ref_layer_left_offset[64]; - int8_t scaled_ref_layer_top_offset[64]; - int8_t scaled_ref_layer_right_offset[64]; - int8_t scaled_ref_layer_bottom_offset[64]; + int16_t scaled_ref_layer_left_offset[64]; + int16_t scaled_ref_layer_top_offset[64]; + int16_t scaled_ref_layer_right_offset[64]; + int16_t scaled_ref_layer_bottom_offset[64]; uint8_t ref_region_offset_present_flag[64]; - int8_t ref_region_left_offset[64]; - int8_t ref_region_top_offset[64]; - int8_t ref_region_right_offset[64]; - int8_t ref_region_bottom_offset[64]; + int16_t ref_region_left_offset[64]; + int16_t ref_region_top_offset[64]; + int16_t ref_region_right_offset[64]; + int16_t ref_region_bottom_offset[64]; uint8_t resample_phase_set_present_flag[64]; - uint16_t phase_hor_luma[64]; - uint16_t phase_ver_luma[64]; - uint16_t phase_hor_chroma_plus8[64]; - uint16_t phase_ver_chroma_plus8[64]; + uint8_t phase_hor_luma[64]; + uint8_t phase_ver_luma[64]; + int8_t phase_hor_chroma[64]; + int8_t phase_ver_chroma[64]; uint8_t colour_mapping_enabled_flag; - uint16_t num_cm_ref_layers_minus1; - uint8_t cm_ref_layer_id[63]; + uint8_t num_cm_ref_layers; + uint8_t cm_ref_layer_id[62]; uint8_t cm_octant_depth; uint8_t cm_y_part_num_log2; - uint16_t luma_bit_depth_cm_input_minus8; - uint16_t chroma_bit_depth_cm_input_minus8; - uint16_t luma_bit_depth_cm_output_minus8; - uint16_t chroma_bit_depth_cm_output_minus8; + uint8_t luma_bit_depth_cm_input; + uint8_t chroma_bit_depth_cm_input; + uint8_t luma_bit_depth_cm_output; + uint8_t chroma_bit_depth_cm_output; uint8_t cm_res_quant_bits; - uint8_t cm_delta_flc_bits_minus1; + uint8_t cm_delta_flc_bits; int8_t cm_adapt_threshold_u_delta; int8_t cm_adapt_threshold_v_delta; @@ -358,9 +358,9 @@ typedef struct HEVCPPS { uint8_t pps_palette_predictor_initializers_present_flag; uint8_t pps_num_palette_predictor_initializers; uint8_t monochrome_palette_flag; - uint8_t luma_bit_depth_entry_minus8; - uint8_t chroma_bit_depth_entry_minus8; - uint8_t pps_palette_predictor_initializer[3][HEVC_MAX_PALETTE_PREDICTOR_SIZE]; + uint8_t luma_bit_depth_entry; + uint8_t chroma_bit_depth_entry; + uint16_t pps_palette_predictor_initializer[3][HEVC_MAX_PALETTE_PREDICTOR_SIZE]; // Inferred parameters unsigned int *column_width; ///< ColumnWidth diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/hevc_refs.c b/arm/raspi/third_party/ffmpeg/libavcodec/hevc_refs.c index 96153a24..e9be02c4 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/hevc_refs.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/hevc_refs.c @@ -111,8 +111,11 @@ static HEVCFrame *alloc_frame(HEVCContext *s) for (j = 0; j < frame->ctb_count; j++) frame->rpl_tab[j] = (RefPicListTab *)frame->rpl_buf->data; - frame->frame->top_field_first = s->sei.picture_timing.picture_struct == AV_PICTURE_STRUCTURE_TOP_FIELD; - frame->frame->interlaced_frame = (s->sei.picture_timing.picture_struct == AV_PICTURE_STRUCTURE_TOP_FIELD) || (s->sei.picture_timing.picture_struct == AV_PICTURE_STRUCTURE_BOTTOM_FIELD); + if (s->sei.picture_timing.picture_struct == AV_PICTURE_STRUCTURE_TOP_FIELD) + frame->frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST; + if ((s->sei.picture_timing.picture_struct == AV_PICTURE_STRUCTURE_TOP_FIELD) || + (s->sei.picture_timing.picture_struct == AV_PICTURE_STRUCTURE_BOTTOM_FIELD)) + frame->frame->flags |= AV_FRAME_FLAG_INTERLACED; if (s->avctx->hwaccel) { const AVHWAccel *hwaccel = s->avctx->hwaccel; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/hevcdec.c b/arm/raspi/third_party/ffmpeg/libavcodec/hevcdec.c index 1a0beac9..7e1bf4e9 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/hevcdec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/hevcdec.c @@ -773,11 +773,11 @@ static int hls_slice_header(HEVCContext *s) sh->nb_refs[L1] = s->ps.pps->num_ref_idx_l1_default_active; if (get_bits1(gb)) { // num_ref_idx_active_override_flag - sh->nb_refs[L0] = get_ue_golomb_long(gb) + 1; + sh->nb_refs[L0] = get_ue_golomb_31(gb) + 1; if (sh->slice_type == HEVC_SLICE_B) - sh->nb_refs[L1] = get_ue_golomb_long(gb) + 1; + sh->nb_refs[L1] = get_ue_golomb_31(gb) + 1; } - if (sh->nb_refs[L0] > HEVC_MAX_REFS || sh->nb_refs[L1] > HEVC_MAX_REFS) { + if (sh->nb_refs[L0] >= HEVC_MAX_REFS || sh->nb_refs[L1] >= HEVC_MAX_REFS) { av_log(s->avctx, AV_LOG_ERROR, "Too many refs: %d/%d.\n", sh->nb_refs[L0], sh->nb_refs[L1]); return AVERROR_INVALIDDATA; @@ -2497,7 +2497,7 @@ static void hls_decode_neighbour(HEVCLocalContext *lc, int x_ctb, int y_ctb, lc->ctb_up_left_flag = ((x_ctb > 0) && (y_ctb > 0) && (ctb_addr_in_slice-1 >= s->ps.sps->ctb_width) && (s->ps.pps->tile_id[ctb_addr_ts] == s->ps.pps->tile_id[s->ps.pps->ctb_addr_rs_to_ts[ctb_addr_rs-1 - s->ps.sps->ctb_width]])); } -static int hls_decode_entry(AVCodecContext *avctxt, void *isFilterThread) +static int hls_decode_entry(AVCodecContext *avctxt, void *arg) { HEVCContext *s = avctxt->priv_data; HEVCLocalContext *const lc = s->HEVClc; @@ -2561,14 +2561,10 @@ static int hls_decode_entry(AVCodecContext *avctxt, void *isFilterThread) static int hls_slice_data(HEVCContext *s) { - int arg[2]; - int ret[2]; + int ret = 0; - arg[0] = 0; - arg[1] = 1; - - s->avctx->execute(s->avctx, hls_decode_entry, arg, ret , 1, sizeof(int)); - return ret[0]; + s->avctx->execute(s->avctx, hls_decode_entry, NULL, &ret , 1, 0); + return ret; } static int hls_decode_entry_wpp(AVCodecContext *avctxt, void *hevc_lclist, int job, int self_id) @@ -2914,7 +2910,10 @@ static int hevc_frame_start(HEVCContext *s) goto fail; } - s->ref->frame->key_frame = IS_IRAP(s); + if (IS_IRAP(s)) + s->ref->frame->flags |= AV_FRAME_FLAG_KEY; + else + s->ref->frame->flags &= ~AV_FRAME_FLAG_KEY; s->ref->needs_fg = s->sei.common.film_grain_characteristics.present && !(s->avctx->export_side_data & AV_CODEC_EXPORT_DATA_FILM_GRAIN) && diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/hnm4video.c b/arm/raspi/third_party/ffmpeg/libavcodec/hnm4video.c index f223bb82..51e75789 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/hnm4video.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/hnm4video.c @@ -420,7 +420,7 @@ static int hnm_decode_frame(AVCodecContext *avctx, AVFrame *frame, postprocess_current_frame(avctx); copy_processed_frame(avctx, frame); frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; memcpy(frame->data[1], hnm->palette, 256 * 4); *got_frame = 1; } else if (chunk_id == HNM4_CHUNK_ID_IU) { @@ -438,7 +438,7 @@ static int hnm_decode_frame(AVCodecContext *avctx, AVFrame *frame, } copy_processed_frame(avctx, frame); frame->pict_type = AV_PICTURE_TYPE_P; - frame->key_frame = 0; + frame->flags &= ~AV_FRAME_FLAG_KEY; memcpy(frame->data[1], hnm->palette, 256 * 4); *got_frame = 1; FFSWAP(uint8_t *, hnm->current, hnm->previous); diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/hq_hqa.c b/arm/raspi/third_party/ffmpeg/libavcodec/hq_hqa.c index 6ce73b7a..db0ac7d9 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/hq_hqa.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/hq_hqa.c @@ -354,7 +354,7 @@ static int hq_hqa_decode_frame(AVCodecContext *avctx, AVFrame *pic, return ret; } - pic->key_frame = 1; + pic->flags |= AV_FRAME_FLAG_KEY; pic->pict_type = AV_PICTURE_TYPE_I; *got_frame = 1; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/hqx.c b/arm/raspi/third_party/ffmpeg/libavcodec/hqx.c index 60839465..6554b15e 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/hqx.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/hqx.c @@ -504,7 +504,7 @@ static int hqx_decode_frame(AVCodecContext *avctx, AVFrame *frame, avctx->execute2(avctx, decode_slice_thread, NULL, NULL, 16); - ctx->pic->key_frame = 1; + ctx->pic->flags |= AV_FRAME_FLAG_KEY; ctx->pic->pict_type = AV_PICTURE_TYPE_I; *got_picture_ptr = 1; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/huffyuvdec.c b/arm/raspi/third_party/ffmpeg/libavcodec/huffyuvdec.c index 868700ce..c9fcec30 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/huffyuvdec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/huffyuvdec.c @@ -695,9 +695,9 @@ static void decode_422_bitstream(HYuvDecContext *s, int count) /* TODO instead of restarting the read when the code isn't in the first level * of the joint table, jump into the 2nd level of the individual table. */ #define READ_2PIX_PLANE16(dst0, dst1, plane){\ - dst0 = get_vlc2(&s->gb, s->vlc[plane].table, VLC_BITS, 3)<<2;\ + dst0 = get_vlc2(&s->gb, s->vlc[plane].table, VLC_BITS, 3)*4;\ dst0 += get_bits(&s->gb, 2);\ - dst1 = get_vlc2(&s->gb, s->vlc[plane].table, VLC_BITS, 3)<<2;\ + dst1 = get_vlc2(&s->gb, s->vlc[plane].table, VLC_BITS, 3)*4;\ dst1 += get_bits(&s->gb, 2);\ } static void decode_plane_bitstream(HYuvDecContext *s, int width, int plane) diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/idcinvideo.c b/arm/raspi/third_party/ffmpeg/libavcodec/idcinvideo.c index f6b8b3cd..d9e46335 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/idcinvideo.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/idcinvideo.c @@ -224,7 +224,14 @@ static int idcin_decode_frame(AVCodecContext *avctx, AVFrame *frame, if (idcin_decode_vlcs(s, frame)) return AVERROR_INVALIDDATA; - frame->palette_has_changed = ff_copy_palette(s->pal, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS + frame->palette_has_changed = +#endif + ff_copy_palette(s->pal, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_ENABLE_DEPRECATION_WARNINGS +#endif /* make the palette available on the way out */ memcpy(frame->data[1], s->pal, AVPALETTE_SIZE); diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/iff.c b/arm/raspi/third_party/ffmpeg/libavcodec/iff.c index e02d2e77..faf4e21c 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/iff.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/iff.c @@ -1887,10 +1887,10 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, } if (avpkt->flags & AV_PKT_FLAG_KEY) { - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_I; } else { - frame->key_frame = 0; + frame->flags &= ~AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_P; } diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/imm4.c b/arm/raspi/third_party/ffmpeg/libavcodec/imm4.c index ccec5dff..b95ad869 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/imm4.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/imm4.c @@ -420,11 +420,11 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, switch (type) { case 0x19781977: - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_I; break; case 0x12250926: - frame->key_frame = 0; + frame->flags &= ~AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_P; break; default: @@ -434,7 +434,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, if (avctx->width != width || avctx->height != height) { - if (!frame->key_frame) { + if (!(frame->flags & AV_FRAME_FLAG_KEY)) { av_log(avctx, AV_LOG_ERROR, "Frame size change is unsupported.\n"); return AVERROR_INVALIDDATA; } @@ -445,10 +445,10 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, if (ret < 0) return ret; - if ((ret = ff_get_buffer(avctx, frame, frame->key_frame ? AV_GET_BUFFER_FLAG_REF : 0)) < 0) + if ((ret = ff_get_buffer(avctx, frame, (frame->flags & AV_FRAME_FLAG_KEY) ? AV_GET_BUFFER_FLAG_REF : 0)) < 0) return ret; - if (frame->key_frame) { + if (frame->flags & AV_FRAME_FLAG_KEY) { ret = decode_intra(avctx, gb, frame); if (ret < 0) return ret; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/imx.c b/arm/raspi/third_party/ffmpeg/libavcodec/imx.c index 44bab23c..0d9d9b5b 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/imx.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/imx.c @@ -58,11 +58,19 @@ static int imx_decode_frame(AVCodecContext *avctx, AVFrame *rframe, return ret; if (ff_copy_palette(imx->pal, avpkt, avctx)) { +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = 1; - frame->key_frame = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif + frame->flags |= AV_FRAME_FLAG_KEY; } else { - frame->key_frame = 0; + frame->flags &= ~AV_FRAME_FLAG_KEY; +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = 0; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } bytestream2_init(&gb, avpkt->data, avpkt->size); @@ -92,7 +100,7 @@ static int imx_decode_frame(AVCodecContext *avctx, AVFrame *rframe, break; } - frame->key_frame = 0; + frame->flags &= ~AV_FRAME_FLAG_KEY; break; case 1: if (len == 0) { @@ -114,7 +122,7 @@ static int imx_decode_frame(AVCodecContext *avctx, AVFrame *rframe, break; } - frame->key_frame = 0; + frame->flags &= ~AV_FRAME_FLAG_KEY; } else { while (len > 0) { fill = bytestream2_get_byte(&gb); @@ -150,7 +158,7 @@ static int imx_decode_frame(AVCodecContext *avctx, AVFrame *rframe, } } - frame->pict_type = frame->key_frame ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; + frame->pict_type = (frame->flags & AV_FRAME_FLAG_KEY) ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; if ((ret = av_frame_ref(rframe, frame)) < 0) return ret; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/internal.h b/arm/raspi/third_party/ffmpeg/libavcodec/internal.h index a283c52e..dceae182 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/internal.h +++ b/arm/raspi/third_party/ffmpeg/libavcodec/internal.h @@ -148,8 +148,6 @@ typedef struct AVCodecInternal { AVFrame *buffer_frame; int draining_done; - int showed_multi_packet_warning; - /* to prevent infinite loop on errors when draining */ int nb_draining_errors; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/interplayacm.c b/arm/raspi/third_party/ffmpeg/libavcodec/interplayacm.c index a0b9655e..057ab16e 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/interplayacm.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/interplayacm.c @@ -37,6 +37,7 @@ static int mul_3x5 [5 * 5 * 5]; static int mul_2x11[11 * 11]; typedef struct InterplayACMContext { + AVCodecContext *avctx; GetBitContext gb; uint8_t *bitstream; int max_framesize; @@ -77,6 +78,7 @@ static av_cold int decode_init(AVCodecContext *avctx) static AVOnce init_static_once = AV_ONCE_INIT; InterplayACMContext *s = avctx->priv_data; + s->avctx = avctx; if (avctx->extradata_size < 14) return AVERROR_INVALIDDATA; @@ -343,7 +345,7 @@ static int t15(InterplayACMContext *s, unsigned ind, unsigned col) /* b = (x1) + (x2 * 3) + (x3 * 9) */ b = get_bits(gb, 5); if (b > 26) { - av_log(NULL, AV_LOG_ERROR, "Too large b = %d > 26\n", b); + av_log(s->avctx, AV_LOG_ERROR, "Too large b = %d > 26\n", b); return AVERROR_INVALIDDATA; } @@ -372,7 +374,7 @@ static int t27(InterplayACMContext *s, unsigned ind, unsigned col) /* b = (x1) + (x2 * 5) + (x3 * 25) */ b = get_bits(gb, 7); if (b > 124) { - av_log(NULL, AV_LOG_ERROR, "Too large b = %d > 124\n", b); + av_log(s->avctx, AV_LOG_ERROR, "Too large b = %d > 124\n", b); return AVERROR_INVALIDDATA; } @@ -400,7 +402,7 @@ static int t37(InterplayACMContext *s, unsigned ind, unsigned col) /* b = (x1) + (x2 * 11) */ b = get_bits(gb, 7); if (b > 120) { - av_log(NULL, AV_LOG_ERROR, "Too large b = %d > 120\n", b); + av_log(s->avctx, AV_LOG_ERROR, "Too large b = %d > 120\n", b); return AVERROR_INVALIDDATA; } diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/interplayvideo.c b/arm/raspi/third_party/ffmpeg/libavcodec/interplayvideo.c index 1a3461bf..1f0414bb 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/interplayvideo.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/interplayvideo.c @@ -1315,7 +1315,14 @@ static int ipvideo_decode_frame(AVCodecContext *avctx, AVFrame *frame, return ret; if (!s->is_16bpp) { - frame->palette_has_changed = ff_copy_palette(s->pal, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS + frame->palette_has_changed = +#endif + ff_copy_palette(s->pal, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_ENABLE_DEPRECATION_WARNINGS +#endif } switch (frame_format) { diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/ituh263enc.c b/arm/raspi/third_party/ffmpeg/libavcodec/ituh263enc.c index c30ecad4..97abfb3f 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/ituh263enc.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/ituh263enc.c @@ -865,6 +865,11 @@ av_cold void ff_h263_encode_init(MpegEncContext *s) s->c_dc_scale_table= ff_mpeg1_dc_scale_table; } + if (s->lmin > s->lmax) { + av_log(s->avctx, AV_LOG_WARNING, "Clipping lmin value to %d\n", s->lmax); + s->lmin = s->lmax; + } + ff_thread_once(&init_static_once, h263_encode_init_static); } diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/j2kenc.c b/arm/raspi/third_party/ffmpeg/libavcodec/j2kenc.c index 6406f90a..2b0c58cf 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/j2kenc.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/j2kenc.c @@ -115,6 +115,7 @@ typedef struct { int width, height; ///< image width and height uint8_t cbps[4]; ///< bits per sample in particular components + uint8_t comp_remap[4]; int chroma_shift[2]; uint8_t planar; int ncomponents; @@ -319,8 +320,8 @@ static int put_siz(Jpeg2000EncoderContext *s) for (i = 0; i < s->ncomponents; i++){ // Ssiz_i XRsiz_i, YRsiz_i bytestream_put_byte(&s->buf, s->cbps[i] - 1); - bytestream_put_byte(&s->buf, i?1<chroma_shift[0]:1); - bytestream_put_byte(&s->buf, i?1<chroma_shift[1]:1); + bytestream_put_byte(&s->buf, (i+1&2)?1<chroma_shift[0]:1); + bytestream_put_byte(&s->buf, (i+1&2)?1<chroma_shift[1]:1); } return 0; } @@ -431,7 +432,7 @@ static void compute_rates(Jpeg2000EncoderContext* s) for (compno = 0; compno < s->ncomponents; compno++) { int tilew = tile->comp[compno].coord[0][1] - tile->comp[compno].coord[0][0]; int tileh = tile->comp[compno].coord[1][1] - tile->comp[compno].coord[1][0]; - int scale = (compno?1 << s->chroma_shift[0]:1) * (compno?1 << s->chroma_shift[1]:1); + int scale = ((compno+1&2)?1 << s->chroma_shift[0]:1) * ((compno+1&2)?1 << s->chroma_shift[1]:1); for (layno = 0; layno < s->nlayers; layno++) { if (s->layer_rates[layno] > 0) { tile->layer_rates[layno] += (double)(tilew * tileh) * s->ncomponents * s->cbps[compno] / @@ -483,7 +484,7 @@ static int init_tiles(Jpeg2000EncoderContext *s) comp->coord[0][1] = comp->coord_o[0][1] = FFMIN((tilex+1)*s->tile_width, s->width); comp->coord[1][0] = comp->coord_o[1][0] = tiley * s->tile_height; comp->coord[1][1] = comp->coord_o[1][1] = FFMIN((tiley+1)*s->tile_height, s->height); - if (compno > 0) + if (compno + 1 & 2) for (i = 0; i < 2; i++) for (j = 0; j < 2; j++) comp->coord[i][j] = comp->coord_o[i][j] = ff_jpeg2000_ceildivpow2(comp->coord[i][j], s->chroma_shift[i]); @@ -492,8 +493,8 @@ static int init_tiles(Jpeg2000EncoderContext *s) codsty, qntsty, s->cbps[compno], - compno?1<chroma_shift[0]:1, - compno?1<chroma_shift[1]:1, + (compno+1&2)?1<chroma_shift[0]:1, + (compno+1&2)?1<chroma_shift[1]:1, s->avctx )) < 0) return ret; @@ -512,17 +513,18 @@ static int init_tiles(Jpeg2000EncoderContext *s) Jpeg2000Tile *tile = s->tile + tileno; \ if (s->planar){ \ for (compno = 0; compno < s->ncomponents; compno++){ \ + int icompno = s->comp_remap[compno]; \ Jpeg2000Component *comp = tile->comp + compno; \ int *dst = comp->i_data; \ int cbps = s->cbps[compno]; \ - line = (const PIXEL*)s->picture->data[compno] \ - + comp->coord[1][0] * (s->picture->linesize[compno] / sizeof(PIXEL)) \ + line = (const PIXEL*)s->picture->data[icompno] \ + + comp->coord[1][0] * (s->picture->linesize[icompno] / sizeof(PIXEL)) \ + comp->coord[0][0]; \ for (y = comp->coord[1][0]; y < comp->coord[1][1]; y++){ \ const PIXEL *ptr = line; \ for (x = comp->coord[0][0]; x < comp->coord[0][1]; x++) \ *dst++ = *ptr++ - (1 << (cbps - 1)); \ - line += s->picture->linesize[compno] / sizeof(PIXEL); \ + line += s->picture->linesize[icompno] / sizeof(PIXEL); \ } \ } \ } else{ \ @@ -721,11 +723,10 @@ static void encode_cblk(Jpeg2000EncoderContext *s, Jpeg2000T1Context *t1, Jpeg20 if (max == 0){ cblk->nonzerobits = 0; - bpno = 0; } else{ cblk->nonzerobits = av_log2(max) + 1 - NMSEDEC_FRACBITS; - bpno = cblk->nonzerobits - 1; } + bpno = cblk->nonzerobits - 1; cblk->data[0] = 0; ff_mqc_initenc(&t1->mqc, cblk->data + 1); @@ -1008,7 +1009,7 @@ static int encode_packets(Jpeg2000EncoderContext *s, Jpeg2000Tile *tile, int til Jpeg2000Component *comp = tile->comp + compno; uint8_t reducedresno = codsty->nreslevels - 1 -reslevelno; // ==> N_L - r Jpeg2000ResLevel *reslevel = comp->reslevel + reslevelno; - int log_subsampling[2] = { compno?s->chroma_shift[0]:0, compno?s->chroma_shift[1]:0}; + int log_subsampling[2] = { (compno+1&2)?s->chroma_shift[0]:0, (compno+1&2)?s->chroma_shift[1]:0}; unsigned prcx, prcy; int trx0, try0; @@ -1069,7 +1070,7 @@ static int encode_packets(Jpeg2000EncoderContext *s, Jpeg2000Tile *tile, int til for (x = tile_coord[0][0]; x < tile_coord[0][1]; x = (x/step_x + 1)*step_x) { for (compno = 0; compno < s->ncomponents; compno++) { Jpeg2000Component *comp = tile->comp + compno; - int log_subsampling[2] = { compno?s->chroma_shift[0]:0, compno?s->chroma_shift[1]:0}; + int log_subsampling[2] = { (compno+1&2)?s->chroma_shift[0]:0, (compno+1&2)?s->chroma_shift[1]:0}; for (reslevelno = 0; reslevelno < codsty->nreslevels; reslevelno++) { unsigned prcx, prcy; @@ -1115,7 +1116,7 @@ static int encode_packets(Jpeg2000EncoderContext *s, Jpeg2000Tile *tile, int til case JPEG2000_PGOD_CPRL: for (compno = 0; compno < s->ncomponents; compno++) { Jpeg2000Component *comp = tile->comp + compno; - int log_subsampling[2] = { compno?s->chroma_shift[0]:0, compno?s->chroma_shift[1]:0}; + int log_subsampling[2] = { (compno+1&2)?s->chroma_shift[0]:0, (compno+1&2)?s->chroma_shift[1]:0}; step_x = 32; step_y = 32; @@ -1531,6 +1532,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, int tileno, ret; Jpeg2000EncoderContext *s = avctx->priv_data; uint8_t *chunkstart, *jp2cstart, *jp2hstart; + const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt); if ((ret = ff_alloc_packet(avctx, pkt, avctx->width*avctx->height*9 + AV_INPUT_BUFFER_MIN_SIZE)) < 0) return ret; @@ -1543,7 +1545,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, s->lambda = s->picture->quality * LAMBDA_SCALE; - if (avctx->pix_fmt == AV_PIX_FMT_BGR48 || avctx->pix_fmt == AV_PIX_FMT_GRAY16) + if (s->cbps[0] > 8) copy_frame_16(s); else copy_frame_8(s); @@ -1587,7 +1589,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, bytestream_put_byte(&s->buf, 1); bytestream_put_byte(&s->buf, 0); bytestream_put_byte(&s->buf, 0); - if (avctx->pix_fmt == AV_PIX_FMT_RGB24 || avctx->pix_fmt == AV_PIX_FMT_PAL8) { + if ((desc->flags & AV_PIX_FMT_FLAG_RGB) || avctx->pix_fmt == AV_PIX_FMT_PAL8) { bytestream_put_be32(&s->buf, 16); } else if (s->ncomponents == 1) { bytestream_put_be32(&s->buf, 17); @@ -1717,6 +1719,7 @@ static av_cold int j2kenc_init(AVCodecContext *avctx) Jpeg2000EncoderContext *s = avctx->priv_data; Jpeg2000CodingStyle *codsty = &s->codsty; Jpeg2000QuantStyle *qntsty = &s->qntsty; + const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt); s->avctx = avctx; av_log(s->avctx, AV_LOG_DEBUG, "init\n"); @@ -1729,7 +1732,7 @@ static av_cold int j2kenc_init(AVCodecContext *avctx) if (avctx->pix_fmt == AV_PIX_FMT_PAL8 && (s->pred != FF_DWT97_INT || s->format != CODEC_JP2)) { av_log(s->avctx, AV_LOG_WARNING, "Forcing lossless jp2 for pal8\n"); - s->pred = FF_DWT97_INT; + s->pred = 1; s->format = CODEC_JP2; } @@ -1759,24 +1762,23 @@ static av_cold int j2kenc_init(AVCodecContext *avctx) s->width = avctx->width; s->height = avctx->height; - for (i = 0; i < 3; i++) { - if (avctx->pix_fmt == AV_PIX_FMT_GRAY16 || avctx->pix_fmt == AV_PIX_FMT_RGB48) - s->cbps[i] = 16; - else - s->cbps[i] = 8; + s->ncomponents = desc->nb_components; + for (i = 0; i < 4; i++) { + s->cbps[i] = desc->comp[i].depth; + s->comp_remap[i] = i; //default } - if (avctx->pix_fmt == AV_PIX_FMT_RGB24 || avctx->pix_fmt == AV_PIX_FMT_RGB48){ - s->ncomponents = 3; - } else if (avctx->pix_fmt == AV_PIX_FMT_GRAY8 || avctx->pix_fmt == AV_PIX_FMT_PAL8 || avctx->pix_fmt == AV_PIX_FMT_GRAY16){ - s->ncomponents = 1; - } else{ // planar YUV + if ((desc->flags & AV_PIX_FMT_FLAG_PLANAR) && s->ncomponents > 1) { s->planar = 1; - s->ncomponents = 3; ret = av_pix_fmt_get_chroma_sub_sample(avctx->pix_fmt, s->chroma_shift, s->chroma_shift + 1); if (ret) return ret; + if (desc->flags & AV_PIX_FMT_FLAG_RGB) { + s->comp_remap[0] = 2; + s->comp_remap[1] = 0; + s->comp_remap[2] = 1; + } } ff_thread_once(&init_static_once, init_luts); @@ -1810,7 +1812,7 @@ static const AVOption options[] = { { "tile_height", "Tile Height", OFFSET(tile_height), AV_OPT_TYPE_INT, { .i64 = 256 }, 1, 1<<30, VE, }, { "pred", "DWT Type", OFFSET(pred), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VE, "pred" }, { "dwt97int", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 0 }, INT_MIN, INT_MAX, VE, "pred" }, - { "dwt53", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 0 }, INT_MIN, INT_MAX, VE, "pred" }, + { "dwt53", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 1 }, INT_MIN, INT_MAX, VE, "pred" }, { "sop", "SOP marker", OFFSET(sop), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VE, }, { "eph", "EPH marker", OFFSET(eph), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VE, }, { "prog", "Progression Order", OFFSET(prog), AV_OPT_TYPE_INT, { .i64 = 0 }, JPEG2000_PGOD_LRCP, JPEG2000_PGOD_CPRL, VE, "prog" }, @@ -1835,17 +1837,30 @@ const FFCodec ff_jpeg2000_encoder = { CODEC_LONG_NAME("JPEG 2000"), .p.type = AVMEDIA_TYPE_VIDEO, .p.id = AV_CODEC_ID_JPEG2000, - .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE, + .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE | + AV_CODEC_CAP_FRAME_THREADS, .priv_data_size = sizeof(Jpeg2000EncoderContext), .init = j2kenc_init, FF_CODEC_ENCODE_CB(encode_frame), .close = j2kenc_destroy, .p.pix_fmts = (const enum AVPixelFormat[]) { - AV_PIX_FMT_RGB24, AV_PIX_FMT_YUV444P, AV_PIX_FMT_GRAY8, - AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV422P, - AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUV411P, + AV_PIX_FMT_RGB24, AV_PIX_FMT_RGB48, + AV_PIX_FMT_GBR24P,AV_PIX_FMT_GBRP9, AV_PIX_FMT_GBRP10, AV_PIX_FMT_GBRP12, AV_PIX_FMT_GBRP14, AV_PIX_FMT_GBRP16, + AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY9, AV_PIX_FMT_GRAY10, AV_PIX_FMT_GRAY12, AV_PIX_FMT_GRAY14, AV_PIX_FMT_GRAY16, + AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV420P9, AV_PIX_FMT_YUV420P10, AV_PIX_FMT_YUV420P12, AV_PIX_FMT_YUV420P14, AV_PIX_FMT_YUV420P16, + AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV422P9, AV_PIX_FMT_YUV422P10, AV_PIX_FMT_YUV422P12, AV_PIX_FMT_YUV422P14, AV_PIX_FMT_YUV422P16, + AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV444P9, AV_PIX_FMT_YUV444P10, AV_PIX_FMT_YUV444P12, AV_PIX_FMT_YUV444P14, AV_PIX_FMT_YUV444P16, + AV_PIX_FMT_YUV440P, AV_PIX_FMT_YUV440P10, AV_PIX_FMT_YUV440P12, + AV_PIX_FMT_YUV411P, + AV_PIX_FMT_YUV410P, + AV_PIX_FMT_YA8, AV_PIX_FMT_YA16, + AV_PIX_FMT_RGBA, AV_PIX_FMT_RGBA64, + AV_PIX_FMT_GBRAP, AV_PIX_FMT_GBRAP10, AV_PIX_FMT_GBRAP12, AV_PIX_FMT_GBRAP16, + AV_PIX_FMT_YUVA420P, AV_PIX_FMT_YUVA420P9, AV_PIX_FMT_YUVA420P10, AV_PIX_FMT_YUVA420P16, + AV_PIX_FMT_YUVA422P, AV_PIX_FMT_YUVA422P9, AV_PIX_FMT_YUVA422P10, AV_PIX_FMT_YUVA422P16, + AV_PIX_FMT_YUVA444P, AV_PIX_FMT_YUVA444P9, AV_PIX_FMT_YUVA444P10, AV_PIX_FMT_YUVA444P16, + AV_PIX_FMT_PAL8, - AV_PIX_FMT_RGB48, AV_PIX_FMT_GRAY16, AV_PIX_FMT_NONE }, .p.priv_class = &j2k_class, diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/jpeg2000.h b/arm/raspi/third_party/ffmpeg/libavcodec/jpeg2000.h index e5ecb4cb..d004c08f 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/jpeg2000.h +++ b/arm/raspi/third_party/ffmpeg/libavcodec/jpeg2000.h @@ -111,7 +111,7 @@ enum Jpeg2000Quantsty { // quantization style #define JPEG2000_CSTY_SOP 0x02 // SOP marker present #define JPEG2000_CSTY_EPH 0x04 // EPH marker present #define JPEG2000_CTSY_HTJ2K_F 0x40 // Only HT code-blocks (Rec. ITU-T T.814 | ISO/IEC 15444-15) are present -#define JPEG2000_CTSY_HTJ2K_M 0xC0 // HT code blocks (Rec. ITU-T T.814 | ISO/IEC 15444-15) can be present +#define JPEG2000_CTSY_HTJ2K_M 0xC0 // HT code-blocks (Rec. ITU-T T.814 | ISO/IEC 15444-15) can be present // Progression orders #define JPEG2000_PGOD_LRCP 0x00 // Layer-resolution level-component-position progression @@ -189,6 +189,9 @@ typedef struct Jpeg2000Cblk { Jpeg2000Pass *passes; Jpeg2000Layer *layers; int coord[2][2]; // border coordinates {{x0, x1}, {y0, y1}} + /* specific to HT code-blocks */ + int zbp; + int pass_lengths[2]; } Jpeg2000Cblk; // code block typedef struct Jpeg2000Prec { diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/jpeg2000dec.c b/arm/raspi/third_party/ffmpeg/libavcodec/jpeg2000dec.c index c2b81ec1..0e95cca6 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/jpeg2000dec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/jpeg2000dec.c @@ -42,6 +42,8 @@ #include "jpeg2000.h" #include "jpeg2000dsp.h" #include "profiles.h" +#include "jpeg2000dec.h" +#include "jpeg2000htdec.h" #define JP2_SIG_TYPE 0x6A502020 #define JP2_SIG_VALUE 0x0D0A870A @@ -51,93 +53,6 @@ #define HAD_COC 0x01 #define HAD_QCC 0x02 -#define MAX_POCS 32 - -typedef struct Jpeg2000POCEntry { - uint16_t LYEpoc; - uint16_t CSpoc; - uint16_t CEpoc; - uint8_t RSpoc; - uint8_t REpoc; - uint8_t Ppoc; -} Jpeg2000POCEntry; - -typedef struct Jpeg2000POC { - Jpeg2000POCEntry poc[MAX_POCS]; - int nb_poc; - int is_default; -} Jpeg2000POC; - -typedef struct Jpeg2000TilePart { - uint8_t tile_index; // Tile index who refers the tile-part - const uint8_t *tp_end; - GetByteContext header_tpg; // bit stream of header if PPM header is used - GetByteContext tpg; // bit stream in tile-part -} Jpeg2000TilePart; - -/* RMK: For JPEG2000 DCINEMA 3 tile-parts in a tile - * one per component, so tile_part elements have a size of 3 */ -typedef struct Jpeg2000Tile { - Jpeg2000Component *comp; - uint8_t properties[4]; - Jpeg2000CodingStyle codsty[4]; - Jpeg2000QuantStyle qntsty[4]; - Jpeg2000POC poc; - Jpeg2000TilePart tile_part[32]; - uint8_t has_ppt; // whether this tile has a ppt marker - uint8_t *packed_headers; // contains packed headers. Used only along with PPT marker - int packed_headers_size; // size in bytes of the packed headers - GetByteContext packed_headers_stream; // byte context corresponding to packed headers - uint16_t tp_idx; // Tile-part index - int coord[2][2]; // border coordinates {{x0, x1}, {y0, y1}} -} Jpeg2000Tile; - -typedef struct Jpeg2000DecoderContext { - AVClass *class; - AVCodecContext *avctx; - GetByteContext g; - - int width, height; - int image_offset_x, image_offset_y; - int tile_offset_x, tile_offset_y; - uint8_t cbps[4]; // bits per sample in particular components - uint8_t sgnd[4]; // if a component is signed - uint8_t properties[4]; - - uint8_t has_ppm; - uint8_t *packed_headers; // contains packed headers. Used only along with PPM marker - int packed_headers_size; - GetByteContext packed_headers_stream; - uint8_t in_tile_headers; - - int cdx[4], cdy[4]; - int precision; - int ncomponents; - int colour_space; - uint32_t palette[256]; - int8_t pal8; - int cdef[4]; - int tile_width, tile_height; - unsigned numXtiles, numYtiles; - int maxtilelen; - AVRational sar; - - Jpeg2000CodingStyle codsty[4]; - Jpeg2000QuantStyle qntsty[4]; - Jpeg2000POC poc; - uint8_t roi_shift[4]; - - int bit_index; - - int curtileno; - - Jpeg2000Tile *tile; - Jpeg2000DSPContext dsp; - - /*options parameters*/ - int reduction_factor; -} Jpeg2000DecoderContext; - /* get_bits functions for JPEG2000 packet bitstream * It is a get_bit function with a bit-stuffing routine. If the value of the * byte is 0xFF, the next byte includes an extra zero bit stuffed into the MSB. @@ -449,6 +364,10 @@ static int get_siz(Jpeg2000DecoderContext *s) s->cdx[0] == s->cdx[1] && s->cdy[0] == s->cdy[1]) { s->avctx->pix_fmt = AV_PIX_FMT_YA8; i = 0; + } else if (ncomponents == 2 && s->precision == 16 && + s->cdx[0] == s->cdx[1] && s->cdy[0] == s->cdy[1]) { + s->avctx->pix_fmt = AV_PIX_FMT_YA16; + i = 0; } else if (ncomponents == 1 && s->precision == 8) { s->avctx->pix_fmt = AV_PIX_FMT_GRAY8; i = 0; @@ -522,12 +441,12 @@ static int get_cox(Jpeg2000DecoderContext *s, Jpeg2000CodingStyle *c) c->cblk_style = bytestream2_get_byteu(&s->g); if (c->cblk_style != 0) { // cblk style if (c->cblk_style & JPEG2000_CTSY_HTJ2K_M || c->cblk_style & JPEG2000_CTSY_HTJ2K_F) { - av_log(s->avctx, AV_LOG_ERROR, "Support for High throughput JPEG 2000 is not yet available\n"); - return AVERROR_PATCHWELCOME; + av_log(s->avctx,AV_LOG_TRACE,"High Throughput jpeg 2000 codestream.\n"); + } else { + av_log(s->avctx, AV_LOG_WARNING, "extra cblk styles %X\n", c->cblk_style); + if (c->cblk_style & JPEG2000_CBLK_BYPASS) + av_log(s->avctx, AV_LOG_WARNING, "Selective arithmetic coding bypass\n"); } - av_log(s->avctx, AV_LOG_WARNING, "extra cblk styles %X\n", c->cblk_style); - if (c->cblk_style & JPEG2000_CBLK_BYPASS) - av_log(s->avctx, AV_LOG_WARNING, "Selective arithmetic coding bypass\n"); } c->transform = bytestream2_get_byteu(&s->g); // DWT transformation type /* set integer 9/7 DWT in case of BITEXACT flag */ @@ -1152,13 +1071,15 @@ static int jpeg2000_decode_packet(Jpeg2000DecoderContext *s, Jpeg2000Tile *tile, return incl; if (!cblk->npasses) { - int v = expn[bandno] + numgbits - 1 - - tag_tree_decode(s, prec->zerobits + cblkno, 100); + int zbp = tag_tree_decode(s, prec->zerobits + cblkno, 100); + int v = expn[bandno] + numgbits - 1 - zbp; + if (v < 0 || v > 30) { av_log(s->avctx, AV_LOG_ERROR, "nonzerobits %d invalid or unsupported\n", v); return AVERROR_INVALIDDATA; } + cblk->zbp = zbp; cblk->nonzerobits = v; } if ((newpasses = getnpasses(s)) < 0) @@ -1199,8 +1120,23 @@ static int jpeg2000_decode_packet(Jpeg2000DecoderContext *s, Jpeg2000Tile *tile, } } - if ((ret = get_bits(s, av_log2(newpasses1) + cblk->lblock)) < 0) - return ret; + if (newpasses > 1 && (codsty->cblk_style & JPEG2000_CTSY_HTJ2K_F)) { + // Retrieve pass lengths for each pass + int href_passes = (cblk->npasses + newpasses - 1) % 3; + int eb = av_log2(newpasses - href_passes); + int extra_bit = newpasses > 2 ? 1 : 0; + if ((ret = get_bits(s, llen + eb + 3)) < 0) + return ret; + cblk->pass_lengths[0] = ret; + if ((ret = get_bits(s, llen + 3 + extra_bit)) < 0) + return ret; + cblk->pass_lengths[1] = ret; + ret = cblk->pass_lengths[0] + cblk->pass_lengths[1]; + } else { + if ((ret = get_bits(s, av_log2(newpasses1) + cblk->lblock)) < 0) + return ret; + cblk->pass_lengths[0] = ret; + } if (ret > cblk->data_allocated) { size_t new_size = FFMAX(2*cblk->data_allocated, ret); void *new = av_realloc(cblk->data, new_size); @@ -1949,9 +1885,12 @@ static inline void tile_codeblocks(const Jpeg2000DecoderContext *s, Jpeg2000Tile /* Loop on tile components */ for (compno = 0; compno < s->ncomponents; compno++) { - Jpeg2000Component *comp = tile->comp + compno; - Jpeg2000CodingStyle *codsty = tile->codsty + compno; + Jpeg2000Component *comp = tile->comp + compno; + Jpeg2000CodingStyle *codsty = tile->codsty + compno; + Jpeg2000QuantStyle *quantsty = tile->qntsty + compno; + int coded = 0; + int subbandno = 0; t1.stride = (1<log2_cblk_width) + 2; @@ -1959,7 +1898,7 @@ static inline void tile_codeblocks(const Jpeg2000DecoderContext *s, Jpeg2000Tile for (reslevelno = 0; reslevelno < codsty->nreslevels2decode; reslevelno++) { Jpeg2000ResLevel *rlevel = comp->reslevel + reslevelno; /* Loop on bands */ - for (bandno = 0; bandno < rlevel->nbands; bandno++) { + for (bandno = 0; bandno < rlevel->nbands; bandno++, subbandno++) { int nb_precincts, precno; Jpeg2000Band *band = rlevel->band + bandno; int cblkno = 0, bandpos; @@ -1979,12 +1918,23 @@ static inline void tile_codeblocks(const Jpeg2000DecoderContext *s, Jpeg2000Tile for (cblkno = 0; cblkno < prec->nb_codeblocks_width * prec->nb_codeblocks_height; cblkno++) { - int x, y; + int x, y, ret; + /* See Rec. ITU-T T.800, Equation E-2 */ + int magp = quantsty->expn[subbandno] + quantsty->nguardbits - 1; + Jpeg2000Cblk *cblk = prec->cblk + cblkno; - int ret = decode_cblk(s, codsty, &t1, cblk, - cblk->coord[0][1] - cblk->coord[0][0], - cblk->coord[1][1] - cblk->coord[1][0], - bandpos, comp->roi_shift); + + if (codsty->cblk_style & JPEG2000_CTSY_HTJ2K_F) + ret = ff_jpeg2000_decode_htj2k(s, codsty, &t1, cblk, + cblk->coord[0][1] - cblk->coord[0][0], + cblk->coord[1][1] - cblk->coord[1][0], + magp, comp->roi_shift); + else + ret = decode_cblk(s, codsty, &t1, cblk, + cblk->coord[0][1] - cblk->coord[0][0], + cblk->coord[1][1] - cblk->coord[1][0], + bandpos, comp->roi_shift); + if (ret) coded = 1; else @@ -2532,7 +2482,7 @@ static int jpeg2000_decode_frame(AVCodecContext *avctx, AVFrame *picture, if ((ret = ff_thread_get_buffer(avctx, picture, 0)) < 0) goto end; picture->pict_type = AV_PICTURE_TYPE_I; - picture->key_frame = 1; + picture->flags |= AV_FRAME_FLAG_KEY; if (ret = jpeg2000_read_bitstream_packets(s)) goto end; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/jpeg2000dec.h b/arm/raspi/third_party/ffmpeg/libavcodec/jpeg2000dec.h new file mode 100644 index 00000000..d0ca6e7a --- /dev/null +++ b/arm/raspi/third_party/ffmpeg/libavcodec/jpeg2000dec.h @@ -0,0 +1,119 @@ +/* + * JPEG 2000 image decoder + * Copyright (c) 2007 Kamil Nowosad + * Copyright (c) 2013 Nicolas Bertrand + * Copyright (c) 2022 Caleb Etemesi + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_JPEG2000DEC_H +#define AVCODEC_JPEG2000DEC_H + +#include "bytestream.h" +#include "jpeg2000.h" +#include "jpeg2000dsp.h" + + +#define MAX_POCS 32 + +typedef struct Jpeg2000POCEntry { + uint16_t LYEpoc; + uint16_t CSpoc; + uint16_t CEpoc; + uint8_t RSpoc; + uint8_t REpoc; + uint8_t Ppoc; +} Jpeg2000POCEntry; + +typedef struct Jpeg2000POC { + Jpeg2000POCEntry poc[MAX_POCS]; + int nb_poc; + int is_default; +} Jpeg2000POC; + +typedef struct Jpeg2000TilePart { + uint8_t tile_index; // Tile index who refers the tile-part + const uint8_t *tp_end; + GetByteContext header_tpg; // bit stream of header if PPM header is used + GetByteContext tpg; // bit stream in tile-part +} Jpeg2000TilePart; + +/* RMK: For JPEG2000 DCINEMA 3 tile-parts in a tile + * one per component, so tile_part elements have a size of 3 */ +typedef struct Jpeg2000Tile { + Jpeg2000Component *comp; + uint8_t properties[4]; + Jpeg2000CodingStyle codsty[4]; + Jpeg2000QuantStyle qntsty[4]; + Jpeg2000POC poc; + Jpeg2000TilePart tile_part[32]; + uint8_t has_ppt; // whether this tile has a ppt marker + uint8_t *packed_headers; // contains packed headers. Used only along with PPT marker + int packed_headers_size; // size in bytes of the packed headers + GetByteContext packed_headers_stream; // byte context corresponding to packed headers + uint16_t tp_idx; // Tile-part index + int coord[2][2]; // border coordinates {{x0, x1}, {y0, y1}} +} Jpeg2000Tile; + +typedef struct Jpeg2000DecoderContext { + AVClass *class; + AVCodecContext *avctx; + GetByteContext g; + + int width, height; + int image_offset_x, image_offset_y; + int tile_offset_x, tile_offset_y; + uint8_t cbps[4]; // bits per sample in particular components + uint8_t sgnd[4]; // if a component is signed + uint8_t properties[4]; + + uint8_t has_ppm; + uint8_t *packed_headers; // contains packed headers. Used only along with PPM marker + int packed_headers_size; + GetByteContext packed_headers_stream; + uint8_t in_tile_headers; + + int cdx[4], cdy[4]; + int precision; + int ncomponents; + int colour_space; + uint32_t palette[256]; + int8_t pal8; + int cdef[4]; + int tile_width, tile_height; + unsigned numXtiles, numYtiles; + int maxtilelen; + AVRational sar; + + Jpeg2000CodingStyle codsty[4]; + Jpeg2000QuantStyle qntsty[4]; + Jpeg2000POC poc; + uint8_t roi_shift[4]; + + int bit_index; + + int curtileno; + + Jpeg2000Tile *tile; + Jpeg2000DSPContext dsp; + + /*options parameters*/ + int reduction_factor; +} Jpeg2000DecoderContext; + +#endif //AVCODEC_JPEG2000DEC_H diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/jpeg2000htdec.c b/arm/raspi/third_party/ffmpeg/libavcodec/jpeg2000htdec.c new file mode 100644 index 00000000..51cd96e0 --- /dev/null +++ b/arm/raspi/third_party/ffmpeg/libavcodec/jpeg2000htdec.c @@ -0,0 +1,1451 @@ +/* + * Copyright (c) 2022 Caleb Etemesi + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/* + * Copyright 2019 - 2021, Osamu Watanabe + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its contributors + * may be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include "libavutil/attributes.h" +#include "libavutil/common.h" +#include "libavutil/avassert.h" +#include "jpeg2000htdec.h" +#include "jpeg2000.h" +#include "jpeg2000dec.h" + +#define J2K_Q1 0 +#define J2K_Q2 1 + +#define HT_SHIFT_SIGMA 0 +#define HT_SHIFT_SCAN 4 +#define HT_SHIFT_REF 3 +#define HT_SHIFT_REF_IND 2 + +/* See Rec. ITU-T T.800, Table 2 */ +const static uint8_t mel_e[13] = { 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 4, 5 }; + +static const uint16_t dec_cxt_vlc_table1[1024]; +static const uint16_t dec_cxt_vlc_table0[1024]; + +typedef struct StateVars { + int32_t pos; + uint32_t bits; + uint32_t tmp; + uint32_t last; + uint8_t bits_left; + uint64_t bit_buf; +} StateVars; + +typedef struct MelDecoderState { + uint8_t k; + uint8_t run; + uint8_t one; +} MelDecoderState; + +/** + * Given a precomputed c, checks whether n % d == 0. c is precomputed from d + * using precompute_c(). + */ +av_always_inline +static uint32_t is_divisible(uint32_t n, uint64_t c) +{ + return n * c <= c - 1; +} + +/** + * Precompute the number c used by is_divisible(). + */ +av_always_inline +static uint64_t precompute_c(uint32_t d) +{ + return 1 + (0xffffffffffffffffull / d); +} + +static void jpeg2000_init_zero(StateVars *s) +{ + s->bits_left = 0; + s->bit_buf = 0; + s->tmp = 0; + s->bits = 0; + s->pos = 0; + s->last = 0; +} + +static void jpeg2000_init_mel(StateVars *s, uint32_t Pcup) +{ + jpeg2000_init_zero(s); + s->pos = Pcup; +} + +static void jpeg2000_init_mag_ref(StateVars *s, uint32_t Lref) +{ + s->pos = Lref - 2; + s->bits = 0; + s->last = 0xFF; + s->tmp = 0; + s->bits_left = 0; + s->bit_buf = 0; +} + +static void jpeg2000_init_mel_decoder(MelDecoderState *mel_state) +{ + mel_state->k = 0; + mel_state->run = 0; + mel_state->one = 0; +} + +/** + * Refill the buffer backwards in little endian while skipping over stuffing + * bits. Stuffing bits are those that appear in the position of any byte whose + * LSBs are all 1's if the last consumed byte was larger than 0x8F. + */ +static int jpeg2000_bitbuf_refill_backwards(StateVars *buffer, const uint8_t *array) +{ + uint64_t tmp = 0; + int32_t position = buffer->pos; + uint32_t new_bits = 32; + + if (buffer->bits_left >= 32) + return 0; // enough data, no need to pull in more bits + + /** + * We are reading bytes from end to start and need to handle being close to + * the end. Subtracting by 4 means we will read some of the bytes of the MEL + * byte stream since the MEL byte stream ends at the start of the VLC byte + * stream. This is okay as they are masked away since we check for cases + * where that occurs (when the position is less than 4). + */ + position -= 4; + + tmp = AV_RB32(&array[position + 1]); + + if (buffer->pos < 4){ + /* mask un-needed bits if we are close to input end */ + uint64_t mask = (1ull << (buffer->pos + 1) * 8) - 1; + tmp &= mask; + } + + /** + * Unstuff bits. Load a temporary byte, which precedes the position we + * currently at, to ensure that we can also un-stuff if the stuffed bit is + * the bottom most bits. + */ + tmp <<= 8; + tmp |= array[buffer->pos + 1]; + + if ((tmp & 0x7FFF000000) > 0x7F8F000000) { + tmp &= 0x7FFFFFFFFF; + new_bits--; + } + if ((tmp & 0x007FFF0000) > 0x007F8F0000) { + tmp = (tmp & 0x007FFFFFFF) + ((tmp & 0xFF00000000) >> 1); + new_bits--; + } + if ((tmp & 0x00007FFF00) > 0x00007F8F00) { + tmp = (tmp & 0x00007FFFFF) + ((tmp & 0xFFFF000000) >> 1); + new_bits--; + } + if ((tmp & 0x0000007FFF) > 0x0000007F8F) { + tmp = (tmp & 0x0000007FFF) + ((tmp & 0xFFFFFF0000) >> 1); + new_bits--; + } + + tmp >>= 8; // Remove temporary byte loaded + + /* Add bits to the MSB of the bit buffer */ + buffer->bit_buf |= tmp << buffer->bits_left; + buffer->bits_left += new_bits; + buffer->pos = FFMAX(0, position); + return 0; +} + +/** + * Refill the bit-buffer reading new bits going forward + * in the stream while skipping over stuffed bits. + */ +static void jpeg2000_bitbuf_refill_forward(StateVars *buffer, const uint8_t *array, + uint32_t length) +{ + while (buffer->bits_left < 32) { + buffer->tmp = 0xFF; + buffer->bits = (buffer->last == 0xFF) ? 7 : 8; + if (buffer->pos <= length) { + buffer->tmp = array[buffer->pos]; + buffer->pos += 1; + buffer->last = buffer->tmp; + } + buffer->bit_buf |= ((uint64_t) buffer->tmp) << buffer->bits_left; + buffer->bits_left += buffer->bits; + } +} + +/** + * Drops bits from lower bits in the bit buffer. buf contains the bit buffers. + * nbits is the number of bits to remove. + */ +av_always_inline +static void jpeg2000_bitbuf_drop_bits_lsb(StateVars *buf, uint8_t nbits) +{ + av_assert2(buf->bits_left >= nbits); // cannot read more bits than available + buf->bit_buf >>= nbits; + buf->bits_left -= nbits; +} + +/** + * Get bits from the bit buffer reading them from the least significant bits + * moving to the most significant bits. In case there are fewer bits, refill + * from buf moving backwards. + */ +av_always_inline +static uint64_t jpeg2000_bitbuf_get_bits_lsb(StateVars *bit_stream, uint8_t nbits, + const uint8_t *buf) +{ + uint64_t bits; + uint64_t mask = (1ull << nbits) - 1; + if (bit_stream->bits_left < nbits) + jpeg2000_bitbuf_refill_backwards(bit_stream, buf); + bits = bit_stream->bit_buf & mask; + jpeg2000_bitbuf_drop_bits_lsb(bit_stream, nbits); + return bits; +} + +/** + * Get bits from the bit buffer reading them from the least significant bits + * moving to the most significant bits. In case there are fewer bits, refill from + * buf moving forward. + */ +av_always_inline +static uint64_t jpeg2000_bitbuf_get_bits_lsb_forward(StateVars *bit_stream, + uint8_t nbits, const uint8_t *buf, + uint32_t length) +{ + uint64_t bits; + uint64_t mask = (1ull << nbits) - 1; + + if (bit_stream->bits_left <= nbits) + jpeg2000_bitbuf_refill_forward(bit_stream, buf, length); + bits = bit_stream->bit_buf & mask; + jpeg2000_bitbuf_drop_bits_lsb(bit_stream, nbits); + return bits; +} + +/** + * Look ahead bit buffer without discarding bits. + */ +av_always_inline +static uint64_t jpeg2000_bitbuf_peek_bits_lsb(StateVars *stream, uint8_t nbits) +{ + uint64_t mask = (1ull << nbits) - 1; + return stream->bit_buf & mask; +} + +static void jpeg2000_init_vlc(StateVars *s, uint32_t Lcup, uint32_t Pcup, + const uint8_t *Dcup) +{ + s->bits_left = 0; + s->bit_buf = 0; + s->pos = Lcup - 2 - Pcup; + s->last = Dcup[Lcup - 2]; + s->tmp = (s->last) >> 4; + s->bits = ((s->tmp & 7) < 7) ? 4 : 3; + + jpeg2000_bitbuf_refill_backwards(s, Dcup + Pcup); + jpeg2000_bitbuf_drop_bits_lsb(s, 4); +} + +/** + * Decode prefix codes for VLC segment. See Rec. ITU-T T.814, 7.3.5. + */ +av_always_inline +static int jpeg2000_decode_ctx_vlc(const Jpeg2000DecoderContext *s, + StateVars *vlc_stream, const uint16_t *table, + const uint8_t *Dcup, uint8_t *sig_pat, + uint8_t *res_off, uint8_t *emb_pat_k, + uint8_t *emb_pat_1, uint8_t pos, + uint32_t Pcup, uint16_t context) +{ + uint32_t value; + uint8_t len; + uint64_t index; + uint64_t code_word; + + jpeg2000_bitbuf_refill_backwards(vlc_stream, Dcup + Pcup); + + code_word = vlc_stream->bit_buf & 0x7f; + index = code_word + (context << 7); + + av_assert0(index < 1024); // The CxtVLC table has 1024 entries. + + value = table[index]; + + len = (value & 0x000F) >> 1; + + res_off[pos] = (uint8_t) (value & 1); + sig_pat[pos] = (uint8_t) ((value & 0x00F0) >> 4); + emb_pat_k[pos] = (uint8_t) ((value & 0x0F00) >> 8); + emb_pat_1[pos] = (uint8_t) ((value & 0xF000) >> 12); + + jpeg2000_bitbuf_drop_bits_lsb(vlc_stream, len); + return 0; +} + +/** + * Decode variable length u-vlc prefix. See decodeUPrefix procedure at Rec. + * ITU-T T.814, 7.3.6. + */ +av_always_inline +static uint8_t vlc_decode_u_prefix(StateVars *vlc_stream, const uint8_t *refill_array) +{ + static const uint8_t return_value[8] = { 5, 1, 2, 1, 3, 1, 2, 1 }; + static const uint8_t drop_bits[8] = { 3, 1, 2, 1, 3, 1, 2, 1 }; + + uint8_t bits; + + if (vlc_stream->bits_left < 3) + jpeg2000_bitbuf_refill_backwards(vlc_stream, refill_array); + + bits = jpeg2000_bitbuf_peek_bits_lsb(vlc_stream, 3); + + jpeg2000_bitbuf_drop_bits_lsb(vlc_stream, drop_bits[bits]); + return return_value[bits]; +} + +/** + * Decode variable length u-vlc suffix. See decodeUSuffix procedure at Rec. + * ITU-T T.814, 7.3.6. + */ +av_always_inline +static uint8_t vlc_decode_u_suffix(StateVars *vlc_stream, uint8_t suffix, + const uint8_t *refill_array) +{ + static const int mask[] = { 1, 31 }; + static const int drop_bits[] = { 1, 5 }; + + uint8_t bits; + int cond = suffix != 3; + if (suffix < 3) + return 0; + + if (vlc_stream->bits_left < 5) + jpeg2000_bitbuf_refill_backwards(vlc_stream, refill_array); + + bits = jpeg2000_bitbuf_peek_bits_lsb(vlc_stream, 5); + + jpeg2000_bitbuf_drop_bits_lsb(vlc_stream, drop_bits[cond]); + return bits & mask[cond]; +} + +/** + * Decode u-vlc extension values. See decodeUExtension procedure at Rec. ITU-T + * T.814, 7.3.6. + */ +av_always_inline +static uint8_t vlc_decode_u_extension(StateVars *vlc_stream, uint8_t suffix, + const uint8_t *refill_array) +{ + return jpeg2000_bitbuf_get_bits_lsb(vlc_stream, 4 * (suffix >= 28), refill_array); +} + +/** + * Magnitude and Sign decode procedures. See decodeMagSgnValue procedure at Rec. + * ITU-T T.814, 7.3.8. + */ +av_always_inline +static int32_t jpeg2000_decode_mag_sgn(StateVars *mag_sgn_stream, int32_t m_n, + int32_t i_n, const uint8_t *buf, uint32_t length) +{ + int32_t val = 0; + if (m_n > 0) { + val = jpeg2000_bitbuf_get_bits_lsb_forward(mag_sgn_stream,m_n,buf,length); + val += (i_n << m_n); + } + return val; +} + +av_always_inline +static void recover_mag_sgn(StateVars *mag_sgn, uint8_t pos, uint16_t q, int32_t m_n[2], + int32_t known_1[2], const uint8_t emb_pat_1[2], + int32_t v[2][4], int32_t m[2][4], uint8_t *E, + uint32_t *mu_n, const uint8_t *Dcup, uint32_t Pcup, + uint32_t pLSB) +{ + for (int i = 0; i < 4; i++) { + int32_t n = 4 * q + i; + m_n[pos] = m[pos][i]; + known_1[pos] = (emb_pat_1[pos] >> i) & 1; + v[pos][i] = jpeg2000_decode_mag_sgn(mag_sgn, m_n[pos], known_1[pos], Dcup, Pcup); + + if (m_n[pos] != 0) { + E[n] = 32 - ff_clz(v[pos][i] | 1); + mu_n[n] = (v[pos][i] >> 1) + 1; + mu_n[n] <<= pLSB; + mu_n[n] |= ((uint32_t) (v[pos][i] & 1)) << 31; // sign bit. + } + } +} + +static int jpeg2000_import_bit(StateVars *stream, const uint8_t *array, uint32_t length) +{ + int cond = stream->pos <= length; + int pos = FFMIN(stream->pos, length); + if (stream->bits == 0) { + stream->bits = (stream->tmp == 0xFF) ? 7 : 8; + stream->pos += cond; + stream->tmp = cond ? array[pos] : 0xFF; + } + stream->bits -= 1; + return (stream->tmp >> stream->bits) & 1; +} + +static int jpeg2000_peek_bit(StateVars *stream, const uint8_t *array, uint32_t length) +{ + if (stream->bits == 0) { + int cond = stream->pos <= length; + int pos = FFMIN(stream->pos, length); + stream->bits = (stream->tmp == 0xFF) ? 7 : 8; + stream->pos += cond; + stream->tmp = cond ? array[pos] : 0xFF; + } + return (stream->tmp >> stream->bits) & 1; +} + +static int jpeg2000_decode_mel_sym(MelDecoderState *mel_state, + StateVars *mel_stream, + const uint8_t *Dcup, + uint32_t Lcup) +{ + + if (mel_state->run == 0 && mel_state->one == 0) { + uint8_t eval; + uint8_t bit; + + eval = mel_e[mel_state->k]; + bit = jpeg2000_import_bit(mel_stream, Dcup, Lcup); + if (bit == 1) { + mel_state->run = 1 << eval; + mel_state->k = FFMIN(12, mel_state->k + 1); + } else { + mel_state->run = 0; + while (eval > 0) { + bit = jpeg2000_import_bit(mel_stream, Dcup, Lcup); + mel_state->run = (2 * (mel_state->run)) + bit; + eval -= 1; + } + mel_state->k = FFMAX(0, mel_state->k - 1); + mel_state->one = 1; + } + } + if (mel_state->run > 0) { + mel_state->run -= 1; + return 0; + } else { + mel_state->one = 0; + return 1; + } +} + +/** + * Magref decoding procedures. + */ +av_always_inline +static int jpeg2000_import_magref_bit(StateVars *stream, const uint8_t *array, + uint32_t length) +{ + return jpeg2000_bitbuf_get_bits_lsb(stream, 1, array); +} + +/** + * Signal EMB decode. + */ +static int jpeg2000_decode_sig_emb(const Jpeg2000DecoderContext *s, MelDecoderState *mel_state, + StateVars *mel_stream, StateVars *vlc_stream, + const uint16_t *vlc_table, const uint8_t *Dcup, + uint8_t *sig_pat, uint8_t *res_off, uint8_t *emb_pat_k, + uint8_t *emb_pat_1, uint8_t pos, uint16_t context, + uint32_t Lcup, uint32_t Pcup) +{ + if (context == 0) { + uint8_t sym; + sym = jpeg2000_decode_mel_sym(mel_state, mel_stream, Dcup, Lcup); + if (sym == 0) { + sig_pat[pos] = 0; + res_off[pos] = 0; + emb_pat_k[pos] = 0; + emb_pat_1[pos] = 0; + return 0; + } + } + return jpeg2000_decode_ctx_vlc(s, vlc_stream, vlc_table, Dcup, sig_pat, + res_off, emb_pat_k, emb_pat_1, pos, Pcup, + context); +} + +av_always_inline +static int jpeg2000_get_state(int x1, int x2, int width, int shift_by, + const uint8_t *block_states) +{ + return (block_states[(x1 + 1) * (width + 2) + (x2 + 1)] >> shift_by) & 1; +} + +av_always_inline +static void jpeg2000_modify_state(int x1, int x2, int width, + int value, uint8_t *block_states) +{ + block_states[(x1 + 1) * (width + 2) + (x2 + 1)] |= value; +} + +av_always_inline +static int jpeg2000_decode_ht_cleanup_segment(const Jpeg2000DecoderContext *s, + Jpeg2000Cblk *cblk, Jpeg2000T1Context *t1, + MelDecoderState *mel_state, + StateVars *mel_stream, StateVars *vlc_stream, + StateVars *mag_sgn_stream, const uint8_t *Dcup, + uint32_t Lcup, uint32_t Pcup, uint8_t pLSB, + int width, int height, int32_t *sample_buf, + uint8_t *block_states) +{ + uint16_t q = 0; // Represents current quad position + uint16_t q1, q2; + uint16_t context1, context2; + uint16_t context = 0; + + uint8_t sig_pat[2] = { 0 }; // significance pattern + uint8_t res_off[2] = { 0 }; // residual offset + uint8_t emb_pat_k[2] = { 0 }; // exponent Max Bound pattern K + uint8_t emb_pat_1[2] = { 0 }; // exponent Max Bound pattern 1 + uint8_t gamma[2] = { 0 }; + + uint8_t E_n[2] = { 0 }; + uint8_t E_ne[2] = { 0 }; + uint8_t E_nw[2] = { 0 }; + uint8_t E_nf[2] = { 0 }; + + uint8_t max_e[2] = { 0 }; + uint8_t u_pfx[2] = { 0 }; + uint8_t u_sfx[2] = { 0 }; + uint8_t u_ext[2] = { 0 }; + + int32_t u[2] = { 0 }; + int32_t U[2] = { 0 }; // exponent bound + int32_t m_n[2] = { 0 }; + int32_t known_1[2] = { 0 }; + + int32_t m[2][4] = { 0 }; + int32_t v[2][4] = { 0 }; + + uint8_t kappa[2] = { 1, 1 }; + + int ret = 0; + + int sp; + + uint64_t c; + + uint8_t *sigma; + uint32_t *mu; + + const uint8_t *vlc_buf = Dcup + Pcup; + + /* convert to raster-scan */ + const uint16_t is_border_x = width % 2; + const uint16_t is_border_y = height % 2; + + const uint16_t quad_width = ff_jpeg2000_ceildivpow2(width, 1); + const uint16_t quad_height = ff_jpeg2000_ceildivpow2(height, 1); + + size_t buf_size = 4 * quad_width * quad_height; + + uint8_t *sigma_n = av_calloc(buf_size, sizeof(uint8_t)); + uint8_t *E = av_calloc(buf_size, sizeof(uint8_t)); + uint32_t *mu_n = av_calloc(buf_size, sizeof(uint32_t)); + + if (!sigma_n || !E || !mu_n) { + ret = AVERROR(ENOMEM); + goto free; + } + + sigma = sigma_n; + mu = mu_n; + + while (q < quad_width - 1) { + q1 = q; + q2 = q1 + 1; + + if ((ret = jpeg2000_decode_sig_emb(s, mel_state, mel_stream, vlc_stream, + dec_cxt_vlc_table0, Dcup, sig_pat, res_off, + emb_pat_k, emb_pat_1, J2K_Q1, context, Lcup, + Pcup)) < 0) + goto free; + + for (int i = 0; i < 4; i++) + sigma_n[4 * q1 + i] = (sig_pat[J2K_Q1] >> i) & 1; + + /* calculate context */ + context = sigma_n[4 * q1]; // f + context |= sigma_n[4 * q1 + 1]; // sf + context += sigma_n[4 * q1 + 2] << 1; // w << 1 + context += sigma_n[4 * q1 + 3] << 2; + + if ((ret = jpeg2000_decode_sig_emb(s, mel_state, mel_stream, vlc_stream, + dec_cxt_vlc_table0, Dcup, sig_pat, res_off, + emb_pat_k, emb_pat_1, J2K_Q2, context, Lcup, + Pcup)) < 0) + goto free; + + for (int i = 0; i < 4; i++) + sigma_n[4 * q2 + i] = (sig_pat[J2K_Q2] >> i) & 1; + + /* calculate context for the next quad */ + context = sigma_n[4 * q2]; // f + context |= sigma_n[4 * q2 + 1]; // sf + context += sigma_n[4 * q2 + 2] << 1; // w << 1 + context += sigma_n[4 * q2 + 3] << 2; // sw << 2 + + u[0] = 0; + u[1] = 0; + + jpeg2000_bitbuf_refill_backwards(vlc_stream, vlc_buf); + + if (res_off[J2K_Q1] == 1 && res_off[J2K_Q2] == 1) { + + if (jpeg2000_decode_mel_sym(mel_state, mel_stream, Dcup, Lcup) == 1) { + + u_pfx[J2K_Q1] = vlc_decode_u_prefix(vlc_stream, vlc_buf); + u_pfx[J2K_Q2] = vlc_decode_u_prefix(vlc_stream, vlc_buf); + + u_sfx[J2K_Q1] = vlc_decode_u_suffix(vlc_stream, u_pfx[J2K_Q1], vlc_buf); + u_sfx[J2K_Q2] = vlc_decode_u_suffix(vlc_stream, u_pfx[J2K_Q2], vlc_buf); + + u_ext[J2K_Q1] = vlc_decode_u_extension(vlc_stream, u_sfx[J2K_Q1], vlc_buf); + u_ext[J2K_Q2] = vlc_decode_u_extension(vlc_stream, u_sfx[J2K_Q2], vlc_buf); + + u[J2K_Q1] = 2 + u_pfx[J2K_Q1] + u_sfx[J2K_Q1] + (u_ext[J2K_Q1] * 4); + u[J2K_Q2] = 2 + u_pfx[J2K_Q2] + u_sfx[J2K_Q2] + (u_ext[J2K_Q2] * 4); + + } else { + u_pfx[J2K_Q1] = vlc_decode_u_prefix(vlc_stream, vlc_buf); + + if (u_pfx[J2K_Q1] > 2) { + u[J2K_Q2] = jpeg2000_bitbuf_get_bits_lsb(vlc_stream, 1, vlc_buf) + 1; + u_sfx[J2K_Q1] = vlc_decode_u_suffix(vlc_stream, u_pfx[J2K_Q1], vlc_buf); + u_ext[J2K_Q1] = vlc_decode_u_extension(vlc_stream, u_sfx[J2K_Q1], vlc_buf); + } else { + u_pfx[J2K_Q2] = vlc_decode_u_prefix(vlc_stream, vlc_buf); + u_sfx[J2K_Q1] = vlc_decode_u_suffix(vlc_stream, u_pfx[J2K_Q1], vlc_buf); + u_sfx[J2K_Q2] = vlc_decode_u_suffix(vlc_stream, u_pfx[J2K_Q2], vlc_buf); + u_ext[J2K_Q1] = vlc_decode_u_extension(vlc_stream, u_sfx[J2K_Q1], vlc_buf); + u_ext[J2K_Q2] = vlc_decode_u_extension(vlc_stream, u_sfx[J2K_Q2], vlc_buf); + u[J2K_Q2] = u_pfx[J2K_Q2] + u_sfx[J2K_Q2] + (u_ext[J2K_Q2] * 4); + } + /* See Rec. ITU-T T.814, 7.3.6(3) */ + u[J2K_Q1] = u_pfx[J2K_Q1] + u_sfx[J2K_Q1] + (u_ext[J2K_Q1] * 4); + } + + } else if (res_off[J2K_Q1] == 1 || res_off[J2K_Q2] == 1) { + uint8_t pos = res_off[J2K_Q1] == 1 ? 0 : 1; + u_pfx[pos] = vlc_decode_u_prefix(vlc_stream, vlc_buf); + u_sfx[pos] = vlc_decode_u_suffix(vlc_stream, u_pfx[pos], vlc_buf); + u_ext[pos] = vlc_decode_u_extension(vlc_stream, u_sfx[pos], vlc_buf); + u[pos] = u_pfx[pos] + u_sfx[pos] + (u_ext[pos] * 4); + } + U[J2K_Q1] = kappa[J2K_Q1] + u[J2K_Q1]; + U[J2K_Q2] = kappa[J2K_Q2] + u[J2K_Q2]; + + for (int i = 0; i < 4; i++) { + m[J2K_Q1][i] = sigma_n[4 * q1 + i] * U[J2K_Q1] - ((emb_pat_k[J2K_Q1] >> i) & 1); + m[J2K_Q2][i] = sigma_n[4 * q2 + i] * U[J2K_Q2] - ((emb_pat_k[J2K_Q2] >> i) & 1); + } + + recover_mag_sgn(mag_sgn_stream, J2K_Q1, q1, m_n, known_1, emb_pat_1, v, m, + E, mu_n, Dcup, Pcup, pLSB); + + recover_mag_sgn(mag_sgn_stream, J2K_Q2, q2, m_n, known_1, emb_pat_1, v, m, + E, mu_n, Dcup, Pcup, pLSB); + + q += 2; // Move to the next quad pair + } + + if (quad_width % 2 == 1) { + q1 = q; + + if ((ret = jpeg2000_decode_sig_emb(s, mel_state, mel_stream, vlc_stream, + dec_cxt_vlc_table0, Dcup, sig_pat, res_off, + emb_pat_k, emb_pat_1, J2K_Q1, context, Lcup, + Pcup)) < 0) + goto free; + + for (int i = 0; i < 4; i++) + sigma_n[4 * q1 + i] = (sig_pat[J2K_Q1] >> i) & 1; + + u[J2K_Q1] = 0; + + if (res_off[J2K_Q1] == 1) { + u_pfx[J2K_Q1] = vlc_decode_u_prefix(vlc_stream, vlc_buf); + u_sfx[J2K_Q1] = vlc_decode_u_suffix(vlc_stream, u_pfx[J2K_Q1], vlc_buf); + u_ext[J2K_Q1] = vlc_decode_u_extension(vlc_stream, u_sfx[J2K_Q1], vlc_buf); + u[J2K_Q1] = u_pfx[J2K_Q1] + u_sfx[J2K_Q1] + (u_ext[J2K_Q1] * 4); + } + + U[J2K_Q1] = kappa[J2K_Q1] + u[J2K_Q1]; + + for (int i = 0; i < 4; i++) + m[J2K_Q1][i] = sigma_n[4 * q1 + i] * U[J2K_Q1] - ((emb_pat_k[J2K_Q1] >> i) & 1); + + recover_mag_sgn(mag_sgn_stream, J2K_Q1, q1, m_n, known_1, emb_pat_1, v, m, + E, mu_n, Dcup, Pcup, pLSB); + + q++; // move to next quad pair + } + + /** + * Initial line pair end. As an optimization, we can replace modulo + * operations with checking if a number is divisible , since that's the only + * thing we need. This is paired with is_divisible. Credits to Daniel Lemire + * blog post [1]. + * + * [1] + * https://lemire.me/blog/2019/02/08/faster-remainders-when-the-divisor-is-a-constant-beating-compilers-and-libdivide/ + * + * It's UB on zero, but the spec doesn't allow a quad being zero, so we + * error out early in case that's the case. + */ + c = precompute_c(quad_width); + + for (int row = 1; row < quad_height; row++) { + while ((q - (row * quad_width)) < quad_width - 1 && q < (quad_height * quad_width)) { + q1 = q; + q2 = q + 1; + context1 = sigma_n[4 * (q1 - quad_width) + 1]; + context1 += sigma_n[4 * (q1 - quad_width) + 3] << 2; // ne + + if (!is_divisible(q1, c)) { + context1 |= sigma_n[4 * (q1 - quad_width) - 1]; // nw + context1 += (sigma_n[4 * q1 - 1] | sigma_n[4 * q1 - 2]) << 1; // sw | q + } + if (!is_divisible(q1 + 1, c)) + context1 |= sigma_n[4 * (q1 - quad_width) + 5] << 2; + + if ((ret = jpeg2000_decode_sig_emb(s, mel_state, mel_stream, vlc_stream, + dec_cxt_vlc_table1, Dcup, sig_pat, res_off, + emb_pat_k, emb_pat_1, J2K_Q1, context1, Lcup, + Pcup)) + < 0) + goto free; + + for (int i = 0; i < 4; i++) + sigma_n[4 * q1 + i] = (sig_pat[J2K_Q1] >> i) & 1; + + context2 = sigma_n[4 * (q2 - quad_width) + 1]; + context2 += sigma_n[4 * (q2 - quad_width) + 3] << 2; + + if (!is_divisible(q2, c)) { + context2 |= sigma_n[4 * (q2 - quad_width) - 1]; + context2 += (sigma_n[4 * q2 - 1] | sigma_n[4 * q2 - 2]) << 1; + } + if (!is_divisible(q2 + 1, c)) + context2 |= sigma_n[4 * (q2 - quad_width) + 5] << 2; + + if ((ret = jpeg2000_decode_sig_emb(s, mel_state, mel_stream, vlc_stream, + dec_cxt_vlc_table1, Dcup, sig_pat, res_off, + emb_pat_k, emb_pat_1, J2K_Q2, context2, Lcup, + Pcup)) + < 0) + goto free; + + for (int i = 0; i < 4; i++) + sigma_n[4 * q2 + i] = (sig_pat[J2K_Q2] >> i) & 1; + + u[J2K_Q1] = 0; + u[J2K_Q2] = 0; + + jpeg2000_bitbuf_refill_backwards(vlc_stream, vlc_buf); + + if (res_off[J2K_Q1] == 1 && res_off[J2K_Q2] == 1) { + u_pfx[J2K_Q1] = vlc_decode_u_prefix(vlc_stream, vlc_buf); + u_pfx[J2K_Q2] = vlc_decode_u_prefix(vlc_stream, vlc_buf); + + u_sfx[J2K_Q1] = vlc_decode_u_suffix(vlc_stream, u_pfx[J2K_Q1], vlc_buf); + u_sfx[J2K_Q2] = vlc_decode_u_suffix(vlc_stream, u_pfx[J2K_Q2], vlc_buf); + + u_ext[J2K_Q1] = vlc_decode_u_extension(vlc_stream, u_sfx[J2K_Q1], vlc_buf); + u_ext[J2K_Q2] = vlc_decode_u_extension(vlc_stream, u_sfx[J2K_Q2], vlc_buf); + + u[J2K_Q1] = u_pfx[J2K_Q1] + u_sfx[J2K_Q1] + (u_ext[J2K_Q1] << 2); + u[J2K_Q2] = u_pfx[J2K_Q2] + u_sfx[J2K_Q2] + (u_ext[J2K_Q2] << 2); + + } else if (res_off[J2K_Q1] == 1 || res_off[J2K_Q2] == 1) { + uint8_t pos = res_off[J2K_Q1] == 1 ? 0 : 1; + + u_pfx[pos] = vlc_decode_u_prefix(vlc_stream, vlc_buf); + u_sfx[pos] = vlc_decode_u_suffix(vlc_stream, u_pfx[pos], vlc_buf); + u_ext[pos] = vlc_decode_u_extension(vlc_stream, u_sfx[pos], vlc_buf); + + u[pos] = u_pfx[pos] + u_sfx[pos] + (u_ext[pos] << 2); + } + sp = sig_pat[J2K_Q1]; + + gamma[J2K_Q1] = 1; + + if (sp == 0 || sp == 1 || sp == 2 || sp == 4 || sp == 8) + gamma[J2K_Q1] = 0; + + sp = sig_pat[J2K_Q2]; + + gamma[J2K_Q2] = 1; + + if (sp == 0 || sp == 1 || sp == 2 || sp == 4 || sp == 8) + gamma[J2K_Q2] = 0; + + E_n[J2K_Q1] = E[4 * (q1 - quad_width) + 1]; + E_n[J2K_Q2] = E[4 * (q2 - quad_width) + 1]; + + E_ne[J2K_Q1] = E[4 * (q1 - quad_width) + 3]; + E_ne[J2K_Q2] = E[4 * (q2 - quad_width) + 3]; + + E_nw[J2K_Q1] = (!is_divisible(q1, c)) * E[FFMAX((4 * (q1 - quad_width) - 1), 0)]; + E_nw[J2K_Q2] = (!is_divisible(q2, c)) * E[FFMAX((4 * (q2 - quad_width) - 1), 0)]; + + E_nf[J2K_Q1] = (!is_divisible(q1 + 1, c)) * E[4 * (q1 - quad_width) + 5]; + E_nf[J2K_Q2] = (!is_divisible(q2 + 1, c)) * E[4 * (q2 - quad_width) + 5]; + + max_e[J2K_Q1] = FFMAX(E_nw[J2K_Q1], FFMAX3(E_n[J2K_Q1], E_ne[J2K_Q1], E_nf[J2K_Q1])); + max_e[J2K_Q2] = FFMAX(E_nw[J2K_Q2], FFMAX3(E_n[J2K_Q2], E_ne[J2K_Q2], E_nf[J2K_Q2])); + + kappa[J2K_Q1] = FFMAX(1, gamma[J2K_Q1] * (max_e[J2K_Q1] - 1)); + kappa[J2K_Q2] = FFMAX(1, gamma[J2K_Q2] * (max_e[J2K_Q2] - 1)); + + U[J2K_Q1] = kappa[J2K_Q1] + u[J2K_Q1]; + U[J2K_Q2] = kappa[J2K_Q2] + u[J2K_Q2]; + + for (int i = 0; i < 4; i++) { + m[J2K_Q1][i] = sigma_n[4 * q1 + i] * U[J2K_Q1] - ((emb_pat_k[J2K_Q1] >> i) & 1); + m[J2K_Q2][i] = sigma_n[4 * q2 + i] * U[J2K_Q2] - ((emb_pat_k[J2K_Q2] >> i) & 1); + } + recover_mag_sgn(mag_sgn_stream, J2K_Q1, q1, m_n, known_1, emb_pat_1, v, m, + E, mu_n, Dcup, Pcup, pLSB); + + recover_mag_sgn(mag_sgn_stream, J2K_Q2, q2, m_n, known_1, emb_pat_1, v, m, + E, mu_n, Dcup, Pcup, pLSB); + + q += 2; // Move to the next quad pair + } + + if (quad_width % 2 == 1) { + q1 = q; + + /* calculate context for current quad */ + context1 = sigma_n[4 * (q1 - quad_width) + 1]; + context1 += (sigma_n[4 * (q1 - quad_width) + 3] << 2); + + if (!is_divisible(q1, c)) { + context1 |= sigma_n[4 * (q1 - quad_width) - 1]; + context1 += (sigma_n[4 * q1 - 1] | sigma_n[4 * q1 - 2]) << 1; + } + if (!is_divisible(q1 + 1, c)) + context1 |= sigma_n[4 * (q1 - quad_width) + 5] << 2; + + if ((ret = jpeg2000_decode_sig_emb(s, mel_state, mel_stream, vlc_stream, + dec_cxt_vlc_table1, Dcup, sig_pat, res_off, + emb_pat_k, emb_pat_1, J2K_Q1, context1, Lcup, + Pcup)) < 0) + goto free; + + for (int i = 0; i < 4; i++) + sigma_n[4 * q1 + i] = (sig_pat[J2K_Q1] >> i) & 1; + + u[J2K_Q1] = 0; + + /* Recover mag_sgn value */ + if (res_off[J2K_Q1] == 1) { + u_pfx[J2K_Q1] = vlc_decode_u_prefix(vlc_stream, vlc_buf); + u_sfx[J2K_Q1] = vlc_decode_u_suffix(vlc_stream, u_pfx[J2K_Q1], vlc_buf); + u_ext[J2K_Q1] = vlc_decode_u_extension(vlc_stream, u_sfx[J2K_Q1], vlc_buf); + + u[J2K_Q1] = u_pfx[J2K_Q1] + u_sfx[J2K_Q1] + (u_ext[J2K_Q1] << 2); + } + + sp = sig_pat[J2K_Q1]; + + gamma[J2K_Q1] = 1; + + if (sp == 0 || sp == 1 || sp == 2 || sp == 4 || sp == 8) + gamma[J2K_Q1] = 0; + + E_n[J2K_Q1] = E[4 * (q1 - quad_width) + 1]; + + E_ne[J2K_Q1] = E[4 * (q1 - quad_width) + 3]; + + E_nw[J2K_Q1] = (!is_divisible(q1, c)) * E[FFMAX((4 * (q1 - quad_width) - 1), 0)]; + + E_nf[J2K_Q1] = (!is_divisible(q1 + 1, c)) * E[4 * (q1 - quad_width) + 5]; + + max_e[J2K_Q1] = FFMAX(E_nw[J2K_Q1], FFMAX3(E_n[J2K_Q1], E_ne[J2K_Q1], E_nf[J2K_Q1])); + + kappa[J2K_Q1] = FFMAX(1, gamma[J2K_Q1] * (max_e[J2K_Q1] - 1)); + + U[J2K_Q1] = kappa[J2K_Q1] + u[J2K_Q1]; + + for (int i = 0; i < 4; i++) + m[J2K_Q1][i] = sigma_n[4 * q1 + i] * U[J2K_Q1] - ((emb_pat_k[J2K_Q1] >> i) & 1); + + recover_mag_sgn(mag_sgn_stream, J2K_Q1, q1, m_n, known_1, emb_pat_1, v, m, + E, mu_n, Dcup, Pcup, pLSB); + q += 1; + } + } + + // convert to raster-scan + for (int y = 0; y < quad_height; y++) { + for (int x = 0; x < quad_width; x++) { + int j1, j2; + int x1, x2 , x3; + + j1 = 2 * y; + j2 = 2 * x; + + sample_buf[j2 + (j1 * width)] = (int32_t)*mu; + jpeg2000_modify_state(j1, j2, width, *sigma, block_states); + sigma += 1; + mu += 1; + + x1 = y != quad_height - 1 || is_border_y == 0; + sample_buf[j2 + ((j1 + 1) * width)] = ((int32_t)*mu) * x1; + jpeg2000_modify_state(j1 + 1, j2, width, (*sigma) * x1, block_states); + sigma += 1; + mu += 1; + + x2 = x != quad_width - 1 || is_border_x == 0; + sample_buf[(j2 + 1) + (j1 * width)] = ((int32_t)*mu) * x2; + jpeg2000_modify_state(j1, j2 + 1, width, (*sigma) * x2, block_states); + sigma += 1; + mu += 1; + + x3 = x1 | x2; + sample_buf[(j2 + 1) + (j1 + 1) * width] = ((int32_t)*mu) * x3; + jpeg2000_modify_state(j1 + 1, j2 + 1, width, (*sigma) * x3, block_states); + sigma += 1; + mu += 1; + } + } + ret = 1; +free: + av_freep(&sigma_n); + av_freep(&E); + av_freep(&mu_n); + return ret; +} + +static void jpeg2000_calc_mbr(uint8_t *mbr, const uint16_t i, const uint16_t j, + const uint32_t mbr_info, uint8_t causal_cond, + uint8_t *block_states, int width) +{ + int local_mbr = 0; + + local_mbr |= jpeg2000_get_state(i - 1, j - 1, width, HT_SHIFT_SIGMA, block_states); + local_mbr |= jpeg2000_get_state(i - 1, j + 0, width, HT_SHIFT_SIGMA, block_states); + local_mbr |= jpeg2000_get_state(i - 1, j + 1, width, HT_SHIFT_SIGMA, block_states); + + local_mbr |= jpeg2000_get_state(i + 0, j - 1, width, HT_SHIFT_SIGMA, block_states); + local_mbr |= jpeg2000_get_state(i + 0, j + 1, width, HT_SHIFT_SIGMA, block_states); + + local_mbr |= jpeg2000_get_state(i + 1, j - 1, width, HT_SHIFT_SIGMA, block_states) * causal_cond; + local_mbr |= jpeg2000_get_state(i + 1, j + 0, width, HT_SHIFT_SIGMA, block_states) * causal_cond; + local_mbr |= jpeg2000_get_state(i + 1, j + 1, width, HT_SHIFT_SIGMA, block_states) * causal_cond; + + local_mbr |= jpeg2000_get_state(i - 1, j - 1, width, HT_SHIFT_REF, block_states) * + jpeg2000_get_state(i - 1, j - 1, width, HT_SHIFT_SCAN, block_states); + local_mbr |= jpeg2000_get_state(i - 1, j + 0, width, HT_SHIFT_REF, block_states) * + jpeg2000_get_state(i - 1, j - 1, width, HT_SHIFT_SCAN, block_states); + local_mbr |= jpeg2000_get_state(i - 1, j + 1, width, HT_SHIFT_REF, block_states) * + jpeg2000_get_state(i - 1, j + 1, width, HT_SHIFT_SCAN, block_states); + + local_mbr |= jpeg2000_get_state(i + 0, j - 1, width, HT_SHIFT_REF, block_states) * + jpeg2000_get_state(i + 0, j - 1, width, HT_SHIFT_SCAN, block_states); + local_mbr |= jpeg2000_get_state(i + 0, j + 1, width, HT_SHIFT_REF, block_states) * + jpeg2000_get_state(i + 0, j + 1, width, HT_SHIFT_SCAN, block_states); + + local_mbr |= jpeg2000_get_state(i + 1, j - 1, width, HT_SHIFT_REF, block_states) * + jpeg2000_get_state(i + 1, j - 1, width, HT_SHIFT_SCAN, block_states) * causal_cond; + local_mbr |= jpeg2000_get_state(i + 1, j + 0, width, HT_SHIFT_REF, block_states) * + jpeg2000_get_state(i + 1, j + 0, width, HT_SHIFT_SCAN, block_states) * causal_cond; + local_mbr |= jpeg2000_get_state(i + 1, j + 1, width, HT_SHIFT_REF, block_states) * + jpeg2000_get_state(i + 1, j + 1, width, HT_SHIFT_SCAN, block_states) * causal_cond; + + *mbr |= local_mbr; +} + +static void jpeg2000_process_stripes_block(StateVars *sig_prop, int i_s, int j_s, + int width, int height, int stride, int pLSB, + int32_t *sample_buf, uint8_t *block_states, + uint8_t *magref_segment, uint32_t magref_length) +{ + for (int j = j_s; j < j_s + width; j++) { + uint32_t mbr_info = 0; + for (int i = i_s; i < i_s + height; i++) { + int modify_state, cond; + uint8_t bit; + uint8_t causal_cond = i != (i_s + height - 1); + int32_t *sp = &sample_buf[j + (i * (stride - 2))]; + uint8_t mbr = 0; + + if (jpeg2000_get_state(i, j, stride - 2, HT_SHIFT_SIGMA, block_states) == 0) + jpeg2000_calc_mbr(&mbr, i, j, mbr_info & 0x1EF, causal_cond, block_states, stride - 2); + mbr_info >>= 3; + cond = mbr != 0; + bit = jpeg2000_peek_bit(sig_prop, magref_segment, magref_length); + *sp |= (bit * cond) << pLSB; + sig_prop->bits -= cond; + modify_state = (((1 << HT_SHIFT_REF_IND) | (1 << HT_SHIFT_REF)) * cond) | 1 << HT_SHIFT_SCAN; + jpeg2000_modify_state(i, j, stride - 2, modify_state, block_states); + } + } +} + +/** + * See procedure decodeSigPropMag at Rec. ITU-T T.814, 7.4. +*/ +av_noinline +static void jpeg2000_decode_sigprop_segment(Jpeg2000Cblk *cblk, uint16_t width, + uint16_t height, uint8_t *magref_segment, + uint32_t magref_length, uint8_t pLSB, + int32_t *sample_buf, uint8_t *block_states) +{ + StateVars sp_dec; + + const uint16_t num_v_stripe = height / 4; + const uint16_t num_h_stripe = width / 4; + int b_width = 4; + int b_height = 4; + int stride = width + 2; + + int last_width; + uint16_t i = 0, j = 0; + + jpeg2000_init_zero(&sp_dec); + + for (int n1 = 0; n1 < num_v_stripe; n1++) { + j = 0; + for (int n2 = 0; n2 < num_h_stripe; n2++) { + jpeg2000_process_stripes_block(&sp_dec, i, j, b_width, b_height, stride, + pLSB, sample_buf, block_states, magref_segment, + magref_length); + j += 4; + } + last_width = width % 4; + if (last_width) + jpeg2000_process_stripes_block(&sp_dec, i, j, last_width, b_height, stride, + pLSB, sample_buf, block_states, magref_segment, + magref_length); + i += 4; + } + + /* Decode remaining height stripes */ + b_height = height % 4; + j = 0; + for (int n2 = 0; n2 < num_h_stripe; n2++) { + jpeg2000_process_stripes_block(&sp_dec, i, j, b_width, b_height, stride, + pLSB, sample_buf, block_states, magref_segment, + magref_length); + j += 4; + } + last_width = width % 4; + if (last_width) + jpeg2000_process_stripes_block(&sp_dec, i, j, last_width, b_height, stride, + pLSB, sample_buf, block_states, magref_segment, + magref_length); +} + +/** + * See procedure decodeSigPropMag at Rec. ITU-T T.814, 7.5. +*/ +static int +jpeg2000_decode_magref_segment(Jpeg2000Cblk *cblk, uint16_t width, uint16_t block_height, uint8_t *magref_segment, + uint32_t magref_length, uint8_t pLSB, int32_t *sample_buf, uint8_t *block_states) +{ + + StateVars mag_ref = { 0 }; + const uint16_t num_v_stripe = block_height / 4; + uint16_t height = 4; + uint16_t i_start = 0; + int32_t *sp; + + jpeg2000_init_mag_ref(&mag_ref, magref_length); + + for (int n1 = 0; n1 < num_v_stripe; n1++) { + for (int j = 0; j < width; j++) { + for (int i = i_start; i < i_start + height; i++) { + /** + * We move column wise, going from one quad to another. See + * Rec. ITU-T T.814, Figure 7. + */ + sp = &sample_buf[j + i * width]; + if (jpeg2000_get_state(i, j, width, HT_SHIFT_SIGMA, block_states) != 0) { + jpeg2000_modify_state(i, j, width, 1 << HT_SHIFT_REF_IND, block_states); + *sp |= jpeg2000_import_magref_bit(&mag_ref, magref_segment, magref_length) << pLSB; + } + } + } + i_start += 4; + } + height = block_height % 4; + for (int j = 0; j < width; j++) { + for (int i = i_start; i < i_start + height; i++) { + sp = &sample_buf[j + i * width]; + if (jpeg2000_get_state(i, j, width, HT_SHIFT_SIGMA, block_states) != 0) { + jpeg2000_modify_state(i, j, width, 1 << HT_SHIFT_REF_IND, block_states); + *sp |= jpeg2000_import_magref_bit(&mag_ref, magref_segment, magref_length) << pLSB; + } + } + } + return 1; +} + + +int +ff_jpeg2000_decode_htj2k(const Jpeg2000DecoderContext *s, Jpeg2000CodingStyle *codsty, Jpeg2000T1Context *t1, Jpeg2000Cblk *cblk, + int width, int height, int magp, uint8_t roi_shift) +{ + uint8_t p0 = 0; // Number of placeholder passes + uint32_t Lcup; // Length of HT cleanup segment + uint32_t Lref; // Length of Refinement segment + uint32_t Scup; // HT cleanup segment suffix length + uint32_t Pcup; // HT cleanup segment prefix length + + uint8_t S_blk; // Number of skipped magnitude bitplanes + uint8_t pLSB; + + uint8_t *Dcup; // Byte of an HT cleanup segment + uint8_t *Dref; // Byte of an HT refinement segment + + int z_blk; // Number of ht coding pass + + uint8_t empty_passes; + + StateVars mag_sgn; // Magnitude and Sign + StateVars mel; // Adaptive run-length coding + StateVars vlc; // Variable Length coding + StateVars sig_prop; // Significance propagation + + MelDecoderState mel_state; + + int ret; + + /* Temporary buffers */ + int32_t *sample_buf; + uint8_t *block_states; + + int32_t n, val; // Post-processing + + int32_t M_b = magp; + + /* codeblock size as constrained by Rec. ITU-T T.800, Table A.18 */ + av_assert0(width <= 1024U && height <= 1024U); + av_assert0(width * height <= 4096); + av_assert0(width * height > 0); + + memset(t1->data, 0, t1->stride * height * sizeof(*t1->data)); + memset(t1->flags, 0, t1->stride * (height + 2) * sizeof(*t1->flags)); + + if (cblk->npasses == 0) + return 0; + + if (cblk->npasses > 3) + p0 = 0; + else if (cblk->length == 0) + p0 = 1; + + empty_passes = p0 * 3; + z_blk = cblk->npasses - empty_passes; + + if (z_blk <= 0) + return 0; // No passes within this set, continue + + Lcup = cblk->pass_lengths[0]; + Lref = cblk->pass_lengths[1]; + + if (Lcup < 2) { + av_log(s->avctx, AV_LOG_ERROR, + "Cleanup pass length must be at least 2 bytes in length\n"); + return AVERROR_INVALIDDATA; + } + Dcup = cblk->data; + Dref = cblk->data + Lcup; // Dref comes after the refinement segment + S_blk = p0 + cblk->zbp; + pLSB = 30 - S_blk; + + Scup = (Dcup[Lcup - 1] << 4) + (Dcup[Lcup - 2] & 0x0F); + + if (Scup < 2 || Scup > Lcup || Scup > 4079) { + av_log(s->avctx, AV_LOG_ERROR, "Cleanup pass suffix length is invalid %d\n", + Scup); + ret = AVERROR_INVALIDDATA; + goto free; + } + Pcup = Lcup - Scup; + + /* modDcup shall be done before the creation of vlc instance. */ + Dcup[Lcup - 1] = 0xFF; + Dcup[Lcup - 2] |= 0x0F; + + /* Magnitude and refinement */ + jpeg2000_init_zero(&mag_sgn); + jpeg2000_bitbuf_refill_forward(&mag_sgn, Dcup, Pcup); + + /* Significance propagation */ + jpeg2000_init_zero(&sig_prop); + + /* Adaptive run length */ + jpeg2000_init_mel(&mel, Pcup); + + /* Variable Length coding */ + jpeg2000_init_vlc(&vlc, Lcup, Pcup, Dcup); + + jpeg2000_init_mel_decoder(&mel_state); + + sample_buf = av_calloc((width + 4) * (height + 4), sizeof(int32_t)); + block_states = av_calloc((width + 4) * (height + 4), sizeof(uint8_t)); + + if (!sample_buf || !block_states) { + ret = AVERROR(ENOMEM); + goto free; + } + if ((ret = jpeg2000_decode_ht_cleanup_segment(s, cblk, t1, &mel_state, &mel, &vlc, + &mag_sgn, Dcup, Lcup, Pcup, pLSB, width, + height, sample_buf, block_states)) < 0) + goto free; + + if (cblk->npasses > 1) + jpeg2000_decode_sigprop_segment(cblk, width, height, Dref, Lref, + pLSB - 1, sample_buf, block_states); + + if (cblk->npasses > 2) + if ((ret = jpeg2000_decode_magref_segment(cblk, width, height, Dref, Lref, + pLSB - 1, sample_buf, block_states)) < 0) + goto free; + + pLSB = 31 - M_b; + + /* Reconstruct the sample values */ + for (int y = 0; y < height; y++) { + for (int x = 0; x < width; x++) { + n = x + (y * t1->stride); + val = sample_buf[x + (y * width)]; + /* Convert sign-magnitude to two's complement. */ + val = val >> 31 ? 0x80000000 - val : val; + val >>= (pLSB - 1); + t1->data[n] = val; + } + } +free: + av_freep(&sample_buf); + av_freep(&block_states); + return ret; +} + +/** + * CtxVLC tables (see Rec. ITU-T T.800, Annex C) as found at + * https://github.com/osamu620/OpenHTJ2K (author: Osamu Watanabe) + */ +static const uint16_t dec_cxt_vlc_table1[1024] = { + 0x0016, 0x006A, 0x0046, 0x00DD, 0x0086, 0x888B, 0x0026, 0x444D, 0x0016, 0x00AA, 0x0046, 0x88AD, 0x0086, + 0x003A, 0x0026, 0x00DE, 0x0016, 0x00CA, 0x0046, 0x009D, 0x0086, 0x005A, 0x0026, 0x222D, 0x0016, 0x009A, + 0x0046, 0x007D, 0x0086, 0x01FD, 0x0026, 0x007E, 0x0016, 0x006A, 0x0046, 0x88CD, 0x0086, 0x888B, 0x0026, + 0x111D, 0x0016, 0x00AA, 0x0046, 0x005D, 0x0086, 0x003A, 0x0026, 0x00EE, 0x0016, 0x00CA, 0x0046, 0x00BD, + 0x0086, 0x005A, 0x0026, 0x11FF, 0x0016, 0x009A, 0x0046, 0x003D, 0x0086, 0x04ED, 0x0026, 0x2AAF, 0x0016, + 0x006A, 0x0046, 0x00DD, 0x0086, 0x888B, 0x0026, 0x444D, 0x0016, 0x00AA, 0x0046, 0x88AD, 0x0086, 0x003A, + 0x0026, 0x44EF, 0x0016, 0x00CA, 0x0046, 0x009D, 0x0086, 0x005A, 0x0026, 0x222D, 0x0016, 0x009A, 0x0046, + 0x007D, 0x0086, 0x01FD, 0x0026, 0x00BE, 0x0016, 0x006A, 0x0046, 0x88CD, 0x0086, 0x888B, 0x0026, 0x111D, + 0x0016, 0x00AA, 0x0046, 0x005D, 0x0086, 0x003A, 0x0026, 0x4CCF, 0x0016, 0x00CA, 0x0046, 0x00BD, 0x0086, + 0x005A, 0x0026, 0x00FE, 0x0016, 0x009A, 0x0046, 0x003D, 0x0086, 0x04ED, 0x0026, 0x006F, 0x0002, 0x0088, + 0x0002, 0x005C, 0x0002, 0x0018, 0x0002, 0x00DE, 0x0002, 0x0028, 0x0002, 0x009C, 0x0002, 0x004A, 0x0002, + 0x007E, 0x0002, 0x0088, 0x0002, 0x00CC, 0x0002, 0x0018, 0x0002, 0x888F, 0x0002, 0x0028, 0x0002, 0x00FE, + 0x0002, 0x003A, 0x0002, 0x222F, 0x0002, 0x0088, 0x0002, 0x04FD, 0x0002, 0x0018, 0x0002, 0x00BE, 0x0002, + 0x0028, 0x0002, 0x00BF, 0x0002, 0x004A, 0x0002, 0x006E, 0x0002, 0x0088, 0x0002, 0x00AC, 0x0002, 0x0018, + 0x0002, 0x444F, 0x0002, 0x0028, 0x0002, 0x00EE, 0x0002, 0x003A, 0x0002, 0x113F, 0x0002, 0x0088, 0x0002, + 0x005C, 0x0002, 0x0018, 0x0002, 0x00CF, 0x0002, 0x0028, 0x0002, 0x009C, 0x0002, 0x004A, 0x0002, 0x006F, + 0x0002, 0x0088, 0x0002, 0x00CC, 0x0002, 0x0018, 0x0002, 0x009F, 0x0002, 0x0028, 0x0002, 0x00EF, 0x0002, + 0x003A, 0x0002, 0x233F, 0x0002, 0x0088, 0x0002, 0x04FD, 0x0002, 0x0018, 0x0002, 0x00AF, 0x0002, 0x0028, + 0x0002, 0x44FF, 0x0002, 0x004A, 0x0002, 0x005F, 0x0002, 0x0088, 0x0002, 0x00AC, 0x0002, 0x0018, 0x0002, + 0x007F, 0x0002, 0x0028, 0x0002, 0x00DF, 0x0002, 0x003A, 0x0002, 0x111F, 0x0002, 0x0028, 0x0002, 0x005C, + 0x0002, 0x008A, 0x0002, 0x00BF, 0x0002, 0x0018, 0x0002, 0x00FE, 0x0002, 0x00CC, 0x0002, 0x007E, 0x0002, + 0x0028, 0x0002, 0x8FFF, 0x0002, 0x004A, 0x0002, 0x007F, 0x0002, 0x0018, 0x0002, 0x00DF, 0x0002, 0x00AC, + 0x0002, 0x133F, 0x0002, 0x0028, 0x0002, 0x222D, 0x0002, 0x008A, 0x0002, 0x00BE, 0x0002, 0x0018, 0x0002, + 0x44EF, 0x0002, 0x2AAD, 0x0002, 0x006E, 0x0002, 0x0028, 0x0002, 0x15FF, 0x0002, 0x004A, 0x0002, 0x009E, + 0x0002, 0x0018, 0x0002, 0x00CF, 0x0002, 0x003C, 0x0002, 0x223F, 0x0002, 0x0028, 0x0002, 0x005C, 0x0002, + 0x008A, 0x0002, 0x2BBF, 0x0002, 0x0018, 0x0002, 0x04EF, 0x0002, 0x00CC, 0x0002, 0x006F, 0x0002, 0x0028, + 0x0002, 0x27FF, 0x0002, 0x004A, 0x0002, 0x009F, 0x0002, 0x0018, 0x0002, 0x00DE, 0x0002, 0x00AC, 0x0002, + 0x444F, 0x0002, 0x0028, 0x0002, 0x222D, 0x0002, 0x008A, 0x0002, 0x8AAF, 0x0002, 0x0018, 0x0002, 0x00EE, + 0x0002, 0x2AAD, 0x0002, 0x005F, 0x0002, 0x0028, 0x0002, 0x44FF, 0x0002, 0x004A, 0x0002, 0x888F, 0x0002, + 0x0018, 0x0002, 0xAAAF, 0x0002, 0x003C, 0x0002, 0x111F, 0x0004, 0x8FFD, 0x0028, 0x005C, 0x0004, 0x00BC, + 0x008A, 0x66FF, 0x0004, 0x00CD, 0x0018, 0x111D, 0x0004, 0x009C, 0x003A, 0x8AAF, 0x0004, 0x00FC, 0x0028, + 0x133D, 0x0004, 0x00AC, 0x004A, 0x3BBF, 0x0004, 0x2BBD, 0x0018, 0x5FFF, 0x0004, 0x006C, 0x157D, 0x455F, + 0x0004, 0x2FFD, 0x0028, 0x222D, 0x0004, 0x22AD, 0x008A, 0x44EF, 0x0004, 0x00CC, 0x0018, 0x4FFF, 0x0004, + 0x007C, 0x003A, 0x447F, 0x0004, 0x04DD, 0x0028, 0x233D, 0x0004, 0x009D, 0x004A, 0x00DE, 0x0004, 0x88BD, + 0x0018, 0xAFFF, 0x0004, 0x115D, 0x1FFD, 0x444F, 0x0004, 0x8FFD, 0x0028, 0x005C, 0x0004, 0x00BC, 0x008A, + 0x8CEF, 0x0004, 0x00CD, 0x0018, 0x111D, 0x0004, 0x009C, 0x003A, 0x888F, 0x0004, 0x00FC, 0x0028, 0x133D, + 0x0004, 0x00AC, 0x004A, 0x44DF, 0x0004, 0x2BBD, 0x0018, 0x8AFF, 0x0004, 0x006C, 0x157D, 0x006F, 0x0004, + 0x2FFD, 0x0028, 0x222D, 0x0004, 0x22AD, 0x008A, 0x00EE, 0x0004, 0x00CC, 0x0018, 0x2EEF, 0x0004, 0x007C, + 0x003A, 0x277F, 0x0004, 0x04DD, 0x0028, 0x233D, 0x0004, 0x009D, 0x004A, 0x1BBF, 0x0004, 0x88BD, 0x0018, + 0x37FF, 0x0004, 0x115D, 0x1FFD, 0x333F, 0x0002, 0x0088, 0x0002, 0x02ED, 0x0002, 0x00CA, 0x0002, 0x4CCF, + 0x0002, 0x0048, 0x0002, 0x23FF, 0x0002, 0x001A, 0x0002, 0x888F, 0x0002, 0x0088, 0x0002, 0x006C, 0x0002, + 0x002A, 0x0002, 0x00AF, 0x0002, 0x0048, 0x0002, 0x22EF, 0x0002, 0x00AC, 0x0002, 0x005F, 0x0002, 0x0088, + 0x0002, 0x444D, 0x0002, 0x00CA, 0x0002, 0xCCCF, 0x0002, 0x0048, 0x0002, 0x00FE, 0x0002, 0x001A, 0x0002, + 0x006F, 0x0002, 0x0088, 0x0002, 0x005C, 0x0002, 0x002A, 0x0002, 0x009F, 0x0002, 0x0048, 0x0002, 0x00DF, + 0x0002, 0x03FD, 0x0002, 0x222F, 0x0002, 0x0088, 0x0002, 0x02ED, 0x0002, 0x00CA, 0x0002, 0x8CCF, 0x0002, + 0x0048, 0x0002, 0x11FF, 0x0002, 0x001A, 0x0002, 0x007E, 0x0002, 0x0088, 0x0002, 0x006C, 0x0002, 0x002A, + 0x0002, 0x007F, 0x0002, 0x0048, 0x0002, 0x00EE, 0x0002, 0x00AC, 0x0002, 0x003E, 0x0002, 0x0088, 0x0002, + 0x444D, 0x0002, 0x00CA, 0x0002, 0x00BE, 0x0002, 0x0048, 0x0002, 0x00BF, 0x0002, 0x001A, 0x0002, 0x003F, + 0x0002, 0x0088, 0x0002, 0x005C, 0x0002, 0x002A, 0x0002, 0x009E, 0x0002, 0x0048, 0x0002, 0x00DE, 0x0002, + 0x03FD, 0x0002, 0x111F, 0x0004, 0x8AED, 0x0048, 0x888D, 0x0004, 0x00DC, 0x00CA, 0x3FFF, 0x0004, 0xCFFD, + 0x002A, 0x003D, 0x0004, 0x00BC, 0x005A, 0x8DDF, 0x0004, 0x8FFD, 0x0048, 0x006C, 0x0004, 0x027D, 0x008A, + 0x99FF, 0x0004, 0x00EC, 0x00FA, 0x003C, 0x0004, 0x00AC, 0x001A, 0x009F, 0x0004, 0x2FFD, 0x0048, 0x007C, + 0x0004, 0x44CD, 0x00CA, 0x67FF, 0x0004, 0x1FFD, 0x002A, 0x444D, 0x0004, 0x00AD, 0x005A, 0x8CCF, 0x0004, + 0x4FFD, 0x0048, 0x445D, 0x0004, 0x01BD, 0x008A, 0x4EEF, 0x0004, 0x45DD, 0x00FA, 0x111D, 0x0004, 0x009C, + 0x001A, 0x222F, 0x0004, 0x8AED, 0x0048, 0x888D, 0x0004, 0x00DC, 0x00CA, 0xAFFF, 0x0004, 0xCFFD, 0x002A, + 0x003D, 0x0004, 0x00BC, 0x005A, 0x11BF, 0x0004, 0x8FFD, 0x0048, 0x006C, 0x0004, 0x027D, 0x008A, 0x22EF, + 0x0004, 0x00EC, 0x00FA, 0x003C, 0x0004, 0x00AC, 0x001A, 0x227F, 0x0004, 0x2FFD, 0x0048, 0x007C, 0x0004, + 0x44CD, 0x00CA, 0x5DFF, 0x0004, 0x1FFD, 0x002A, 0x444D, 0x0004, 0x00AD, 0x005A, 0x006F, 0x0004, 0x4FFD, + 0x0048, 0x445D, 0x0004, 0x01BD, 0x008A, 0x11DF, 0x0004, 0x45DD, 0x00FA, 0x111D, 0x0004, 0x009C, 0x001A, + 0x155F, 0x0006, 0x00FC, 0x0018, 0x111D, 0x0048, 0x888D, 0x00AA, 0x4DDF, 0x0006, 0x2AAD, 0x005A, 0x67FF, + 0x0028, 0x223D, 0x00BC, 0xAAAF, 0x0006, 0x00EC, 0x0018, 0x5FFF, 0x0048, 0x006C, 0x008A, 0xCCCF, 0x0006, + 0x009D, 0x00CA, 0x44EF, 0x0028, 0x003C, 0x8FFD, 0x137F, 0x0006, 0x8EED, 0x0018, 0x1FFF, 0x0048, 0x007C, + 0x00AA, 0x4CCF, 0x0006, 0x227D, 0x005A, 0x1DDF, 0x0028, 0x444D, 0x4FFD, 0x155F, 0x0006, 0x00DC, 0x0018, + 0x2EEF, 0x0048, 0x445D, 0x008A, 0x22BF, 0x0006, 0x009C, 0x00CA, 0x8CDF, 0x0028, 0x222D, 0x2FFD, 0x226F, + 0x0006, 0x00FC, 0x0018, 0x111D, 0x0048, 0x888D, 0x00AA, 0x1BBF, 0x0006, 0x2AAD, 0x005A, 0x33FF, 0x0028, + 0x223D, 0x00BC, 0x8AAF, 0x0006, 0x00EC, 0x0018, 0x9BFF, 0x0048, 0x006C, 0x008A, 0x8ABF, 0x0006, 0x009D, + 0x00CA, 0x4EEF, 0x0028, 0x003C, 0x8FFD, 0x466F, 0x0006, 0x8EED, 0x0018, 0xCFFF, 0x0048, 0x007C, 0x00AA, + 0x8CCF, 0x0006, 0x227D, 0x005A, 0xAEEF, 0x0028, 0x444D, 0x4FFD, 0x477F, 0x0006, 0x00DC, 0x0018, 0xAFFF, + 0x0048, 0x445D, 0x008A, 0x2BBF, 0x0006, 0x009C, 0x00CA, 0x44DF, 0x0028, 0x222D, 0x2FFD, 0x133F, 0x00F6, + 0xAFFD, 0x1FFB, 0x003C, 0x0008, 0x23BD, 0x007A, 0x11DF, 0x00F6, 0x45DD, 0x2FFB, 0x4EEF, 0x00DA, 0x177D, + 0xCFFD, 0x377F, 0x00F6, 0x3FFD, 0x8FFB, 0x111D, 0x0008, 0x009C, 0x005A, 0x1BBF, 0x00F6, 0x00CD, 0x00BA, + 0x8DDF, 0x4FFB, 0x006C, 0x9BFD, 0x455F, 0x00F6, 0x67FD, 0x1FFB, 0x002C, 0x0008, 0x00AC, 0x007A, 0x009F, + 0x00F6, 0x00AD, 0x2FFB, 0x7FFF, 0x00DA, 0x004C, 0x5FFD, 0x477F, 0x00F6, 0x00EC, 0x8FFB, 0x001C, 0x0008, + 0x008C, 0x005A, 0x888F, 0x00F6, 0x00CC, 0x00BA, 0x2EEF, 0x4FFB, 0x115D, 0x8AED, 0x113F, 0x00F6, 0xAFFD, + 0x1FFB, 0x003C, 0x0008, 0x23BD, 0x007A, 0x1DDF, 0x00F6, 0x45DD, 0x2FFB, 0xBFFF, 0x00DA, 0x177D, 0xCFFD, + 0x447F, 0x00F6, 0x3FFD, 0x8FFB, 0x111D, 0x0008, 0x009C, 0x005A, 0x277F, 0x00F6, 0x00CD, 0x00BA, 0x22EF, + 0x4FFB, 0x006C, 0x9BFD, 0x444F, 0x00F6, 0x67FD, 0x1FFB, 0x002C, 0x0008, 0x00AC, 0x007A, 0x11BF, 0x00F6, + 0x00AD, 0x2FFB, 0xFFFF, 0x00DA, 0x004C, 0x5FFD, 0x233F, 0x00F6, 0x00EC, 0x8FFB, 0x001C, 0x0008, 0x008C, + 0x005A, 0x006F, 0x00F6, 0x00CC, 0x00BA, 0x8BBF, 0x4FFB, 0x115D, 0x8AED, 0x222F}; + +static const uint16_t dec_cxt_vlc_table0[1024] = { + 0x0026, 0x00AA, 0x0046, 0x006C, 0x0086, 0x8AED, 0x0018, 0x8DDF, 0x0026, 0x01BD, 0x0046, 0x5FFF, 0x0086, + 0x027D, 0x005A, 0x155F, 0x0026, 0x003A, 0x0046, 0x444D, 0x0086, 0x4CCD, 0x0018, 0xCCCF, 0x0026, 0x2EFD, + 0x0046, 0x99FF, 0x0086, 0x009C, 0x00CA, 0x133F, 0x0026, 0x00AA, 0x0046, 0x445D, 0x0086, 0x8CCD, 0x0018, + 0x11DF, 0x0026, 0x4FFD, 0x0046, 0xCFFF, 0x0086, 0x009D, 0x005A, 0x007E, 0x0026, 0x003A, 0x0046, 0x1FFF, + 0x0086, 0x88AD, 0x0018, 0x00BE, 0x0026, 0x8FFD, 0x0046, 0x4EEF, 0x0086, 0x888D, 0x00CA, 0x111F, 0x0026, + 0x00AA, 0x0046, 0x006C, 0x0086, 0x8AED, 0x0018, 0x45DF, 0x0026, 0x01BD, 0x0046, 0x22EF, 0x0086, 0x027D, + 0x005A, 0x227F, 0x0026, 0x003A, 0x0046, 0x444D, 0x0086, 0x4CCD, 0x0018, 0x11BF, 0x0026, 0x2EFD, 0x0046, + 0x00FE, 0x0086, 0x009C, 0x00CA, 0x223F, 0x0026, 0x00AA, 0x0046, 0x445D, 0x0086, 0x8CCD, 0x0018, 0x00DE, + 0x0026, 0x4FFD, 0x0046, 0xABFF, 0x0086, 0x009D, 0x005A, 0x006F, 0x0026, 0x003A, 0x0046, 0x6EFF, 0x0086, + 0x88AD, 0x0018, 0x2AAF, 0x0026, 0x8FFD, 0x0046, 0x00EE, 0x0086, 0x888D, 0x00CA, 0x222F, 0x0004, 0x00CA, + 0x0088, 0x027D, 0x0004, 0x4CCD, 0x0028, 0x00FE, 0x0004, 0x2AFD, 0x0048, 0x005C, 0x0004, 0x009D, 0x0018, + 0x00DE, 0x0004, 0x01BD, 0x0088, 0x006C, 0x0004, 0x88AD, 0x0028, 0x11DF, 0x0004, 0x8AED, 0x0048, 0x003C, + 0x0004, 0x888D, 0x0018, 0x111F, 0x0004, 0x00CA, 0x0088, 0x006D, 0x0004, 0x88CD, 0x0028, 0x88FF, 0x0004, + 0x8BFD, 0x0048, 0x444D, 0x0004, 0x009C, 0x0018, 0x00BE, 0x0004, 0x4EFD, 0x0088, 0x445D, 0x0004, 0x00AC, + 0x0028, 0x00EE, 0x0004, 0x45DD, 0x0048, 0x222D, 0x0004, 0x003D, 0x0018, 0x007E, 0x0004, 0x00CA, 0x0088, + 0x027D, 0x0004, 0x4CCD, 0x0028, 0x1FFF, 0x0004, 0x2AFD, 0x0048, 0x005C, 0x0004, 0x009D, 0x0018, 0x11BF, + 0x0004, 0x01BD, 0x0088, 0x006C, 0x0004, 0x88AD, 0x0028, 0x22EF, 0x0004, 0x8AED, 0x0048, 0x003C, 0x0004, + 0x888D, 0x0018, 0x227F, 0x0004, 0x00CA, 0x0088, 0x006D, 0x0004, 0x88CD, 0x0028, 0x4EEF, 0x0004, 0x8BFD, + 0x0048, 0x444D, 0x0004, 0x009C, 0x0018, 0x2AAF, 0x0004, 0x4EFD, 0x0088, 0x445D, 0x0004, 0x00AC, 0x0028, + 0x8DDF, 0x0004, 0x45DD, 0x0048, 0x222D, 0x0004, 0x003D, 0x0018, 0x155F, 0x0004, 0x005A, 0x0088, 0x006C, + 0x0004, 0x88DD, 0x0028, 0x23FF, 0x0004, 0x11FD, 0x0048, 0x444D, 0x0004, 0x00AD, 0x0018, 0x00BE, 0x0004, + 0x137D, 0x0088, 0x155D, 0x0004, 0x00CC, 0x0028, 0x00DE, 0x0004, 0x02ED, 0x0048, 0x111D, 0x0004, 0x009D, + 0x0018, 0x007E, 0x0004, 0x005A, 0x0088, 0x455D, 0x0004, 0x44CD, 0x0028, 0x00EE, 0x0004, 0x1FFD, 0x0048, + 0x003C, 0x0004, 0x00AC, 0x0018, 0x555F, 0x0004, 0x47FD, 0x0088, 0x113D, 0x0004, 0x02BD, 0x0028, 0x477F, + 0x0004, 0x4CDD, 0x0048, 0x8FFF, 0x0004, 0x009C, 0x0018, 0x222F, 0x0004, 0x005A, 0x0088, 0x006C, 0x0004, + 0x88DD, 0x0028, 0x00FE, 0x0004, 0x11FD, 0x0048, 0x444D, 0x0004, 0x00AD, 0x0018, 0x888F, 0x0004, 0x137D, + 0x0088, 0x155D, 0x0004, 0x00CC, 0x0028, 0x8CCF, 0x0004, 0x02ED, 0x0048, 0x111D, 0x0004, 0x009D, 0x0018, + 0x006F, 0x0004, 0x005A, 0x0088, 0x455D, 0x0004, 0x44CD, 0x0028, 0x1DDF, 0x0004, 0x1FFD, 0x0048, 0x003C, + 0x0004, 0x00AC, 0x0018, 0x227F, 0x0004, 0x47FD, 0x0088, 0x113D, 0x0004, 0x02BD, 0x0028, 0x22BF, 0x0004, + 0x4CDD, 0x0048, 0x22EF, 0x0004, 0x009C, 0x0018, 0x233F, 0x0006, 0x4DDD, 0x4FFB, 0xCFFF, 0x0018, 0x113D, + 0x005A, 0x888F, 0x0006, 0x23BD, 0x008A, 0x00EE, 0x002A, 0x155D, 0xAAFD, 0x277F, 0x0006, 0x44CD, 0x8FFB, + 0x44EF, 0x0018, 0x467D, 0x004A, 0x2AAF, 0x0006, 0x00AC, 0x555B, 0x99DF, 0x1FFB, 0x003C, 0x5FFD, 0x266F, + 0x0006, 0x1DDD, 0x4FFB, 0x6EFF, 0x0018, 0x177D, 0x005A, 0x1BBF, 0x0006, 0x88AD, 0x008A, 0x5DDF, 0x002A, + 0x444D, 0x2FFD, 0x667F, 0x0006, 0x00CC, 0x8FFB, 0x2EEF, 0x0018, 0x455D, 0x004A, 0x119F, 0x0006, 0x009C, + 0x555B, 0x8CCF, 0x1FFB, 0x111D, 0x8CED, 0x006E, 0x0006, 0x4DDD, 0x4FFB, 0x3FFF, 0x0018, 0x113D, 0x005A, + 0x11BF, 0x0006, 0x23BD, 0x008A, 0x8DDF, 0x002A, 0x155D, 0xAAFD, 0x222F, 0x0006, 0x44CD, 0x8FFB, 0x00FE, + 0x0018, 0x467D, 0x004A, 0x899F, 0x0006, 0x00AC, 0x555B, 0x00DE, 0x1FFB, 0x003C, 0x5FFD, 0x446F, 0x0006, + 0x1DDD, 0x4FFB, 0x9BFF, 0x0018, 0x177D, 0x005A, 0x00BE, 0x0006, 0x88AD, 0x008A, 0xCDDF, 0x002A, 0x444D, + 0x2FFD, 0x007E, 0x0006, 0x00CC, 0x8FFB, 0x4EEF, 0x0018, 0x455D, 0x004A, 0x377F, 0x0006, 0x009C, 0x555B, + 0x8BBF, 0x1FFB, 0x111D, 0x8CED, 0x233F, 0x0004, 0x00AA, 0x0088, 0x047D, 0x0004, 0x01DD, 0x0028, 0x11DF, + 0x0004, 0x27FD, 0x0048, 0x005C, 0x0004, 0x8AAD, 0x0018, 0x2BBF, 0x0004, 0x009C, 0x0088, 0x006C, 0x0004, + 0x00CC, 0x0028, 0x00EE, 0x0004, 0x8CED, 0x0048, 0x222D, 0x0004, 0x888D, 0x0018, 0x007E, 0x0004, 0x00AA, + 0x0088, 0x006D, 0x0004, 0x88CD, 0x0028, 0x00FE, 0x0004, 0x19FD, 0x0048, 0x003C, 0x0004, 0x2AAD, 0x0018, + 0xAAAF, 0x0004, 0x8BFD, 0x0088, 0x005D, 0x0004, 0x00BD, 0x0028, 0x4CCF, 0x0004, 0x44ED, 0x0048, 0x4FFF, + 0x0004, 0x223D, 0x0018, 0x111F, 0x0004, 0x00AA, 0x0088, 0x047D, 0x0004, 0x01DD, 0x0028, 0x99FF, 0x0004, + 0x27FD, 0x0048, 0x005C, 0x0004, 0x8AAD, 0x0018, 0x00BE, 0x0004, 0x009C, 0x0088, 0x006C, 0x0004, 0x00CC, + 0x0028, 0x00DE, 0x0004, 0x8CED, 0x0048, 0x222D, 0x0004, 0x888D, 0x0018, 0x444F, 0x0004, 0x00AA, 0x0088, + 0x006D, 0x0004, 0x88CD, 0x0028, 0x2EEF, 0x0004, 0x19FD, 0x0048, 0x003C, 0x0004, 0x2AAD, 0x0018, 0x447F, + 0x0004, 0x8BFD, 0x0088, 0x005D, 0x0004, 0x00BD, 0x0028, 0x009F, 0x0004, 0x44ED, 0x0048, 0x67FF, 0x0004, + 0x223D, 0x0018, 0x133F, 0x0006, 0x00CC, 0x008A, 0x9DFF, 0x2FFB, 0x467D, 0x1FFD, 0x99BF, 0x0006, 0x2AAD, + 0x002A, 0x66EF, 0x4FFB, 0x005C, 0x2EED, 0x377F, 0x0006, 0x89BD, 0x004A, 0x00FE, 0x8FFB, 0x006C, 0x67FD, + 0x889F, 0x0006, 0x888D, 0x001A, 0x5DDF, 0x00AA, 0x222D, 0x89DD, 0x444F, 0x0006, 0x2BBD, 0x008A, 0xCFFF, + 0x2FFB, 0x226D, 0x009C, 0x00BE, 0x0006, 0xAAAD, 0x002A, 0x1DDF, 0x4FFB, 0x003C, 0x4DDD, 0x466F, 0x0006, + 0x8AAD, 0x004A, 0xAEEF, 0x8FFB, 0x445D, 0x8EED, 0x177F, 0x0006, 0x233D, 0x001A, 0x4CCF, 0x00AA, 0xAFFF, + 0x88CD, 0x133F, 0x0006, 0x00CC, 0x008A, 0x77FF, 0x2FFB, 0x467D, 0x1FFD, 0x3BBF, 0x0006, 0x2AAD, 0x002A, + 0x00EE, 0x4FFB, 0x005C, 0x2EED, 0x007E, 0x0006, 0x89BD, 0x004A, 0x4EEF, 0x8FFB, 0x006C, 0x67FD, 0x667F, + 0x0006, 0x888D, 0x001A, 0x00DE, 0x00AA, 0x222D, 0x89DD, 0x333F, 0x0006, 0x2BBD, 0x008A, 0x57FF, 0x2FFB, + 0x226D, 0x009C, 0x199F, 0x0006, 0xAAAD, 0x002A, 0x99DF, 0x4FFB, 0x003C, 0x4DDD, 0x155F, 0x0006, 0x8AAD, + 0x004A, 0xCEEF, 0x8FFB, 0x445D, 0x8EED, 0x277F, 0x0006, 0x233D, 0x001A, 0x1BBF, 0x00AA, 0x3FFF, 0x88CD, + 0x111F, 0x0006, 0x45DD, 0x2FFB, 0x111D, 0x0018, 0x467D, 0x8FFD, 0xCCCF, 0x0006, 0x19BD, 0x004A, 0x22EF, + 0x002A, 0x222D, 0x3FFD, 0x888F, 0x0006, 0x00CC, 0x008A, 0x00FE, 0x0018, 0x115D, 0xCFFD, 0x8AAF, 0x0006, + 0x00AC, 0x003A, 0x8CDF, 0x1FFB, 0x133D, 0x66FD, 0x466F, 0x0006, 0x8CCD, 0x2FFB, 0x5FFF, 0x0018, 0x006C, + 0x4FFD, 0xABBF, 0x0006, 0x22AD, 0x004A, 0x00EE, 0x002A, 0x233D, 0xAEFD, 0x377F, 0x0006, 0x2BBD, 0x008A, + 0x55DF, 0x0018, 0x005C, 0x177D, 0x119F, 0x0006, 0x009C, 0x003A, 0x4CCF, 0x1FFB, 0x333D, 0x8EED, 0x444F, + 0x0006, 0x45DD, 0x2FFB, 0x111D, 0x0018, 0x467D, 0x8FFD, 0x99BF, 0x0006, 0x19BD, 0x004A, 0x2EEF, 0x002A, + 0x222D, 0x3FFD, 0x667F, 0x0006, 0x00CC, 0x008A, 0x4EEF, 0x0018, 0x115D, 0xCFFD, 0x899F, 0x0006, 0x00AC, + 0x003A, 0x00DE, 0x1FFB, 0x133D, 0x66FD, 0x226F, 0x0006, 0x8CCD, 0x2FFB, 0x9BFF, 0x0018, 0x006C, 0x4FFD, + 0x00BE, 0x0006, 0x22AD, 0x004A, 0x1DDF, 0x002A, 0x233D, 0xAEFD, 0x007E, 0x0006, 0x2BBD, 0x008A, 0xCEEF, + 0x0018, 0x005C, 0x177D, 0x277F, 0x0006, 0x009C, 0x003A, 0x8BBF, 0x1FFB, 0x333D, 0x8EED, 0x455F, 0x1FF9, + 0x1DDD, 0xAFFB, 0x00DE, 0x8FF9, 0x001C, 0xFFFB, 0x477F, 0x4FF9, 0x177D, 0x3FFB, 0x3BBF, 0x2FF9, 0xAEEF, + 0x8EED, 0x444F, 0x1FF9, 0x22AD, 0x000A, 0x8BBF, 0x8FF9, 0x00FE, 0xCFFD, 0x007E, 0x4FF9, 0x115D, 0x5FFB, + 0x577F, 0x2FF9, 0x8DDF, 0x2EED, 0x333F, 0x1FF9, 0x2BBD, 0xAFFB, 0x88CF, 0x8FF9, 0xBFFF, 0xFFFB, 0x377F, + 0x4FF9, 0x006D, 0x3FFB, 0x00BE, 0x2FF9, 0x66EF, 0x9FFD, 0x133F, 0x1FF9, 0x009D, 0x000A, 0xABBF, 0x8FF9, + 0xDFFF, 0x6FFD, 0x006E, 0x4FF9, 0x002C, 0x5FFB, 0x888F, 0x2FF9, 0xCDDF, 0x4DDD, 0x222F, 0x1FF9, 0x1DDD, + 0xAFFB, 0x4CCF, 0x8FF9, 0x001C, 0xFFFB, 0x277F, 0x4FF9, 0x177D, 0x3FFB, 0x99BF, 0x2FF9, 0xCEEF, 0x8EED, + 0x004E, 0x1FF9, 0x22AD, 0x000A, 0x00AE, 0x8FF9, 0x7FFF, 0xCFFD, 0x005E, 0x4FF9, 0x115D, 0x5FFB, 0x009E, + 0x2FF9, 0x5DDF, 0x2EED, 0x003E, 0x1FF9, 0x2BBD, 0xAFFB, 0x00CE, 0x8FF9, 0xEFFF, 0xFFFB, 0x667F, 0x4FF9, + 0x006D, 0x3FFB, 0x8AAF, 0x2FF9, 0x00EE, 0x9FFD, 0x233F, 0x1FF9, 0x009D, 0x000A, 0x1BBF, 0x8FF9, 0x4EEF, + 0x6FFD, 0x455F, 0x4FF9, 0x002C, 0x5FFB, 0x008E, 0x2FF9, 0x99DF, 0x4DDD, 0x111F}; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/jpeg2000htdec.h b/arm/raspi/third_party/ffmpeg/libavcodec/jpeg2000htdec.h new file mode 100644 index 00000000..572d095c --- /dev/null +++ b/arm/raspi/third_party/ffmpeg/libavcodec/jpeg2000htdec.h @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2022 Caleb Etemesi + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_JPEG2000HTDEC_H +#define AVCODEC_JPEG2000HTDEC_H + +#include "jpeg2000dec.h" + +/** + * HT Block decoder as specified in Rec. ITU-T T.814 | ISO/IEC 15444-15 + */ + +int ff_jpeg2000_decode_htj2k(const Jpeg2000DecoderContext *s, Jpeg2000CodingStyle *codsty, + Jpeg2000T1Context *t1, Jpeg2000Cblk *cblk, int width, + int height, int magp, uint8_t roi_shift); + +#endif /* AVCODEC_JPEG2000HTDEC_H */ diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/jvdec.c b/arm/raspi/third_party/ffmpeg/libavcodec/jvdec.c index e0287a9c..13ede906 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/jvdec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/jvdec.c @@ -37,7 +37,9 @@ typedef struct JvContext { BlockDSPContext bdsp; AVFrame *frame; uint32_t palette[AVPALETTE_COUNT]; +#if FF_API_PALETTE_HAS_CHANGED int palette_has_changed; +#endif } JvContext; static av_cold int decode_init(AVCodecContext *avctx) @@ -207,14 +209,20 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, s->palette[i] = 0xFFU << 24 | pal << 2 | ((pal >> 4) & 0x30303); buf += 3; } +#if FF_API_PALETTE_HAS_CHANGED s->palette_has_changed = 1; +#endif } if (video_size) { - s->frame->key_frame = 1; + s->frame->flags |= AV_FRAME_FLAG_KEY; s->frame->pict_type = AV_PICTURE_TYPE_I; +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS s->frame->palette_has_changed = s->palette_has_changed; s->palette_has_changed = 0; +FF_ENABLE_DEPRECATION_WARNINGS +#endif memcpy(s->frame->data[1], s->palette, AVPALETTE_SIZE); if ((ret = av_frame_ref(rframe, s->frame)) < 0) diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/kmvc.c b/arm/raspi/third_party/ffmpeg/libavcodec/kmvc.c index 153cea03..83aba4b2 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/kmvc.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/kmvc.c @@ -273,7 +273,14 @@ static int decode_frame(AVCodecContext * avctx, AVFrame *frame, if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) return ret; - frame->palette_has_changed = ff_copy_palette(ctx->pal, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS + frame->palette_has_changed = +#endif + ff_copy_palette(ctx->pal, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_ENABLE_DEPRECATION_WARNINGS +#endif header = bytestream2_get_byte(&ctx->g); @@ -288,15 +295,19 @@ static int decode_frame(AVCodecContext * avctx, AVFrame *frame, } if (header & KMVC_KEYFRAME) { - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_I; } else { - frame->key_frame = 0; + frame->flags &= ~AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_P; } if (header & KMVC_PALETTE) { +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif // palette starts from index 1 and has 127 entries for (i = 1; i <= ctx->palsize; i++) { ctx->pal[i] = 0xFFU << 24 | bytestream2_get_be24(&ctx->g); @@ -305,7 +316,11 @@ static int decode_frame(AVCodecContext * avctx, AVFrame *frame, if (ctx->setpal) { ctx->setpal = 0; +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } /* make the palette available on the way out */ diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/lagarith.c b/arm/raspi/third_party/ffmpeg/libavcodec/lagarith.c index 78ccbc15..ebc1f761 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/lagarith.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/lagarith.c @@ -550,7 +550,7 @@ static int lag_decode_frame(AVCodecContext *avctx, AVFrame *p, int i, j, planes = 3; int ret = 0; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; p->pict_type = AV_PICTURE_TYPE_I; frametype = buf[0]; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/lcldec.c b/arm/raspi/third_party/ffmpeg/libavcodec/lcldec.c index 5cc0a29b..ed78d9d5 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/lcldec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/lcldec.c @@ -152,6 +152,8 @@ static int zlib_decomp(AVCodecContext *avctx, const uint8_t *src, int src_len, i if (expected != (unsigned int)zstream->total_out) { av_log(avctx, AV_LOG_ERROR, "Decoded size differs (%d != %lu)\n", expected, zstream->total_out); + if (expected > (unsigned int)zstream->total_out) + return (unsigned int)zstream->total_out; return AVERROR_UNKNOWN; } return zstream->total_out; @@ -169,8 +171,8 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, int row, col; unsigned char *encoded = avpkt->data, *outptr; uint8_t *y_out, *u_out, *v_out; - unsigned int width = avctx->width; // Real image width - unsigned int height = avctx->height; // Real image height + int width = avctx->width; // Real image width + int height = avctx->height; // Real image height unsigned int mszh_dlen; unsigned char yq, y1q, uq, vq; int uqvq, ret; @@ -219,7 +221,9 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, if (c->decomp_size != mszh_dlen) { av_log(avctx, AV_LOG_ERROR, "Decoded size differs (%d != %d)\n", c->decomp_size, mszh_dlen); - return AVERROR_INVALIDDATA; + if (c->decomp_size != mszh_dlen && + c->decomp_size != mszh_dlen + 2) // YUV420 306x306 is missing 2 bytes + return AVERROR_INVALIDDATA; } encoded = c->decomp_buf; len = mszh_dlen; @@ -276,12 +280,13 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, ret = zlib_decomp(avctx, buf + 8 + mthread_inlen, len - 8 - mthread_inlen, mthread_outlen, mthread_outlen); if (ret < 0) return ret; + len = c->decomp_size; } else { int ret = zlib_decomp(avctx, buf, len, 0, c->decomp_size); if (ret < 0) return ret; + len = ret; } encoded = c->decomp_buf; - len = c->decomp_size; break; #endif default: @@ -403,6 +408,11 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, v_out[ col >> 1 ] = *encoded++ + 128; v_out[(col >> 1) + 1] = *encoded++ + 128; } + if (col && col < width) { + u_out[ col >> 1 ] = u_out[(col>>1) - 1]; + v_out[ col >> 1 ] = v_out[(col>>1) - 1]; + } + y_out -= frame->linesize[0]; u_out -= frame->linesize[1]; v_out -= frame->linesize[2]; @@ -424,6 +434,10 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, u_out[col >> 2] = *encoded++ + 128; v_out[col >> 2] = *encoded++ + 128; } + if (col && col < width) { + u_out[col >> 2] = u_out[(col>>2) - 1]; + v_out[col >> 2] = v_out[(col>>2) - 1]; + } y_out -= frame->linesize[0]; u_out -= frame->linesize[1]; v_out -= frame->linesize[2]; @@ -464,7 +478,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, return AVERROR_INVALIDDATA; } - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_I; *got_frame = 1; @@ -481,6 +495,7 @@ static av_cold int decode_init(AVCodecContext *avctx) FFALIGN(avctx->height, 4); unsigned int max_decomp_size; int subsample_h, subsample_v; + int partial_h_supported = 0; if (avctx->extradata_size < 8) { av_log(avctx, AV_LOG_ERROR, "Extradata size too small.\n"); @@ -502,26 +517,24 @@ static av_cold int decode_init(AVCodecContext *avctx) av_log(avctx, AV_LOG_DEBUG, "Image type is YUV 1:1:1.\n"); break; case IMGTYPE_YUV422: - c->decomp_size = basesize * 2; + c->decomp_size = (avctx->width & ~3) * avctx->height * 2; max_decomp_size = max_basesize * 2; avctx->pix_fmt = AV_PIX_FMT_YUV422P; av_log(avctx, AV_LOG_DEBUG, "Image type is YUV 4:2:2.\n"); - if (avctx->width % 4) { - avpriv_request_sample(avctx, "Unsupported dimensions"); - return AVERROR_INVALIDDATA; - } + partial_h_supported = 1; break; case IMGTYPE_RGB24: - c->decomp_size = basesize * 3; + c->decomp_size = FFALIGN(avctx->width*3, 4) * avctx->height; max_decomp_size = max_basesize * 3; avctx->pix_fmt = AV_PIX_FMT_BGR24; av_log(avctx, AV_LOG_DEBUG, "Image type is RGB 24.\n"); break; case IMGTYPE_YUV411: - c->decomp_size = basesize / 2 * 3; + c->decomp_size = (avctx->width & ~3) * avctx->height / 2 * 3; max_decomp_size = max_basesize / 2 * 3; avctx->pix_fmt = AV_PIX_FMT_YUV411P; av_log(avctx, AV_LOG_DEBUG, "Image type is YUV 4:1:1.\n"); + partial_h_supported = 1; break; case IMGTYPE_YUV211: c->decomp_size = basesize * 2; @@ -541,7 +554,7 @@ static av_cold int decode_init(AVCodecContext *avctx) } av_pix_fmt_get_chroma_sub_sample(avctx->pix_fmt, &subsample_h, &subsample_v); - if (avctx->width % (1<height % (1<width % (1<height % (1<decoder, AOMD_GET_FRAME_FLAGS, &flags); if (ret == AOM_CODEC_OK) { - picture->key_frame = !!(flags & AOM_FRAME_IS_KEY); + if (flags & AOM_FRAME_IS_KEY) + picture->flags |= AV_FRAME_FLAG_KEY; + else + picture->flags &= ~AV_FRAME_FLAG_KEY; if (flags & (AOM_FRAME_IS_KEY | AOM_FRAME_IS_INTRAONLY)) picture->pict_type = AV_PICTURE_TYPE_I; else if (flags & AOM_FRAME_IS_SWITCH) diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/libaomenc.c b/arm/raspi/third_party/ffmpeg/libavcodec/libaomenc.c index 0b88102c..16747e7e 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/libaomenc.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/libaomenc.c @@ -1295,8 +1295,18 @@ static int aom_encode(AVCodecContext *avctx, AVPacket *pkt, if (frame->duration > ULONG_MAX) { av_log(avctx, AV_LOG_WARNING, "Frame duration too large: %"PRId64"\n", frame->duration); - } else - duration = frame->duration ? frame->duration : avctx->ticks_per_frame; + } else if (frame->duration) + duration = frame->duration; + else if (avctx->framerate.num > 0 && avctx->framerate.den > 0) + duration = av_rescale_q(1, av_inv_q(avctx->framerate), avctx->time_base); + else +FF_DISABLE_DEPRECATION_WARNINGS + duration = +#if FF_API_TICKS_PER_FRAME + avctx->ticks_per_frame ? avctx->ticks_per_frame : +#endif + 1; +FF_ENABLE_DEPRECATION_WARNINGS switch (frame->color_range) { case AVCOL_RANGE_MPEG: diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/libdav1d.c b/arm/raspi/third_party/ffmpeg/libavcodec/libdav1d.c index ddf2311a..c263157a 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/libdav1d.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/libdav1d.c @@ -30,6 +30,7 @@ #include "libavutil/opt.h" #include "atsc_a53.h" +#include "av1_parse.h" #include "avcodec.h" #include "bytestream.h" #include "codec_internal.h" @@ -154,12 +155,9 @@ static void libdav1d_init_params(AVCodecContext *c, const Dav1dSequenceHeader *s else c->pix_fmt = pix_fmt[seq->layout][seq->hbd]; - if (seq->num_units_in_tick && seq->time_scale) { - av_reduce(&c->framerate.den, &c->framerate.num, - seq->num_units_in_tick, seq->time_scale, INT_MAX); - if (seq->equal_picture_interval) - c->ticks_per_frame = seq->num_ticks_per_picture; - } + c->framerate = ff_av1_framerate(seq->num_ticks_per_picture, + (unsigned)seq->num_units_in_tick, + (unsigned)seq->time_scale); if (seq->film_grain_present) c->properties |= FF_CODEC_PROPERTY_FILM_GRAIN; @@ -278,6 +276,15 @@ static av_cold int libdav1d_init(AVCodecContext *c) if (res < 0) return AVERROR(ENOMEM); +#if FF_DAV1D_VERSION_AT_LEAST(6,7) + res = dav1d_get_frame_delay(&s); + if (res < 0) // Should not happen + return AVERROR_EXTERNAL; + + // When dav1d_get_frame_delay() returns 1, there's no delay whatsoever + c->delay = res > 1 ? res : 0; +#endif + return 0; } @@ -309,20 +316,14 @@ static void libdav1d_user_data_free(const uint8_t *data, void *opaque) { av_packet_free(&pkt); } -static int libdav1d_receive_frame(AVCodecContext *c, AVFrame *frame) +static int libdav1d_receive_frame_internal(AVCodecContext *c, Dav1dPicture *p) { Libdav1dContext *dav1d = c->priv_data; Dav1dData *data = &dav1d->data; - Dav1dPicture pic = { 0 }, *p = &pic; - AVPacket *pkt; - OpaqueData *od = NULL; -#if FF_DAV1D_VERSION_AT_LEAST(5,1) - enum Dav1dEventFlags event_flags = 0; -#endif int res; if (!data->sz) { - pkt = av_packet_alloc(); + AVPacket *pkt = av_packet_alloc(); if (!pkt) return AVERROR(ENOMEM); @@ -334,6 +335,8 @@ static int libdav1d_receive_frame(AVCodecContext *c, AVFrame *frame) } if (pkt->size) { + OpaqueData *od = NULL; + res = dav1d_data_wrap(data, pkt->data, pkt->size, libdav1d_data_free, pkt->buf); if (res < 0) { @@ -393,12 +396,31 @@ FF_ENABLE_DEPRECATION_WARNINGS if (res < 0) { if (res == AVERROR(EINVAL)) res = AVERROR_INVALIDDATA; - else if (res == AVERROR(EAGAIN) && c->internal->draining) - res = AVERROR_EOF; - - return res; + else if (res == AVERROR(EAGAIN)) + res = c->internal->draining ? AVERROR_EOF : 1; } + return res; +} + +static int libdav1d_receive_frame(AVCodecContext *c, AVFrame *frame) +{ + Libdav1dContext *dav1d = c->priv_data; + Dav1dPicture pic = { 0 }, *p = &pic; + AVPacket *pkt; + OpaqueData *od = NULL; +#if FF_DAV1D_VERSION_AT_LEAST(5,1) + enum Dav1dEventFlags event_flags = 0; +#endif + int res; + + do { + res = libdav1d_receive_frame_internal(c, p); + } while (res > 0); + + if (res < 0) + return res; + av_assert0(p->data[0] && p->allocator_data); // This requires the custom allocator above @@ -463,7 +485,10 @@ FF_ENABLE_DEPRECATION_WARNINGS goto fail; frame->pkt_dts = pkt->pts; - frame->key_frame = p->frame_hdr->frame_type == DAV1D_FRAME_TYPE_KEY; + if (p->frame_hdr->frame_type == DAV1D_FRAME_TYPE_KEY) + frame->flags |= AV_FRAME_FLAG_KEY; + else + frame->flags &= ~AV_FRAME_FLAG_KEY; switch (p->frame_hdr->frame_type) { case DAV1D_FRAME_TYPE_KEY: @@ -511,10 +536,16 @@ FF_ENABLE_DEPRECATION_WARNINGS light->MaxFALL = p->content_light->max_frame_average_light_level; } if (p->itut_t35) { +#if FF_DAV1D_VERSION_AT_LEAST(6,9) + for (size_t i = 0; i < p->n_itut_t35; i++) { + const Dav1dITUTT35 *itut_t35 = &p->itut_t35[i]; +#else + const Dav1dITUTT35 *itut_t35 = p->itut_t35; +#endif GetByteContext gb; int provider_code; - bytestream2_init(&gb, p->itut_t35->payload, p->itut_t35->payload_size); + bytestream2_init(&gb, itut_t35->payload, itut_t35->payload_size); provider_code = bytestream2_get_be16(&gb); switch (provider_code) { @@ -546,7 +577,7 @@ FF_ENABLE_DEPRECATION_WARNINGS int provider_oriented_code = bytestream2_get_be16(&gb); int application_identifier = bytestream2_get_byte(&gb); - if (p->itut_t35->country_code != 0xB5 || + if (itut_t35->country_code != 0xB5 || provider_oriented_code != 1 || application_identifier != 4) break; @@ -565,6 +596,9 @@ FF_ENABLE_DEPRECATION_WARNINGS default: // ignore unsupported provider codes break; } +#if FF_DAV1D_VERSION_AT_LEAST(6,9) + } +#endif } if (p->frame_hdr->film_grain.present && (!dav1d->apply_grain || (c->export_side_data & AV_CODEC_EXPORT_DATA_FILM_GRAIN))) { diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/libfdk-aacenc.c b/arm/raspi/third_party/ffmpeg/libavcodec/libfdk-aacenc.c index eb97e0fb..e08c6a0c 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/libfdk-aacenc.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/libfdk-aacenc.c @@ -55,6 +55,7 @@ typedef struct AACContext { int metadata_mode; AACENC_MetaData metaDataSetup; int delay_sent; + int frame_length; AudioFrameQueue afq; } AACContext; @@ -78,6 +79,7 @@ static const AVOption aac_enc_options[] = { { "comp_profile", "The desired compression profile for AAC DRC", offsetof(AACContext, comp_profile), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 256, AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM }, { "comp_target_ref", "Expected target reference level at decoder side in dB (for clipping prevention/limiter)", offsetof(AACContext, comp_target_ref), AV_OPT_TYPE_INT, { .i64 = 0.0 }, -31.75, 0, AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM }, { "prog_ref", "The program reference level or dialog level in dB", offsetof(AACContext, prog_ref), AV_OPT_TYPE_INT, { .i64 = 0.0 }, -31.75, 0, AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM }, + { "frame_length", "The desired frame length", offsetof(AACContext, frame_length), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 1024, AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM }, FF_AAC_PROFILE_OPTS { NULL } }; @@ -132,6 +134,44 @@ static int aac_encode_close(AVCodecContext *avctx) return 0; } +static void aac_encode_flush(AVCodecContext *avctx) +{ + AACContext *s = avctx->priv_data; + AACENC_BufDesc in_buf = { 0 }, out_buf = { 0 }; + AACENC_InArgs in_args = { 0 }; + AACENC_OutArgs out_args; + int64_t pts, duration; + uint8_t dummy_in[1], dummy_out[1]; + int in_buffer_identifiers[] = { IN_AUDIO_DATA, IN_METADATA_SETUP }; + int in_buffer_element_sizes[] = { 2, sizeof(AACENC_MetaData) }; + int in_buffer_sizes[] = { 0, sizeof(s->metaDataSetup) }; + int out_buffer_identifier = OUT_BITSTREAM_DATA; + int out_buffer_size = sizeof(dummy_out), out_buffer_element_size = 1; + void* inBuffer[] = { dummy_in, &s->metaDataSetup }; + void *out_ptr = dummy_out; + AACENC_ERROR err; + + ff_af_queue_remove(&s->afq, s->afq.frame_count, &pts, &duration); + + in_buf.bufs = (void **)inBuffer; + in_buf.numBufs = s->metadata_mode == 0 ? 1 : 2; + in_buf.bufferIdentifiers = in_buffer_identifiers; + in_buf.bufSizes = in_buffer_sizes; + in_buf.bufElSizes = in_buffer_element_sizes; + + out_buf.numBufs = 1; + out_buf.bufs = &out_ptr; + out_buf.bufferIdentifiers = &out_buffer_identifier; + out_buf.bufSizes = &out_buffer_size; + out_buf.bufElSizes = &out_buffer_element_size; + + err = aacEncEncode(s->handle, &in_buf, &out_buf, &in_args, &out_args); + if (err != AACENC_OK) { + av_log(avctx, AV_LOG_ERROR, "Unexpected error while flushing: %s\n", + aac_get_error(err)); + } +} + static av_cold int aac_encode_init(AVCodecContext *avctx) { AACContext *s = avctx->priv_data; @@ -166,6 +206,15 @@ static av_cold int aac_encode_init(AVCodecContext *avctx) } } + if (s->frame_length >= 0) { + if ((err = aacEncoder_SetParam(s->handle, AACENC_GRANULE_LENGTH, + s->frame_length)) != AACENC_OK) { + av_log(avctx, AV_LOG_ERROR, "Unable to set granule length: %s\n", + aac_get_error(err)); + goto error; + } + } + if ((err = aacEncoder_SetParam(s->handle, AACENC_SAMPLERATE, avctx->sample_rate)) != AACENC_OK) { av_log(avctx, AV_LOG_ERROR, "Unable to set the sample rate %d: %s\n", @@ -561,11 +610,13 @@ const FFCodec ff_libfdk_aac_encoder = { .p.type = AVMEDIA_TYPE_AUDIO, .p.id = AV_CODEC_ID_AAC, .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY | + AV_CODEC_CAP_ENCODER_FLUSH | AV_CODEC_CAP_SMALL_LAST_FRAME, .caps_internal = FF_CODEC_CAP_NOT_INIT_THREADSAFE, .priv_data_size = sizeof(AACContext), .init = aac_encode_init, FF_CODEC_ENCODE_CB(aac_encode_frame), + .flush = aac_encode_flush, .close = aac_encode_close, .p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE }, diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/libjxldec.c b/arm/raspi/third_party/ffmpeg/libavcodec/libjxldec.c index 045a1535..65966b7b 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/libjxldec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/libjxldec.c @@ -411,7 +411,7 @@ static int libjxl_decode_frame(AVCodecContext *avctx, AVFrame *frame, int *got_f /* full image is one frame, even if animated */ av_log(avctx, AV_LOG_DEBUG, "FULL_IMAGE event emitted\n"); frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; if (ctx->iccp) { AVFrameSideData *sd = av_frame_new_side_data_from_buf(frame, AV_FRAME_DATA_ICC_PROFILE, ctx->iccp); if (!sd) diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/libjxlenc.c b/arm/raspi/third_party/ffmpeg/libavcodec/libjxlenc.c index 897452f5..d707f3a6 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/libjxlenc.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/libjxlenc.c @@ -335,11 +335,11 @@ static int libjxl_encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFra break; case AVCOL_TRC_GAMMA22: jxl_color.transfer_function = JXL_TRANSFER_FUNCTION_GAMMA; - jxl_color.gamma = 2.2; + jxl_color.gamma = 1/2.2f; break; case AVCOL_TRC_GAMMA28: jxl_color.transfer_function = JXL_TRANSFER_FUNCTION_GAMMA; - jxl_color.gamma = 2.8; + jxl_color.gamma = 1/2.8f; break; default: if (pix_desc->flags & AV_PIX_FMT_FLAG_FLOAT) { diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/libkvazaar.c b/arm/raspi/third_party/ffmpeg/libavcodec/libkvazaar.c index 168486f4..2ef34dd8 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/libkvazaar.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/libkvazaar.c @@ -85,13 +85,14 @@ static av_cold int libkvazaar_init(AVCodecContext *avctx) cfg->framerate_num = avctx->framerate.num; cfg->framerate_denom = avctx->framerate.den; } else { - if (avctx->ticks_per_frame > INT_MAX / avctx->time_base.num) { - av_log(avctx, AV_LOG_ERROR, - "Could not set framerate for kvazaar: integer overflow\n"); - return AVERROR(EINVAL); - } cfg->framerate_num = avctx->time_base.den; - cfg->framerate_denom = avctx->time_base.num * avctx->ticks_per_frame; +FF_DISABLE_DEPRECATION_WARNINGS + cfg->framerate_denom = avctx->time_base.num +#if FF_API_TICKS_PER_FRAME + * avctx->ticks_per_frame +#endif + ; +FF_ENABLE_DEPRECATION_WARNINGS } cfg->target_bitrate = avctx->bit_rate; cfg->vui.sar_width = avctx->sample_aspect_ratio.num; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/libmp3lame.c b/arm/raspi/third_party/ffmpeg/libavcodec/libmp3lame.c index e119189f..312bc423 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/libmp3lame.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/libmp3lame.c @@ -55,6 +55,8 @@ typedef struct LAMEContext { float *samples_flt[2]; AudioFrameQueue afq; AVFloatDSPContext *fdsp; + int copyright; + int original; } LAMEContext; @@ -137,6 +139,12 @@ static av_cold int mp3lame_encode_init(AVCodecContext *avctx) /* bit reservoir usage */ lame_set_disable_reservoir(s->gfp, !s->reservoir); + /* copyright flag */ + lame_set_copyright(s->gfp, s->copyright); + + /* original flag */ + lame_set_original(s->gfp, s->original); + /* set specified parameters */ if (lame_init_params(s->gfp) < 0) { ret = AVERROR_EXTERNAL; @@ -303,9 +311,11 @@ static int mp3lame_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, #define OFFSET(x) offsetof(LAMEContext, x) #define AE AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM static const AVOption options[] = { - { "reservoir", "use bit reservoir", OFFSET(reservoir), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, AE }, - { "joint_stereo", "use joint stereo", OFFSET(joint_stereo), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, AE }, - { "abr", "use ABR", OFFSET(abr), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, AE }, + { "reservoir", "use bit reservoir", OFFSET(reservoir), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, AE }, + { "joint_stereo", "use joint stereo", OFFSET(joint_stereo), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, AE }, + { "abr", "use ABR", OFFSET(abr), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, AE }, + { "copyright", "set copyright flag", OFFSET(copyright), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, AE}, + { "original", "set original flag", OFFSET(original), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, AE}, { NULL }, }; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/libopenh264enc.c b/arm/raspi/third_party/ffmpeg/libavcodec/libopenh264enc.c index 8b4755f5..5b59af6f 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/libopenh264enc.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/libopenh264enc.c @@ -139,12 +139,13 @@ static av_cold int svc_encode_init(AVCodecContext *avctx) if (avctx->framerate.num > 0 && avctx->framerate.den > 0) { param.fMaxFrameRate = av_q2d(avctx->framerate); } else { - if (avctx->ticks_per_frame > INT_MAX / avctx->time_base.num) { - av_log(avctx, AV_LOG_ERROR, - "Could not set framerate for libopenh264enc: integer overflow\n"); - return AVERROR(EINVAL); - } - param.fMaxFrameRate = 1.0 / av_q2d(avctx->time_base) / FFMAX(avctx->ticks_per_frame, 1); +FF_DISABLE_DEPRECATION_WARNINGS + param.fMaxFrameRate = 1.0 / av_q2d(avctx->time_base) +#if FF_API_TICKS_PER_FRAME + / FFMAX(avctx->ticks_per_frame, 1) +#endif + ; +FF_ENABLE_DEPRECATION_WARNINGS } param.iPicWidth = avctx->width; param.iPicHeight = avctx->height; @@ -311,15 +312,15 @@ static av_cold int svc_encode_init(AVCodecContext *avctx) #if OPENH264_VER_AT_LEAST(1, 6) param.sSpatialLayers[0].uiVideoFormat = VF_UNDEF; + if (avctx->color_range != AVCOL_RANGE_UNSPECIFIED) { - param.sSpatialLayers[0].bVideoSignalTypePresent = true; param.sSpatialLayers[0].bFullRange = (avctx->color_range == AVCOL_RANGE_JPEG); - } + } else if (avctx->pix_fmt == AV_PIX_FMT_YUVJ420P) + param.sSpatialLayers[0].bFullRange = 1; if (avctx->colorspace != AVCOL_SPC_UNSPECIFIED || avctx->color_primaries != AVCOL_PRI_UNSPECIFIED || avctx->color_trc != AVCOL_TRC_UNSPECIFIED) { - param.sSpatialLayers[0].bVideoSignalTypePresent = true; param.sSpatialLayers[0].bColorDescriptionPresent = true; } @@ -329,6 +330,9 @@ static av_cold int svc_encode_init(AVCodecContext *avctx) param.sSpatialLayers[0].uiColorPrimaries = avctx->color_primaries; if (avctx->color_trc != AVCOL_TRC_UNSPECIFIED) param.sSpatialLayers[0].uiTransferCharacteristics = avctx->color_trc; + + param.sSpatialLayers[0].bVideoSignalTypePresent = + (param.sSpatialLayers[0].bFullRange || param.sSpatialLayers[0].bColorDescriptionPresent); #endif if ((*s->encoder)->InitializeExt(s->encoder, ¶m) != cmResultSuccess) { @@ -443,6 +447,7 @@ const FFCodec ff_libopenh264_encoder = { .caps_internal = FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_AUTO_THREADS, .p.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, + AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_NONE }, .defaults = svc_enc_defaults, .p.priv_class = &class, diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/librav1e.c b/arm/raspi/third_party/ffmpeg/libavcodec/librav1e.c index 08affabe..56539435 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/librav1e.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/librav1e.c @@ -219,10 +219,15 @@ static av_cold int librav1e_encode_init(AVCodecContext *avctx) avctx->framerate.den, avctx->framerate.num }); } else { +FF_DISABLE_DEPRECATION_WARNINGS rav1e_config_set_time_base(cfg, (RaRational) { - avctx->time_base.num * avctx->ticks_per_frame, - avctx->time_base.den + avctx->time_base.num +#if FF_API_TICKS_PER_FRAME + * avctx->ticks_per_frame +#endif + , avctx->time_base.den }); +FF_ENABLE_DEPRECATION_WARNINGS } if ((avctx->flags & AV_CODEC_FLAG_PASS1 || avctx->flags & AV_CODEC_FLAG_PASS2) && !avctx->bit_rate) { diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/librsvgdec.c b/arm/raspi/third_party/ffmpeg/libavcodec/librsvgdec.c index 9c8aa2de..2f160edc 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/librsvgdec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/librsvgdec.c @@ -73,7 +73,7 @@ static int librsvg_decode_frame(AVCodecContext *avctx, AVFrame *frame, if ((ret = ff_get_buffer(avctx, frame, 0))) return ret; frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; image = cairo_image_surface_create_for_data(frame->data[0], CAIRO_FORMAT_ARGB32, frame->width, frame->height, diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/libspeexdec.c b/arm/raspi/third_party/ffmpeg/libavcodec/libspeexdec.c index 47fc5d6a..84b30849 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/libspeexdec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/libspeexdec.c @@ -195,7 +195,11 @@ const FFCodec ff_libspeex_decoder = { CODEC_LONG_NAME("libspeex Speex"), .p.type = AVMEDIA_TYPE_AUDIO, .p.id = AV_CODEC_ID_SPEEX, - .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF, + .p.capabilities = +#if FF_API_SUBFRAMES + AV_CODEC_CAP_SUBFRAMES | +#endif + AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF, .p.wrapper_name = "libspeex", .caps_internal = FF_CODEC_CAP_NOT_INIT_THREADSAFE, .priv_data_size = sizeof(LibSpeexContext), diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/libsvtav1.c b/arm/raspi/third_party/ffmpeg/libavcodec/libsvtav1.c index 9174e275..718a04d2 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/libsvtav1.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/libsvtav1.c @@ -170,7 +170,7 @@ static int config_enc_params(EbSvtAv1EncConfiguration *param, param->look_ahead_distance = svt_enc->la_depth; #endif - if (svt_enc->enc_mode >= 0) + if (svt_enc->enc_mode >= -1) param->enc_mode = svt_enc->enc_mode; if (avctx->bit_rate) { @@ -250,7 +250,13 @@ static int config_enc_params(EbSvtAv1EncConfiguration *param, param->frame_rate_denominator = avctx->framerate.den; } else { param->frame_rate_numerator = avctx->time_base.den; - param->frame_rate_denominator = avctx->time_base.num * avctx->ticks_per_frame; +FF_DISABLE_DEPRECATION_WARNINGS + param->frame_rate_denominator = avctx->time_base.num +#if FF_API_TICKS_PER_FRAME + * avctx->ticks_per_frame +#endif + ; +FF_ENABLE_DEPRECATION_WARNINGS } /* 2 = IDR, closed GOP, 1 = CRA, open GOP */ @@ -593,7 +599,7 @@ static const AVOption options[] = { { "high", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 1 }, 0, 0, VE, "tier" }, #endif { "preset", "Encoding preset", - OFFSET(enc_mode), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, MAX_ENC_PRESET, VE }, + OFFSET(enc_mode), AV_OPT_TYPE_INT, { .i64 = -2 }, -2, MAX_ENC_PRESET, VE }, FF_AV1_PROFILE_OPTS diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/libuavs3d.c b/arm/raspi/third_party/ffmpeg/libavcodec/libuavs3d.c index 5c08d2b8..66e8d310 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/libuavs3d.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/libuavs3d.c @@ -96,7 +96,10 @@ FF_ENABLE_DEPRECATION_WARNINGS av_log(NULL, AV_LOG_WARNING, "Error frame type in uavs3d: %d.\n", dec_frame->type); } else { frm->pict_type = ff_avs3_image_type[dec_frame->type]; - frm->key_frame = (frm->pict_type == AV_PICTURE_TYPE_I); + if (frm->pict_type == AV_PICTURE_TYPE_I) + frm->flags |= AV_FRAME_FLAG_KEY; + else + frm->flags &= ~AV_FRAME_FLAG_KEY; } for (i = 0; i < 3; i++) { diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/libvpxenc.c b/arm/raspi/third_party/ffmpeg/libavcodec/libvpxenc.c index a20e9498..8833df2d 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/libvpxenc.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/libvpxenc.c @@ -1692,6 +1692,7 @@ static int vpx_encode(AVCodecContext *avctx, AVPacket *pkt, const struct vpx_codec_enc_cfg *enccfg = ctx->encoder.config.enc; vpx_svc_layer_id_t layer_id; int layer_id_valid = 0; + unsigned long duration = 0; if (avctx->qmax >= 0 && enccfg->rc_max_quantizer != avctx->qmax) { struct vpx_codec_enc_cfg cfg = *enccfg; @@ -1820,8 +1821,24 @@ static int vpx_encode(AVCodecContext *avctx, AVPacket *pkt, #endif } + if (frame && frame->duration > ULONG_MAX) { + av_log(avctx, AV_LOG_WARNING, + "Frame duration too large: %"PRId64"\n", frame->duration); + } else if (frame && frame->duration) + duration = frame->duration; + else if (avctx->framerate.num > 0 && avctx->framerate.den > 0) + duration = av_rescale_q(1, av_inv_q(avctx->framerate), avctx->time_base); + else +FF_DISABLE_DEPRECATION_WARNINGS + duration = +#if FF_API_TICKS_PER_FRAME + avctx->ticks_per_frame ? avctx->ticks_per_frame : +#endif + 1; +FF_ENABLE_DEPRECATION_WARNINGS + res = vpx_codec_encode(&ctx->encoder, rawimg, timestamp, - avctx->ticks_per_frame, flags, ctx->deadline); + duration, flags, ctx->deadline); if (res != VPX_CODEC_OK) { log_encoder_error(avctx, "Error encoding frame"); return AVERROR_INVALIDDATA; @@ -1829,7 +1846,7 @@ static int vpx_encode(AVCodecContext *avctx, AVPacket *pkt, if (ctx->is_alpha) { res = vpx_codec_encode(&ctx->encoder_alpha, rawimg_alpha, timestamp, - avctx->ticks_per_frame, flags, ctx->deadline); + duration, flags, ctx->deadline); if (res != VPX_CODEC_OK) { log_encoder_error(avctx, "Error encoding alpha frame"); return AVERROR_INVALIDDATA; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/libx264.c b/arm/raspi/third_party/ffmpeg/libavcodec/libx264.c index cf7a9a78..774c23da 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/libx264.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/libx264.c @@ -151,7 +151,7 @@ static int encode_nals(AVCodecContext *ctx, AVPacket *pkt, { X264Context *x4 = ctx->priv_data; uint8_t *p; - uint64_t size = x4->sei_size; + uint64_t size = FFMAX(x4->sei_size, 0); int ret; if (!nnal) @@ -178,8 +178,8 @@ static int encode_nals(AVCodecContext *ctx, AVPacket *pkt, memcpy(p, x4->sei, x4->sei_size); p += x4->sei_size; size -= x4->sei_size; - x4->sei_size = 0; - av_freep(&x4->sei); + /* Keep the value around in case of flush */ + x4->sei_size = -x4->sei_size; } /* x264 guarantees the payloads of the NALs @@ -196,9 +196,9 @@ static void reconfig_encoder(AVCodecContext *ctx, const AVFrame *frame) if (x4->avcintra_class < 0) { - if (x4->params.b_interlaced && x4->params.b_tff != frame->top_field_first) { + if (x4->params.b_interlaced && x4->params.b_tff != !!(frame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST)) { - x4->params.b_tff = frame->top_field_first; + x4->params.b_tff = !!(frame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST); x264_encoder_reconfig(x4->enc, &x4->params); } if (x4->params.vui.i_sar_height*ctx->sample_aspect_ratio.num != ctx->sample_aspect_ratio.den * x4->params.vui.i_sar_width) { @@ -339,7 +339,7 @@ static int setup_roi(AVCodecContext *ctx, x264_picture_t *pic, int bit_depth, av_log(ctx, AV_LOG_WARNING, "Adaptive quantization must be enabled to use ROI encoding, skipping ROI.\n"); } return 0; - } else if (frame->interlaced_frame) { + } else if (frame->flags & AV_FRAME_FLAG_INTERLACED) { if (!x4->roi_warned) { x4->roi_warned = 1; av_log(ctx, AV_LOG_WARNING, "interlaced_frame not supported for ROI encoding yet, skipping ROI.\n"); @@ -664,6 +664,24 @@ FF_ENABLE_DEPRECATION_WARNINGS return 0; } +static void X264_flush(AVCodecContext *avctx) +{ + X264Context *x4 = avctx->priv_data; + x264_nal_t *nal; + int nnal, ret; + x264_picture_t pic_out = {0}; + + do { + ret = x264_encoder_encode(x4->enc, &nal, &nnal, NULL, &pic_out); + } while (ret > 0 && x264_encoder_delayed_frames(x4->enc)); + + for (int i = 0; i < x4->nb_reordered_opaque; i++) + opaque_uninit(&x4->reordered_opaque[i]); + + if (x4->sei_size < 0) + x4->sei_size = -x4->sei_size; +} + static av_cold int X264_close(AVCodecContext *avctx) { X264Context *x4 = avctx->priv_data; @@ -1016,7 +1034,13 @@ static av_cold int X264_init(AVCodecContext *avctx) x4->params.i_fps_den = avctx->framerate.den; } else { x4->params.i_fps_num = avctx->time_base.den; - x4->params.i_fps_den = avctx->time_base.num * avctx->ticks_per_frame; +FF_DISABLE_DEPRECATION_WARNINGS + x4->params.i_fps_den = avctx->time_base.num +#if FF_API_TICKS_PER_FRAME + * avctx->ticks_per_frame +#endif + ; +FF_ENABLE_DEPRECATION_WARNINGS } x4->params.analyse.b_psnr = avctx->flags & AV_CODEC_FLAG_PSNR; @@ -1351,12 +1375,14 @@ FFCodec ff_libx264_encoder = { .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY | AV_CODEC_CAP_OTHER_THREADS | AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE | + AV_CODEC_CAP_ENCODER_FLUSH | AV_CODEC_CAP_ENCODER_RECON_FRAME, .p.priv_class = &x264_class, .p.wrapper_name = "libx264", .priv_data_size = sizeof(X264Context), .init = X264_init, FF_CODEC_ENCODE_CB(X264_frame), + .flush = X264_flush, .close = X264_close, .defaults = x264_defaults, #if X264_BUILD < 153 diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/libx265.c b/arm/raspi/third_party/ffmpeg/libavcodec/libx265.c index 420d0953..873b3021 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/libx265.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/libx265.c @@ -220,7 +220,13 @@ static av_cold int libx265_encode_init(AVCodecContext *avctx) ctx->params->fpsDenom = avctx->framerate.den; } else { ctx->params->fpsNum = avctx->time_base.den; - ctx->params->fpsDenom = avctx->time_base.num * avctx->ticks_per_frame; +FF_DISABLE_DEPRECATION_WARNINGS + ctx->params->fpsDenom = avctx->time_base.num +#if FF_API_TICKS_PER_FRAME + * avctx->ticks_per_frame +#endif + ; +FF_ENABLE_DEPRECATION_WARNINGS } ctx->params->sourceWidth = avctx->width; ctx->params->sourceHeight = avctx->height; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/loco.c b/arm/raspi/third_party/ffmpeg/libavcodec/loco.c index d57a6731..3d118232 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/loco.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/loco.c @@ -206,7 +206,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, if ((ret = ff_get_buffer(avctx, p, 0)) < 0) return ret; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; #define ADVANCE_BY_DECODED do { \ if (decoded < 0 || decoded >= buf_size) goto buf_too_small; \ diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/lscrdec.c b/arm/raspi/third_party/ffmpeg/libavcodec/lscrdec.c index 76a46751..415914bf 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/lscrdec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/lscrdec.c @@ -154,10 +154,13 @@ static int decode_frame_lscr(AVCodecContext *avctx, AVFrame *rframe, size = bytestream2_get_le32(gb); - frame->key_frame = (nb_blocks == 1) && - (w == avctx->width) && - (h == avctx->height) && - (x == 0) && (y == 0); + if ((nb_blocks == 1) && + (w == avctx->width) && + (h == avctx->height) && + (x == 0) && (y == 0)) + frame->flags |= AV_FRAME_FLAG_KEY; + else + frame->flags &= ~AV_FRAME_FLAG_KEY; bytestream2_seek(gb, 2 + nb_blocks * 12 + offset, SEEK_SET); csize = bytestream2_get_be32(gb); @@ -199,7 +202,7 @@ static int decode_frame_lscr(AVCodecContext *avctx, AVFrame *rframe, } } - frame->pict_type = frame->key_frame ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; + frame->pict_type = (frame->flags & AV_FRAME_FLAG_KEY) ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; if ((ret = av_frame_ref(rframe, frame)) < 0) return ret; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/m101.c b/arm/raspi/third_party/ffmpeg/libavcodec/m101.c index 3def577b..43a3c7bb 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/m101.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/m101.c @@ -67,15 +67,17 @@ static int m101_decode_frame(AVCodecContext *avctx, AVFrame *frame, if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) return ret; frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; - frame->interlaced_frame = ((avctx->extradata[3*4] & 3) != 3); - if (frame->interlaced_frame) - frame->top_field_first = avctx->extradata[3*4] & 1; + frame->flags |= AV_FRAME_FLAG_KEY; + if ((avctx->extradata[3*4] & 3) != 3) { + frame->flags |= AV_FRAME_FLAG_INTERLACED; + if (avctx->extradata[3*4] & 1) + frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST; + } for (y = 0; y < avctx->height; y++) { int src_y = y; - if (frame->interlaced_frame) - src_y = ((y&1)^frame->top_field_first) ? y/2 : (y/2 + avctx->height/2); + if (frame->flags & AV_FRAME_FLAG_INTERLACED) + src_y = ((y&1) ^ !!(frame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST)) ? y/2 : (y/2 + avctx->height/2); if (bits == 8) { uint8_t *line = frame->data[0] + y*frame->linesize[0]; memcpy(line, buf + src_y*stride, 2*avctx->width); diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/magicyuv.c b/arm/raspi/third_party/ffmpeg/libavcodec/magicyuv.c index 62263409..7898cd5b 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/magicyuv.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/magicyuv.c @@ -637,7 +637,7 @@ static int magy_decode_frame(AVCodecContext *avctx, AVFrame *p, return ret; p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; if ((ret = ff_thread_get_buffer(avctx, p, 0)) < 0) return ret; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/mdec.c b/arm/raspi/third_party/ffmpeg/libavcodec/mdec.c index 640b671a..44b12471 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/mdec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/mdec.c @@ -177,7 +177,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, if ((ret = ff_thread_get_buffer(avctx, frame, 0)) < 0) return ret; frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; av_fast_padded_malloc(&a->bitstream_buffer, &a->bitstream_buffer_size, buf_size); if (!a->bitstream_buffer) diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/me_cmp.c b/arm/raspi/third_party/ffmpeg/libavcodec/me_cmp.c index e2f9f84b..cd05e63f 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/me_cmp.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/me_cmp.c @@ -473,8 +473,9 @@ static int zero_cmp(MpegEncContext *s, const uint8_t *a, const uint8_t *b, return 0; } -void ff_set_cmp(MECmpContext *c, me_cmp_func *cmp, int type) +int ff_set_cmp(MECmpContext *c, me_cmp_func *cmp, int type) { + int ret = 0; int i; memset(cmp, 0, sizeof(void *) * 6); @@ -533,9 +534,13 @@ void ff_set_cmp(MECmpContext *c, me_cmp_func *cmp, int type) #endif default: av_log(NULL, AV_LOG_ERROR, - "internal error in cmp function selection\n"); + "invalid cmp function selection\n"); + ret = -1; + break; } } + + return ret; } #define BUTTERFLY2(o1, o2, i1, i2) \ diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/me_cmp.h b/arm/raspi/third_party/ffmpeg/libavcodec/me_cmp.h index 90ea76c8..aefd32a7 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/me_cmp.h +++ b/arm/raspi/third_party/ffmpeg/libavcodec/me_cmp.h @@ -89,7 +89,7 @@ void ff_me_cmp_init_ppc(MECmpContext *c, AVCodecContext *avctx); void ff_me_cmp_init_x86(MECmpContext *c, AVCodecContext *avctx); void ff_me_cmp_init_mips(MECmpContext *c, AVCodecContext *avctx); -void ff_set_cmp(MECmpContext *c, me_cmp_func *cmp, int type); +int ff_set_cmp(MECmpContext *c, me_cmp_func *cmp, int type); void ff_dsputil_init_dwt(MECmpContext *c); diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/mediacodec_wrapper.c b/arm/raspi/third_party/ffmpeg/libavcodec/mediacodec_wrapper.c index d1fb640e..eb69ad7e 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/mediacodec_wrapper.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/mediacodec_wrapper.c @@ -319,10 +319,49 @@ int ff_AMediaCodecProfile_getProfileFromAVCodecContext(AVCodecContext *avctx) static const int HEVCProfileMain10HDR10 = 0x1000; static const int HEVCProfileMain10HDR10Plus = 0x2000; + static const int VP9Profile0 = 0x01; + static const int VP9Profile1 = 0x02; + static const int VP9Profile2 = 0x04; + static const int VP9Profile3 = 0x08; + static const int VP9Profile2HDR = 0x1000; + static const int VP9Profile3HDR = 0x2000; + static const int VP9Profile2HDR10Plus = 0x4000; + static const int VP9Profile3HDR10Plus = 0x8000; + + static const int MPEG4ProfileSimple = 0x01; + static const int MPEG4ProfileSimpleScalable = 0x02; + static const int MPEG4ProfileCore = 0x04; + static const int MPEG4ProfileMain = 0x08; + static const int MPEG4ProfileNbit = 0x10; + static const int MPEG4ProfileScalableTexture = 0x20; + static const int MPEG4ProfileSimpleFBA = 0x80; + static const int MPEG4ProfileSimpleFace = 0x40; + static const int MPEG4ProfileBasicAnimated = 0x100; + static const int MPEG4ProfileHybrid = 0x200; + static const int MPEG4ProfileAdvancedRealTime = 0x400; + static const int MPEG4ProfileCoreScalable = 0x800; + static const int MPEG4ProfileAdvancedCoding = 0x1000; + static const int MPEG4ProfileAdvancedCore = 0x2000; + static const int MPEG4ProfileAdvancedScalable = 0x4000; + static const int MPEG4ProfileAdvancedSimple = 0x8000; + + + static const int AV1ProfileMain8 = 0x1; + static const int AV1ProfileMain10 = 0x2; + static const int AV1ProfileMain10HDR10 = 0x1000; + static const int AV1ProfileMain10HDR10Plus = 0x2000; + // Unused yet. (void)AVCProfileConstrainedHigh; (void)HEVCProfileMain10HDR10; (void)HEVCProfileMain10HDR10Plus; + (void)VP9Profile2HDR; + (void)VP9Profile3HDR; + (void)VP9Profile2HDR10Plus; + (void)VP9Profile3HDR10Plus; + (void)AV1ProfileMain10; + (void)AV1ProfileMain10HDR10; + (void)AV1ProfileMain10HDR10Plus; if (avctx->codec_id == AV_CODEC_ID_H264) { switch(avctx->profile) { @@ -357,6 +396,65 @@ int ff_AMediaCodecProfile_getProfileFromAVCodecContext(AVCodecContext *avctx) case FF_PROFILE_HEVC_MAIN_10: return HEVCProfileMain10; } + } else if (avctx->codec_id == AV_CODEC_ID_VP9) { + switch (avctx->profile) { + case FF_PROFILE_VP9_0: + return VP9Profile0; + case FF_PROFILE_VP9_1: + return VP9Profile1; + case FF_PROFILE_VP9_2: + return VP9Profile2; + case FF_PROFILE_VP9_3: + return VP9Profile3; + } + } else if(avctx->codec_id == AV_CODEC_ID_MPEG4) { + switch (avctx->profile) + { + case FF_PROFILE_MPEG4_SIMPLE: + return MPEG4ProfileSimple; + case FF_PROFILE_MPEG4_SIMPLE_SCALABLE: + return MPEG4ProfileSimpleScalable; + case FF_PROFILE_MPEG4_CORE: + return MPEG4ProfileCore; + case FF_PROFILE_MPEG4_MAIN: + return MPEG4ProfileMain; + case FF_PROFILE_MPEG4_N_BIT: + return MPEG4ProfileNbit; + case FF_PROFILE_MPEG4_SCALABLE_TEXTURE: + return MPEG4ProfileScalableTexture; + case FF_PROFILE_MPEG4_SIMPLE_FACE_ANIMATION: + return MPEG4ProfileSimpleFBA; + case FF_PROFILE_MPEG4_BASIC_ANIMATED_TEXTURE: + return MPEG4ProfileBasicAnimated; + case FF_PROFILE_MPEG4_HYBRID: + return MPEG4ProfileHybrid; + case FF_PROFILE_MPEG4_ADVANCED_REAL_TIME: + return MPEG4ProfileAdvancedRealTime; + case FF_PROFILE_MPEG4_CORE_SCALABLE: + return MPEG4ProfileCoreScalable; + case FF_PROFILE_MPEG4_ADVANCED_CODING: + return MPEG4ProfileAdvancedCoding; + case FF_PROFILE_MPEG4_ADVANCED_CORE: + return MPEG4ProfileAdvancedCore; + case FF_PROFILE_MPEG4_ADVANCED_SCALABLE_TEXTURE: + return MPEG4ProfileAdvancedScalable; + case FF_PROFILE_MPEG4_ADVANCED_SIMPLE: + return MPEG4ProfileAdvancedSimple; + case FF_PROFILE_MPEG4_SIMPLE_STUDIO: + // Studio profiles are not supported by mediacodec. + default: + break; + } + } else if(avctx->codec_id == AV_CODEC_ID_AV1) { + switch (avctx->profile) + { + case FF_PROFILE_AV1_MAIN: + return AV1ProfileMain8; + case FF_PROFILE_AV1_HIGH: + case FF_PROFILE_AV1_PROFESSIONAL: + default: + break; + } } return -1; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/mediacodecenc.c b/arm/raspi/third_party/ffmpeg/libavcodec/mediacodecenc.c index 2ab56597..d23745c1 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/mediacodecenc.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/mediacodecenc.c @@ -164,6 +164,18 @@ static av_cold int mediacodec_init(AVCodecContext *avctx) case AV_CODEC_ID_HEVC: codec_mime = "video/hevc"; break; + case AV_CODEC_ID_VP8: + codec_mime = "video/x-vnd.on2.vp8"; + break; + case AV_CODEC_ID_VP9: + codec_mime = "video/x-vnd.on2.vp9"; + break; + case AV_CODEC_ID_MPEG4: + codec_mime = "video/mp4v-es"; + break; + case AV_CODEC_ID_AV1: + codec_mime = "video/av01"; + break; default: av_assert0(0); } @@ -317,6 +329,10 @@ static av_cold int mediacodec_init(AVCodecContext *avctx) goto bailout; mediacodec_output_format(avctx); + if (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) + av_log(avctx, AV_LOG_WARNING, + "Mediacodec encoder doesn't support AV_CODEC_FLAG_GLOBAL_HEADER. " + "Use extract_extradata bsf when necessary.\n"); s->frame = av_frame_alloc(); if (!s->frame) @@ -764,3 +780,223 @@ static const AVOption hevc_options[] = { DECLARE_MEDIACODEC_ENCODER(hevc, "H.265", AV_CODEC_ID_HEVC) #endif // CONFIG_HEVC_MEDIACODEC_ENCODER + +#if CONFIG_VP8_MEDIACODEC_ENCODER + +enum MediaCodecVP8Level { + VP8Level_Version0 = 0x01, + VP8Level_Version1 = 0x02, + VP8Level_Version2 = 0x04, + VP8Level_Version3 = 0x08, +}; + +static const AVOption vp8_options[] = { + COMMON_OPTION + { "level", "Specify tier and level", + OFFSET(level), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, VE, "level" }, + { "V0", "Level Version 0", + 0, AV_OPT_TYPE_CONST, { .i64 = VP8Level_Version0 }, 0, 0, VE, "level" }, + { "V1", "Level Version 1", + 0, AV_OPT_TYPE_CONST, { .i64 = VP8Level_Version1 }, 0, 0, VE, "level" }, + { "V2", "Level Version 2", + 0, AV_OPT_TYPE_CONST, { .i64 = VP8Level_Version2 }, 0, 0, VE, "level" }, + { "V3", "Level Version 3", + 0, AV_OPT_TYPE_CONST, { .i64 = VP8Level_Version3 }, 0, 0, VE, "level" }, + { NULL, } +}; + +DECLARE_MEDIACODEC_ENCODER(vp8, "VP8", AV_CODEC_ID_VP8) + +#endif // CONFIG_VP8_MEDIACODEC_ENCODER + +#if CONFIG_VP9_MEDIACODEC_ENCODER + +enum MediaCodecVP9Level { + VP9Level1 = 0x1, + VP9Level11 = 0x2, + VP9Level2 = 0x4, + VP9Level21 = 0x8, + VP9Level3 = 0x10, + VP9Level31 = 0x20, + VP9Level4 = 0x40, + VP9Level41 = 0x80, + VP9Level5 = 0x100, + VP9Level51 = 0x200, + VP9Level52 = 0x400, + VP9Level6 = 0x800, + VP9Level61 = 0x1000, + VP9Level62 = 0x2000, +}; + +static const AVOption vp9_options[] = { + COMMON_OPTION + { "level", "Specify tier and level", + OFFSET(level), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, VE, "level" }, + { "1", "Level 1", + 0, AV_OPT_TYPE_CONST, { .i64 = VP9Level1 }, 0, 0, VE, "level" }, + { "1.1", "Level 1.1", + 0, AV_OPT_TYPE_CONST, { .i64 = VP9Level11 }, 0, 0, VE, "level" }, + { "2", "Level 2", + 0, AV_OPT_TYPE_CONST, { .i64 = VP9Level2 }, 0, 0, VE, "level" }, + { "2.1", "Level 2.1", + 0, AV_OPT_TYPE_CONST, { .i64 = VP9Level21 }, 0, 0, VE, "level" }, + { "3", "Level 3", + 0, AV_OPT_TYPE_CONST, { .i64 = VP9Level3 }, 0, 0, VE, "level" }, + { "3.1", "Level 3.1", + 0, AV_OPT_TYPE_CONST, { .i64 = VP9Level31 }, 0, 0, VE, "level" }, + { "4", "Level 4", + 0, AV_OPT_TYPE_CONST, { .i64 = VP9Level4 }, 0, 0, VE, "level" }, + { "4.1", "Level 4.1", + 0, AV_OPT_TYPE_CONST, { .i64 = VP9Level41 }, 0, 0, VE, "level" }, + { "5", "Level 5", + 0, AV_OPT_TYPE_CONST, { .i64 = VP9Level5 }, 0, 0, VE, "level" }, + { "5.1", "Level 5.1", + 0, AV_OPT_TYPE_CONST, { .i64 = VP9Level51 }, 0, 0, VE, "level" }, + { "5.2", "Level 5.2", + 0, AV_OPT_TYPE_CONST, { .i64 = VP9Level52 }, 0, 0, VE, "level" }, + { "6", "Level 6", + 0, AV_OPT_TYPE_CONST, { .i64 = VP9Level6 }, 0, 0, VE, "level" }, + { "6.1", "Level 4.1", + 0, AV_OPT_TYPE_CONST, { .i64 = VP9Level61 }, 0, 0, VE, "level" }, + { "6.2", "Level 6.2", + 0, AV_OPT_TYPE_CONST, { .i64 = VP9Level62 }, 0, 0, VE, "level" }, + { NULL, } +}; + +DECLARE_MEDIACODEC_ENCODER(vp9, "VP9", AV_CODEC_ID_VP9) + +#endif // CONFIG_VP9_MEDIACODEC_ENCODER + +#if CONFIG_MPEG4_MEDIACODEC_ENCODER + +enum MediaCodecMpeg4Level { + MPEG4Level0 = 0x01, + MPEG4Level0b = 0x02, + MPEG4Level1 = 0x04, + MPEG4Level2 = 0x08, + MPEG4Level3 = 0x10, + MPEG4Level3b = 0x18, + MPEG4Level4 = 0x20, + MPEG4Level4a = 0x40, + MPEG4Level5 = 0x80, + MPEG4Level6 = 0x100, +}; + +static const AVOption mpeg4_options[] = { + COMMON_OPTION + { "level", "Specify tier and level", + OFFSET(level), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, VE, "level" }, + { "0", "Level 0", + 0, AV_OPT_TYPE_CONST, { .i64 = MPEG4Level0 }, 0, 0, VE, "level" }, + { "0b", "Level 0b", + 0, AV_OPT_TYPE_CONST, { .i64 = MPEG4Level0b }, 0, 0, VE, "level" }, + { "1", "Level 1", + 0, AV_OPT_TYPE_CONST, { .i64 = MPEG4Level1 }, 0, 0, VE, "level" }, + { "2", "Level 2", + 0, AV_OPT_TYPE_CONST, { .i64 = MPEG4Level2 }, 0, 0, VE, "level" }, + { "3", "Level 3", + 0, AV_OPT_TYPE_CONST, { .i64 = MPEG4Level3 }, 0, 0, VE, "level" }, + { "3b", "Level 3b", + 0, AV_OPT_TYPE_CONST, { .i64 = MPEG4Level3b }, 0, 0, VE, "level" }, + { "4", "Level 4", + 0, AV_OPT_TYPE_CONST, { .i64 = MPEG4Level4 }, 0, 0, VE, "level" }, + { "4a", "Level 4a", + 0, AV_OPT_TYPE_CONST, { .i64 = MPEG4Level4a }, 0, 0, VE, "level" }, + { "5", "Level 5", + 0, AV_OPT_TYPE_CONST, { .i64 = MPEG4Level5 }, 0, 0, VE, "level" }, + { "6", "Level 6", + 0, AV_OPT_TYPE_CONST, { .i64 = MPEG4Level6 }, 0, 0, VE, "level" }, + { NULL, } +}; + +DECLARE_MEDIACODEC_ENCODER(mpeg4, "MPEG-4", AV_CODEC_ID_MPEG4) + +#endif // CONFIG_MPEG4_MEDIACODEC_ENCODER + +#if CONFIG_AV1_MEDIACODEC_ENCODER + +enum MediaCodecAV1Level { + AV1Level2 = 0x1, + AV1Level21 = 0x2, + AV1Level22 = 0x4, + AV1Level23 = 0x8, + AV1Level3 = 0x10, + AV1Level31 = 0x20, + AV1Level32 = 0x40, + AV1Level33 = 0x80, + AV1Level4 = 0x100, + AV1Level41 = 0x200, + AV1Level42 = 0x400, + AV1Level43 = 0x800, + AV1Level5 = 0x1000, + AV1Level51 = 0x2000, + AV1Level52 = 0x4000, + AV1Level53 = 0x8000, + AV1Level6 = 0x10000, + AV1Level61 = 0x20000, + AV1Level62 = 0x40000, + AV1Level63 = 0x80000, + AV1Level7 = 0x100000, + AV1Level71 = 0x200000, + AV1Level72 = 0x400000, + AV1Level73 = 0x800000, +}; + +static const AVOption av1_options[] = { + COMMON_OPTION + { "level", "Specify tier and level", + OFFSET(level), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, VE, "level" }, + { "2", "Level 2", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level2 }, 0, 0, VE, "level" }, + { "2.1", "Level 2.1", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level21 }, 0, 0, VE, "level" }, + { "2.2", "Level 2.2", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level22 }, 0, 0, VE, "level" }, + { "2.3", "Level 2.3", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level23 }, 0, 0, VE, "level" }, + { "3", "Level 3", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level3 }, 0, 0, VE, "level" }, + { "3.1", "Level 3.1", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level31 }, 0, 0, VE, "level" }, + { "3.2", "Level 3.2", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level32 }, 0, 0, VE, "level" }, + { "3.3", "Level 3.3", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level33 }, 0, 0, VE, "level" }, + { "4", "Level 4", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level4 }, 0, 0, VE, "level" }, + { "4.1", "Level 4.1", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level41 }, 0, 0, VE, "level" }, + { "4.2", "Level 4.2", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level42 }, 0, 0, VE, "level" }, + { "4.3", "Level 4.3", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level43 }, 0, 0, VE, "level" }, + { "5", "Level 5", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level5 }, 0, 0, VE, "level" }, + { "5.1", "Level 5.1", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level51 }, 0, 0, VE, "level" }, + { "5.2", "Level 5.2", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level52 }, 0, 0, VE, "level" }, + { "5.3", "Level 5.3", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level53 }, 0, 0, VE, "level" }, + { "6", "Level 6", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level6 }, 0, 0, VE, "level" }, + { "6.1", "Level 6.1", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level61 }, 0, 0, VE, "level" }, + { "6.2", "Level 6.2", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level62 }, 0, 0, VE, "level" }, + { "6.3", "Level 6.3", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level63 }, 0, 0, VE, "level" }, + { "7", "Level 7", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level7 }, 0, 0, VE, "level" }, + { "7.1", "Level 7.1", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level71 }, 0, 0, VE, "level" }, + { "7.2", "Level 7.2", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level72 }, 0, 0, VE, "level" }, + { "7.3", "Level 7.3", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level73 }, 0, 0, VE, "level" }, + { NULL, } +}; + +DECLARE_MEDIACODEC_ENCODER(av1, "AV1", AV_CODEC_ID_AV1) + +#endif // CONFIG_AV1_MEDIACODEC_ENCODER diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/mfenc.c b/arm/raspi/third_party/ffmpeg/libavcodec/mfenc.c index f3415df1..8d950a31 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/mfenc.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/mfenc.c @@ -659,7 +659,11 @@ static int mf_encv_output_adjust(AVCodecContext *avctx, IMFMediaType *type) framerate = avctx->framerate; } else { framerate = av_inv_q(avctx->time_base); +#if FF_API_TICKS_PER_FRAME +FF_DISABLE_DEPRECATION_WARNINGS framerate.den *= avctx->ticks_per_frame; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } ff_MFSetAttributeRatio((IMFAttributes *)type, &MF_MT_FRAME_RATE, framerate.num, framerate.den); diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/midivid.c b/arm/raspi/third_party/ffmpeg/libavcodec/midivid.c index 599d5c8f..70730231 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/midivid.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/midivid.c @@ -222,7 +222,10 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, return ret; frame->pict_type = key ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; - frame->key_frame = key; + if (key) + frame->flags |= AV_FRAME_FLAG_KEY; + else + frame->flags &= ~AV_FRAME_FLAG_KEY; *got_frame = 1; return avpkt->size; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/misc4.c b/arm/raspi/third_party/ffmpeg/libavcodec/misc4.c index 1bf162e1..72ac944e 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/misc4.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/misc4.c @@ -179,7 +179,10 @@ const FFCodec ff_misc4_decoder = { .priv_data_size = sizeof(MISC4Context), .init = misc4_init, FF_CODEC_DECODE_CB(misc4_decode), - .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_SUBFRAMES | + .p.capabilities = AV_CODEC_CAP_DR1 | +#if FF_API_SUBFRAMES + AV_CODEC_CAP_SUBFRAMES | +#endif AV_CODEC_CAP_CHANNEL_CONF, .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE }, diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/mjpegdec.c b/arm/raspi/third_party/ffmpeg/libavcodec/mjpegdec.c index c833d66c..ab7fa738 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/mjpegdec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/mjpegdec.c @@ -441,8 +441,8 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s) s->height < ((s->orig_height * 3) / 4)) { s->interlaced = 1; s->bottom_field = s->interlace_polarity; - s->picture_ptr->interlaced_frame = 1; - s->picture_ptr->top_field_first = !s->interlace_polarity; + s->picture_ptr->flags |= AV_FRAME_FLAG_INTERLACED; + s->picture_ptr->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST * !s->interlace_polarity; height *= 2; } @@ -545,6 +545,18 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s) } av_assert0(s->nb_components == 4); break; + case 0x11412100: + if (s->bits > 8) + goto unk_pixfmt; + if (s->component_id[0] == 'R' && s->component_id[1] == 'G' && s->component_id[2] == 'B') { + s->avctx->pix_fmt = AV_PIX_FMT_GBRP; + s->upscale_h[0] = 4; + s->upscale_h[1] = 0; + s->upscale_h[2] = 1; + } else { + goto unk_pixfmt; + } + break; case 0x22111122: case 0x22111111: if (s->adobe_transform == 0 && s->bits <= 8) { @@ -571,10 +583,15 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s) case 0x22221100: case 0x22112200: case 0x11222200: - if (s->bits <= 8) s->avctx->pix_fmt = s->cs_itu601 ? AV_PIX_FMT_YUV444P : AV_PIX_FMT_YUVJ444P; - else + if (s->bits > 8) goto unk_pixfmt; - s->avctx->color_range = s->cs_itu601 ? AVCOL_RANGE_MPEG : AVCOL_RANGE_JPEG; + if (s->adobe_transform == 0 || s->component_id[0] == 'R' && + s->component_id[1] == 'G' && s->component_id[2] == 'B') { + s->avctx->pix_fmt = AV_PIX_FMT_GBRP; + } else { + s->avctx->pix_fmt = s->cs_itu601 ? AV_PIX_FMT_YUV444P : AV_PIX_FMT_YUVJ444P; + s->avctx->color_range = s->cs_itu601 ? AVCOL_RANGE_MPEG : AVCOL_RANGE_JPEG; + } break; case 0x11000000: case 0x13000000: @@ -599,7 +616,7 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s) if (s->bits <= 8) s->avctx->pix_fmt = AV_PIX_FMT_GBRP; else goto unk_pixfmt; - s->upscale_v[0] = s->upscale_v[1] = 1; + s->upscale_v[1] = s->upscale_v[2] = 1; } else { if (pix_fmt_id == 0x14111100) s->upscale_v[1] = s->upscale_v[2] = 1; @@ -614,13 +631,22 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s) if (s->bits <= 8) s->avctx->pix_fmt = AV_PIX_FMT_GBRP; else goto unk_pixfmt; - s->upscale_h[0] = s->upscale_h[1] = 1; + s->upscale_h[1] = s->upscale_h[2] = 1; } else { if (s->bits <= 8) s->avctx->pix_fmt = s->cs_itu601 ? AV_PIX_FMT_YUV422P : AV_PIX_FMT_YUVJ422P; else s->avctx->pix_fmt = AV_PIX_FMT_YUV422P16; s->avctx->color_range = s->cs_itu601 ? AVCOL_RANGE_MPEG : AVCOL_RANGE_JPEG; } break; + case 0x11311100: + if (s->bits > 8) + goto unk_pixfmt; + if (s->component_id[0] == 'R' && s->component_id[1] == 'G' && s->component_id[2] == 'B') + s->avctx->pix_fmt = AV_PIX_FMT_GBRP; + else + goto unk_pixfmt; + s->upscale_h[0] = s->upscale_h[2] = 2; + break; case 0x31111100: if (s->bits > 8) goto unk_pixfmt; @@ -630,6 +656,7 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s) break; case 0x22121100: case 0x22111200: + case 0x41211100: if (s->bits <= 8) s->avctx->pix_fmt = s->cs_itu601 ? AV_PIX_FMT_YUV422P : AV_PIX_FMT_YUVJ422P; else goto unk_pixfmt; @@ -673,10 +700,6 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s) avpriv_report_missing_feature(s->avctx, "Lowres for weird subsampling"); return AVERROR_PATCHWELCOME; } - if ((AV_RB32(s->upscale_h) || AV_RB32(s->upscale_v)) && s->progressive && s->avctx->pix_fmt == AV_PIX_FMT_GBRP) { - avpriv_report_missing_feature(s->avctx, "progressive for weird subsampling"); - return AVERROR_PATCHWELCOME; - } if (s->ls) { memset(s->upscale_h, 0, sizeof(s->upscale_h)); memset(s->upscale_v, 0, sizeof(s->upscale_v)); @@ -722,7 +745,7 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s) if (s->avctx->skip_frame == AVDISCARD_ALL) { s->picture_ptr->pict_type = AV_PICTURE_TYPE_I; - s->picture_ptr->key_frame = 1; + s->picture_ptr->flags |= AV_FRAME_FLAG_KEY; s->got_picture = 1; return 0; } @@ -731,7 +754,7 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s) if (ff_get_buffer(s->avctx, s->picture_ptr, AV_GET_BUFFER_FLAG_REF) < 0) return -1; s->picture_ptr->pict_type = AV_PICTURE_TYPE_I; - s->picture_ptr->key_frame = 1; + s->picture_ptr->flags |= AV_FRAME_FLAG_KEY; s->got_picture = 1; // Lets clear the palette to avoid leaving uninitialized values in it @@ -1697,9 +1720,6 @@ int ff_mjpeg_decode_sos(MJpegDecodeContext *s, const uint8_t *mb_bitmask, s->h_scount[i] = s->h_count[index]; s->v_scount[i] = s->v_count[index]; - if((nb_components == 1 || nb_components == 3) && s->nb_components == 3 && s->avctx->pix_fmt == AV_PIX_FMT_GBR24P) - index = (index+2)%3; - s->comp_index[i] = index; s->dc_index[i] = get_bits(&s->gb, 4); @@ -2607,6 +2627,8 @@ the_end: avctx->pix_fmt == AV_PIX_FMT_YUVJ440P || avctx->pix_fmt == AV_PIX_FMT_YUV440P || avctx->pix_fmt == AV_PIX_FMT_YUVA444P || + avctx->pix_fmt == AV_PIX_FMT_YUVJ422P || + avctx->pix_fmt == AV_PIX_FMT_YUV422P || avctx->pix_fmt == AV_PIX_FMT_YUVJ420P || avctx->pix_fmt == AV_PIX_FMT_YUV420P || avctx->pix_fmt == AV_PIX_FMT_YUV420P16|| @@ -2656,6 +2678,24 @@ the_end: for (index = w - 3; index > 0; index--) { line[index] = (line[index / 3] + line[(index + 1) / 3] + line[(index + 2) / 3] + 1) / 3; } + } else if (s->upscale_h[p] == 4){ + if (is16bit) { + uint16_t *line16 = (uint16_t *) line; + line16[w - 1] = line16[(w - 1) >> 2]; + if (w > 1) + line16[w - 2] = (line16[(w - 1) >> 2] * 3 + line16[(w - 2) >> 2]) >> 2; + if (w > 2) + line16[w - 3] = (line16[(w - 1) >> 2] + line16[(w - 2) >> 2]) >> 1; + } else { + line[w - 1] = line[(w - 1) >> 2]; + if (w > 1) + line[w - 2] = (line[(w - 1) >> 2] * 3 + line[(w - 2) >> 2]) >> 2; + if (w > 2) + line[w - 3] = (line[(w - 1) >> 2] + line[(w - 2) >> 2]) >> 1; + } + for (index = w - 4; index > 0; index--) + line[index] = (line[(index + 3) >> 2] + line[(index + 2) >> 2] + + line[(index + 1) >> 2] + line[index >> 2]) >> 2; } line += s->linesize[p]; } @@ -2722,6 +2762,15 @@ the_end: } } } + + if (s->avctx->pix_fmt == AV_PIX_FMT_GBRP) { + av_assert0(s->nb_components == 3); + FFSWAP(uint8_t *, frame->data[0], frame->data[2]); + FFSWAP(uint8_t *, frame->data[0], frame->data[1]); + FFSWAP(int, frame->linesize[0], frame->linesize[2]); + FFSWAP(int, frame->linesize[0], frame->linesize[1]); + } + if (s->adobe_transform == 0 && s->avctx->pix_fmt == AV_PIX_FMT_GBRAP) { int w = s->picture_ptr->width; int h = s->picture_ptr->height; @@ -3003,6 +3052,8 @@ static void smv_process_frame(AVCodecContext *avctx, AVFrame *frame) frame->crop_top = FFMIN(s->smv_next_frame * avctx->height, frame->height); frame->crop_bottom = frame->height - (s->smv_next_frame + 1) * avctx->height; + if (s->smv_frame->pts != AV_NOPTS_VALUE) + s->smv_frame->pts += s->smv_frame->duration; s->smv_next_frame = (s->smv_next_frame + 1) % s->smv_frames_per_jpeg; if (s->smv_next_frame == 0) @@ -3013,26 +3064,20 @@ static int smvjpeg_receive_frame(AVCodecContext *avctx, AVFrame *frame) { MJpegDecodeContext *s = avctx->priv_data; AVPacket *const pkt = avctx->internal->in_pkt; - int64_t pkt_dts; int got_frame = 0; int ret; - if (s->smv_next_frame > 0) { - av_assert0(s->smv_frame->buf[0]); - ret = av_frame_ref(frame, s->smv_frame); - if (ret < 0) - return ret; - - smv_process_frame(avctx, frame); - return 0; - } + if (s->smv_next_frame > 0) + goto return_frame; ret = ff_decode_get_packet(avctx, pkt); if (ret < 0) return ret; - ret = ff_mjpeg_decode_frame(avctx, frame, &got_frame, pkt); - pkt_dts = pkt->dts; + av_frame_unref(s->smv_frame); + + ret = ff_mjpeg_decode_frame(avctx, s->smv_frame, &got_frame, pkt); + s->smv_frame->pkt_dts = pkt->dts; av_packet_unref(pkt); if (ret < 0) return ret; @@ -3040,11 +3085,12 @@ static int smvjpeg_receive_frame(AVCodecContext *avctx, AVFrame *frame) if (!got_frame) return AVERROR(EAGAIN); - frame->pkt_dts = pkt_dts; + // packet duration covers all the frames in the packet + s->smv_frame->duration /= s->smv_frames_per_jpeg; - av_assert0(frame->buf[0]); - av_frame_unref(s->smv_frame); - ret = av_frame_ref(s->smv_frame, frame); +return_frame: + av_assert0(s->smv_frame->buf[0]); + ret = av_frame_ref(frame, s->smv_frame); if (ret < 0) return ret; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/mmaldec.c b/arm/raspi/third_party/ffmpeg/libavcodec/mmaldec.c index 3092f585..9bfb6778 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/mmaldec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/mmaldec.c @@ -622,8 +622,10 @@ static int ffmal_copy_frame(AVCodecContext *avctx, AVFrame *frame, MMALDecodeContext *ctx = avctx->priv_data; int ret = 0; - frame->interlaced_frame = ctx->interlaced_frame; - frame->top_field_first = ctx->top_field_first; + if (ctx->interlaced_frame) + frame->flags |= AV_FRAME_FLAG_INTERLACED; + if (ctx->top_field_first) + frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST; if (avctx->pix_fmt == AV_PIX_FMT_MMAL) { if (!ctx->pool_out) diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/mobiclip.c b/arm/raspi/third_party/ffmpeg/libavcodec/mobiclip.c index c3b2383d..381b492d 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/mobiclip.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/mobiclip.c @@ -1235,7 +1235,7 @@ static int mobiclip_decode(AVCodecContext *avctx, AVFrame *rframe, if (get_bits1(gb)) { frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; s->moflex = get_bits1(gb); s->dct_tab_idx = get_bits1(gb); @@ -1256,7 +1256,7 @@ static int mobiclip_decode(AVCodecContext *avctx, AVFrame *rframe, memset(motion, 0, s->motion_size); frame->pict_type = AV_PICTURE_TYPE_P; - frame->key_frame = 0; + frame->flags &= ~AV_FRAME_FLAG_KEY; s->dct_tab_idx = 0; ret = setup_qtables(avctx, s->quantizer + (int64_t)get_se_golomb(gb)); diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/motion_est.c b/arm/raspi/third_party/ffmpeg/libavcodec/motion_est.c index d17ffe42..df9d1bef 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/motion_est.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/motion_est.c @@ -309,6 +309,7 @@ int ff_init_me(MpegEncContext *s){ MotionEstContext * const c= &s->me; int cache_size= FFMIN(ME_MAP_SIZE>>ME_MAP_SHIFT, 1<avctx->dia_size)&255, FFABS(s->avctx->pre_dia_size)&255); + int ret; if(FFMIN(s->avctx->dia_size, s->avctx->pre_dia_size) < -FFMIN(ME_MAP_SIZE, MAX_SAB_SIZE)){ av_log(s->avctx, AV_LOG_ERROR, "ME_MAP size is too small for SAB diamond\n"); @@ -324,10 +325,12 @@ int ff_init_me(MpegEncContext *s){ av_log(s->avctx, AV_LOG_INFO, "ME_MAP size may be a little small for the selected diamond size\n"); } - ff_set_cmp(&s->mecc, s->mecc.me_pre_cmp, c->avctx->me_pre_cmp); - ff_set_cmp(&s->mecc, s->mecc.me_cmp, c->avctx->me_cmp); - ff_set_cmp(&s->mecc, s->mecc.me_sub_cmp, c->avctx->me_sub_cmp); - ff_set_cmp(&s->mecc, s->mecc.mb_cmp, c->avctx->mb_cmp); + ret = ff_set_cmp(&s->mecc, s->mecc.me_pre_cmp, c->avctx->me_pre_cmp); + ret |= ff_set_cmp(&s->mecc, s->mecc.me_cmp, c->avctx->me_cmp); + ret |= ff_set_cmp(&s->mecc, s->mecc.me_sub_cmp, c->avctx->me_sub_cmp); + ret |= ff_set_cmp(&s->mecc, s->mecc.mb_cmp, c->avctx->mb_cmp); + if (ret < 0) + return ret; c->flags = get_flags(c, 0, c->avctx->me_cmp &FF_CMP_CHROMA); c->sub_flags= get_flags(c, 0, c->avctx->me_sub_cmp&FF_CMP_CHROMA); diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/mpeg12dec.c b/arm/raspi/third_party/ffmpeg/libavcodec/mpeg12dec.c index 2b9fb8cb..52fc78a8 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/mpeg12dec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/mpeg12dec.c @@ -1265,7 +1265,11 @@ static int mpeg_decode_postinit(AVCodecContext *avctx) if (avctx->codec_id == AV_CODEC_ID_MPEG1VIDEO) { // MPEG-1 fps avctx->framerate = ff_mpeg12_frame_rate_tab[s1->frame_rate_index]; +#if FF_API_TICKS_PER_FRAME +FF_DISABLE_DEPRECATION_WARNINGS avctx->ticks_per_frame = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif avctx->chroma_sample_location = AVCHROMA_LOC_CENTER; } else { // MPEG-2 @@ -1275,7 +1279,11 @@ static int mpeg_decode_postinit(AVCodecContext *avctx) ff_mpeg12_frame_rate_tab[s1->frame_rate_index].num * s1->frame_rate_ext.num, ff_mpeg12_frame_rate_tab[s1->frame_rate_index].den * s1->frame_rate_ext.den, 1 << 30); +#if FF_API_TICKS_PER_FRAME +FF_DISABLE_DEPRECATION_WARNINGS avctx->ticks_per_frame = 2; +FF_ENABLE_DEPRECATION_WARNINGS +#endif switch (s->chroma_format) { case 1: avctx->chroma_sample_location = AVCHROMA_LOC_LEFT; break; @@ -1343,7 +1351,10 @@ static int mpeg1_decode_picture(AVCodecContext *avctx, const uint8_t *buf, s->mpeg_f_code[1][1] = f_code; } s->current_picture.f->pict_type = s->pict_type; - s->current_picture.f->key_frame = s->pict_type == AV_PICTURE_TYPE_I; + if (s->pict_type == AV_PICTURE_TYPE_I) + s->current_picture.f->flags |= AV_FRAME_FLAG_KEY; + else + s->current_picture.f->flags &= ~AV_FRAME_FLAG_KEY; if (avctx->debug & FF_DEBUG_PICT_INFO) av_log(avctx, AV_LOG_DEBUG, @@ -1525,7 +1536,10 @@ static int mpeg_decode_picture_coding_extension(Mpeg1Context *s1) } else s->pict_type = AV_PICTURE_TYPE_B; s->current_picture.f->pict_type = s->pict_type; - s->current_picture.f->key_frame = s->pict_type == AV_PICTURE_TYPE_I; + if (s->pict_type == AV_PICTURE_TYPE_I) + s->current_picture.f->flags |= AV_FRAME_FLAG_KEY; + else + s->current_picture.f->flags &= ~AV_FRAME_FLAG_KEY; } s->intra_dc_precision = get_bits(&s->gb, 2); @@ -3046,7 +3060,7 @@ static int ipu_decode_frame(AVCodecContext *avctx, AVFrame *frame, return AVERROR_INVALIDDATA; frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; *got_frame = 1; return avpkt->size; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/mpeg12enc.c b/arm/raspi/third_party/ffmpeg/libavcodec/mpeg12enc.c index a932b596..4aa45e9e 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/mpeg12enc.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/mpeg12enc.c @@ -290,7 +290,7 @@ static void mpeg1_encode_sequence_header(MpegEncContext *s) AVRational aspect_ratio = s->avctx->sample_aspect_ratio; int aspect_ratio_info; - if (!s->current_picture.f->key_frame) + if (!(s->current_picture.f->flags & AV_FRAME_FLAG_KEY)) return; if (aspect_ratio.num == 0 || aspect_ratio.den == 0) @@ -530,7 +530,7 @@ void ff_mpeg1_encode_picture_header(MpegEncContext *s) if (s->progressive_sequence) put_bits(&s->pb, 1, 0); /* no repeat */ else - put_bits(&s->pb, 1, s->current_picture_ptr->f->top_field_first); + put_bits(&s->pb, 1, !!(s->current_picture_ptr->f->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST)); /* XXX: optimize the generation of this flag with entropy measures */ s->frame_pred_frame_dct = s->progressive_sequence; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/mpeg4videoenc.c b/arm/raspi/third_party/ffmpeg/libavcodec/mpeg4videoenc.c index c3e9ebea..777635c4 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/mpeg4videoenc.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/mpeg4videoenc.c @@ -1101,7 +1101,7 @@ int ff_mpeg4_encode_picture_header(MpegEncContext *s) } put_bits(&s->pb, 3, 0); /* intra dc VLC threshold */ if (!s->progressive_sequence) { - put_bits(&s->pb, 1, s->current_picture_ptr->f->top_field_first); + put_bits(&s->pb, 1, !!(s->current_picture_ptr->f->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST)); put_bits(&s->pb, 1, s->alternate_scan); } // FIXME sprite stuff diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/mpegvideo_dec.c b/arm/raspi/third_party/ffmpeg/libavcodec/mpegvideo_dec.c index 522a0aad..765ccd0b 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/mpegvideo_dec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/mpegvideo_dec.c @@ -331,19 +331,22 @@ FF_ENABLE_DEPRECATION_WARNINGS s->current_picture_ptr = pic; // FIXME use only the vars from current_pic - s->current_picture_ptr->f->top_field_first = s->top_field_first; + s->current_picture_ptr->f->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST * !!s->top_field_first; if (s->codec_id == AV_CODEC_ID_MPEG1VIDEO || s->codec_id == AV_CODEC_ID_MPEG2VIDEO) { if (s->picture_structure != PICT_FRAME) - s->current_picture_ptr->f->top_field_first = - (s->picture_structure == PICT_TOP_FIELD) == s->first_field; + s->current_picture_ptr->f->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST * + ((s->picture_structure == PICT_TOP_FIELD) == s->first_field); } - s->current_picture_ptr->f->interlaced_frame = !s->progressive_frame && - !s->progressive_sequence; + s->current_picture_ptr->f->flags |= AV_FRAME_FLAG_INTERLACED * (!s->progressive_frame && + !s->progressive_sequence); s->current_picture_ptr->field_picture = s->picture_structure != PICT_FRAME; s->current_picture_ptr->f->pict_type = s->pict_type; - s->current_picture_ptr->f->key_frame = s->pict_type == AV_PICTURE_TYPE_I; + if (s->pict_type == AV_PICTURE_TYPE_I) + s->current_picture.f->flags |= AV_FRAME_FLAG_KEY; + else + s->current_picture.f->flags &= ~AV_FRAME_FLAG_KEY; if ((ret = ff_mpeg_ref_picture(s->avctx, &s->current_picture, s->current_picture_ptr)) < 0) @@ -382,7 +385,7 @@ FF_ENABLE_DEPRECATION_WARNINGS s->last_picture_ptr = &s->picture[idx]; s->last_picture_ptr->reference = 3; - s->last_picture_ptr->f->key_frame = 0; + s->last_picture_ptr->f->flags &= ~AV_FRAME_FLAG_KEY; s->last_picture_ptr->f->pict_type = AV_PICTURE_TYPE_P; if (alloc_picture(s, s->last_picture_ptr) < 0) { @@ -424,7 +427,7 @@ FF_ENABLE_DEPRECATION_WARNINGS s->next_picture_ptr = &s->picture[idx]; s->next_picture_ptr->reference = 3; - s->next_picture_ptr->f->key_frame = 0; + s->next_picture_ptr->f->flags &= ~AV_FRAME_FLAG_KEY; s->next_picture_ptr->f->pict_type = AV_PICTURE_TYPE_P; if (alloc_picture(s, s->next_picture_ptr) < 0) { diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/mpegvideo_enc.c b/arm/raspi/third_party/ffmpeg/libavcodec/mpegvideo_enc.c index 7d3c8875..9bdf5dbe 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/mpegvideo_enc.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/mpegvideo_enc.c @@ -798,6 +798,11 @@ av_cold int ff_mpv_encode_init(AVCodecContext *avctx) AV_CODEC_FLAG_INTERLACED_ME) || s->alternate_scan); + if (s->lmin > s->lmax) { + av_log(avctx, AV_LOG_WARNING, "Clipping lmin value to %d\n", s->lmax); + s->lmin = s->lmax; + } + /* init */ ff_mpv_idct_init(s); if ((ret = ff_mpv_common_init(s)) < 0) @@ -902,8 +907,10 @@ av_cold int ff_mpv_encode_init(AVCodecContext *avctx) s->quant_precision = 5; - ff_set_cmp(&s->mecc, s->mecc.ildct_cmp, avctx->ildct_cmp); - ff_set_cmp(&s->mecc, s->mecc.frame_skip_cmp, s->frame_skip_cmp); + ret = ff_set_cmp(&s->mecc, s->mecc.ildct_cmp, avctx->ildct_cmp); + ret |= ff_set_cmp(&s->mecc, s->mecc.frame_skip_cmp, s->frame_skip_cmp); + if (ret < 0) + return AVERROR(EINVAL); if (CONFIG_H263_ENCODER && s->out_format == FMT_H263) { ff_h263_encode_init(s); @@ -1696,7 +1703,10 @@ static int frame_start(MpegEncContext *s) } s->current_picture_ptr->f->pict_type = s->pict_type; - s->current_picture_ptr->f->key_frame = s->pict_type == AV_PICTURE_TYPE_I; + if (s->pict_type == AV_PICTURE_TYPE_I) + s->current_picture.f->flags |= AV_FRAME_FLAG_KEY; + else + s->current_picture.f->flags &= ~AV_FRAME_FLAG_KEY; ff_mpeg_unref_picture(s->avctx, &s->current_picture); if ((ret = ff_mpeg_ref_picture(s->avctx, &s->current_picture, @@ -1972,7 +1982,7 @@ vbv_retry: return ret; } - if (s->current_picture.f->key_frame) + if (s->current_picture.f->flags & AV_FRAME_FLAG_KEY) pkt->flags |= AV_PKT_FLAG_KEY; if (s->mb_info) av_packet_shrink_side_data(pkt, AV_PKT_DATA_H263_MB_INFO, s->mb_info_size); @@ -3776,12 +3786,17 @@ static int encode_picture(MpegEncContext *s) } //FIXME var duplication - s->current_picture_ptr->f->key_frame = - s->current_picture.f->key_frame = s->pict_type == AV_PICTURE_TYPE_I; //FIXME pic_ptr + if (s->pict_type == AV_PICTURE_TYPE_I) { + s->current_picture_ptr->f->flags |= AV_FRAME_FLAG_KEY; //FIXME pic_ptr + s->current_picture.f->flags |= AV_FRAME_FLAG_KEY; + } else { + s->current_picture_ptr->f->flags &= ~AV_FRAME_FLAG_KEY; //FIXME pic_ptr + s->current_picture.f->flags &= ~AV_FRAME_FLAG_KEY; + } s->current_picture_ptr->f->pict_type = s->current_picture.f->pict_type = s->pict_type; - if (s->current_picture.f->key_frame) + if (s->current_picture.f->flags & AV_FRAME_FLAG_KEY) s->picture_in_gop_number=0; s->mb_x = s->mb_y = 0; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/mpegvideo_parser.c b/arm/raspi/third_party/ffmpeg/libavcodec/mpegvideo_parser.c index 8e7e88ff..1204789c 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/mpegvideo_parser.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/mpegvideo_parser.c @@ -129,6 +129,7 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s, s->pict_type = (buf[1] >> 3) & 7; if (bytes_left >= 4) vbv_delay = ((buf[1] & 0x07) << 13) | (buf[2] << 5) | (buf[3] >> 3); + s->repeat_pict = 1; } break; case SEQ_START_CODE: @@ -144,7 +145,11 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s, pc->frame_rate = avctx->framerate = ff_mpeg12_frame_rate_tab[frame_rate_index]; bit_rate = (buf[4]<<10) | (buf[5]<<2) | (buf[6]>>6); avctx->codec_id = AV_CODEC_ID_MPEG1VIDEO; +#if FF_API_TICKS_PER_FRAME +FF_DISABLE_DEPRECATION_WARNINGS avctx->ticks_per_frame = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } break; case EXT_START_CODE: @@ -176,7 +181,11 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s, avctx->framerate.num = pc->frame_rate.num * (frame_rate_ext_n + 1); avctx->framerate.den = pc->frame_rate.den * (frame_rate_ext_d + 1); avctx->codec_id = AV_CODEC_ID_MPEG2VIDEO; +#if FF_API_TICKS_PER_FRAME +FF_DISABLE_DEPRECATION_WARNINGS avctx->ticks_per_frame = 2; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } break; case 0x8: /* picture coding extension */ @@ -186,7 +195,6 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s, progressive_frame = buf[4] & (1 << 7); /* check if we must repeat the frame */ - s->repeat_pict = 1; if (repeat_first_field) { if (pc->progressive_sequence) { if (top_field_first) diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/mscc.c b/arm/raspi/third_party/ffmpeg/libavcodec/mscc.c index e8406aa2..d1d23e67 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/mscc.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/mscc.c @@ -150,7 +150,11 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, const uint8_t *pal = av_packet_get_side_data(avpkt, AV_PKT_DATA_PALETTE, &size); if (pal && size == AVPALETTE_SIZE) { +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif for (j = 0; j < 256; j++) s->pal[j] = 0xFF000000 | AV_RL32(pal + j * 4); } else if (pal) { @@ -200,7 +204,7 @@ inflate_error: s->uncomp_buf + s->bpp * j * avctx->width, s->bpp * avctx->width); } - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_I; *got_frame = 1; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/msmpeg4enc.c b/arm/raspi/third_party/ffmpeg/libavcodec/msmpeg4enc.c index 54121438..9828901b 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/msmpeg4enc.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/msmpeg4enc.c @@ -280,7 +280,19 @@ void ff_msmpeg4_encode_picture_header(MpegEncContext * s) void ff_msmpeg4_encode_ext_header(MpegEncContext * s) { - unsigned fps = s->avctx->time_base.den / s->avctx->time_base.num / FFMAX(s->avctx->ticks_per_frame, 1); + unsigned fps; + + if (s->avctx->framerate.num > 0 && s->avctx->framerate.den > 0) + fps = s->avctx->framerate.num / s->avctx->framerate.den; + else +FF_DISABLE_DEPRECATION_WARNINGS + fps = s->avctx->time_base.den / s->avctx->time_base.num +#if FF_API_TICKS_PER_FRAME + / FFMAX(s->avctx->ticks_per_frame, 1) +#endif + ; +FF_ENABLE_DEPRECATION_WARNINGS + put_bits(&s->pb, 5, FFMIN(fps, 31)); //yes 29.97 -> 29 put_bits(&s->pb, 11, FFMIN(s->bit_rate / 1024, 2047)); diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/msp2dec.c b/arm/raspi/third_party/ffmpeg/libavcodec/msp2dec.c index 9c51c35c..30a2825e 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/msp2dec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/msp2dec.c @@ -47,7 +47,7 @@ static int msp2_decode_frame(AVCodecContext *avctx, AVFrame *p, return ret; p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; bytestream2_init(&idx, buf, 2 * avctx->height); buf += 2 * avctx->height; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/msrle.c b/arm/raspi/third_party/ffmpeg/libavcodec/msrle.c index b6fa7f7a..51e843e4 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/msrle.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/msrle.c @@ -95,7 +95,14 @@ static int msrle_decode_frame(AVCodecContext *avctx, AVFrame *rframe, return ret; if (avctx->bits_per_coded_sample > 1 && avctx->bits_per_coded_sample <= 8) { - s->frame->palette_has_changed = ff_copy_palette(s->pal, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS + s->frame->palette_has_changed = +#endif + ff_copy_palette(s->pal, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_ENABLE_DEPRECATION_WARNINGS +#endif /* make the palette available */ memcpy(s->frame->data[1], s->pal, AVPALETTE_SIZE); diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/mss1.c b/arm/raspi/third_party/ffmpeg/libavcodec/mss1.c index 77585210..fb5fc34e 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/mss1.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/mss1.c @@ -165,12 +165,12 @@ static int mss1_decode_frame(AVCodecContext *avctx, AVFrame *rframe, c->corrupted = 0; ff_mss12_slicecontext_reset(&ctx->sc); pal_changed = decode_pal(c, &acoder); - ctx->pic->key_frame = 1; + ctx->pic->flags |= AV_FRAME_FLAG_KEY; ctx->pic->pict_type = AV_PICTURE_TYPE_I; } else { if (c->corrupted) return AVERROR_INVALIDDATA; - ctx->pic->key_frame = 0; + ctx->pic->flags &= ~AV_FRAME_FLAG_KEY; ctx->pic->pict_type = AV_PICTURE_TYPE_P; } c->corrupted = ff_mss12_decode_rect(&ctx->sc, &acoder, 0, 0, @@ -178,7 +178,11 @@ static int mss1_decode_frame(AVCodecContext *avctx, AVFrame *rframe, if (c->corrupted) return AVERROR_INVALIDDATA; memcpy(ctx->pic->data[1], c->pal, AVPALETTE_SIZE); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS ctx->pic->palette_has_changed = pal_changed; +FF_ENABLE_DEPRECATION_WARNINGS +#endif if ((ret = av_frame_ref(rframe, ctx->pic)) < 0) return ret; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/mss2.c b/arm/raspi/third_party/ffmpeg/libavcodec/mss2.c index 1d1ed11f..98103f7f 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/mss2.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/mss2.c @@ -660,7 +660,10 @@ static int mss2_decode_frame(AVCodecContext *avctx, AVFrame *frame, frame->linesize[0] * (avctx->height - 1); c->rgb_stride = -frame->linesize[0]; - frame->key_frame = keyframe; + if (keyframe) + frame->flags |= AV_FRAME_FLAG_KEY; + else + frame->flags &= ~AV_FRAME_FLAG_KEY; frame->pict_type = keyframe ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; if (is_555) { diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/mss3.c b/arm/raspi/third_party/ffmpeg/libavcodec/mss3.c index 023f110e..2701e9b9 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/mss3.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/mss3.c @@ -740,7 +740,10 @@ static int mss3_decode_frame(AVCodecContext *avctx, AVFrame *rframe, if ((ret = ff_reget_buffer(avctx, c->pic, 0)) < 0) return ret; - c->pic->key_frame = keyframe; + if (keyframe) + c->pic->flags |= AV_FRAME_FLAG_KEY; + else + c->pic->flags &= ~AV_FRAME_FLAG_KEY; c->pic->pict_type = keyframe ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; if (!bytestream2_get_bytes_left(&gb)) { if ((ret = av_frame_ref(rframe, c->pic)) < 0) diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/mss4.c b/arm/raspi/third_party/ffmpeg/libavcodec/mss4.c index dceb42da..75f31bed 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/mss4.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/mss4.c @@ -503,7 +503,10 @@ static int mss4_decode_frame(AVCodecContext *avctx, AVFrame *rframe, if ((ret = ff_reget_buffer(avctx, c->pic, 0)) < 0) return ret; - c->pic->key_frame = (frame_type == INTRA_FRAME); + if (frame_type == INTRA_FRAME) + c->pic->flags |= AV_FRAME_FLAG_KEY; + else + c->pic->flags &= ~AV_FRAME_FLAG_KEY; c->pic->pict_type = (frame_type == INTRA_FRAME) ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; if (frame_type == SKIP_FRAME) { diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/msvideo1.c b/arm/raspi/third_party/ffmpeg/libavcodec/msvideo1.c index 9903ff36..ca4583d8 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/msvideo1.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/msvideo1.c @@ -312,7 +312,14 @@ static int msvideo1_decode_frame(AVCodecContext *avctx, AVFrame *rframe, return ret; if (s->mode_8bit) { - s->frame->palette_has_changed = ff_copy_palette(s->pal, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS + s->frame->palette_has_changed = +#endif + ff_copy_palette(s->pal, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_ENABLE_DEPRECATION_WARNINGS +#endif } if (s->mode_8bit) diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/msvideo1enc.c b/arm/raspi/third_party/ffmpeg/libavcodec/msvideo1enc.c index 36cfd39a..1fb8be88 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/msvideo1enc.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/msvideo1enc.c @@ -84,6 +84,8 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, if(!c->prev) c->prev = av_malloc(avctx->width * 3 * (avctx->height + 3)); + if (!c->prev) + return AVERROR(ENOMEM); prevptr = c->prev + avctx->width * 3 * (FFALIGN(avctx->height, 4) - 1); src = (const uint16_t*)(p->data[0] + p->linesize[0]*(FFALIGN(avctx->height, 4) - 1)); if(c->keyint >= avctx->keyint_min) diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/mv30.c b/arm/raspi/third_party/ffmpeg/libavcodec/mv30.c index 24b04400..c2d05470 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/mv30.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/mv30.c @@ -623,9 +623,8 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, get_qtable(s->intraq_tab[0], s->intra_quant, luma_tab); get_qtable(s->intraq_tab[1], s->intra_quant, chroma_tab); - frame->key_frame = s->is_inter == 0; - - if (frame->key_frame) { + if (s->is_inter == 0) { + frame->flags |= AV_FRAME_FLAG_KEY; ret = decode_intra(avctx, gb, frame); if (ret < 0) return ret; @@ -638,6 +637,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, return AVERROR_INVALIDDATA; } + frame->flags &= ~AV_FRAME_FLAG_KEY; ret = decode_inter(avctx, gb, frame, s->prev_frame); if (ret < 0) return ret; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/mvcdec.c b/arm/raspi/third_party/ffmpeg/libavcodec/mvcdec.c index 1e99f44a..6c971f70 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/mvcdec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/mvcdec.c @@ -247,7 +247,7 @@ static int mvc_decode_frame(AVCodecContext *avctx, AVFrame *frame, return ret; frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; *got_frame = 1; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/mvha.c b/arm/raspi/third_party/ffmpeg/libavcodec/mvha.c index 55056c91..8fb4a69e 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/mvha.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/mvha.c @@ -272,7 +272,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, } frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; *got_frame = 1; return avpkt->size; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/mwsc.c b/arm/raspi/third_party/ffmpeg/libavcodec/mwsc.c index f57648bb..c7045ac7 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/mwsc.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/mwsc.c @@ -119,10 +119,13 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, bytestream2_init(&gbp, s->prev_frame->data[0], avctx->height * s->prev_frame->linesize[0]); bytestream2_init_writer(&pb, frame->data[0], avctx->height * frame->linesize[0]); - frame->key_frame = rle_uncompress(&gb, &pb, &gbp, avctx->width, avctx->height, avctx->width * 3, - frame->linesize[0], s->prev_frame->linesize[0]); + if (rle_uncompress(&gb, &pb, &gbp, avctx->width, avctx->height, avctx->width * 3, + frame->linesize[0], s->prev_frame->linesize[0])) + frame->flags |= AV_FRAME_FLAG_KEY; + else + frame->flags &= ~AV_FRAME_FLAG_KEY; - frame->pict_type = frame->key_frame ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; + frame->pict_type = (frame->flags & AV_FRAME_FLAG_KEY) ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; av_frame_unref(s->prev_frame); if ((ret = av_frame_ref(s->prev_frame, frame)) < 0) diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/mxpegdec.c b/arm/raspi/third_party/ffmpeg/libavcodec/mxpegdec.c index 760b12f0..73df2ff9 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/mxpegdec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/mxpegdec.c @@ -286,11 +286,11 @@ static int mxpeg_decode_frame(AVCodecContext *avctx, AVFrame *rframe, AV_GET_BUFFER_FLAG_REF)) < 0) return ret; jpg->picture_ptr->pict_type = AV_PICTURE_TYPE_P; - jpg->picture_ptr->key_frame = 0; + jpg->picture_ptr->flags &= ~AV_FRAME_FLAG_KEY; jpg->got_picture = 1; } else { jpg->picture_ptr->pict_type = AV_PICTURE_TYPE_I; - jpg->picture_ptr->key_frame = 1; + jpg->picture_ptr->flags |= AV_FRAME_FLAG_KEY; } if (s->got_mxm_bitmask) { diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/notchlc.c b/arm/raspi/third_party/ffmpeg/libavcodec/notchlc.c index 90704e1a..d973c83a 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/notchlc.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/notchlc.c @@ -514,7 +514,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, return ret; p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; *got_frame = 1; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/nuv.c b/arm/raspi/third_party/ffmpeg/libavcodec/nuv.c index d5391eee..82048e93 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/nuv.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/nuv.c @@ -263,7 +263,10 @@ retry: } c->pic->pict_type = keyframe ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; - c->pic->key_frame = keyframe; + if (keyframe) + c->pic->flags |= AV_FRAME_FLAG_KEY; + else + c->pic->flags &= ~AV_FRAME_FLAG_KEY; // decompress/copy/whatever data switch (comptype) { case NUV_LZO: diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/nvdec_mpeg12.c b/arm/raspi/third_party/ffmpeg/libavcodec/nvdec_mpeg12.c index e1073558..3b9ff607 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/nvdec_mpeg12.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/nvdec_mpeg12.c @@ -83,8 +83,9 @@ static int nvdec_mpeg12_start_frame(AVCodecContext *avctx, const uint8_t *buffer }; for (i = 0; i < 64; ++i) { - ppc->QuantMatrixIntra[i] = s->intra_matrix[i]; - ppc->QuantMatrixInter[i] = s->inter_matrix[i]; + int n = s->idsp.idct_permutation[i]; + ppc->QuantMatrixIntra[i] = s->intra_matrix[n]; + ppc->QuantMatrixInter[i] = s->inter_matrix[n]; } return 0; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/nvdec_mpeg4.c b/arm/raspi/third_party/ffmpeg/libavcodec/nvdec_mpeg4.c index eac138cc..c193f6b6 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/nvdec_mpeg4.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/nvdec_mpeg4.c @@ -88,8 +88,9 @@ static int nvdec_mpeg4_start_frame(AVCodecContext *avctx, const uint8_t *buffer, }; for (i = 0; i < 64; ++i) { - ppc->QuantMatrixIntra[i] = s->intra_matrix[i]; - ppc->QuantMatrixInter[i] = s->inter_matrix[i]; + int n = s->idsp.idct_permutation[i]; + ppc->QuantMatrixIntra[i] = s->intra_matrix[n]; + ppc->QuantMatrixInter[i] = s->inter_matrix[n]; } // We need to pass the full frame buffer and not just the slice diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/nvenc.c b/arm/raspi/third_party/ffmpeg/libavcodec/nvenc.c index 9acf3e86..c1798ce5 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/nvenc.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/nvenc.c @@ -1571,7 +1571,13 @@ static av_cold int nvenc_setup_encoder(AVCodecContext *avctx) ctx->init_encode_params.frameRateDen = avctx->framerate.den; } else { ctx->init_encode_params.frameRateNum = avctx->time_base.den; - ctx->init_encode_params.frameRateDen = avctx->time_base.num * avctx->ticks_per_frame; +FF_DISABLE_DEPRECATION_WARNINGS + ctx->init_encode_params.frameRateDen = avctx->time_base.num +#if FF_API_TICKS_PER_FRAME + * avctx->ticks_per_frame +#endif + ; +FF_ENABLE_DEPRECATION_WARNINGS } ctx->init_encode_params.enableEncodeAsync = 0; @@ -2266,7 +2272,14 @@ static int nvenc_set_timestamp(AVCodecContext *avctx, dts = reorder_queue_dequeue(ctx->reorder_queue, avctx, pkt); if (avctx->codec_descriptor->props & AV_CODEC_PROP_REORDER) { - pkt->dts = dts - FFMAX(ctx->encode_config.frameIntervalP - 1, 0) * FFMAX(avctx->ticks_per_frame, 1); +FF_DISABLE_DEPRECATION_WARNINGS + pkt->dts = dts - + FFMAX(ctx->encode_config.frameIntervalP - 1, 0) +#if FF_API_TICKS_PER_FRAME + * FFMAX(avctx->ticks_per_frame, 1) +#endif + * FFMAX(avctx->time_base.num, 1); +FF_ENABLE_DEPRECATION_WARNINGS } else { pkt->dts = pkt->pts; } @@ -2633,7 +2646,7 @@ static int nvenc_send_frame(AVCodecContext *avctx, const AVFrame *frame) pic_params.outputBitstream = in_surf->output_surface; if (avctx->flags & AV_CODEC_FLAG_INTERLACED_DCT) { - if (frame->top_field_first) + if (frame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST) pic_params.pictureStruct = NV_ENC_PIC_STRUCT_FIELD_TOP_BOTTOM; else pic_params.pictureStruct = NV_ENC_PIC_STRUCT_FIELD_BOTTOM_TOP; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/options_table.h b/arm/raspi/third_party/ffmpeg/libavcodec/options_table.h index f331ce28..03059cc3 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/options_table.h +++ b/arm/raspi/third_party/ffmpeg/libavcodec/options_table.h @@ -259,8 +259,8 @@ static const AVOption avcodec_options[] = { {"default" , "discard useless frames", 0, AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_DEFAULT }, INT_MIN, INT_MAX, V|D, "avdiscard"}, {"noref" , "discard all non-reference frames", 0, AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_NONREF }, INT_MIN, INT_MAX, V|D, "avdiscard"}, {"bidir" , "discard all bidirectional frames", 0, AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_BIDIR }, INT_MIN, INT_MAX, V|D, "avdiscard"}, -{"nokey" , "discard all frames except keyframes", 0, AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_NONKEY }, INT_MIN, INT_MAX, V|D, "avdiscard"}, {"nointra" , "discard all frames except I frames", 0, AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_NONINTRA}, INT_MIN, INT_MAX, V|D, "avdiscard"}, +{"nokey" , "discard all frames except keyframes", 0, AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_NONKEY }, INT_MIN, INT_MAX, V|D, "avdiscard"}, {"all" , "discard all frames", 0, AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_ALL }, INT_MIN, INT_MAX, V|D, "avdiscard"}, {"bidir_refine", "refine the two motion vectors used in bidirectional macroblocks", OFFSET(bidir_refine), AV_OPT_TYPE_INT, {.i64 = 1 }, 0, 4, V|E}, {"keyint_min", "minimum interval between IDR-frames", OFFSET(keyint_min), AV_OPT_TYPE_INT, {.i64 = 25 }, INT_MIN, INT_MAX, V|E}, @@ -276,7 +276,9 @@ static const AVOption avcodec_options[] = { #endif {"rc_max_vbv_use", NULL, OFFSET(rc_max_available_vbv_use), AV_OPT_TYPE_FLOAT, {.dbl = 0 }, 0.0, FLT_MAX, V|E}, {"rc_min_vbv_use", NULL, OFFSET(rc_min_vbv_overflow_use), AV_OPT_TYPE_FLOAT, {.dbl = 3 }, 0.0, FLT_MAX, V|E}, +#if FF_API_TICKS_PER_FRAME {"ticks_per_frame", NULL, OFFSET(ticks_per_frame), AV_OPT_TYPE_INT, {.i64 = 1 }, 1, INT_MAX, A|V|E|D}, +#endif {"color_primaries", "color primaries", OFFSET(color_primaries), AV_OPT_TYPE_INT, {.i64 = AVCOL_PRI_UNSPECIFIED }, 1, INT_MAX, V|E|D, "color_primaries_type"}, {"bt709", "BT.709", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_PRI_BT709 }, INT_MIN, INT_MAX, V|E|D, "color_primaries_type"}, {"unknown", "Unspecified", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_PRI_UNSPECIFIED }, INT_MIN, INT_MAX, V|E|D, "color_primaries_type"}, diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/pafvideo.c b/arm/raspi/third_party/ffmpeg/libavcodec/pafvideo.c index 458fe9ff..14eb4243 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/pafvideo.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/pafvideo.c @@ -296,10 +296,10 @@ static int paf_video_decode(AVCodecContext *avctx, AVFrame *rframe, if (code & 0x20) { // frame is keyframe memset(c->pic->data[1], 0, AVPALETTE_SIZE); c->current_frame = 0; - c->pic->key_frame = 1; + c->pic->flags |= AV_FRAME_FLAG_KEY; c->pic->pict_type = AV_PICTURE_TYPE_I; } else { - c->pic->key_frame = 0; + c->pic->flags &= ~AV_FRAME_FLAG_KEY; c->pic->pict_type = AV_PICTURE_TYPE_P; } @@ -327,7 +327,11 @@ static int paf_video_decode(AVCodecContext *avctx, AVFrame *rframe, b = b << 2 | b >> 4; *out++ = (0xFFU << 24) | (r << 16) | (g << 8) | b; } +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS c->pic->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } c->dirty[c->current_frame] = 1; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/parser.c b/arm/raspi/third_party/ffmpeg/libavcodec/parser.c index 49de7e6a..efc28b89 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/parser.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/parser.c @@ -166,6 +166,10 @@ int av_parser_parse2(AVCodecParserContext *s, AVCodecContext *avctx, #define FILL(name) if(s->name > 0 && avctx->name <= 0) avctx->name = s->name if (avctx->codec_type == AVMEDIA_TYPE_VIDEO) { FILL(field_order); + FILL(coded_width); + FILL(coded_height); + FILL(width); + FILL(height); } /* update the file pointer */ diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/pcm_rechunk_bsf.c b/arm/raspi/third_party/ffmpeg/libavcodec/pcm_rechunk_bsf.c index 108d9e90..28b5722a 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/pcm_rechunk_bsf.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/pcm_rechunk_bsf.c @@ -139,6 +139,7 @@ static int rechunk_filter(AVBSFContext *ctx, AVPacket *pkt) av_packet_move_ref(pkt, s->out_pkt); return send_packet(s, nb_samples, pkt); } + av_assert0(!s->in_pkt->size); } else if (s->in_pkt->size > data_size) { ret = av_packet_ref(pkt, s->in_pkt); if (ret < 0) @@ -151,7 +152,8 @@ static int rechunk_filter(AVBSFContext *ctx, AVPacket *pkt) av_packet_move_ref(pkt, s->in_pkt); return send_packet(s, nb_samples, pkt); } - } + } else + av_packet_unref(s->in_pkt); ret = ff_bsf_get_packet_ref(ctx, s->in_pkt); if (ret == AVERROR_EOF && s->out_pkt->size) { diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/pdvdec.c b/arm/raspi/third_party/ffmpeg/libavcodec/pdvdec.c new file mode 100644 index 00000000..d50c4e72 --- /dev/null +++ b/arm/raspi/third_party/ffmpeg/libavcodec/pdvdec.c @@ -0,0 +1,141 @@ +/* + * PDV video format + * + * Copyright (c) 2023 Paul B Mahol + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "avcodec.h" +#include "codec_internal.h" +#include "decode.h" +#include "zlib_wrapper.h" + +#include + +typedef struct PDVContext { + AVFrame *previous_frame; + FFZStream zstream; +} PDVContext; + +static av_cold int decode_init(AVCodecContext *avctx) +{ + PDVContext *s = avctx->priv_data; + + avctx->pix_fmt = AV_PIX_FMT_MONOBLACK; + + s->previous_frame = av_frame_alloc(); + if (!s->previous_frame) + return AVERROR(ENOMEM); + + return ff_inflate_init(&s->zstream, avctx); +} + +static av_cold int decode_end(AVCodecContext *avctx) +{ + PDVContext *s = avctx->priv_data; + + av_frame_free(&s->previous_frame); + ff_inflate_end(&s->zstream); + + return 0; +} + +static int decode_frame(AVCodecContext *avctx, AVFrame *frame, + int *got_frame, AVPacket *avpkt) +{ + PDVContext *s = avctx->priv_data; + AVFrame *prev_frame = s->previous_frame; + z_stream *const zstream = &s->zstream.zstream; + uint8_t *dst, *prev = prev_frame->data[0]; + int ret, zret; + + if (avctx->skip_frame >= AVDISCARD_ALL || + (avctx->skip_frame >= AVDISCARD_NONINTRA && + !(avpkt->flags & AV_PKT_FLAG_KEY))) + return avpkt->size; + + zret = inflateReset(zstream); + if (zret != Z_OK) { + av_log(avctx, AV_LOG_ERROR, "Could not reset inflate: %d.\n", zret); + return AVERROR_INVALIDDATA; + } + + if ((ret = ff_get_buffer(avctx, frame, AV_GET_BUFFER_FLAG_REF)) < 0) + return ret; + + zstream->next_in = avpkt->data; + zstream->avail_in = avpkt->size; + + dst = frame->data[0]; + for (int i = 0; i < avctx->height; i++) { + zstream->next_out = dst; + zstream->avail_out = (avctx->width + 7) >> 3; + + zret = inflate(zstream, Z_SYNC_FLUSH); + if (zret != Z_OK && zret != Z_STREAM_END) { + av_log(avctx, AV_LOG_ERROR, + "Inflate failed with return code: %d.\n", zret); + return AVERROR_INVALIDDATA; + } + + if (prev && !(avpkt->flags & AV_PKT_FLAG_KEY)) { + for (int j = 0; j < (avctx->width + 7) >> 3; j++) + dst[j] ^= prev[j]; + prev += prev_frame->linesize[0]; + } + + dst += frame->linesize[0]; + } + + av_frame_unref(s->previous_frame); + if ((ret = av_frame_ref(s->previous_frame, frame)) < 0) + return ret; + + if (avpkt->flags & AV_PKT_FLAG_KEY) { + frame->flags |= AV_FRAME_FLAG_KEY; + frame->pict_type = AV_PICTURE_TYPE_I; + } else { + frame->pict_type = AV_PICTURE_TYPE_P; + } + + *got_frame = 1; + + return avpkt->size; +} + +static void decode_flush(AVCodecContext *avctx) +{ + PDVContext *s = avctx->priv_data; + + av_frame_unref(s->previous_frame); +} + +const FFCodec ff_pdv_decoder = { + .p.name = "pdv", + CODEC_LONG_NAME("PDV (PlayDate Video)"), + .priv_data_size = sizeof(PDVContext), + .p.type = AVMEDIA_TYPE_VIDEO, + .p.id = AV_CODEC_ID_PDV, + .p.capabilities = AV_CODEC_CAP_DR1, + .caps_internal = FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM | + FF_CODEC_CAP_INIT_CLEANUP, + .init = decode_init, + .close = decode_end, + .flush = decode_flush, + FF_CODEC_DECODE_CB(decode_frame), +}; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/pgxdec.c b/arm/raspi/third_party/ffmpeg/libavcodec/pgxdec.c index e5d1df78..cc7cdb8c 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/pgxdec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/pgxdec.c @@ -140,7 +140,7 @@ static int pgx_decode_frame(AVCodecContext *avctx, AVFrame *p, if ((ret = ff_get_buffer(avctx, p, 0)) < 0) return ret; p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; avctx->bits_per_raw_sample = depth; if (bpp == 8) write_frame_8(p, &g, width, height, sign, depth); diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/photocd.c b/arm/raspi/third_party/ffmpeg/libavcodec/photocd.c index 3030a80e..3a09b819 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/photocd.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/photocd.c @@ -332,7 +332,7 @@ static int photocd_decode_frame(AVCodecContext *avctx, AVFrame *p, return ret; p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; bytestream2_init(gb, avpkt->data, avpkt->size); diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/pictordec.c b/arm/raspi/third_party/ffmpeg/libavcodec/pictordec.c index aef3d3de..5aaa725b 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/pictordec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/pictordec.c @@ -191,7 +191,11 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, return ret; memset(frame->data[0], 0, s->height * frame->linesize[0]); frame->pict_type = AV_PICTURE_TYPE_I; +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif pos_after_pal = bytestream2_tell(&s->g) + esize; palette = (uint32_t*)frame->data[1]; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/pixlet.c b/arm/raspi/third_party/ffmpeg/libavcodec/pixlet.c index b349d397..6e925308 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/pixlet.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/pixlet.c @@ -667,7 +667,7 @@ static int pixlet_decode_frame(AVCodecContext *avctx, AVFrame *p, bytestream2_skip(&ctx->gb, 8); p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; p->color_range = AVCOL_RANGE_JPEG; ret = ff_thread_get_buffer(avctx, p, 0); diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/pngdec.c b/arm/raspi/third_party/ffmpeg/libavcodec/pngdec.c index 9403d72f..0369d1c4 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/pngdec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/pngdec.c @@ -98,6 +98,7 @@ typedef struct PNGDecContext { int bpp; int has_trns; uint8_t transparent_color_be[6]; + int significant_bits; uint32_t palette[256]; uint8_t *crow_buf; @@ -716,6 +717,14 @@ static int populate_avctx_color_fields(AVCodecContext *avctx, AVFrame *frame) avctx->colorspace = frame->colorspace = AVCOL_SPC_RGB; avctx->color_range = frame->color_range = AVCOL_RANGE_JPEG; + /* + * tRNS sets alpha depth to full, so we ignore sBIT if set. + * As a result we must wait until now to set + * avctx->bits_per_raw_sample in case tRNS appears after sBIT + */ + if (!s->has_trns && s->significant_bits > 0) + avctx->bits_per_raw_sample = s->significant_bits; + return 0; } @@ -725,6 +734,8 @@ static int decode_idat_chunk(AVCodecContext *avctx, PNGDecContext *s, int ret; size_t byte_depth = s->bit_depth > 8 ? 2 : 1; + if (!p) + return AVERROR_INVALIDDATA; if (!(s->hdr_state & PNG_IHDR)) { av_log(avctx, AV_LOG_ERROR, "IDAT without IHDR\n"); return AVERROR_INVALIDDATA; @@ -831,8 +842,8 @@ static int decode_idat_chunk(AVCodecContext *avctx, PNGDecContext *s, } p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; - p->interlaced_frame = !!s->interlace_type; + p->flags |= AV_FRAME_FLAG_KEY; + p->flags |= AV_FRAME_FLAG_INTERLACED * !!s->interlace_type; if ((ret = populate_avctx_color_fields(avctx, p)) < 0) return ret; @@ -963,7 +974,7 @@ static int decode_trns_chunk(AVCodecContext *avctx, PNGDecContext *s, return 0; } -static int decode_iccp_chunk(PNGDecContext *s, GetByteContext *gb, AVFrame *f) +static int decode_iccp_chunk(PNGDecContext *s, GetByteContext *gb) { int ret, cnt = 0; AVBPrint bp; @@ -996,6 +1007,41 @@ fail: return ret; } +static int decode_sbit_chunk(AVCodecContext *avctx, PNGDecContext *s, + GetByteContext *gb) +{ + int bits = 0; + int channels; + + if (!(s->hdr_state & PNG_IHDR)) { + av_log(avctx, AV_LOG_ERROR, "sBIT before IHDR\n"); + return AVERROR_INVALIDDATA; + } + + if (s->pic_state & PNG_IDAT) { + av_log(avctx, AV_LOG_ERROR, "sBIT after IDAT\n"); + return AVERROR_INVALIDDATA; + } + + channels = ff_png_get_nb_channels(s->color_type); + + if (bytestream2_get_bytes_left(gb) != channels) + return AVERROR_INVALIDDATA; + + for (int i = 0; i < channels; i++) { + int b = bytestream2_get_byteu(gb); + bits = FFMAX(b, bits); + } + + if (bits < 0 || bits > s->bit_depth) { + av_log(avctx, AV_LOG_ERROR, "Invalid significant bits: %d\n", bits); + return AVERROR_INVALIDDATA; + } + s->significant_bits = bits; + + return 0; +} + static void handle_small_bpp(PNGDecContext *s, AVFrame *p) { if (s->bits_per_pixel == 1 && s->color_type == PNG_COLOR_TYPE_PALETTE) { @@ -1422,7 +1468,7 @@ static int decode_frame_common(AVCodecContext *avctx, PNGDecContext *s, s->have_srgb = 1; break; case MKTAG('i', 'C', 'C', 'P'): { - if ((ret = decode_iccp_chunk(s, &gb_chunk, p)) < 0) + if ((ret = decode_iccp_chunk(s, &gb_chunk)) < 0) goto fail; break; } @@ -1440,6 +1486,10 @@ static int decode_frame_common(AVCodecContext *avctx, PNGDecContext *s, break; } + case MKTAG('s', 'B', 'I', 'T'): + if ((ret = decode_sbit_chunk(avctx, s, &gb_chunk)) < 0) + goto fail; + break; case MKTAG('g', 'A', 'M', 'A'): { AVBPrint bp; char *gamma_str; @@ -1467,6 +1517,9 @@ static int decode_frame_common(AVCodecContext *avctx, PNGDecContext *s, } exit_loop: + if (!p) + return AVERROR_INVALIDDATA; + if (avctx->codec_id == AV_CODEC_ID_PNG && avctx->skip_frame == AVDISCARD_ALL) { return 0; @@ -1679,7 +1732,7 @@ static int decode_frame_apng(AVCodecContext *avctx, AVFrame *p, if ((ret = inflateReset(&s->zstream.zstream)) != Z_OK) return AVERROR_EXTERNAL; bytestream2_init(&s->gb, avctx->extradata, avctx->extradata_size); - if ((ret = decode_frame_common(avctx, s, p, avpkt)) < 0) + if ((ret = decode_frame_common(avctx, s, NULL, avpkt)) < 0) return ret; } diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/pngenc.c b/arm/raspi/third_party/ffmpeg/libavcodec/pngenc.c index 1489256d..21b033ea 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/pngenc.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/pngenc.c @@ -442,6 +442,12 @@ static int encode_headers(AVCodecContext *avctx, const AVFrame *pict) if (png_get_gama(pict->color_trc, s->buf)) png_write_chunk(&s->bytestream, MKTAG('g', 'A', 'M', 'A'), s->buf, 4); + if (avctx->bits_per_raw_sample > 0 && avctx->bits_per_raw_sample < s->bit_depth) { + int len = ff_png_get_nb_channels(s->color_type); + memset(s->buf, avctx->bits_per_raw_sample, len); + png_write_chunk(&s->bytestream, MKTAG('s', 'B', 'I', 'T'), s->buf, len); + } + /* put the palette if needed, must be after colorspace information */ if (s->color_type == PNG_COLOR_TYPE_PALETTE) { int has_alpha, alpha, i; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/pnmdec.c b/arm/raspi/third_party/ffmpeg/libavcodec/pnmdec.c index 978e4c03..72bc83b2 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/pnmdec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/pnmdec.c @@ -65,7 +65,7 @@ static int pnm_decode_frame(AVCodecContext *avctx, AVFrame *p, if ((ret = ff_get_buffer(avctx, p, 0)) < 0) return ret; p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; avctx->bits_per_raw_sample = av_log2(s->maxval) + 1; switch (avctx->pix_fmt) { diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/proresdec2.c b/arm/raspi/third_party/ffmpeg/libavcodec/proresdec2.c index c821a078..6445d948 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/proresdec2.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/proresdec2.c @@ -252,8 +252,9 @@ static int decode_frame_header(ProresContext *ctx, const uint8_t *buf, ctx->scan = ctx->progressive_scan; // permuted } else { ctx->scan = ctx->interlaced_scan; // permuted - ctx->frame->interlaced_frame = 1; - ctx->frame->top_field_first = ctx->frame_type == 1; + ctx->frame->flags |= AV_FRAME_FLAG_INTERLACED; + if (ctx->frame_type == 1) + ctx->frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST; } if (ctx->alpha_info) { @@ -706,7 +707,7 @@ static int decode_slice_thread(AVCodecContext *avctx, void *arg, int jobnr, int dest_u = pic->data[1] + (slice->mb_y << 4) * chroma_stride + (slice->mb_x << mb_x_shift); dest_v = pic->data[2] + (slice->mb_y << 4) * chroma_stride + (slice->mb_x << mb_x_shift); - if (ctx->frame_type && ctx->first_field ^ ctx->frame->top_field_first) { + if (ctx->frame_type && ctx->first_field ^ !!(ctx->frame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST)) { dest_y += pic->linesize[0]; dest_u += pic->linesize[1]; dest_v += pic->linesize[2]; @@ -792,7 +793,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, ctx->frame = frame; ctx->frame->pict_type = AV_PICTURE_TYPE_I; - ctx->frame->key_frame = 1; + ctx->frame->flags |= AV_FRAME_FLAG_KEY; ctx->first_field = 1; buf += 8; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/proresenc_anatoliy.c b/arm/raspi/third_party/ffmpeg/libavcodec/proresenc_anatoliy.c index 09196c7a..fc48c97d 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/proresenc_anatoliy.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/proresenc_anatoliy.c @@ -746,7 +746,8 @@ static int prores_encode_frame(AVCodecContext *avctx, AVPacket *pkt, if (avctx->profile >= FF_PROFILE_PRORES_4444) /* 4444 or 4444 Xq */ frame_flags |= 0x40; /* 444 chroma */ if (ctx->is_interlaced) { - if (pict->top_field_first || !pict->interlaced_frame) { /* tff frame or progressive frame interpret as tff */ + if ((pict->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST) || !(pict->flags & AV_FRAME_FLAG_INTERLACED)) { + /* tff frame or progressive frame interpret as tff */ av_log(avctx, AV_LOG_DEBUG, "use interlaced encoding, top field first\n"); frame_flags |= 0x04; /* interlaced tff */ is_top_field_first = 1; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/proresenc_kostya.c b/arm/raspi/third_party/ffmpeg/libavcodec/proresenc_kostya.c index 1940e037..77ab5240 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/proresenc_kostya.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/proresenc_kostya.c @@ -585,7 +585,7 @@ static int encode_slice(AVCodecContext *avctx, const AVFrame *pic, if (ctx->pictures_per_frame == 1) line_add = 0; else - line_add = ctx->cur_picture_idx ^ !pic->top_field_first; + line_add = ctx->cur_picture_idx ^ !(pic->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST); if (ctx->force_quant) { qmat = ctx->quants[0]; @@ -838,7 +838,7 @@ static int find_slice_quant(AVCodecContext *avctx, if (ctx->pictures_per_frame == 1) line_add = 0; else - line_add = ctx->cur_picture_idx ^ !ctx->pic->top_field_first; + line_add = ctx->cur_picture_idx ^ !(ctx->pic->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST); mbs = x + mbs_per_slice; for (i = 0; i < ctx->num_planes; i++) { @@ -1045,7 +1045,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, frame_flags = ctx->chroma_factor << 6; if (avctx->flags & AV_CODEC_FLAG_INTERLACED_DCT) - frame_flags |= pic->top_field_first ? 0x04 : 0x08; + frame_flags |= (pic->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST) ? 0x04 : 0x08; bytestream_put_byte (&buf, frame_flags); bytestream_put_byte (&buf, 0); // reserved diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/prosumer.c b/arm/raspi/third_party/ffmpeg/libavcodec/prosumer.c index e199d1aa..a1ed6a9e 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/prosumer.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/prosumer.c @@ -195,7 +195,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, } frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; *got_frame = 1; return avpkt->size; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/psd.c b/arm/raspi/third_party/ffmpeg/libavcodec/psd.c index ee96bd12..d3456e6b 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/psd.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/psd.c @@ -532,7 +532,11 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *picture, } if (s->color_mode == PSD_INDEXED) { +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS picture->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif memcpy(picture->data[1], s->palette, AVPALETTE_SIZE); } diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/pthread_frame.c b/arm/raspi/third_party/ffmpeg/libavcodec/pthread_frame.c index 74864e19..773e78ae 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/pthread_frame.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/pthread_frame.c @@ -286,7 +286,11 @@ static int update_context_from_thread(AVCodecContext *dst, AVCodecContext *src, dst->level = src->level; dst->bits_per_raw_sample = src->bits_per_raw_sample; +#if FF_API_TICKS_PER_FRAME +FF_DISABLE_DEPRECATION_WARNINGS dst->ticks_per_frame = src->ticks_per_frame; +FF_ENABLE_DEPRECATION_WARNINGS +#endif dst->color_primaries = src->color_primaries; dst->color_trc = src->color_trc; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/qdrw.c b/arm/raspi/third_party/ffmpeg/libavcodec/qdrw.c index e41451e9..21a53b8e 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/qdrw.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/qdrw.c @@ -384,7 +384,11 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, ret = parse_palette(avctx, &gbc, (uint32_t *)p->data[1], colors, flags & 0x8000); if (ret < 0) return ret; +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS p->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif /* jump to image data */ bytestream2_skip(&gbc, 18); @@ -503,7 +507,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, if (*got_frame) { p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; return avpkt->size; } else { diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/qoidec.c b/arm/raspi/third_party/ffmpeg/libavcodec/qoidec.c index 9414d2fb..37bc2084 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/qoidec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/qoidec.c @@ -106,7 +106,7 @@ static int qoi_decode_frame(AVCodecContext *avctx, AVFrame *p, memcpy(&dst[off_x * channels], px, channels); } - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; p->pict_type = AV_PICTURE_TYPE_I; *got_frame = 1; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/qpeg.c b/arm/raspi/third_party/ffmpeg/libavcodec/qpeg.c index 5bca338a..1f76ebc5 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/qpeg.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/qpeg.c @@ -297,14 +297,24 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, } /* make the palette available on the way out */ - p->palette_has_changed = ff_copy_palette(a->pal, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS + p->palette_has_changed = +#endif + ff_copy_palette(a->pal, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_ENABLE_DEPRECATION_WARNINGS +#endif memcpy(p->data[1], a->pal, AVPALETTE_SIZE); av_frame_unref(ref); if ((ret = av_frame_ref(ref, p)) < 0) return ret; - p->key_frame = intra; + if (intra) + p->flags |= AV_FRAME_FLAG_KEY; + else + p->flags &= ~AV_FRAME_FLAG_KEY; p->pict_type = intra ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; *got_frame = 1; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/qsv_internal.h b/arm/raspi/third_party/ffmpeg/libavcodec/qsv_internal.h index 5119ef4d..c2d301b4 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/qsv_internal.h +++ b/arm/raspi/third_party/ffmpeg/libavcodec/qsv_internal.h @@ -23,9 +23,9 @@ #include "config.h" -#if CONFIG_VAAPI +#if CONFIG_VAAPI && !defined(_WIN32) // Do not enable for libva-win32 on Windows #define AVCODEC_QSV_LINUX_SESSION_HANDLE -#endif //CONFIG_VAAPI +#endif //CONFIG_VAAPI && !defined(_WIN32) #ifdef AVCODEC_QSV_LINUX_SESSION_HANDLE #include @@ -35,7 +35,6 @@ #endif #include #include -#include #include "libavutil/hwcontext_vaapi.h" #endif diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/qsvdec.c b/arm/raspi/third_party/ffmpeg/libavcodec/qsvdec.c index 6bc85116..da700f25 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/qsvdec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/qsvdec.c @@ -828,14 +828,18 @@ static int qsv_decode(AVCodecContext *avctx, QSVContext *q, outsurf->Info.PicStruct & MFX_PICSTRUCT_FRAME_TRIPLING ? 4 : outsurf->Info.PicStruct & MFX_PICSTRUCT_FRAME_DOUBLING ? 2 : outsurf->Info.PicStruct & MFX_PICSTRUCT_FIELD_REPEATED ? 1 : 0; - frame->top_field_first = - outsurf->Info.PicStruct & MFX_PICSTRUCT_FIELD_TFF; - frame->interlaced_frame = + frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST * + !!(outsurf->Info.PicStruct & MFX_PICSTRUCT_FIELD_TFF); + frame->flags |= AV_FRAME_FLAG_INTERLACED * !(outsurf->Info.PicStruct & MFX_PICSTRUCT_PROGRESSIVE); frame->pict_type = ff_qsv_map_pictype(aframe.frame->dec_info.FrameType); //Key frame is IDR frame is only suitable for H264. For HEVC, IRAPs are key frames. - if (avctx->codec_id == AV_CODEC_ID_H264) - frame->key_frame = !!(aframe.frame->dec_info.FrameType & MFX_FRAMETYPE_IDR); + if (avctx->codec_id == AV_CODEC_ID_H264) { + if (aframe.frame->dec_info.FrameType & MFX_FRAMETYPE_IDR) + frame->flags |= AV_FRAME_FLAG_KEY; + else + frame->flags &= ~AV_FRAME_FLAG_KEY; + } /* update the surface properties */ if (avctx->pix_fmt == AV_PIX_FMT_QSV) diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/qsvenc.c b/arm/raspi/third_party/ffmpeg/libavcodec/qsvenc.c index c975302b..0ed1f757 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/qsvenc.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/qsvenc.c @@ -1947,8 +1947,8 @@ static int submit_frame(QSVEncContext *q, const AVFrame *frame, qf->surface.Info = q->param.mfx.FrameInfo; qf->surface.Info.PicStruct = - !frame->interlaced_frame ? MFX_PICSTRUCT_PROGRESSIVE : - frame->top_field_first ? MFX_PICSTRUCT_FIELD_TFF : + !(frame->flags & AV_FRAME_FLAG_INTERLACED) ? MFX_PICSTRUCT_PROGRESSIVE : + (frame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST) ? MFX_PICSTRUCT_FIELD_TFF : MFX_PICSTRUCT_FIELD_BFF; if (frame->repeat_pict == 1) qf->surface.Info.PicStruct |= MFX_PICSTRUCT_FIELD_REPEATED; @@ -2402,7 +2402,7 @@ static int encode_frame(AVCodecContext *avctx, QSVEncContext *q, goto free; } - if (ret == MFX_WRN_INCOMPATIBLE_VIDEO_PARAM && frame && frame->interlaced_frame) + if (ret == MFX_WRN_INCOMPATIBLE_VIDEO_PARAM && frame && (frame->flags & AV_FRAME_FLAG_INTERLACED)) print_interlace_msg(avctx, q); ret = 0; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/qtrle.c b/arm/raspi/third_party/ffmpeg/libavcodec/qtrle.c index 5cb18c86..9b016d7e 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/qtrle.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/qtrle.c @@ -537,7 +537,14 @@ static int qtrle_decode_frame(AVCodecContext *avctx, AVFrame *rframe, } if(has_palette) { - s->frame->palette_has_changed = ff_copy_palette(s->pal, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS + s->frame->palette_has_changed = +#endif + ff_copy_palette(s->pal, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_ENABLE_DEPRECATION_WARNINGS +#endif /* make the palette available on the way out */ memcpy(s->frame->data[1], s->pal, AVPALETTE_SIZE); diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/r210dec.c b/arm/raspi/third_party/ffmpeg/libavcodec/r210dec.c index ae80f46e..fe6a0259 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/r210dec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/r210dec.c @@ -57,7 +57,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *pic, return ret; pic->pict_type = AV_PICTURE_TYPE_I; - pic->key_frame = 1; + pic->flags |= AV_FRAME_FLAG_KEY; g_line = pic->data[0]; b_line = pic->data[1]; r_line = pic->data[2]; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/rasc.c b/arm/raspi/third_party/ffmpeg/libavcodec/rasc.c index cfa3d6b0..4d057e80 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/rasc.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/rasc.c @@ -740,7 +740,10 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, if (!s->skip_cursor) draw_cursor(avctx); - s->frame->key_frame = intra; + if (intra) + s->frame->flags |= AV_FRAME_FLAG_KEY; + else + s->frame->flags &= ~AV_FRAME_FLAG_KEY; s->frame->pict_type = intra ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; *got_frame = 1; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/ratecontrol.c b/arm/raspi/third_party/ffmpeg/libavcodec/ratecontrol.c index 6a40f9cb..649f570c 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/ratecontrol.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/ratecontrol.c @@ -57,7 +57,16 @@ void ff_write_pass1_stats(MpegEncContext *s) static double get_fps(AVCodecContext *avctx) { - return 1.0 / av_q2d(avctx->time_base) / FFMAX(avctx->ticks_per_frame, 1); + if (avctx->framerate.num > 0 && avctx->framerate.den > 0) + return av_q2d(avctx->framerate); + +FF_DISABLE_DEPRECATION_WARNINGS + return 1.0 / av_q2d(avctx->time_base) +#if FF_API_TICKS_PER_FRAME + / FFMAX(avctx->ticks_per_frame, 1) +#endif + ; +FF_ENABLE_DEPRECATION_WARNINGS } static inline double qp2bits(RateControlEntry *rce, double qp) diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/rawdec.c b/arm/raspi/third_party/ffmpeg/libavcodec/rawdec.c index c20c317f..8e9358f9 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/rawdec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/rawdec.c @@ -227,15 +227,16 @@ static int raw_decode(AVCodecContext *avctx, AVFrame *frame, need_copy = !avpkt->buf || context->is_1_2_4_8_bpp || context->is_yuv2 || context->is_lt_16bpp; frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; res = ff_decode_frame_props(avctx, frame); if (res < 0) return res; if (context->tff >= 0) { - frame->interlaced_frame = 1; - frame->top_field_first = context->tff; + frame->flags |= AV_FRAME_FLAG_INTERLACED; + if (context->tff == 1) + frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST; } if ((res = av_image_check_size(avctx->width, avctx->height, 0, avctx)) < 0) @@ -372,7 +373,11 @@ static int raw_decode(AVCodecContext *avctx, AVFrame *frame, } if (ff_copy_palette(context->palette->data, avpkt, avctx)) { +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } else if (context->is_nut_pal8) { int vid_size = avctx->width * avctx->height; int pal_size = avpkt->size - vid_size; @@ -380,7 +385,11 @@ static int raw_decode(AVCodecContext *avctx, AVFrame *frame, if (avpkt->size > vid_size && pal_size <= AVPALETTE_SIZE) { const uint8_t *pal = avpkt->data + vid_size; memcpy(context->palette->data, pal, pal_size); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } } } @@ -459,9 +468,9 @@ static int raw_decode(AVCodecContext *avctx, AVFrame *frame, } if (avctx->field_order > AV_FIELD_PROGRESSIVE) { /* we have interlaced material flagged in container */ - frame->interlaced_frame = 1; + frame->flags |= AV_FRAME_FLAG_INTERLACED; if (avctx->field_order == AV_FIELD_TT || avctx->field_order == AV_FIELD_TB) - frame->top_field_first = 1; + frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST; } *got_frame = 1; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/rka.c b/arm/raspi/third_party/ffmpeg/libavcodec/rka.c index 2212e3f9..3e86d838 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/rka.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/rka.c @@ -737,7 +737,7 @@ static int decode_filter(RKAContext *s, ChContext *ctx, ACoder *ac, int off, uns } ctx->buf0[off] = ctx->buf1[off] + ctx->buf0[off + -1]; } else { - val *= 1 << ctx->cmode; + val *= 1U << ctx->cmode; sum += ctx->buf0[off + -1] + val; switch (s->bps) { case 16: sum = av_clip_int16(sum); break; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/rkmppdec.c b/arm/raspi/third_party/ffmpeg/libavcodec/rkmppdec.c index 8bf7c6ed..5768568b 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/rkmppdec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/rkmppdec.c @@ -404,8 +404,10 @@ static int rkmpp_retrieve_frame(AVCodecContext *avctx, AVFrame *frame) frame->colorspace = mpp_frame_get_colorspace(mppframe); mode = mpp_frame_get_mode(mppframe); - frame->interlaced_frame = ((mode & MPP_FRAME_FLAG_FIELD_ORDER_MASK) == MPP_FRAME_FLAG_DEINTERLACED); - frame->top_field_first = ((mode & MPP_FRAME_FLAG_FIELD_ORDER_MASK) == MPP_FRAME_FLAG_TOP_FIRST); + if ((mode & MPP_FRAME_FLAG_FIELD_ORDER_MASK) == MPP_FRAME_FLAG_DEINTERLACED) + frame->flags |= AV_FRAME_FLAG_INTERLACED; + if ((mode & MPP_FRAME_FLAG_FIELD_ORDER_MASK) == MPP_FRAME_FLAG_TOP_FIRST) + frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST; mppformat = mpp_frame_get_fmt(mppframe); drmformat = rkmpp_get_frameformat(mppformat); diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/rscc.c b/arm/raspi/third_party/ffmpeg/libavcodec/rscc.c index 61a25df3..ace9aeeb 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/rscc.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/rscc.c @@ -339,14 +339,21 @@ static int rscc_decode_frame(AVCodecContext *avctx, AVFrame *frame, /* Keyframe when the number of pixels updated matches the whole surface */ if (pixel_size == ctx->inflated_size) { frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; } else { frame->pict_type = AV_PICTURE_TYPE_P; } /* Palette handling */ if (avctx->pix_fmt == AV_PIX_FMT_PAL8) { - frame->palette_has_changed = ff_copy_palette(ctx->palette, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS + frame->palette_has_changed = +#endif + ff_copy_palette(ctx->palette, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_ENABLE_DEPRECATION_WARNINGS +#endif memcpy(frame->data[1], ctx->palette, AVPALETTE_SIZE); } // We only return a picture when enough of it is undamaged, this avoids copying nearly broken frames around diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/rv34.c b/arm/raspi/third_party/ffmpeg/libavcodec/rv34.c index 45f64666..51f18147 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/rv34.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/rv34.c @@ -1692,6 +1692,8 @@ int ff_rv34_decode_frame(AVCodecContext *avctx, AVFrame *pict, int i; r->tmp_b_block_base = av_malloc(s->linesize * 48); + if (!r->tmp_b_block_base) + return AVERROR(ENOMEM); for (i = 0; i < 2; i++) r->tmp_b_block_y[i] = r->tmp_b_block_base + i * 16 * s->linesize; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/sanm.c b/arm/raspi/third_party/ffmpeg/libavcodec/sanm.c index bec3c770..b70daab7 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/sanm.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/sanm.c @@ -1484,11 +1484,13 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, return ret; ctx->rotate_code = header.rotate_code; - if ((ctx->frame->key_frame = !header.seq_num)) { + if (!header.seq_num) { + ctx->frame->flags |= AV_FRAME_FLAG_KEY; ctx->frame->pict_type = AV_PICTURE_TYPE_I; fill_frame(ctx->frm1, ctx->npixels, header.bg_color); fill_frame(ctx->frm2, ctx->npixels, header.bg_color); } else { + ctx->frame->flags &= ~AV_FRAME_FLAG_KEY; ctx->frame->pict_type = AV_PICTURE_TYPE_P; } diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/scpr.c b/arm/raspi/third_party/ffmpeg/libavcodec/scpr.c index 7630adb3..b096965d 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/scpr.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/scpr.c @@ -516,18 +516,18 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, s->version = 1; s->get_freq = get_freq0; s->decode = decode0; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; ret = decompress_i(avctx, (uint32_t *)s->current_frame->data[0], s->current_frame->linesize[0] / 4); } else if (type == 18) { s->version = 2; s->get_freq = get_freq; s->decode = decode; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; ret = decompress_i(avctx, (uint32_t *)s->current_frame->data[0], s->current_frame->linesize[0] / 4); } else if (type == 34) { - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; s->version = 3; ret = decompress_i3(avctx, (uint32_t *)s->current_frame->data[0], s->current_frame->linesize[0] / 4); @@ -538,7 +538,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, if (bytestream2_get_bytes_left(gb) < 3) return AVERROR_INVALIDDATA; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; bytestream2_skip(gb, 1); if (avctx->bits_per_coded_sample == 16) { uint16_t value = bytestream2_get_le16(gb); @@ -557,7 +557,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, dst += s->current_frame->linesize[0] / 4; } } else if (type == 0 || type == 1) { - frame->key_frame = 0; + frame->flags &= ~AV_FRAME_FLAG_KEY; if (s->version == 1 || s->version == 2) ret = decompress_p(avctx, (uint32_t *)s->current_frame->data[0], @@ -612,7 +612,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, } } - frame->pict_type = frame->key_frame ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; + frame->pict_type = (frame->flags & AV_FRAME_FLAG_KEY) ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; FFSWAP(AVFrame *, s->current_frame, s->last_frame); diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/screenpresso.c b/arm/raspi/third_party/ffmpeg/libavcodec/screenpresso.c index 0d9e4850..b2715499 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/screenpresso.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/screenpresso.c @@ -173,7 +173,7 @@ static int screenpresso_decode_frame(AVCodecContext *avctx, AVFrame *frame, /* Usual properties */ if (keyframe) { frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; } else { frame->pict_type = AV_PICTURE_TYPE_P; } diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/sga.c b/arm/raspi/third_party/ffmpeg/libavcodec/sga.c index d3f49242..eae691ad 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/sga.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/sga.c @@ -497,9 +497,13 @@ static int sga_decode_frame(AVCodecContext *avctx, AVFrame *frame, } memcpy(frame->data[1], s->pal, AVPALETTE_SIZE); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; *got_frame = 1; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/sgidec.c b/arm/raspi/third_party/ffmpeg/libavcodec/sgidec.c index 92083f23..04a347c5 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/sgidec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/sgidec.c @@ -249,7 +249,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, break; } p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; /* Skip header. */ bytestream2_seek(&g, SGI_HEADER_SIZE, SEEK_SET); diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/sgirledec.c b/arm/raspi/third_party/ffmpeg/libavcodec/sgirledec.c index 9e3a220a..18bf8081 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/sgirledec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/sgirledec.c @@ -124,7 +124,7 @@ static int sgirle_decode_frame(AVCodecContext *avctx, AVFrame *frame, return ret; frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; *got_frame = 1; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/sheervideo.c b/arm/raspi/third_party/ffmpeg/libavcodec/sheervideo.c index eee60147..d9c94ea9 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/sheervideo.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/sheervideo.c @@ -1973,7 +1973,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, } p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; if ((ret = ff_thread_get_buffer(avctx, p, 0)) < 0) return ret; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/shorten.c b/arm/raspi/third_party/ffmpeg/libavcodec/shorten.c index 1b2abd76..eca0c4e8 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/shorten.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/shorten.c @@ -814,8 +814,10 @@ const FFCodec ff_shorten_decoder = { FF_CODEC_DECODE_CB(shorten_decode_frame), .p.capabilities = AV_CODEC_CAP_CHANNEL_CONF | AV_CODEC_CAP_DELAY | - AV_CODEC_CAP_DR1 | - AV_CODEC_CAP_SUBFRAMES , +#if FF_API_SUBFRAMES + AV_CODEC_CAP_SUBFRAMES | +#endif + AV_CODEC_CAP_DR1, .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P, AV_SAMPLE_FMT_U8P, AV_SAMPLE_FMT_NONE }, diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/smacker.c b/arm/raspi/third_party/ffmpeg/libavcodec/smacker.c index 4b05575e..7ee9fe85 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/smacker.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/smacker.c @@ -107,16 +107,16 @@ enum SmkBlockTypes { * Can read SMKTREE_DECODE_MAX_RECURSION before the first check; * does not overread gb on success. */ -static int smacker_decode_tree(GetBitContext *gb, HuffContext *hc, int length) +static int smacker_decode_tree(AVCodecContext *avctx, GetBitContext *gb, HuffContext *hc, int length) { if (length > SMKTREE_DECODE_MAX_RECURSION || length > 3 * SMKTREE_BITS) { - av_log(NULL, AV_LOG_ERROR, "Maximum tree recursion level exceeded.\n"); + av_log(avctx, AV_LOG_ERROR, "Maximum tree recursion level exceeded.\n"); return AVERROR_INVALIDDATA; } if(!get_bits1(gb)){ //Leaf if (hc->current >= 256) { - av_log(NULL, AV_LOG_ERROR, "Tree size exceeded!\n"); + av_log(avctx, AV_LOG_ERROR, "Tree size exceeded!\n"); return AVERROR_INVALIDDATA; } if (get_bits_left(gb) < 8) @@ -126,10 +126,10 @@ static int smacker_decode_tree(GetBitContext *gb, HuffContext *hc, int length) } else { //Node int r; length++; - r = smacker_decode_tree(gb, hc, length); + r = smacker_decode_tree(avctx, gb, hc, length); if(r) return r; - return smacker_decode_tree(gb, hc, length); + return smacker_decode_tree(avctx, gb, hc, length); } } @@ -138,7 +138,7 @@ static int smacker_decode_tree(GetBitContext *gb, HuffContext *hc, int length) * * Checks before the first read, can overread by 6 * SMKTREE_BITS on success. */ -static int smacker_decode_bigtree(GetBitContext *gb, DBCtx *ctx, int length) +static int smacker_decode_bigtree(AVCodecContext *avctx, GetBitContext *gb, DBCtx *ctx, int length) { // Larger length can cause segmentation faults due to too deep recursion. if (length > SMKTREE_DECODE_BIG_MAX_RECURSION) { @@ -176,12 +176,12 @@ static int smacker_decode_bigtree(GetBitContext *gb, DBCtx *ctx, int length) int r = 0, r_new, t; t = ctx->current++; - r = smacker_decode_bigtree(gb, ctx, length + 1); + r = smacker_decode_bigtree(avctx, gb, ctx, length + 1); if(r < 0) return r; ctx->values[t] = SMK_NODE | r; r++; - r_new = smacker_decode_bigtree(gb, ctx, length + 1); + r_new = smacker_decode_bigtree(avctx, gb, ctx, length + 1); if (r_new < 0) return r_new; return r + r_new; @@ -215,7 +215,7 @@ static int smacker_decode_header_tree(SmackVContext *smk, GetBitContext *gb, int i ? "high" : "low"); continue; } - err = smacker_decode_tree(gb, &h, 0); + err = smacker_decode_tree(smk->avctx, gb, &h, 0); if (err < 0) goto error; skip_bits1(gb); @@ -253,7 +253,7 @@ static int smacker_decode_header_tree(SmackVContext *smk, GetBitContext *gb, int } *recodes = ctx.values; - err = smacker_decode_bigtree(gb, &ctx, 0); + err = smacker_decode_bigtree(smk->avctx, gb, &ctx, 0); if (err < 0) goto error; skip_bits1(gb); @@ -392,12 +392,18 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, pal = (uint32_t*)smk->pic->data[1]; bytestream2_init(&gb2, avpkt->data, avpkt->size); flags = bytestream2_get_byteu(&gb2); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS smk->pic->palette_has_changed = flags & 1; - smk->pic->key_frame = !!(flags & 2); - if (smk->pic->key_frame) +FF_ENABLE_DEPRECATION_WARNINGS +#endif + if (flags & 2) { + smk->pic->flags |= AV_FRAME_FLAG_KEY; smk->pic->pict_type = AV_PICTURE_TYPE_I; - else + } else { + smk->pic->flags &= ~AV_FRAME_FLAG_KEY; smk->pic->pict_type = AV_PICTURE_TYPE_P; + } for(i = 0; i < 256; i++) *pal++ = 0xFFU << 24 | bytestream2_get_be24u(&gb2); @@ -649,7 +655,7 @@ static int smka_decode_frame(AVCodecContext *avctx, AVFrame *frame, HuffContext h; h.current = 0; skip_bits1(&gb); - if ((ret = smacker_decode_tree(&gb, &h, 0)) < 0) + if ((ret = smacker_decode_tree(avctx, &gb, &h, 0)) < 0) goto error; skip_bits1(&gb); if (h.current > 1) { diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/smc.c b/arm/raspi/third_party/ffmpeg/libavcodec/smc.c index 2b10e743..3e8a89ce 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/smc.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/smc.c @@ -437,7 +437,14 @@ static int smc_decode_frame(AVCodecContext *avctx, AVFrame *rframe, if ((ret = ff_reget_buffer(avctx, s->frame, 0)) < 0) return ret; - s->frame->palette_has_changed = ff_copy_palette(s->pal, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS + s->frame->palette_has_changed = +#endif + ff_copy_palette(s->pal, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_ENABLE_DEPRECATION_WARNINGS +#endif bytestream2_init(&gb, buf, buf_size); ret = smc_decode_stream(s, &gb); diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/snow.c b/arm/raspi/third_party/ffmpeg/libavcodec/snow.c index b6c8d5e2..5eb3ee1e 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/snow.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/snow.c @@ -606,7 +606,7 @@ int ff_snow_frame_start(SnowContext *s){ }else{ int i; for(i=0; imax_ref_frames && s->last_picture[i]->data[0]; i++) - if(i && s->last_picture[i-1]->key_frame) + if(i && (s->last_picture[i-1]->flags & AV_FRAME_FLAG_KEY)) break; s->ref_frames= i; if(s->ref_frames==0){ @@ -617,7 +617,10 @@ int ff_snow_frame_start(SnowContext *s){ if ((ret = ff_snow_get_buffer(s, s->current_picture)) < 0) return ret; - s->current_picture->key_frame= s->keyframe; + if (s->keyframe) + s->current_picture->flags |= AV_FRAME_FLAG_KEY; + else + s->current_picture->flags &= ~AV_FRAME_FLAG_KEY; return 0; } diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/snowenc.c b/arm/raspi/third_party/ffmpeg/libavcodec/snowenc.c index 4cf7ff11..1360343a 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/snowenc.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/snowenc.c @@ -130,8 +130,10 @@ static av_cold int encode_init(AVCodecContext *avctx) if (ret) return ret; - ff_set_cmp(&s->mecc, s->mecc.me_cmp, s->avctx->me_cmp); - ff_set_cmp(&s->mecc, s->mecc.me_sub_cmp, s->avctx->me_sub_cmp); + ret = ff_set_cmp(&s->mecc, s->mecc.me_cmp, s->avctx->me_cmp); + ret |= ff_set_cmp(&s->mecc, s->mecc.me_sub_cmp, s->avctx->me_sub_cmp); + if (ret < 0) + return AVERROR(EINVAL); s->input_picture = av_frame_alloc(); if (!s->input_picture) @@ -1761,7 +1763,7 @@ redo_frame: ff_build_rac_states(c, (1LL<<32)/20, 256-8); pic->pict_type= AV_PICTURE_TYPE_I; s->keyframe=1; - s->current_picture->key_frame=1; + s->current_picture->flags |= AV_FRAME_FLAG_KEY; goto redo_frame; } @@ -1889,7 +1891,7 @@ redo_frame: } pkt->size = ff_rac_terminate(c, 0); - if (s->current_picture->key_frame) + if (s->current_picture->flags & AV_FRAME_FLAG_KEY) pkt->flags |= AV_PKT_FLAG_KEY; *got_packet = 1; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/sonic.c b/arm/raspi/third_party/ffmpeg/libavcodec/sonic.c index 62e6193a..0544fecf 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/sonic.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/sonic.c @@ -473,7 +473,7 @@ static void predictor_init_state(int *k, int *state, int order) static int predictor_calc_error(int *k, int *state, int order, int error) { - int i, x = error - shift_down(k[order-1] * (unsigned)state[order-1], LATTICE_SHIFT); + int i, x = error - (unsigned)shift_down(k[order-1] * (unsigned)state[order-1], LATTICE_SHIFT); #if 1 int *k_ptr = &(k[order-2]), @@ -1013,7 +1013,7 @@ static int sonic_decode_frame(AVCodecContext *avctx, AVFrame *frame, if (s->lossless) quant = 1; else - quant = get_symbol(&c, state, 0) * SAMPLE_FACTOR; + quant = get_symbol(&c, state, 0) * (unsigned)SAMPLE_FACTOR; // av_log(NULL, AV_LOG_INFO, "quant: %d\n", quant); diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/speedhqdec.c b/arm/raspi/third_party/ffmpeg/libavcodec/speedhqdec.c index e1e6f9a5..ff106009 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/speedhqdec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/speedhqdec.c @@ -436,7 +436,7 @@ static int speedhq_decode_frame(AVCodecContext *avctx, AVFrame *frame, if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) { return ret; } - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; if (second_field_offset == 4 || second_field_offset == (buf_size-4)) { /* diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/svq3.c b/arm/raspi/third_party/ffmpeg/libavcodec/svq3.c index df514030..2d03dbc4 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/svq3.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/svq3.c @@ -1408,7 +1408,10 @@ static int svq3_decode_frame(AVCodecContext *avctx, AVFrame *rframe, /* for skipping the frame */ s->cur_pic->f->pict_type = s->pict_type; - s->cur_pic->f->key_frame = (s->pict_type == AV_PICTURE_TYPE_I); + if (s->pict_type == AV_PICTURE_TYPE_I) + s->cur_pic->f->flags |= AV_FRAME_FLAG_KEY; + else + s->cur_pic->f->flags &= ~AV_FRAME_FLAG_KEY; ret = get_buffer(avctx, s->cur_pic); if (ret < 0) diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/tak.c b/arm/raspi/third_party/ffmpeg/libavcodec/tak.c index f26574c9..99678e98 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/tak.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/tak.c @@ -92,10 +92,10 @@ int ff_tak_check_crc(const uint8_t *buf, unsigned int buf_size) return 0; } -void ff_tak_parse_streaminfo(TAKStreamInfo *s, GetBitContext *gb) +static int tak_parse_streaminfo(TAKStreamInfo *s, GetBitContext *gb) { uint64_t channel_mask = 0; - int frame_type, i; + int frame_type, i, ret; s->codec = get_bits(gb, TAK_ENCODER_CODEC_BITS); skip_bits(gb, TAK_ENCODER_PROFILE_BITS); @@ -124,7 +124,13 @@ void ff_tak_parse_streaminfo(TAKStreamInfo *s, GetBitContext *gb) } s->ch_layout = channel_mask; - s->frame_samples = tak_get_nb_samples(s->sample_rate, frame_type); + + ret = tak_get_nb_samples(s->sample_rate, frame_type); + if (ret < 0) + return ret; + s->frame_samples = ret; + + return 0; } int avpriv_tak_parse_streaminfo(TAKStreamInfo *s, const uint8_t *buf, int size) @@ -135,9 +141,7 @@ int avpriv_tak_parse_streaminfo(TAKStreamInfo *s, const uint8_t *buf, int size) if (ret < 0) return AVERROR_INVALIDDATA; - ff_tak_parse_streaminfo(s, &gb); - - return 0; + return tak_parse_streaminfo(s, &gb); } int ff_tak_decode_frame_header(AVCodecContext *avctx, GetBitContext *gb, @@ -159,7 +163,9 @@ int ff_tak_decode_frame_header(AVCodecContext *avctx, GetBitContext *gb, } if (ti->flags & TAK_FRAME_FLAG_HAS_INFO) { - ff_tak_parse_streaminfo(ti, gb); + int ret = tak_parse_streaminfo(ti, gb); + if (ret < 0) + return ret; if (get_bits(gb, 6)) skip_bits(gb, 25); @@ -169,6 +175,9 @@ int ff_tak_decode_frame_header(AVCodecContext *avctx, GetBitContext *gb, if (ti->flags & TAK_FRAME_FLAG_HAS_METADATA) return AVERROR_INVALIDDATA; + if (get_bits_left(gb) < 24) + return AVERROR_INVALIDDATA; + skip_bits(gb, 24); return 0; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/tak.h b/arm/raspi/third_party/ffmpeg/libavcodec/tak.h index 60691189..5e43598d 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/tak.h +++ b/arm/raspi/third_party/ffmpeg/libavcodec/tak.h @@ -149,8 +149,6 @@ int ff_tak_check_crc(const uint8_t *buf, unsigned int buf_size); */ int avpriv_tak_parse_streaminfo(TAKStreamInfo *s, const uint8_t *buf, int size); -void ff_tak_parse_streaminfo(TAKStreamInfo *s, GetBitContext *gb); - /** * Validate and decode a frame header. * @param avctx AVCodecContext to use as av_log() context diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/targa.c b/arm/raspi/third_party/ffmpeg/libavcodec/targa.c index 07005f2b..59fdc428 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/targa.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/targa.c @@ -249,7 +249,11 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, } break; } +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS p->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } } diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/targa_y216dec.c b/arm/raspi/third_party/ffmpeg/libavcodec/targa_y216dec.c index d5234c16..2874a51a 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/targa_y216dec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/targa_y216dec.c @@ -47,7 +47,7 @@ static int y216_decode_frame(AVCodecContext *avctx, AVFrame *pic, if ((ret = ff_get_buffer(avctx, pic, 0)) < 0) return ret; - pic->key_frame = 1; + pic->flags |= AV_FRAME_FLAG_KEY; pic->pict_type = AV_PICTURE_TYPE_I; y = (uint16_t *)pic->data[0]; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/tdsc.c b/arm/raspi/third_party/ffmpeg/libavcodec/tdsc.c index b5ab2e17..739738d9 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/tdsc.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/tdsc.c @@ -612,7 +612,7 @@ static int tdsc_decode_frame(AVCodecContext *avctx, AVFrame *frame, /* Frame is ready to be output */ if (keyframe) { frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; } else { frame->pict_type = AV_PICTURE_TYPE_P; } diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/tests/avcodec.c b/arm/raspi/third_party/ffmpeg/libavcodec/tests/avcodec.c index 4c173042..d78447d0 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/tests/avcodec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/tests/avcodec.c @@ -149,8 +149,7 @@ int main(void){ FF_CODEC_CAP_SETS_FRAME_PROPS) || codec->capabilities & (AV_CODEC_CAP_AVOID_PROBING | AV_CODEC_CAP_CHANNEL_CONF | - AV_CODEC_CAP_DRAW_HORIZ_BAND | - AV_CODEC_CAP_SUBFRAMES)) + AV_CODEC_CAP_DRAW_HORIZ_BAND)) ERR("Encoder %s has decoder-only capabilities set\n"); if (codec->capabilities & AV_CODEC_CAP_FRAME_THREADS && codec->capabilities & AV_CODEC_CAP_ENCODER_FLUSH) diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/threadframe.h b/arm/raspi/third_party/ffmpeg/libavcodec/threadframe.h index d2f93c5c..d581c408 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/threadframe.h +++ b/arm/raspi/third_party/ffmpeg/libavcodec/threadframe.h @@ -84,6 +84,9 @@ void ff_thread_release_ext_buffer(AVCodecContext *avctx, ThreadFrame *f); int ff_thread_ref_frame(ThreadFrame *dst, const ThreadFrame *src); +int ff_thread_replace_frame(AVCodecContext *avctx, ThreadFrame *dst, + const ThreadFrame *src); + int ff_thread_can_start_frame(AVCodecContext *avctx); #endif diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/tiertexseqv.c b/arm/raspi/third_party/ffmpeg/libavcodec/tiertexseqv.c index 19c0671b..cdc88555 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/tiertexseqv.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/tiertexseqv.c @@ -182,7 +182,11 @@ static int seqvideo_decode(SeqVideoContext *seq, const unsigned char *data, int c[j] = (*data << 2) | (*data >> 4); palette[i] = 0xFFU << 24 | AV_RB24(c); } +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS seq->frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } if (flags & 2) { diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/tiff.c b/arm/raspi/third_party/ffmpeg/libavcodec/tiff.c index 1a1879de..14896459 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/tiff.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/tiff.c @@ -1036,7 +1036,7 @@ static int dng_decode_tiles(AVCodecContext *avctx, AVFrame *frame, /* Frame is ready to be output */ frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; return avpkt->size; } @@ -1451,7 +1451,7 @@ static int tiff_decode_tag(TiffContext *s, AVFrame *frame) break; case TIFF_GRAY_RESPONSE_CURVE: case DNG_LINEARIZATION_TABLE: - if (count > FF_ARRAY_ELEMS(s->dng_lut)) + if (count < 1 || count > FF_ARRAY_ELEMS(s->dng_lut)) return AVERROR_INVALIDDATA; for (int i = 0; i < count; i++) s->dng_lut[i] = ff_tget(&s->gb, type, s->le); @@ -2379,6 +2379,7 @@ again: } } + p->flags |= AV_FRAME_FLAG_KEY; *got_frame = 1; return avpkt->size; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/tmv.c b/arm/raspi/third_party/ffmpeg/libavcodec/tmv.c index cdb83452..2a7e1a10 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/tmv.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/tmv.c @@ -57,10 +57,14 @@ static int tmv_decode_frame(AVCodecContext *avctx, AVFrame *frame, } frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; dst = frame->data[0]; +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif memcpy(frame->data[1], ff_cga_palette, 16 * 4); memset(frame->data[1] + 16 * 4, 0, AVPALETTE_SIZE - 16 * 4); diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/truemotion2.c b/arm/raspi/third_party/ffmpeg/libavcodec/truemotion2.c index b168b9cd..73c93359 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/truemotion2.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/truemotion2.c @@ -930,11 +930,13 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, } offset += t; } - p->key_frame = tm2_decode_blocks(l, p); - if (p->key_frame) + if (tm2_decode_blocks(l, p)) { + p->flags |= AV_FRAME_FLAG_KEY; p->pict_type = AV_PICTURE_TYPE_I; - else + } else { + p->flags &= ~AV_FRAME_FLAG_KEY; p->pict_type = AV_PICTURE_TYPE_P; + } l->cur = !l->cur; *got_frame = 1; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/truemotion2rt.c b/arm/raspi/third_party/ffmpeg/libavcodec/truemotion2rt.c index c6015b27..4f8590fc 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/truemotion2rt.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/truemotion2rt.c @@ -202,7 +202,7 @@ static int truemotion2rt_decode_frame(AVCodecContext *avctx, AVFrame *p, } p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; *got_frame = 1; return avpkt->size; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/tscc.c b/arm/raspi/third_party/ffmpeg/libavcodec/tscc.c index 0ebe641a..346d93e1 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/tscc.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/tscc.c @@ -106,7 +106,11 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, /* make the palette available on the way out */ if (c->avctx->pix_fmt == AV_PIX_FMT_PAL8) { +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = palette_has_changed; +FF_ENABLE_DEPRECATION_WARNINGS +#endif memcpy(frame->data[1], c->pal, AVPALETTE_SIZE); } diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/utils.c b/arm/raspi/third_party/ffmpeg/libavcodec/utils.c index 599da21d..a8514ba6 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/utils.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/utils.c @@ -317,7 +317,7 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height, } if (s->codec_id == AV_CODEC_ID_IFF_ILBM) { - w_align = FFMAX(w_align, 8); + w_align = FFMAX(w_align, 16); } *width = FFALIGN(*width, w_align); @@ -915,6 +915,27 @@ int ff_thread_ref_frame(ThreadFrame *dst, const ThreadFrame *src) return 0; } +int ff_thread_replace_frame(AVCodecContext *avctx, ThreadFrame *dst, + const ThreadFrame *src) +{ + int ret; + + dst->owner[0] = src->owner[0]; + dst->owner[1] = src->owner[1]; + + ret = av_frame_replace(dst->f, src->f); + if (ret < 0) + return ret; + + ret = av_buffer_replace(&dst->progress, src->progress); + if (ret < 0) { + ff_thread_release_ext_buffer(dst->owner[0], dst); + return ret; + } + + return 0; +} + #if !HAVE_THREADS int ff_thread_get_buffer(AVCodecContext *avctx, AVFrame *f, int flags) diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/utvideodec.c b/arm/raspi/third_party/ffmpeg/libavcodec/utvideodec.c index 9face52d..66c84352 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/utvideodec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/utvideodec.c @@ -869,9 +869,10 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, break; } - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_I; - frame->interlaced_frame = !!c->interlaced; + if (c->interlaced) + frame->flags |= AV_FRAME_FLAG_INTERLACED; *got_frame = 1; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/v210dec.c b/arm/raspi/third_party/ffmpeg/libavcodec/v210dec.c index 43b92f6e..814d65bb 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/v210dec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/v210dec.c @@ -187,7 +187,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *pic, return ret; pic->pict_type = AV_PICTURE_TYPE_I; - pic->key_frame = 1; + pic->flags |= AV_FRAME_FLAG_KEY; if (stride) { td.stride = stride; @@ -207,9 +207,9 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *pic, if (avctx->field_order > AV_FIELD_PROGRESSIVE) { /* we have interlaced material flagged in container */ - pic->interlaced_frame = 1; + pic->flags |= AV_FRAME_FLAG_INTERLACED; if (avctx->field_order == AV_FIELD_TT || avctx->field_order == AV_FIELD_TB) - pic->top_field_first = 1; + pic->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST; } *got_frame = 1; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/v210x.c b/arm/raspi/third_party/ffmpeg/libavcodec/v210x.c index 96594e2a..55630fa2 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/v210x.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/v210x.c @@ -62,7 +62,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *pic, vdst = (uint16_t *)pic->data[2]; yend = ydst + width; pic->pict_type = AV_PICTURE_TYPE_I; - pic->key_frame = 1; + pic->flags |= AV_FRAME_FLAG_KEY; for (;;) { uint32_t v = av_be2ne32(*src++); diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/v308dec.c b/arm/raspi/third_party/ffmpeg/libavcodec/v308dec.c index a81771fc..4bc4ea4e 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/v308dec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/v308dec.c @@ -48,7 +48,7 @@ static int v308_decode_frame(AVCodecContext *avctx, AVFrame *pic, if ((ret = ff_get_buffer(avctx, pic, 0)) < 0) return ret; - pic->key_frame = 1; + pic->flags |= AV_FRAME_FLAG_KEY; pic->pict_type = AV_PICTURE_TYPE_I; y = pic->data[0]; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/v408dec.c b/arm/raspi/third_party/ffmpeg/libavcodec/v408dec.c index edc9976d..191c050f 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/v408dec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/v408dec.c @@ -51,7 +51,7 @@ static int v408_decode_frame(AVCodecContext *avctx, AVFrame *pic, if ((ret = ff_get_buffer(avctx, pic, 0)) < 0) return ret; - pic->key_frame = 1; + pic->flags |= AV_FRAME_FLAG_KEY; pic->pict_type = AV_PICTURE_TYPE_I; y = pic->data[0]; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/v410dec.c b/arm/raspi/third_party/ffmpeg/libavcodec/v410dec.c index fb859e8c..35e4a8ae 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/v410dec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/v410dec.c @@ -102,7 +102,7 @@ static int v410_decode_frame(AVCodecContext *avctx, AVFrame *pic, if ((ret = ff_thread_get_buffer(avctx, pic, 0)) < 0) return ret; - pic->key_frame = 1; + pic->flags |= AV_FRAME_FLAG_KEY; pic->pict_type = AV_PICTURE_TYPE_I; td.buf = src; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/v4l2_buffers.c b/arm/raspi/third_party/ffmpeg/libavcodec/v4l2_buffers.c index 3f547106..22771356 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/v4l2_buffers.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/v4l2_buffers.c @@ -427,7 +427,8 @@ int ff_v4l2_buffer_buf_to_avframe(AVFrame *frame, V4L2Buffer *avbuf) return ret; /* 2. get frame information */ - frame->key_frame = !!(avbuf->buf.flags & V4L2_BUF_FLAG_KEYFRAME); + if (avbuf->buf.flags & V4L2_BUF_FLAG_KEYFRAME) + frame->flags |= AV_FRAME_FLAG_KEY; frame->color_primaries = v4l2_get_color_primaries(avbuf); frame->colorspace = v4l2_get_color_space(avbuf); frame->color_range = v4l2_get_color_range(avbuf); diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/vaapi_decode.c b/arm/raspi/third_party/ffmpeg/libavcodec/vaapi_decode.c index ab8c12e3..dd55cbd6 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/vaapi_decode.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/vaapi_decode.c @@ -398,6 +398,11 @@ static const struct { MAP(MPEG4, MPEG4_ADVANCED_SIMPLE, MPEG4AdvancedSimple), MAP(MPEG4, MPEG4_MAIN, MPEG4Main ), +#if VA_CHECK_VERSION(1, 18, 0) + MAP(H264, H264_HIGH_10_INTRA, + H264High10 ), + MAP(H264, H264_HIGH_10, H264High10 ), +#endif MAP(H264, H264_CONSTRAINED_BASELINE, H264ConstrainedBaseline), MAP(H264, H264_MAIN, H264Main ), diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/vaapi_encode_h264.c b/arm/raspi/third_party/ffmpeg/libavcodec/vaapi_encode_h264.c index 645f6a97..9ad017d5 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/vaapi_encode_h264.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/vaapi_encode_h264.c @@ -23,6 +23,7 @@ #include "libavutil/avassert.h" #include "libavutil/common.h" +#include "libavutil/pixdesc.h" #include "libavutil/internal.h" #include "libavutil/opt.h" @@ -301,10 +302,21 @@ static int vaapi_encode_h264_init_sequence_params(AVCodecContext *avctx) H264RawPPS *pps = &priv->raw_pps; VAEncSequenceParameterBufferH264 *vseq = ctx->codec_sequence_params; VAEncPictureParameterBufferH264 *vpic = ctx->codec_picture_params; + const AVPixFmtDescriptor *desc; + int bit_depth; memset(sps, 0, sizeof(*sps)); memset(pps, 0, sizeof(*pps)); + desc = av_pix_fmt_desc_get(priv->common.input_frames->sw_format); + av_assert0(desc); + if (desc->nb_components == 1 || desc->log2_chroma_w != 1 || desc->log2_chroma_h != 1) { + av_log(avctx, AV_LOG_ERROR, "Chroma format of input pixel format " + "%s is not supported.\n", desc->name); + return AVERROR(EINVAL); + } + bit_depth = desc->comp[0].depth; + sps->nal_unit_header.nal_ref_idc = 3; sps->nal_unit_header.nal_unit_type = H264_NAL_SPS; @@ -314,11 +326,11 @@ static int vaapi_encode_h264_init_sequence_params(AVCodecContext *avctx) avctx->profile == FF_PROFILE_H264_MAIN) sps->constraint_set1_flag = 1; - if (avctx->profile == FF_PROFILE_H264_HIGH) + if (avctx->profile == FF_PROFILE_H264_HIGH || avctx->profile == FF_PROFILE_H264_HIGH_10) sps->constraint_set3_flag = ctx->gop_size == 1; if (avctx->profile == FF_PROFILE_H264_MAIN || - avctx->profile == FF_PROFILE_H264_HIGH) { + avctx->profile == FF_PROFILE_H264_HIGH || avctx->profile == FF_PROFILE_H264_HIGH_10) { sps->constraint_set4_flag = 1; sps->constraint_set5_flag = ctx->b_per_p == 0; } @@ -359,6 +371,8 @@ static int vaapi_encode_h264_init_sequence_params(AVCodecContext *avctx) sps->seq_parameter_set_id = 0; sps->chroma_format_idc = 1; + sps->bit_depth_luma_minus8 = bit_depth - 8; + sps->bit_depth_chroma_minus8 = bit_depth - 8; sps->log2_max_frame_num_minus4 = 4; sps->pic_order_cnt_type = ctx->max_b_depth ? 0 : 2; @@ -1144,6 +1158,9 @@ static av_cold int vaapi_encode_h264_configure(AVCodecContext *avctx) } static const VAAPIEncodeProfile vaapi_encode_h264_profiles[] = { +#if VA_CHECK_VERSION(1, 18, 0) + { FF_PROFILE_H264_HIGH_10, 10, 3, 1, 1, VAProfileH264High10 }, +#endif { FF_PROFILE_H264_HIGH, 8, 3, 1, 1, VAProfileH264High }, { FF_PROFILE_H264_MAIN, 8, 3, 1, 1, VAProfileH264Main }, { FF_PROFILE_H264_CONSTRAINED_BASELINE, @@ -1208,10 +1225,9 @@ static av_cold int vaapi_encode_h264_init(AVCodecContext *avctx) av_log(avctx, AV_LOG_ERROR, "H.264 extended profile " "is not supported.\n"); return AVERROR_PATCHWELCOME; - case FF_PROFILE_H264_HIGH_10: case FF_PROFILE_H264_HIGH_10_INTRA: - av_log(avctx, AV_LOG_ERROR, "H.264 10-bit profiles " - "are not supported.\n"); + av_log(avctx, AV_LOG_ERROR, "H.264 high 10 intra profile " + "is not supported.\n"); return AVERROR_PATCHWELCOME; case FF_PROFILE_H264_HIGH_422: case FF_PROFILE_H264_HIGH_422_INTRA: @@ -1304,6 +1320,7 @@ static const AVOption vaapi_encode_h264_options[] = { { PROFILE("constrained_baseline", FF_PROFILE_H264_CONSTRAINED_BASELINE) }, { PROFILE("main", FF_PROFILE_H264_MAIN) }, { PROFILE("high", FF_PROFILE_H264_HIGH) }, + { PROFILE("high10", FF_PROFILE_H264_HIGH_10) }, #undef PROFILE { "level", "Set level (level_idc)", diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/vaapi_hevc.c b/arm/raspi/third_party/ffmpeg/libavcodec/vaapi_hevc.c index 984af75c..8b12484f 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/vaapi_hevc.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/vaapi_hevc.c @@ -60,10 +60,10 @@ static void fill_vaapi_pic(VAPictureHEVC *va_pic, const HEVCFrame *pic, int rps_ if (pic->flags & HEVC_FRAME_FLAG_LONG_REF) va_pic->flags |= VA_PICTURE_HEVC_LONG_TERM_REFERENCE; - if (pic->frame->interlaced_frame) { + if (pic->frame->flags & AV_FRAME_FLAG_INTERLACED) { va_pic->flags |= VA_PICTURE_HEVC_FIELD_PIC; - if (!pic->frame->top_field_first) + if (!(pic->frame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST)) va_pic->flags |= VA_PICTURE_HEVC_BOTTOM_FIELD; } } @@ -259,7 +259,7 @@ static int vaapi_hevc_start_frame(AVCodecContext *avctx, pre_palette_size = pps->pps_palette_predictor_initializers_present_flag ? pps->pps_num_palette_predictor_initializers : (sps->sps_palette_predictor_initializers_present_flag ? - sps->sps_num_palette_predictor_initializers_minus1 + 1 : + sps->sps_num_palette_predictor_initializers : 0); if (avctx->profile == FF_PROFILE_HEVC_SCC) { diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/vb.c b/arm/raspi/third_party/ffmpeg/libavcodec/vb.c index 8b0e2164..5744faa9 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/vb.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/vb.c @@ -230,7 +230,11 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, } memcpy(frame->data[1], c->pal, AVPALETTE_SIZE); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = flags & VB_HAS_PALETTE; +FF_ENABLE_DEPRECATION_WARNINGS +#endif outptr = frame->data[0]; srcptr = c->frame; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/vble.c b/arm/raspi/third_party/ffmpeg/libavcodec/vble.c index 9307b0d1..7711bf1b 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/vble.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/vble.c @@ -135,7 +135,7 @@ static int vble_decode_frame(AVCodecContext *avctx, AVFrame *pic, return ret; /* Set flags */ - pic->key_frame = 1; + pic->flags |= AV_FRAME_FLAG_KEY; pic->pict_type = AV_PICTURE_TYPE_I; /* Version should always be 1 */ diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/vbndec.c b/arm/raspi/third_party/ffmpeg/libavcodec/vbndec.c index d92dcd46..02ed43f8 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/vbndec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/vbndec.c @@ -151,7 +151,7 @@ static int vbn_decode_frame(AVCodecContext *avctx, goto out; frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; if (format == VBN_FORMAT_RAW) { uint8_t *flipped = frame->data[0] + frame->linesize[0] * (frame->height - 1); diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/vc1.c b/arm/raspi/third_party/ffmpeg/libavcodec/vc1.c index d4014d25..795c6db5 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/vc1.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/vc1.c @@ -418,6 +418,14 @@ static int decode_sequence_header_adv(VC1Context *v, GetBitContext *gb) v->s.loop_filter, v->chromaformat, v->broadcast, v->interlace, v->tfcntrflag, v->finterpflag); +#if FF_API_TICKS_PER_FRAME +FF_DISABLE_DEPRECATION_WARNINGS + if (v->broadcast) { // Pulldown may be present + v->s.avctx->ticks_per_frame = 2; + } +FF_ENABLE_DEPRECATION_WARNINGS +#endif + v->psf = get_bits1(gb); if (v->psf) { //PsF, 6.1.13 av_log(v->s.avctx, AV_LOG_ERROR, "Progressive Segmented Frame mode: not supported (yet)\n"); @@ -467,9 +475,6 @@ static int decode_sequence_header_adv(VC1Context *v, GetBitContext *gb) v->s.avctx->framerate.num = ff_vc1_fps_nr[nr - 1] * 1000; } } - if (v->broadcast) { // Pulldown may be present - v->s.avctx->ticks_per_frame = 2; - } } if (get_bits1(gb)) { diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/vc1_mc.c b/arm/raspi/third_party/ffmpeg/libavcodec/vc1_mc.c index 1b8d8799..8f0b3f6f 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/vc1_mc.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/vc1_mc.c @@ -233,7 +233,7 @@ void ff_vc1_mc_1mv(VC1Context *v, int dir) luty = v->last_luty; lutuv = v->last_lutuv; use_ic = v->last_use_ic; - interlace = s->last_picture.f->interlaced_frame; + interlace = !!(s->last_picture.f->flags & AV_FRAME_FLAG_INTERLACED); } } else { srcY = s->next_picture.f->data[0]; @@ -242,7 +242,7 @@ void ff_vc1_mc_1mv(VC1Context *v, int dir) luty = v->next_luty; lutuv = v->next_lutuv; use_ic = v->next_use_ic; - interlace = s->next_picture.f->interlaced_frame; + interlace = !!(s->next_picture.f->flags & AV_FRAME_FLAG_INTERLACED); } if (!srcY || !srcU) { @@ -482,13 +482,13 @@ void ff_vc1_mc_4mv_luma(VC1Context *v, int n, int dir, int avg) srcY = s->last_picture.f->data[0]; luty = v->last_luty; use_ic = v->last_use_ic; - interlace = s->last_picture.f->interlaced_frame; + interlace = !!(s->last_picture.f->flags & AV_FRAME_FLAG_INTERLACED); } } else { srcY = s->next_picture.f->data[0]; luty = v->next_luty; use_ic = v->next_use_ic; - interlace = s->next_picture.f->interlaced_frame; + interlace = !!(s->next_picture.f->flags & AV_FRAME_FLAG_INTERLACED); } if (!srcY) { @@ -708,14 +708,14 @@ void ff_vc1_mc_4mv_chroma(VC1Context *v, int dir) srcV = s->last_picture.f->data[2]; lutuv = v->last_lutuv; use_ic = v->last_use_ic; - interlace = s->last_picture.f->interlaced_frame; + interlace = !!(s->last_picture.f->flags & AV_FRAME_FLAG_INTERLACED); } } else { srcU = s->next_picture.f->data[1]; srcV = s->next_picture.f->data[2]; lutuv = v->next_lutuv; use_ic = v->next_use_ic; - interlace = s->next_picture.f->interlaced_frame; + interlace = !!(s->next_picture.f->flags & AV_FRAME_FLAG_INTERLACED); } if (!srcU) { @@ -884,13 +884,13 @@ void ff_vc1_mc_4mv_chroma4(VC1Context *v, int dir, int dir2, int avg) srcV = s->next_picture.f->data[2]; lutuv = v->next_lutuv; use_ic = v->next_use_ic; - interlace = s->next_picture.f->interlaced_frame; + interlace = !!(s->next_picture.f->flags & AV_FRAME_FLAG_INTERLACED); } else { srcU = s->last_picture.f->data[1]; srcV = s->last_picture.f->data[2]; lutuv = v->last_lutuv; use_ic = v->last_use_ic; - interlace = s->last_picture.f->interlaced_frame; + interlace = !!(s->last_picture.f->flags & AV_FRAME_FLAG_INTERLACED); } if (!srcU) return; @@ -1034,7 +1034,7 @@ void ff_vc1_interp_mc(VC1Context *v) srcU = s->next_picture.f->data[1]; srcV = s->next_picture.f->data[2]; - interlace = s->next_picture.f->interlaced_frame; + interlace = !!(s->next_picture.f->flags & AV_FRAME_FLAG_INTERLACED); src_x = s->mb_x * 16 + (mx >> 2); src_y = s->mb_y * 16 + (my >> 2); diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/vc1_parser.c b/arm/raspi/third_party/ffmpeg/libavcodec/vc1_parser.c index 4167215f..ec284dca 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/vc1_parser.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/vc1_parser.c @@ -89,11 +89,10 @@ static void vc1_extract_header(AVCodecParserContext *s, AVCodecContext *avctx, else s->pict_type = vpc->v.s.pict_type; - if (avctx->ticks_per_frame > 1){ + if (vpc->v.broadcast){ // process pulldown flags s->repeat_pict = 1; // Pulldown flags are only valid when 'broadcast' has been set. - // So ticks_per_frame will be 2 if (vpc->v.rff){ // repeat field s->repeat_pict = 2; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/vc1dec.c b/arm/raspi/third_party/ffmpeg/libavcodec/vc1dec.c index 5cb4c544..9e343d00 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/vc1dec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/vc1dec.c @@ -836,6 +836,7 @@ static int vc1_decode_frame(AVCodecContext *avctx, AVFrame *pict, const uint8_t *rawbuf; int raw_size; } *slices = NULL, *tmp; + unsigned slices_allocated = 0; v->second_field = 0; @@ -859,6 +860,7 @@ static int vc1_decode_frame(AVCodecContext *avctx, AVFrame *pict, //for advanced profile we may need to parse and unescape data if (avctx->codec_id == AV_CODEC_ID_VC1 || avctx->codec_id == AV_CODEC_ID_VC1IMAGE) { int buf_size2 = 0; + size_t next_allocated = 0; buf2 = av_mallocz(buf_size + AV_INPUT_BUFFER_PADDING_SIZE); if (!buf2) return AVERROR(ENOMEM); @@ -882,7 +884,8 @@ static int vc1_decode_frame(AVCodecContext *avctx, AVFrame *pict, int buf_size3; if (avctx->hwaccel) buf_start_second_field = start; - tmp = av_realloc_array(slices, sizeof(*slices), n_slices+1); + av_size_mult(sizeof(*slices), n_slices+1, &next_allocated); + tmp = next_allocated ? av_fast_realloc(slices, &slices_allocated, next_allocated) : NULL; if (!tmp) { ret = AVERROR(ENOMEM); goto err; @@ -911,7 +914,8 @@ static int vc1_decode_frame(AVCodecContext *avctx, AVFrame *pict, break; case VC1_CODE_SLICE: { int buf_size3; - tmp = av_realloc_array(slices, sizeof(*slices), n_slices+1); + av_size_mult(sizeof(*slices), n_slices+1, &next_allocated); + tmp = next_allocated ? av_fast_realloc(slices, &slices_allocated, next_allocated) : NULL; if (!tmp) { ret = AVERROR(ENOMEM); goto err; @@ -946,7 +950,8 @@ static int vc1_decode_frame(AVCodecContext *avctx, AVFrame *pict, } else { // found field marker, unescape second field if (avctx->hwaccel) buf_start_second_field = divider; - tmp = av_realloc_array(slices, sizeof(*slices), n_slices+1); + av_size_mult(sizeof(*slices), n_slices+1, &next_allocated); + tmp = next_allocated ? av_fast_realloc(slices, &slices_allocated, next_allocated) : NULL; if (!tmp) { ret = AVERROR(ENOMEM); goto err; @@ -1055,7 +1060,10 @@ static int vc1_decode_frame(AVCodecContext *avctx, AVFrame *pict, // for skipping the frame s->current_picture.f->pict_type = s->pict_type; - s->current_picture.f->key_frame = s->pict_type == AV_PICTURE_TYPE_I; + if (s->pict_type == AV_PICTURE_TYPE_I) + s->current_picture.f->flags |= AV_FRAME_FLAG_KEY; + else + s->current_picture.f->flags &= ~AV_FRAME_FLAG_KEY; /* skip B-frames if we don't have reference frames */ if (!s->last_picture_ptr && s->pict_type == AV_PICTURE_TYPE_B) { @@ -1073,13 +1081,12 @@ static int vc1_decode_frame(AVCodecContext *avctx, AVFrame *pict, } v->s.current_picture_ptr->field_picture = v->field_mode; - v->s.current_picture_ptr->f->interlaced_frame = (v->fcm != PROGRESSIVE); - v->s.current_picture_ptr->f->top_field_first = v->tff; + v->s.current_picture_ptr->f->flags |= AV_FRAME_FLAG_INTERLACED * (v->fcm != PROGRESSIVE); + v->s.current_picture_ptr->f->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST * !!v->tff; // process pulldown flags s->current_picture_ptr->f->repeat_pict = 0; // Pulldown flags are only valid when 'broadcast' has been set. - // So ticks_per_frame will be 2 if (v->rff) { // repeat field s->current_picture_ptr->f->repeat_pict = 1; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/vcr1.c b/arm/raspi/third_party/ffmpeg/libavcodec/vcr1.c index 853d4459..771337e2 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/vcr1.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/vcr1.c @@ -63,7 +63,7 @@ static int vcr1_decode_frame(AVCodecContext *avctx, AVFrame *p, if ((ret = ff_get_buffer(avctx, p, 0)) < 0) return ret; p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; for (i = 0; i < 16; i++) { a->delta[i] = *bytestream++; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/vdpau_mpeg12.c b/arm/raspi/third_party/ffmpeg/libavcodec/vdpau_mpeg12.c index 354239ca..79007aa1 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/vdpau_mpeg12.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/vdpau_mpeg12.c @@ -75,8 +75,9 @@ static int vdpau_mpeg_start_frame(AVCodecContext *avctx, info->f_code[1][0] = s->mpeg_f_code[1][0]; info->f_code[1][1] = s->mpeg_f_code[1][1]; for (i = 0; i < 64; ++i) { - info->intra_quantizer_matrix[i] = s->intra_matrix[i]; - info->non_intra_quantizer_matrix[i] = s->inter_matrix[i]; + int n = s->idsp.idct_permutation[i]; + info->intra_quantizer_matrix[i] = s->intra_matrix[n]; + info->non_intra_quantizer_matrix[i] = s->inter_matrix[n]; } return ff_vdpau_common_start_frame(pic_ctx, buffer, size); diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/vdpau_mpeg4.c b/arm/raspi/third_party/ffmpeg/libavcodec/vdpau_mpeg4.c index 6e082eef..1211b1df 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/vdpau_mpeg4.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/vdpau_mpeg4.c @@ -74,8 +74,9 @@ static int vdpau_mpeg4_start_frame(AVCodecContext *avctx, info->alternate_vertical_scan_flag = s->alternate_scan; info->top_field_first = s->top_field_first; for (i = 0; i < 64; ++i) { - info->intra_quantizer_matrix[i] = s->intra_matrix[i]; - info->non_intra_quantizer_matrix[i] = s->inter_matrix[i]; + int n = s->idsp.idct_permutation[i]; + info->intra_quantizer_matrix[i] = s->intra_matrix[n]; + info->non_intra_quantizer_matrix[i] = s->inter_matrix[n]; } ff_vdpau_common_start_frame(pic_ctx, buffer, size); diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/version.h b/arm/raspi/third_party/ffmpeg/libavcodec/version.h index 7acb261b..c2007219 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/version.h +++ b/arm/raspi/third_party/ffmpeg/libavcodec/version.h @@ -29,8 +29,8 @@ #include "version_major.h" -#define LIBAVCODEC_VERSION_MINOR 7 -#define LIBAVCODEC_VERSION_MICRO 100 +#define LIBAVCODEC_VERSION_MINOR 14 +#define LIBAVCODEC_VERSION_MICRO 101 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ LIBAVCODEC_VERSION_MINOR, \ diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/version_major.h b/arm/raspi/third_party/ffmpeg/libavcodec/version_major.h index 40db2134..2f5138d0 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/version_major.h +++ b/arm/raspi/third_party/ffmpeg/libavcodec/version_major.h @@ -46,6 +46,8 @@ #define FF_API_VT_HWACCEL_CONTEXT (LIBAVCODEC_VERSION_MAJOR < 61) #define FF_API_AVCTX_FRAME_NUMBER (LIBAVCODEC_VERSION_MAJOR < 61) #define FF_API_SLICE_OFFSET (LIBAVCODEC_VERSION_MAJOR < 61) +#define FF_API_SUBFRAMES (LIBAVCODEC_VERSION_MAJOR < 61) +#define FF_API_TICKS_PER_FRAME (LIBAVCODEC_VERSION_MAJOR < 61) // reminder to remove CrystalHD decoders on next major bump #define FF_CODEC_CRYSTAL_HD (LIBAVCODEC_VERSION_MAJOR < 61) diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/videotoolbox.c b/arm/raspi/third_party/ffmpeg/libavcodec/videotoolbox.c index e42fea6f..64443255 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/videotoolbox.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/videotoolbox.c @@ -799,6 +799,9 @@ static CFDictionaryRef videotoolbox_buffer_attributes_create(int width, static CFDictionaryRef videotoolbox_decoder_config_create(CMVideoCodecType codec_type, AVCodecContext *avctx) { + CFMutableDictionaryRef avc_info; + CFDataRef data = NULL; + CFMutableDictionaryRef config_info = CFDictionaryCreateMutable(kCFAllocatorDefault, 0, &kCFTypeDictionaryKeyCallBacks, @@ -810,9 +813,6 @@ static CFDictionaryRef videotoolbox_decoder_config_create(CMVideoCodecType codec kVTVideoDecoderSpecification_RequireHardwareAcceleratedVideoDecoder, kCFBooleanTrue); - CFMutableDictionaryRef avc_info; - CFDataRef data = NULL; - avc_info = CFDictionaryCreateMutable(kCFAllocatorDefault, 1, &kCFTypeDictionaryKeyCallBacks, @@ -1072,13 +1072,14 @@ static int videotoolbox_hevc_end_frame(AVCodecContext *avctx) HEVCContext *h = avctx->priv_data; AVFrame *frame = h->ref->frame; VTContext *vtctx = avctx->internal->hwaccel_priv_data; + int ret; h->output_frame->crop_right = 0; h->output_frame->crop_left = 0; h->output_frame->crop_top = 0; h->output_frame->crop_bottom = 0; - int ret = ff_videotoolbox_common_end_frame(avctx, frame); + ret = ff_videotoolbox_common_end_frame(avctx, frame); vtctx->bitstream_size = 0; return ret; } @@ -1132,15 +1133,17 @@ static int videotoolbox_prores_end_frame(AVCodecContext *avctx) } static enum AVPixelFormat videotoolbox_best_pixel_format(AVCodecContext *avctx) { + int depth; const AVPixFmtDescriptor *descriptor = av_pix_fmt_desc_get(avctx->sw_pix_fmt); if (!descriptor) return AV_PIX_FMT_NV12; // same as av_videotoolbox_alloc_context() - int depth = descriptor->comp[0].depth; if (descriptor->flags & AV_PIX_FMT_FLAG_ALPHA) return AV_PIX_FMT_AYUV64; + depth = descriptor->comp[0].depth; + #if HAVE_KCVPIXELFORMATTYPE_444YPCBCR16BIPLANARVIDEORANGE if (depth > 10) return descriptor->log2_chroma_w == 0 ? AV_PIX_FMT_P416 : AV_PIX_FMT_P216; @@ -1194,6 +1197,7 @@ int ff_videotoolbox_common_init(AVCodecContext *avctx) VTContext *vtctx = avctx->internal->hwaccel_priv_data; AVHWFramesContext *hw_frames; int err; + bool full_range; vtctx->logctx = avctx; @@ -1241,7 +1245,7 @@ int ff_videotoolbox_common_init(AVCodecContext *avctx) goto fail; } - bool full_range = avctx->color_range == AVCOL_RANGE_JPEG; + full_range = avctx->color_range == AVCOL_RANGE_JPEG; vtctx->vt_ctx->cv_pix_fmt_type = av_map_videotoolbox_format_from_pixfmt2(hw_frames->sw_format, full_range); if (!vtctx->vt_ctx->cv_pix_fmt_type) { diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/videotoolboxenc.c b/arm/raspi/third_party/ffmpeg/libavcodec/videotoolboxenc.c index 56971471..b017c90c 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/videotoolboxenc.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/videotoolboxenc.c @@ -63,7 +63,21 @@ typedef OSStatus (*getParameterSetAtIndex)(CMFormatDescriptionRef videoDesc, size_t *parameterSetCountOut, int *NALUnitHeaderLengthOut); -//These symbols may not be present +/* + * Symbols that aren't available in MacOS 10.8 and iOS 8.0 need to be accessed + * from compat_keys, or it will cause compiler errors when compiling for older + * OS versions. + * + * For example, kVTCompressionPropertyKey_H264EntropyMode was added in + * MacOS 10.9. If this constant were used directly, a compiler would generate + * an error when it has access to the MacOS 10.8 headers, but does not have + * 10.9 headers. + * + * Runtime errors will still occur when unknown keys are set. A warning is + * logged and encoding continues where possible. + * + * When adding new symbols, they should be loaded/set in loadVTEncSymbols(). + */ static struct{ CFStringRef kCVImageBufferColorPrimaries_ITU_R_2020; CFStringRef kCVImageBufferTransferFunction_ITU_R_2020; @@ -105,6 +119,7 @@ static struct{ CFStringRef kVTVideoEncoderSpecification_EnableHardwareAcceleratedVideoEncoder; CFStringRef kVTVideoEncoderSpecification_RequireHardwareAcceleratedVideoEncoder; + CFStringRef kVTVideoEncoderSpecification_EnableLowLatencyRateControl; getParameterSetAtIndex CMVideoFormatDescriptionGetHEVCParameterSetAtIndex; } compat_keys; @@ -120,7 +135,7 @@ do{ \ static pthread_once_t once_ctrl = PTHREAD_ONCE_INIT; -static void loadVTEncSymbols(){ +static void loadVTEncSymbols(void){ compat_keys.CMVideoFormatDescriptionGetHEVCParameterSetAtIndex = (getParameterSetAtIndex)dlsym( RTLD_DEFAULT, @@ -171,6 +186,8 @@ static void loadVTEncSymbols(){ "EnableHardwareAcceleratedVideoEncoder"); GET_SYM(kVTVideoEncoderSpecification_RequireHardwareAcceleratedVideoEncoder, "RequireHardwareAcceleratedVideoEncoder"); + GET_SYM(kVTVideoEncoderSpecification_EnableLowLatencyRateControl, + "EnableLowLatencyRateControl"); } typedef enum VT_H264Profile { @@ -1245,6 +1262,13 @@ static int vtenc_create_encoder(AVCodecContext *avctx, compat_keys.kVTCompressionPropertyKey_TargetQualityForAlpha, alpha_quality_num); CFRelease(alpha_quality_num); + + if (status) { + av_log(avctx, + AV_LOG_ERROR, + "Error setting alpha quality: %d\n", + status); + } } } @@ -1441,6 +1465,17 @@ static int vtenc_create_encoder(AVCodecContext *avctx, } } + // low-latency mode: eliminate frame reordering, follow a one-in-one-out encoding mode + if ((avctx->flags & AV_CODEC_FLAG_LOW_DELAY) && avctx->codec_id == AV_CODEC_ID_H264) { + status = VTSessionSetProperty(vtctx->session, + compat_keys.kVTVideoEncoderSpecification_EnableLowLatencyRateControl, + kCFBooleanTrue); + + if (status) { + av_log(avctx, AV_LOG_ERROR, "Error setting low latency property: %d\n", status); + } + } + status = VTCompressionSessionPrepareToEncodeFrames(vtctx->session); if (status) { av_log(avctx, AV_LOG_ERROR, "Error: cannot prepare encoder: %d\n", status); @@ -1650,8 +1685,8 @@ static int find_sei_end(AVCodecContext *avctx, { int nal_type; size_t sei_payload_size = 0; - *sei_end = NULL; uint8_t *nal_start = nal_data; + *sei_end = NULL; if (!nal_size) return 0; @@ -2041,7 +2076,7 @@ static int vtenc_cm_to_avpacket( return AVERROR_EXTERNAL; } - int status = get_params_size(avctx, vid_fmt, &header_size); + status = get_params_size(avctx, vid_fmt, &header_size); if (status) return status; } diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/vmnc.c b/arm/raspi/third_party/ffmpeg/libavcodec/vmnc.c index 8daaf08c..17e3a2f3 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/vmnc.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/vmnc.c @@ -339,7 +339,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, if ((ret = ff_reget_buffer(avctx, c->pic, 0)) < 0) return ret; - c->pic->key_frame = 0; + c->pic->flags &= ~AV_FRAME_FLAG_KEY; c->pic->pict_type = AV_PICTURE_TYPE_P; // restore screen after cursor @@ -441,7 +441,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, bytestream2_skip(gb, 4); break; case MAGIC_WMVi: // ServerInitialization struct - c->pic->key_frame = 1; + c->pic->flags |= AV_FRAME_FLAG_KEY; c->pic->pict_type = AV_PICTURE_TYPE_I; depth = bytestream2_get_byte(gb); if (depth != c->bpp) { diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/vorbisdec.c b/arm/raspi/third_party/ffmpeg/libavcodec/vorbisdec.c index e9dad4ef..1d2a0997 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/vorbisdec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/vorbisdec.c @@ -368,6 +368,10 @@ static int vorbis_parse_setup_hdr_codebooks(vorbis_context *vc) unsigned codebook_value_bits = get_bits(gb, 4) + 1; unsigned codebook_sequence_p = get_bits1(gb); + if (!isfinite(codebook_minimum_value) || !isfinite(codebook_delta_value)) { + ret = AVERROR_INVALIDDATA; + goto error; + } ff_dlog(NULL, " We expect %d numbers for building the codevectors. \n", codebook_lookup_values); ff_dlog(NULL, " delta %f minmum %f \n", diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/vp3.c b/arm/raspi/third_party/ffmpeg/libavcodec/vp3.c index 9660def6..9e097c89 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/vp3.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/vp3.c @@ -2353,6 +2353,8 @@ static av_cold int vp3_decode_init(AVCodecContext *avctx) s->avctx = avctx; s->width = FFALIGN(avctx->coded_width, 16); s->height = FFALIGN(avctx->coded_height, 16); + if (s->width < 18) + return AVERROR_PATCHWELCOME; if (avctx->codec_id != AV_CODEC_ID_THEORA) avctx->pix_fmt = AV_PIX_FMT_YUV420P; avctx->chroma_sample_location = AVCHROMA_LOC_CENTER; @@ -2675,7 +2677,10 @@ static int vp3_decode_frame(AVCodecContext *avctx, AVFrame *frame, s->current_frame.f->pict_type = s->keyframe ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; - s->current_frame.f->key_frame = s->keyframe; + if (s->keyframe) + s->current_frame.f->flags |= AV_FRAME_FLAG_KEY; + else + s->current_frame.f->flags &= ~AV_FRAME_FLAG_KEY; if ((ret = ff_thread_get_ext_buffer(avctx, &s->current_frame, AV_GET_BUFFER_FLAG_REF)) < 0) goto error; @@ -2919,7 +2924,9 @@ static int theora_decode_header(AVCodecContext *avctx, GetBitContext *gb) /* sanity check */ if (av_image_check_size(visible_width, visible_height, 0, avctx) < 0 || visible_width + offset_x > s->width || - visible_height + offset_y > s->height) { + visible_height + offset_y > s->height || + visible_width < 18 + ) { av_log(avctx, AV_LOG_ERROR, "Invalid frame dimensions - w:%d h:%d x:%d y:%d (%dx%d).\n", visible_width, visible_height, offset_x, offset_y, @@ -2965,6 +2972,8 @@ static int theora_decode_header(AVCodecContext *avctx, GetBitContext *gb) } else avctx->pix_fmt = AV_PIX_FMT_YUV420P; + if (s->width < 18) + return AVERROR_PATCHWELCOME; ret = ff_set_dimensions(avctx, s->width, s->height); if (ret < 0) return ret; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/vp5.c b/arm/raspi/third_party/ffmpeg/libavcodec/vp5.c index 57933350..78d4b38c 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/vp5.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/vp5.c @@ -44,10 +44,13 @@ static int vp5_parse_header(VP56Context *s, const uint8_t *buf, int buf_size) ret = ff_vpx_init_range_decoder(&s->c, buf, buf_size); if (ret < 0) return ret; - s->frames[VP56_FRAME_CURRENT]->key_frame = !vpx_rac_get(c); + if (!vpx_rac_get(c)) + s->frames[VP56_FRAME_CURRENT]->flags |= AV_FRAME_FLAG_KEY; + else + s->frames[VP56_FRAME_CURRENT]->flags &= ~AV_FRAME_FLAG_KEY; vpx_rac_get(c); ff_vp56_init_dequant(s, vp56_rac_gets(c, 6)); - if (s->frames[VP56_FRAME_CURRENT]->key_frame) + if (s->frames[VP56_FRAME_CURRENT]->flags & AV_FRAME_FLAG_KEY) { int render_x, render_y; @@ -148,7 +151,7 @@ static int vp5_parse_coeff_models(VP56Context *s) if (vpx_rac_get_prob_branchy(c, vp5_dccv_pct[pt][node])) { def_prob[node] = vp56_rac_gets_nn(c, 7); model->coeff_dccv[pt][node] = def_prob[node]; - } else if (s->frames[VP56_FRAME_CURRENT]->key_frame) { + } else if (s->frames[VP56_FRAME_CURRENT]->flags & AV_FRAME_FLAG_KEY) { model->coeff_dccv[pt][node] = def_prob[node]; } @@ -159,7 +162,7 @@ static int vp5_parse_coeff_models(VP56Context *s) if (vpx_rac_get_prob_branchy(c, vp5_ract_pct[ct][pt][cg][node])) { def_prob[node] = vp56_rac_gets_nn(c, 7); model->coeff_ract[pt][ct][cg][node] = def_prob[node]; - } else if (s->frames[VP56_FRAME_CURRENT]->key_frame) { + } else if (s->frames[VP56_FRAME_CURRENT]->flags & AV_FRAME_FLAG_KEY) { model->coeff_ract[pt][ct][cg][node] = def_prob[node]; } diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/vp56.c b/arm/raspi/third_party/ffmpeg/libavcodec/vp56.c index bd994428..a5c5b236 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/vp56.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/vp56.c @@ -350,7 +350,7 @@ static void vp56_mc(VP56Context *s, int b, int plane, uint8_t *src, if (s->avctx->skip_loop_filter >= AVDISCARD_ALL || (s->avctx->skip_loop_filter >= AVDISCARD_NONKEY - && !s->frames[VP56_FRAME_CURRENT]->key_frame)) + && !(s->frames[VP56_FRAME_CURRENT]->flags & AV_FRAME_FLAG_KEY))) deblock_filtering = 0; dx = s->mv[b].x / s->vp56_coord_div[b]; @@ -493,7 +493,7 @@ static int vp56_decode_mb(VP56Context *s, int row, int col, int is_alpha) VP56mb mb_type; int ret; - if (s->frames[VP56_FRAME_CURRENT]->key_frame) + if (s->frames[VP56_FRAME_CURRENT]->flags & AV_FRAME_FLAG_KEY) mb_type = VP56_MB_INTRA; else mb_type = vp56_decode_mv(s, row, col); @@ -511,7 +511,7 @@ static int vp56_conceal_mb(VP56Context *s, int row, int col, int is_alpha) { VP56mb mb_type; - if (s->frames[VP56_FRAME_CURRENT]->key_frame) + if (s->frames[VP56_FRAME_CURRENT]->flags & AV_FRAME_FLAG_KEY) mb_type = VP56_MB_INTRA; else mb_type = vp56_conceal_mv(s, row, col); @@ -596,6 +596,7 @@ int ff_vp56_decode_frame(AVCodecContext *avctx, AVFrame *rframe, if (s->alpha_context) av_frame_unref(s->alpha_context->frames[i]); } + s->frames[VP56_FRAME_CURRENT]->flags |= AV_FRAME_FLAG_KEY; //FIXME } ret = ff_get_buffer(avctx, p, AV_GET_BUFFER_FLAG_REF); @@ -670,7 +671,7 @@ static int ff_vp56_decode_mbs(AVCodecContext *avctx, void *data, int res; int damaged = 0; - if (p->key_frame) { + if (p->flags & AV_FRAME_FLAG_KEY) { p->pict_type = AV_PICTURE_TYPE_I; s->default_models_init(s); for (block=0; blockmb_height*s->mb_width; block++) @@ -762,7 +763,7 @@ static int ff_vp56_decode_mbs(AVCodecContext *avctx, void *data, s->have_undamaged_frame = 1; next: - if (p->key_frame || s->golden_frame) { + if ((p->flags & AV_FRAME_FLAG_KEY) || s->golden_frame) { av_frame_unref(s->frames[VP56_FRAME_GOLDEN]); if ((res = av_frame_ref(s->frames[VP56_FRAME_GOLDEN], p)) < 0) return res; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/vp6.c b/arm/raspi/third_party/ffmpeg/libavcodec/vp6.c index 9bbfa0eb..7a519cf1 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/vp6.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/vp6.c @@ -57,10 +57,13 @@ static int vp6_parse_header(VP56Context *s, const uint8_t *buf, int buf_size) int ret; int separated_coeff = buf[0] & 1; - s->frames[VP56_FRAME_CURRENT]->key_frame = !(buf[0] & 0x80); + if (!(buf[0] & 0x80)) + s->frames[VP56_FRAME_CURRENT]->flags |= AV_FRAME_FLAG_KEY; + else + s->frames[VP56_FRAME_CURRENT]->flags &= ~AV_FRAME_FLAG_KEY; ff_vp56_init_dequant(s, (buf[0] >> 1) & 0x3F); - if (s->frames[VP56_FRAME_CURRENT]->key_frame) { + if (s->frames[VP56_FRAME_CURRENT]->flags & AV_FRAME_FLAG_KEY) { sub_version = buf[1] >> 3; if (sub_version > 8) return AVERROR_INVALIDDATA; @@ -299,7 +302,7 @@ static int vp6_parse_coeff_models(VP56Context *s) if (vpx_rac_get_prob_branchy(c, vp6_dccv_pct[pt][node])) { def_prob[node] = vp56_rac_gets_nn(c, 7); model->coeff_dccv[pt][node] = def_prob[node]; - } else if (s->frames[VP56_FRAME_CURRENT]->key_frame) { + } else if (s->frames[VP56_FRAME_CURRENT]->flags & AV_FRAME_FLAG_KEY) { model->coeff_dccv[pt][node] = def_prob[node]; } @@ -322,7 +325,7 @@ static int vp6_parse_coeff_models(VP56Context *s) if (vpx_rac_get_prob_branchy(c, vp6_ract_pct[ct][pt][cg][node])) { def_prob[node] = vp56_rac_gets_nn(c, 7); model->coeff_ract[pt][ct][cg][node] = def_prob[node]; - } else if (s->frames[VP56_FRAME_CURRENT]->key_frame) { + } else if (s->frames[VP56_FRAME_CURRENT]->flags & AV_FRAME_FLAG_KEY) { model->coeff_ract[pt][ct][cg][node] = def_prob[node]; } diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/vp8.c b/arm/raspi/third_party/ffmpeg/libavcodec/vp8.c index db2419de..2ab06c82 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/vp8.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/vp8.c @@ -2732,7 +2732,10 @@ int vp78_decode_frame(AVCodecContext *avctx, AVFrame *rframe, int *got_frame, goto err; } - curframe->tf.f->key_frame = s->keyframe; + if (s->keyframe) + curframe->tf.f->flags |= AV_FRAME_FLAG_KEY; + else + curframe->tf.f->flags &= ~AV_FRAME_FLAG_KEY; curframe->tf.f->pict_type = s->keyframe ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; if ((ret = vp8_alloc_frame(s, curframe, referenced)) < 0) diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/vp8data.c b/arm/raspi/third_party/ffmpeg/libavcodec/vp8data.c new file mode 100644 index 00000000..85740692 --- /dev/null +++ b/arm/raspi/third_party/ffmpeg/libavcodec/vp8data.c @@ -0,0 +1,42 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include + +// cat 1 and 2 are defined in vp8data.h +static const uint8_t vp8_dct_cat3_prob[] = { + 173, 148, 140, 0 +}; +static const uint8_t vp8_dct_cat4_prob[] = { + 176, 155, 140, 135, 0 +}; +static const uint8_t vp8_dct_cat5_prob[] = { + 180, 157, 141, 134, 130, 0 +}; +static const uint8_t vp8_dct_cat6_prob[] = { + 254, 254, 243, 230, 196, 177, 153, 140, 133, 130, 129, 0 +}; + +// only used for cat3 and above; cat 1 and 2 are referenced directly. +const uint8_t *const ff_vp8_dct_cat_prob[] = { + vp8_dct_cat3_prob, + vp8_dct_cat4_prob, + vp8_dct_cat5_prob, + vp8_dct_cat6_prob, +}; + diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/vp8data.h b/arm/raspi/third_party/ffmpeg/libavcodec/vp8data.h index 1fcce134..8b8f1ed1 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/vp8data.h +++ b/arm/raspi/third_party/ffmpeg/libavcodec/vp8data.h @@ -339,26 +339,8 @@ static const uint8_t vp8_dct_cat1_prob[] = { static const uint8_t vp8_dct_cat2_prob[] = { 165, 145, 0 }; -static const uint8_t vp8_dct_cat3_prob[] = { - 173, 148, 140, 0 -}; -static const uint8_t vp8_dct_cat4_prob[] = { - 176, 155, 140, 135, 0 -}; -static const uint8_t vp8_dct_cat5_prob[] = { - 180, 157, 141, 134, 130, 0 -}; -static const uint8_t vp8_dct_cat6_prob[] = { - 254, 254, 243, 230, 196, 177, 153, 140, 133, 130, 129, 0 -}; -// only used for cat3 and above; cat 1 and 2 are referenced directly -const uint8_t *const ff_vp8_dct_cat_prob[] = { - vp8_dct_cat3_prob, - vp8_dct_cat4_prob, - vp8_dct_cat5_prob, - vp8_dct_cat6_prob, -}; +extern const uint8_t *const ff_vp8_dct_cat_prob[]; static const uint8_t vp8_token_default_probs[4][8][3][NUM_DCT_TOKENS - 1] = { { diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/vp9.c b/arm/raspi/third_party/ffmpeg/libavcodec/vp9.c index 7ff387fa..d8a31507 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/vp9.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/vp9.c @@ -1613,7 +1613,10 @@ static int vp9_decode_frame(AVCodecContext *avctx, AVFrame *frame, if ((ret = vp9_frame_alloc(avctx, &s->s.frames[CUR_FRAME])) < 0) return ret; f = s->s.frames[CUR_FRAME].tf.f; - f->key_frame = s->s.h.keyframe; + if (s->s.h.keyframe) + f->flags |= AV_FRAME_FLAG_KEY; + else + f->flags &= ~AV_FRAME_FLAG_KEY; f->pict_type = (s->s.h.keyframe || s->s.h.intraonly) ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; if (s->s.frames[REF_FRAME_SEGMAP].tf.f->buf[0] && diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/vqavideo.c b/arm/raspi/third_party/ffmpeg/libavcodec/vqavideo.c index 0573696d..2977cf9a 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/vqavideo.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/vqavideo.c @@ -809,7 +809,11 @@ static int vqa_decode_frame(AVCodecContext *avctx, AVFrame *rframe, /* make the palette available on the way out */ memcpy(s->frame->data[1], s->palette, PALETTE_COUNT * 4); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS s->frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } else if (avctx->pix_fmt == AV_PIX_FMT_RGB555LE) { if ((res = vqa_decode_frame_hicolor(s, s->frame)) < 0) return res; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/wavarc.c b/arm/raspi/third_party/ffmpeg/libavcodec/wavarc.c index 8d37af95..7bfc276d 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/wavarc.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/wavarc.c @@ -343,13 +343,15 @@ static int decode_2slp(AVCodecContext *avctx, break; case 0: order = get_urice(gb, 2); + if ((unsigned)order >= FF_ARRAY_ELEMS(s->filter[ch])) + return AVERROR_INVALIDDATA; for (int o = 0; o < order; o++) s->filter[ch][o] = get_srice(gb, 2); for (int n = 0; n < s->nb_samples; n++) { int sum = 15; for (int o = 0; o < order; o++) - sum += s->filter[ch][o] * samples[n + 70 - o - 1]; + sum += s->filter[ch][o] * (unsigned)samples[n + 70 - o - 1]; samples[n + 70] = get_srice(gb, k) + (sum >> 4); } @@ -452,7 +454,7 @@ fail: const int *src = s->samples[ch] + s->offset; for (int n = 0; n < frame->nb_samples; n++) - dst[n] = src[n] * (1 << s->shift) + 0x80U; + dst[n] = src[n] * (1U << s->shift) + 0x80U; } break; case AV_SAMPLE_FMT_S16P: @@ -461,7 +463,7 @@ fail: const int *src = s->samples[ch] + s->offset; for (int n = 0; n < frame->nb_samples; n++) - dst[n] = src[n] * (1 << s->shift); + dst[n] = src[n] * (1U << s->shift); } break; } @@ -497,7 +499,9 @@ const FFCodec ff_wavarc_decoder = { FF_CODEC_DECODE_CB(wavarc_decode), .close = wavarc_close, .p.capabilities = AV_CODEC_CAP_DR1 | +#if FF_API_SUBFRAMES AV_CODEC_CAP_SUBFRAMES | +#endif AV_CODEC_CAP_DELAY, .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_U8P, AV_SAMPLE_FMT_S16P, diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/wavpackenc.c b/arm/raspi/third_party/ffmpeg/libavcodec/wavpackenc.c index 3d2d4536..9271e879 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/wavpackenc.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/wavpackenc.c @@ -2824,7 +2824,7 @@ static void fill_buffer(WavPackEncodeContext *s, switch (s->avctx->sample_fmt) { case AV_SAMPLE_FMT_U8P: - COPY_SAMPLES(int8_t, 0x80, 0); + COPY_SAMPLES(uint8_t, 0x80, 0); break; case AV_SAMPLE_FMT_S16P: COPY_SAMPLES(int16_t, 0, 0); diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/wbmpdec.c b/arm/raspi/third_party/ffmpeg/libavcodec/wbmpdec.c index 8b105bc1..3b5753ab 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/wbmpdec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/wbmpdec.c @@ -74,7 +74,7 @@ static int wbmp_decode_frame(AVCodecContext *avctx, AVFrame *p, else readbits(p->data[0], width, height, p->linesize[0], gb.buffer, gb.buffer_end - gb.buffer); - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; p->pict_type = AV_PICTURE_TYPE_I; *got_frame = 1; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/wcmv.c b/arm/raspi/third_party/ffmpeg/libavcodec/wcmv.c index 097ac8b8..b2413ee9 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/wcmv.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/wcmv.c @@ -195,7 +195,10 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, } } - s->prev_frame->key_frame = intra; + if (intra) + s->prev_frame->flags |= AV_FRAME_FLAG_KEY; + else + s->prev_frame->flags &= ~AV_FRAME_FLAG_KEY; s->prev_frame->pict_type = intra ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; if ((ret = av_frame_ref(frame, s->prev_frame)) < 0) diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/webp.c b/arm/raspi/third_party/ffmpeg/libavcodec/webp.c index b4357f95..d35cb66f 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/webp.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/webp.c @@ -1186,7 +1186,7 @@ static int vp8_lossless_decode_frame(AVCodecContext *avctx, AVFrame *p, *got_frame = 1; p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; ret = data_size; free_and_return: diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/wmalosslessdec.c b/arm/raspi/third_party/ffmpeg/libavcodec/wmalosslessdec.c index d545d848..5d1c7ac6 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/wmalosslessdec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/wmalosslessdec.c @@ -1334,7 +1334,11 @@ const FFCodec ff_wmalossless_decoder = { .close = decode_close, FF_CODEC_DECODE_CB(decode_packet), .flush = flush, - .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY, + .p.capabilities = +#if FF_API_SUBFRAMES + AV_CODEC_CAP_SUBFRAMES | +#endif + AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P, AV_SAMPLE_FMT_S32P, diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/wmaprodec.c b/arm/raspi/third_party/ffmpeg/libavcodec/wmaprodec.c index 35e9caec..f523f363 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/wmaprodec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/wmaprodec.c @@ -2094,7 +2094,11 @@ const FFCodec ff_wmapro_decoder = { .init = wmapro_decode_init, .close = wmapro_decode_end, FF_CODEC_DECODE_CB(wmapro_decode_packet), - .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1, + .p.capabilities = +#if FF_API_SUBFRAMES + AV_CODEC_CAP_SUBFRAMES | +#endif + AV_CODEC_CAP_DR1, .flush = wmapro_flush, .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_NONE }, @@ -2111,7 +2115,11 @@ const FFCodec ff_xma1_decoder = { .close = xma_decode_end, FF_CODEC_DECODE_CB(xma_decode_packet), .flush = xma_flush, - .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY, + .p.capabilities = +#if FF_API_SUBFRAMES + AV_CODEC_CAP_SUBFRAMES | +#endif + AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY, .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_NONE }, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, @@ -2127,7 +2135,11 @@ const FFCodec ff_xma2_decoder = { .close = xma_decode_end, FF_CODEC_DECODE_CB(xma_decode_packet), .flush = xma_flush, - .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY, + .p.capabilities = +#if FF_API_SUBFRAMES + AV_CODEC_CAP_SUBFRAMES | +#endif + AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY, .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_NONE }, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/wmavoice.c b/arm/raspi/third_party/ffmpeg/libavcodec/wmavoice.c index bb98f841..44fda0e2 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/wmavoice.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/wmavoice.c @@ -2004,7 +2004,11 @@ const FFCodec ff_wmavoice_decoder = { .init = wmavoice_decode_init, .close = wmavoice_decode_end, FF_CODEC_DECODE_CB(wmavoice_decode_packet), - .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY, + .p.capabilities = +#if FF_API_SUBFRAMES + AV_CODEC_CAP_SUBFRAMES | +#endif + AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, .flush = wmavoice_flush, }; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/wnv1.c b/arm/raspi/third_party/ffmpeg/libavcodec/wnv1.c index 88532ee4..5c57db00 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/wnv1.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/wnv1.c @@ -69,7 +69,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, if ((ret = ff_get_buffer(avctx, p, 0)) < 0) return ret; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; if ((ret = init_get_bits8(&gb, buf + 8, buf_size - 8)) < 0) return ret; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/x86/cabac.h b/arm/raspi/third_party/ffmpeg/libavcodec/x86/cabac.h index b046a56a..ce2aefcb 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/x86/cabac.h +++ b/arm/raspi/third_party/ffmpeg/libavcodec/x86/cabac.h @@ -178,7 +178,7 @@ #if HAVE_7REGS && !BROKEN_COMPILER #define get_cabac_inline get_cabac_inline_x86 static -#if defined(_WIN32) && !defined(_WIN64) && defined(__clang__) +#if ARCH_X86_32 av_noinline #else av_always_inline diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/xbmdec.c b/arm/raspi/third_party/ffmpeg/libavcodec/xbmdec.c index a0cc1cb8..ecfc957a 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/xbmdec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/xbmdec.c @@ -130,7 +130,7 @@ static int xbm_decode_frame(AVCodecContext *avctx, AVFrame *p, } } - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; p->pict_type = AV_PICTURE_TYPE_I; *got_frame = 1; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/xl.c b/arm/raspi/third_party/ffmpeg/libavcodec/xl.c index 283cd39a..f008d56e 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/xl.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/xl.c @@ -60,7 +60,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, if ((ret = ff_get_buffer(avctx, p, 0)) < 0) return ret; p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; Y = p->data[0]; U = p->data[1]; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/xpmdec.c b/arm/raspi/third_party/ffmpeg/libavcodec/xpmdec.c index 2550afb9..5bc02378 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/xpmdec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/xpmdec.c @@ -422,7 +422,7 @@ static int xpm_decode_frame(AVCodecContext *avctx, AVFrame *p, ptr += mod_strcspn(ptr, ",") + 1; } - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; p->pict_type = AV_PICTURE_TYPE_I; *got_frame = 1; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/xwddec.c b/arm/raspi/third_party/ffmpeg/libavcodec/xwddec.c index 6c5bc44a..f691587b 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/xwddec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/xwddec.c @@ -216,7 +216,7 @@ static int xwd_decode_frame(AVCodecContext *avctx, AVFrame *p, if ((ret = ff_get_buffer(avctx, p, 0)) < 0) return ret; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; p->pict_type = AV_PICTURE_TYPE_I; if (avctx->pix_fmt == AV_PIX_FMT_PAL8) { diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/y41pdec.c b/arm/raspi/third_party/ffmpeg/libavcodec/y41pdec.c index b461f349..14e36dc9 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/y41pdec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/y41pdec.c @@ -51,7 +51,7 @@ static int y41p_decode_frame(AVCodecContext *avctx, AVFrame *pic, if ((ret = ff_get_buffer(avctx, pic, 0)) < 0) return ret; - pic->key_frame = 1; + pic->flags |= AV_FRAME_FLAG_KEY; pic->pict_type = AV_PICTURE_TYPE_I; for (i = avctx->height - 1; i >= 0 ; i--) { diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/ylc.c b/arm/raspi/third_party/ffmpeg/libavcodec/ylc.c index 29c10f05..c0c4d27c 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/ylc.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/ylc.c @@ -427,7 +427,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, } p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; *got_frame = 1; return avpkt->size; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/yop.c b/arm/raspi/third_party/ffmpeg/libavcodec/yop.c index 14244c94..1294c5cc 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/yop.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/yop.c @@ -232,7 +232,11 @@ static int yop_decode_frame(AVCodecContext *avctx, AVFrame *rframe, (palette[i + firstcolor] >> 6) & 0x30303; } +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif for (y = 0; y < avctx->height; y += 2) { for (x = 0; x < avctx->width; x += 2) { diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/yuv4dec.c b/arm/raspi/third_party/ffmpeg/libavcodec/yuv4dec.c index 15424b19..ad83a212 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/yuv4dec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/yuv4dec.c @@ -46,7 +46,7 @@ static int yuv4_decode_frame(AVCodecContext *avctx, AVFrame *pic, if ((ret = ff_get_buffer(avctx, pic, 0)) < 0) return ret; - pic->key_frame = 1; + pic->flags |= AV_FRAME_FLAG_KEY; pic->pict_type = AV_PICTURE_TYPE_I; y = pic->data[0]; diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/zerocodec.c b/arm/raspi/third_party/ffmpeg/libavcodec/zerocodec.c index 42fb24ff..6c3bcebc 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/zerocodec.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/zerocodec.c @@ -40,7 +40,7 @@ static int zerocodec_decode_frame(AVCodecContext *avctx, AVFrame *pic, int i, j, zret, ret; if (avpkt->flags & AV_PKT_FLAG_KEY) { - pic->key_frame = 1; + pic->flags |= AV_FRAME_FLAG_KEY; pic->pict_type = AV_PICTURE_TYPE_I; } else { if (!prev) { @@ -50,7 +50,7 @@ static int zerocodec_decode_frame(AVCodecContext *avctx, AVFrame *pic, prev += (avctx->height - 1) * prev_pic->linesize[0]; - pic->key_frame = 0; + pic->flags &= ~AV_FRAME_FLAG_KEY; pic->pict_type = AV_PICTURE_TYPE_P; } diff --git a/arm/raspi/third_party/ffmpeg/libavcodec/zmbv.c b/arm/raspi/third_party/ffmpeg/libavcodec/zmbv.c index 0b448518..d309a861 100644 --- a/arm/raspi/third_party/ffmpeg/libavcodec/zmbv.c +++ b/arm/raspi/third_party/ffmpeg/libavcodec/zmbv.c @@ -559,11 +559,11 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, return ret; if (c->flags & ZMBV_KEYFRAME) { - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_I; zmbv_decode_intra(c); } else { - frame->key_frame = 0; + frame->flags &= ~AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_P; if (c->decomp_len < 2LL * ((c->width + c->bw - 1) / c->bw) * ((c->height + c->bh - 1) / c->bh)) return AVERROR_INVALIDDATA; diff --git a/arm/raspi/third_party/ffmpeg/libavutil/frame.c b/arm/raspi/third_party/ffmpeg/libavutil/frame.c index c905e8d6..b6cee2d8 100644 --- a/arm/raspi/third_party/ffmpeg/libavutil/frame.c +++ b/arm/raspi/third_party/ffmpeg/libavutil/frame.c @@ -55,7 +55,6 @@ FF_DISABLE_DEPRECATION_WARNINGS FF_ENABLE_DEPRECATION_WARNINGS #endif frame->time_base = (AVRational){ 0, 1 }; - frame->key_frame = 1; frame->sample_aspect_ratio = (AVRational){ 0, 1 }; frame->format = -1; /* unknown */ frame->extended_data = frame->data; @@ -265,7 +264,11 @@ static int frame_copy_props(AVFrame *dst, const AVFrame *src, int force_copy) { int ret; +#if FF_API_FRAME_KEY +FF_DISABLE_DEPRECATION_WARNINGS dst->key_frame = src->key_frame; +FF_ENABLE_DEPRECATION_WARNINGS +#endif dst->pict_type = src->pict_type; dst->sample_aspect_ratio = src->sample_aspect_ratio; dst->crop_top = src->crop_top; @@ -275,9 +278,17 @@ static int frame_copy_props(AVFrame *dst, const AVFrame *src, int force_copy) dst->pts = src->pts; dst->duration = src->duration; dst->repeat_pict = src->repeat_pict; +#if FF_API_INTERLACED_FRAME +FF_DISABLE_DEPRECATION_WARNINGS dst->interlaced_frame = src->interlaced_frame; dst->top_field_first = src->top_field_first; +FF_ENABLE_DEPRECATION_WARNINGS +#endif +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS dst->palette_has_changed = src->palette_has_changed; +FF_ENABLE_DEPRECATION_WARNINGS +#endif dst->sample_rate = src->sample_rate; dst->opaque = src->opaque; dst->pkt_dts = src->pkt_dts; @@ -468,6 +479,133 @@ fail: return ret; } +int av_frame_replace(AVFrame *dst, const AVFrame *src) +{ + int ret = 0; + + if (dst == src) + return AVERROR(EINVAL); + + if (!src->buf[0]) { + av_frame_unref(dst); + + /* duplicate the frame data if it's not refcounted */ + if ( src->data[0] || src->data[1] + || src->data[2] || src->data[3]) + return av_frame_ref(dst, src); + + ret = frame_copy_props(dst, src, 0); + if (ret < 0) + goto fail; + } + + dst->format = src->format; + dst->width = src->width; + dst->height = src->height; + dst->nb_samples = src->nb_samples; +#if FF_API_OLD_CHANNEL_LAYOUT +FF_DISABLE_DEPRECATION_WARNINGS + dst->channels = src->channels; + dst->channel_layout = src->channel_layout; + if (!av_channel_layout_check(&src->ch_layout)) { + av_channel_layout_uninit(&dst->ch_layout); + if (src->channel_layout) + av_channel_layout_from_mask(&dst->ch_layout, src->channel_layout); + else { + dst->ch_layout.nb_channels = src->channels; + dst->ch_layout.order = AV_CHANNEL_ORDER_UNSPEC; + } + } else { +#endif + ret = av_channel_layout_copy(&dst->ch_layout, &src->ch_layout); + if (ret < 0) + goto fail; +#if FF_API_OLD_CHANNEL_LAYOUT + } +FF_ENABLE_DEPRECATION_WARNINGS +#endif + + wipe_side_data(dst); + av_dict_free(&dst->metadata); + ret = frame_copy_props(dst, src, 0); + if (ret < 0) + goto fail; + + /* replace the buffers */ + for (int i = 0; i < FF_ARRAY_ELEMS(src->buf); i++) { + ret = av_buffer_replace(&dst->buf[i], src->buf[i]); + if (ret < 0) + goto fail; + } + + if (src->extended_buf) { + if (dst->nb_extended_buf != src->nb_extended_buf) { + int nb_extended_buf = FFMIN(dst->nb_extended_buf, src->nb_extended_buf); + void *tmp; + + for (int i = nb_extended_buf; i < dst->nb_extended_buf; i++) + av_buffer_unref(&dst->extended_buf[i]); + + tmp = av_realloc_array(dst->extended_buf, sizeof(*dst->extended_buf), + src->nb_extended_buf); + if (!tmp) { + ret = AVERROR(ENOMEM); + goto fail; + } + dst->extended_buf = tmp; + dst->nb_extended_buf = src->nb_extended_buf; + + memset(&dst->extended_buf[nb_extended_buf], 0, + (src->nb_extended_buf - nb_extended_buf) * sizeof(*dst->extended_buf)); + } + + for (int i = 0; i < src->nb_extended_buf; i++) { + ret = av_buffer_replace(&dst->extended_buf[i], src->extended_buf[i]); + if (ret < 0) + goto fail; + } + } else if (dst->extended_buf) { + for (int i = 0; i < dst->nb_extended_buf; i++) + av_buffer_unref(&dst->extended_buf[i]); + av_freep(&dst->extended_buf); + } + + ret = av_buffer_replace(&dst->hw_frames_ctx, src->hw_frames_ctx); + if (ret < 0) + goto fail; + + if (dst->extended_data != dst->data) + av_freep(&dst->extended_data); + + if (src->extended_data != src->data) { + int ch = dst->ch_layout.nb_channels; + + if (!ch) { + ret = AVERROR(EINVAL); + goto fail; + } + + if (ch > SIZE_MAX / sizeof(*dst->extended_data)) + goto fail; + + dst->extended_data = av_memdup(src->extended_data, sizeof(*dst->extended_data) * ch); + if (!dst->extended_data) { + ret = AVERROR(ENOMEM); + goto fail; + } + } else + dst->extended_data = dst->data; + + memcpy(dst->data, src->data, sizeof(src->data)); + memcpy(dst->linesize, src->linesize, sizeof(src->linesize)); + + return 0; + +fail: + av_frame_unref(dst); + return ret; +} + AVFrame *av_frame_clone(const AVFrame *src) { AVFrame *ret = av_frame_alloc(); @@ -600,7 +738,7 @@ int av_frame_copy_props(AVFrame *dst, const AVFrame *src) return frame_copy_props(dst, src, 1); } -AVBufferRef *av_frame_get_plane_buffer(AVFrame *frame, int plane) +AVBufferRef *av_frame_get_plane_buffer(const AVFrame *frame, int plane) { uint8_t *data; int planes; diff --git a/arm/raspi/third_party/ffmpeg/libavutil/frame.h b/arm/raspi/third_party/ffmpeg/libavutil/frame.h index 7be1b87c..575ded3c 100644 --- a/arm/raspi/third_party/ffmpeg/libavutil/frame.h +++ b/arm/raspi/third_party/ffmpeg/libavutil/frame.h @@ -416,10 +416,15 @@ typedef struct AVFrame { */ int format; +#if FF_API_FRAME_KEY /** * 1 -> keyframe, 0-> not + * + * @deprecated Use AV_FRAME_FLAG_KEY instead */ + attribute_deprecated int key_frame; +#endif /** * Picture type of the frame. @@ -486,25 +491,50 @@ typedef struct AVFrame { void *opaque; /** - * When decoding, this signals how much the picture must be delayed. - * extra_delay = repeat_pict / (2*fps) + * Number of fields in this frame which should be repeated, i.e. the total + * duration of this frame should be repeat_pict + 2 normal field durations. + * + * For interlaced frames this field may be set to 1, which signals that this + * frame should be presented as 3 fields: beginning with the first field (as + * determined by AV_FRAME_FLAG_TOP_FIELD_FIRST being set or not), followed + * by the second field, and then the first field again. + * + * For progressive frames this field may be set to a multiple of 2, which + * signals that this frame's duration should be (repeat_pict + 2) / 2 + * normal frame durations. + * + * @note This field is computed from MPEG2 repeat_first_field flag and its + * associated flags, H.264 pic_struct from picture timing SEI, and + * their analogues in other codecs. Typically it should only be used when + * higher-layer timing information is not available. */ int repeat_pict; +#if FF_API_INTERLACED_FRAME /** * The content of the picture is interlaced. + * + * @deprecated Use AV_FRAME_FLAG_INTERLACED instead */ + attribute_deprecated int interlaced_frame; /** * If the content is interlaced, is top field displayed first. + * + * @deprecated Use AV_FRAME_FLAG_TOP_FIELD_FIRST instead */ + attribute_deprecated int top_field_first; +#endif +#if FF_API_PALETTE_HAS_CHANGED /** * Tell user application that palette has changed from previous frame. */ + attribute_deprecated int palette_has_changed; +#endif #if FF_API_REORDERED_OPAQUE /** @@ -584,10 +614,23 @@ typedef struct AVFrame { * The frame data may be corrupted, e.g. due to decoding errors. */ #define AV_FRAME_FLAG_CORRUPT (1 << 0) +/** + * A flag to mark frames that are keyframes. + */ +#define AV_FRAME_FLAG_KEY (1 << 1) /** * A flag to mark the frames which need to be decoded, but shouldn't be output. */ #define AV_FRAME_FLAG_DISCARD (1 << 2) +/** + * A flag to mark frames whose content is interlaced. + */ +#define AV_FRAME_FLAG_INTERLACED (1 << 3) +/** + * A flag to mark frames where the top field is displayed first if the content + * is interlaced. + */ +#define AV_FRAME_FLAG_TOP_FIELD_FIRST (1 << 4) /** * @} */ @@ -795,6 +838,19 @@ void av_frame_free(AVFrame **frame); */ int av_frame_ref(AVFrame *dst, const AVFrame *src); +/** + * Ensure the destination frame refers to the same data described by the source + * frame, either by creating a new reference for each AVBufferRef from src if + * they differ from those in dst, by allocating new buffers and copying data if + * src is not reference counted, or by unrefencing it if src is empty. + * + * Frame properties on dst will be replaced by those from src. + * + * @return 0 on success, a negative AVERROR on error. On error, dst is + * unreferenced. + */ +int av_frame_replace(AVFrame *dst, const AVFrame *src); + /** * Create a new frame that references the same data as src. * @@ -903,7 +959,7 @@ int av_frame_copy_props(AVFrame *dst, const AVFrame *src); * @return the buffer reference that contains the plane or NULL if the input * frame is not valid. */ -AVBufferRef *av_frame_get_plane_buffer(AVFrame *frame, int plane); +AVBufferRef *av_frame_get_plane_buffer(const AVFrame *frame, int plane); /** * Add a new side data to a frame. diff --git a/arm/raspi/third_party/ffmpeg/libavutil/hdr_dynamic_metadata.c b/arm/raspi/third_party/ffmpeg/libavutil/hdr_dynamic_metadata.c index d458788c..7033f060 100644 --- a/arm/raspi/third_party/ffmpeg/libavutil/hdr_dynamic_metadata.c +++ b/arm/raspi/third_party/ffmpeg/libavutil/hdr_dynamic_metadata.c @@ -18,14 +18,13 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "avassert.h" #include "hdr_dynamic_metadata.h" #include "mem.h" #include "libavcodec/defs.h" #include "libavcodec/get_bits.h" #include "libavcodec/put_bits.h" -#define T35_PAYLOAD_MAX_SIZE 907 - static const int64_t luminance_den = 1; static const int32_t peak_luminance_den = 15; static const int64_t rgb_den = 100000; @@ -62,14 +61,14 @@ AVDynamicHDRPlus *av_dynamic_hdr_plus_create_side_data(AVFrame *frame) int av_dynamic_hdr_plus_from_t35(AVDynamicHDRPlus *s, const uint8_t *data, size_t size) { - uint8_t padded_buf[T35_PAYLOAD_MAX_SIZE + AV_INPUT_BUFFER_PADDING_SIZE]; + uint8_t padded_buf[AV_HDR_PLUS_MAX_PAYLOAD_SIZE + AV_INPUT_BUFFER_PADDING_SIZE]; GetBitContext gbc, *gb = &gbc; int ret; if (!s) return AVERROR(ENOMEM); - if (size > T35_PAYLOAD_MAX_SIZE) + if (size > AV_HDR_PLUS_MAX_PAYLOAD_SIZE) return AVERROR(EINVAL); memcpy(padded_buf, data, size); @@ -243,8 +242,10 @@ int av_dynamic_hdr_plus_to_t35(const AVDynamicHDRPlus *s, uint8_t **data, size_t size_t size_bits, size_bytes; PutBitContext pbc, *pb = &pbc; - if (!s || !data) + if (!s) return AVERROR(EINVAL); + if ((!data || *data) && !size) + return AVERROR(EINVAL); /** * Buffer size per CTA-861-H p.253-254: @@ -296,9 +297,20 @@ int av_dynamic_hdr_plus_to_t35(const AVDynamicHDRPlus *s, uint8_t **data, size_t size_bytes = (size_bits + 7) / 8; - buf = av_mallocz(size_bytes); - if (!buf) - return AVERROR(ENOMEM); + av_assert0(size_bytes <= AV_HDR_PLUS_MAX_PAYLOAD_SIZE); + + if (!data) { + *size = size_bytes; + return 0; + } else if (*data) { + if (*size < size_bytes) + return AVERROR_BUFFER_TOO_SMALL; + buf = *data; + } else { + buf = av_malloc(size_bytes); + if (!buf) + return AVERROR(ENOMEM); + } init_put_bits(pb, buf, size_bytes); diff --git a/arm/raspi/third_party/ffmpeg/libavutil/hdr_dynamic_metadata.h b/arm/raspi/third_party/ffmpeg/libavutil/hdr_dynamic_metadata.h index 771bb8f4..09e9d8bb 100644 --- a/arm/raspi/third_party/ffmpeg/libavutil/hdr_dynamic_metadata.h +++ b/arm/raspi/third_party/ffmpeg/libavutil/hdr_dynamic_metadata.h @@ -353,13 +353,21 @@ AVDynamicHDRPlus *av_dynamic_hdr_plus_create_side_data(AVFrame *frame); int av_dynamic_hdr_plus_from_t35(AVDynamicHDRPlus *s, const uint8_t *data, size_t size); +#define AV_HDR_PLUS_MAX_PAYLOAD_SIZE 907 + /** * Serialize dynamic HDR10+ metadata to a user data registered ITU-T T.35 buffer, * excluding the first 48 bytes of the header, and beginning with the application mode. * @param s A pointer containing the decoded AVDynamicHDRPlus structure. - * @param data A pointer to a byte buffer to be allocated and filled - * with the serialized metadata. - * @param size A pointer to a size to be set to the returned buffer's size (optional). + * @param data[in,out] A pointer to pointer to a byte buffer to be filled with the + * serialized metadata. + * If *data is NULL, a buffer be will be allocated and a pointer to + * it stored in its place. The caller assumes ownership of the buffer. + * May be NULL, in which case the function will only store the + * required buffer size in *size. + * @param size[in,out] A pointer to a size to be set to the returned buffer's size. + * If *data is not NULL, *size must contain the size of the input + * buffer. May be NULL only if *data is NULL. * * @return >= 0 on success. Otherwise, returns the appropriate AVERROR. */ diff --git a/arm/raspi/third_party/ffmpeg/libavutil/hwcontext_qsv.c b/arm/raspi/third_party/ffmpeg/libavutil/hwcontext_qsv.c index 67804288..4ed4242d 100644 --- a/arm/raspi/third_party/ffmpeg/libavutil/hwcontext_qsv.c +++ b/arm/raspi/third_party/ffmpeg/libavutil/hwcontext_qsv.c @@ -2126,8 +2126,6 @@ static int qsv_device_create(AVHWDeviceContext *ctx, const char *device, "\"%s\".\n", e->value); return AVERROR(EINVAL); } - } else if (CONFIG_VAAPI) { - child_device_type = AV_HWDEVICE_TYPE_VAAPI; #if QSV_ONEVPL } else if (CONFIG_D3D11VA) { // Use D3D11 by default if d3d11va is enabled av_log(ctx, AV_LOG_VERBOSE, @@ -2147,11 +2145,23 @@ static int qsv_device_create(AVHWDeviceContext *ctx, const char *device, } else if (CONFIG_D3D11VA) { child_device_type = AV_HWDEVICE_TYPE_D3D11VA; #endif + } else if (CONFIG_VAAPI) { + child_device_type = AV_HWDEVICE_TYPE_VAAPI; } else { av_log(ctx, AV_LOG_ERROR, "No supported child device type is enabled\n"); return AVERROR(ENOSYS); } +#if CONFIG_VAAPI && defined(_WIN32) + /* AV_HWDEVICE_TYPE_VAAPI on Windows/Libva-win32 not supported */ + /* Reject user specified child_device_type or CONFIG_VAAPI on Windows */ + if (child_device_type == AV_HWDEVICE_TYPE_VAAPI) { + av_log(ctx, AV_LOG_ERROR, "VAAPI child device type not supported for oneVPL on Windows" + "\"%s\".\n", e->value); + return AVERROR(EINVAL); + } +#endif + child_device_opts = NULL; switch (child_device_type) { #if CONFIG_VAAPI diff --git a/arm/raspi/third_party/ffmpeg/libavutil/hwcontext_vaapi.c b/arm/raspi/third_party/ffmpeg/libavutil/hwcontext_vaapi.c index 90c2c191..6c3a227d 100644 --- a/arm/raspi/third_party/ffmpeg/libavutil/hwcontext_vaapi.c +++ b/arm/raspi/third_party/ffmpeg/libavutil/hwcontext_vaapi.c @@ -18,6 +18,15 @@ #include "config.h" +#if HAVE_VAAPI_WIN32 +# include +#define COBJMACROS +# include +# include +# include "compat/w32dlfcn.h" +# include +typedef HRESULT (WINAPI *PFN_CREATE_DXGI_FACTORY)(REFIID riid, void **ppFactory); +#endif #if HAVE_VAAPI_X11 # include #endif @@ -1663,7 +1672,7 @@ static int vaapi_device_create(AVHWDeviceContext *ctx, const char *device, VAAPIDevicePriv *priv; VADisplay display = NULL; const AVDictionaryEntry *ent; - int try_drm, try_x11, try_all; + int try_drm, try_x11, try_win32, try_all; priv = av_mallocz(sizeof(*priv)); if (!priv) @@ -1676,11 +1685,13 @@ static int vaapi_device_create(AVHWDeviceContext *ctx, const char *device, ent = av_dict_get(opts, "connection_type", NULL, 0); if (ent) { - try_all = try_drm = try_x11 = 0; + try_all = try_drm = try_x11 = try_win32 = 0; if (!strcmp(ent->value, "drm")) { try_drm = 1; } else if (!strcmp(ent->value, "x11")) { try_x11 = 1; + } else if (!strcmp(ent->value, "win32")) { + try_win32 = 1; } else { av_log(ctx, AV_LOG_ERROR, "Invalid connection type %s.\n", ent->value); @@ -1690,6 +1701,7 @@ static int vaapi_device_create(AVHWDeviceContext *ctx, const char *device, try_all = 1; try_drm = HAVE_VAAPI_DRM; try_x11 = HAVE_VAAPI_X11; + try_win32 = HAVE_VAAPI_WIN32; } #if HAVE_VAAPI_DRM @@ -1797,6 +1809,68 @@ static int vaapi_device_create(AVHWDeviceContext *ctx, const char *device, } #endif +#if HAVE_VAAPI_WIN32 + if (!display && try_win32) { + // Try to create a display from the specified device, if any. + if (!device) { + display = vaGetDisplayWin32(NULL); + } else { + IDXGIFactory2 *pDXGIFactory = NULL; + IDXGIAdapter *pAdapter = NULL; +#if !HAVE_UWP + HANDLE dxgi = dlopen("dxgi.dll", 0); + if (!dxgi) { + av_log(ctx, AV_LOG_ERROR, "Failed to load dxgi.dll\n"); + return AVERROR_UNKNOWN; + } + PFN_CREATE_DXGI_FACTORY pfnCreateDXGIFactory = + (PFN_CREATE_DXGI_FACTORY)dlsym(dxgi, "CreateDXGIFactory"); + if (!pfnCreateDXGIFactory) { + av_log(ctx, AV_LOG_ERROR, "CreateDXGIFactory load failed\n"); + dlclose(dxgi); + return AVERROR_UNKNOWN; + } +#else + // In UWP (which lacks LoadLibrary), CreateDXGIFactory isn't + // available, only CreateDXGIFactory1 + PFN_CREATE_DXGI_FACTORY pfnCreateDXGIFactory = + (PFN_CREATE_DXGI_FACTORY)CreateDXGIFactory1; +#endif + if (SUCCEEDED(pfnCreateDXGIFactory(&IID_IDXGIFactory2, + (void **)&pDXGIFactory))) { + int adapter = atoi(device); + if (SUCCEEDED(IDXGIFactory2_EnumAdapters(pDXGIFactory, + adapter, + &pAdapter))) { + DXGI_ADAPTER_DESC desc; + if (SUCCEEDED(IDXGIAdapter2_GetDesc(pAdapter, &desc))) { + av_log(ctx, AV_LOG_INFO, + "Using device %04x:%04x (%ls) - LUID %lu %ld.\n", + desc.VendorId, desc.DeviceId, desc.Description, + desc.AdapterLuid.LowPart, + desc.AdapterLuid.HighPart); + display = vaGetDisplayWin32(&desc.AdapterLuid); + } + IDXGIAdapter_Release(pAdapter); + } + IDXGIFactory2_Release(pDXGIFactory); + } +#if !HAVE_UWP + dlclose(dxgi); +#endif + } + + if (!display) { + av_log(ctx, AV_LOG_ERROR, "Cannot open a VA display " + "from Win32 display.\n"); + return AVERROR_UNKNOWN; + } + + av_log(ctx, AV_LOG_VERBOSE, "Opened VA display via " + "Win32 display.\n"); + } +#endif + if (!display) { if (device) av_log(ctx, AV_LOG_ERROR, "No VA display found for " diff --git a/arm/raspi/third_party/ffmpeg/libavutil/internal.h b/arm/raspi/third_party/ffmpeg/libavutil/internal.h index 941830c6..a71c39e0 100644 --- a/arm/raspi/third_party/ffmpeg/libavutil/internal.h +++ b/arm/raspi/third_party/ffmpeg/libavutil/internal.h @@ -40,7 +40,6 @@ #include #include "config.h" #include "attributes.h" -#include "timer.h" #include "macros.h" #include "pixfmt.h" diff --git a/arm/raspi/third_party/ffmpeg/libavutil/mathematics.h b/arm/raspi/third_party/ffmpeg/libavutil/mathematics.h index e4aff1e9..3e7b52ee 100644 --- a/arm/raspi/third_party/ffmpeg/libavutil/mathematics.h +++ b/arm/raspi/third_party/ffmpeg/libavutil/mathematics.h @@ -36,30 +36,81 @@ #ifndef M_E #define M_E 2.7182818284590452354 /* e */ #endif +#ifndef M_Ef +#define M_Ef 2.7182818284590452354f /* e */ +#endif #ifndef M_LN2 #define M_LN2 0.69314718055994530942 /* log_e 2 */ #endif +#ifndef M_LN2f +#define M_LN2f 0.69314718055994530942f /* log_e 2 */ +#endif #ifndef M_LN10 #define M_LN10 2.30258509299404568402 /* log_e 10 */ #endif +#ifndef M_LN10f +#define M_LN10f 2.30258509299404568402f /* log_e 10 */ +#endif #ifndef M_LOG2_10 #define M_LOG2_10 3.32192809488736234787 /* log_2 10 */ #endif +#ifndef M_LOG2_10f +#define M_LOG2_10f 3.32192809488736234787f /* log_2 10 */ +#endif #ifndef M_PHI #define M_PHI 1.61803398874989484820 /* phi / golden ratio */ #endif +#ifndef M_PHIf +#define M_PHIf 1.61803398874989484820f /* phi / golden ratio */ +#endif #ifndef M_PI #define M_PI 3.14159265358979323846 /* pi */ #endif +#ifndef M_PIf +#define M_PIf 3.14159265358979323846f /* pi */ +#endif #ifndef M_PI_2 #define M_PI_2 1.57079632679489661923 /* pi/2 */ #endif +#ifndef M_PI_2f +#define M_PI_2f 1.57079632679489661923f /* pi/2 */ +#endif +#ifndef M_PI_4 +#define M_PI_4 0.78539816339744830962 /* pi/4 */ +#endif +#ifndef M_PI_4f +#define M_PI_4f 0.78539816339744830962f /* pi/4 */ +#endif +#ifndef M_1_PI +#define M_1_PI 0.31830988618379067154 /* 1/pi */ +#endif +#ifndef M_1_PIf +#define M_1_PIf 0.31830988618379067154f /* 1/pi */ +#endif +#ifndef M_2_PI +#define M_2_PI 0.63661977236758134308 /* 2/pi */ +#endif +#ifndef M_2_PIf +#define M_2_PIf 0.63661977236758134308f /* 2/pi */ +#endif +#ifndef M_2_SQRTPI +#define M_2_SQRTPI 1.12837916709551257390 /* 2/sqrt(pi) */ +#endif +#ifndef M_2_SQRTPIf +#define M_2_SQRTPIf 1.12837916709551257390f /* 2/sqrt(pi) */ +#endif #ifndef M_SQRT1_2 #define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */ #endif +#ifndef M_SQRT1_2f +#define M_SQRT1_2f 0.70710678118654752440f /* 1/sqrt(2) */ +#endif #ifndef M_SQRT2 #define M_SQRT2 1.41421356237309504880 /* sqrt(2) */ #endif +#ifndef M_SQRT2f +#define M_SQRT2f 1.41421356237309504880f /* sqrt(2) */ +#endif #ifndef NAN #define NAN av_int2float(0x7fc00000) #endif diff --git a/arm/raspi/third_party/ffmpeg/libavutil/riscv/bswap.h b/arm/raspi/third_party/ffmpeg/libavutil/riscv/bswap.h index de1429c0..ce75de97 100644 --- a/arm/raspi/third_party/ffmpeg/libavutil/riscv/bswap.h +++ b/arm/raspi/third_party/ffmpeg/libavutil/riscv/bswap.h @@ -23,52 +23,10 @@ #include "config.h" #include "libavutil/attributes.h" -#if defined (__riscv_zbb) && (__riscv_zbb > 0) && HAVE_INLINE_ASM +#if defined (__GNUC__) || defined (__clang__) +#define av_bswap16 __builtin_bswap16 +#define av_bswap32 __builtin_bswap32 +#define av_bswap64 __builtin_bswap64 +#endif -static av_always_inline av_const uintptr_t av_bswap_xlen(uintptr_t x) -{ - uintptr_t y; - - __asm__("rev8 %0, %1" : "=r" (y) : "r" (x)); - return y; -} - -#define av_bswap16 av_bswap16 - -static av_always_inline av_const uint_fast16_t av_bswap16(uint_fast16_t x) -{ - return av_bswap_xlen(x) >> (__riscv_xlen - 16); -} - -#if (__riscv_xlen == 32) -#define av_bswap32 av_bswap_xlen -#define av_bswap64 av_bswap64 - -static av_always_inline av_const uint64_t av_bswap64(uint64_t x) -{ - return (((uint64_t)av_bswap32(x)) << 32) | av_bswap32(x >> 32); -} - -#else -#define av_bswap32 av_bswap32 - -static av_always_inline av_const uint_fast32_t av_bswap32(uint_fast32_t x) -{ - return av_bswap_xlen(x) >> (__riscv_xlen - 32); -} - -#if (__riscv_xlen == 64) -#define av_bswap64 av_bswap_xlen - -#else -#define av_bswap64 av_bswap64 - -static av_always_inline av_const uint_fast64_t av_bswap64(uint_fast64_t x) -{ - return av_bswap_xlen(x) >> (__riscv_xlen - 64); -} - -#endif /* __riscv_xlen > 64 */ -#endif /* __riscv_xlen > 32 */ -#endif /* __riscv_zbb */ #endif /* AVUTIL_RISCV_BSWAP_H */ diff --git a/arm/raspi/third_party/ffmpeg/libavutil/riscv/intmath.h b/arm/raspi/third_party/ffmpeg/libavutil/riscv/intmath.h index 45bce9a0..ae9ee777 100644 --- a/arm/raspi/third_party/ffmpeg/libavutil/riscv/intmath.h +++ b/arm/raspi/third_party/ffmpeg/libavutil/riscv/intmath.h @@ -69,35 +69,13 @@ static av_always_inline av_const int av_clip_intp2_rvi(int a, int p) return b; } -#if defined (__riscv_zbb) && (__riscv_zbb > 0) && HAVE_INLINE_ASM - -#define av_popcount av_popcount_rvb -static av_always_inline av_const int av_popcount_rvb(uint32_t x) -{ - int ret; - +#if defined (__GNUC__) || defined (__clang__) +#define av_popcount __builtin_popcount #if (__riscv_xlen >= 64) - __asm__ ("cpopw %0, %1\n" : "=r" (ret) : "r" (x)); +#define av_popcount64 __builtin_popcountl #else - __asm__ ("cpop %0, %1\n" : "=r" (ret) : "r" (x)); +#define av_popcount64 __builtin_popcountll #endif - return ret; -} - -#if (__riscv_xlen >= 64) -#define av_popcount64 av_popcount64_rvb -static av_always_inline av_const int av_popcount64_rvb(uint64_t x) -{ - int ret; - -#if (__riscv_xlen >= 128) - __asm__ ("cpopd %0, %1\n" : "=r" (ret) : "r" (x)); -#else - __asm__ ("cpop %0, %1\n" : "=r" (ret) : "r" (x)); #endif - return ret; -} -#endif /* __riscv_xlen >= 64 */ -#endif /* __riscv_zbb */ #endif /* AVUTIL_RISCV_INTMATH_H */ diff --git a/arm/raspi/third_party/ffmpeg/libavutil/tests/hwdevice.c b/arm/raspi/third_party/ffmpeg/libavutil/tests/hwdevice.c index 7eb355c9..c5758661 100644 --- a/arm/raspi/third_party/ffmpeg/libavutil/tests/hwdevice.c +++ b/arm/raspi/third_party/ffmpeg/libavutil/tests/hwdevice.c @@ -140,7 +140,7 @@ static const struct { { AV_HWDEVICE_TYPE_OPENCL, { "0.0", "0.1", "1.0", "1.1" } }, { AV_HWDEVICE_TYPE_VAAPI, - { "/dev/dri/renderD128", "/dev/dri/renderD129", ":0" } }, + { "/dev/dri/renderD128", "/dev/dri/renderD129", ":0", "0", "1" } }, }; static int test_device_type(enum AVHWDeviceType type) diff --git a/arm/raspi/third_party/ffmpeg/libavutil/tx_priv.h b/arm/raspi/third_party/ffmpeg/libavutil/tx_priv.h index 72f336ee..d5ff8e14 100644 --- a/arm/raspi/third_party/ffmpeg/libavutil/tx_priv.h +++ b/arm/raspi/third_party/ffmpeg/libavutil/tx_priv.h @@ -102,6 +102,12 @@ typedef void TXComplex; #define FOLD(a, b) ((a) + (b)) +#define BF(x, y, a, b) \ + do { \ + x = (a) - (b); \ + y = (a) + (b); \ + } while (0) + #elif defined(TX_INT32) /* Properly rounds the result */ @@ -132,14 +138,14 @@ typedef void TXComplex; #define FOLD(x, y) ((int32_t)((x) + (unsigned)(y) + 32) >> 6) -#endif /* TX_INT32 */ - #define BF(x, y, a, b) \ do { \ - x = (a) - (b); \ - y = (a) + (b); \ + x = (a) - (unsigned)(b); \ + y = (a) + (unsigned)(b); \ } while (0) +#endif /* TX_INT32 */ + #define CMUL3(c, a, b) CMUL((c).re, (c).im, (a).re, (a).im, (b).re, (b).im) /* Codelet flags, used to pick codelets. Must be a superset of enum AVTXFlags, diff --git a/arm/raspi/third_party/ffmpeg/libavutil/version.h b/arm/raspi/third_party/ffmpeg/libavutil/version.h index a232381b..8c7ea1a4 100644 --- a/arm/raspi/third_party/ffmpeg/libavutil/version.h +++ b/arm/raspi/third_party/ffmpeg/libavutil/version.h @@ -79,7 +79,7 @@ */ #define LIBAVUTIL_VERSION_MAJOR 58 -#define LIBAVUTIL_VERSION_MINOR 5 +#define LIBAVUTIL_VERSION_MINOR 9 #define LIBAVUTIL_VERSION_MICRO 100 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ @@ -115,6 +115,9 @@ #define FF_API_FRAME_PICTURE_NUMBER (LIBAVUTIL_VERSION_MAJOR < 59) #define FF_API_HDR_VIVID_THREE_SPLINE (LIBAVUTIL_VERSION_MAJOR < 59) #define FF_API_FRAME_PKT (LIBAVUTIL_VERSION_MAJOR < 59) +#define FF_API_INTERLACED_FRAME (LIBAVUTIL_VERSION_MAJOR < 59) +#define FF_API_FRAME_KEY (LIBAVUTIL_VERSION_MAJOR < 59) +#define FF_API_PALETTE_HAS_CHANGED (LIBAVUTIL_VERSION_MAJOR < 59) /** * @} diff --git a/arm/raspi/third_party/ffmpeg/libavutil/wchar_filename.h b/arm/raspi/third_party/ffmpeg/libavutil/wchar_filename.h index 9a04a069..fbc0a551 100644 --- a/arm/raspi/third_party/ffmpeg/libavutil/wchar_filename.h +++ b/arm/raspi/third_party/ffmpeg/libavutil/wchar_filename.h @@ -32,7 +32,8 @@ static inline int utf8towchar(const char *filename_utf8, wchar_t **filename_w) num_chars = MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, filename_utf8, -1, NULL, 0); if (num_chars <= 0) { *filename_w = NULL; - return 0; + errno = EINVAL; + return -1; } *filename_w = (wchar_t *)av_calloc(num_chars, sizeof(wchar_t)); if (!*filename_w) { @@ -52,7 +53,8 @@ static inline int wchartocp(unsigned int code_page, const wchar_t *filename_w, NULL, 0, NULL, NULL); if (num_chars <= 0) { *filename = NULL; - return 0; + errno = EINVAL; + return -1; } *filename = (char*)av_malloc_array(num_chars, sizeof *filename); if (!*filename) { diff --git a/other/add-hevc-ffmpeg-decoder-parser.js b/other/add-hevc-ffmpeg-decoder-parser.js index 19e697bf..0f60d201 100644 --- a/other/add-hevc-ffmpeg-decoder-parser.js +++ b/other/add-hevc-ffmpeg-decoder-parser.js @@ -79,6 +79,7 @@ const patches = [ ffmpeg_gas_sources: [ 'libavcodec/aarch64/autorename_libavcodec_aarch64_hevcdsp_idct_neon.S', 'libavcodec/aarch64/autorename_libavcodec_aarch64_hevcdsp_sao_neon.S', + 'libavcodec/aarch64/hevcdsp_deblock_neon.S', 'libavcodec/aarch64/hevcdsp_qpel_neon.S', ] }, diff --git a/other/add-hevc-ffmpeg-decoder-parser.patch b/other/add-hevc-ffmpeg-decoder-parser.patch index fed246e7..f05f76ae 100644 --- a/other/add-hevc-ffmpeg-decoder-parser.patch +++ b/other/add-hevc-ffmpeg-decoder-parser.patch @@ -1,6 +1,6 @@ -From 3fa44e51094a55a1c6251898a9fefe4af46c4ec7 Mon Sep 17 00:00:00 2001 +From 4847c69277b02c71318ab079f9c7a50a4cb25d5e Mon Sep 17 00:00:00 2001 From: Sta Zhu -Date: Mon, 10 Apr 2023 20:48:10 +0800 +Date: Sun, 16 Jul 2023 09:13:33 +0800 Subject: [PATCH] Video: Add HEVC ffmpeg decoder & parser Add ffmpeg software decoder and parser for HEVC, this will make @@ -147,17 +147,17 @@ profiles to have software HEVC decoding ability. .../Chromium/win/x64/libavcodec/codec_list.c | 1 + .../Chromium/win/x64/libavcodec/parser_list.c | 1 + chromium/scripts/build_ffmpeg.py | 4 +- - ffmpeg_generated.gni | 63 +++++++++++++++++++ + ffmpeg_generated.gni | 64 +++++++++++++++++++ ...ame_libavcodec_aarch64_hevcdsp_idct_neon.S | 2 + ...name_libavcodec_aarch64_hevcdsp_sao_neon.S | 2 + libavcodec/autorename_libavcodec_bswapdsp.c | 2 + - 143 files changed, 386 insertions(+), 251 deletions(-) + 143 files changed, 387 insertions(+), 251 deletions(-) create mode 100644 libavcodec/aarch64/autorename_libavcodec_aarch64_hevcdsp_idct_neon.S create mode 100644 libavcodec/aarch64/autorename_libavcodec_aarch64_hevcdsp_sao_neon.S create mode 100644 libavcodec/autorename_libavcodec_bswapdsp.c diff --git a/chromium/config/Chrome/ios/arm64/config.h b/chromium/config/Chrome/ios/arm64/config.h -index 4a2c9afbe7..9842b9cbd4 100644 +index 7bc5161ed9..741f2c7fdf 100644 --- a/chromium/config/Chrome/ios/arm64/config.h +++ b/chromium/config/Chrome/ios/arm64/config.h @@ -1,7 +1,7 @@ @@ -169,7 +169,7 @@ index 4a2c9afbe7..9842b9cbd4 100644 #define FFMPEG_LICENSE "LGPL version 2.1 or later" #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" -@@ -656,7 +656,7 @@ +@@ -657,7 +657,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 0 @@ -178,7 +178,7 @@ index 4a2c9afbe7..9842b9cbd4 100644 #define CONFIG_CABAC 1 #define CONFIG_CBS 0 #define CONFIG_CBS_AV1 0 -@@ -668,7 +668,7 @@ +@@ -669,7 +669,7 @@ #define CONFIG_DEFLATE_WRAPPER 0 #define CONFIG_DIRAC_PARSE 1 #define CONFIG_DNN 0 @@ -187,7 +187,7 @@ index 4a2c9afbe7..9842b9cbd4 100644 #define CONFIG_DVPROFILE 0 #define CONFIG_EXIF 0 #define CONFIG_FAANDCT 0 -@@ -686,8 +686,8 @@ +@@ -687,8 +687,8 @@ #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 1 #define CONFIG_H264_SEI 1 @@ -199,7 +199,7 @@ index 4a2c9afbe7..9842b9cbd4 100644 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 diff --git a/chromium/config/Chrome/ios/arm64/config_components.h b/chromium/config/Chrome/ios/arm64/config_components.h -index 3604442a32..7a829ad1d7 100644 +index 0bf0c78159..d0311ac833 100644 --- a/chromium/config/Chrome/ios/arm64/config_components.h +++ b/chromium/config/Chrome/ios/arm64/config_components.h @@ -134,7 +134,7 @@ @@ -211,7 +211,7 @@ index 3604442a32..7a829ad1d7 100644 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 -@@ -959,7 +959,7 @@ +@@ -963,7 +963,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 0 #define CONFIG_H264_PARSER 1 @@ -241,7 +241,7 @@ index 50acddb28e..1269282a87 100644 + &ff_hevc_parser, NULL }; diff --git a/chromium/config/Chrome/linux/arm-neon/config.h b/chromium/config/Chrome/linux/arm-neon/config.h -index bf88a83c5a..6468423b56 100644 +index 454e32f5dd..09a1519c35 100644 --- a/chromium/config/Chrome/linux/arm-neon/config.h +++ b/chromium/config/Chrome/linux/arm-neon/config.h @@ -1,7 +1,7 @@ @@ -253,7 +253,7 @@ index bf88a83c5a..6468423b56 100644 #define FFMPEG_LICENSE "LGPL version 2.1 or later" #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" -@@ -656,7 +656,7 @@ +@@ -657,7 +657,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 0 @@ -262,7 +262,7 @@ index bf88a83c5a..6468423b56 100644 #define CONFIG_CABAC 1 #define CONFIG_CBS 0 #define CONFIG_CBS_AV1 0 -@@ -668,7 +668,7 @@ +@@ -669,7 +669,7 @@ #define CONFIG_DEFLATE_WRAPPER 0 #define CONFIG_DIRAC_PARSE 1 #define CONFIG_DNN 0 @@ -271,7 +271,7 @@ index bf88a83c5a..6468423b56 100644 #define CONFIG_DVPROFILE 0 #define CONFIG_EXIF 0 #define CONFIG_FAANDCT 0 -@@ -686,8 +686,8 @@ +@@ -687,8 +687,8 @@ #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 1 #define CONFIG_H264_SEI 1 @@ -283,7 +283,7 @@ index bf88a83c5a..6468423b56 100644 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 diff --git a/chromium/config/Chrome/linux/arm-neon/config_components.h b/chromium/config/Chrome/linux/arm-neon/config_components.h -index 3604442a32..7a829ad1d7 100644 +index 0bf0c78159..d0311ac833 100644 --- a/chromium/config/Chrome/linux/arm-neon/config_components.h +++ b/chromium/config/Chrome/linux/arm-neon/config_components.h @@ -134,7 +134,7 @@ @@ -295,7 +295,7 @@ index 3604442a32..7a829ad1d7 100644 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 -@@ -959,7 +959,7 @@ +@@ -963,7 +963,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 0 #define CONFIG_H264_PARSER 1 @@ -325,7 +325,7 @@ index 50acddb28e..1269282a87 100644 + &ff_hevc_parser, NULL }; diff --git a/chromium/config/Chrome/linux/arm/config.h b/chromium/config/Chrome/linux/arm/config.h -index ba6634d4fc..adf4a40ecf 100644 +index bf2f051e1a..622f33cdd7 100644 --- a/chromium/config/Chrome/linux/arm/config.h +++ b/chromium/config/Chrome/linux/arm/config.h @@ -1,7 +1,7 @@ @@ -337,7 +337,7 @@ index ba6634d4fc..adf4a40ecf 100644 #define FFMPEG_LICENSE "LGPL version 2.1 or later" #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" -@@ -656,7 +656,7 @@ +@@ -657,7 +657,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 0 @@ -346,7 +346,7 @@ index ba6634d4fc..adf4a40ecf 100644 #define CONFIG_CABAC 1 #define CONFIG_CBS 0 #define CONFIG_CBS_AV1 0 -@@ -668,7 +668,7 @@ +@@ -669,7 +669,7 @@ #define CONFIG_DEFLATE_WRAPPER 0 #define CONFIG_DIRAC_PARSE 1 #define CONFIG_DNN 0 @@ -355,7 +355,7 @@ index ba6634d4fc..adf4a40ecf 100644 #define CONFIG_DVPROFILE 0 #define CONFIG_EXIF 0 #define CONFIG_FAANDCT 0 -@@ -686,8 +686,8 @@ +@@ -687,8 +687,8 @@ #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 1 #define CONFIG_H264_SEI 1 @@ -367,7 +367,7 @@ index ba6634d4fc..adf4a40ecf 100644 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 diff --git a/chromium/config/Chrome/linux/arm/config_components.h b/chromium/config/Chrome/linux/arm/config_components.h -index 3604442a32..7a829ad1d7 100644 +index 0bf0c78159..d0311ac833 100644 --- a/chromium/config/Chrome/linux/arm/config_components.h +++ b/chromium/config/Chrome/linux/arm/config_components.h @@ -134,7 +134,7 @@ @@ -379,7 +379,7 @@ index 3604442a32..7a829ad1d7 100644 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 -@@ -959,7 +959,7 @@ +@@ -963,7 +963,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 0 #define CONFIG_H264_PARSER 1 @@ -409,7 +409,7 @@ index 50acddb28e..1269282a87 100644 + &ff_hevc_parser, NULL }; diff --git a/chromium/config/Chrome/linux/arm64/config.h b/chromium/config/Chrome/linux/arm64/config.h -index 6f732b1254..688ed85c86 100644 +index 5e8c14898b..5cc92ff0ee 100644 --- a/chromium/config/Chrome/linux/arm64/config.h +++ b/chromium/config/Chrome/linux/arm64/config.h @@ -1,7 +1,7 @@ @@ -421,7 +421,7 @@ index 6f732b1254..688ed85c86 100644 #define FFMPEG_LICENSE "LGPL version 2.1 or later" #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" -@@ -656,7 +656,7 @@ +@@ -657,7 +657,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 0 @@ -430,7 +430,7 @@ index 6f732b1254..688ed85c86 100644 #define CONFIG_CABAC 1 #define CONFIG_CBS 0 #define CONFIG_CBS_AV1 0 -@@ -668,7 +668,7 @@ +@@ -669,7 +669,7 @@ #define CONFIG_DEFLATE_WRAPPER 0 #define CONFIG_DIRAC_PARSE 1 #define CONFIG_DNN 0 @@ -439,7 +439,7 @@ index 6f732b1254..688ed85c86 100644 #define CONFIG_DVPROFILE 0 #define CONFIG_EXIF 0 #define CONFIG_FAANDCT 0 -@@ -686,8 +686,8 @@ +@@ -687,8 +687,8 @@ #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 1 #define CONFIG_H264_SEI 1 @@ -451,7 +451,7 @@ index 6f732b1254..688ed85c86 100644 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 diff --git a/chromium/config/Chrome/linux/arm64/config_components.h b/chromium/config/Chrome/linux/arm64/config_components.h -index 3604442a32..7a829ad1d7 100644 +index 0bf0c78159..d0311ac833 100644 --- a/chromium/config/Chrome/linux/arm64/config_components.h +++ b/chromium/config/Chrome/linux/arm64/config_components.h @@ -134,7 +134,7 @@ @@ -463,7 +463,7 @@ index 3604442a32..7a829ad1d7 100644 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 -@@ -959,7 +959,7 @@ +@@ -963,7 +963,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 0 #define CONFIG_H264_PARSER 1 @@ -493,7 +493,7 @@ index 50acddb28e..1269282a87 100644 + &ff_hevc_parser, NULL }; diff --git a/chromium/config/Chrome/linux/ia32/config.h b/chromium/config/Chrome/linux/ia32/config.h -index c39827e854..7c61d0f99c 100644 +index dd08d2074d..14e73271ed 100644 --- a/chromium/config/Chrome/linux/ia32/config.h +++ b/chromium/config/Chrome/linux/ia32/config.h @@ -1,7 +1,7 @@ @@ -505,7 +505,7 @@ index c39827e854..7c61d0f99c 100644 #define FFMPEG_LICENSE "LGPL version 2.1 or later" #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" -@@ -656,7 +656,7 @@ +@@ -657,7 +657,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 0 @@ -514,7 +514,7 @@ index c39827e854..7c61d0f99c 100644 #define CONFIG_CABAC 1 #define CONFIG_CBS 0 #define CONFIG_CBS_AV1 0 -@@ -668,7 +668,7 @@ +@@ -669,7 +669,7 @@ #define CONFIG_DEFLATE_WRAPPER 0 #define CONFIG_DIRAC_PARSE 1 #define CONFIG_DNN 0 @@ -523,7 +523,7 @@ index c39827e854..7c61d0f99c 100644 #define CONFIG_DVPROFILE 0 #define CONFIG_EXIF 0 #define CONFIG_FAANDCT 0 -@@ -686,8 +686,8 @@ +@@ -687,8 +687,8 @@ #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 1 #define CONFIG_H264_SEI 1 @@ -535,7 +535,7 @@ index c39827e854..7c61d0f99c 100644 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 diff --git a/chromium/config/Chrome/linux/ia32/config_components.h b/chromium/config/Chrome/linux/ia32/config_components.h -index 3604442a32..7a829ad1d7 100644 +index 0bf0c78159..d0311ac833 100644 --- a/chromium/config/Chrome/linux/ia32/config_components.h +++ b/chromium/config/Chrome/linux/ia32/config_components.h @@ -134,7 +134,7 @@ @@ -547,7 +547,7 @@ index 3604442a32..7a829ad1d7 100644 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 -@@ -959,7 +959,7 @@ +@@ -963,7 +963,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 0 #define CONFIG_H264_PARSER 1 @@ -577,7 +577,7 @@ index 50acddb28e..1269282a87 100644 + &ff_hevc_parser, NULL }; diff --git a/chromium/config/Chrome/linux/x64/config.h b/chromium/config/Chrome/linux/x64/config.h -index 2dc833e597..980103a0d5 100644 +index 6843c4b118..a726c3f029 100644 --- a/chromium/config/Chrome/linux/x64/config.h +++ b/chromium/config/Chrome/linux/x64/config.h @@ -1,7 +1,7 @@ @@ -589,7 +589,7 @@ index 2dc833e597..980103a0d5 100644 #define FFMPEG_LICENSE "LGPL version 2.1 or later" #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" -@@ -656,7 +656,7 @@ +@@ -657,7 +657,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 0 @@ -598,7 +598,7 @@ index 2dc833e597..980103a0d5 100644 #define CONFIG_CABAC 1 #define CONFIG_CBS 0 #define CONFIG_CBS_AV1 0 -@@ -668,7 +668,7 @@ +@@ -669,7 +669,7 @@ #define CONFIG_DEFLATE_WRAPPER 0 #define CONFIG_DIRAC_PARSE 1 #define CONFIG_DNN 0 @@ -607,7 +607,7 @@ index 2dc833e597..980103a0d5 100644 #define CONFIG_DVPROFILE 0 #define CONFIG_EXIF 0 #define CONFIG_FAANDCT 0 -@@ -686,8 +686,8 @@ +@@ -687,8 +687,8 @@ #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 1 #define CONFIG_H264_SEI 1 @@ -619,7 +619,7 @@ index 2dc833e597..980103a0d5 100644 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 diff --git a/chromium/config/Chrome/linux/x64/config_components.h b/chromium/config/Chrome/linux/x64/config_components.h -index 3604442a32..7a829ad1d7 100644 +index 0bf0c78159..d0311ac833 100644 --- a/chromium/config/Chrome/linux/x64/config_components.h +++ b/chromium/config/Chrome/linux/x64/config_components.h @@ -134,7 +134,7 @@ @@ -631,7 +631,7 @@ index 3604442a32..7a829ad1d7 100644 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 -@@ -959,7 +959,7 @@ +@@ -963,7 +963,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 0 #define CONFIG_H264_PARSER 1 @@ -661,7 +661,7 @@ index 50acddb28e..1269282a87 100644 + &ff_hevc_parser, NULL }; diff --git a/chromium/config/Chrome/mac/arm64/config.h b/chromium/config/Chrome/mac/arm64/config.h -index 4a2c9afbe7..9842b9cbd4 100644 +index 7bc5161ed9..741f2c7fdf 100644 --- a/chromium/config/Chrome/mac/arm64/config.h +++ b/chromium/config/Chrome/mac/arm64/config.h @@ -1,7 +1,7 @@ @@ -673,7 +673,7 @@ index 4a2c9afbe7..9842b9cbd4 100644 #define FFMPEG_LICENSE "LGPL version 2.1 or later" #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" -@@ -656,7 +656,7 @@ +@@ -657,7 +657,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 0 @@ -682,7 +682,7 @@ index 4a2c9afbe7..9842b9cbd4 100644 #define CONFIG_CABAC 1 #define CONFIG_CBS 0 #define CONFIG_CBS_AV1 0 -@@ -668,7 +668,7 @@ +@@ -669,7 +669,7 @@ #define CONFIG_DEFLATE_WRAPPER 0 #define CONFIG_DIRAC_PARSE 1 #define CONFIG_DNN 0 @@ -691,7 +691,7 @@ index 4a2c9afbe7..9842b9cbd4 100644 #define CONFIG_DVPROFILE 0 #define CONFIG_EXIF 0 #define CONFIG_FAANDCT 0 -@@ -686,8 +686,8 @@ +@@ -687,8 +687,8 @@ #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 1 #define CONFIG_H264_SEI 1 @@ -703,7 +703,7 @@ index 4a2c9afbe7..9842b9cbd4 100644 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 diff --git a/chromium/config/Chrome/mac/arm64/config_components.h b/chromium/config/Chrome/mac/arm64/config_components.h -index 3604442a32..7a829ad1d7 100644 +index 0bf0c78159..d0311ac833 100644 --- a/chromium/config/Chrome/mac/arm64/config_components.h +++ b/chromium/config/Chrome/mac/arm64/config_components.h @@ -134,7 +134,7 @@ @@ -715,7 +715,7 @@ index 3604442a32..7a829ad1d7 100644 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 -@@ -959,7 +959,7 @@ +@@ -963,7 +963,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 0 #define CONFIG_H264_PARSER 1 @@ -745,10 +745,10 @@ index 50acddb28e..1269282a87 100644 + &ff_hevc_parser, NULL }; diff --git a/chromium/config/Chrome/mac/x64/config.asm b/chromium/config/Chrome/mac/x64/config.asm -index 9bdc5d84f9..ab3a7b36c6 100644 +index a013192977..d419ad37d1 100644 --- a/chromium/config/Chrome/mac/x64/config.asm +++ b/chromium/config/Chrome/mac/x64/config.asm -@@ -640,7 +640,7 @@ +@@ -641,7 +641,7 @@ %define CONFIG_AUDIO_FRAME_QUEUE 0 %define CONFIG_AUDIODSP 0 %define CONFIG_BLOCKDSP 0 @@ -757,7 +757,7 @@ index 9bdc5d84f9..ab3a7b36c6 100644 %define CONFIG_CABAC 1 %define CONFIG_CBS 0 %define CONFIG_CBS_AV1 0 -@@ -652,7 +652,7 @@ +@@ -653,7 +653,7 @@ %define CONFIG_DEFLATE_WRAPPER 0 %define CONFIG_DIRAC_PARSE 1 %define CONFIG_DNN 0 @@ -766,7 +766,7 @@ index 9bdc5d84f9..ab3a7b36c6 100644 %define CONFIG_DVPROFILE 0 %define CONFIG_EXIF 0 %define CONFIG_FAANDCT 0 -@@ -670,8 +670,8 @@ +@@ -671,8 +671,8 @@ %define CONFIG_H264PRED 1 %define CONFIG_H264QPEL 1 %define CONFIG_H264_SEI 1 @@ -778,7 +778,7 @@ index 9bdc5d84f9..ab3a7b36c6 100644 %define CONFIG_HUFFMAN 0 %define CONFIG_HUFFYUVDSP 0 diff --git a/chromium/config/Chrome/mac/x64/config.h b/chromium/config/Chrome/mac/x64/config.h -index 638ac95a25..74559a4424 100644 +index c0ccfb3a7e..13863d1a40 100644 --- a/chromium/config/Chrome/mac/x64/config.h +++ b/chromium/config/Chrome/mac/x64/config.h @@ -1,7 +1,7 @@ @@ -790,7 +790,7 @@ index 638ac95a25..74559a4424 100644 #define FFMPEG_LICENSE "LGPL version 2.1 or later" #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" -@@ -656,7 +656,7 @@ +@@ -657,7 +657,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 0 @@ -799,7 +799,7 @@ index 638ac95a25..74559a4424 100644 #define CONFIG_CABAC 1 #define CONFIG_CBS 0 #define CONFIG_CBS_AV1 0 -@@ -668,7 +668,7 @@ +@@ -669,7 +669,7 @@ #define CONFIG_DEFLATE_WRAPPER 0 #define CONFIG_DIRAC_PARSE 1 #define CONFIG_DNN 0 @@ -808,7 +808,7 @@ index 638ac95a25..74559a4424 100644 #define CONFIG_DVPROFILE 0 #define CONFIG_EXIF 0 #define CONFIG_FAANDCT 0 -@@ -686,8 +686,8 @@ +@@ -687,8 +687,8 @@ #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 1 #define CONFIG_H264_SEI 1 @@ -820,7 +820,7 @@ index 638ac95a25..74559a4424 100644 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 diff --git a/chromium/config/Chrome/mac/x64/config_components.h b/chromium/config/Chrome/mac/x64/config_components.h -index 3604442a32..7a829ad1d7 100644 +index 0bf0c78159..d0311ac833 100644 --- a/chromium/config/Chrome/mac/x64/config_components.h +++ b/chromium/config/Chrome/mac/x64/config_components.h @@ -134,7 +134,7 @@ @@ -832,7 +832,7 @@ index 3604442a32..7a829ad1d7 100644 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 -@@ -959,7 +959,7 @@ +@@ -963,7 +963,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 0 #define CONFIG_H264_PARSER 1 @@ -1080,7 +1080,7 @@ index 19d670aa24..f55c2ca459 100644 + &ff_hevc_parser, NULL }; diff --git a/chromium/config/Chrome/win/arm64/config.h b/chromium/config/Chrome/win/arm64/config.h -index ba18416b31..9d27a8d2a6 100644 +index ee55541667..d8b32c9217 100644 --- a/chromium/config/Chrome/win/arm64/config.h +++ b/chromium/config/Chrome/win/arm64/config.h @@ -1,7 +1,7 @@ @@ -1092,7 +1092,7 @@ index ba18416b31..9d27a8d2a6 100644 #define FFMPEG_LICENSE "LGPL version 2.1 or later" #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" -@@ -656,7 +656,7 @@ +@@ -657,7 +657,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 0 @@ -1101,7 +1101,7 @@ index ba18416b31..9d27a8d2a6 100644 #define CONFIG_CABAC 1 #define CONFIG_CBS 0 #define CONFIG_CBS_AV1 0 -@@ -668,7 +668,7 @@ +@@ -669,7 +669,7 @@ #define CONFIG_DEFLATE_WRAPPER 0 #define CONFIG_DIRAC_PARSE 1 #define CONFIG_DNN 0 @@ -1110,7 +1110,7 @@ index ba18416b31..9d27a8d2a6 100644 #define CONFIG_DVPROFILE 0 #define CONFIG_EXIF 0 #define CONFIG_FAANDCT 0 -@@ -686,8 +686,8 @@ +@@ -687,8 +687,8 @@ #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 1 #define CONFIG_H264_SEI 1 @@ -1122,7 +1122,7 @@ index ba18416b31..9d27a8d2a6 100644 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 diff --git a/chromium/config/Chrome/win/arm64/config_components.h b/chromium/config/Chrome/win/arm64/config_components.h -index 3604442a32..7a829ad1d7 100644 +index 0bf0c78159..d0311ac833 100644 --- a/chromium/config/Chrome/win/arm64/config_components.h +++ b/chromium/config/Chrome/win/arm64/config_components.h @@ -134,7 +134,7 @@ @@ -1134,7 +1134,7 @@ index 3604442a32..7a829ad1d7 100644 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 -@@ -959,7 +959,7 @@ +@@ -963,7 +963,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 0 #define CONFIG_H264_PARSER 1 @@ -1164,10 +1164,10 @@ index 50acddb28e..1269282a87 100644 + &ff_hevc_parser, NULL }; diff --git a/chromium/config/Chrome/win/ia32/config.asm b/chromium/config/Chrome/win/ia32/config.asm -index 7fd5041d72..210035ace6 100644 +index 81ec186682..1291ace30d 100644 --- a/chromium/config/Chrome/win/ia32/config.asm +++ b/chromium/config/Chrome/win/ia32/config.asm -@@ -640,7 +640,7 @@ +@@ -641,7 +641,7 @@ %define CONFIG_AUDIO_FRAME_QUEUE 0 %define CONFIG_AUDIODSP 0 %define CONFIG_BLOCKDSP 0 @@ -1176,7 +1176,7 @@ index 7fd5041d72..210035ace6 100644 %define CONFIG_CABAC 1 %define CONFIG_CBS 0 %define CONFIG_CBS_AV1 0 -@@ -652,7 +652,7 @@ +@@ -653,7 +653,7 @@ %define CONFIG_DEFLATE_WRAPPER 0 %define CONFIG_DIRAC_PARSE 1 %define CONFIG_DNN 0 @@ -1185,7 +1185,7 @@ index 7fd5041d72..210035ace6 100644 %define CONFIG_DVPROFILE 0 %define CONFIG_EXIF 0 %define CONFIG_FAANDCT 0 -@@ -670,8 +670,8 @@ +@@ -671,8 +671,8 @@ %define CONFIG_H264PRED 1 %define CONFIG_H264QPEL 1 %define CONFIG_H264_SEI 1 @@ -1197,7 +1197,7 @@ index 7fd5041d72..210035ace6 100644 %define CONFIG_HUFFMAN 0 %define CONFIG_HUFFYUVDSP 0 diff --git a/chromium/config/Chrome/win/ia32/config.h b/chromium/config/Chrome/win/ia32/config.h -index f4d897aa55..c32a7fc31e 100644 +index fb9393d659..153a93b80b 100644 --- a/chromium/config/Chrome/win/ia32/config.h +++ b/chromium/config/Chrome/win/ia32/config.h @@ -1,7 +1,7 @@ @@ -1209,7 +1209,7 @@ index f4d897aa55..c32a7fc31e 100644 #define FFMPEG_LICENSE "LGPL version 2.1 or later" #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" -@@ -656,7 +656,7 @@ +@@ -657,7 +657,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 0 @@ -1218,7 +1218,7 @@ index f4d897aa55..c32a7fc31e 100644 #define CONFIG_CABAC 1 #define CONFIG_CBS 0 #define CONFIG_CBS_AV1 0 -@@ -668,7 +668,7 @@ +@@ -669,7 +669,7 @@ #define CONFIG_DEFLATE_WRAPPER 0 #define CONFIG_DIRAC_PARSE 1 #define CONFIG_DNN 0 @@ -1227,7 +1227,7 @@ index f4d897aa55..c32a7fc31e 100644 #define CONFIG_DVPROFILE 0 #define CONFIG_EXIF 0 #define CONFIG_FAANDCT 0 -@@ -686,8 +686,8 @@ +@@ -687,8 +687,8 @@ #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 1 #define CONFIG_H264_SEI 1 @@ -1239,7 +1239,7 @@ index f4d897aa55..c32a7fc31e 100644 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 diff --git a/chromium/config/Chrome/win/ia32/config_components.h b/chromium/config/Chrome/win/ia32/config_components.h -index 3604442a32..7a829ad1d7 100644 +index 0bf0c78159..d0311ac833 100644 --- a/chromium/config/Chrome/win/ia32/config_components.h +++ b/chromium/config/Chrome/win/ia32/config_components.h @@ -134,7 +134,7 @@ @@ -1251,7 +1251,7 @@ index 3604442a32..7a829ad1d7 100644 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 -@@ -959,7 +959,7 @@ +@@ -963,7 +963,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 0 #define CONFIG_H264_PARSER 1 @@ -1281,10 +1281,10 @@ index 50acddb28e..1269282a87 100644 + &ff_hevc_parser, NULL }; diff --git a/chromium/config/Chrome/win/x64/config.asm b/chromium/config/Chrome/win/x64/config.asm -index c1af2d690a..1034b0669b 100644 +index dcb7fbfacf..388c328113 100644 --- a/chromium/config/Chrome/win/x64/config.asm +++ b/chromium/config/Chrome/win/x64/config.asm -@@ -640,7 +640,7 @@ +@@ -641,7 +641,7 @@ %define CONFIG_AUDIO_FRAME_QUEUE 0 %define CONFIG_AUDIODSP 0 %define CONFIG_BLOCKDSP 0 @@ -1293,7 +1293,7 @@ index c1af2d690a..1034b0669b 100644 %define CONFIG_CABAC 1 %define CONFIG_CBS 0 %define CONFIG_CBS_AV1 0 -@@ -652,7 +652,7 @@ +@@ -653,7 +653,7 @@ %define CONFIG_DEFLATE_WRAPPER 0 %define CONFIG_DIRAC_PARSE 1 %define CONFIG_DNN 0 @@ -1302,7 +1302,7 @@ index c1af2d690a..1034b0669b 100644 %define CONFIG_DVPROFILE 0 %define CONFIG_EXIF 0 %define CONFIG_FAANDCT 0 -@@ -670,8 +670,8 @@ +@@ -671,8 +671,8 @@ %define CONFIG_H264PRED 1 %define CONFIG_H264QPEL 1 %define CONFIG_H264_SEI 1 @@ -1314,7 +1314,7 @@ index c1af2d690a..1034b0669b 100644 %define CONFIG_HUFFMAN 0 %define CONFIG_HUFFYUVDSP 0 diff --git a/chromium/config/Chrome/win/x64/config.h b/chromium/config/Chrome/win/x64/config.h -index 02d074b823..726a429a5b 100644 +index 39745361e8..5a13a17703 100644 --- a/chromium/config/Chrome/win/x64/config.h +++ b/chromium/config/Chrome/win/x64/config.h @@ -1,7 +1,7 @@ @@ -1326,7 +1326,7 @@ index 02d074b823..726a429a5b 100644 #define FFMPEG_LICENSE "LGPL version 2.1 or later" #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" -@@ -656,7 +656,7 @@ +@@ -657,7 +657,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 0 @@ -1335,7 +1335,7 @@ index 02d074b823..726a429a5b 100644 #define CONFIG_CABAC 1 #define CONFIG_CBS 0 #define CONFIG_CBS_AV1 0 -@@ -668,7 +668,7 @@ +@@ -669,7 +669,7 @@ #define CONFIG_DEFLATE_WRAPPER 0 #define CONFIG_DIRAC_PARSE 1 #define CONFIG_DNN 0 @@ -1344,7 +1344,7 @@ index 02d074b823..726a429a5b 100644 #define CONFIG_DVPROFILE 0 #define CONFIG_EXIF 0 #define CONFIG_FAANDCT 0 -@@ -686,8 +686,8 @@ +@@ -687,8 +687,8 @@ #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 1 #define CONFIG_H264_SEI 1 @@ -1356,7 +1356,7 @@ index 02d074b823..726a429a5b 100644 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 diff --git a/chromium/config/Chrome/win/x64/config_components.h b/chromium/config/Chrome/win/x64/config_components.h -index 3604442a32..7a829ad1d7 100644 +index 0bf0c78159..d0311ac833 100644 --- a/chromium/config/Chrome/win/x64/config_components.h +++ b/chromium/config/Chrome/win/x64/config_components.h @@ -134,7 +134,7 @@ @@ -1368,7 +1368,7 @@ index 3604442a32..7a829ad1d7 100644 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 -@@ -959,7 +959,7 @@ +@@ -963,7 +963,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 0 #define CONFIG_H264_PARSER 1 @@ -1398,7 +1398,7 @@ index 50acddb28e..1269282a87 100644 + &ff_hevc_parser, NULL }; diff --git a/chromium/config/ChromeOS/linux-noasm/x64/config.h b/chromium/config/ChromeOS/linux-noasm/x64/config.h -index 25582b9c1e..a90cc61869 100644 +index 8714086d8a..0e9cc30a73 100644 --- a/chromium/config/ChromeOS/linux-noasm/x64/config.h +++ b/chromium/config/ChromeOS/linux-noasm/x64/config.h @@ -1,7 +1,7 @@ @@ -1410,7 +1410,7 @@ index 25582b9c1e..a90cc61869 100644 #define FFMPEG_LICENSE "LGPL version 2.1 or later" #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" -@@ -656,7 +656,7 @@ +@@ -657,7 +657,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 1 @@ -1419,7 +1419,7 @@ index 25582b9c1e..a90cc61869 100644 #define CONFIG_CABAC 1 #define CONFIG_CBS 0 #define CONFIG_CBS_AV1 0 -@@ -668,7 +668,7 @@ +@@ -669,7 +669,7 @@ #define CONFIG_DEFLATE_WRAPPER 0 #define CONFIG_DIRAC_PARSE 1 #define CONFIG_DNN 0 @@ -1428,7 +1428,7 @@ index 25582b9c1e..a90cc61869 100644 #define CONFIG_DVPROFILE 0 #define CONFIG_EXIF 1 #define CONFIG_FAANDCT 0 -@@ -686,8 +686,8 @@ +@@ -687,8 +687,8 @@ #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 1 #define CONFIG_H264_SEI 1 @@ -1440,7 +1440,7 @@ index 25582b9c1e..a90cc61869 100644 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 diff --git a/chromium/config/ChromeOS/linux-noasm/x64/config_components.h b/chromium/config/ChromeOS/linux-noasm/x64/config_components.h -index 80435e58f2..bc677e767c 100644 +index 4290dbef99..fa52167a88 100644 --- a/chromium/config/ChromeOS/linux-noasm/x64/config_components.h +++ b/chromium/config/ChromeOS/linux-noasm/x64/config_components.h @@ -134,7 +134,7 @@ @@ -1452,7 +1452,7 @@ index 80435e58f2..bc677e767c 100644 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 -@@ -959,7 +959,7 @@ +@@ -963,7 +963,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 1 #define CONFIG_H264_PARSER 1 @@ -1482,7 +1482,7 @@ index e1652f8b9d..bb61b337a0 100644 + &ff_hevc_parser, NULL }; diff --git a/chromium/config/ChromeOS/linux/arm-neon/config.h b/chromium/config/ChromeOS/linux/arm-neon/config.h -index bce5389bbe..41e801277f 100644 +index 5cda224f6f..a5a56eee7c 100644 --- a/chromium/config/ChromeOS/linux/arm-neon/config.h +++ b/chromium/config/ChromeOS/linux/arm-neon/config.h @@ -1,7 +1,7 @@ @@ -1494,7 +1494,7 @@ index bce5389bbe..41e801277f 100644 #define FFMPEG_LICENSE "LGPL version 2.1 or later" #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" -@@ -656,7 +656,7 @@ +@@ -657,7 +657,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 1 @@ -1503,7 +1503,7 @@ index bce5389bbe..41e801277f 100644 #define CONFIG_CABAC 1 #define CONFIG_CBS 0 #define CONFIG_CBS_AV1 0 -@@ -668,7 +668,7 @@ +@@ -669,7 +669,7 @@ #define CONFIG_DEFLATE_WRAPPER 0 #define CONFIG_DIRAC_PARSE 1 #define CONFIG_DNN 0 @@ -1512,7 +1512,7 @@ index bce5389bbe..41e801277f 100644 #define CONFIG_DVPROFILE 0 #define CONFIG_EXIF 1 #define CONFIG_FAANDCT 0 -@@ -686,8 +686,8 @@ +@@ -687,8 +687,8 @@ #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 1 #define CONFIG_H264_SEI 1 @@ -1524,7 +1524,7 @@ index bce5389bbe..41e801277f 100644 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 diff --git a/chromium/config/ChromeOS/linux/arm-neon/config_components.h b/chromium/config/ChromeOS/linux/arm-neon/config_components.h -index 80435e58f2..bc677e767c 100644 +index 4290dbef99..fa52167a88 100644 --- a/chromium/config/ChromeOS/linux/arm-neon/config_components.h +++ b/chromium/config/ChromeOS/linux/arm-neon/config_components.h @@ -134,7 +134,7 @@ @@ -1536,7 +1536,7 @@ index 80435e58f2..bc677e767c 100644 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 -@@ -959,7 +959,7 @@ +@@ -963,7 +963,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 1 #define CONFIG_H264_PARSER 1 @@ -1566,7 +1566,7 @@ index e1652f8b9d..bb61b337a0 100644 + &ff_hevc_parser, NULL }; diff --git a/chromium/config/ChromeOS/linux/arm/config.h b/chromium/config/ChromeOS/linux/arm/config.h -index 73b32e93aa..6060fd5b5c 100644 +index 8faff1e52a..26110295a1 100644 --- a/chromium/config/ChromeOS/linux/arm/config.h +++ b/chromium/config/ChromeOS/linux/arm/config.h @@ -1,7 +1,7 @@ @@ -1578,7 +1578,7 @@ index 73b32e93aa..6060fd5b5c 100644 #define FFMPEG_LICENSE "LGPL version 2.1 or later" #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" -@@ -656,7 +656,7 @@ +@@ -657,7 +657,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 1 @@ -1587,7 +1587,7 @@ index 73b32e93aa..6060fd5b5c 100644 #define CONFIG_CABAC 1 #define CONFIG_CBS 0 #define CONFIG_CBS_AV1 0 -@@ -668,7 +668,7 @@ +@@ -669,7 +669,7 @@ #define CONFIG_DEFLATE_WRAPPER 0 #define CONFIG_DIRAC_PARSE 1 #define CONFIG_DNN 0 @@ -1596,7 +1596,7 @@ index 73b32e93aa..6060fd5b5c 100644 #define CONFIG_DVPROFILE 0 #define CONFIG_EXIF 1 #define CONFIG_FAANDCT 0 -@@ -686,8 +686,8 @@ +@@ -687,8 +687,8 @@ #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 1 #define CONFIG_H264_SEI 1 @@ -1608,7 +1608,7 @@ index 73b32e93aa..6060fd5b5c 100644 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 diff --git a/chromium/config/ChromeOS/linux/arm/config_components.h b/chromium/config/ChromeOS/linux/arm/config_components.h -index 80435e58f2..bc677e767c 100644 +index 4290dbef99..fa52167a88 100644 --- a/chromium/config/ChromeOS/linux/arm/config_components.h +++ b/chromium/config/ChromeOS/linux/arm/config_components.h @@ -134,7 +134,7 @@ @@ -1620,7 +1620,7 @@ index 80435e58f2..bc677e767c 100644 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 -@@ -959,7 +959,7 @@ +@@ -963,7 +963,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 1 #define CONFIG_H264_PARSER 1 @@ -1650,7 +1650,7 @@ index e1652f8b9d..bb61b337a0 100644 + &ff_hevc_parser, NULL }; diff --git a/chromium/config/ChromeOS/linux/arm64/config.h b/chromium/config/ChromeOS/linux/arm64/config.h -index 5616e4a172..3c47e08372 100644 +index 0ded19b87e..1be92fdf0f 100644 --- a/chromium/config/ChromeOS/linux/arm64/config.h +++ b/chromium/config/ChromeOS/linux/arm64/config.h @@ -1,7 +1,7 @@ @@ -1662,7 +1662,7 @@ index 5616e4a172..3c47e08372 100644 #define FFMPEG_LICENSE "LGPL version 2.1 or later" #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" -@@ -656,7 +656,7 @@ +@@ -657,7 +657,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 1 @@ -1671,7 +1671,7 @@ index 5616e4a172..3c47e08372 100644 #define CONFIG_CABAC 1 #define CONFIG_CBS 0 #define CONFIG_CBS_AV1 0 -@@ -668,7 +668,7 @@ +@@ -669,7 +669,7 @@ #define CONFIG_DEFLATE_WRAPPER 0 #define CONFIG_DIRAC_PARSE 1 #define CONFIG_DNN 0 @@ -1680,7 +1680,7 @@ index 5616e4a172..3c47e08372 100644 #define CONFIG_DVPROFILE 0 #define CONFIG_EXIF 1 #define CONFIG_FAANDCT 0 -@@ -686,8 +686,8 @@ +@@ -687,8 +687,8 @@ #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 1 #define CONFIG_H264_SEI 1 @@ -1692,7 +1692,7 @@ index 5616e4a172..3c47e08372 100644 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 diff --git a/chromium/config/ChromeOS/linux/arm64/config_components.h b/chromium/config/ChromeOS/linux/arm64/config_components.h -index 80435e58f2..bc677e767c 100644 +index 4290dbef99..fa52167a88 100644 --- a/chromium/config/ChromeOS/linux/arm64/config_components.h +++ b/chromium/config/ChromeOS/linux/arm64/config_components.h @@ -134,7 +134,7 @@ @@ -1704,7 +1704,7 @@ index 80435e58f2..bc677e767c 100644 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 -@@ -959,7 +959,7 @@ +@@ -963,7 +963,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 1 #define CONFIG_H264_PARSER 1 @@ -1734,7 +1734,7 @@ index e1652f8b9d..bb61b337a0 100644 + &ff_hevc_parser, NULL }; diff --git a/chromium/config/ChromeOS/linux/ia32/config.h b/chromium/config/ChromeOS/linux/ia32/config.h -index 3ffcf8b6eb..85a361ddc2 100644 +index dc64ae59f3..5e48bbcf17 100644 --- a/chromium/config/ChromeOS/linux/ia32/config.h +++ b/chromium/config/ChromeOS/linux/ia32/config.h @@ -1,7 +1,7 @@ @@ -1746,7 +1746,7 @@ index 3ffcf8b6eb..85a361ddc2 100644 #define FFMPEG_LICENSE "LGPL version 2.1 or later" #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" -@@ -656,7 +656,7 @@ +@@ -657,7 +657,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 1 @@ -1755,7 +1755,7 @@ index 3ffcf8b6eb..85a361ddc2 100644 #define CONFIG_CABAC 1 #define CONFIG_CBS 0 #define CONFIG_CBS_AV1 0 -@@ -668,7 +668,7 @@ +@@ -669,7 +669,7 @@ #define CONFIG_DEFLATE_WRAPPER 0 #define CONFIG_DIRAC_PARSE 1 #define CONFIG_DNN 0 @@ -1764,7 +1764,7 @@ index 3ffcf8b6eb..85a361ddc2 100644 #define CONFIG_DVPROFILE 0 #define CONFIG_EXIF 1 #define CONFIG_FAANDCT 0 -@@ -686,8 +686,8 @@ +@@ -687,8 +687,8 @@ #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 1 #define CONFIG_H264_SEI 1 @@ -1776,7 +1776,7 @@ index 3ffcf8b6eb..85a361ddc2 100644 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 diff --git a/chromium/config/ChromeOS/linux/ia32/config_components.h b/chromium/config/ChromeOS/linux/ia32/config_components.h -index 80435e58f2..bc677e767c 100644 +index 4290dbef99..fa52167a88 100644 --- a/chromium/config/ChromeOS/linux/ia32/config_components.h +++ b/chromium/config/ChromeOS/linux/ia32/config_components.h @@ -134,7 +134,7 @@ @@ -1788,7 +1788,7 @@ index 80435e58f2..bc677e767c 100644 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 -@@ -959,7 +959,7 @@ +@@ -963,7 +963,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 1 #define CONFIG_H264_PARSER 1 @@ -1818,7 +1818,7 @@ index e1652f8b9d..bb61b337a0 100644 + &ff_hevc_parser, NULL }; diff --git a/chromium/config/ChromeOS/linux/x64/config.h b/chromium/config/ChromeOS/linux/x64/config.h -index 22c4bcfe82..d4b533e233 100644 +index cf26d1b0ed..8bbfde8d68 100644 --- a/chromium/config/ChromeOS/linux/x64/config.h +++ b/chromium/config/ChromeOS/linux/x64/config.h @@ -1,7 +1,7 @@ @@ -1830,7 +1830,7 @@ index 22c4bcfe82..d4b533e233 100644 #define FFMPEG_LICENSE "LGPL version 2.1 or later" #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" -@@ -656,7 +656,7 @@ +@@ -657,7 +657,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 1 @@ -1839,7 +1839,7 @@ index 22c4bcfe82..d4b533e233 100644 #define CONFIG_CABAC 1 #define CONFIG_CBS 0 #define CONFIG_CBS_AV1 0 -@@ -668,7 +668,7 @@ +@@ -669,7 +669,7 @@ #define CONFIG_DEFLATE_WRAPPER 0 #define CONFIG_DIRAC_PARSE 1 #define CONFIG_DNN 0 @@ -1848,7 +1848,7 @@ index 22c4bcfe82..d4b533e233 100644 #define CONFIG_DVPROFILE 0 #define CONFIG_EXIF 1 #define CONFIG_FAANDCT 0 -@@ -686,8 +686,8 @@ +@@ -687,8 +687,8 @@ #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 1 #define CONFIG_H264_SEI 1 @@ -1860,7 +1860,7 @@ index 22c4bcfe82..d4b533e233 100644 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 diff --git a/chromium/config/ChromeOS/linux/x64/config_components.h b/chromium/config/ChromeOS/linux/x64/config_components.h -index 80435e58f2..bc677e767c 100644 +index 4290dbef99..fa52167a88 100644 --- a/chromium/config/ChromeOS/linux/x64/config_components.h +++ b/chromium/config/ChromeOS/linux/x64/config_components.h @@ -134,7 +134,7 @@ @@ -1872,7 +1872,7 @@ index 80435e58f2..bc677e767c 100644 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 -@@ -959,7 +959,7 @@ +@@ -963,7 +963,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 1 #define CONFIG_H264_PARSER 1 @@ -1902,10 +1902,10 @@ index e1652f8b9d..bb61b337a0 100644 + &ff_hevc_parser, NULL }; diff --git a/chromium/config/Chromium/ios/arm64/config.h b/chromium/config/Chromium/ios/arm64/config.h -index 8581bab932..c7cc453778 100644 +index 0564eeac5a..55203e0f69 100644 --- a/chromium/config/Chromium/ios/arm64/config.h +++ b/chromium/config/Chromium/ios/arm64/config.h -@@ -656,7 +656,7 @@ +@@ -657,7 +657,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 0 @@ -1914,7 +1914,7 @@ index 8581bab932..c7cc453778 100644 #define CONFIG_CABAC 0 #define CONFIG_CBS 0 #define CONFIG_CBS_AV1 0 -@@ -668,7 +668,7 @@ +@@ -669,7 +669,7 @@ #define CONFIG_DEFLATE_WRAPPER 0 #define CONFIG_DIRAC_PARSE 1 #define CONFIG_DNN 0 @@ -1923,7 +1923,7 @@ index 8581bab932..c7cc453778 100644 #define CONFIG_DVPROFILE 0 #define CONFIG_EXIF 0 #define CONFIG_FAANDCT 0 -@@ -686,8 +686,8 @@ +@@ -687,8 +687,8 @@ #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 0 #define CONFIG_H264_SEI 0 @@ -1935,7 +1935,7 @@ index 8581bab932..c7cc453778 100644 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 diff --git a/chromium/config/Chromium/ios/arm64/config_components.h b/chromium/config/Chromium/ios/arm64/config_components.h -index d85ee4cc04..9053370117 100644 +index 18d38c4815..6f3ae35a1b 100644 --- a/chromium/config/Chromium/ios/arm64/config_components.h +++ b/chromium/config/Chromium/ios/arm64/config_components.h @@ -134,7 +134,7 @@ @@ -1947,7 +1947,7 @@ index d85ee4cc04..9053370117 100644 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 -@@ -959,7 +959,7 @@ +@@ -963,7 +963,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 0 #define CONFIG_H264_PARSER 0 @@ -1977,10 +1977,10 @@ index f81fbe8bbc..2d65b7d8ad 100644 + &ff_hevc_parser, NULL }; diff --git a/chromium/config/Chromium/linux-noasm/x64/config.h b/chromium/config/Chromium/linux-noasm/x64/config.h -index 2a160bd8c0..64a29625ff 100644 +index 2c6d81bcc8..508898c8d6 100644 --- a/chromium/config/Chromium/linux-noasm/x64/config.h +++ b/chromium/config/Chromium/linux-noasm/x64/config.h -@@ -656,7 +656,7 @@ +@@ -657,7 +657,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 0 @@ -1989,7 +1989,7 @@ index 2a160bd8c0..64a29625ff 100644 #define CONFIG_CABAC 0 #define CONFIG_CBS 0 #define CONFIG_CBS_AV1 0 -@@ -668,7 +668,7 @@ +@@ -669,7 +669,7 @@ #define CONFIG_DEFLATE_WRAPPER 0 #define CONFIG_DIRAC_PARSE 1 #define CONFIG_DNN 0 @@ -1998,7 +1998,7 @@ index 2a160bd8c0..64a29625ff 100644 #define CONFIG_DVPROFILE 0 #define CONFIG_EXIF 0 #define CONFIG_FAANDCT 0 -@@ -686,8 +686,8 @@ +@@ -687,8 +687,8 @@ #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 0 #define CONFIG_H264_SEI 0 @@ -2010,7 +2010,7 @@ index 2a160bd8c0..64a29625ff 100644 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 diff --git a/chromium/config/Chromium/linux-noasm/x64/config_components.h b/chromium/config/Chromium/linux-noasm/x64/config_components.h -index d85ee4cc04..9053370117 100644 +index 18d38c4815..6f3ae35a1b 100644 --- a/chromium/config/Chromium/linux-noasm/x64/config_components.h +++ b/chromium/config/Chromium/linux-noasm/x64/config_components.h @@ -134,7 +134,7 @@ @@ -2022,7 +2022,7 @@ index d85ee4cc04..9053370117 100644 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 -@@ -959,7 +959,7 @@ +@@ -963,7 +963,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 0 #define CONFIG_H264_PARSER 0 @@ -2052,10 +2052,10 @@ index f81fbe8bbc..2d65b7d8ad 100644 + &ff_hevc_parser, NULL }; diff --git a/chromium/config/Chromium/linux/arm-neon/config.h b/chromium/config/Chromium/linux/arm-neon/config.h -index 761a7c6e36..bb0f9b68fc 100644 +index aa5583c905..38e66b4ba9 100644 --- a/chromium/config/Chromium/linux/arm-neon/config.h +++ b/chromium/config/Chromium/linux/arm-neon/config.h -@@ -656,7 +656,7 @@ +@@ -657,7 +657,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 0 @@ -2064,7 +2064,7 @@ index 761a7c6e36..bb0f9b68fc 100644 #define CONFIG_CABAC 0 #define CONFIG_CBS 0 #define CONFIG_CBS_AV1 0 -@@ -668,7 +668,7 @@ +@@ -669,7 +669,7 @@ #define CONFIG_DEFLATE_WRAPPER 0 #define CONFIG_DIRAC_PARSE 1 #define CONFIG_DNN 0 @@ -2073,7 +2073,7 @@ index 761a7c6e36..bb0f9b68fc 100644 #define CONFIG_DVPROFILE 0 #define CONFIG_EXIF 0 #define CONFIG_FAANDCT 0 -@@ -686,8 +686,8 @@ +@@ -687,8 +687,8 @@ #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 0 #define CONFIG_H264_SEI 0 @@ -2085,7 +2085,7 @@ index 761a7c6e36..bb0f9b68fc 100644 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 diff --git a/chromium/config/Chromium/linux/arm-neon/config_components.h b/chromium/config/Chromium/linux/arm-neon/config_components.h -index d85ee4cc04..9053370117 100644 +index 18d38c4815..6f3ae35a1b 100644 --- a/chromium/config/Chromium/linux/arm-neon/config_components.h +++ b/chromium/config/Chromium/linux/arm-neon/config_components.h @@ -134,7 +134,7 @@ @@ -2097,7 +2097,7 @@ index d85ee4cc04..9053370117 100644 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 -@@ -959,7 +959,7 @@ +@@ -963,7 +963,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 0 #define CONFIG_H264_PARSER 0 @@ -2127,10 +2127,10 @@ index f81fbe8bbc..2d65b7d8ad 100644 + &ff_hevc_parser, NULL }; diff --git a/chromium/config/Chromium/linux/arm/config.h b/chromium/config/Chromium/linux/arm/config.h -index c2aab774f4..7fe09eb0f0 100644 +index 6c23ba11db..5390256391 100644 --- a/chromium/config/Chromium/linux/arm/config.h +++ b/chromium/config/Chromium/linux/arm/config.h -@@ -656,7 +656,7 @@ +@@ -657,7 +657,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 0 @@ -2139,7 +2139,7 @@ index c2aab774f4..7fe09eb0f0 100644 #define CONFIG_CABAC 0 #define CONFIG_CBS 0 #define CONFIG_CBS_AV1 0 -@@ -668,7 +668,7 @@ +@@ -669,7 +669,7 @@ #define CONFIG_DEFLATE_WRAPPER 0 #define CONFIG_DIRAC_PARSE 1 #define CONFIG_DNN 0 @@ -2148,7 +2148,7 @@ index c2aab774f4..7fe09eb0f0 100644 #define CONFIG_DVPROFILE 0 #define CONFIG_EXIF 0 #define CONFIG_FAANDCT 0 -@@ -686,8 +686,8 @@ +@@ -687,8 +687,8 @@ #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 0 #define CONFIG_H264_SEI 0 @@ -2160,7 +2160,7 @@ index c2aab774f4..7fe09eb0f0 100644 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 diff --git a/chromium/config/Chromium/linux/arm/config_components.h b/chromium/config/Chromium/linux/arm/config_components.h -index d85ee4cc04..9053370117 100644 +index 18d38c4815..6f3ae35a1b 100644 --- a/chromium/config/Chromium/linux/arm/config_components.h +++ b/chromium/config/Chromium/linux/arm/config_components.h @@ -134,7 +134,7 @@ @@ -2172,7 +2172,7 @@ index d85ee4cc04..9053370117 100644 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 -@@ -959,7 +959,7 @@ +@@ -963,7 +963,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 0 #define CONFIG_H264_PARSER 0 @@ -2202,10 +2202,10 @@ index f81fbe8bbc..2d65b7d8ad 100644 + &ff_hevc_parser, NULL }; diff --git a/chromium/config/Chromium/linux/arm64/config.h b/chromium/config/Chromium/linux/arm64/config.h -index 3ce3e42a7d..2883146f03 100644 +index 85f494c322..dae4f17aaf 100644 --- a/chromium/config/Chromium/linux/arm64/config.h +++ b/chromium/config/Chromium/linux/arm64/config.h -@@ -656,7 +656,7 @@ +@@ -657,7 +657,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 0 @@ -2214,7 +2214,7 @@ index 3ce3e42a7d..2883146f03 100644 #define CONFIG_CABAC 0 #define CONFIG_CBS 0 #define CONFIG_CBS_AV1 0 -@@ -668,7 +668,7 @@ +@@ -669,7 +669,7 @@ #define CONFIG_DEFLATE_WRAPPER 0 #define CONFIG_DIRAC_PARSE 1 #define CONFIG_DNN 0 @@ -2223,7 +2223,7 @@ index 3ce3e42a7d..2883146f03 100644 #define CONFIG_DVPROFILE 0 #define CONFIG_EXIF 0 #define CONFIG_FAANDCT 0 -@@ -686,8 +686,8 @@ +@@ -687,8 +687,8 @@ #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 0 #define CONFIG_H264_SEI 0 @@ -2235,7 +2235,7 @@ index 3ce3e42a7d..2883146f03 100644 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 diff --git a/chromium/config/Chromium/linux/arm64/config_components.h b/chromium/config/Chromium/linux/arm64/config_components.h -index d85ee4cc04..9053370117 100644 +index 18d38c4815..6f3ae35a1b 100644 --- a/chromium/config/Chromium/linux/arm64/config_components.h +++ b/chromium/config/Chromium/linux/arm64/config_components.h @@ -134,7 +134,7 @@ @@ -2247,7 +2247,7 @@ index d85ee4cc04..9053370117 100644 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 -@@ -959,7 +959,7 @@ +@@ -963,7 +963,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 0 #define CONFIG_H264_PARSER 0 @@ -2277,10 +2277,10 @@ index f81fbe8bbc..2d65b7d8ad 100644 + &ff_hevc_parser, NULL }; diff --git a/chromium/config/Chromium/linux/ia32/config.h b/chromium/config/Chromium/linux/ia32/config.h -index d8285a78b3..8119355138 100644 +index 94ea2a9c9f..36ea4c756c 100644 --- a/chromium/config/Chromium/linux/ia32/config.h +++ b/chromium/config/Chromium/linux/ia32/config.h -@@ -656,7 +656,7 @@ +@@ -657,7 +657,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 0 @@ -2289,7 +2289,7 @@ index d8285a78b3..8119355138 100644 #define CONFIG_CABAC 0 #define CONFIG_CBS 0 #define CONFIG_CBS_AV1 0 -@@ -668,7 +668,7 @@ +@@ -669,7 +669,7 @@ #define CONFIG_DEFLATE_WRAPPER 0 #define CONFIG_DIRAC_PARSE 1 #define CONFIG_DNN 0 @@ -2298,7 +2298,7 @@ index d8285a78b3..8119355138 100644 #define CONFIG_DVPROFILE 0 #define CONFIG_EXIF 0 #define CONFIG_FAANDCT 0 -@@ -686,8 +686,8 @@ +@@ -687,8 +687,8 @@ #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 0 #define CONFIG_H264_SEI 0 @@ -2310,7 +2310,7 @@ index d8285a78b3..8119355138 100644 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 diff --git a/chromium/config/Chromium/linux/ia32/config_components.h b/chromium/config/Chromium/linux/ia32/config_components.h -index d85ee4cc04..9053370117 100644 +index 18d38c4815..6f3ae35a1b 100644 --- a/chromium/config/Chromium/linux/ia32/config_components.h +++ b/chromium/config/Chromium/linux/ia32/config_components.h @@ -134,7 +134,7 @@ @@ -2322,7 +2322,7 @@ index d85ee4cc04..9053370117 100644 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 -@@ -959,7 +959,7 @@ +@@ -963,7 +963,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 0 #define CONFIG_H264_PARSER 0 @@ -2352,10 +2352,10 @@ index f81fbe8bbc..2d65b7d8ad 100644 + &ff_hevc_parser, NULL }; diff --git a/chromium/config/Chromium/linux/x64/config.h b/chromium/config/Chromium/linux/x64/config.h -index c2bda731ae..c3f700a37d 100644 +index 129e1e2558..183bc7f70f 100644 --- a/chromium/config/Chromium/linux/x64/config.h +++ b/chromium/config/Chromium/linux/x64/config.h -@@ -656,7 +656,7 @@ +@@ -657,7 +657,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 0 @@ -2364,7 +2364,7 @@ index c2bda731ae..c3f700a37d 100644 #define CONFIG_CABAC 0 #define CONFIG_CBS 0 #define CONFIG_CBS_AV1 0 -@@ -668,7 +668,7 @@ +@@ -669,7 +669,7 @@ #define CONFIG_DEFLATE_WRAPPER 0 #define CONFIG_DIRAC_PARSE 1 #define CONFIG_DNN 0 @@ -2373,7 +2373,7 @@ index c2bda731ae..c3f700a37d 100644 #define CONFIG_DVPROFILE 0 #define CONFIG_EXIF 0 #define CONFIG_FAANDCT 0 -@@ -686,8 +686,8 @@ +@@ -687,8 +687,8 @@ #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 0 #define CONFIG_H264_SEI 0 @@ -2385,7 +2385,7 @@ index c2bda731ae..c3f700a37d 100644 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 diff --git a/chromium/config/Chromium/linux/x64/config_components.h b/chromium/config/Chromium/linux/x64/config_components.h -index d85ee4cc04..9053370117 100644 +index 18d38c4815..6f3ae35a1b 100644 --- a/chromium/config/Chromium/linux/x64/config_components.h +++ b/chromium/config/Chromium/linux/x64/config_components.h @@ -134,7 +134,7 @@ @@ -2397,7 +2397,7 @@ index d85ee4cc04..9053370117 100644 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 -@@ -959,7 +959,7 @@ +@@ -963,7 +963,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 0 #define CONFIG_H264_PARSER 0 @@ -2427,10 +2427,10 @@ index f81fbe8bbc..2d65b7d8ad 100644 + &ff_hevc_parser, NULL }; diff --git a/chromium/config/Chromium/mac/arm64/config.h b/chromium/config/Chromium/mac/arm64/config.h -index 8581bab932..c7cc453778 100644 +index 0564eeac5a..55203e0f69 100644 --- a/chromium/config/Chromium/mac/arm64/config.h +++ b/chromium/config/Chromium/mac/arm64/config.h -@@ -656,7 +656,7 @@ +@@ -657,7 +657,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 0 @@ -2439,7 +2439,7 @@ index 8581bab932..c7cc453778 100644 #define CONFIG_CABAC 0 #define CONFIG_CBS 0 #define CONFIG_CBS_AV1 0 -@@ -668,7 +668,7 @@ +@@ -669,7 +669,7 @@ #define CONFIG_DEFLATE_WRAPPER 0 #define CONFIG_DIRAC_PARSE 1 #define CONFIG_DNN 0 @@ -2448,7 +2448,7 @@ index 8581bab932..c7cc453778 100644 #define CONFIG_DVPROFILE 0 #define CONFIG_EXIF 0 #define CONFIG_FAANDCT 0 -@@ -686,8 +686,8 @@ +@@ -687,8 +687,8 @@ #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 0 #define CONFIG_H264_SEI 0 @@ -2460,7 +2460,7 @@ index 8581bab932..c7cc453778 100644 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 diff --git a/chromium/config/Chromium/mac/arm64/config_components.h b/chromium/config/Chromium/mac/arm64/config_components.h -index d85ee4cc04..9053370117 100644 +index 18d38c4815..6f3ae35a1b 100644 --- a/chromium/config/Chromium/mac/arm64/config_components.h +++ b/chromium/config/Chromium/mac/arm64/config_components.h @@ -134,7 +134,7 @@ @@ -2472,7 +2472,7 @@ index d85ee4cc04..9053370117 100644 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 -@@ -959,7 +959,7 @@ +@@ -963,7 +963,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 0 #define CONFIG_H264_PARSER 0 @@ -2502,10 +2502,10 @@ index f81fbe8bbc..2d65b7d8ad 100644 + &ff_hevc_parser, NULL }; diff --git a/chromium/config/Chromium/mac/x64/config.asm b/chromium/config/Chromium/mac/x64/config.asm -index 36e5a1e62a..f4b4466e6b 100644 +index a8832e993a..9276b1809f 100644 --- a/chromium/config/Chromium/mac/x64/config.asm +++ b/chromium/config/Chromium/mac/x64/config.asm -@@ -640,7 +640,7 @@ +@@ -641,7 +641,7 @@ %define CONFIG_AUDIO_FRAME_QUEUE 0 %define CONFIG_AUDIODSP 0 %define CONFIG_BLOCKDSP 0 @@ -2514,7 +2514,7 @@ index 36e5a1e62a..f4b4466e6b 100644 %define CONFIG_CABAC 0 %define CONFIG_CBS 0 %define CONFIG_CBS_AV1 0 -@@ -652,7 +652,7 @@ +@@ -653,7 +653,7 @@ %define CONFIG_DEFLATE_WRAPPER 0 %define CONFIG_DIRAC_PARSE 1 %define CONFIG_DNN 0 @@ -2523,7 +2523,7 @@ index 36e5a1e62a..f4b4466e6b 100644 %define CONFIG_DVPROFILE 0 %define CONFIG_EXIF 0 %define CONFIG_FAANDCT 0 -@@ -670,8 +670,8 @@ +@@ -671,8 +671,8 @@ %define CONFIG_H264PRED 1 %define CONFIG_H264QPEL 0 %define CONFIG_H264_SEI 0 @@ -2535,10 +2535,10 @@ index 36e5a1e62a..f4b4466e6b 100644 %define CONFIG_HUFFMAN 0 %define CONFIG_HUFFYUVDSP 0 diff --git a/chromium/config/Chromium/mac/x64/config.h b/chromium/config/Chromium/mac/x64/config.h -index 5db229d872..772619b7c9 100644 +index ac8416b005..e0c55bf096 100644 --- a/chromium/config/Chromium/mac/x64/config.h +++ b/chromium/config/Chromium/mac/x64/config.h -@@ -656,7 +656,7 @@ +@@ -657,7 +657,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 0 @@ -2547,7 +2547,7 @@ index 5db229d872..772619b7c9 100644 #define CONFIG_CABAC 0 #define CONFIG_CBS 0 #define CONFIG_CBS_AV1 0 -@@ -668,7 +668,7 @@ +@@ -669,7 +669,7 @@ #define CONFIG_DEFLATE_WRAPPER 0 #define CONFIG_DIRAC_PARSE 1 #define CONFIG_DNN 0 @@ -2556,7 +2556,7 @@ index 5db229d872..772619b7c9 100644 #define CONFIG_DVPROFILE 0 #define CONFIG_EXIF 0 #define CONFIG_FAANDCT 0 -@@ -686,8 +686,8 @@ +@@ -687,8 +687,8 @@ #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 0 #define CONFIG_H264_SEI 0 @@ -2568,7 +2568,7 @@ index 5db229d872..772619b7c9 100644 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 diff --git a/chromium/config/Chromium/mac/x64/config_components.h b/chromium/config/Chromium/mac/x64/config_components.h -index d85ee4cc04..9053370117 100644 +index 18d38c4815..6f3ae35a1b 100644 --- a/chromium/config/Chromium/mac/x64/config_components.h +++ b/chromium/config/Chromium/mac/x64/config_components.h @@ -134,7 +134,7 @@ @@ -2580,7 +2580,7 @@ index d85ee4cc04..9053370117 100644 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 -@@ -959,7 +959,7 @@ +@@ -963,7 +963,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 0 #define CONFIG_H264_PARSER 0 @@ -2810,10 +2810,10 @@ index 4c59b89cdf..8629776838 100644 + &ff_hevc_parser, NULL }; diff --git a/chromium/config/Chromium/win/arm64/config.h b/chromium/config/Chromium/win/arm64/config.h -index fcf1f42fbc..06a3a4859b 100644 +index 2e61134969..0fc3ad3f91 100644 --- a/chromium/config/Chromium/win/arm64/config.h +++ b/chromium/config/Chromium/win/arm64/config.h -@@ -656,7 +656,7 @@ +@@ -657,7 +657,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 0 @@ -2822,7 +2822,7 @@ index fcf1f42fbc..06a3a4859b 100644 #define CONFIG_CABAC 0 #define CONFIG_CBS 0 #define CONFIG_CBS_AV1 0 -@@ -668,7 +668,7 @@ +@@ -669,7 +669,7 @@ #define CONFIG_DEFLATE_WRAPPER 0 #define CONFIG_DIRAC_PARSE 1 #define CONFIG_DNN 0 @@ -2831,7 +2831,7 @@ index fcf1f42fbc..06a3a4859b 100644 #define CONFIG_DVPROFILE 0 #define CONFIG_EXIF 0 #define CONFIG_FAANDCT 0 -@@ -686,8 +686,8 @@ +@@ -687,8 +687,8 @@ #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 0 #define CONFIG_H264_SEI 0 @@ -2843,7 +2843,7 @@ index fcf1f42fbc..06a3a4859b 100644 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 diff --git a/chromium/config/Chromium/win/arm64/config_components.h b/chromium/config/Chromium/win/arm64/config_components.h -index d85ee4cc04..9053370117 100644 +index 18d38c4815..6f3ae35a1b 100644 --- a/chromium/config/Chromium/win/arm64/config_components.h +++ b/chromium/config/Chromium/win/arm64/config_components.h @@ -134,7 +134,7 @@ @@ -2855,7 +2855,7 @@ index d85ee4cc04..9053370117 100644 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 -@@ -959,7 +959,7 @@ +@@ -963,7 +963,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 0 #define CONFIG_H264_PARSER 0 @@ -2885,10 +2885,10 @@ index f81fbe8bbc..2d65b7d8ad 100644 + &ff_hevc_parser, NULL }; diff --git a/chromium/config/Chromium/win/ia32/config.asm b/chromium/config/Chromium/win/ia32/config.asm -index c5f7431494..bf0b069b7b 100644 +index 4b93e7ce4e..2fdb72be16 100644 --- a/chromium/config/Chromium/win/ia32/config.asm +++ b/chromium/config/Chromium/win/ia32/config.asm -@@ -640,7 +640,7 @@ +@@ -641,7 +641,7 @@ %define CONFIG_AUDIO_FRAME_QUEUE 0 %define CONFIG_AUDIODSP 0 %define CONFIG_BLOCKDSP 0 @@ -2897,7 +2897,7 @@ index c5f7431494..bf0b069b7b 100644 %define CONFIG_CABAC 0 %define CONFIG_CBS 0 %define CONFIG_CBS_AV1 0 -@@ -652,7 +652,7 @@ +@@ -653,7 +653,7 @@ %define CONFIG_DEFLATE_WRAPPER 0 %define CONFIG_DIRAC_PARSE 1 %define CONFIG_DNN 0 @@ -2906,7 +2906,7 @@ index c5f7431494..bf0b069b7b 100644 %define CONFIG_DVPROFILE 0 %define CONFIG_EXIF 0 %define CONFIG_FAANDCT 0 -@@ -670,8 +670,8 @@ +@@ -671,8 +671,8 @@ %define CONFIG_H264PRED 1 %define CONFIG_H264QPEL 0 %define CONFIG_H264_SEI 0 @@ -2918,10 +2918,10 @@ index c5f7431494..bf0b069b7b 100644 %define CONFIG_HUFFMAN 0 %define CONFIG_HUFFYUVDSP 0 diff --git a/chromium/config/Chromium/win/ia32/config.h b/chromium/config/Chromium/win/ia32/config.h -index 284b080343..c83c01e858 100644 +index 36406354d9..26bf57b30b 100644 --- a/chromium/config/Chromium/win/ia32/config.h +++ b/chromium/config/Chromium/win/ia32/config.h -@@ -656,7 +656,7 @@ +@@ -657,7 +657,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 0 @@ -2930,7 +2930,7 @@ index 284b080343..c83c01e858 100644 #define CONFIG_CABAC 0 #define CONFIG_CBS 0 #define CONFIG_CBS_AV1 0 -@@ -668,7 +668,7 @@ +@@ -669,7 +669,7 @@ #define CONFIG_DEFLATE_WRAPPER 0 #define CONFIG_DIRAC_PARSE 1 #define CONFIG_DNN 0 @@ -2939,7 +2939,7 @@ index 284b080343..c83c01e858 100644 #define CONFIG_DVPROFILE 0 #define CONFIG_EXIF 0 #define CONFIG_FAANDCT 0 -@@ -686,8 +686,8 @@ +@@ -687,8 +687,8 @@ #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 0 #define CONFIG_H264_SEI 0 @@ -2951,7 +2951,7 @@ index 284b080343..c83c01e858 100644 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 diff --git a/chromium/config/Chromium/win/ia32/config_components.h b/chromium/config/Chromium/win/ia32/config_components.h -index d85ee4cc04..9053370117 100644 +index 18d38c4815..6f3ae35a1b 100644 --- a/chromium/config/Chromium/win/ia32/config_components.h +++ b/chromium/config/Chromium/win/ia32/config_components.h @@ -134,7 +134,7 @@ @@ -2963,7 +2963,7 @@ index d85ee4cc04..9053370117 100644 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 -@@ -959,7 +959,7 @@ +@@ -963,7 +963,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 0 #define CONFIG_H264_PARSER 0 @@ -2993,10 +2993,10 @@ index f81fbe8bbc..2d65b7d8ad 100644 + &ff_hevc_parser, NULL }; diff --git a/chromium/config/Chromium/win/x64/config.asm b/chromium/config/Chromium/win/x64/config.asm -index fc0d3aa8ff..a8264dd3cb 100644 +index bb8c3ddfd3..11ea6353f9 100644 --- a/chromium/config/Chromium/win/x64/config.asm +++ b/chromium/config/Chromium/win/x64/config.asm -@@ -640,7 +640,7 @@ +@@ -641,7 +641,7 @@ %define CONFIG_AUDIO_FRAME_QUEUE 0 %define CONFIG_AUDIODSP 0 %define CONFIG_BLOCKDSP 0 @@ -3005,7 +3005,7 @@ index fc0d3aa8ff..a8264dd3cb 100644 %define CONFIG_CABAC 0 %define CONFIG_CBS 0 %define CONFIG_CBS_AV1 0 -@@ -652,7 +652,7 @@ +@@ -653,7 +653,7 @@ %define CONFIG_DEFLATE_WRAPPER 0 %define CONFIG_DIRAC_PARSE 1 %define CONFIG_DNN 0 @@ -3014,7 +3014,7 @@ index fc0d3aa8ff..a8264dd3cb 100644 %define CONFIG_DVPROFILE 0 %define CONFIG_EXIF 0 %define CONFIG_FAANDCT 0 -@@ -670,8 +670,8 @@ +@@ -671,8 +671,8 @@ %define CONFIG_H264PRED 1 %define CONFIG_H264QPEL 0 %define CONFIG_H264_SEI 0 @@ -3026,10 +3026,10 @@ index fc0d3aa8ff..a8264dd3cb 100644 %define CONFIG_HUFFMAN 0 %define CONFIG_HUFFYUVDSP 0 diff --git a/chromium/config/Chromium/win/x64/config.h b/chromium/config/Chromium/win/x64/config.h -index e76ad5b967..bd879c84f9 100644 +index d76ac15418..75f478ac16 100644 --- a/chromium/config/Chromium/win/x64/config.h +++ b/chromium/config/Chromium/win/x64/config.h -@@ -656,7 +656,7 @@ +@@ -657,7 +657,7 @@ #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 #define CONFIG_BLOCKDSP 0 @@ -3038,7 +3038,7 @@ index e76ad5b967..bd879c84f9 100644 #define CONFIG_CABAC 0 #define CONFIG_CBS 0 #define CONFIG_CBS_AV1 0 -@@ -668,7 +668,7 @@ +@@ -669,7 +669,7 @@ #define CONFIG_DEFLATE_WRAPPER 0 #define CONFIG_DIRAC_PARSE 1 #define CONFIG_DNN 0 @@ -3047,7 +3047,7 @@ index e76ad5b967..bd879c84f9 100644 #define CONFIG_DVPROFILE 0 #define CONFIG_EXIF 0 #define CONFIG_FAANDCT 0 -@@ -686,8 +686,8 @@ +@@ -687,8 +687,8 @@ #define CONFIG_H264PRED 1 #define CONFIG_H264QPEL 0 #define CONFIG_H264_SEI 0 @@ -3059,7 +3059,7 @@ index e76ad5b967..bd879c84f9 100644 #define CONFIG_HUFFMAN 0 #define CONFIG_HUFFYUVDSP 0 diff --git a/chromium/config/Chromium/win/x64/config_components.h b/chromium/config/Chromium/win/x64/config_components.h -index d85ee4cc04..9053370117 100644 +index 18d38c4815..6f3ae35a1b 100644 --- a/chromium/config/Chromium/win/x64/config_components.h +++ b/chromium/config/Chromium/win/x64/config_components.h @@ -134,7 +134,7 @@ @@ -3071,7 +3071,7 @@ index d85ee4cc04..9053370117 100644 #define CONFIG_HEVC_QSV_DECODER 0 #define CONFIG_HEVC_RKMPP_DECODER 0 #define CONFIG_HEVC_V4L2M2M_DECODER 0 -@@ -959,7 +959,7 @@ +@@ -963,7 +963,7 @@ #define CONFIG_H261_PARSER 0 #define CONFIG_H263_PARSER 0 #define CONFIG_H264_PARSER 0 @@ -3117,7 +3117,7 @@ index 19d0a0f7bc..d7e6dcefab 100755 # Google ChromeOS specific configuration. diff --git a/ffmpeg_generated.gni b/ffmpeg_generated.gni -index f0b5c66668..f81acafff5 100644 +index 375489c10e..13e31ffb2b 100644 --- a/ffmpeg_generated.gni +++ b/ffmpeg_generated.gni @@ -242,6 +242,25 @@ if (use_linux_config && ffmpeg_branding == "ChromeOS") { @@ -3169,7 +3169,7 @@ index f0b5c66668..f81acafff5 100644 ffmpeg_c_sources += [ "libavcodec/x86/h264_qpel.c", "libavcodec/x86/h264chroma_init.c", -@@ -503,6 +538,17 @@ if ((is_apple && current_cpu == "arm64") || (is_win && current_cpu == "arm64") | +@@ -504,6 +539,18 @@ if ((is_apple && current_cpu == "arm64") || (is_win && current_cpu == "arm64") | } if ((is_apple && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (use_linux_config && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (use_linux_config && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS")) { @@ -3181,13 +3181,14 @@ index f0b5c66668..f81acafff5 100644 + ffmpeg_gas_sources += [ + "libavcodec/aarch64/autorename_libavcodec_aarch64_hevcdsp_idct_neon.S", + "libavcodec/aarch64/autorename_libavcodec_aarch64_hevcdsp_sao_neon.S", ++ "libavcodec/aarch64/hevcdsp_deblock_neon.S", + "libavcodec/aarch64/hevcdsp_qpel_neon.S" + ] + ffmpeg_c_sources += [ "libavcodec/aarch64/h264chroma_init_aarch64.c", "libavcodec/aarch64/h264dsp_init_aarch64.c", -@@ -567,6 +613,11 @@ if (use_linux_config && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS") +@@ -568,6 +615,11 @@ if (use_linux_config && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS") } if ((use_linux_config && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (use_linux_config && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (use_linux_config && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (use_linux_config && current_cpu == "arm" && ffmpeg_branding == "ChromeOS")) { @@ -3199,7 +3200,7 @@ index f0b5c66668..f81acafff5 100644 ffmpeg_c_sources += [ "libavcodec/arm/h264chroma_init_arm.c", "libavcodec/arm/h264dsp_init_arm.c", -@@ -578,6 +629,18 @@ if ((use_linux_config && current_cpu == "arm" && arm_use_neon && ffmpeg_branding +@@ -579,6 +631,18 @@ if ((use_linux_config && current_cpu == "arm" && arm_use_neon && ffmpeg_branding } if ((use_linux_config && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (use_linux_config && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS")) { @@ -3246,5 +3247,5 @@ index 0000000000..3accbac3e4 +#include "bswapdsp.c" \ No newline at end of file -- -2.36.1.windows.1 +2.39.2 (Apple Git-143) diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/android/arm-neon/config.h b/src/third_party/ffmpeg/chromium/config/Chrome/android/arm-neon/config.h index 3af8cb51..2f8b5417 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/android/arm-neon/config.h +++ b/src/third_party/ffmpeg/chromium/config/Chrome/android/arm-neon/config.h @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/android/arm-neon/config_components.h b/src/third_party/ffmpeg/chromium/config/Chrome/android/arm-neon/config_components.h index 9c6d1229..c06a0e4c 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/android/arm-neon/config_components.h +++ b/src/third_party/ffmpeg/chromium/config/Chrome/android/arm-neon/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/android/arm-neon/libavutil/ffversion.h b/src/third_party/ffmpeg/chromium/config/Chrome/android/arm-neon/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/android/arm-neon/libavutil/ffversion.h +++ b/src/third_party/ffmpeg/chromium/config/Chrome/android/arm-neon/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/android/arm64/config.h b/src/third_party/ffmpeg/chromium/config/Chrome/android/arm64/config.h index df04fd3b..675e3425 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/android/arm64/config.h +++ b/src/third_party/ffmpeg/chromium/config/Chrome/android/arm64/config.h @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/android/arm64/config_components.h b/src/third_party/ffmpeg/chromium/config/Chrome/android/arm64/config_components.h index 9c6d1229..c06a0e4c 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/android/arm64/config_components.h +++ b/src/third_party/ffmpeg/chromium/config/Chrome/android/arm64/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/android/arm64/libavutil/ffversion.h b/src/third_party/ffmpeg/chromium/config/Chrome/android/arm64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/android/arm64/libavutil/ffversion.h +++ b/src/third_party/ffmpeg/chromium/config/Chrome/android/arm64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/android/ia32/config.h b/src/third_party/ffmpeg/chromium/config/Chrome/android/ia32/config.h index 41b24690..729d4f8e 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/android/ia32/config.h +++ b/src/third_party/ffmpeg/chromium/config/Chrome/android/ia32/config.h @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/android/ia32/config_components.h b/src/third_party/ffmpeg/chromium/config/Chrome/android/ia32/config_components.h index 9c6d1229..c06a0e4c 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/android/ia32/config_components.h +++ b/src/third_party/ffmpeg/chromium/config/Chrome/android/ia32/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/android/ia32/libavutil/ffversion.h b/src/third_party/ffmpeg/chromium/config/Chrome/android/ia32/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/android/ia32/libavutil/ffversion.h +++ b/src/third_party/ffmpeg/chromium/config/Chrome/android/ia32/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/android/x64/config.asm b/src/third_party/ffmpeg/chromium/config/Chrome/android/x64/config.asm index ae8d78e4..a06dae35 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/android/x64/config.asm +++ b/src/third_party/ffmpeg/chromium/config/Chrome/android/x64/config.asm @@ -329,6 +329,7 @@ %define HAVE_BCRYPT 0 %define HAVE_VAAPI_DRM 0 %define HAVE_VAAPI_X11 0 +%define HAVE_VAAPI_WIN32 0 %define HAVE_VDPAU_X11 0 %define HAVE_PTHREADS 1 %define HAVE_OS2THREADS 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/android/x64/config.h b/src/third_party/ffmpeg/chromium/config/Chrome/android/x64/config.h index c5d8b813..b8bb12f7 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/android/x64/config.h +++ b/src/third_party/ffmpeg/chromium/config/Chrome/android/x64/config.h @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/android/x64/config_components.h b/src/third_party/ffmpeg/chromium/config/Chrome/android/x64/config_components.h index 9c6d1229..c06a0e4c 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/android/x64/config_components.h +++ b/src/third_party/ffmpeg/chromium/config/Chrome/android/x64/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/android/x64/libavutil/ffversion.h b/src/third_party/ffmpeg/chromium/config/Chrome/android/x64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/android/x64/libavutil/ffversion.h +++ b/src/third_party/ffmpeg/chromium/config/Chrome/android/x64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/ios/arm64/config.h b/src/third_party/ffmpeg/chromium/config/Chrome/ios/arm64/config.h index 9842b9cb..741f2c7f 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/ios/arm64/config.h +++ b/src/third_party/ffmpeg/chromium/config/Chrome/ios/arm64/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME darwin #define av_restrict restrict #define EXTERN_PREFIX "_" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/ios/arm64/config_components.h b/src/third_party/ffmpeg/chromium/config/Chrome/ios/arm64/config_components.h index 7a829ad1..d0311ac8 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/ios/arm64/config_components.h +++ b/src/third_party/ffmpeg/chromium/config/Chrome/ios/arm64/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/ios/arm64/libavutil/ffversion.h b/src/third_party/ffmpeg/chromium/config/Chrome/ios/arm64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/ios/arm64/libavutil/ffversion.h +++ b/src/third_party/ffmpeg/chromium/config/Chrome/ios/arm64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/ios/x64/config.asm b/src/third_party/ffmpeg/chromium/config/Chrome/ios/x64/config.asm index 9bdc5d84..a0131929 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/ios/x64/config.asm +++ b/src/third_party/ffmpeg/chromium/config/Chrome/ios/x64/config.asm @@ -329,6 +329,7 @@ %define HAVE_BCRYPT 0 %define HAVE_VAAPI_DRM 0 %define HAVE_VAAPI_X11 0 +%define HAVE_VAAPI_WIN32 0 %define HAVE_VDPAU_X11 0 %define HAVE_PTHREADS 1 %define HAVE_OS2THREADS 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/ios/x64/config.h b/src/third_party/ffmpeg/chromium/config/Chrome/ios/x64/config.h index 638ac95a..c0ccfb3a 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/ios/x64/config.h +++ b/src/third_party/ffmpeg/chromium/config/Chrome/ios/x64/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME darwin #define av_restrict restrict #define EXTERN_PREFIX "_" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/ios/x64/config_components.h b/src/third_party/ffmpeg/chromium/config/Chrome/ios/x64/config_components.h index 3604442a..0bf0c781 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/ios/x64/config_components.h +++ b/src/third_party/ffmpeg/chromium/config/Chrome/ios/x64/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/ios/x64/libavutil/ffversion.h b/src/third_party/ffmpeg/chromium/config/Chrome/ios/x64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/ios/x64/libavutil/ffversion.h +++ b/src/third_party/ffmpeg/chromium/config/Chrome/ios/x64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/linux-noasm/x64/config.h b/src/third_party/ffmpeg/chromium/config/Chrome/linux-noasm/x64/config.h index a20c23ae..6af805b6 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/linux-noasm/x64/config.h +++ b/src/third_party/ffmpeg/chromium/config/Chrome/linux-noasm/x64/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME linux #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/linux-noasm/x64/config_components.h b/src/third_party/ffmpeg/chromium/config/Chrome/linux-noasm/x64/config_components.h index 3604442a..0bf0c781 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/linux-noasm/x64/config_components.h +++ b/src/third_party/ffmpeg/chromium/config/Chrome/linux-noasm/x64/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/linux-noasm/x64/libavutil/ffversion.h b/src/third_party/ffmpeg/chromium/config/Chrome/linux-noasm/x64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/linux-noasm/x64/libavutil/ffversion.h +++ b/src/third_party/ffmpeg/chromium/config/Chrome/linux-noasm/x64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/linux/arm-neon/config.h b/src/third_party/ffmpeg/chromium/config/Chrome/linux/arm-neon/config.h index 6468423b..09a1519c 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/linux/arm-neon/config.h +++ b/src/third_party/ffmpeg/chromium/config/Chrome/linux/arm-neon/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME linux #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/linux/arm-neon/config_components.h b/src/third_party/ffmpeg/chromium/config/Chrome/linux/arm-neon/config_components.h index 7a829ad1..d0311ac8 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/linux/arm-neon/config_components.h +++ b/src/third_party/ffmpeg/chromium/config/Chrome/linux/arm-neon/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/linux/arm-neon/libavutil/ffversion.h b/src/third_party/ffmpeg/chromium/config/Chrome/linux/arm-neon/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/linux/arm-neon/libavutil/ffversion.h +++ b/src/third_party/ffmpeg/chromium/config/Chrome/linux/arm-neon/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/linux/arm/config.h b/src/third_party/ffmpeg/chromium/config/Chrome/linux/arm/config.h index adf4a40e..622f33cd 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/linux/arm/config.h +++ b/src/third_party/ffmpeg/chromium/config/Chrome/linux/arm/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME linux #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/linux/arm/config_components.h b/src/third_party/ffmpeg/chromium/config/Chrome/linux/arm/config_components.h index 7a829ad1..d0311ac8 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/linux/arm/config_components.h +++ b/src/third_party/ffmpeg/chromium/config/Chrome/linux/arm/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/linux/arm/libavutil/ffversion.h b/src/third_party/ffmpeg/chromium/config/Chrome/linux/arm/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/linux/arm/libavutil/ffversion.h +++ b/src/third_party/ffmpeg/chromium/config/Chrome/linux/arm/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/linux/arm64/config.h b/src/third_party/ffmpeg/chromium/config/Chrome/linux/arm64/config.h index 688ed85c..5cc92ff0 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/linux/arm64/config.h +++ b/src/third_party/ffmpeg/chromium/config/Chrome/linux/arm64/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME linux #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/linux/arm64/config_components.h b/src/third_party/ffmpeg/chromium/config/Chrome/linux/arm64/config_components.h index 7a829ad1..d0311ac8 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/linux/arm64/config_components.h +++ b/src/third_party/ffmpeg/chromium/config/Chrome/linux/arm64/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/linux/arm64/libavutil/ffversion.h b/src/third_party/ffmpeg/chromium/config/Chrome/linux/arm64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/linux/arm64/libavutil/ffversion.h +++ b/src/third_party/ffmpeg/chromium/config/Chrome/linux/arm64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/config.asm b/src/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/config.asm index 277c96b3..53d8e0d2 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/config.asm +++ b/src/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/config.asm @@ -329,6 +329,7 @@ %define HAVE_BCRYPT 0 %define HAVE_VAAPI_DRM 0 %define HAVE_VAAPI_X11 0 +%define HAVE_VAAPI_WIN32 0 %define HAVE_VDPAU_X11 0 %define HAVE_PTHREADS 1 %define HAVE_OS2THREADS 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/config.h b/src/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/config.h index 7c61d0f9..14e73271 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/config.h +++ b/src/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME linux #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/config_components.h b/src/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/config_components.h index 7a829ad1..d0311ac8 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/config_components.h +++ b/src/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/libavutil/ffversion.h b/src/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/libavutil/ffversion.h +++ b/src/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/linux/x64/config.asm b/src/third_party/ffmpeg/chromium/config/Chrome/linux/x64/config.asm index 7994c87a..55ddf0f0 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/linux/x64/config.asm +++ b/src/third_party/ffmpeg/chromium/config/Chrome/linux/x64/config.asm @@ -329,6 +329,7 @@ %define HAVE_BCRYPT 0 %define HAVE_VAAPI_DRM 0 %define HAVE_VAAPI_X11 0 +%define HAVE_VAAPI_WIN32 0 %define HAVE_VDPAU_X11 0 %define HAVE_PTHREADS 1 %define HAVE_OS2THREADS 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/linux/x64/config.h b/src/third_party/ffmpeg/chromium/config/Chrome/linux/x64/config.h index 633f8f06..fc3384e0 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/linux/x64/config.h +++ b/src/third_party/ffmpeg/chromium/config/Chrome/linux/x64/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME linux #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/linux/x64/config_components.h b/src/third_party/ffmpeg/chromium/config/Chrome/linux/x64/config_components.h index 81409bb0..48d5f65e 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/linux/x64/config_components.h +++ b/src/third_party/ffmpeg/chromium/config/Chrome/linux/x64/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/linux/x64/libavutil/ffversion.h b/src/third_party/ffmpeg/chromium/config/Chrome/linux/x64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/linux/x64/libavutil/ffversion.h +++ b/src/third_party/ffmpeg/chromium/config/Chrome/linux/x64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/mac/arm64/config.h b/src/third_party/ffmpeg/chromium/config/Chrome/mac/arm64/config.h index 9842b9cb..741f2c7f 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/mac/arm64/config.h +++ b/src/third_party/ffmpeg/chromium/config/Chrome/mac/arm64/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME darwin #define av_restrict restrict #define EXTERN_PREFIX "_" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/mac/arm64/config_components.h b/src/third_party/ffmpeg/chromium/config/Chrome/mac/arm64/config_components.h index 7a829ad1..d0311ac8 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/mac/arm64/config_components.h +++ b/src/third_party/ffmpeg/chromium/config/Chrome/mac/arm64/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/mac/arm64/libavutil/ffversion.h b/src/third_party/ffmpeg/chromium/config/Chrome/mac/arm64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/mac/arm64/libavutil/ffversion.h +++ b/src/third_party/ffmpeg/chromium/config/Chrome/mac/arm64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/mac/x64/config.asm b/src/third_party/ffmpeg/chromium/config/Chrome/mac/x64/config.asm index 02690f74..94885569 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/mac/x64/config.asm +++ b/src/third_party/ffmpeg/chromium/config/Chrome/mac/x64/config.asm @@ -329,6 +329,7 @@ %define HAVE_BCRYPT 0 %define HAVE_VAAPI_DRM 0 %define HAVE_VAAPI_X11 0 +%define HAVE_VAAPI_WIN32 0 %define HAVE_VDPAU_X11 0 %define HAVE_PTHREADS 1 %define HAVE_OS2THREADS 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/mac/x64/config.h b/src/third_party/ffmpeg/chromium/config/Chrome/mac/x64/config.h index 105ab62c..6f36260d 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/mac/x64/config.h +++ b/src/third_party/ffmpeg/chromium/config/Chrome/mac/x64/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME darwin #define av_restrict restrict #define EXTERN_PREFIX "_" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/mac/x64/config_components.h b/src/third_party/ffmpeg/chromium/config/Chrome/mac/x64/config_components.h index 81409bb0..48d5f65e 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/mac/x64/config_components.h +++ b/src/third_party/ffmpeg/chromium/config/Chrome/mac/x64/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/mac/x64/libavutil/ffversion.h b/src/third_party/ffmpeg/chromium/config/Chrome/mac/x64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/mac/x64/libavutil/ffversion.h +++ b/src/third_party/ffmpeg/chromium/config/Chrome/mac/x64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/win-msvc/x64/config.asm b/src/third_party/ffmpeg/chromium/config/Chrome/win-msvc/x64/config.asm index eab1ffd4..c3e7f4de 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/win-msvc/x64/config.asm +++ b/src/third_party/ffmpeg/chromium/config/Chrome/win-msvc/x64/config.asm @@ -558,7 +558,7 @@ %define CONFIG_MUXERS 0 %define CONFIG_PROTOCOLS 0 %define CONFIG_AANDCTTABLES 0 -%define CONFIG_AC3DSP 1 +%define CONFIG_AC3DSP 0 %define CONFIG_ADTS_HEADER 1 %define CONFIG_AUDIO_FRAME_QUEUE 0 %define CONFIG_AUDIODSP 0 @@ -568,7 +568,7 @@ %define CONFIG_CBS 0 %define CONFIG_CBS_H264 0 %define CONFIG_CBS_H265 0 -%define CONFIG_CBS_MPEG2 1 +%define CONFIG_CBS_MPEG2 0 %define CONFIG_DIRAC_PARSE 1 %define CONFIG_DVPROFILE 0 %define CONFIG_EXIF 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/win-msvc/x64/config.h b/src/third_party/ffmpeg/chromium/config/Chrome/win-msvc/x64/config.h index 6e5e3175..d45775e3 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/win-msvc/x64/config.h +++ b/src/third_party/ffmpeg/chromium/config/Chrome/win-msvc/x64/config.h @@ -573,7 +573,7 @@ #define CONFIG_MUXERS 0 #define CONFIG_PROTOCOLS 0 #define CONFIG_AANDCTTABLES 0 -#define CONFIG_AC3DSP 1 +#define CONFIG_AC3DSP 0 #define CONFIG_ADTS_HEADER 1 #define CONFIG_AUDIO_FRAME_QUEUE 0 #define CONFIG_AUDIODSP 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/win-msvc/x64/libavcodec/codec_list.c b/src/third_party/ffmpeg/chromium/config/Chrome/win-msvc/x64/libavcodec/codec_list.c index f83e45f6..5ca1e995 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/win-msvc/x64/libavcodec/codec_list.c +++ b/src/third_party/ffmpeg/chromium/config/Chrome/win-msvc/x64/libavcodec/codec_list.c @@ -17,8 +17,5 @@ static const AVCodec * const codec_list[] = { &ff_pcm_s32le_decoder, &ff_pcm_u8_decoder, &ff_libopus_decoder, - &ff_ac3_decoder, - &ff_eac3_decoder, - &ff_ac3_fixed_decoder, &ff_hevc_decoder, NULL }; diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/win-msvc/x64/libavcodec/parser_list.c b/src/third_party/ffmpeg/chromium/config/Chrome/win-msvc/x64/libavcodec/parser_list.c index 33e81e14..f55c2ca4 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/win-msvc/x64/libavcodec/parser_list.c +++ b/src/third_party/ffmpeg/chromium/config/Chrome/win-msvc/x64/libavcodec/parser_list.c @@ -7,6 +7,5 @@ static const AVCodecParser * const parser_list[] = { &ff_vorbis_parser, &ff_vp3_parser, &ff_vp8_parser, - &ff_ac3_parser, &ff_hevc_parser, NULL }; diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/win-msvc/x64/libavformat/demuxer_list.c b/src/third_party/ffmpeg/chromium/config/Chrome/win-msvc/x64/libavformat/demuxer_list.c index d6d293dc..920b22bf 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/win-msvc/x64/libavformat/demuxer_list.c +++ b/src/third_party/ffmpeg/chromium/config/Chrome/win-msvc/x64/libavformat/demuxer_list.c @@ -6,6 +6,4 @@ static const AVInputFormat * const demuxer_list[] = { &ff_mp3_demuxer, &ff_ogg_demuxer, &ff_wav_demuxer, - &ff_ac3_demuxer, - &ff_eac3_demuxer, NULL }; diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/win/arm64/config.h b/src/third_party/ffmpeg/chromium/config/Chrome/win/arm64/config.h index 9d27a8d2..d8b32c92 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/win/arm64/config.h +++ b/src/third_party/ffmpeg/chromium/config/Chrome/win/arm64/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME win32 #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 0 #define HAVE_OS2THREADS 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/win/arm64/config_components.h b/src/third_party/ffmpeg/chromium/config/Chrome/win/arm64/config_components.h index 7a829ad1..d0311ac8 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/win/arm64/config_components.h +++ b/src/third_party/ffmpeg/chromium/config/Chrome/win/arm64/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/win/arm64/libavutil/ffversion.h b/src/third_party/ffmpeg/chromium/config/Chrome/win/arm64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/win/arm64/libavutil/ffversion.h +++ b/src/third_party/ffmpeg/chromium/config/Chrome/win/arm64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/win/ia32/config.asm b/src/third_party/ffmpeg/chromium/config/Chrome/win/ia32/config.asm index 210035ac..1291ace3 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/win/ia32/config.asm +++ b/src/third_party/ffmpeg/chromium/config/Chrome/win/ia32/config.asm @@ -329,6 +329,7 @@ %define HAVE_BCRYPT 0 %define HAVE_VAAPI_DRM 0 %define HAVE_VAAPI_X11 0 +%define HAVE_VAAPI_WIN32 0 %define HAVE_VDPAU_X11 0 %define HAVE_PTHREADS 0 %define HAVE_OS2THREADS 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/win/ia32/config.h b/src/third_party/ffmpeg/chromium/config/Chrome/win/ia32/config.h index c32a7fc3..153a93b8 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/win/ia32/config.h +++ b/src/third_party/ffmpeg/chromium/config/Chrome/win/ia32/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME win32 #define av_restrict restrict #define EXTERN_PREFIX "_" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 0 #define HAVE_OS2THREADS 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/win/ia32/config_components.h b/src/third_party/ffmpeg/chromium/config/Chrome/win/ia32/config_components.h index 7a829ad1..d0311ac8 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/win/ia32/config_components.h +++ b/src/third_party/ffmpeg/chromium/config/Chrome/win/ia32/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/win/ia32/libavutil/ffversion.h b/src/third_party/ffmpeg/chromium/config/Chrome/win/ia32/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/win/ia32/libavutil/ffversion.h +++ b/src/third_party/ffmpeg/chromium/config/Chrome/win/ia32/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/win/x64/config.asm b/src/third_party/ffmpeg/chromium/config/Chrome/win/x64/config.asm index 5fca9fd5..70668d1f 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/win/x64/config.asm +++ b/src/third_party/ffmpeg/chromium/config/Chrome/win/x64/config.asm @@ -329,6 +329,7 @@ %define HAVE_BCRYPT 0 %define HAVE_VAAPI_DRM 0 %define HAVE_VAAPI_X11 0 +%define HAVE_VAAPI_WIN32 0 %define HAVE_VDPAU_X11 0 %define HAVE_PTHREADS 0 %define HAVE_OS2THREADS 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/win/x64/config.h b/src/third_party/ffmpeg/chromium/config/Chrome/win/x64/config.h index 04278f46..86ce4498 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/win/x64/config.h +++ b/src/third_party/ffmpeg/chromium/config/Chrome/win/x64/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME win64 #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 0 #define HAVE_OS2THREADS 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/win/x64/config_components.h b/src/third_party/ffmpeg/chromium/config/Chrome/win/x64/config_components.h index 81409bb0..48d5f65e 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/win/x64/config_components.h +++ b/src/third_party/ffmpeg/chromium/config/Chrome/win/x64/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chrome/win/x64/libavutil/ffversion.h b/src/third_party/ffmpeg/chromium/config/Chrome/win/x64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/src/third_party/ffmpeg/chromium/config/Chrome/win/x64/libavutil/ffversion.h +++ b/src/third_party/ffmpeg/chromium/config/Chrome/win/x64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/src/third_party/ffmpeg/chromium/config/ChromeOS/linux-noasm/x64/config.h b/src/third_party/ffmpeg/chromium/config/ChromeOS/linux-noasm/x64/config.h index a90cc618..0e9cc30a 100644 --- a/src/third_party/ffmpeg/chromium/config/ChromeOS/linux-noasm/x64/config.h +++ b/src/third_party/ffmpeg/chromium/config/ChromeOS/linux-noasm/x64/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME linux #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/src/third_party/ffmpeg/chromium/config/ChromeOS/linux-noasm/x64/config_components.h b/src/third_party/ffmpeg/chromium/config/ChromeOS/linux-noasm/x64/config_components.h index bc677e76..fa52167a 100644 --- a/src/third_party/ffmpeg/chromium/config/ChromeOS/linux-noasm/x64/config_components.h +++ b/src/third_party/ffmpeg/chromium/config/ChromeOS/linux-noasm/x64/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/src/third_party/ffmpeg/chromium/config/ChromeOS/linux-noasm/x64/libavutil/ffversion.h b/src/third_party/ffmpeg/chromium/config/ChromeOS/linux-noasm/x64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/src/third_party/ffmpeg/chromium/config/ChromeOS/linux-noasm/x64/libavutil/ffversion.h +++ b/src/third_party/ffmpeg/chromium/config/ChromeOS/linux-noasm/x64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm-neon/config.h b/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm-neon/config.h index 41e80127..a5a56eee 100644 --- a/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm-neon/config.h +++ b/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm-neon/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME linux #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm-neon/config_components.h b/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm-neon/config_components.h index bc677e76..fa52167a 100644 --- a/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm-neon/config_components.h +++ b/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm-neon/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm-neon/libavutil/ffversion.h b/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm-neon/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm-neon/libavutil/ffversion.h +++ b/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm-neon/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm/config.h b/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm/config.h index 6060fd5b..26110295 100644 --- a/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm/config.h +++ b/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME linux #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm/config_components.h b/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm/config_components.h index bc677e76..fa52167a 100644 --- a/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm/config_components.h +++ b/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm/libavutil/ffversion.h b/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm/libavutil/ffversion.h +++ b/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm64/config.h b/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm64/config.h index 3c47e083..1be92fdf 100644 --- a/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm64/config.h +++ b/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm64/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME linux #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm64/config_components.h b/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm64/config_components.h index bc677e76..fa52167a 100644 --- a/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm64/config_components.h +++ b/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm64/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm64/libavutil/ffversion.h b/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm64/libavutil/ffversion.h +++ b/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/config.asm b/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/config.asm index b257dadf..22bde70a 100644 --- a/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/config.asm +++ b/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/config.asm @@ -329,6 +329,7 @@ %define HAVE_BCRYPT 0 %define HAVE_VAAPI_DRM 0 %define HAVE_VAAPI_X11 0 +%define HAVE_VAAPI_WIN32 0 %define HAVE_VDPAU_X11 0 %define HAVE_PTHREADS 1 %define HAVE_OS2THREADS 0 diff --git a/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/config.h b/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/config.h index 85a361dd..5e48bbcf 100644 --- a/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/config.h +++ b/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME linux #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/config_components.h b/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/config_components.h index bc677e76..fa52167a 100644 --- a/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/config_components.h +++ b/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/libavutil/ffversion.h b/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/libavutil/ffversion.h +++ b/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/config.asm b/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/config.asm index deb21917..274919d1 100644 --- a/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/config.asm +++ b/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/config.asm @@ -329,6 +329,7 @@ %define HAVE_BCRYPT 0 %define HAVE_VAAPI_DRM 0 %define HAVE_VAAPI_X11 0 +%define HAVE_VAAPI_WIN32 0 %define HAVE_VDPAU_X11 0 %define HAVE_PTHREADS 1 %define HAVE_OS2THREADS 0 diff --git a/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/config.h b/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/config.h index d4b533e2..8bbfde8d 100644 --- a/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/config.h +++ b/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME linux #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/config_components.h b/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/config_components.h index bc677e76..fa52167a 100644 --- a/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/config_components.h +++ b/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/libavutil/ffversion.h b/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/libavutil/ffversion.h +++ b/src/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/src/third_party/ffmpeg/chromium/config/Chromium/android/arm-neon/config.h b/src/third_party/ffmpeg/chromium/config/Chromium/android/arm-neon/config.h index f8fdbf28..0b224436 100644 --- a/src/third_party/ffmpeg/chromium/config/Chromium/android/arm-neon/config.h +++ b/src/third_party/ffmpeg/chromium/config/Chromium/android/arm-neon/config.h @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chromium/android/arm-neon/config_components.h b/src/third_party/ffmpeg/chromium/config/Chromium/android/arm-neon/config_components.h index 012c89d9..46a1c423 100644 --- a/src/third_party/ffmpeg/chromium/config/Chromium/android/arm-neon/config_components.h +++ b/src/third_party/ffmpeg/chromium/config/Chromium/android/arm-neon/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chromium/android/arm-neon/libavutil/ffversion.h b/src/third_party/ffmpeg/chromium/config/Chromium/android/arm-neon/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/src/third_party/ffmpeg/chromium/config/Chromium/android/arm-neon/libavutil/ffversion.h +++ b/src/third_party/ffmpeg/chromium/config/Chromium/android/arm-neon/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/src/third_party/ffmpeg/chromium/config/Chromium/android/arm64/config.h b/src/third_party/ffmpeg/chromium/config/Chromium/android/arm64/config.h index 146d72b6..bc50a3da 100644 --- a/src/third_party/ffmpeg/chromium/config/Chromium/android/arm64/config.h +++ b/src/third_party/ffmpeg/chromium/config/Chromium/android/arm64/config.h @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chromium/android/arm64/config_components.h b/src/third_party/ffmpeg/chromium/config/Chromium/android/arm64/config_components.h index 012c89d9..46a1c423 100644 --- a/src/third_party/ffmpeg/chromium/config/Chromium/android/arm64/config_components.h +++ b/src/third_party/ffmpeg/chromium/config/Chromium/android/arm64/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chromium/android/arm64/libavutil/ffversion.h b/src/third_party/ffmpeg/chromium/config/Chromium/android/arm64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/src/third_party/ffmpeg/chromium/config/Chromium/android/arm64/libavutil/ffversion.h +++ b/src/third_party/ffmpeg/chromium/config/Chromium/android/arm64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/src/third_party/ffmpeg/chromium/config/Chromium/android/ia32/config.h b/src/third_party/ffmpeg/chromium/config/Chromium/android/ia32/config.h index a2b1cb8b..402c4f5d 100644 --- a/src/third_party/ffmpeg/chromium/config/Chromium/android/ia32/config.h +++ b/src/third_party/ffmpeg/chromium/config/Chromium/android/ia32/config.h @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chromium/android/ia32/config_components.h b/src/third_party/ffmpeg/chromium/config/Chromium/android/ia32/config_components.h index 012c89d9..46a1c423 100644 --- a/src/third_party/ffmpeg/chromium/config/Chromium/android/ia32/config_components.h +++ b/src/third_party/ffmpeg/chromium/config/Chromium/android/ia32/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chromium/android/ia32/libavutil/ffversion.h b/src/third_party/ffmpeg/chromium/config/Chromium/android/ia32/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/src/third_party/ffmpeg/chromium/config/Chromium/android/ia32/libavutil/ffversion.h +++ b/src/third_party/ffmpeg/chromium/config/Chromium/android/ia32/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/src/third_party/ffmpeg/chromium/config/Chromium/android/x64/config.asm b/src/third_party/ffmpeg/chromium/config/Chromium/android/x64/config.asm index b811591a..1fa00fd2 100644 --- a/src/third_party/ffmpeg/chromium/config/Chromium/android/x64/config.asm +++ b/src/third_party/ffmpeg/chromium/config/Chromium/android/x64/config.asm @@ -329,6 +329,7 @@ %define HAVE_BCRYPT 0 %define HAVE_VAAPI_DRM 0 %define HAVE_VAAPI_X11 0 +%define HAVE_VAAPI_WIN32 0 %define HAVE_VDPAU_X11 0 %define HAVE_PTHREADS 1 %define HAVE_OS2THREADS 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chromium/android/x64/config.h b/src/third_party/ffmpeg/chromium/config/Chromium/android/x64/config.h index 0d90febd..29332059 100644 --- a/src/third_party/ffmpeg/chromium/config/Chromium/android/x64/config.h +++ b/src/third_party/ffmpeg/chromium/config/Chromium/android/x64/config.h @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chromium/android/x64/config_components.h b/src/third_party/ffmpeg/chromium/config/Chromium/android/x64/config_components.h index 012c89d9..46a1c423 100644 --- a/src/third_party/ffmpeg/chromium/config/Chromium/android/x64/config_components.h +++ b/src/third_party/ffmpeg/chromium/config/Chromium/android/x64/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chromium/android/x64/libavutil/ffversion.h b/src/third_party/ffmpeg/chromium/config/Chromium/android/x64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/src/third_party/ffmpeg/chromium/config/Chromium/android/x64/libavutil/ffversion.h +++ b/src/third_party/ffmpeg/chromium/config/Chromium/android/x64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/src/third_party/ffmpeg/chromium/config/Chromium/ios/arm64/config.h b/src/third_party/ffmpeg/chromium/config/Chromium/ios/arm64/config.h index c7cc4537..55203e0f 100644 --- a/src/third_party/ffmpeg/chromium/config/Chromium/ios/arm64/config.h +++ b/src/third_party/ffmpeg/chromium/config/Chromium/ios/arm64/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME darwin #define av_restrict restrict #define EXTERN_PREFIX "_" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chromium/ios/arm64/config_components.h b/src/third_party/ffmpeg/chromium/config/Chromium/ios/arm64/config_components.h index 90533701..6f3ae35a 100644 --- a/src/third_party/ffmpeg/chromium/config/Chromium/ios/arm64/config_components.h +++ b/src/third_party/ffmpeg/chromium/config/Chromium/ios/arm64/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chromium/ios/arm64/libavutil/ffversion.h b/src/third_party/ffmpeg/chromium/config/Chromium/ios/arm64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/src/third_party/ffmpeg/chromium/config/Chromium/ios/arm64/libavutil/ffversion.h +++ b/src/third_party/ffmpeg/chromium/config/Chromium/ios/arm64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/src/third_party/ffmpeg/chromium/config/Chromium/ios/x64/config.asm b/src/third_party/ffmpeg/chromium/config/Chromium/ios/x64/config.asm index 36e5a1e6..a8832e99 100644 --- a/src/third_party/ffmpeg/chromium/config/Chromium/ios/x64/config.asm +++ b/src/third_party/ffmpeg/chromium/config/Chromium/ios/x64/config.asm @@ -329,6 +329,7 @@ %define HAVE_BCRYPT 0 %define HAVE_VAAPI_DRM 0 %define HAVE_VAAPI_X11 0 +%define HAVE_VAAPI_WIN32 0 %define HAVE_VDPAU_X11 0 %define HAVE_PTHREADS 1 %define HAVE_OS2THREADS 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chromium/ios/x64/config.h b/src/third_party/ffmpeg/chromium/config/Chromium/ios/x64/config.h index 5db229d8..ac8416b0 100644 --- a/src/third_party/ffmpeg/chromium/config/Chromium/ios/x64/config.h +++ b/src/third_party/ffmpeg/chromium/config/Chromium/ios/x64/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME darwin #define av_restrict restrict #define EXTERN_PREFIX "_" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chromium/ios/x64/config_components.h b/src/third_party/ffmpeg/chromium/config/Chromium/ios/x64/config_components.h index d85ee4cc..18d38c48 100644 --- a/src/third_party/ffmpeg/chromium/config/Chromium/ios/x64/config_components.h +++ b/src/third_party/ffmpeg/chromium/config/Chromium/ios/x64/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chromium/ios/x64/libavutil/ffversion.h b/src/third_party/ffmpeg/chromium/config/Chromium/ios/x64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/src/third_party/ffmpeg/chromium/config/Chromium/ios/x64/libavutil/ffversion.h +++ b/src/third_party/ffmpeg/chromium/config/Chromium/ios/x64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/src/third_party/ffmpeg/chromium/config/Chromium/linux-noasm/x64/config.h b/src/third_party/ffmpeg/chromium/config/Chromium/linux-noasm/x64/config.h index 64a29625..508898c8 100644 --- a/src/third_party/ffmpeg/chromium/config/Chromium/linux-noasm/x64/config.h +++ b/src/third_party/ffmpeg/chromium/config/Chromium/linux-noasm/x64/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME linux #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chromium/linux-noasm/x64/config_components.h b/src/third_party/ffmpeg/chromium/config/Chromium/linux-noasm/x64/config_components.h index 90533701..6f3ae35a 100644 --- a/src/third_party/ffmpeg/chromium/config/Chromium/linux-noasm/x64/config_components.h +++ b/src/third_party/ffmpeg/chromium/config/Chromium/linux-noasm/x64/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chromium/linux-noasm/x64/libavutil/ffversion.h b/src/third_party/ffmpeg/chromium/config/Chromium/linux-noasm/x64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/src/third_party/ffmpeg/chromium/config/Chromium/linux-noasm/x64/libavutil/ffversion.h +++ b/src/third_party/ffmpeg/chromium/config/Chromium/linux-noasm/x64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/src/third_party/ffmpeg/chromium/config/Chromium/linux/arm-neon/config.h b/src/third_party/ffmpeg/chromium/config/Chromium/linux/arm-neon/config.h index bb0f9b68..38e66b4b 100644 --- a/src/third_party/ffmpeg/chromium/config/Chromium/linux/arm-neon/config.h +++ b/src/third_party/ffmpeg/chromium/config/Chromium/linux/arm-neon/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME linux #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chromium/linux/arm-neon/config_components.h b/src/third_party/ffmpeg/chromium/config/Chromium/linux/arm-neon/config_components.h index 90533701..6f3ae35a 100644 --- a/src/third_party/ffmpeg/chromium/config/Chromium/linux/arm-neon/config_components.h +++ b/src/third_party/ffmpeg/chromium/config/Chromium/linux/arm-neon/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chromium/linux/arm-neon/libavutil/ffversion.h b/src/third_party/ffmpeg/chromium/config/Chromium/linux/arm-neon/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/src/third_party/ffmpeg/chromium/config/Chromium/linux/arm-neon/libavutil/ffversion.h +++ b/src/third_party/ffmpeg/chromium/config/Chromium/linux/arm-neon/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/src/third_party/ffmpeg/chromium/config/Chromium/linux/arm/config.h b/src/third_party/ffmpeg/chromium/config/Chromium/linux/arm/config.h index 7fe09eb0..53902563 100644 --- a/src/third_party/ffmpeg/chromium/config/Chromium/linux/arm/config.h +++ b/src/third_party/ffmpeg/chromium/config/Chromium/linux/arm/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME linux #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chromium/linux/arm/config_components.h b/src/third_party/ffmpeg/chromium/config/Chromium/linux/arm/config_components.h index 90533701..6f3ae35a 100644 --- a/src/third_party/ffmpeg/chromium/config/Chromium/linux/arm/config_components.h +++ b/src/third_party/ffmpeg/chromium/config/Chromium/linux/arm/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chromium/linux/arm/libavutil/ffversion.h b/src/third_party/ffmpeg/chromium/config/Chromium/linux/arm/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/src/third_party/ffmpeg/chromium/config/Chromium/linux/arm/libavutil/ffversion.h +++ b/src/third_party/ffmpeg/chromium/config/Chromium/linux/arm/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/src/third_party/ffmpeg/chromium/config/Chromium/linux/arm64/config.h b/src/third_party/ffmpeg/chromium/config/Chromium/linux/arm64/config.h index 2883146f..dae4f17a 100644 --- a/src/third_party/ffmpeg/chromium/config/Chromium/linux/arm64/config.h +++ b/src/third_party/ffmpeg/chromium/config/Chromium/linux/arm64/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME linux #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chromium/linux/arm64/config_components.h b/src/third_party/ffmpeg/chromium/config/Chromium/linux/arm64/config_components.h index 90533701..6f3ae35a 100644 --- a/src/third_party/ffmpeg/chromium/config/Chromium/linux/arm64/config_components.h +++ b/src/third_party/ffmpeg/chromium/config/Chromium/linux/arm64/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chromium/linux/arm64/libavutil/ffversion.h b/src/third_party/ffmpeg/chromium/config/Chromium/linux/arm64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/src/third_party/ffmpeg/chromium/config/Chromium/linux/arm64/libavutil/ffversion.h +++ b/src/third_party/ffmpeg/chromium/config/Chromium/linux/arm64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/src/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/config.asm b/src/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/config.asm index 038ff00b..0ad6241d 100644 --- a/src/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/config.asm +++ b/src/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/config.asm @@ -329,6 +329,7 @@ %define HAVE_BCRYPT 0 %define HAVE_VAAPI_DRM 0 %define HAVE_VAAPI_X11 0 +%define HAVE_VAAPI_WIN32 0 %define HAVE_VDPAU_X11 0 %define HAVE_PTHREADS 1 %define HAVE_OS2THREADS 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/config.h b/src/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/config.h index 81193551..36ea4c75 100644 --- a/src/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/config.h +++ b/src/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME linux #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/config_components.h b/src/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/config_components.h index 90533701..6f3ae35a 100644 --- a/src/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/config_components.h +++ b/src/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/libavutil/ffversion.h b/src/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/src/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/libavutil/ffversion.h +++ b/src/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/src/third_party/ffmpeg/chromium/config/Chromium/linux/x64/config.asm b/src/third_party/ffmpeg/chromium/config/Chromium/linux/x64/config.asm index bcb04508..87ed69fc 100644 --- a/src/third_party/ffmpeg/chromium/config/Chromium/linux/x64/config.asm +++ b/src/third_party/ffmpeg/chromium/config/Chromium/linux/x64/config.asm @@ -329,6 +329,7 @@ %define HAVE_BCRYPT 0 %define HAVE_VAAPI_DRM 0 %define HAVE_VAAPI_X11 0 +%define HAVE_VAAPI_WIN32 0 %define HAVE_VDPAU_X11 0 %define HAVE_PTHREADS 1 %define HAVE_OS2THREADS 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chromium/linux/x64/config.h b/src/third_party/ffmpeg/chromium/config/Chromium/linux/x64/config.h index c3f700a3..183bc7f7 100644 --- a/src/third_party/ffmpeg/chromium/config/Chromium/linux/x64/config.h +++ b/src/third_party/ffmpeg/chromium/config/Chromium/linux/x64/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME linux #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chromium/linux/x64/config_components.h b/src/third_party/ffmpeg/chromium/config/Chromium/linux/x64/config_components.h index 90533701..6f3ae35a 100644 --- a/src/third_party/ffmpeg/chromium/config/Chromium/linux/x64/config_components.h +++ b/src/third_party/ffmpeg/chromium/config/Chromium/linux/x64/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chromium/linux/x64/libavutil/ffversion.h b/src/third_party/ffmpeg/chromium/config/Chromium/linux/x64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/src/third_party/ffmpeg/chromium/config/Chromium/linux/x64/libavutil/ffversion.h +++ b/src/third_party/ffmpeg/chromium/config/Chromium/linux/x64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/src/third_party/ffmpeg/chromium/config/Chromium/mac/arm64/config.h b/src/third_party/ffmpeg/chromium/config/Chromium/mac/arm64/config.h index c7cc4537..55203e0f 100644 --- a/src/third_party/ffmpeg/chromium/config/Chromium/mac/arm64/config.h +++ b/src/third_party/ffmpeg/chromium/config/Chromium/mac/arm64/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME darwin #define av_restrict restrict #define EXTERN_PREFIX "_" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chromium/mac/arm64/config_components.h b/src/third_party/ffmpeg/chromium/config/Chromium/mac/arm64/config_components.h index 90533701..6f3ae35a 100644 --- a/src/third_party/ffmpeg/chromium/config/Chromium/mac/arm64/config_components.h +++ b/src/third_party/ffmpeg/chromium/config/Chromium/mac/arm64/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chromium/mac/arm64/libavutil/ffversion.h b/src/third_party/ffmpeg/chromium/config/Chromium/mac/arm64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/src/third_party/ffmpeg/chromium/config/Chromium/mac/arm64/libavutil/ffversion.h +++ b/src/third_party/ffmpeg/chromium/config/Chromium/mac/arm64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/src/third_party/ffmpeg/chromium/config/Chromium/mac/x64/config.asm b/src/third_party/ffmpeg/chromium/config/Chromium/mac/x64/config.asm index f4b4466e..9276b180 100644 --- a/src/third_party/ffmpeg/chromium/config/Chromium/mac/x64/config.asm +++ b/src/third_party/ffmpeg/chromium/config/Chromium/mac/x64/config.asm @@ -329,6 +329,7 @@ %define HAVE_BCRYPT 0 %define HAVE_VAAPI_DRM 0 %define HAVE_VAAPI_X11 0 +%define HAVE_VAAPI_WIN32 0 %define HAVE_VDPAU_X11 0 %define HAVE_PTHREADS 1 %define HAVE_OS2THREADS 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chromium/mac/x64/config.h b/src/third_party/ffmpeg/chromium/config/Chromium/mac/x64/config.h index 772619b7..e0c55bf0 100644 --- a/src/third_party/ffmpeg/chromium/config/Chromium/mac/x64/config.h +++ b/src/third_party/ffmpeg/chromium/config/Chromium/mac/x64/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME darwin #define av_restrict restrict #define EXTERN_PREFIX "_" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 1 #define HAVE_OS2THREADS 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chromium/mac/x64/config_components.h b/src/third_party/ffmpeg/chromium/config/Chromium/mac/x64/config_components.h index 90533701..6f3ae35a 100644 --- a/src/third_party/ffmpeg/chromium/config/Chromium/mac/x64/config_components.h +++ b/src/third_party/ffmpeg/chromium/config/Chromium/mac/x64/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chromium/mac/x64/libavutil/ffversion.h b/src/third_party/ffmpeg/chromium/config/Chromium/mac/x64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/src/third_party/ffmpeg/chromium/config/Chromium/mac/x64/libavutil/ffversion.h +++ b/src/third_party/ffmpeg/chromium/config/Chromium/mac/x64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/src/third_party/ffmpeg/chromium/config/Chromium/win/arm64/config.h b/src/third_party/ffmpeg/chromium/config/Chromium/win/arm64/config.h index 06a3a485..0fc3ad3f 100644 --- a/src/third_party/ffmpeg/chromium/config/Chromium/win/arm64/config.h +++ b/src/third_party/ffmpeg/chromium/config/Chromium/win/arm64/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME win32 #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 0 #define HAVE_OS2THREADS 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chromium/win/arm64/config_components.h b/src/third_party/ffmpeg/chromium/config/Chromium/win/arm64/config_components.h index 90533701..6f3ae35a 100644 --- a/src/third_party/ffmpeg/chromium/config/Chromium/win/arm64/config_components.h +++ b/src/third_party/ffmpeg/chromium/config/Chromium/win/arm64/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chromium/win/arm64/libavutil/ffversion.h b/src/third_party/ffmpeg/chromium/config/Chromium/win/arm64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/src/third_party/ffmpeg/chromium/config/Chromium/win/arm64/libavutil/ffversion.h +++ b/src/third_party/ffmpeg/chromium/config/Chromium/win/arm64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/src/third_party/ffmpeg/chromium/config/Chromium/win/ia32/config.asm b/src/third_party/ffmpeg/chromium/config/Chromium/win/ia32/config.asm index bf0b069b..2fdb72be 100644 --- a/src/third_party/ffmpeg/chromium/config/Chromium/win/ia32/config.asm +++ b/src/third_party/ffmpeg/chromium/config/Chromium/win/ia32/config.asm @@ -329,6 +329,7 @@ %define HAVE_BCRYPT 0 %define HAVE_VAAPI_DRM 0 %define HAVE_VAAPI_X11 0 +%define HAVE_VAAPI_WIN32 0 %define HAVE_VDPAU_X11 0 %define HAVE_PTHREADS 0 %define HAVE_OS2THREADS 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chromium/win/ia32/config.h b/src/third_party/ffmpeg/chromium/config/Chromium/win/ia32/config.h index c83c01e8..26bf57b3 100644 --- a/src/third_party/ffmpeg/chromium/config/Chromium/win/ia32/config.h +++ b/src/third_party/ffmpeg/chromium/config/Chromium/win/ia32/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME win32 #define av_restrict restrict #define EXTERN_PREFIX "_" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 0 #define HAVE_OS2THREADS 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chromium/win/ia32/config_components.h b/src/third_party/ffmpeg/chromium/config/Chromium/win/ia32/config_components.h index 90533701..6f3ae35a 100644 --- a/src/third_party/ffmpeg/chromium/config/Chromium/win/ia32/config_components.h +++ b/src/third_party/ffmpeg/chromium/config/Chromium/win/ia32/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chromium/win/ia32/libavutil/ffversion.h b/src/third_party/ffmpeg/chromium/config/Chromium/win/ia32/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/src/third_party/ffmpeg/chromium/config/Chromium/win/ia32/libavutil/ffversion.h +++ b/src/third_party/ffmpeg/chromium/config/Chromium/win/ia32/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/src/third_party/ffmpeg/chromium/config/Chromium/win/x64/config.asm b/src/third_party/ffmpeg/chromium/config/Chromium/win/x64/config.asm index a8264dd3..11ea6353 100644 --- a/src/third_party/ffmpeg/chromium/config/Chromium/win/x64/config.asm +++ b/src/third_party/ffmpeg/chromium/config/Chromium/win/x64/config.asm @@ -329,6 +329,7 @@ %define HAVE_BCRYPT 0 %define HAVE_VAAPI_DRM 0 %define HAVE_VAAPI_X11 0 +%define HAVE_VAAPI_WIN32 0 %define HAVE_VDPAU_X11 0 %define HAVE_PTHREADS 0 %define HAVE_OS2THREADS 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chromium/win/x64/config.h b/src/third_party/ffmpeg/chromium/config/Chromium/win/x64/config.h index bd879c84..75f478ac 100644 --- a/src/third_party/ffmpeg/chromium/config/Chromium/win/x64/config.h +++ b/src/third_party/ffmpeg/chromium/config/Chromium/win/x64/config.h @@ -6,7 +6,7 @@ #define CONFIG_THIS_YEAR 2023 #define FFMPEG_DATADIR "/usr/local/share/ffmpeg" #define AVCONV_DATADIR "/usr/local/share/ffmpeg" -#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 547e3456660000a16fc5c2a2f819f1a2b5d35b5d)" +#define CC_IDENT "clang version 17.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 3da83fbafef1689de1fc45c2c3fa3d258edda09d)" #define OS_NAME win64 #define av_restrict restrict #define EXTERN_PREFIX "" @@ -345,6 +345,7 @@ #define HAVE_BCRYPT 0 #define HAVE_VAAPI_DRM 0 #define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WIN32 0 #define HAVE_VDPAU_X11 0 #define HAVE_PTHREADS 0 #define HAVE_OS2THREADS 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chromium/win/x64/config_components.h b/src/third_party/ffmpeg/chromium/config/Chromium/win/x64/config_components.h index 90533701..6f3ae35a 100644 --- a/src/third_party/ffmpeg/chromium/config/Chromium/win/x64/config_components.h +++ b/src/third_party/ffmpeg/chromium/config/Chromium/win/x64/config_components.h @@ -210,6 +210,7 @@ #define CONFIG_PAM_DECODER 0 #define CONFIG_PBM_DECODER 0 #define CONFIG_PCX_DECODER 0 +#define CONFIG_PDV_DECODER 0 #define CONFIG_PFM_DECODER 0 #define CONFIG_PGM_DECODER 0 #define CONFIG_PGMYUV_DECODER 0 @@ -583,7 +584,6 @@ #define CONFIG_LIBJXL_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -#define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBOPUS_DECODER 1 #define CONFIG_LIBRSVG_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 @@ -834,6 +834,7 @@ #define CONFIG_AAC_MF_ENCODER 0 #define CONFIG_AC3_MF_ENCODER 0 #define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_AV1_MEDIACODEC_ENCODER 0 #define CONFIG_AV1_NVENC_ENCODER 0 #define CONFIG_AV1_QSV_ENCODER 0 #define CONFIG_AV1_AMF_ENCODER 0 @@ -860,11 +861,14 @@ #define CONFIG_MP3_MF_ENCODER 0 #define CONFIG_MPEG2_QSV_ENCODER 0 #define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_MEDIACODEC_ENCODER 0 #define CONFIG_MPEG4_OMX_ENCODER 0 #define CONFIG_MPEG4_V4L2M2M_ENCODER 0 #define CONFIG_PRORES_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_VP8_MEDIACODEC_ENCODER 0 #define CONFIG_VP8_V4L2M2M_ENCODER 0 #define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_MEDIACODEC_ENCODER 0 #define CONFIG_VP9_VAAPI_ENCODER 0 #define CONFIG_VP9_QSV_ENCODER 0 #define CONFIG_VNULL_ENCODER 0 @@ -1074,6 +1078,7 @@ #define CONFIG_AREALTIME_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_AREVERSE_FILTER 0 +#define CONFIG_ARLS_FILTER 0 #define CONFIG_ARNNDN_FILTER 0 #define CONFIG_ASDR_FILTER 0 #define CONFIG_ASEGMENT_FILTER 0 @@ -1158,6 +1163,7 @@ #define CONFIG_VOLUMEDETECT_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AFDELAYSRC_FILTER 0 +#define CONFIG_AFIREQSRC_FILTER 0 #define CONFIG_AFIRSRC_FILTER 0 #define CONFIG_ANOISESRC_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 @@ -1192,6 +1198,7 @@ #define CONFIG_BOXBLUR_OPENCL_FILTER 0 #define CONFIG_BWDIF_FILTER 0 #define CONFIG_CAS_FILTER 0 +#define CONFIG_CCREPACK_FILTER 0 #define CONFIG_CHROMABER_VULKAN_FILTER 0 #define CONFIG_CHROMAHOLD_FILTER 0 #define CONFIG_CHROMAKEY_FILTER 0 @@ -1550,6 +1557,7 @@ #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_TESTSRC2_FILTER 0 #define CONFIG_YUVTESTSRC_FILTER 0 +#define CONFIG_ZONEPLATE_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_A3DSCOPE_FILTER 0 #define CONFIG_ABITSCOPE_FILTER 0 @@ -1786,6 +1794,7 @@ #define CONFIG_PCM_U16BE_DEMUXER 0 #define CONFIG_PCM_U16LE_DEMUXER 0 #define CONFIG_PCM_U8_DEMUXER 0 +#define CONFIG_PDV_DEMUXER 0 #define CONFIG_PJS_DEMUXER 0 #define CONFIG_PMP_DEMUXER 0 #define CONFIG_PP_BNK_DEMUXER 0 diff --git a/src/third_party/ffmpeg/chromium/config/Chromium/win/x64/libavutil/ffversion.h b/src/third_party/ffmpeg/chromium/config/Chromium/win/x64/libavutil/ffversion.h index 05f561cf..3809dbec 100644 --- a/src/third_party/ffmpeg/chromium/config/Chromium/win/x64/libavutil/ffversion.h +++ b/src/third_party/ffmpeg/chromium/config/Chromium/win/x64/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-111306-g9e7dadfec5" +#define FFMPEG_VERSION "N-111945-gb3e037cf6f" #endif /* AVUTIL_FFVERSION_H */ diff --git a/src/third_party/ffmpeg/chromium/patches/README b/src/third_party/ffmpeg/chromium/patches/README index 11fa345f..b5675cfe 100644 --- a/src/third_party/ffmpeg/chromium/patches/README +++ b/src/third_party/ffmpeg/chromium/patches/README @@ -953,3 +953,18 @@ Affects: libavcodec/libx264.c libavutil/frame.h +------------------------------------------------------------------ +commit 13156c083ffe746a0f5908778c6fc6d165217af0 +Author: Frank Liberato +Date: Wed May 24 05:24:25 2023 +0000 + + Replace #include "" with #include <> + + generate_gn.py assumes that "includes" can be found in the current + directory, while can be ignored. Rather than try to + teach it how to search include paths, change the one instance in + ffmpeg of "stdint.h" to . + +Affects: + libavcodec/vp8data.c + diff --git a/src/third_party/ffmpeg/chromium/patches/config_flag_changes.txt b/src/third_party/ffmpeg/chromium/patches/config_flag_changes.txt index 94ab5cf9..db1c38b5 100644 --- a/src/third_party/ffmpeg/chromium/patches/config_flag_changes.txt +++ b/src/third_party/ffmpeg/chromium/patches/config_flag_changes.txt @@ -1,33 +1,12 @@ -+ CONFIG_AVIO_HTTP_SERVE_FILES_EXAMPLE 1 -+ CONFIG_AVIO_READ_CALLBACK_EXAMPLE 1 -+ CONFIG_DECODE_FILTER_AUDIO_EXAMPLE 0 -+ CONFIG_DECODE_FILTER_VIDEO_EXAMPLE 0 -+ CONFIG_DEMUX_DECODE_EXAMPLE 1 -+ CONFIG_HSTACK_QSV_FILTER 0 -+ CONFIG_LIBARIBCAPTION 0 -+ CONFIG_LIBARIBCAPTION_DECODER 0 -+ CONFIG_MUX_EXAMPLE 0 -+ CONFIG_QSV_DECODE_EXAMPLE 0 -+ CONFIG_REMUX_EXAMPLE 1 -+ CONFIG_RESAMPLE_AUDIO_EXAMPLE 0 -+ CONFIG_RKA_DECODER 0 -+ CONFIG_RKA_DEMUXER 0 -+ CONFIG_SCALE_VIDEO_EXAMPLE 0 -+ CONFIG_SDNS_DEMUXER 0 -+ CONFIG_SHOW_METADATA_EXAMPLE 1 -+ CONFIG_TRANSCODE_EXAMPLE 0 -+ CONFIG_VSTACK_QSV_FILTER 0 -+ CONFIG_XSTACK_QSV_FILTER 0 -- CONFIG_AVIO_READING_EXAMPLE 1 -- CONFIG_DEMUXING_DECODING_EXAMPLE 1 -- CONFIG_FILTERING_AUDIO_EXAMPLE 0 -- CONFIG_FILTERING_VIDEO_EXAMPLE 0 -- CONFIG_HTTP_MULTICLIENT_EXAMPLE 0 -- CONFIG_HTTP_MULTICLIENT_EXAMPLE 1 -- CONFIG_METADATA_EXAMPLE 1 -- CONFIG_MUXING_EXAMPLE 0 -- CONFIG_QSVDEC_EXAMPLE 0 -- CONFIG_REMUXING_EXAMPLE 1 -- CONFIG_RESAMPLING_AUDIO_EXAMPLE 0 -- CONFIG_SCALING_VIDEO_EXAMPLE 0 -- CONFIG_TRANSCODING_EXAMPLE 0 ++ CONFIG_AFIREQSRC_FILTER 0 ++ CONFIG_ARLS_FILTER 0 ++ CONFIG_AV1_MEDIACODEC_ENCODER 0 ++ CONFIG_CCREPACK_FILTER 0 ++ CONFIG_MPEG4_MEDIACODEC_ENCODER 0 ++ CONFIG_PDV_DECODER 0 ++ CONFIG_PDV_DEMUXER 0 ++ CONFIG_VP8_MEDIACODEC_ENCODER 0 ++ CONFIG_VP9_MEDIACODEC_ENCODER 0 ++ CONFIG_ZONEPLATE_FILTER 0 ++ HAVE_VAAPI_WIN32 0 +- CONFIG_LIBOPENJPEG_DECODER 0 diff --git a/src/third_party/ffmpeg/chromium/scripts/build_ffmpeg.py b/src/third_party/ffmpeg/chromium/scripts/build_ffmpeg.py index f8a6cb27..62841cdf 100755 --- a/src/third_party/ffmpeg/chromium/scripts/build_ffmpeg.py +++ b/src/third_party/ffmpeg/chromium/scripts/build_ffmpeg.py @@ -731,10 +731,6 @@ def ConfigureAndBuild(target_arch, target_os, host_os, host_arch, parallel_jobs, configure_flags['Common'].extend([ # --optflags doesn't append multiple entries, so set all at once. '--optflags="-O3"', - '--extra-cflags=-mavx', - '--extra-cflags=-maes', - '--extra-cflags=-mpclmul', - '--extra-cflags=-O3', '--enable-decoder=theora,vp8', '--enable-parser=vp3,vp8', ]) @@ -748,10 +744,6 @@ def ConfigureAndBuild(target_arch, target_os, host_os, host_arch, parallel_jobs, else: configure_flags['Common'].extend([ '--enable-lto', - '--extra-cflags=-O3', - '--extra-cflags=-mavx', - '--extra-cflags=-maes', - '--extra-cflags=-mpclmul', '--arch=x86_64', '--target-os=linux', ]) diff --git a/src/third_party/ffmpeg/chromium/scripts/generate_gn.py b/src/third_party/ffmpeg/chromium/scripts/generate_gn.py index d36b0a22..c7869a7d 100755 --- a/src/third_party/ffmpeg/chromium/scripts/generate_gn.py +++ b/src/third_party/ffmpeg/chromium/scripts/generate_gn.py @@ -700,11 +700,11 @@ LICENSE_EXCEPTIONS = [ # Regex to find lines matching #include "some_dir\some_file.h". # Also works for assembly files that use %include. -INCLUDE_REGEX = re.compile('[#%]\s*include\s+"([^"]+)"') +INCLUDE_REGEX = re.compile('^\s*[#%]\s*include\s+"([^"]+)"') # Regex to find whacky includes that we might be overlooking (e.g. using macros # or defines). -EXOTIC_INCLUDE_REGEX = re.compile('[#%]\s*include\s+[^"<\s].+') +EXOTIC_INCLUDE_REGEX = re.compile('^\s*[#%]\s*include\s+[^"<\s].+') # Prefix added to renamed files as part of RENAME_PREFIX = 'autorename' @@ -782,7 +782,7 @@ def GetIncludedSources(file_path, source_dir, include_set, scan_only=False): elif include_file_path in MUST_BE_MISSING_INCLUDE_FILES: continue else: - exit('Failed to find file ' + include_file_path) + exit('Failed to find file ' + include_file_path + " in " + file_path) # At this point we've found the file. Check if its in our ignore list which # means that the list should be updated to no longer mention this file. diff --git a/src/third_party/ffmpeg/ffmpeg_generated.gni b/src/third_party/ffmpeg/ffmpeg_generated.gni index 79746952..4f97a415 100644 --- a/src/third_party/ffmpeg/ffmpeg_generated.gni +++ b/src/third_party/ffmpeg/ffmpeg_generated.gni @@ -472,6 +472,41 @@ if ((is_android && current_cpu == "arm" && arm_use_neon) || (use_linux_config && ] } +if ((is_apple) || (is_win) || (use_linux_config)) { + ffmpeg_c_sources += [ + "libavcodec/autorename_libavcodec_videodsp.c", + "libavcodec/h264pred.c", + "libavcodec/hpeldsp.c", + "libavcodec/jpegquanttables.c", + "libavcodec/vp3.c", + "libavcodec/vp3_parser.c", + "libavcodec/vp3dsp.c", + "libavcodec/vp8.c", + "libavcodec/vp8_parser.c", + "libavcodec/vp8data.c", + "libavcodec/vp8dsp.c", + "libavcodec/vpx_rac.c", + "libavformat/avc.c", + "libavcodec/x86/ac3dsp_init.c", + "libavcodec/ac3dsp.c", + "libavcodec/fmtconvert.c", + "libavcodec/ac3tab.c", + "libavcodec/ac3dec_float.c", + "libavcodec/ac3.c", + "libavcodec/x86/fmtconvert_init.c", + "libavcodec/ac3dec_data.c", + "libavcodec/eac3dec.c", + "libavcodec/eac3_data.c", + "libavcodec/ac3dec_fixed.c", + "libavformat/ac3dec.c", + ] + ffmpeg_asm_sources += [ + "libavcodec/x86/ac3dsp.asm", + "libavcodec/x86/ac3dsp_downmix.asm", + "libavcodec/x86/fmtconvert.asm", + ] +} + if ((is_android && current_cpu == "x64") || (is_android && current_cpu == "x86") || (is_apple && current_cpu == "x64") || (is_win && current_cpu == "x64") || (is_win && current_cpu == "x86") || (use_linux_config && current_cpu == "x64") || (use_linux_config && current_cpu == "x86")) { ffmpeg_c_sources += [ "libavcodec/x86/autorename_libavcodec_x86_vorbisdsp_init.c", @@ -506,40 +541,6 @@ if ((is_android && current_cpu == "arm64") || (is_apple && current_cpu == "arm64 ] } -if ((is_apple) || (is_win) || (use_linux_config)) { - ffmpeg_c_sources += [ - "libavcodec/autorename_libavcodec_videodsp.c", - "libavcodec/h264pred.c", - "libavcodec/hpeldsp.c", - "libavcodec/jpegquanttables.c", - "libavcodec/vp3.c", - "libavcodec/vp3_parser.c", - "libavcodec/vp3dsp.c", - "libavcodec/vp8.c", - "libavcodec/vp8_parser.c", - "libavcodec/vp8dsp.c", - "libavcodec/vpx_rac.c", - "libavformat/avc.c", - "libavcodec/x86/ac3dsp_init.c", - "libavcodec/ac3dsp.c", - "libavcodec/fmtconvert.c", - "libavcodec/ac3tab.c", - "libavcodec/ac3dec_float.c", - "libavcodec/ac3.c", - "libavcodec/x86/fmtconvert_init.c", - "libavcodec/ac3dec_data.c", - "libavcodec/eac3dec.c", - "libavcodec/eac3_data.c", - "libavcodec/ac3dec_fixed.c", - "libavformat/ac3dec.c", - ] - ffmpeg_asm_sources += [ - "libavcodec/x86/ac3dsp.asm", - "libavcodec/x86/ac3dsp_downmix.asm", - "libavcodec/x86/fmtconvert.asm", - ] -} - if ((is_apple && current_cpu == "arm64") || (is_win && current_cpu == "arm64") || (use_linux_config && current_cpu == "arm64")) { ffmpeg_c_sources += [ "libavcodec/aarch64/h264pred_init.c", @@ -564,6 +565,7 @@ if ((is_apple && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (is_w ffmpeg_gas_sources += [ "libavcodec/aarch64/autorename_libavcodec_aarch64_hevcdsp_idct_neon.S", "libavcodec/aarch64/autorename_libavcodec_aarch64_hevcdsp_sao_neon.S", + "libavcodec/aarch64/hevcdsp_deblock_neon.S", "libavcodec/aarch64/hevcdsp_qpel_neon.S" ] diff --git a/src/third_party/ffmpeg/libavcodec/012v.c b/src/third_party/ffmpeg/libavcodec/012v.c index f0197cd8..fa5eb0f9 100644 --- a/src/third_party/ffmpeg/libavcodec/012v.c +++ b/src/third_party/ffmpeg/libavcodec/012v.c @@ -65,7 +65,7 @@ static int zero12v_decode_frame(AVCodecContext *avctx, AVFrame *pic, return ret; pic->pict_type = AV_PICTURE_TYPE_I; - pic->key_frame = 1; + pic->flags |= AV_FRAME_FLAG_KEY; line_end = avpkt->data + stride; for (line = 0; line < avctx->height; line++) { diff --git a/src/third_party/ffmpeg/libavcodec/4xm.c b/src/third_party/ffmpeg/libavcodec/4xm.c index fab3fb5b..411e50da 100644 --- a/src/third_party/ffmpeg/libavcodec/4xm.c +++ b/src/third_party/ffmpeg/libavcodec/4xm.c @@ -957,7 +957,10 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *picture, return AVERROR_INVALIDDATA; } - picture->key_frame = picture->pict_type == AV_PICTURE_TYPE_I; + if (picture->pict_type == AV_PICTURE_TYPE_I) + picture->flags |= AV_FRAME_FLAG_KEY; + else + picture->flags &= ~AV_FRAME_FLAG_KEY; av_image_copy_plane(picture->data[0], picture->linesize[0], (const uint8_t*)f->frame_buffer, avctx->width * 2, diff --git a/src/third_party/ffmpeg/libavcodec/8bps.c b/src/third_party/ffmpeg/libavcodec/8bps.c index 90d6c96f..af98f62f 100644 --- a/src/third_party/ffmpeg/libavcodec/8bps.c +++ b/src/third_party/ffmpeg/libavcodec/8bps.c @@ -47,8 +47,6 @@ typedef struct EightBpsContext { unsigned char planes; unsigned char planemap[4]; - - uint32_t pal[256]; } EightBpsContext; static int decode_frame(AVCodecContext *avctx, AVFrame *frame, @@ -123,9 +121,14 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, } if (avctx->bits_per_coded_sample <= 8) { - frame->palette_has_changed = ff_copy_palette(c->pal, avpkt, avctx); - - memcpy (frame->data[1], c->pal, AVPALETTE_SIZE); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS + frame->palette_has_changed = +#endif + ff_copy_palette(frame->data[1], avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_ENABLE_DEPRECATION_WARNINGS +#endif } *got_frame = 1; diff --git a/src/third_party/ffmpeg/libavcodec/Makefile b/src/third_party/ffmpeg/libavcodec/Makefile index 711d2690..9c382400 100644 --- a/src/third_party/ffmpeg/libavcodec/Makefile +++ b/src/third_party/ffmpeg/libavcodec/Makefile @@ -253,6 +253,7 @@ OBJS-$(CONFIG_AURA2_DECODER) += aura.o OBJS-$(CONFIG_AV1_DECODER) += av1dec.o OBJS-$(CONFIG_AV1_CUVID_DECODER) += cuviddec.o OBJS-$(CONFIG_AV1_MEDIACODEC_DECODER) += mediacodecdec.o +OBJS-$(CONFIG_AV1_MEDIACODEC_ENCODER) += mediacodecenc.o OBJS-$(CONFIG_AV1_NVENC_ENCODER) += nvenc_av1.o nvenc.o OBJS-$(CONFIG_AV1_QSV_ENCODER) += qsvenc_av1.o OBJS-$(CONFIG_AVRN_DECODER) += avrndec.o @@ -469,7 +470,7 @@ OBJS-$(CONFIG_JACOSUB_DECODER) += jacosubdec.o ass.o OBJS-$(CONFIG_JPEG2000_ENCODER) += j2kenc.o mqcenc.o mqc.o jpeg2000.o \ jpeg2000dwt.o OBJS-$(CONFIG_JPEG2000_DECODER) += jpeg2000dec.o jpeg2000.o jpeg2000dsp.o \ - jpeg2000dwt.o mqcdec.o mqc.o + jpeg2000dwt.o mqcdec.o mqc.o jpeg2000htdec.o OBJS-$(CONFIG_JPEGLS_DECODER) += jpeglsdec.o jpegls.o OBJS-$(CONFIG_JPEGLS_ENCODER) += jpeglsenc.o jpegls.o OBJS-$(CONFIG_JV_DECODER) += jvdec.o @@ -542,6 +543,7 @@ OBJS-$(CONFIG_MPEG4_DECODER) += mpeg4videodsp.o xvididct.o OBJS-$(CONFIG_MPEG4_ENCODER) += mpeg4videoenc.o OBJS-$(CONFIG_MPEG4_CUVID_DECODER) += cuviddec.o OBJS-$(CONFIG_MPEG4_MEDIACODEC_DECODER) += mediacodecdec.o +OBJS-$(CONFIG_MPEG4_MEDIACODEC_ENCODER) += mediacodecenc.o OBJS-$(CONFIG_MPEG4_OMX_ENCODER) += omx.o OBJS-$(CONFIG_MPEG4_V4L2M2M_DECODER) += v4l2_m2m_dec.o OBJS-$(CONFIG_MPEG4_V4L2M2M_ENCODER) += v4l2_m2m_enc.o @@ -582,6 +584,7 @@ OBJS-$(CONFIG_PBM_DECODER) += pnmdec.o pnm.o OBJS-$(CONFIG_PBM_ENCODER) += pnmenc.o OBJS-$(CONFIG_PCX_DECODER) += pcx.o OBJS-$(CONFIG_PCX_ENCODER) += pcxenc.o +OBJS-$(CONFIG_PDV_DECODER) += pdvdec.o OBJS-$(CONFIG_PFM_DECODER) += pnmdec.o pnm.o OBJS-$(CONFIG_PFM_ENCODER) += pnmenc.o OBJS-$(CONFIG_PGM_DECODER) += pnmdec.o pnm.o @@ -760,10 +763,11 @@ OBJS-$(CONFIG_VP3_DECODER) += vp3.o jpegquanttables.o OBJS-$(CONFIG_VP5_DECODER) += vp5.o vp56.o vp56data.o vpx_rac.o OBJS-$(CONFIG_VP6_DECODER) += vp6.o vp56.o vp56data.o \ vp6dsp.o vpx_rac.o -OBJS-$(CONFIG_VP7_DECODER) += vp8.o vpx_rac.o -OBJS-$(CONFIG_VP8_DECODER) += vp8.o vpx_rac.o +OBJS-$(CONFIG_VP7_DECODER) += vp8.o vp8data.o vpx_rac.o +OBJS-$(CONFIG_VP8_DECODER) += vp8.o vp8data.o vpx_rac.o OBJS-$(CONFIG_VP8_CUVID_DECODER) += cuviddec.o OBJS-$(CONFIG_VP8_MEDIACODEC_DECODER) += mediacodecdec.o +OBJS-$(CONFIG_VP8_MEDIACODEC_ENCODER) += mediacodecenc.o OBJS-$(CONFIG_VP8_QSV_DECODER) += qsvdec.o OBJS-$(CONFIG_VP8_RKMPP_DECODER) += rkmppdec.o OBJS-$(CONFIG_VP8_VAAPI_ENCODER) += vaapi_encode_vp8.o @@ -774,6 +778,7 @@ OBJS-$(CONFIG_VP9_DECODER) += vp9.o vp9data.o vp9dsp.o vp9lpf.o vp9r vp9dsp_8bpp.o vp9dsp_10bpp.o vp9dsp_12bpp.o OBJS-$(CONFIG_VP9_CUVID_DECODER) += cuviddec.o OBJS-$(CONFIG_VP9_MEDIACODEC_DECODER) += mediacodecdec.o +OBJS-$(CONFIG_VP9_MEDIACODEC_ENCODER) += mediacodecenc.o OBJS-$(CONFIG_VP9_RKMPP_DECODER) += rkmppdec.o OBJS-$(CONFIG_VP9_VAAPI_ENCODER) += vaapi_encode_vp9.o OBJS-$(CONFIG_VP9_QSV_ENCODER) += qsvenc_vp9.o @@ -1083,7 +1088,7 @@ OBJS-$(CONFIG_LIBARIBCAPTION_DECODER) += libaribcaption.o ass.o OBJS-$(CONFIG_LIBCELT_DECODER) += libcelt_dec.o OBJS-$(CONFIG_LIBCODEC2_DECODER) += libcodec2.o OBJS-$(CONFIG_LIBCODEC2_ENCODER) += libcodec2.o -OBJS-$(CONFIG_LIBDAV1D_DECODER) += libdav1d.o +OBJS-$(CONFIG_LIBDAV1D_DECODER) += libdav1d.o av1_parse.o OBJS-$(CONFIG_LIBDAVS2_DECODER) += libdavs2.o OBJS-$(CONFIG_LIBFDK_AAC_DECODER) += libfdk-aacdec.o OBJS-$(CONFIG_LIBFDK_AAC_ENCODER) += libfdk-aacenc.o @@ -1102,7 +1107,6 @@ OBJS-$(CONFIG_LIBOPENCORE_AMRNB_ENCODER) += libopencore-amr.o OBJS-$(CONFIG_LIBOPENCORE_AMRWB_DECODER) += libopencore-amr.o OBJS-$(CONFIG_LIBOPENH264_DECODER) += libopenh264dec.o libopenh264.o OBJS-$(CONFIG_LIBOPENH264_ENCODER) += libopenh264enc.o libopenh264.o -OBJS-$(CONFIG_LIBOPENJPEG_DECODER) += libopenjpegdec.o OBJS-$(CONFIG_LIBOPENJPEG_ENCODER) += libopenjpegenc.o OBJS-$(CONFIG_LIBOPUS_DECODER) += libopusdec.o libopus.o \ vorbis_data.o @@ -1141,7 +1145,7 @@ OBJS-$(CONFIG_AC3_PARSER) += aac_ac3_parser.o ac3tab.o \ ac3_channel_layout_tab.o OBJS-$(CONFIG_ADX_PARSER) += adx_parser.o OBJS-$(CONFIG_AMR_PARSER) += amr_parser.o -OBJS-$(CONFIG_AV1_PARSER) += av1_parser.o +OBJS-$(CONFIG_AV1_PARSER) += av1_parser.o av1_parse.o OBJS-$(CONFIG_AVS2_PARSER) += avs2.o avs2_parser.o OBJS-$(CONFIG_AVS3_PARSER) += avs3_parser.o OBJS-$(CONFIG_BMP_PARSER) += bmp_parser.o diff --git a/src/third_party/ffmpeg/libavcodec/aacpsy.c b/src/third_party/ffmpeg/libavcodec/aacpsy.c index 4c5ab2c9..933369e4 100644 --- a/src/third_party/ffmpeg/libavcodec/aacpsy.c +++ b/src/third_party/ffmpeg/libavcodec/aacpsy.c @@ -267,7 +267,7 @@ static av_cold void lame_window_init(AacPsyContext *ctx, AVCodecContext *avctx) AacPsyChannel *pch = &ctx->ch[i]; if (avctx->flags & AV_CODEC_FLAG_QSCALE) - pch->attack_threshold = psy_vbr_map[avctx->global_quality / FF_QP2LAMBDA].st_lrm; + pch->attack_threshold = psy_vbr_map[av_clip(avctx->global_quality / FF_QP2LAMBDA, 0, 10)].st_lrm; else pch->attack_threshold = lame_calc_attack_threshold(avctx->bit_rate / avctx->ch_layout.nb_channels / 1000); diff --git a/src/third_party/ffmpeg/libavcodec/aarch64/Makefile b/src/third_party/ffmpeg/libavcodec/aarch64/Makefile index 02fb51c3..21619164 100644 --- a/src/third_party/ffmpeg/libavcodec/aarch64/Makefile +++ b/src/third_party/ffmpeg/libavcodec/aarch64/Makefile @@ -65,7 +65,8 @@ NEON-OBJS-$(CONFIG_VP9_DECODER) += aarch64/vp9itxfm_16bpp_neon.o \ aarch64/vp9lpf_neon.o \ aarch64/vp9mc_16bpp_neon.o \ aarch64/vp9mc_neon.o -NEON-OBJS-$(CONFIG_HEVC_DECODER) += aarch64/hevcdsp_idct_neon.o \ +NEON-OBJS-$(CONFIG_HEVC_DECODER) += aarch64/hevcdsp_deblock_neon.o \ + aarch64/hevcdsp_idct_neon.o \ aarch64/hevcdsp_init_aarch64.o \ aarch64/hevcdsp_qpel_neon.o \ aarch64/hevcdsp_sao_neon.o diff --git a/src/third_party/ffmpeg/libavcodec/aarch64/hevcdsp_deblock_neon.S b/src/third_party/ffmpeg/libavcodec/aarch64/hevcdsp_deblock_neon.S new file mode 100644 index 00000000..8227f656 --- /dev/null +++ b/src/third_party/ffmpeg/libavcodec/aarch64/hevcdsp_deblock_neon.S @@ -0,0 +1,183 @@ +/* -*-arm64-*- + * vim: syntax=arm64asm + * + * Copyright (c) 2014 Seppo Tomperi + * Copyright (c) 2023 J. Dekker + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + + +#include "libavutil/aarch64/asm.S" +#include "neon.S" + +.macro hevc_loop_filter_chroma_start bitdepth + mov x4, x30 + ldr w14, [x2] + ldr w15, [x2, #4] +.if \bitdepth > 8 + lsl w14, w14, #(\bitdepth - 8) + lsl w15, w15, #(\bitdepth - 8) +.endif + adds w2, w14, w15 + b.eq 1f + dup v16.4h, w14 + dup v17.4h, w15 + trn1 v16.2d, v16.2d, v17.2d +.if \bitdepth > 8 + mvni v19.8h, #((0xff << (\bitdepth - 8)) & 0xff), lsl #8 + movi v18.8h, #0 +.endif + neg v17.8h, v16.8h +.endm + +.macro hevc_loop_filter_chroma_body bitdepth +.if \bitdepth <= 8 + uxtl v20.8h, v0.8b // p1 + uxtl v1.8h, v1.8b // p0 + uxtl v2.8h, v2.8b // q0 + uxtl v23.8h, v3.8b // q1 + va .req v20 + vb .req v23 +.else // required to specify both cases as we are unable to do: v0 .req v20 + va .req v0 + vb .req v3 +.endif + sub v5.8h, v2.8h, v1.8h // q0 - p0 + sub v6.8h, va.8h, vb.8h // p1 - q1 + shl v5.8h, v5.8h, #2 + add v5.8h, v6.8h, v5.8h + srshr v5.8h, v5.8h, #3 + clip v17.8h, v16.8h, v5.8h + sqadd v1.8h, v1.8h, v5.8h // p0 + delta + sqsub v2.8h, v2.8h, v5.8h // q0 - delta +.if \bitdepth <= 8 + sqxtun v1.8b, v1.8h + sqxtun v2.8b, v2.8h +.else + clip v18.8h, v19.8h, v1.8h, v2.8h +.endif +.unreq va +.unreq vb +.endm + +function hevc_loop_filter_chroma_body_8_neon, export=0 + hevc_loop_filter_chroma_body 8 + ret +endfunc + +function hevc_loop_filter_chroma_body_10_neon, export=0 +hevc_loop_filter_chroma_body_12_neon: + hevc_loop_filter_chroma_body 10 + ret +endfunc + +// void ff_hevc_h_loop_filter_chroma_8_neon(uint8_t *_pix, ptrdiff_t _stride, int *_tc, uint8_t *_no_p, uint8_t *_no_q); + +.macro hevc_h_loop_filter_chroma bitdepth +function ff_hevc_h_loop_filter_chroma_\bitdepth\()_neon, export=1 + hevc_loop_filter_chroma_start \bitdepth + sub x0, x0, x1, lsl #1 +.if \bitdepth > 8 + ld1 {v0.8h}, [x0], x1 + ld1 {v1.8h}, [x0], x1 + ld1 {v2.8h}, [x0], x1 + ld1 {v3.8h}, [x0] +.else + ld1 {v0.8b}, [x0], x1 + ld1 {v1.8b}, [x0], x1 + ld1 {v2.8b}, [x0], x1 + ld1 {v3.8b}, [x0] +.endif + sub x0, x0, x1, lsl #1 + bl hevc_loop_filter_chroma_body_\bitdepth\()_neon +.if \bitdepth > 8 + st1 {v1.8h}, [x0], x1 + st1 {v2.8h}, [x0] +.else + st1 {v1.8b}, [x0], x1 + st1 {v2.8b}, [x0] +.endif +1: ret x4 +endfunc +.endm + +.macro hevc_v_loop_filter_chroma bitdepth +function ff_hevc_v_loop_filter_chroma_\bitdepth\()_neon, export=1 + hevc_loop_filter_chroma_start \bitdepth +.if \bitdepth > 8 + sub x0, x0, #4 + add x3, x0, x1 + lsl x1, x1, #1 + ld1 {v0.d}[0], [x0], x1 + ld1 {v1.d}[0], [x3], x1 + ld1 {v2.d}[0], [x0], x1 + ld1 {v3.d}[0], [x3], x1 + ld1 {v0.d}[1], [x0], x1 + ld1 {v1.d}[1], [x3], x1 + ld1 {v2.d}[1], [x0], x1 + ld1 {v3.d}[1], [x3], x1 + transpose_4x8H v0, v1, v2, v3, v28, v29, v30, v31 +.else + sub x0, x0, #2 + add x3, x0, x1 + lsl x1, x1, #1 + ld1 {v0.s}[0], [x0], x1 + ld1 {v1.s}[0], [x3], x1 + ld1 {v2.s}[0], [x0], x1 + ld1 {v3.s}[0], [x3], x1 + ld1 {v0.s}[1], [x0], x1 + ld1 {v1.s}[1], [x3], x1 + ld1 {v2.s}[1], [x0], x1 + ld1 {v3.s}[1], [x3], x1 + transpose_4x8B v0, v1, v2, v3, v28, v29, v30, v31 +.endif + sub x0, x0, x1, lsl #2 + sub x3, x3, x1, lsl #2 + bl hevc_loop_filter_chroma_body_\bitdepth\()_neon +.if \bitdepth > 8 + transpose_4x8H v0, v1, v2, v3, v28, v29, v30, v31 + st1 {v0.d}[0], [x0], x1 + st1 {v1.d}[0], [x3], x1 + st1 {v2.d}[0], [x0], x1 + st1 {v3.d}[0], [x3], x1 + st1 {v0.d}[1], [x0], x1 + st1 {v1.d}[1], [x3], x1 + st1 {v2.d}[1], [x0], x1 + st1 {v3.d}[1], [x3] +.else + transpose_4x8B v0, v1, v2, v3, v28, v29, v30, v31 + st1 {v0.s}[0], [x0], x1 + st1 {v1.s}[0], [x3], x1 + st1 {v2.s}[0], [x0], x1 + st1 {v3.s}[0], [x3], x1 + st1 {v0.s}[1], [x0], x1 + st1 {v1.s}[1], [x3], x1 + st1 {v2.s}[1], [x0], x1 + st1 {v3.s}[1], [x3] +.endif +1: ret x4 +endfunc +.endm + +hevc_h_loop_filter_chroma 8 +hevc_h_loop_filter_chroma 10 +hevc_h_loop_filter_chroma 12 + +hevc_v_loop_filter_chroma 8 +hevc_v_loop_filter_chroma 10 +hevc_v_loop_filter_chroma 12 diff --git a/src/third_party/ffmpeg/libavcodec/aarch64/hevcdsp_idct_neon.S b/src/third_party/ffmpeg/libavcodec/aarch64/hevcdsp_idct_neon.S index 3e59dd20..b7f23386 100644 --- a/src/third_party/ffmpeg/libavcodec/aarch64/hevcdsp_idct_neon.S +++ b/src/third_party/ffmpeg/libavcodec/aarch64/hevcdsp_idct_neon.S @@ -6,6 +6,7 @@ * Ported from arm/hevcdsp_idct_neon.S by * Copyright (c) 2020 Reimar Döffinger * Copyright (c) 2023 J. Dekker + * Copyright (c) 2023 xu fulong <839789740@qq.com> * * This file is part of FFmpeg. * @@ -477,34 +478,52 @@ endfunc sqrshrn2 \out3\().8h, \in7, \shift .endm -.macro transpose16_4x4_2 r0, r1, r2, r3 +// use temp register to transpose, then we can reuse it +.macro transpose16_4x4_2 r0, r1, r2, r3, tmp0, tmp1, tmp2, tmp3, tmp4, tmp5 // lower halves - trn1 v2.4h, \r0\().4h, \r1\().4h - trn2 v3.4h, \r0\().4h, \r1\().4h - trn1 v4.4h, \r2\().4h, \r3\().4h - trn2 v5.4h, \r2\().4h, \r3\().4h - trn1 v6.2s, v2.2s, v4.2s - trn2 v7.2s, v2.2s, v4.2s - trn1 v2.2s, v3.2s, v5.2s - trn2 v4.2s, v3.2s, v5.2s - mov \r0\().d[0], v6.d[0] - mov \r2\().d[0], v7.d[0] - mov \r1\().d[0], v2.d[0] - mov \r3\().d[0], v4.d[0] + trn1 \tmp0\().4h, \r0\().4h, \r1\().4h + trn2 \tmp1\().4h, \r0\().4h, \r1\().4h + trn1 \tmp2\().4h, \r2\().4h, \r3\().4h + trn2 \tmp3\().4h, \r2\().4h, \r3\().4h + trn1 \tmp4\().2s, \tmp0\().2s, \tmp2\().2s + trn2 \tmp5\().2s, \tmp0\().2s, \tmp2\().2s + trn1 \tmp0\().2s, \tmp1\().2s, \tmp3\().2s + trn2 \tmp2\().2s, \tmp1\().2s, \tmp3\().2s + mov \r0\().d[0], \tmp4\().d[0] + mov \r2\().d[0], \tmp5\().d[0] + mov \r1\().d[0], \tmp0\().d[0] + mov \r3\().d[0], \tmp2\().d[0] // upper halves in reverse order - trn1 v2.8h, \r3\().8h, \r2\().8h - trn2 v3.8h, \r3\().8h, \r2\().8h - trn1 v4.8h, \r1\().8h, \r0\().8h - trn2 v5.8h, \r1\().8h, \r0\().8h - trn1 v6.4s, v2.4s, v4.4s - trn2 v7.4s, v2.4s, v4.4s - trn1 v2.4s, v3.4s, v5.4s - trn2 v4.4s, v3.4s, v5.4s - mov \r3\().d[1], v6.d[1] - mov \r1\().d[1], v7.d[1] - mov \r2\().d[1], v2.d[1] - mov \r0\().d[1], v4.d[1] + trn1 \tmp0\().8h, \r3\().8h, \r2\().8h + trn2 \tmp1\().8h, \r3\().8h, \r2\().8h + trn1 \tmp2\().8h, \r1\().8h, \r0\().8h + trn2 \tmp3\().8h, \r1\().8h, \r0\().8h + trn1 \tmp4\().4s, \tmp0\().4s, \tmp2\().4s + trn2 \tmp5\().4s, \tmp0\().4s, \tmp2\().4s + trn1 \tmp0\().4s, \tmp1\().4s, \tmp3\().4s + trn2 \tmp2\().4s, \tmp1\().4s, \tmp3\().4s + mov \r3\().d[1], \tmp4\().d[1] + mov \r1\().d[1], \tmp5\().d[1] + mov \r2\().d[1], \tmp0\().d[1] + mov \r0\().d[1], \tmp2\().d[1] +.endm + +// stores in0, in2, in4, in6 ascending from off1 and +// stores in1, in3, in5, in7 descending from off2 +.macro store_to_stack off1, off2, in0, in2, in4, in6, in7, in5, in3, in1 + add x1, sp, #\off1 + add x3, sp, #\off2 + mov x2, #-16 + mov x4, #16 + st1 {\in0}, [x1], x4 + st1 {\in1}, [x3], x2 + st1 {\in2}, [x1], x4 + st1 {\in3}, [x3], x2 + st1 {\in4}, [x1], x4 + st1 {\in5}, [x3], x2 + st1 {\in6}, [x1] + st1 {\in7}, [x3] .endm .macro tr_16x4 name, shift, offset, step @@ -543,27 +562,34 @@ function func_tr_16x4_\name add x4, sp, #\offset ld1 {v16.4s-v19.4s}, [x4], #64 - butterfly16 v16.4s, v21.4s, v17.4s, v22.4s, v18.4s, v23.4s, v19.4s, v24.4s + .if \shift > 0 scale v29, v30, v31, v24, v20.4s, v16.4s, v21.4s, v17.4s, v22.4s, v18.4s, v23.4s, v19.4s, \shift - transpose16_4x4_2 v29, v30, v31, v24 + transpose16_4x4_2 v29, v30, v31, v24, v2, v3, v4, v5, v6, v7 mov x1, x6 add x3, x6, #(24 +3*32) mov x2, #32 mov x4, #-32 store16 v29.d, v30.d, v31.d, v24.d, x4 + .else + store_to_stack \offset, (\offset + 240), v20.4s, v21.4s, v22.4s, v23.4s, v19.4s, v18.4s, v17.4s, v16.4s + .endif add x4, sp, #(\offset + 64) ld1 {v16.4s-v19.4s}, [x4] butterfly16 v16.4s, v25.4s, v17.4s, v26.4s, v18.4s, v27.4s, v19.4s, v28.4s + .if \shift > 0 scale v29, v30, v31, v20, v20.4s, v16.4s, v25.4s, v17.4s, v26.4s, v18.4s, v27.4s, v19.4s, \shift - transpose16_4x4_2 v29, v30, v31, v20 + transpose16_4x4_2 v29, v30, v31, v20, v2, v3, v4, v5, v6, v7 add x1, x6, #8 add x3, x6, #(16 + 3 * 32) mov x2, #32 mov x4, #-32 store16 v29.d, v30.d, v31.d, v20.d, x4 + .else + store_to_stack (\offset + 64), (\offset + 176), v20.4s, v25.4s, v26.4s, v27.4s, v19.4s, v18.4s, v17.4s, v16.4s + .endif ret endfunc @@ -596,6 +622,203 @@ function ff_hevc_idct_16x16_\bitdepth\()_neon, export=1 endfunc .endm +.macro load32 + add x1, x5, #64 + add x3, x1, #128 + mov x2, #256 + ld1 {v4.d}[0], [x1], x2 + ld1 {v4.d}[1], [x3], x2 + ld1 {v5.d}[0], [x1], x2 + ld1 {v5.d}[1], [x3], x2 + ld1 {v6.d}[0], [x1], x2 + ld1 {v6.d}[1], [x3], x2 + ld1 {v7.d}[0], [x1], x2 + ld1 {v7.d}[1], [x3], x2 + ld1 {v16.d}[0], [x1], x2 + ld1 {v16.d}[1], [x3], x2 + ld1 {v17.d}[0], [x1], x2 + ld1 {v17.d}[1], [x3], x2 + ld1 {v18.d}[0], [x1], x2 + ld1 {v18.d}[1], [x3], x2 + ld1 {v19.d}[0], [x1], x2 + ld1 {v19.d}[1], [x3], x2 +.endm + +.macro add_member32 in, t0, t1, t2, t3, op0, op1, op2, op3, p + sum_sub v24.4s, \in, \t0, \op0, \p + sum_sub v25.4s, \in, \t1, \op1, \p + sum_sub v26.4s, \in, \t2, \op2, \p + sum_sub v27.4s, \in, \t3, \op3, \p +.endm + +.macro butterfly32 in0, in1, in2, in3, out + add \out, \in0, \in1 + sub \in0, \in0, \in1 + add \in1, \in2, \in3 + sub \in2, \in2, \in3 +.endm + +.macro multiply in + smull v24.4s, v4.4h, \in\().h[0] + smull v25.4s, v4.4h, \in\().h[1] + smull v26.4s, v4.4h, \in\().h[2] + smull v27.4s, v4.4h, \in\().h[3] +.endm + +.macro scale_store shift + ld1 {v28.8h-v31.8h}, [x4], #64 + butterfly32 v28.4s, v24.4s, v29.4s, v25.4s, v2.4s + butterfly32 v30.4s, v26.4s, v31.4s, v27.4s, v3.4s + scale v20, v21, v22, v23, v2.4s, v28.4s, v24.4s, v29.4s, v3.4s, v30.4s, v26.4s, v31.4s, \shift + + transpose16_4x4_2 v20, v21, v22, v23, v24, v25, v26, v27, v28, v29 + store16 v20.d, v21.d, v22.d, v23.d, x8 + + // reload coefficients + ld1 {v2.4h-v3.4h}, [x9] +.endm + +function tr_block1 + multiply v0 + add_member32 v4.8h, v0.h[1], v1.h[0], v1.h[3], v2.h[2], +, +, +, +, 2 + add_member32 v5.4h, v0.h[2], v1.h[3], v3.h[0], v3.h[2], +, +, +, - + add_member32 v5.8h, v0.h[3], v2.h[2], v3.h[2], v1.h[3], +, +, -, -, 2 + add_member32 v6.4h, v1.h[0], v3.h[1], v2.h[1], v0.h[0], +, +, -, - + add_member32 v6.8h, v1.h[1], v3.h[3], v1.h[0], v1.h[2], +, -, -, -, 2 + add_member32 v7.4h, v1.h[2], v3.h[0], v0.h[0], v3.h[1], +, -, -, - + add_member32 v7.8h, v1.h[3], v2.h[1], v1.h[1], v2.h[3], +, -, -, +, 2 + add_member32 v16.4h, v2.h[0], v1.h[2], v2.h[2], v1.h[0], +, -, -, + + add_member32 v16.8h, v2.h[1], v0.h[3], v3.h[3], v0.h[2], +, -, -, +, 2 + add_member32 v17.4h, v2.h[2], v0.h[1], v2.h[3], v2.h[1], +, -, +, + + add_member32 v17.8h, v2.h[3], v0.h[2], v1.h[2], v3.h[3], +, -, +, -, 2 + add_member32 v18.4h, v3.h[0], v1.h[1], v0.h[1], v2.h[0], +, -, +, - + add_member32 v18.8h, v3.h[1], v2.h[0], v0.h[3], v0.h[1], +, -, +, -, 2 + add_member32 v19.4h, v3.h[2], v2.h[3], v2.h[0], v1.h[1], +, -, +, - + add_member32 v19.8h, v3.h[3], v3.h[2], v3.h[1], v3.h[0], +, -, +, -, 2 + ret +endfunc + +function tr_block2 + multiply v1 + add_member32 v4.8h, v3.h[1], v3.h[3], v3.h[0], v2.h[1], +, -, -, -, 2 + add_member32 v5.4h, v2.h[1], v1.h[0], v0.h[0], v1.h[1], -, -, -, - + add_member32 v5.8h, v0.h[0], v1.h[2], v3.h[1], v2.h[3], -, -, -, +, 2 + add_member32 v6.4h, v2.h[0], v3.h[2], v1.h[1], v0.h[3], -, +, +, + + add_member32 v6.8h, v3.h[2], v0.h[3], v1.h[3], v3.h[1], +, +, +, -, 2 + add_member32 v7.4h, v1.h[1], v1.h[3], v2.h[3], v0.h[0], +, +, -, - + add_member32 v7.8h, v0.h[3], v3.h[1], v0.h[1], v3.h[3], +, -, -, +, 2 + add_member32 v16.4h, v3.h[0], v0.h[2], v3.h[2], v0.h[1], +, -, -, + + add_member32 v16.8h, v2.h[2], v2.h[0], v1.h[0], v3.h[2], -, -, +, +, 2 + add_member32 v17.4h, v0.h[1], v3.h[0], v2.h[0], v0.h[2], -, +, +, - + add_member32 v17.8h, v1.h[3], v0.h[1], v2.h[2], v3.h[0], -, +, -, -, 2 + add_member32 v18.4h, v3.h[3], v2.h[1], v0.h[2], v1.h[0], +, +, -, + + add_member32 v18.8h, v1.h[2], v2.h[3], v3.h[3], v2.h[2], +, -, -, +, 2 + add_member32 v19.4h, v0.h[2], v0.h[1], v0.h[3], v1.h[2], +, -, +, - + add_member32 v19.8h, v2.h[3], v2.h[2], v2.h[1], v2.h[0], +, -, +, -, 2 + ret +endfunc + +function tr_block3 + multiply v2 + add_member32 v4.8h, v1.h[2], v0.h[3], v0.h[0], v0.h[2], -, -, -, -, 2 + add_member32 v5.4h, v2.h[2], v3.h[3], v2.h[3], v1.h[2], -, -, +, + + add_member32 v5.8h, v1.h[0], v0.h[2], v2.h[1], v3.h[3], +, +, +, -, 2 + add_member32 v6.4h, v3.h[0], v2.h[2], v0.h[1], v1.h[3], +, -, -, - + add_member32 v6.8h, v0.h[2], v2.h[0], v3.h[0], v0.h[0], -, -, +, +, 2 + add_member32 v7.4h, v3.h[2], v1.h[0], v2.h[0], v2.h[2], -, +, +, - + add_member32 v7.8h, v0.h[0], v3.h[2], v0.h[2], v3.h[0], +, +, -, -, 2 + add_member32 v16.4h, v3.h[3], v0.h[1], v3.h[1], v0.h[3], -, -, +, + + add_member32 v16.8h, v0.h[1], v2.h[3], v1.h[3], v1.h[1], -, +, +, -, 2 + add_member32 v17.4h, v3.h[1], v1.h[3], v0.h[3], v3.h[2], +, +, -, + + add_member32 v17.8h, v0.h[3], v1.h[1], v3.h[2], v2.h[0], +, -, +, +, 2 + add_member32 v18.4h, v2.h[3], v3.h[1], v1.h[2], v0.h[1], -, -, +, - + add_member32 v18.8h, v1.h[1], v0.h[0], v1.h[0], v2.h[1], -, +, -, +, 2 + add_member32 v19.4h, v2.h[1], v3.h[0], v3.h[3], v3.h[1], +, -, +, + + add_member32 v19.8h, v1.h[3], v1.h[2], v1.h[1], v1.h[0], +, -, +, -, 2 + ret +endfunc + +function tr_block4 + multiply v3 + add_member32 v4.8h, v1.h[1], v2.h[0], v2.h[3], v3.h[2], -, -, -, -, 2 + add_member32 v5.4h, v0.h[0], v0.h[3], v2.h[0], v3.h[1], +, +, +, + + add_member32 v5.8h, v2.h[0], v0.h[0], v1.h[1], v3.h[0], -, -, -, -, 2 + add_member32 v6.4h, v3.h[3], v1.h[2], v0.h[2], v2.h[3], +, +, +, + + add_member32 v6.8h, v2.h[1], v2.h[3], v0.h[0], v2.h[2], +, -, -, -, 2 + add_member32 v7.4h, v0.h[2], v3.h[3], v0.h[3], v2.h[1], -, -, +, + + add_member32 v7.8h, v1.h[0], v2.h[2], v1.h[2], v2.h[0], +, +, -, -, 2 + add_member32 v16.4h, v2.h[3], v1.h[1], v2.h[1], v1.h[3], -, -, +, + + add_member32 v16.8h, v3.h[1], v0.h[1], v3.h[0], v1.h[2], -, +, -, -, 2 + add_member32 v17.4h, v1.h[2], v1.h[0], v3.h[3], v1.h[1], +, -, +, + + add_member32 v17.8h, v0.h[1], v2.h[1], v3.h[1], v1.h[0], -, +, +, -, 2 + add_member32 v18.4h, v1.h[3], v3.h[2], v2.h[2], v0.h[3], +, -, -, + + add_member32 v18.8h, v3.h[2], v3.h[0], v1.h[3], v0.h[2], -, -, +, -, 2 + add_member32 v19.4h, v2.h[2], v1.h[3], v1.h[0], v0.h[1], -, +, -, + + add_member32 v19.8h, v0.h[3], v0.h[2], v0.h[1], v0.h[0], +, -, +, -, 2 + ret +endfunc + +.macro tr_32x4 name, shift +function func_tr_32x4_\name + mov x10, x30 + bl func_tr_16x4_noscale + + load32 + movrel x9, trans, 32 + ld1 {v0.4h-v1.4h}, [x9], #16 + ld1 {v2.4h-v3.4h}, [x9] + add x4, sp, #2048 + mov x2, #64 + mov x8, #-64 + + bl tr_block1 + mov x1, x11 + add x3, x11, #(56 + 3 * 64) + scale_store \shift + + bl tr_block2 + add x1, x11, #8 + add x3, x11, #(48 + 3 * 64) + scale_store \shift + + bl tr_block3 + add x1, x11, #16 + add x3, x11, #(40 + 3 * 64) + scale_store \shift + + bl tr_block4 + add x1, x11, #24 + add x3, x11, #(32 + 3 * 64) + scale_store \shift + + br x10 +endfunc +.endm + +.macro idct_32x32 bitdepth +function ff_hevc_idct_32x32_\bitdepth\()_neon, export=1 + mov x15, x30 + // allocate a temp buffer + sub sp, sp, #2432 + +.irp i, 0, 1, 2, 3, 4, 5, 6, 7 + add x5, x0, #(8 * \i) + add x11, sp, #(8 * \i * 32) + bl func_tr_32x4_firstpass +.endr + +.irp i, 0, 1, 2, 3, 4, 5, 6, 7 + add x5, sp, #(8 * \i) + add x11, x0, #(8 * \i * 32) + bl func_tr_32x4_secondpass_\bitdepth +.endr + + add sp, sp, #2432 + mov x30, x15 + ret +endfunc +.endm + idct_4x4 8 idct_4x4 10 @@ -605,10 +828,68 @@ idct_8x8 10 tr_16x4 firstpass, 7, 512, 1 tr_16x4 secondpass_8, 20 - 8, 512, 1 tr_16x4 secondpass_10, 20 - 10, 512, 1 +tr_16x4 noscale, 0, 2048, 4 idct_16x16 8 idct_16x16 10 +.ltorg +tr_32x4 firstpass, 7 +tr_32x4 secondpass_8, 20 - 8 +tr_32x4 secondpass_10, 20 - 10 +.ltorg + +idct_32x32 8 +idct_32x32 10 + +.macro tr4_luma_shift r0, r1, r2, r3, shift + saddl v0.4s, \r0, \r2 // c0 = src0 + src2 + saddl v1.4s, \r2, \r3 // c1 = src2 + src3 + ssubl v2.4s, \r0, \r3 // c2 = src0 - src3 + smull v3.4s, \r1, v21.4h // c3 = 74 * src1 + + saddl v7.4s, \r0, \r3 // src0 + src3 + ssubw v7.4s, v7.4s, \r2 // src0 - src2 + src3 + mul v7.4s, v7.4s, v18.4s // dst2 = 74 * (src0 - src2 + src3) + + mul v5.4s, v0.4s, v19.4s // 29 * c0 + mul v6.4s, v1.4s, v20.4s // 55 * c1 + add v5.4s, v5.4s, v6.4s // 29 * c0 + 55 * c1 + add v5.4s, v5.4s, v3.4s // dst0 = 29 * c0 + 55 * c1 + c3 + + mul v1.4s, v1.4s, v19.4s // 29 * c1 + mul v6.4s, v2.4s, v20.4s // 55 * c2 + sub v6.4s, v6.4s, v1.4s // 55 * c2 - 29 * c1 + add v6.4s, v6.4s, v3.4s // dst1 = 55 * c2 - 29 * c1 + c3 + + mul v0.4s, v0.4s, v20.4s // 55 * c0 + mul v2.4s, v2.4s, v19.4s // 29 * c2 + add v0.4s, v0.4s, v2.4s // 55 * c0 + 29 * c2 + sub v0.4s, v0.4s, v3.4s // dst3 = 55 * c0 + 29 * c2 - c3 + + sqrshrn \r0, v5.4s, \shift + sqrshrn \r1, v6.4s, \shift + sqrshrn \r2, v7.4s, \shift + sqrshrn \r3, v0.4s, \shift +.endm + +function ff_hevc_transform_luma_4x4_neon_8, export=1 + ld1 {v28.4h-v31.4h}, [x0] + movi v18.4s, #74 + movi v19.4s, #29 + movi v20.4s, #55 + movi v21.4h, #74 + + tr4_luma_shift v28.4h, v29.4h, v30.4h, v31.4h, #7 + transpose_4x4H v28, v29, v30, v31, v22, v23, v24, v25 + + tr4_luma_shift v28.4h, v29.4h, v30.4h, v31.4h, #12 + transpose_4x4H v28, v29, v30, v31, v22, v23, v24, v25 + + st1 {v28.4h-v31.4h}, [x0] + ret +endfunc + // void ff_hevc_idct_NxN_dc_DEPTH_neon(int16_t *coeffs) .macro idct_dc size, bitdepth function ff_hevc_idct_\size\()x\size\()_dc_\bitdepth\()_neon, export=1 diff --git a/src/third_party/ffmpeg/libavcodec/aarch64/hevcdsp_init_aarch64.c b/src/third_party/ffmpeg/libavcodec/aarch64/hevcdsp_init_aarch64.c index 1deefca0..be1049a2 100644 --- a/src/third_party/ffmpeg/libavcodec/aarch64/hevcdsp_init_aarch64.c +++ b/src/third_party/ffmpeg/libavcodec/aarch64/hevcdsp_init_aarch64.c @@ -1,5 +1,6 @@ /* * Copyright (c) 2020 Reimar Döffinger + * Copyright (c) 2023 xu fulong <839789740@qq.com> * * This file is part of FFmpeg. * @@ -25,6 +26,18 @@ #include "libavutil/aarch64/cpu.h" #include "libavcodec/hevcdsp.h" +void ff_hevc_v_loop_filter_chroma_8_neon(uint8_t *_pix, ptrdiff_t _stride, + const int *_tc, const uint8_t *_no_p, const uint8_t *_no_q); +void ff_hevc_v_loop_filter_chroma_10_neon(uint8_t *_pix, ptrdiff_t _stride, + const int *_tc, const uint8_t *_no_p, const uint8_t *_no_q); +void ff_hevc_v_loop_filter_chroma_12_neon(uint8_t *_pix, ptrdiff_t _stride, + const int *_tc, const uint8_t *_no_p, const uint8_t *_no_q); +void ff_hevc_h_loop_filter_chroma_8_neon(uint8_t *_pix, ptrdiff_t _stride, + const int *_tc, const uint8_t *_no_p, const uint8_t *_no_q); +void ff_hevc_h_loop_filter_chroma_10_neon(uint8_t *_pix, ptrdiff_t _stride, + const int *_tc, const uint8_t *_no_p, const uint8_t *_no_q); +void ff_hevc_h_loop_filter_chroma_12_neon(uint8_t *_pix, ptrdiff_t _stride, + const int *_tc, const uint8_t *_no_p, const uint8_t *_no_q); void ff_hevc_add_residual_4x4_8_neon(uint8_t *_dst, const int16_t *coeffs, ptrdiff_t stride); void ff_hevc_add_residual_4x4_10_neon(uint8_t *_dst, const int16_t *coeffs, @@ -55,6 +68,8 @@ void ff_hevc_idct_8x8_8_neon(int16_t *coeffs, int col_limit); void ff_hevc_idct_8x8_10_neon(int16_t *coeffs, int col_limit); void ff_hevc_idct_16x16_8_neon(int16_t *coeffs, int col_limit); void ff_hevc_idct_16x16_10_neon(int16_t *coeffs, int col_limit); +void ff_hevc_idct_32x32_8_neon(int16_t *coeffs, int col_limit); +void ff_hevc_idct_32x32_10_neon(int16_t *coeffs, int col_limit); void ff_hevc_idct_4x4_dc_8_neon(int16_t *coeffs); void ff_hevc_idct_8x8_dc_8_neon(int16_t *coeffs); void ff_hevc_idct_16x16_dc_8_neon(int16_t *coeffs); @@ -63,6 +78,7 @@ void ff_hevc_idct_4x4_dc_10_neon(int16_t *coeffs); void ff_hevc_idct_8x8_dc_10_neon(int16_t *coeffs); void ff_hevc_idct_16x16_dc_10_neon(int16_t *coeffs); void ff_hevc_idct_32x32_dc_10_neon(int16_t *coeffs); +void ff_hevc_transform_luma_4x4_neon_8(int16_t *coeffs); void ff_hevc_sao_band_filter_8x8_8_neon(uint8_t *_dst, const uint8_t *_src, ptrdiff_t stride_dst, ptrdiff_t stride_src, const int16_t *sao_offset_val, int sao_left_class, @@ -117,6 +133,8 @@ av_cold void ff_hevc_dsp_init_aarch64(HEVCDSPContext *c, const int bit_depth) if (!have_neon(av_get_cpu_flags())) return; if (bit_depth == 8) { + c->hevc_h_loop_filter_chroma = ff_hevc_h_loop_filter_chroma_8_neon; + c->hevc_v_loop_filter_chroma = ff_hevc_v_loop_filter_chroma_8_neon; c->add_residual[0] = ff_hevc_add_residual_4x4_8_neon; c->add_residual[1] = ff_hevc_add_residual_8x8_8_neon; c->add_residual[2] = ff_hevc_add_residual_16x16_8_neon; @@ -124,10 +142,12 @@ av_cold void ff_hevc_dsp_init_aarch64(HEVCDSPContext *c, const int bit_depth) c->idct[0] = ff_hevc_idct_4x4_8_neon; c->idct[1] = ff_hevc_idct_8x8_8_neon; c->idct[2] = ff_hevc_idct_16x16_8_neon; + c->idct[3] = ff_hevc_idct_32x32_8_neon; c->idct_dc[0] = ff_hevc_idct_4x4_dc_8_neon; c->idct_dc[1] = ff_hevc_idct_8x8_dc_8_neon; c->idct_dc[2] = ff_hevc_idct_16x16_dc_8_neon; c->idct_dc[3] = ff_hevc_idct_32x32_dc_8_neon; + c->transform_4x4_luma = ff_hevc_transform_luma_4x4_neon_8; c->sao_band_filter[0] = c->sao_band_filter[1] = c->sao_band_filter[2] = @@ -167,6 +187,8 @@ av_cold void ff_hevc_dsp_init_aarch64(HEVCDSPContext *c, const int bit_depth) c->put_hevc_qpel_bi[9][0][1] = ff_hevc_put_hevc_qpel_bi_h16_8_neon; } if (bit_depth == 10) { + c->hevc_h_loop_filter_chroma = ff_hevc_h_loop_filter_chroma_10_neon; + c->hevc_v_loop_filter_chroma = ff_hevc_v_loop_filter_chroma_10_neon; c->add_residual[0] = ff_hevc_add_residual_4x4_10_neon; c->add_residual[1] = ff_hevc_add_residual_8x8_10_neon; c->add_residual[2] = ff_hevc_add_residual_16x16_10_neon; @@ -174,12 +196,15 @@ av_cold void ff_hevc_dsp_init_aarch64(HEVCDSPContext *c, const int bit_depth) c->idct[0] = ff_hevc_idct_4x4_10_neon; c->idct[1] = ff_hevc_idct_8x8_10_neon; c->idct[2] = ff_hevc_idct_16x16_10_neon; + c->idct[3] = ff_hevc_idct_32x32_10_neon; c->idct_dc[0] = ff_hevc_idct_4x4_dc_10_neon; c->idct_dc[1] = ff_hevc_idct_8x8_dc_10_neon; c->idct_dc[2] = ff_hevc_idct_16x16_dc_10_neon; c->idct_dc[3] = ff_hevc_idct_32x32_dc_10_neon; } if (bit_depth == 12) { + c->hevc_h_loop_filter_chroma = ff_hevc_h_loop_filter_chroma_12_neon; + c->hevc_v_loop_filter_chroma = ff_hevc_v_loop_filter_chroma_12_neon; c->add_residual[0] = ff_hevc_add_residual_4x4_12_neon; c->add_residual[1] = ff_hevc_add_residual_8x8_12_neon; c->add_residual[2] = ff_hevc_add_residual_16x16_12_neon; diff --git a/src/third_party/ffmpeg/libavcodec/adpcm.c b/src/third_party/ffmpeg/libavcodec/adpcm.c index 45169693..59b9ef34 100644 --- a/src/third_party/ffmpeg/libavcodec/adpcm.c +++ b/src/third_party/ffmpeg/libavcodec/adpcm.c @@ -1579,11 +1579,11 @@ static int adpcm_decode_frame(AVCodecContext *avctx, AVFrame *frame, nibble[0] = sign_extend(byte & 15, 4); nibble[1] = sign_extend(byte >> 4, 4); - out[2+n*2] = (nibble[0]*(scale<<14) + (history[0]*29336) - (history[1]*13136)) >> 14; + out[2+n*2] = nibble[0]*scale + ((history[0]*3667 - history[1]*1642) >> 11); history[1] = history[0]; history[0] = out[2+n*2]; - out[2+n*2+1] = (nibble[1]*(scale<<14) + (history[0]*29336) - (history[1]*13136)) >> 14; + out[2+n*2+1] = nibble[1]*scale + ((history[0]*3667 - history[1]*1642) >> 11); history[1] = history[0]; history[0] = out[2+n*2+1]; } diff --git a/src/third_party/ffmpeg/libavcodec/agm.c b/src/third_party/ffmpeg/libavcodec/agm.c index b37f1a42..55cf0b47 100644 --- a/src/third_party/ffmpeg/libavcodec/agm.c +++ b/src/third_party/ffmpeg/libavcodec/agm.c @@ -1100,7 +1100,10 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, return AVERROR_INVALIDDATA; s->key_frame = (avpkt->flags & AV_PKT_FLAG_KEY); - frame->key_frame = s->key_frame; + if (s->key_frame) + frame->flags |= AV_FRAME_FLAG_KEY; + else + frame->flags &= ~AV_FRAME_FLAG_KEY; frame->pict_type = s->key_frame ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; if (!s->key_frame) { @@ -1171,7 +1174,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, if ((ret = ff_get_buffer(avctx, frame, AV_GET_BUFFER_FLAG_REF)) < 0) return ret; - if (frame->key_frame) { + if (frame->flags & AV_FRAME_FLAG_KEY) { if (!s->dct && !s->rgb) ret = decode_raw_intra(avctx, gbyte, frame); else if (!s->dct && s->rgb) diff --git a/src/third_party/ffmpeg/libavcodec/aic.c b/src/third_party/ffmpeg/libavcodec/aic.c index 7ba1c02f..f8b0f603 100644 --- a/src/third_party/ffmpeg/libavcodec/aic.c +++ b/src/third_party/ffmpeg/libavcodec/aic.c @@ -393,7 +393,7 @@ static int aic_decode_frame(AVCodecContext *avctx, AVFrame *frame, ctx->frame = frame; ctx->frame->pict_type = AV_PICTURE_TYPE_I; - ctx->frame->key_frame = 1; + ctx->frame->flags |= AV_FRAME_FLAG_KEY; off = FFALIGN(AIC_HDR_SIZE + ctx->num_x_slices * ctx->mb_height * 2, 4); diff --git a/src/third_party/ffmpeg/libavcodec/aliaspixdec.c b/src/third_party/ffmpeg/libavcodec/aliaspixdec.c index 45155d79..72f810d4 100644 --- a/src/third_party/ffmpeg/libavcodec/aliaspixdec.c +++ b/src/third_party/ffmpeg/libavcodec/aliaspixdec.c @@ -70,7 +70,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *f, return ret; f->pict_type = AV_PICTURE_TYPE_I; - f->key_frame = 1; + f->flags |= AV_FRAME_FLAG_KEY; x = 0; y = 1; diff --git a/src/third_party/ffmpeg/libavcodec/allcodecs.c b/src/third_party/ffmpeg/libavcodec/allcodecs.c index 3cbb9334..184bb852 100644 --- a/src/third_party/ffmpeg/libavcodec/allcodecs.c +++ b/src/third_party/ffmpeg/libavcodec/allcodecs.c @@ -251,6 +251,7 @@ extern const FFCodec ff_pbm_encoder; extern const FFCodec ff_pbm_decoder; extern const FFCodec ff_pcx_encoder; extern const FFCodec ff_pcx_decoder; +extern const FFCodec ff_pdv_decoder; extern const FFCodec ff_pfm_encoder; extern const FFCodec ff_pfm_decoder; extern const FFCodec ff_pgm_encoder; @@ -782,7 +783,6 @@ extern const FFCodec ff_libopencore_amrnb_encoder; extern const FFCodec ff_libopencore_amrnb_decoder; extern const FFCodec ff_libopencore_amrwb_decoder; extern const FFCodec ff_libopenjpeg_encoder; -extern const FFCodec ff_libopenjpeg_decoder; extern const FFCodec ff_libopus_encoder; extern const FFCodec ff_libopus_decoder; extern const FFCodec ff_librav1e_encoder; @@ -836,6 +836,7 @@ extern const FFCodec ff_libaom_av1_decoder; extern const FFCodec ff_av1_decoder; extern const FFCodec ff_av1_cuvid_decoder; extern const FFCodec ff_av1_mediacodec_decoder; +extern const FFCodec ff_av1_mediacodec_encoder; extern const FFCodec ff_av1_nvenc_encoder; extern const FFCodec ff_av1_qsv_decoder; extern const FFCodec ff_av1_qsv_encoder; @@ -873,17 +874,20 @@ extern const FFCodec ff_mpeg2_qsv_encoder; extern const FFCodec ff_mpeg2_vaapi_encoder; extern const FFCodec ff_mpeg4_cuvid_decoder; extern const FFCodec ff_mpeg4_mediacodec_decoder; +extern const FFCodec ff_mpeg4_mediacodec_encoder; extern const FFCodec ff_mpeg4_omx_encoder; extern const FFCodec ff_mpeg4_v4l2m2m_encoder; extern const FFCodec ff_prores_videotoolbox_encoder; extern const FFCodec ff_vc1_cuvid_decoder; extern const FFCodec ff_vp8_cuvid_decoder; extern const FFCodec ff_vp8_mediacodec_decoder; +extern const FFCodec ff_vp8_mediacodec_encoder; extern const FFCodec ff_vp8_qsv_decoder; extern const FFCodec ff_vp8_v4l2m2m_encoder; extern const FFCodec ff_vp8_vaapi_encoder; extern const FFCodec ff_vp9_cuvid_decoder; extern const FFCodec ff_vp9_mediacodec_decoder; +extern const FFCodec ff_vp9_mediacodec_encoder; extern const FFCodec ff_vp9_qsv_decoder; extern const FFCodec ff_vp9_vaapi_encoder; extern const FFCodec ff_vp9_qsv_encoder; diff --git a/src/third_party/ffmpeg/libavcodec/alsdec.c b/src/third_party/ffmpeg/libavcodec/alsdec.c index 4605b224..c64d1032 100644 --- a/src/third_party/ffmpeg/libavcodec/alsdec.c +++ b/src/third_party/ffmpeg/libavcodec/alsdec.c @@ -2190,6 +2190,10 @@ const FFCodec ff_als_decoder = { .close = decode_end, FF_CODEC_DECODE_CB(decode_frame), .flush = flush, - .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF, + .p.capabilities = +#if FF_API_SUBFRAMES + AV_CODEC_CAP_SUBFRAMES | +#endif + AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, }; diff --git a/src/third_party/ffmpeg/libavcodec/amfenc_av1.c b/src/third_party/ffmpeg/libavcodec/amfenc_av1.c index 8093cb73..ad09b791 100644 --- a/src/third_party/ffmpeg/libavcodec/amfenc_av1.c +++ b/src/third_party/ffmpeg/libavcodec/amfenc_av1.c @@ -117,7 +117,13 @@ static av_cold int amf_encode_init_av1(AVCodecContext* avctx) framerate = AMFConstructRate(avctx->framerate.num, avctx->framerate.den); } else { - framerate = AMFConstructRate(avctx->time_base.den, avctx->time_base.num * avctx->ticks_per_frame); +FF_DISABLE_DEPRECATION_WARNINGS + framerate = AMFConstructRate(avctx->time_base.den, avctx->time_base.num +#if FF_API_TICKS_PER_FRAME + * avctx->ticks_per_frame +#endif + ); +FF_ENABLE_DEPRECATION_WARNINGS } if ((ret = ff_amf_encode_init(avctx)) < 0) diff --git a/src/third_party/ffmpeg/libavcodec/amfenc_h264.c b/src/third_party/ffmpeg/libavcodec/amfenc_h264.c index eaf7f974..d2fc3397 100644 --- a/src/third_party/ffmpeg/libavcodec/amfenc_h264.c +++ b/src/third_party/ffmpeg/libavcodec/amfenc_h264.c @@ -142,7 +142,13 @@ static av_cold int amf_encode_init_h264(AVCodecContext *avctx) if (avctx->framerate.num > 0 && avctx->framerate.den > 0) { framerate = AMFConstructRate(avctx->framerate.num, avctx->framerate.den); } else { - framerate = AMFConstructRate(avctx->time_base.den, avctx->time_base.num * avctx->ticks_per_frame); +FF_DISABLE_DEPRECATION_WARNINGS + framerate = AMFConstructRate(avctx->time_base.den, avctx->time_base.num +#if FF_API_TICKS_PER_FRAME + * avctx->ticks_per_frame +#endif + ); +FF_ENABLE_DEPRECATION_WARNINGS } if ((ret = ff_amf_encode_init(avctx)) != 0) diff --git a/src/third_party/ffmpeg/libavcodec/amfenc_hevc.c b/src/third_party/ffmpeg/libavcodec/amfenc_hevc.c index 9b46946f..674a4095 100644 --- a/src/third_party/ffmpeg/libavcodec/amfenc_hevc.c +++ b/src/third_party/ffmpeg/libavcodec/amfenc_hevc.c @@ -109,7 +109,13 @@ static av_cold int amf_encode_init_hevc(AVCodecContext *avctx) if (avctx->framerate.num > 0 && avctx->framerate.den > 0) { framerate = AMFConstructRate(avctx->framerate.num, avctx->framerate.den); } else { - framerate = AMFConstructRate(avctx->time_base.den, avctx->time_base.num * avctx->ticks_per_frame); +FF_DISABLE_DEPRECATION_WARNINGS + framerate = AMFConstructRate(avctx->time_base.den, avctx->time_base.num +#if FF_API_TICKS_PER_FRAME + * avctx->ticks_per_frame +#endif + ); +FF_ENABLE_DEPRECATION_WARNINGS } if ((ret = ff_amf_encode_init(avctx)) < 0) diff --git a/src/third_party/ffmpeg/libavcodec/ansi.c b/src/third_party/ffmpeg/libavcodec/ansi.c index c1e31266..49c3770c 100644 --- a/src/third_party/ffmpeg/libavcodec/ansi.c +++ b/src/third_party/ffmpeg/libavcodec/ansi.c @@ -262,7 +262,11 @@ static int execute_code(AVCodecContext * avctx, int c) AV_GET_BUFFER_FLAG_REF)) < 0) return ret; s->frame->pict_type = AV_PICTURE_TYPE_I; +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS s->frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif set_palette((uint32_t *)s->frame->data[1]); erase_screen(avctx); } else if (c == 'l') { @@ -371,7 +375,11 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, } s->frame->pict_type = AV_PICTURE_TYPE_I; +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS s->frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif set_palette((uint32_t *)s->frame->data[1]); if (!s->first_frame) { erase_screen(avctx); diff --git a/src/third_party/ffmpeg/libavcodec/apac.c b/src/third_party/ffmpeg/libavcodec/apac.c index 3408f752..b6cb6c66 100644 --- a/src/third_party/ffmpeg/libavcodec/apac.c +++ b/src/third_party/ffmpeg/libavcodec/apac.c @@ -269,8 +269,10 @@ const FFCodec ff_apac_decoder = { FF_CODEC_DECODE_CB(apac_decode), .close = apac_close, .p.capabilities = AV_CODEC_CAP_DELAY | - AV_CODEC_CAP_DR1 | - AV_CODEC_CAP_SUBFRAMES, +#if FF_API_SUBFRAMES + AV_CODEC_CAP_SUBFRAMES | +#endif + AV_CODEC_CAP_DR1, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_U8P, AV_SAMPLE_FMT_S16P, diff --git a/src/third_party/ffmpeg/libavcodec/apedec.c b/src/third_party/ffmpeg/libavcodec/apedec.c index c08d13d6..613c76df 100644 --- a/src/third_party/ffmpeg/libavcodec/apedec.c +++ b/src/third_party/ffmpeg/libavcodec/apedec.c @@ -944,7 +944,7 @@ static void long_filter_high_3800(int32_t *buffer, int order, int shift, int len { int i, j; int32_t dotprod, sign; - int32_t coeffs[256], delay[256]; + int32_t coeffs[256], delay[256+256], *delayp = delay; if (order >= length) return; @@ -955,14 +955,28 @@ static void long_filter_high_3800(int32_t *buffer, int order, int shift, int len for (i = order; i < length; i++) { dotprod = 0; sign = APESIGN(buffer[i]); - for (j = 0; j < order; j++) { - dotprod += delay[j] * (unsigned)coeffs[j]; - coeffs[j] += ((delay[j] >> 31) | 1) * sign; + if (sign == 1) { + for (j = 0; j < order; j++) { + dotprod += delayp[j] * (unsigned)coeffs[j]; + coeffs[j] += (delayp[j] >> 31) | 1; + } + } else if (sign == -1) { + for (j = 0; j < order; j++) { + dotprod += delayp[j] * (unsigned)coeffs[j]; + coeffs[j] -= (delayp[j] >> 31) | 1; + } + } else { + for (j = 0; j < order; j++) { + dotprod += delayp[j] * (unsigned)coeffs[j]; + } } buffer[i] -= (unsigned)(dotprod >> shift); - for (j = 0; j < order - 1; j++) - delay[j] = delay[j + 1]; - delay[order - 1] = buffer[i]; + delayp ++; + delayp[order - 1] = buffer[i]; + if (delayp - delay == 256) { + memcpy(delay, delayp, sizeof(*delay)*256); + delayp = delay; + } } } @@ -1666,7 +1680,11 @@ const FFCodec ff_ape_decoder = { .init = ape_decode_init, .close = ape_decode_close, FF_CODEC_DECODE_CB(ape_decode_frame), - .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DELAY | + .p.capabilities = +#if FF_API_SUBFRAMES + AV_CODEC_CAP_SUBFRAMES | +#endif + AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, .flush = ape_flush, diff --git a/src/third_party/ffmpeg/libavcodec/arbc.c b/src/third_party/ffmpeg/libavcodec/arbc.c index 343c5669..1b349f4d 100644 --- a/src/third_party/ffmpeg/libavcodec/arbc.c +++ b/src/third_party/ffmpeg/libavcodec/arbc.c @@ -171,7 +171,10 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, return ret; frame->pict_type = prev_pixels <= 0 ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; - frame->key_frame = prev_pixels <= 0; + if (prev_pixels <= 0) + frame->flags |= AV_FRAME_FLAG_KEY; + else + frame->flags &= ~AV_FRAME_FLAG_KEY; *got_frame = 1; return avpkt->size; diff --git a/src/third_party/ffmpeg/libavcodec/argo.c b/src/third_party/ffmpeg/libavcodec/argo.c index 9bedb139..589feed4 100644 --- a/src/third_party/ffmpeg/libavcodec/argo.c +++ b/src/third_party/ffmpeg/libavcodec/argo.c @@ -666,7 +666,10 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, return ret; frame->pict_type = s->key ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; - frame->key_frame = s->key; + if (s->key) + frame->flags |= AV_FRAME_FLAG_KEY; + else + frame->flags &= ~AV_FRAME_FLAG_KEY; *got_frame = 1; return avpkt->size; diff --git a/src/third_party/ffmpeg/libavcodec/asvdec.c b/src/third_party/ffmpeg/libavcodec/asvdec.c index 699aab9f..62295b2d 100644 --- a/src/third_party/ffmpeg/libavcodec/asvdec.c +++ b/src/third_party/ffmpeg/libavcodec/asvdec.c @@ -245,7 +245,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, if ((ret = ff_get_buffer(avctx, p, 0)) < 0) return ret; p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; if (avctx->codec_id == AV_CODEC_ID_ASV1) { av_fast_padded_malloc(&a->bitstream_buffer, &a->bitstream_buffer_size, diff --git a/src/third_party/ffmpeg/libavcodec/atrac3.c b/src/third_party/ffmpeg/libavcodec/atrac3.c index 7415da59..5851ee02 100644 --- a/src/third_party/ffmpeg/libavcodec/atrac3.c +++ b/src/third_party/ffmpeg/libavcodec/atrac3.c @@ -1026,7 +1026,11 @@ const FFCodec ff_atrac3_decoder = { .init = atrac3_decode_init, .close = atrac3_decode_close, FF_CODEC_DECODE_CB(atrac3_decode_frame), - .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1, + .p.capabilities = +#if FF_API_SUBFRAMES + AV_CODEC_CAP_SUBFRAMES | +#endif + AV_CODEC_CAP_DR1, .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_NONE }, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, @@ -1041,7 +1045,11 @@ const FFCodec ff_atrac3al_decoder = { .init = atrac3_decode_init, .close = atrac3_decode_close, FF_CODEC_DECODE_CB(atrac3al_decode_frame), - .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1, + .p.capabilities = +#if FF_API_SUBFRAMES + AV_CODEC_CAP_SUBFRAMES | +#endif + AV_CODEC_CAP_DR1, .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_NONE }, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, diff --git a/src/third_party/ffmpeg/libavcodec/atrac9dec.c b/src/third_party/ffmpeg/libavcodec/atrac9dec.c index 60962b16..8a694045 100644 --- a/src/third_party/ffmpeg/libavcodec/atrac9dec.c +++ b/src/third_party/ffmpeg/libavcodec/atrac9dec.c @@ -1003,5 +1003,9 @@ const FFCodec ff_atrac9_decoder = { FF_CODEC_DECODE_CB(atrac9_decode_frame), .flush = atrac9_decode_flush, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, - .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF, + .p.capabilities = +#if FF_API_SUBFRAMES + AV_CODEC_CAP_SUBFRAMES | +#endif + AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF, }; diff --git a/src/third_party/ffmpeg/libavcodec/av1_parse.c b/src/third_party/ffmpeg/libavcodec/av1_parse.c index 59ea0bc6..06163681 100644 --- a/src/third_party/ffmpeg/libavcodec/av1_parse.c +++ b/src/third_party/ffmpeg/libavcodec/av1_parse.c @@ -56,7 +56,7 @@ int ff_av1_extract_obu(AV1OBU *obu, const uint8_t *buf, int length, void *logctx int ff_av1_packet_split(AV1Packet *pkt, const uint8_t *buf, int length, void *logctx) { GetByteContext bc; - int ret, consumed; + int consumed; bytestream2_init(&bc, buf, length); pkt->nb_obus = 0; @@ -88,16 +88,14 @@ int ff_av1_packet_split(AV1Packet *pkt, const uint8_t *buf, int length, void *lo obu->size_bits = get_obu_bit_length(obu->data, obu->size, obu->type); - if (obu->size_bits < 0 || (!obu->size_bits && obu->type != AV1_OBU_TEMPORAL_DELIMITER)) { + if (obu->size_bits < 0 || + (obu->size_bits == 0 && (obu->type != AV1_OBU_TEMPORAL_DELIMITER && + obu->type != AV1_OBU_PADDING))) { av_log(logctx, AV_LOG_ERROR, "Invalid OBU of type %d, skipping.\n", obu->type); continue; } pkt->nb_obus++; - - ret = init_get_bits(&obu->gb, obu->data, obu->size_bits); - if (ret < 0) - return ret; } return 0; @@ -108,3 +106,17 @@ void ff_av1_packet_uninit(AV1Packet *pkt) av_freep(&pkt->obus); pkt->obus_allocated = pkt->obus_allocated_size = 0; } + +AVRational ff_av1_framerate(int64_t ticks_per_frame, int64_t units_per_tick, + int64_t time_scale) +{ + AVRational fr; + + if (ticks_per_frame && units_per_tick && time_scale && + ticks_per_frame < INT64_MAX / units_per_tick && + av_reduce(&fr.den, &fr.num, units_per_tick * ticks_per_frame, + time_scale, INT_MAX)) + return fr; + + return (AVRational){ 0, 1 }; +} diff --git a/src/third_party/ffmpeg/libavcodec/av1_parse.h b/src/third_party/ffmpeg/libavcodec/av1_parse.h index f4a5d283..d0abd7ac 100644 --- a/src/third_party/ffmpeg/libavcodec/av1_parse.h +++ b/src/third_party/ffmpeg/libavcodec/av1_parse.h @@ -49,9 +49,6 @@ typedef struct AV1OBU { int raw_size; const uint8_t *raw_data; - /** GetBitContext initialized to the start of the payload */ - GetBitContext gb; - int type; int temporal_id; @@ -181,4 +178,7 @@ static inline int get_obu_bit_length(const uint8_t *buf, int size, int type) return size; } +AVRational ff_av1_framerate(int64_t ticks_per_frame, int64_t units_per_tick, + int64_t time_scale); + #endif /* AVCODEC_AV1_PARSE_H */ diff --git a/src/third_party/ffmpeg/libavcodec/av1_parser.c b/src/third_party/ffmpeg/libavcodec/av1_parser.c index 14dae92f..2b79493b 100644 --- a/src/third_party/ffmpeg/libavcodec/av1_parser.c +++ b/src/third_party/ffmpeg/libavcodec/av1_parser.c @@ -21,6 +21,8 @@ */ #include "libavutil/avassert.h" + +#include "av1_parse.h" #include "cbs.h" #include "cbs_av1.h" #include "parser.h" @@ -162,11 +164,10 @@ static int av1_parser_parse(AVCodecParserContext *ctx, avctx->color_trc = (enum AVColorTransferCharacteristic) color->transfer_characteristics; avctx->color_range = color->color_range ? AVCOL_RANGE_JPEG : AVCOL_RANGE_MPEG; - if (seq->timing_info_present_flag) { - const AV1RawTimingInfo *timing = &seq->timing_info; - av_reduce(&avctx->framerate.den, &avctx->framerate.num, - timing->num_units_in_display_tick, timing->time_scale, INT_MAX); - } + if (seq->timing_info_present_flag) + avctx->framerate = ff_av1_framerate(1LL + seq->timing_info.num_ticks_per_picture_minus_1, + seq->timing_info.num_units_in_display_tick, + seq->timing_info.time_scale); end: ff_cbs_fragment_reset(td); diff --git a/src/third_party/ffmpeg/libavcodec/av1dec.c b/src/third_party/ffmpeg/libavcodec/av1dec.c index 807852e3..d46ee483 100644 --- a/src/third_party/ffmpeg/libavcodec/av1dec.c +++ b/src/third_party/ffmpeg/libavcodec/av1dec.c @@ -26,6 +26,7 @@ #include "libavutil/pixdesc.h" #include "libavutil/opt.h" #include "avcodec.h" +#include "av1_parse.h" #include "av1dec.h" #include "atsc_a53.h" #include "bytestream.h" @@ -709,15 +710,10 @@ static int set_context_with_sequence(AVCodecContext *avctx, } avctx->sample_aspect_ratio = (AVRational) { 1, 1 }; - if (seq->timing_info.num_units_in_display_tick && - seq->timing_info.time_scale) { - av_reduce(&avctx->framerate.den, &avctx->framerate.num, - seq->timing_info.num_units_in_display_tick, - seq->timing_info.time_scale, - INT_MAX); - if (seq->timing_info.equal_picture_interval) - avctx->ticks_per_frame = seq->timing_info.num_ticks_per_picture_minus_1 + 1; - } + if (seq->timing_info_present_flag) + avctx->framerate = ff_av1_framerate(1LL + seq->timing_info.num_ticks_per_picture_minus_1, + seq->timing_info.num_units_in_display_tick, + seq->timing_info.time_scale); return 0; } @@ -846,7 +842,10 @@ static int av1_frame_alloc(AVCodecContext *avctx, AV1Frame *f) goto fail; frame = f->f; - frame->key_frame = header->frame_type == AV1_FRAME_KEY; + if (header->frame_type == AV1_FRAME_KEY) + frame->flags |= AV_FRAME_FLAG_KEY; + else + frame->flags &= ~AV_FRAME_FLAG_KEY; switch (header->frame_type) { case AV1_FRAME_KEY: diff --git a/src/third_party/ffmpeg/libavcodec/avcodec.c b/src/third_party/ffmpeg/libavcodec/avcodec.c index fb136229..5a96899d 100644 --- a/src/third_party/ffmpeg/libavcodec/avcodec.c +++ b/src/third_party/ffmpeg/libavcodec/avcodec.c @@ -44,10 +44,11 @@ int avcodec_default_execute(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2), void *arg, int *ret, int count, int size) { - int i; + size_t i; for (i = 0; i < count; i++) { - int r = func(c, (char *)arg + i * size); + size_t offset = i * size; + int r = func(c, FF_PTR_ADD((char *)arg, offset)); if (ret) ret[i] = r; } diff --git a/src/third_party/ffmpeg/libavcodec/avcodec.h b/src/third_party/ffmpeg/libavcodec/avcodec.h index eaaa0e2e..d6a4622f 100644 --- a/src/third_party/ffmpeg/libavcodec/avcodec.h +++ b/src/third_party/ffmpeg/libavcodec/avcodec.h @@ -556,14 +556,22 @@ typedef struct AVCodecContext { */ AVRational time_base; +#if FF_API_TICKS_PER_FRAME /** * For some codecs, the time base is closer to the field rate than the frame rate. * Most notably, H.264 and MPEG-2 specify time_base as half of frame duration * if no telecine is used ... * * Set to time_base ticks per frame. Default 1, e.g., H.264/MPEG-2 set it to 2. + * + * @deprecated + * - decoding: Use AVCodecDescriptor.props & AV_CODEC_PROP_FIELDS + * - encoding: Set AVCodecContext.framerate instead + * */ + attribute_deprecated int ticks_per_frame; +#endif /** * Codec delay. @@ -1016,8 +1024,11 @@ typedef struct AVCodecContext { /** * MPEG vs JPEG YUV range. - * - encoding: Set by user - * - decoding: Set by libavcodec + * - encoding: Set by user to override the default output color range value, + * If not specified, libavcodec sets the color range depending on the + * output format. + * - decoding: Set by libavcodec, can be set by the user to propagate the + * color range to components reading from the decoder context. */ enum AVColorRange color_range; diff --git a/src/third_party/ffmpeg/libavcodec/avrndec.c b/src/third_party/ffmpeg/libavcodec/avrndec.c index ef194058..97d28246 100644 --- a/src/third_party/ffmpeg/libavcodec/avrndec.c +++ b/src/third_party/ffmpeg/libavcodec/avrndec.c @@ -68,7 +68,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, if ((ret = ff_get_buffer(avctx, p, 0)) < 0) return ret; p->pict_type= AV_PICTURE_TYPE_I; - p->key_frame= 1; + p->flags |= AV_FRAME_FLAG_KEY; if(a->interlace) { buf += (true_height - avctx->height)*avctx->width; diff --git a/src/third_party/ffmpeg/libavcodec/avs.c b/src/third_party/ffmpeg/libavcodec/avs.c index a1c9d3c4..b53175f6 100644 --- a/src/third_party/ffmpeg/libavcodec/avs.c +++ b/src/third_party/ffmpeg/libavcodec/avs.c @@ -61,7 +61,7 @@ static int avs_decode_frame(AVCodecContext * avctx, AVFrame *picture, if ((ret = ff_reget_buffer(avctx, p, 0)) < 0) return ret; p->pict_type = AV_PICTURE_TYPE_P; - p->key_frame = 0; + p->flags &= ~AV_FRAME_FLAG_KEY; out = p->data[0]; stride = p->linesize[0]; @@ -97,7 +97,7 @@ static int avs_decode_frame(AVCodecContext * avctx, AVFrame *picture, switch (sub_type) { case AVS_I_FRAME: p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; case AVS_P_FRAME_3X3: vect_w = 3; vect_h = 3; diff --git a/src/third_party/ffmpeg/libavcodec/avuidec.c b/src/third_party/ffmpeg/libavcodec/avuidec.c index ba157e16..48b23d48 100644 --- a/src/third_party/ffmpeg/libavcodec/avuidec.c +++ b/src/third_party/ffmpeg/libavcodec/avuidec.c @@ -71,7 +71,7 @@ static int avui_decode_frame(AVCodecContext *avctx, AVFrame *pic, if ((ret = ff_get_buffer(avctx, pic, 0)) < 0) return ret; - pic->key_frame = 1; + pic->flags |= AV_FRAME_FLAG_KEY; pic->pict_type = AV_PICTURE_TYPE_I; if (!interlaced) { diff --git a/src/third_party/ffmpeg/libavcodec/bethsoftvideo.c b/src/third_party/ffmpeg/libavcodec/bethsoftvideo.c index e095d04f..6de50282 100644 --- a/src/third_party/ffmpeg/libavcodec/bethsoftvideo.c +++ b/src/third_party/ffmpeg/libavcodec/bethsoftvideo.c @@ -63,7 +63,11 @@ static int set_palette(BethsoftvidContext *ctx, GetByteContext *g) palette[a] = 0xFFU << 24 | bytestream2_get_be24u(g) * 4; palette[a] |= palette[a] >> 6 & 0x30303; } +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS ctx->frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif return 0; } diff --git a/src/third_party/ffmpeg/libavcodec/bfi.c b/src/third_party/ffmpeg/libavcodec/bfi.c index c2682724..901669a3 100644 --- a/src/third_party/ffmpeg/libavcodec/bfi.c +++ b/src/third_party/ffmpeg/libavcodec/bfi.c @@ -68,7 +68,7 @@ static int bfi_decode_frame(AVCodecContext *avctx, AVFrame *frame, /* Set frame parameters and palette, if necessary */ if (!avctx->frame_num) { frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; /* Setting the palette */ if (avctx->extradata_size > 768) { av_log(avctx, AV_LOG_ERROR, "Palette is too large.\n"); @@ -84,11 +84,19 @@ static int bfi_decode_frame(AVCodecContext *avctx, AVFrame *frame, pal++; } memcpy(bfi->pal, frame->data[1], sizeof(bfi->pal)); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } else { frame->pict_type = AV_PICTURE_TYPE_P; - frame->key_frame = 0; + frame->flags &= ~AV_FRAME_FLAG_KEY; +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = 0; +FF_ENABLE_DEPRECATION_WARNINGS +#endif memcpy(frame->data[1], bfi->pal, sizeof(bfi->pal)); } diff --git a/src/third_party/ffmpeg/libavcodec/bintext.c b/src/third_party/ffmpeg/libavcodec/bintext.c index ce814f76..b20d6ce1 100644 --- a/src/third_party/ffmpeg/libavcodec/bintext.c +++ b/src/third_party/ffmpeg/libavcodec/bintext.c @@ -157,7 +157,11 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, if ((ret = ff_get_buffer(avctx, s->frame, 0)) < 0) return ret; s->frame->pict_type = AV_PICTURE_TYPE_I; +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS s->frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif memcpy(s->frame->data[1], s->palette, 16 * 4); if (avctx->codec_id == AV_CODEC_ID_XBIN) { diff --git a/src/third_party/ffmpeg/libavcodec/bitpacked_dec.c b/src/third_party/ffmpeg/libavcodec/bitpacked_dec.c index a1ffef18..c88f8619 100644 --- a/src/third_party/ffmpeg/libavcodec/bitpacked_dec.c +++ b/src/third_party/ffmpeg/libavcodec/bitpacked_dec.c @@ -134,7 +134,7 @@ static int bitpacked_decode(AVCodecContext *avctx, AVFrame *frame, return res; frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; *got_frame = 1; return buf_size; diff --git a/src/third_party/ffmpeg/libavcodec/bmp.c b/src/third_party/ffmpeg/libavcodec/bmp.c index d7e01f07..d117c06c 100644 --- a/src/third_party/ffmpeg/libavcodec/bmp.c +++ b/src/third_party/ffmpeg/libavcodec/bmp.c @@ -210,7 +210,7 @@ static int bmp_decode_frame(AVCodecContext *avctx, AVFrame *p, if ((ret = ff_get_buffer(avctx, p, 0)) < 0) return ret; p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; buf = buf0 + hsize; dsize = buf_size - hsize; diff --git a/src/third_party/ffmpeg/libavcodec/bmvvideo.c b/src/third_party/ffmpeg/libavcodec/bmvvideo.c index 92ce41c8..20f07ca5 100644 --- a/src/third_party/ffmpeg/libavcodec/bmvvideo.c +++ b/src/third_party/ffmpeg/libavcodec/bmvvideo.c @@ -251,7 +251,11 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, } memcpy(frame->data[1], c->pal, AVPALETTE_SIZE); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = type & BMV_PALETTE; +FF_ENABLE_DEPRECATION_WARNINGS +#endif outptr = frame->data[0]; srcptr = c->frame; diff --git a/src/third_party/ffmpeg/libavcodec/bonk.c b/src/third_party/ffmpeg/libavcodec/bonk.c index 5f510e49..fbea91c7 100644 --- a/src/third_party/ffmpeg/libavcodec/bonk.c +++ b/src/third_party/ffmpeg/libavcodec/bonk.c @@ -155,6 +155,7 @@ static int intlist_read(BonkContext *s, int *buf, int entries, int base_2_part) int n_zeros = 0, step = 256, dominant = 0; int pos = 0, level = 0; BitCount *bits = s->bits; + int passes = 1; memset(buf, 0, entries * sizeof(*buf)); if (base_2_part) { @@ -216,24 +217,28 @@ static int intlist_read(BonkContext *s, int *buf, int entries, int base_2_part) x = 0; n_zeros = 0; for (i = 0; n_zeros < entries; i++) { + if (x >= max_x) + return AVERROR_INVALIDDATA; + if (pos >= entries) { pos = 0; - level += 1 << low_bits; + level += passes << low_bits; + passes = 1; + if (bits[x].bit && bits[x].count > entries - n_zeros) + passes = bits[x].count / (entries - n_zeros); } if (level > 1 << 16) return AVERROR_INVALIDDATA; - if (x >= max_x) - return AVERROR_INVALIDDATA; - if (buf[pos] >= level) { if (bits[x].bit) - buf[pos] += 1 << low_bits; + buf[pos] += passes << low_bits; else n_zeros++; - bits[x].count--; + av_assert1(bits[x].count >= passes); + bits[x].count -= passes; x += bits[x].count == 0; } @@ -265,14 +270,14 @@ static inline int shift(int a, int b) static int predictor_calc_error(int *k, int *state, int order, int error) { - int i, x = error - shift_down(k[order-1] * state[order-1], LATTICE_SHIFT); + int i, x = error - shift_down(k[order-1] * (unsigned)state[order-1], LATTICE_SHIFT); int *k_ptr = &(k[order-2]), *state_ptr = &(state[order-2]); for (i = order-2; i >= 0; i--, k_ptr--, state_ptr--) { unsigned k_value = *k_ptr, state_value = *state_ptr; - x -= shift_down(k_value * state_value, LATTICE_SHIFT); + x -= shift_down(k_value * (unsigned)state_value, LATTICE_SHIFT); state_ptr[1] = state_value + shift_down(k_value * x, LATTICE_SHIFT); } @@ -423,8 +428,10 @@ const FFCodec ff_bonk_decoder = { FF_CODEC_DECODE_CB(bonk_decode), .close = bonk_close, .p.capabilities = AV_CODEC_CAP_DELAY | - AV_CODEC_CAP_DR1 | - AV_CODEC_CAP_SUBFRAMES, +#if FF_API_SUBFRAMES + AV_CODEC_CAP_SUBFRAMES | +#endif + AV_CODEC_CAP_DR1, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P, AV_SAMPLE_FMT_NONE }, diff --git a/src/third_party/ffmpeg/libavcodec/brenderpix.c b/src/third_party/ffmpeg/libavcodec/brenderpix.c index e95ab3d4..70a3e6be 100644 --- a/src/third_party/ffmpeg/libavcodec/brenderpix.c +++ b/src/third_party/ffmpeg/libavcodec/brenderpix.c @@ -245,7 +245,11 @@ static int pix_decode_frame(AVCodecContext *avctx, AVFrame *frame, *pal_out++ = (0xFFU << 24) | bytestream2_get_be32u(&gb); bytestream2_skip(&gb, 8); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif chunk_type = bytestream2_get_be32(&gb); } else if (avctx->pix_fmt == AV_PIX_FMT_PAL8) { @@ -257,7 +261,11 @@ static int pix_decode_frame(AVCodecContext *avctx, AVFrame *frame, "Using default palette, colors might be off.\n"); memcpy(pal_out, std_pal_table, sizeof(uint32_t) * 256); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } data_len = bytestream2_get_be32(&gb); @@ -278,7 +286,7 @@ static int pix_decode_frame(AVCodecContext *avctx, AVFrame *frame, bytes_per_scanline, hdr.height); frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; *got_frame = 1; return avpkt->size; diff --git a/src/third_party/ffmpeg/libavcodec/bytestream.h b/src/third_party/ffmpeg/libavcodec/bytestream.h index d0033f14..67080604 100644 --- a/src/third_party/ffmpeg/libavcodec/bytestream.h +++ b/src/third_party/ffmpeg/libavcodec/bytestream.h @@ -180,7 +180,7 @@ static av_always_inline void bytestream2_skipu(GetByteContext *g, static av_always_inline void bytestream2_skip_p(PutByteContext *p, unsigned int size) { - int size2; + unsigned int size2; if (p->eof) return; size2 = FFMIN(p->buffer_end - p->buffer, size); @@ -268,7 +268,7 @@ static av_always_inline unsigned int bytestream2_get_buffer(GetByteContext *g, uint8_t *dst, unsigned int size) { - int size2 = FFMIN(g->buffer_end - g->buffer, size); + unsigned int size2 = FFMIN(g->buffer_end - g->buffer, size); memcpy(dst, g->buffer, size2); g->buffer += size2; return size2; @@ -287,7 +287,7 @@ static av_always_inline unsigned int bytestream2_put_buffer(PutByteContext *p, const uint8_t *src, unsigned int size) { - int size2; + unsigned int size2; if (p->eof) return 0; size2 = FFMIN(p->buffer_end - p->buffer, size); @@ -311,7 +311,7 @@ static av_always_inline void bytestream2_set_buffer(PutByteContext *p, const uint8_t c, unsigned int size) { - int size2; + unsigned int size2; if (p->eof) return; size2 = FFMIN(p->buffer_end - p->buffer, size); @@ -348,7 +348,7 @@ static av_always_inline unsigned int bytestream2_copy_buffer(PutByteContext *p, GetByteContext *g, unsigned int size) { - int size2; + unsigned int size2; if (p->eof) return 0; diff --git a/src/third_party/ffmpeg/libavcodec/c93.c b/src/third_party/ffmpeg/libavcodec/c93.c index bfcbc7c1..2a4fe459 100644 --- a/src/third_party/ffmpeg/libavcodec/c93.c +++ b/src/third_party/ffmpeg/libavcodec/c93.c @@ -147,10 +147,10 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, b = bytestream2_get_byte(&gb); if (b & C93_FIRST_FRAME) { newpic->pict_type = AV_PICTURE_TYPE_I; - newpic->key_frame = 1; + newpic->flags |= AV_FRAME_FLAG_KEY; } else { newpic->pict_type = AV_PICTURE_TYPE_P; - newpic->key_frame = 0; + newpic->flags &= ~AV_FRAME_FLAG_KEY; } for (y = 0; y < HEIGHT; y += 8) { @@ -246,7 +246,11 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, for (i = 0; i < 256; i++) { palette[i] = 0xFFU << 24 | bytestream2_get_be24(&gb); } +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS newpic->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } else { if (oldpic->data[1]) memcpy(newpic->data[1], oldpic->data[1], 256 * 4); diff --git a/src/third_party/ffmpeg/libavcodec/cavs_parser.c b/src/third_party/ffmpeg/libavcodec/cavs_parser.c index 03f392c2..4a03effd 100644 --- a/src/third_party/ffmpeg/libavcodec/cavs_parser.c +++ b/src/third_party/ffmpeg/libavcodec/cavs_parser.c @@ -59,12 +59,11 @@ static int cavs_find_frame_end(ParseContext *pc, const uint8_t *buf, return 0; for(; i SLICE_MAX_START_CODE){ - pc->frame_start_found=0; - pc->state=-1; - return i-3; - } + if (state == PIC_I_START_CODE || state == PIC_PB_START_CODE || + state == CAVS_START_CODE) { + pc->frame_start_found=0; + pc->state=-1; + return i-3; } } } diff --git a/src/third_party/ffmpeg/libavcodec/cavsdec.c b/src/third_party/ffmpeg/libavcodec/cavsdec.c index b1fa9a98..37071dfb 100644 --- a/src/third_party/ffmpeg/libavcodec/cavsdec.c +++ b/src/third_party/ffmpeg/libavcodec/cavsdec.c @@ -1020,6 +1020,9 @@ static int decode_pic(AVSContext *h) skip_bits(&h->gb, 1); //marker_bit } + if (get_bits_left(&h->gb) < 23) + return AVERROR_INVALIDDATA; + ret = ff_get_buffer(h->avctx, h->cur.f, h->cur.f->pict_type == AV_PICTURE_TYPE_B ? 0 : AV_GET_BUFFER_FLAG_REF); if (ret < 0) diff --git a/src/third_party/ffmpeg/libavcodec/cbs_av1.c b/src/third_party/ffmpeg/libavcodec/cbs_av1.c index 45e1288a..8788fee0 100644 --- a/src/third_party/ffmpeg/libavcodec/cbs_av1.c +++ b/src/third_party/ffmpeg/libavcodec/cbs_av1.c @@ -1306,9 +1306,16 @@ static void cbs_av1_free_metadata(void *unit, uint8_t *content) md = &obu->obu.metadata; switch (md->metadata_type) { + case AV1_METADATA_TYPE_HDR_CLL: + case AV1_METADATA_TYPE_HDR_MDCV: + case AV1_METADATA_TYPE_SCALABILITY: + case AV1_METADATA_TYPE_TIMECODE: + break; case AV1_METADATA_TYPE_ITUT_T35: av_buffer_unref(&md->metadata.itut_t35.payload_ref); break; + default: + av_buffer_unref(&md->metadata.unknown.payload_ref); } av_free(content); } diff --git a/src/third_party/ffmpeg/libavcodec/cbs_av1.h b/src/third_party/ffmpeg/libavcodec/cbs_av1.h index 1fc80dcf..36848d44 100644 --- a/src/third_party/ffmpeg/libavcodec/cbs_av1.h +++ b/src/third_party/ffmpeg/libavcodec/cbs_av1.h @@ -370,6 +370,12 @@ typedef struct AV1RawMetadataTimecode { uint32_t time_offset_value; } AV1RawMetadataTimecode; +typedef struct AV1RawMetadataUnknown { + uint8_t *payload; + AVBufferRef *payload_ref; + size_t payload_size; +} AV1RawMetadataUnknown; + typedef struct AV1RawMetadata { uint64_t metadata_type; union { @@ -378,6 +384,7 @@ typedef struct AV1RawMetadata { AV1RawMetadataScalability scalability; AV1RawMetadataITUTT35 itut_t35; AV1RawMetadataTimecode timecode; + AV1RawMetadataUnknown unknown; } metadata; } AV1RawMetadata; diff --git a/src/third_party/ffmpeg/libavcodec/cbs_av1_syntax_template.c b/src/third_party/ffmpeg/libavcodec/cbs_av1_syntax_template.c index e95925a4..8f4640d1 100644 --- a/src/third_party/ffmpeg/libavcodec/cbs_av1_syntax_template.c +++ b/src/third_party/ffmpeg/libavcodec/cbs_av1_syntax_template.c @@ -176,7 +176,7 @@ static int FUNC(decoder_model_info)(CodedBitstreamContext *ctx, RWContext *rw, int err; fb(5, buffer_delay_length_minus_1); - fb(32, num_units_in_decoding_tick); + fc(32, num_units_in_decoding_tick, 1, MAX_UINT_BITS(32)); fb(5, buffer_removal_time_length_minus_1); fb(5, frame_presentation_time_length_minus_1); @@ -1843,6 +1843,8 @@ static int FUNC(metadata_hdr_cll)(CodedBitstreamContext *ctx, RWContext *rw, { int err; + HEADER("HDR CLL Metadata"); + fb(16, max_cll); fb(16, max_fall); @@ -1854,6 +1856,8 @@ static int FUNC(metadata_hdr_mdcv)(CodedBitstreamContext *ctx, RWContext *rw, { int err, i; + HEADER("HDR MDCV Metadata"); + for (i = 0; i < 3; i++) { fbs(16, primary_chromaticity_x[i], 1, i); fbs(16, primary_chromaticity_y[i], 1, i); @@ -1920,6 +1924,8 @@ static int FUNC(metadata_scalability)(CodedBitstreamContext *ctx, RWContext *rw, { int err; + HEADER("Scalability Metadata"); + fb(8, scalability_mode_idc); if (current->scalability_mode_idc == AV1_SCALABILITY_SS) @@ -1934,6 +1940,8 @@ static int FUNC(metadata_itut_t35)(CodedBitstreamContext *ctx, RWContext *rw, int err; size_t i; + HEADER("ITU-T T.35 Metadata"); + fb(8, itu_t_t35_country_code); if (current->itu_t_t35_country_code == 0xff) fb(8, itu_t_t35_country_code_extension_byte); @@ -1961,6 +1969,8 @@ static int FUNC(metadata_timecode)(CodedBitstreamContext *ctx, RWContext *rw, { int err; + HEADER("Timecode Metadata"); + fb(5, counting_type); flag(full_timestamp_flag); flag(discontinuity_flag); @@ -1994,6 +2004,29 @@ static int FUNC(metadata_timecode)(CodedBitstreamContext *ctx, RWContext *rw, return 0; } +static int FUNC(metadata_unknown)(CodedBitstreamContext *ctx, RWContext *rw, + AV1RawMetadataUnknown *current) +{ + int err; + size_t i; + + HEADER("Unknown Metadata"); + +#ifdef READ + current->payload_size = cbs_av1_get_payload_bytes_left(rw); + + current->payload_ref = av_buffer_alloc(current->payload_size); + if (!current->payload_ref) + return AVERROR(ENOMEM); + current->payload = current->payload_ref->data; +#endif + + for (i = 0; i < current->payload_size; i++) + fbs(8, payload[i], 1, i); + + return 0; +} + static int FUNC(metadata_obu)(CodedBitstreamContext *ctx, RWContext *rw, AV1RawMetadata *current) { @@ -2018,8 +2051,7 @@ static int FUNC(metadata_obu)(CodedBitstreamContext *ctx, RWContext *rw, CHECK(FUNC(metadata_timecode)(ctx, rw, ¤t->metadata.timecode)); break; default: - // Unknown metadata type. - return AVERROR_PATCHWELCOME; + CHECK(FUNC(metadata_unknown)(ctx, rw, ¤t->metadata.unknown)); } return 0; diff --git a/src/third_party/ffmpeg/libavcodec/ccaption_dec.c b/src/third_party/ffmpeg/libavcodec/ccaption_dec.c index 661a4951..f91c92b3 100644 --- a/src/third_party/ffmpeg/libavcodec/ccaption_dec.c +++ b/src/third_party/ffmpeg/libavcodec/ccaption_dec.c @@ -262,7 +262,6 @@ typedef struct CCaptionSubContext { static av_cold int init_decoder(AVCodecContext *avctx) { - int ret; CCaptionSubContext *ctx = avctx->priv_data; av_bprint_init(&ctx->buffer[0], 0, AV_BPRINT_SIZE_UNLIMITED); @@ -272,7 +271,7 @@ static av_cold int init_decoder(AVCodecContext *avctx) ctx->bg_color = CCCOL_BLACK; ctx->rollup = 2; ctx->cursor_row = 10; - ret = ff_ass_subtitle_header(avctx, "Monospace", + return ff_ass_subtitle_header(avctx, "Monospace", ASS_DEFAULT_FONT_SIZE, ASS_DEFAULT_COLOR, ASS_DEFAULT_BACK_COLOR, @@ -281,11 +280,6 @@ static av_cold int init_decoder(AVCodecContext *avctx) ASS_DEFAULT_UNDERLINE, 3, ASS_DEFAULT_ALIGNMENT); - if (ret < 0) { - return ret; - } - - return ret; } static av_cold int close_decoder(AVCodecContext *avctx) @@ -900,6 +894,7 @@ static int decode(AVCodecContext *avctx, AVSubtitle *sub, ret = ff_ass_add_rect2(sub, ctx->buffer[bidx].str, ctx->readorder++, 0, NULL, NULL, &nb_rect_allocated); if (ret < 0) return ret; + av_bprint_clear(&ctx->buffer[bidx]); sub->pts = ctx->buffer_time[1]; sub->end_display_time = av_rescale_q(ctx->buffer_time[1] - ctx->buffer_time[0], AV_TIME_BASE_Q, ms_tb); diff --git a/src/third_party/ffmpeg/libavcodec/cdgraphics.c b/src/third_party/ffmpeg/libavcodec/cdgraphics.c index 431e99cd..0c5022a5 100644 --- a/src/third_party/ffmpeg/libavcodec/cdgraphics.c +++ b/src/third_party/ffmpeg/libavcodec/cdgraphics.c @@ -125,7 +125,11 @@ static void cdg_load_palette(CDGraphicsContext *cc, uint8_t *data, int low) b = ((color ) & 0x000F) * 17; palette[i + array_offset] = (uint32_t)cc->alpha[i + array_offset] << 24 | r << 16 | g << 8 | b; } +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS cc->frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } static int cdg_tile_block(CDGraphicsContext *cc, uint8_t *data, int b) diff --git a/src/third_party/ffmpeg/libavcodec/cdtoons.c b/src/third_party/ffmpeg/libavcodec/cdtoons.c index 3ebed226..94c49f0c 100644 --- a/src/third_party/ffmpeg/libavcodec/cdtoons.c +++ b/src/third_party/ffmpeg/libavcodec/cdtoons.c @@ -384,7 +384,11 @@ static int cdtoons_decode_frame(AVCodecContext *avctx, AVFrame *rframe, } /* first palette entry indicates transparency */ c->pal[0] = 0; +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS c->frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } } diff --git a/src/third_party/ffmpeg/libavcodec/cdxl.c b/src/third_party/ffmpeg/libavcodec/cdxl.c index ad2cfd97..085ae97c 100644 --- a/src/third_party/ffmpeg/libavcodec/cdxl.c +++ b/src/third_party/ffmpeg/libavcodec/cdxl.c @@ -305,7 +305,7 @@ static int cdxl_decode_frame(AVCodecContext *avctx, AVFrame *p, if ((ret = ff_get_buffer(avctx, p, 0)) < 0) return ret; p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; if (encoding) { av_fast_padded_malloc(&c->new_video, &c->new_video_size, diff --git a/src/third_party/ffmpeg/libavcodec/cfhd.c b/src/third_party/ffmpeg/libavcodec/cfhd.c index c23eb069..42d7dcc3 100644 --- a/src/third_party/ffmpeg/libavcodec/cfhd.c +++ b/src/third_party/ffmpeg/libavcodec/cfhd.c @@ -1087,8 +1087,8 @@ finish: dst += dst_linesize; } } else { - av_log(avctx, AV_LOG_DEBUG, "interlaced frame ? %d", pic->interlaced_frame); - pic->interlaced_frame = 1; + av_log(avctx, AV_LOG_DEBUG, "interlaced frame ? %d", !!(pic->flags & AV_FRAME_FLAG_INTERLACED)); + pic->flags |= AV_FRAME_FLAG_INTERLACED; low = s->plane[plane].subband[0]; high = s->plane[plane].subband[7]; output = s->plane[plane].l_h[6]; @@ -1284,7 +1284,7 @@ finish: dst += dst_linesize; } } else { - pic->interlaced_frame = 1; + pic->flags |= AV_FRAME_FLAG_INTERLACED; low = s->plane[plane].l_h[7]; high = s->plane[plane].subband[14]; output = s->plane[plane].l_h[6]; diff --git a/src/third_party/ffmpeg/libavcodec/cinepak.c b/src/third_party/ffmpeg/libavcodec/cinepak.c index 282614fd..2ec0ce88 100644 --- a/src/third_party/ffmpeg/libavcodec/cinepak.c +++ b/src/third_party/ffmpeg/libavcodec/cinepak.c @@ -379,7 +379,7 @@ static int cinepak_decode (CinepakContext *s) num_strips = FFMIN(num_strips, MAX_STRIPS); - s->frame->key_frame = 0; + s->frame->flags &= ~AV_FRAME_FLAG_KEY; for (i=0; i < num_strips; i++) { if ((s->data + 12) > eod) @@ -395,7 +395,7 @@ static int cinepak_decode (CinepakContext *s) s->strips[i].x2 = AV_RB16 (&s->data[10]); if (s->strips[i].id == 0x10) - s->frame->key_frame = 1; + s->frame->flags |= AV_FRAME_FLAG_KEY; strip_size = AV_RB24 (&s->data[1]) - 12; if (strip_size < 0) @@ -476,7 +476,14 @@ static int cinepak_decode_frame(AVCodecContext *avctx, AVFrame *rframe, return ret; if (s->palette_video) { - s->frame->palette_has_changed = ff_copy_palette(s->pal, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS + s->frame->palette_has_changed = +#endif + ff_copy_palette(s->pal, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_ENABLE_DEPRECATION_WARNINGS +#endif } if ((ret = cinepak_decode(s)) < 0) { diff --git a/src/third_party/ffmpeg/libavcodec/clearvideo.c b/src/third_party/ffmpeg/libavcodec/clearvideo.c index e77661d1..f84e3e6e 100644 --- a/src/third_party/ffmpeg/libavcodec/clearvideo.c +++ b/src/third_party/ffmpeg/libavcodec/clearvideo.c @@ -511,7 +511,7 @@ static int clv_decode_frame(AVCodecContext *avctx, AVFrame *rframe, if ((ret = ff_reget_buffer(avctx, c->pic, 0)) < 0) return ret; - c->pic->key_frame = 1; + c->pic->flags |= AV_FRAME_FLAG_KEY; c->pic->pict_type = AV_PICTURE_TYPE_I; bytestream2_get_be32(&gb); // frame size; @@ -605,7 +605,7 @@ static int clv_decode_frame(AVCodecContext *avctx, AVFrame *rframe, } extend_edges(c->pic, c->tile_size); - c->pic->key_frame = 0; + c->pic->flags &= ~AV_FRAME_FLAG_KEY; c->pic->pict_type = AV_PICTURE_TYPE_P; } diff --git a/src/third_party/ffmpeg/libavcodec/cljrdec.c b/src/third_party/ffmpeg/libavcodec/cljrdec.c index 914f853c..a4baa015 100644 --- a/src/third_party/ffmpeg/libavcodec/cljrdec.c +++ b/src/third_party/ffmpeg/libavcodec/cljrdec.c @@ -51,7 +51,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, if ((ret = ff_get_buffer(avctx, p, 0)) < 0) return ret; p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; init_get_bits(&gb, buf, buf_size * 8); diff --git a/src/third_party/ffmpeg/libavcodec/cllc.c b/src/third_party/ffmpeg/libavcodec/cllc.c index 911717b6..52cb86e5 100644 --- a/src/third_party/ffmpeg/libavcodec/cllc.c +++ b/src/third_party/ffmpeg/libavcodec/cllc.c @@ -460,7 +460,7 @@ static int cllc_decode_frame(AVCodecContext *avctx, AVFrame *pic, return AVERROR_INVALIDDATA; } - pic->key_frame = 1; + pic->flags |= AV_FRAME_FLAG_KEY; pic->pict_type = AV_PICTURE_TYPE_I; *got_picture_ptr = 1; diff --git a/src/third_party/ffmpeg/libavcodec/codec.h b/src/third_party/ffmpeg/libavcodec/codec.h index 3b1995bc..7a932d75 100644 --- a/src/third_party/ffmpeg/libavcodec/codec.h +++ b/src/third_party/ffmpeg/libavcodec/codec.h @@ -80,6 +80,7 @@ */ #define AV_CODEC_CAP_SMALL_LAST_FRAME (1 << 6) +#if FF_API_SUBFRAMES /** * Codec can output multiple frames per AVPacket * Normally demuxers return one frame at a time, demuxers which do not do @@ -92,6 +93,8 @@ * as a last resort. */ #define AV_CODEC_CAP_SUBFRAMES (1 << 8) +#endif + /** * Codec is experimental and is thus avoided in favor of non experimental * encoders diff --git a/src/third_party/ffmpeg/libavcodec/codec_desc.c b/src/third_party/ffmpeg/libavcodec/codec_desc.c index efdcb59b..49dddd1a 100644 --- a/src/third_party/ffmpeg/libavcodec/codec_desc.c +++ b/src/third_party/ffmpeg/libavcodec/codec_desc.c @@ -38,14 +38,20 @@ static const AVCodecDescriptor codec_descriptors[] = { .type = AVMEDIA_TYPE_VIDEO, .name = "mpeg1video", .long_name = NULL_IF_CONFIG_SMALL("MPEG-1 video"), - .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER, + .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER | + // FIXME this is strigly speaking not true, as MPEG-1 does + // not allow field coding, but our mpeg12 code (decoder and + // parser) can sometimes change codec id at runtime, so + // this is safer + AV_CODEC_PROP_FIELDS, }, { .id = AV_CODEC_ID_MPEG2VIDEO, .type = AVMEDIA_TYPE_VIDEO, .name = "mpeg2video", .long_name = NULL_IF_CONFIG_SMALL("MPEG-2 video"), - .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER, + .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER | + AV_CODEC_PROP_FIELDS, .profiles = NULL_IF_CONFIG_SMALL(ff_mpeg2_video_profiles), }, { @@ -225,7 +231,8 @@ static const AVCodecDescriptor codec_descriptors[] = { .type = AVMEDIA_TYPE_VIDEO, .name = "h264", .long_name = NULL_IF_CONFIG_SMALL("H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10"), - .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_LOSSLESS | AV_CODEC_PROP_REORDER, + .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_LOSSLESS | + AV_CODEC_PROP_REORDER | AV_CODEC_PROP_FIELDS, .profiles = NULL_IF_CONFIG_SMALL(ff_h264_profiles), }, { @@ -529,7 +536,8 @@ static const AVCodecDescriptor codec_descriptors[] = { .type = AVMEDIA_TYPE_VIDEO, .name = "vc1", .long_name = NULL_IF_CONFIG_SMALL("SMPTE VC-1"), - .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER, + .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER | + AV_CODEC_PROP_FIELDS, .profiles = NULL_IF_CONFIG_SMALL(ff_vc1_profiles), }, { @@ -1923,6 +1931,13 @@ static const AVCodecDescriptor codec_descriptors[] = { .long_name = NULL_IF_CONFIG_SMALL("ViewQuest VQC"), .props = AV_CODEC_PROP_LOSSY, }, + { + .id = AV_CODEC_ID_PDV, + .type = AVMEDIA_TYPE_VIDEO, + .name = "pdv", + .long_name = NULL_IF_CONFIG_SMALL("PDV (PlayDate Video)"), + .props = AV_CODEC_PROP_LOSSY, + }, /* various PCM "codecs" */ { diff --git a/src/third_party/ffmpeg/libavcodec/codec_desc.h b/src/third_party/ffmpeg/libavcodec/codec_desc.h index 126b52df..dd449111 100644 --- a/src/third_party/ffmpeg/libavcodec/codec_desc.h +++ b/src/third_party/ffmpeg/libavcodec/codec_desc.h @@ -90,6 +90,12 @@ typedef struct AVCodecDescriptor { * equal. */ #define AV_CODEC_PROP_REORDER (1 << 3) + +/** + * Video codec supports separate coding of fields in interlaced frames. + */ +#define AV_CODEC_PROP_FIELDS (1 << 4) + /** * Subtitle codec is bitmap based * Decoded AVSubtitle data can be read from the AVSubtitleRect->pict field. diff --git a/src/third_party/ffmpeg/libavcodec/codec_id.h b/src/third_party/ffmpeg/libavcodec/codec_id.h index 64df9699..70800ec2 100644 --- a/src/third_party/ffmpeg/libavcodec/codec_id.h +++ b/src/third_party/ffmpeg/libavcodec/codec_id.h @@ -320,6 +320,7 @@ enum AVCodecID { AV_CODEC_ID_WBMP, AV_CODEC_ID_MEDIA100, AV_CODEC_ID_VQC, + AV_CODEC_ID_PDV, /* various PCM "codecs" */ AV_CODEC_ID_FIRST_AUDIO = 0x10000, ///< A dummy id pointing at the start of audio codecs diff --git a/src/third_party/ffmpeg/libavcodec/codec_par.c b/src/third_party/ffmpeg/libavcodec/codec_par.c index abda649a..775c1870 100644 --- a/src/third_party/ffmpeg/libavcodec/codec_par.c +++ b/src/third_party/ffmpeg/libavcodec/codec_par.c @@ -46,6 +46,7 @@ static void codec_parameters_reset(AVCodecParameters *par) par->color_space = AVCOL_SPC_UNSPECIFIED; par->chroma_location = AVCHROMA_LOC_UNSPECIFIED; par->sample_aspect_ratio = (AVRational){ 0, 1 }; + par->framerate = (AVRational){ 0, 1 }; par->profile = FF_PROFILE_UNKNOWN; par->level = FF_LEVEL_UNKNOWN; } @@ -126,6 +127,7 @@ int avcodec_parameters_from_context(AVCodecParameters *par, par->chroma_location = codec->chroma_sample_location; par->sample_aspect_ratio = codec->sample_aspect_ratio; par->video_delay = codec->has_b_frames; + par->framerate = codec->framerate; break; case AVMEDIA_TYPE_AUDIO: par->format = codec->sample_fmt; @@ -207,6 +209,7 @@ int avcodec_parameters_to_context(AVCodecContext *codec, codec->chroma_sample_location = par->chroma_location; codec->sample_aspect_ratio = par->sample_aspect_ratio; codec->has_b_frames = par->video_delay; + codec->framerate = par->framerate; break; case AVMEDIA_TYPE_AUDIO: codec->sample_fmt = par->format; diff --git a/src/third_party/ffmpeg/libavcodec/codec_par.h b/src/third_party/ffmpeg/libavcodec/codec_par.h index f51d27c5..add90fdb 100644 --- a/src/third_party/ffmpeg/libavcodec/codec_par.h +++ b/src/third_party/ffmpeg/libavcodec/codec_par.h @@ -211,6 +211,18 @@ typedef struct AVCodecParameters { * Audio only. The channel layout and number of channels. */ AVChannelLayout ch_layout; + + /** + * Video only. Number of frames per second, for streams with constant frame + * durations. Should be set to { 0, 1 } when some frames have differing + * durations or if the value is not known. + * + * @note This field correponds to values that are stored in codec-level + * headers and is typically overridden by container/transport-layer + * timestamps, when available. It should thus be used only as a last resort, + * when no higher-level timing information is available. + */ + AVRational framerate; } AVCodecParameters; /** diff --git a/src/third_party/ffmpeg/libavcodec/cpia.c b/src/third_party/ffmpeg/libavcodec/cpia.c index bfd270da..f62100c4 100644 --- a/src/third_party/ffmpeg/libavcodec/cpia.c +++ b/src/third_party/ffmpeg/libavcodec/cpia.c @@ -94,10 +94,10 @@ static int cpia_decode_frame(AVCodecContext *avctx, AVFrame *rframe, if (header[28] == NOT_COMPRESSED) { frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; } else { frame->pict_type = AV_PICTURE_TYPE_P; - frame->key_frame = 0; + frame->flags &= ~AV_FRAME_FLAG_KEY; } // Get buffer filled with previous frame diff --git a/src/third_party/ffmpeg/libavcodec/cri.c b/src/third_party/ffmpeg/libavcodec/cri.c index 5761152c..0380a0c6 100644 --- a/src/third_party/ffmpeg/libavcodec/cri.c +++ b/src/third_party/ffmpeg/libavcodec/cri.c @@ -408,7 +408,7 @@ skip: } p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; *got_frame = 1; diff --git a/src/third_party/ffmpeg/libavcodec/crystalhd.c b/src/third_party/ffmpeg/libavcodec/crystalhd.c index a48d60f1..86f6cfa6 100644 --- a/src/third_party/ffmpeg/libavcodec/crystalhd.c +++ b/src/third_party/ffmpeg/libavcodec/crystalhd.c @@ -543,9 +543,9 @@ static inline CopyRet copy_frame(AVCodecContext *avctx, av_image_copy_plane(dst, dStride, src, sStride, bwidth, height); } - frame->interlaced_frame = interlaced; + frame->flags |= AV_FRAME_FLAG_INTERLACED * !!interlaced; if (interlaced) - frame->top_field_first = !bottom_first; + frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST * !bottom_first; frame->pts = pkt_pts; diff --git a/src/third_party/ffmpeg/libavcodec/cscd.c b/src/third_party/ffmpeg/libavcodec/cscd.c index b4ed3332..23dd2df9 100644 --- a/src/third_party/ffmpeg/libavcodec/cscd.c +++ b/src/third_party/ffmpeg/libavcodec/cscd.c @@ -110,12 +110,12 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, // flip upside down, add difference frame if (buf[0] & 1) { // keyframe c->pic->pict_type = AV_PICTURE_TYPE_I; - c->pic->key_frame = 1; + c->pic->flags |= AV_FRAME_FLAG_KEY; copy_frame_default(c->pic, c->decomp_buf, c->linelen, c->height); } else { c->pic->pict_type = AV_PICTURE_TYPE_P; - c->pic->key_frame = 0; + c->pic->flags &= ~AV_FRAME_FLAG_KEY; add_frame_default(c->pic, c->decomp_buf, c->linelen, c->height); } diff --git a/src/third_party/ffmpeg/libavcodec/cuviddec.c b/src/third_party/ffmpeg/libavcodec/cuviddec.c index 76e70aa6..3d43bbd4 100644 --- a/src/third_party/ffmpeg/libavcodec/cuviddec.c +++ b/src/third_party/ffmpeg/libavcodec/cuviddec.c @@ -599,7 +599,10 @@ static int cuvid_output_frame(AVCodecContext *avctx, AVFrame *frame) goto error; } - frame->key_frame = ctx->key_frame[parsed_frame.dispinfo.picture_index]; + if (ctx->key_frame[parsed_frame.dispinfo.picture_index]) + frame->flags |= AV_FRAME_FLAG_KEY; + else + frame->flags &= ~AV_FRAME_FLAG_KEY; ctx->key_frame[parsed_frame.dispinfo.picture_index] = 0; frame->width = avctx->width; @@ -631,10 +634,11 @@ FF_DISABLE_DEPRECATION_WARNINGS FF_ENABLE_DEPRECATION_WARNINGS #endif - frame->interlaced_frame = !parsed_frame.is_deinterlacing && !parsed_frame.dispinfo.progressive_frame; + if (!parsed_frame.is_deinterlacing && !parsed_frame.dispinfo.progressive_frame) + frame->flags |= AV_FRAME_FLAG_INTERLACED; - if (frame->interlaced_frame) - frame->top_field_first = parsed_frame.dispinfo.top_field_first; + if ((frame->flags & AV_FRAME_FLAG_INTERLACED) && parsed_frame.dispinfo.top_field_first) + frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST; } else if (ctx->decoder_flushing) { ret = AVERROR_EOF; } else { diff --git a/src/third_party/ffmpeg/libavcodec/dds.c b/src/third_party/ffmpeg/libavcodec/dds.c index 4bb425db..31a327a5 100644 --- a/src/third_party/ffmpeg/libavcodec/dds.c +++ b/src/third_party/ffmpeg/libavcodec/dds.c @@ -651,7 +651,11 @@ static int dds_decode(AVCodecContext *avctx, AVFrame *frame, ((unsigned)frame->data[1][3+i*4]<<24) ); } +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif if (bytestream2_get_bytes_left(gbc) < frame->height * frame->width / 2) { av_log(avctx, AV_LOG_ERROR, "Buffer is too small (%d < %d).\n", @@ -682,7 +686,11 @@ static int dds_decode(AVCodecContext *avctx, AVFrame *frame, ((unsigned)frame->data[1][3+i*4]<<24) ); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } if (bytestream2_get_bytes_left(gbc) < frame->height * linesize) { @@ -702,7 +710,7 @@ static int dds_decode(AVCodecContext *avctx, AVFrame *frame, /* Frame is ready to be output. */ frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; *got_frame = 1; return avpkt->size; diff --git a/src/third_party/ffmpeg/libavcodec/decode.c b/src/third_party/ffmpeg/libavcodec/decode.c index 40f5a3ba..360837a0 100644 --- a/src/third_party/ffmpeg/libavcodec/decode.c +++ b/src/third_party/ffmpeg/libavcodec/decode.c @@ -423,13 +423,6 @@ FF_ENABLE_DEPRECATION_WARNINGS } } - if (avctx->codec->type == AVMEDIA_TYPE_AUDIO && - !avci->showed_multi_packet_warning && - ret >= 0 && ret != pkt->size && !(avctx->codec->capabilities & AV_CODEC_CAP_SUBFRAMES)) { - av_log(avctx, AV_LOG_WARNING, "Multiple frames in a packet.\n"); - avci->showed_multi_packet_warning = 1; - } - if (!got_frame) av_frame_unref(frame); @@ -570,6 +563,19 @@ static int decode_receive_frame_internal(AVCodecContext *avctx, AVFrame *frame) } if (!ret) { + if (avctx->codec_type != AVMEDIA_TYPE_VIDEO) + frame->flags |= AV_FRAME_FLAG_KEY; +#if FF_API_FRAME_KEY +FF_DISABLE_DEPRECATION_WARNINGS + frame->key_frame = !!(frame->flags & AV_FRAME_FLAG_KEY); +FF_ENABLE_DEPRECATION_WARNINGS +#endif +#if FF_API_INTERLACED_FRAME +FF_DISABLE_DEPRECATION_WARNINGS + frame->interlaced_frame = !!(frame->flags & AV_FRAME_FLAG_INTERLACED); + frame->top_field_first = !!(frame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST); +FF_ENABLE_DEPRECATION_WARNINGS +#endif frame->best_effort_timestamp = guess_correct_pts(avctx, frame->pts, frame->pkt_dts); diff --git a/src/third_party/ffmpeg/libavcodec/dfa.c b/src/third_party/ffmpeg/libavcodec/dfa.c index 114c803f..9114feb0 100644 --- a/src/third_party/ffmpeg/libavcodec/dfa.c +++ b/src/third_party/ffmpeg/libavcodec/dfa.c @@ -367,7 +367,11 @@ static int dfa_decode_frame(AVCodecContext *avctx, AVFrame *frame, s->pal[i] = bytestream2_get_be24(&gb) << 2; s->pal[i] |= 0xFFU << 24 | (s->pal[i] >> 6) & 0x30303; } +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } else if (chunk_type <= 9) { if (decoder[chunk_type - 2](&gb, s->frame_buf, avctx->width, avctx->height)) { av_log(avctx, AV_LOG_ERROR, "Error decoding %s chunk\n", diff --git a/src/third_party/ffmpeg/libavcodec/diracdec.c b/src/third_party/ffmpeg/libavcodec/diracdec.c index 0ae582be..277c730c 100644 --- a/src/third_party/ffmpeg/libavcodec/diracdec.c +++ b/src/third_party/ffmpeg/libavcodec/diracdec.c @@ -2230,7 +2230,10 @@ static int dirac_decode_data_unit(AVCodecContext *avctx, const uint8_t *buf, int s->hq_picture = (parse_code & 0xF8) == 0xE8; /* [DIRAC_STD] is_hq_picture() */ s->dc_prediction = (parse_code & 0x28) == 0x08; /* [DIRAC_STD] using_dc_prediction() */ pic->reference = (parse_code & 0x0C) == 0x0C; /* [DIRAC_STD] is_reference() */ - pic->avframe->key_frame = s->num_refs == 0; /* [DIRAC_STD] is_intra() */ + if (s->num_refs == 0) /* [DIRAC_STD] is_intra() */ + pic->avframe->flags |= AV_FRAME_FLAG_KEY; + else + pic->avframe->flags &= ~AV_FRAME_FLAG_KEY; pic->avframe->pict_type = s->num_refs + 1; /* Definition of AVPictureType in avutil.h */ /* VC-2 Low Delay has a different parse code than the Dirac Low Delay */ diff --git a/src/third_party/ffmpeg/libavcodec/dnxhddec.c b/src/third_party/ffmpeg/libavcodec/dnxhddec.c index d91a6bf1..84bd0e61 100644 --- a/src/third_party/ffmpeg/libavcodec/dnxhddec.c +++ b/src/third_party/ffmpeg/libavcodec/dnxhddec.c @@ -195,8 +195,9 @@ static int dnxhd_decode_header(DNXHDContext *ctx, AVFrame *frame, } if (buf[5] & 2) { /* interlaced */ ctx->cur_field = first_field ? buf[5] & 1 : !ctx->cur_field; - frame->interlaced_frame = 1; - frame->top_field_first = first_field ^ ctx->cur_field; + frame->flags |= AV_FRAME_FLAG_INTERLACED; + if (first_field ^ ctx->cur_field) + frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST; av_log(ctx->avctx, AV_LOG_DEBUG, "interlaced %d, cur field %d\n", buf[5] & 3, ctx->cur_field); } else { @@ -298,7 +299,7 @@ static int dnxhd_decode_header(DNXHDContext *ctx, AVFrame *frame, ctx->mb_width = (ctx->width + 15)>> 4; ctx->mb_height = AV_RB16(buf + 0x16c); - if ((ctx->height + 15) >> 4 == ctx->mb_height && frame->interlaced_frame) + if ((ctx->height + 15) >> 4 == ctx->mb_height && (frame->flags & AV_FRAME_FLAG_INTERLACED)) ctx->height <<= 1; av_log(ctx->avctx, AV_LOG_VERBOSE, "%dx%d, 4:%s %d bits, MBAFF=%d ACT=%d\n", @@ -316,7 +317,7 @@ static int dnxhd_decode_header(DNXHDContext *ctx, AVFrame *frame, } ctx->data_offset = 0x280; } - if ((ctx->mb_height << frame->interlaced_frame) > (ctx->height + 15) >> 4) { + if ((ctx->mb_height << !!(frame->flags & AV_FRAME_FLAG_INTERLACED)) > (ctx->height + 15) >> 4) { av_log(ctx->avctx, AV_LOG_ERROR, "mb height too big: %d\n", ctx->mb_height); return AVERROR_INVALIDDATA; @@ -530,7 +531,7 @@ static int dnxhd_decode_macroblock(const DNXHDContext *ctx, RowContext *row, return AVERROR_INVALIDDATA; } - if (frame->interlaced_frame) { + if (frame->flags & AV_FRAME_FLAG_INTERLACED) { dct_linesize_luma <<= 1; dct_linesize_chroma <<= 1; } @@ -539,7 +540,7 @@ static int dnxhd_decode_macroblock(const DNXHDContext *ctx, RowContext *row, dest_u = frame->data[1] + ((y * dct_linesize_chroma) << 4) + (x << (3 + shift1 + ctx->is_444)); dest_v = frame->data[2] + ((y * dct_linesize_chroma) << 4) + (x << (3 + shift1 + ctx->is_444)); - if (frame->interlaced_frame && ctx->cur_field) { + if ((frame->flags & AV_FRAME_FLAG_INTERLACED) && ctx->cur_field) { dest_y += frame->linesize[0]; dest_u += frame->linesize[1]; dest_v += frame->linesize[2]; @@ -652,14 +653,14 @@ decode_coding_unit: if ((ret = ff_thread_get_buffer(avctx, picture, 0)) < 0) return ret; picture->pict_type = AV_PICTURE_TYPE_I; - picture->key_frame = 1; + picture->flags |= AV_FRAME_FLAG_KEY; } ctx->buf_size = buf_size - ctx->data_offset; ctx->buf = buf + ctx->data_offset; avctx->execute2(avctx, dnxhd_decode_row, picture, NULL, ctx->mb_height); - if (first_field && picture->interlaced_frame) { + if (first_field && (picture->flags & AV_FRAME_FLAG_INTERLACED)) { buf += ctx->cid_table->coding_unit_size; buf_size -= ctx->cid_table->coding_unit_size; first_field = 0; diff --git a/src/third_party/ffmpeg/libavcodec/dnxhdenc.c b/src/third_party/ffmpeg/libavcodec/dnxhdenc.c index 176bf972..a1852fa6 100644 --- a/src/third_party/ffmpeg/libavcodec/dnxhdenc.c +++ b/src/third_party/ffmpeg/libavcodec/dnxhdenc.c @@ -1251,7 +1251,8 @@ static void dnxhd_load_picture(DNXHDEncContext *ctx, const AVFrame *frame) ctx->thread[i]->dct_uv_offset = ctx->m.uvlinesize*8; } - ctx->cur_field = frame->interlaced_frame && !frame->top_field_first; + ctx->cur_field = (frame->flags & AV_FRAME_FLAG_INTERLACED) && + !(frame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST); } static int dnxhd_encode_picture(AVCodecContext *avctx, AVPacket *pkt, diff --git a/src/third_party/ffmpeg/libavcodec/dpcm.c b/src/third_party/ffmpeg/libavcodec/dpcm.c index 6ea9e2c0..eff65874 100644 --- a/src/third_party/ffmpeg/libavcodec/dpcm.c +++ b/src/third_party/ffmpeg/libavcodec/dpcm.c @@ -444,7 +444,7 @@ static int dpcm_decode_frame(AVCodecContext *avctx, AVFrame *frame, if (n & 0x80) s->sample[idx] = sign_extend((n & 0x7f) << 9, 16); else - s->sample[idx] += s->scale * wady_table[n & 0x7f]; + s->sample[idx] += s->scale * (unsigned)wady_table[n & 0x7f]; *output_samples++ = av_clip_int16(s->sample[idx]); idx ^= stereo; } diff --git a/src/third_party/ffmpeg/libavcodec/dpx.c b/src/third_party/ffmpeg/libavcodec/dpx.c index 4f506084..31e4a3f8 100644 --- a/src/third_party/ffmpeg/libavcodec/dpx.c +++ b/src/third_party/ffmpeg/libavcodec/dpx.c @@ -476,14 +476,31 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, avctx->colorspace = AVCOL_SPC_RGB; } + av_strlcpy(creator, avpkt->data + 160, 100); + creator[100] = '\0'; + av_dict_set(&p->metadata, "Creator", creator, 0); + + av_strlcpy(input_device, avpkt->data + 1556, 32); + input_device[32] = '\0'; + av_dict_set(&p->metadata, "Input Device", input_device, 0); + + // Some devices do not pad 10bit samples to whole 32bit words per row + if (!memcmp(input_device, "Scanity", 7) || + !memcmp(creator, "Lasergraphics Inc.", 18)) { + if (bits_per_color == 10) + unpadded_10bit = 1; + } + // Table 3c: Runs will always break at scan line boundaries. Packing // will always break to the next 32-bit word at scan-line boundaries. // Unfortunately, the encoder produced invalid files, so attempt // to detect it + // Also handle special case with unpadded content need_align = FFALIGN(stride, 4); - if (need_align*avctx->height + (int64_t)offset > avpkt->size) { + if (need_align*avctx->height + (int64_t)offset > avpkt->size && + (!unpadded_10bit || (avctx->width * avctx->height * elements + 2) / 3 * 4 + (int64_t)offset > avpkt->size)) { // Alignment seems unappliable, try without - if (stride*avctx->height + (int64_t)offset > avpkt->size) { + if (stride*avctx->height + (int64_t)offset > avpkt->size || unpadded_10bit) { av_log(avctx, AV_LOG_ERROR, "Overread buffer. Invalid header?\n"); return AVERROR_INVALIDDATA; } else { @@ -609,20 +626,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, if ((ret = ff_get_buffer(avctx, p, 0)) < 0) return ret; - av_strlcpy(creator, avpkt->data + 160, 100); - creator[100] = '\0'; - av_dict_set(&p->metadata, "Creator", creator, 0); - - av_strlcpy(input_device, avpkt->data + 1556, 32); - input_device[32] = '\0'; - av_dict_set(&p->metadata, "Input Device", input_device, 0); - - // Some devices do not pad 10bit samples to whole 32bit words per row - if (!memcmp(input_device, "Scanity", 7) || - !memcmp(creator, "Lasergraphics Inc.", 18)) { - unpadded_10bit = 1; - } - // Move pointer to offset from start of file buf = avpkt->data + offset; diff --git a/src/third_party/ffmpeg/libavcodec/dsicinvideo.c b/src/third_party/ffmpeg/libavcodec/dsicinvideo.c index 222044d1..000d79e1 100644 --- a/src/third_party/ffmpeg/libavcodec/dsicinvideo.c +++ b/src/third_party/ffmpeg/libavcodec/dsicinvideo.c @@ -293,7 +293,11 @@ static int cinvideo_decode_frame(AVCodecContext *avctx, AVFrame *rframe, return res; memcpy(cin->frame->data[1], cin->palette, sizeof(cin->palette)); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS cin->frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif for (y = 0; y < cin->avctx->height; ++y) memcpy(cin->frame->data[0] + (cin->avctx->height - 1 - y) * cin->frame->linesize[0], cin->bitmap_table[CIN_CUR_BMP] + y * cin->avctx->width, diff --git a/src/third_party/ffmpeg/libavcodec/dv.h b/src/third_party/ffmpeg/libavcodec/dv.h index 29f97b60..abff9f1e 100644 --- a/src/third_party/ffmpeg/libavcodec/dv.h +++ b/src/third_party/ffmpeg/libavcodec/dv.h @@ -60,6 +60,12 @@ enum DVPackType { */ #define DV_MAX_FRAME_SIZE 576000 +// LCM of video framerate numerators +#define DV_TIMESCALE_VIDEO 60000 + +// LCM of audio sample rates +#define DV_TIMESCALE_AUDIO 14112000 + /** * maximum number of blocks per macroblock in any DV format */ diff --git a/src/third_party/ffmpeg/libavcodec/dvdec.c b/src/third_party/ffmpeg/libavcodec/dvdec.c index afc4bb0b..750e25a4 100644 --- a/src/third_party/ffmpeg/libavcodec/dvdec.c +++ b/src/third_party/ffmpeg/libavcodec/dvdec.c @@ -646,7 +646,7 @@ static int dvvideo_decode_frame(AVCodecContext *avctx, AVFrame *frame, } s->frame = frame; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_I; avctx->pix_fmt = s->sys->pix_fmt; avctx->framerate = av_inv_q(s->sys->time_base); @@ -670,14 +670,14 @@ static int dvvideo_decode_frame(AVCodecContext *avctx, AVFrame *frame, /* Determine the codec's field order from the packet */ if ( *vsc_pack == DV_VIDEO_CONTROL ) { if (avctx->height == 720) { - frame->interlaced_frame = 0; - frame->top_field_first = 0; + frame->flags &= ~AV_FRAME_FLAG_INTERLACED; + frame->flags &= ~AV_FRAME_FLAG_TOP_FIELD_FIRST; } else if (avctx->height == 1080) { - frame->interlaced_frame = 1; - frame->top_field_first = (vsc_pack[3] & 0x40) == 0x40; + frame->flags |= AV_FRAME_FLAG_INTERLACED; + frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST * ((vsc_pack[3] & 0x40) == 0x40); } else { - frame->interlaced_frame = (vsc_pack[3] & 0x10) == 0x10; - frame->top_field_first = !(vsc_pack[3] & 0x40); + frame->flags |= AV_FRAME_FLAG_INTERLACED * ((vsc_pack[3] & 0x10) == 0x10); + frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST * !(vsc_pack[3] & 0x40); } } diff --git a/src/third_party/ffmpeg/libavcodec/dvenc.c b/src/third_party/ffmpeg/libavcodec/dvenc.c index 11dd5763..7bd50174 100644 --- a/src/third_party/ffmpeg/libavcodec/dvenc.c +++ b/src/third_party/ffmpeg/libavcodec/dvenc.c @@ -104,7 +104,9 @@ static av_cold int dvvideo_encode_init(AVCodecContext *avctx) ff_fdctdsp_init(&fdsp, avctx); ff_me_cmp_init(&mecc, avctx); ff_pixblockdsp_init(&pdsp, avctx); - ff_set_cmp(&mecc, mecc.ildct_cmp, avctx->ildct_cmp); + ret = ff_set_cmp(&mecc, mecc.ildct_cmp, avctx->ildct_cmp); + if (ret < 0) + return AVERROR(EINVAL); s->get_pixels = pdsp.get_pixels; s->ildct_cmp = mecc.ildct_cmp[5]; @@ -1046,9 +1048,9 @@ static inline int dv_write_pack(enum DVPackType pack_id, DVEncContext *c, int fs; if (c->avctx->height >= 720) - fs = c->avctx->height == 720 || c->frame->top_field_first ? 0x40 : 0x00; + fs = c->avctx->height == 720 || (c->frame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST) ? 0x40 : 0x00; else - fs = c->frame->top_field_first ? 0x00 : 0x40; + fs = (c->frame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST) ? 0x00 : 0x40; if (DV_PROFILE_IS_HD(c->sys) || (int)(av_q2d(c->avctx->sample_aspect_ratio) * diff --git a/src/third_party/ffmpeg/libavcodec/dxa.c b/src/third_party/ffmpeg/libavcodec/dxa.c index 8d2d2d77..d903b7ec 100644 --- a/src/third_party/ffmpeg/libavcodec/dxa.c +++ b/src/third_party/ffmpeg/libavcodec/dxa.c @@ -230,7 +230,11 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, if ((ret = ff_get_buffer(avctx, frame, AV_GET_BUFFER_FLAG_REF)) < 0) return ret; memcpy(frame->data[1], c->pal, AVPALETTE_SIZE); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = pc; +FF_ENABLE_DEPRECATION_WARNINGS +#endif outptr = frame->data[0]; srcptr = c->decomp_buf; @@ -258,19 +262,19 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, switch(compr){ case -1: - frame->key_frame = 0; + frame->flags &= ~AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_P; if (c->prev->data[0]) memcpy(frame->data[0], c->prev->data[0], frame->linesize[0] * avctx->height); else{ // Should happen only when first frame is 'NULL' memset(frame->data[0], 0, frame->linesize[0] * avctx->height); - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_I; } break; case 2: case 4: - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_I; for (j = 0; j < avctx->height; j++) { memcpy(outptr, srcptr, avctx->width); @@ -285,7 +289,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, if (!(avctx->flags2 & AV_CODEC_FLAG2_SHOW_ALL)) return AVERROR_INVALIDDATA; } - frame->key_frame = 0; + frame->flags &= ~AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_P; for (j = 0; j < avctx->height; j++) { if(tmpptr){ @@ -300,7 +304,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, break; case 12: // ScummVM coding case 13: - frame->key_frame = 0; + frame->flags &= ~AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_P; if (!c->prev->data[0]) { av_log(avctx, AV_LOG_ERROR, "Missing reference frame\n"); diff --git a/src/third_party/ffmpeg/libavcodec/dxtory.c b/src/third_party/ffmpeg/libavcodec/dxtory.c index e13d2748..f36420cd 100644 --- a/src/third_party/ffmpeg/libavcodec/dxtory.c +++ b/src/third_party/ffmpeg/libavcodec/dxtory.c @@ -864,7 +864,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *pic, return ret; pic->pict_type = AV_PICTURE_TYPE_I; - pic->key_frame = 1; + pic->flags |= AV_FRAME_FLAG_KEY; *got_frame = 1; return avpkt->size; diff --git a/src/third_party/ffmpeg/libavcodec/dxv.c b/src/third_party/ffmpeg/libavcodec/dxv.c index 7c848742..5923811b 100644 --- a/src/third_party/ffmpeg/libavcodec/dxv.c +++ b/src/third_party/ffmpeg/libavcodec/dxv.c @@ -1220,7 +1220,7 @@ static int dxv_decode(AVCodecContext *avctx, AVFrame *frame, /* Frame is ready to be output. */ frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; *got_frame = 1; return avpkt->size; diff --git a/src/third_party/ffmpeg/libavcodec/eacmv.c b/src/third_party/ffmpeg/libavcodec/eacmv.c index 18f27dfd..e73e310c 100644 --- a/src/third_party/ffmpeg/libavcodec/eacmv.c +++ b/src/third_party/ffmpeg/libavcodec/eacmv.c @@ -202,10 +202,10 @@ static int cmv_decode_frame(AVCodecContext *avctx, AVFrame *frame, buf += EA_PREAMBLE_SIZE; if ((buf[0]&1)) { // subtype cmv_decode_inter(s, frame, buf+2, buf_end); - frame->key_frame = 0; + frame->flags &= ~AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_P; }else{ - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_I; cmv_decode_intra(s, frame, buf+2, buf_end); } diff --git a/src/third_party/ffmpeg/libavcodec/eatgq.c b/src/third_party/ffmpeg/libavcodec/eatgq.c index 01e1acd4..0f0ed358 100644 --- a/src/third_party/ffmpeg/libavcodec/eatgq.c +++ b/src/third_party/ffmpeg/libavcodec/eatgq.c @@ -237,7 +237,7 @@ static int tgq_decode_frame(AVCodecContext *avctx, AVFrame *frame, if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) return ret; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_I; for (y = 0; y < FFALIGN(avctx->height, 16) >> 4; y++) diff --git a/src/third_party/ffmpeg/libavcodec/eatgv.c b/src/third_party/ffmpeg/libavcodec/eatgv.c index 29f7ee12..a2aead46 100644 --- a/src/third_party/ffmpeg/libavcodec/eatgv.c +++ b/src/third_party/ffmpeg/libavcodec/eatgv.c @@ -310,7 +310,7 @@ static int tgv_decode_frame(AVCodecContext *avctx, AVFrame *frame, if (chunk_type == kVGT_TAG) { int y; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_I; if (!s->frame_buffer && @@ -330,7 +330,7 @@ static int tgv_decode_frame(AVCodecContext *avctx, AVFrame *frame, av_log(avctx, AV_LOG_WARNING, "inter frame without corresponding intra frame\n"); return buf_size; } - frame->key_frame = 0; + frame->flags &= ~AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_P; if (tgv_decode_inter(s, frame, buf, buf_end) < 0) { av_log(avctx, AV_LOG_WARNING, "truncated inter frame\n"); diff --git a/src/third_party/ffmpeg/libavcodec/elbg.c b/src/third_party/ffmpeg/libavcodec/elbg.c index d97a7bc3..7a6a84fb 100644 --- a/src/third_party/ffmpeg/libavcodec/elbg.c +++ b/src/third_party/ffmpeg/libavcodec/elbg.c @@ -44,13 +44,13 @@ typedef struct cell_s { * ELBG internal data */ typedef struct ELBGContext { - int64_t error; + int error; int dim; int num_cb; int *codebook; cell **cells; - int64_t *utility; - int64_t *utility_inc; + int *utility; + int *utility_inc; int *nearest_cb; int *points; int *temp_points; @@ -75,9 +75,12 @@ static inline int distance_limited(int *a, int *b, int dim, int limit) { int i, dist=0; for (i=0; i limit) - return INT_MAX; + int64_t distance = a[i] - b[i]; + + distance *= distance; + if (dist >= limit - distance) + return limit; + dist += distance; } return dist; @@ -97,8 +100,12 @@ static inline void vect_division(int *res, int *vect, int div, int dim) static int eval_error_cell(ELBGContext *elbg, int *centroid, cell *cells) { int error=0; - for (; cells; cells=cells->next) - error += distance_limited(centroid, elbg->points + cells->index*elbg->dim, elbg->dim, INT_MAX); + for (; cells; cells=cells->next) { + int distance = distance_limited(centroid, elbg->points + cells->index*elbg->dim, elbg->dim, INT_MAX); + if (error >= INT_MAX - distance) + return INT_MAX; + error += distance; + } return error; } @@ -178,10 +185,13 @@ static int simple_lbg(ELBGContext *elbg, int dist[2] = {distance_limited(centroid[0], points + tempcell->index*dim, dim, INT_MAX), distance_limited(centroid[1], points + tempcell->index*dim, dim, INT_MAX)}; int idx = dist[0] > dist[1]; - newutility[idx] += dist[idx]; + if (newutility[idx] >= INT_MAX - dist[idx]) + newutility[idx] = INT_MAX; + else + newutility[idx] += dist[idx]; } - return newutility[0] + newutility[1]; + return (newutility[0] >= INT_MAX - newutility[1]) ? INT_MAX : newutility[0] + newutility[1]; } static void get_new_centroids(ELBGContext *elbg, int huc, int *newcentroid_i, @@ -253,9 +263,9 @@ static void evaluate_utility_inc(ELBGContext *elbg) int64_t inc=0; for (int i = 0; i < elbg->num_cb; i++) { - if (elbg->num_cb * elbg->utility[i] > elbg->error) + if (elbg->num_cb * (int64_t)elbg->utility[i] > elbg->error) inc += elbg->utility[i]; - elbg->utility_inc[i] = inc; + elbg->utility_inc[i] = FFMIN(inc, INT_MAX); } } @@ -278,7 +288,7 @@ static void update_utility_and_n_cb(ELBGContext *elbg, int idx, int newutility) */ static void try_shift_candidate(ELBGContext *elbg, int idx[3]) { - int j, k, cont=0; + int j, k, cont=0, tmp; int64_t olderror=0, newerror; int newutility[3]; int *newcentroid[3] = { @@ -305,12 +315,17 @@ static void try_shift_candidate(ELBGContext *elbg, int idx[3]) get_new_centroids(elbg, idx[1], newcentroid[0], newcentroid[1]); newutility[2] = eval_error_cell(elbg, newcentroid[2], elbg->cells[idx[0]]); - newutility[2] += eval_error_cell(elbg, newcentroid[2], elbg->cells[idx[2]]); + tmp = eval_error_cell(elbg, newcentroid[2], elbg->cells[idx[2]]); + newutility[2] = (tmp >= INT_MAX - newutility[2]) ? INT_MAX : newutility[2] + tmp; newerror = newutility[2]; - newerror += simple_lbg(elbg, elbg->dim, newcentroid, newutility, elbg->points, + tmp = simple_lbg(elbg, elbg->dim, newcentroid, newutility, elbg->points, elbg->cells[idx[1]]); + if (tmp >= INT_MAX - newerror) + newerror = INT_MAX; + else + newerror += tmp; if (olderror > newerror) { shift_codebook(elbg, idx, newcentroid); @@ -334,7 +349,7 @@ static void do_shiftings(ELBGContext *elbg) evaluate_utility_inc(elbg); for (idx[0]=0; idx[0] < elbg->num_cb; idx[0]++) - if (elbg->num_cb * elbg->utility[idx[0]] < elbg->error) { + if (elbg->num_cb * (int64_t)elbg->utility[idx[0]] < elbg->error) { if (elbg->utility_inc[elbg->num_cb - 1] == 0) return; @@ -352,9 +367,9 @@ static void do_elbg(ELBGContext *av_restrict elbg, int *points, int numpoints, int *const size_part = elbg->size_part; int i, j, steps = 0; int best_idx = 0; - int64_t last_error; + int last_error; - elbg->error = INT64_MAX; + elbg->error = INT_MAX; elbg->points = points; do { @@ -382,8 +397,9 @@ static void do_elbg(ELBGContext *av_restrict elbg, int *points, int numpoints, } } elbg->nearest_cb[i] = best_idx; - elbg->error += best_dist; - elbg->utility[elbg->nearest_cb[i]] += best_dist; + elbg->error = (elbg->error >= INT_MAX - best_dist) ? INT_MAX : elbg->error + best_dist; + elbg->utility[elbg->nearest_cb[i]] = (elbg->utility[elbg->nearest_cb[i]] >= INT_MAX - best_dist) ? + INT_MAX : elbg->utility[elbg->nearest_cb[i]] + best_dist; free_cells->index = i; free_cells->next = elbg->cells[elbg->nearest_cb[i]]; elbg->cells[elbg->nearest_cb[i]] = free_cells; diff --git a/src/third_party/ffmpeg/libavcodec/encode.c b/src/third_party/ffmpeg/libavcodec/encode.c index 041fc767..ab5f8896 100644 --- a/src/third_party/ffmpeg/libavcodec/encode.c +++ b/src/third_party/ffmpeg/libavcodec/encode.c @@ -192,6 +192,21 @@ int ff_encode_get_frame(AVCodecContext *avctx, AVFrame *frame) av_frame_move_ref(frame, avci->buffer_frame); +#if FF_API_FRAME_KEY +FF_DISABLE_DEPRECATION_WARNINGS + if (frame->key_frame) + frame->flags |= AV_FRAME_FLAG_KEY; +FF_ENABLE_DEPRECATION_WARNINGS +#endif +#if FF_API_INTERLACED_FRAME +FF_DISABLE_DEPRECATION_WARNINGS + if (frame->interlaced_frame) + frame->flags |= AV_FRAME_FLAG_INTERLACED; + if (frame->top_field_first) + frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST; +FF_ENABLE_DEPRECATION_WARNINGS +#endif + return 0; } @@ -457,13 +472,6 @@ static int encode_send_frame_internal(AVCodecContext *avctx, const AVFrame *src) finish: -#if FF_API_PKT_DURATION -FF_DISABLE_DEPRECATION_WARNINGS - if (dst->pkt_duration && dst->pkt_duration != dst->duration) - dst->duration = dst->pkt_duration; -FF_ENABLE_DEPRECATION_WARNINGS -#endif - if (avctx->codec->type == AVMEDIA_TYPE_VIDEO) { ret = encode_generate_icc_profile(avctx, dst); if (ret < 0) @@ -574,6 +582,8 @@ static int encode_preinit_video(AVCodecContext *avctx) return AVERROR(EINVAL); } +#if FF_API_TICKS_PER_FRAME +FF_DISABLE_DEPRECATION_WARNINGS if (avctx->ticks_per_frame && avctx->time_base.num && avctx->ticks_per_frame > INT_MAX / avctx->time_base.num) { av_log(avctx, AV_LOG_ERROR, @@ -583,6 +593,8 @@ static int encode_preinit_video(AVCodecContext *avctx) avctx->time_base.den); return AVERROR(EINVAL); } +FF_ENABLE_DEPRECATION_WARNINGS +#endif if (avctx->hw_frames_ctx) { AVHWFramesContext *frames_ctx = (AVHWFramesContext*)avctx->hw_frames_ctx->data; diff --git a/src/third_party/ffmpeg/libavcodec/error_resilience.c b/src/third_party/ffmpeg/libavcodec/error_resilience.c index bd705006..2aa6f1d8 100644 --- a/src/third_party/ffmpeg/libavcodec/error_resilience.c +++ b/src/third_party/ffmpeg/libavcodec/error_resilience.c @@ -805,7 +805,8 @@ void ff_er_frame_start(ERContext *s) static int er_supported(ERContext *s) { if(s->avctx->hwaccel && s->avctx->hwaccel->decode_slice || - !s->cur_pic.f + !s->cur_pic.f || + s->cur_pic.field_picture ) return 0; return 1; @@ -907,12 +908,6 @@ void ff_er_frame_end(ERContext *s) (s->avctx->skip_top + s->avctx->skip_bottom)) { return; } - - if (!s->warned_fields && (s->cur_pic.field_picture || s->cur_pic.f->interlaced_frame)) { - av_log(s->avctx, AV_LOG_WARNING, "Error concealment is not fully implemented for field pictures.\n"); - s->warned_fields = 1; - } - linesize = s->cur_pic.f->linesize; if ( s->avctx->codec_id == AV_CODEC_ID_MPEG2VIDEO diff --git a/src/third_party/ffmpeg/libavcodec/error_resilience.h b/src/third_party/ffmpeg/libavcodec/error_resilience.h index 55efacac..47cc8a4f 100644 --- a/src/third_party/ffmpeg/libavcodec/error_resilience.h +++ b/src/third_party/ffmpeg/libavcodec/error_resilience.h @@ -87,7 +87,6 @@ typedef struct ERContext { int (*mv)[2][4][2], int mb_x, int mb_y, int mb_intra, int mb_skipped); void *opaque; - int warned_fields; } ERContext; void ff_er_frame_start(ERContext *s); diff --git a/src/third_party/ffmpeg/libavcodec/escape124.c b/src/third_party/ffmpeg/libavcodec/escape124.c index e8a8395f..592de09a 100644 --- a/src/third_party/ffmpeg/libavcodec/escape124.c +++ b/src/third_party/ffmpeg/libavcodec/escape124.c @@ -155,7 +155,7 @@ static MacroBlock decode_macroblock(Escape124Context* s, GetBitContext* gb, // This condition can occur with invalid bitstreams and // *codebook_index == 2 - if (block_index >= s->codebooks[*codebook_index].size) + if (block_index >= s->codebooks[*codebook_index].size || !s->codebooks[*codebook_index].blocks) return (MacroBlock) { { 0 } }; return s->codebooks[*codebook_index].blocks[block_index]; diff --git a/src/third_party/ffmpeg/libavcodec/exr.c b/src/third_party/ffmpeg/libavcodec/exr.c index 2f1766c1..8cc6b056 100644 --- a/src/third_party/ffmpeg/libavcodec/exr.c +++ b/src/third_party/ffmpeg/libavcodec/exr.c @@ -1930,8 +1930,10 @@ static int decode_header(EXRContext *s, AVFrame *frame) bytestream2_get_buffer(gb, key, FFMIN(sizeof(key) - 1, var_size)); if (strncmp("scanlineimage", key, var_size) && - strncmp("tiledimage", key, var_size)) - return AVERROR_PATCHWELCOME; + strncmp("tiledimage", key, var_size)) { + ret = AVERROR_PATCHWELCOME; + goto fail; + } continue; } else if ((var_size = check_header_variable(s, "preview", @@ -1939,12 +1941,16 @@ static int decode_header(EXRContext *s, AVFrame *frame) uint32_t pw = bytestream2_get_le32(gb); uint32_t ph = bytestream2_get_le32(gb); uint64_t psize = pw * ph; - if (psize > INT64_MAX / 4) - return AVERROR_INVALIDDATA; + if (psize > INT64_MAX / 4) { + ret = AVERROR_INVALIDDATA; + goto fail; + } psize *= 4; - if ((int64_t)psize >= bytestream2_get_bytes_left(gb)) - return AVERROR_INVALIDDATA; + if ((int64_t)psize >= bytestream2_get_bytes_left(gb)) { + ret = AVERROR_INVALIDDATA; + goto fail; + } bytestream2_skip(gb, psize); diff --git a/src/third_party/ffmpeg/libavcodec/ffv1dec.c b/src/third_party/ffmpeg/libavcodec/ffv1dec.c index 180d24e6..54cf075b 100644 --- a/src/third_party/ffmpeg/libavcodec/ffv1dec.c +++ b/src/third_party/ffmpeg/libavcodec/ffv1dec.c @@ -217,13 +217,13 @@ static int decode_slice_header(const FFV1Context *f, FFV1Context *fs) ps = get_symbol(c, state, 0); if (ps == 1) { - f->cur->interlaced_frame = 1; - f->cur->top_field_first = 1; + f->cur->flags |= AV_FRAME_FLAG_INTERLACED; + f->cur->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST; } else if (ps == 2) { - f->cur->interlaced_frame = 1; - f->cur->top_field_first = 0; + f->cur->flags |= AV_FRAME_FLAG_INTERLACED; + f->cur->flags &= ~AV_FRAME_FLAG_TOP_FIELD_FIRST; } else if (ps == 3) { - f->cur->interlaced_frame = 0; + f->cur->flags &= ~AV_FRAME_FLAG_INTERLACED; } f->cur->sample_aspect_ratio.num = get_symbol(c, state, 0); f->cur->sample_aspect_ratio.den = get_symbol(c, state, 0); @@ -264,16 +264,16 @@ static int decode_slice(AVCodecContext *c, void *arg) for( si=0; fs != f->slice_context[si]; si ++) ; - if(f->fsrc && !p->key_frame) + if(f->fsrc && !(p->flags & AV_FRAME_FLAG_KEY)) ff_thread_await_progress(&f->last_picture, si, 0); - if(f->fsrc && !p->key_frame) { + if(f->fsrc && !(p->flags & AV_FRAME_FLAG_KEY)) { FFV1Context *fssrc = f->fsrc->slice_context[si]; FFV1Context *fsdst = f->slice_context[si]; av_assert1(fsdst->plane_count == fssrc->plane_count); av_assert1(fsdst == fs); - if (!p->key_frame) + if (!(p->flags & AV_FRAME_FLAG_KEY)) fsdst->slice_damaged |= fssrc->slice_damaged; for (i = 0; i < f->plane_count; i++) { @@ -310,7 +310,7 @@ static int decode_slice(AVCodecContext *c, void *arg) } if ((ret = ff_ffv1_init_slice_state(f, fs)) < 0) return ret; - if (f->cur->key_frame || fs->slice_reset_contexts) { + if ((f->cur->flags & AV_FRAME_FLAG_KEY) || fs->slice_reset_contexts) { ff_ffv1_clear_slice_state(f, fs); } else if (fs->slice_damaged) { return AVERROR_INVALIDDATA; @@ -439,6 +439,11 @@ static int read_extra_header(FFV1Context *f) av_log(f->avctx, AV_LOG_ERROR, "Invalid version in global header\n"); return AVERROR_INVALIDDATA; } + if (f->version > 4) { + av_log(f->avctx, AV_LOG_ERROR, "unsupported version %d\n", + f->version); + return AVERROR_PATCHWELCOME; + } if (f->version > 2) { c->bytestream_end -= 4; f->micro_version = get_symbol(c, state, 0); @@ -876,9 +881,9 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, if (f->version < 3 && avctx->field_order > AV_FIELD_PROGRESSIVE) { /* we have interlaced material flagged in container */ - p->interlaced_frame = 1; + p->flags |= AV_FRAME_FLAG_INTERLACED; if (avctx->field_order == AV_FIELD_TT || avctx->field_order == AV_FIELD_TB) - p->top_field_first = 1; + p->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST; } f->avctx = avctx; @@ -887,7 +892,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, p->pict_type = AV_PICTURE_TYPE_I; //FIXME I vs. P if (get_rac(c, &keystate)) { - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; f->key_frame_ok = 0; if ((ret = read_header(f)) < 0) return ret; @@ -898,7 +903,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, "Cannot decode non-keyframe without valid keyframe\n"); return AVERROR_INVALIDDATA; } - p->key_frame = 0; + p->flags &= ~AV_FRAME_FLAG_KEY; } if (f->ac != AC_GOLOMB_RICE) { @@ -922,7 +927,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, if (avctx->debug & FF_DEBUG_PICT_INFO) av_log(avctx, AV_LOG_DEBUG, "ver:%d keyframe:%d coder:%d ec:%d slices:%d bps:%d\n", - f->version, p->key_frame, f->ac, f->ec, f->slice_count, f->avctx->bits_per_raw_sample); + f->version, !!(p->flags & AV_FRAME_FLAG_KEY), f->ac, f->ec, f->slice_count, f->avctx->bits_per_raw_sample); ff_thread_finish_setup(avctx); diff --git a/src/third_party/ffmpeg/libavcodec/ffv1enc.c b/src/third_party/ffmpeg/libavcodec/ffv1enc.c index fb12776c..746f7175 100644 --- a/src/third_party/ffmpeg/libavcodec/ffv1enc.c +++ b/src/third_party/ffmpeg/libavcodec/ffv1enc.c @@ -916,10 +916,10 @@ static void encode_slice_header(FFV1Context *f, FFV1Context *fs) put_symbol(c, state, f->plane[j].quant_table_index, 0); av_assert0(f->plane[j].quant_table_index == f->context_model); } - if (!f->cur_enc_frame->interlaced_frame) + if (!(f->cur_enc_frame->flags & AV_FRAME_FLAG_INTERLACED)) put_symbol(c, state, 3, 0); else - put_symbol(c, state, 1 + !f->cur_enc_frame->top_field_first, 0); + put_symbol(c, state, 1 + !(f->cur_enc_frame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST), 0); put_symbol(c, state, f->cur_enc_frame->sample_aspect_ratio.num, 0); put_symbol(c, state, f->cur_enc_frame->sample_aspect_ratio.den, 0); if (f->version > 3) { diff --git a/src/third_party/ffmpeg/libavcodec/fic.c b/src/third_party/ffmpeg/libavcodec/fic.c index 94cf4288..fb998021 100644 --- a/src/third_party/ffmpeg/libavcodec/fic.c +++ b/src/third_party/ffmpeg/libavcodec/fic.c @@ -406,11 +406,11 @@ static int fic_decode_frame(AVCodecContext *avctx, AVFrame *rframe, NULL, nslices, sizeof(ctx->slice_data[0]))) < 0) return ret; - ctx->frame->key_frame = 1; + ctx->frame->flags |= AV_FRAME_FLAG_KEY; ctx->frame->pict_type = AV_PICTURE_TYPE_I; for (slice = 0; slice < nslices; slice++) { if (ctx->slice_data[slice].p_frame) { - ctx->frame->key_frame = 0; + ctx->frame->flags &= ~AV_FRAME_FLAG_KEY; ctx->frame->pict_type = AV_PICTURE_TYPE_P; break; } diff --git a/src/third_party/ffmpeg/libavcodec/fitsdec.c b/src/third_party/ffmpeg/libavcodec/fitsdec.c index b9c51e70..284e945b 100644 --- a/src/third_party/ffmpeg/libavcodec/fitsdec.c +++ b/src/third_party/ffmpeg/libavcodec/fitsdec.c @@ -301,7 +301,7 @@ static int fits_decode_frame(AVCodecContext *avctx, AVFrame *p, } } - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; p->pict_type = AV_PICTURE_TYPE_I; *got_frame = 1; @@ -319,6 +319,7 @@ static const AVClass fits_decoder_class = { .item_name = av_default_item_name, .option = fits_options, .version = LIBAVUTIL_VERSION_INT, + .category = AV_CLASS_CATEGORY_DECODER, }; const FFCodec ff_fits_decoder = { diff --git a/src/third_party/ffmpeg/libavcodec/fitsenc.c b/src/third_party/ffmpeg/libavcodec/fitsenc.c index 12952278..86ea11f0 100644 --- a/src/third_party/ffmpeg/libavcodec/fitsenc.c +++ b/src/third_party/ffmpeg/libavcodec/fitsenc.c @@ -104,6 +104,7 @@ static int fits_encode_frame(AVCodecContext *avctx, AVPacket *pkt, bytes_left = padded_data_size - data_size; memset(bytestream, 0, bytes_left); + pkt->flags |= AV_PKT_FLAG_KEY; *got_packet = 1; return 0; diff --git a/src/third_party/ffmpeg/libavcodec/flacdec.c b/src/third_party/ffmpeg/libavcodec/flacdec.c index cc778a8d..524a0469 100644 --- a/src/third_party/ffmpeg/libavcodec/flacdec.c +++ b/src/third_party/ffmpeg/libavcodec/flacdec.c @@ -513,7 +513,7 @@ static int decode_subframe_lpc_33bps(FLACContext *s, int64_t *decoded, for (i = pred_order; i < s->blocksize; i++, decoded++) { int64_t sum = 0; for (j = 0; j < pred_order; j++) - sum += (int64_t)coeffs[j] * decoded[j]; + sum += (int64_t)coeffs[j] * (uint64_t)decoded[j]; decoded[j] = residual[i] + (sum >> qlevel); } diff --git a/src/third_party/ffmpeg/libavcodec/flicvideo.c b/src/third_party/ffmpeg/libavcodec/flicvideo.c index 228f6527..e4b334e1 100644 --- a/src/third_party/ffmpeg/libavcodec/flicvideo.c +++ b/src/third_party/ffmpeg/libavcodec/flicvideo.c @@ -473,7 +473,11 @@ static int flic_decode_frame_8BPP(AVCodecContext *avctx, /* make the palette available on the way out */ memcpy(s->frame->data[1], s->palette, AVPALETTE_SIZE); if (s->new_palette) { +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS s->frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif s->new_palette = 0; } diff --git a/src/third_party/ffmpeg/libavcodec/fmvc.c b/src/third_party/ffmpeg/libavcodec/fmvc.c index 3ee915cc..5e26a541 100644 --- a/src/third_party/ffmpeg/libavcodec/fmvc.c +++ b/src/third_party/ffmpeg/libavcodec/fmvc.c @@ -433,7 +433,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) return ret; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_I; src = s->buffer; @@ -519,7 +519,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) return ret; - frame->key_frame = 0; + frame->flags &= ~AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_P; ssrc = s->buffer; diff --git a/src/third_party/ffmpeg/libavcodec/fraps.c b/src/third_party/ffmpeg/libavcodec/fraps.c index f0a4c4c2..834e6576 100644 --- a/src/third_party/ffmpeg/libavcodec/fraps.c +++ b/src/third_party/ffmpeg/libavcodec/fraps.c @@ -216,7 +216,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *f, } f->pict_type = AV_PICTURE_TYPE_I; - f->key_frame = 1; + f->flags |= AV_FRAME_FLAG_KEY; avctx->pix_fmt = version & 1 ? is_pal ? AV_PIX_FMT_PAL8 : AV_PIX_FMT_BGR24 : AV_PIX_FMT_YUVJ420P; avctx->color_range = version & 1 ? AVCOL_RANGE_UNSPECIFIED diff --git a/src/third_party/ffmpeg/libavcodec/frwu.c b/src/third_party/ffmpeg/libavcodec/frwu.c index cf183f84..70bc1367 100644 --- a/src/third_party/ffmpeg/libavcodec/frwu.c +++ b/src/third_party/ffmpeg/libavcodec/frwu.c @@ -63,7 +63,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *pic, return ret; pic->pict_type = AV_PICTURE_TYPE_I; - pic->key_frame = 1; + pic->flags |= AV_FRAME_FLAG_KEY; for (field = 0; field < 2; field++) { int i; diff --git a/src/third_party/ffmpeg/libavcodec/ftr.c b/src/third_party/ffmpeg/libavcodec/ftr.c index 74a2c10b..7cf1b158 100644 --- a/src/third_party/ffmpeg/libavcodec/ftr.c +++ b/src/third_party/ffmpeg/libavcodec/ftr.c @@ -203,6 +203,10 @@ const FFCodec ff_ftr_decoder = { .close = ftr_close, .flush = ftr_flush, .priv_data_size = sizeof(FTRContext), - .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1, + .p.capabilities = +#if FF_API_SUBFRAMES + AV_CODEC_CAP_SUBFRAMES | +#endif + AV_CODEC_CAP_DR1, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, }; diff --git a/src/third_party/ffmpeg/libavcodec/g2meet.c b/src/third_party/ffmpeg/libavcodec/g2meet.c index 32b966e8..2dfa73df 100644 --- a/src/third_party/ffmpeg/libavcodec/g2meet.c +++ b/src/third_party/ffmpeg/libavcodec/g2meet.c @@ -145,7 +145,8 @@ typedef struct G2MContext { int got_header; uint8_t *framebuf; - int framebuf_stride, old_width, old_height; + int framebuf_stride; + unsigned int framebuf_allocated; uint8_t *synth_tile, *jpeg_tile, *epic_buf, *epic_buf_base; int tile_stride, epic_buf_stride, old_tile_w, old_tile_h; @@ -1160,14 +1161,13 @@ static int g2m_init_buffers(G2MContext *c) { int aligned_height; - if (!c->framebuf || c->old_width < c->width || c->old_height < c->height) { - c->framebuf_stride = FFALIGN(c->width + 15, 16) * 3; - aligned_height = c->height + 15; - av_free(c->framebuf); - c->framebuf = av_calloc(c->framebuf_stride, aligned_height); - if (!c->framebuf) - return AVERROR(ENOMEM); - } + c->framebuf_stride = FFALIGN(c->width + 15, 16) * 3; + aligned_height = c->height + 15; + + av_fast_mallocz(&c->framebuf, &c->framebuf_allocated, c->framebuf_stride * aligned_height); + if (!c->framebuf) + return AVERROR(ENOMEM); + if (!c->synth_tile || !c->jpeg_tile || (c->compression == 2 && !c->epic_buf_base) || c->old_tile_w < c->tile_width || @@ -1560,7 +1560,10 @@ static int g2m_decode_frame(AVCodecContext *avctx, AVFrame *pic, if ((ret = ff_get_buffer(avctx, pic, 0)) < 0) return ret; - pic->key_frame = got_header; + if (got_header) + pic->flags |= AV_FRAME_FLAG_KEY; + else + pic->flags &= ~AV_FRAME_FLAG_KEY; pic->pict_type = got_header ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; for (i = 0; i < avctx->height; i++) @@ -1617,6 +1620,7 @@ static av_cold int g2m_decode_end(AVCodecContext *avctx) av_freep(&c->jpeg_tile); av_freep(&c->cursor); av_freep(&c->framebuf); + c->framebuf_allocated = 0; return 0; } diff --git a/src/third_party/ffmpeg/libavcodec/g723_1dec.c b/src/third_party/ffmpeg/libavcodec/g723_1dec.c index 55e20de5..5fe4a21d 100644 --- a/src/third_party/ffmpeg/libavcodec/g723_1dec.c +++ b/src/third_party/ffmpeg/libavcodec/g723_1dec.c @@ -1118,6 +1118,10 @@ const FFCodec ff_g723_1_decoder = { .priv_data_size = sizeof(G723_1_Context), .init = g723_1_decode_init, FF_CODEC_DECODE_CB(g723_1_decode_frame), - .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1, + .p.capabilities = +#if FF_API_SUBFRAMES + AV_CODEC_CAP_SUBFRAMES | +#endif + AV_CODEC_CAP_DR1, .p.priv_class = &g723_1dec_class, }; diff --git a/src/third_party/ffmpeg/libavcodec/g729dec.c b/src/third_party/ffmpeg/libavcodec/g729dec.c index f783812c..33e1fb9c 100644 --- a/src/third_party/ffmpeg/libavcodec/g729dec.c +++ b/src/third_party/ffmpeg/libavcodec/g729dec.c @@ -760,7 +760,11 @@ const FFCodec ff_g729_decoder = { .init = decoder_init, FF_CODEC_DECODE_CB(decode_frame), .close = decode_close, - .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1, + .p.capabilities = +#if FF_API_SUBFRAMES + AV_CODEC_CAP_SUBFRAMES | +#endif + AV_CODEC_CAP_DR1, }; const FFCodec ff_acelp_kelvin_decoder = { @@ -772,5 +776,9 @@ const FFCodec ff_acelp_kelvin_decoder = { .init = decoder_init, FF_CODEC_DECODE_CB(decode_frame), .close = decode_close, - .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1, + .p.capabilities = +#if FF_API_SUBFRAMES + AV_CODEC_CAP_SUBFRAMES | +#endif + AV_CODEC_CAP_DR1, }; diff --git a/src/third_party/ffmpeg/libavcodec/g729postfilter.c b/src/third_party/ffmpeg/libavcodec/g729postfilter.c index f3cacbac..26e937f0 100644 --- a/src/third_party/ffmpeg/libavcodec/g729postfilter.c +++ b/src/third_party/ffmpeg/libavcodec/g729postfilter.c @@ -353,7 +353,7 @@ static int16_t long_term_filter(AudioDSPContext *adsp, int pitch_delay_int, if (tmp > 0) L_temp0 >>= tmp; else - L_temp1 >>= -tmp; + L_temp1 >>= FFMIN(-tmp, 31); /* Check if longer filter increases the values of R'(k). */ if (L_temp1 > L_temp0) { diff --git a/src/third_party/ffmpeg/libavcodec/gemdec.c b/src/third_party/ffmpeg/libavcodec/gemdec.c index c8fd8dcd..9e2a50c7 100644 --- a/src/third_party/ffmpeg/libavcodec/gemdec.c +++ b/src/third_party/ffmpeg/libavcodec/gemdec.c @@ -180,8 +180,12 @@ static int gem_decode_frame(AVCodecContext *avctx, AVFrame *p, return ret; p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS p->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif palette = (uint32_t *)p->data[1]; if (tag == AV_RB32("STTT")) { diff --git a/src/third_party/ffmpeg/libavcodec/gif_parser.c b/src/third_party/ffmpeg/libavcodec/gif_parser.c index 4c18c00d..aa07585f 100644 --- a/src/third_party/ffmpeg/libavcodec/gif_parser.c +++ b/src/third_party/ffmpeg/libavcodec/gif_parser.c @@ -24,9 +24,6 @@ * GIF parser */ -#include "libavutil/bswap.h" -#include "libavutil/common.h" - #include "gif.h" #include "parser.h" @@ -50,11 +47,13 @@ typedef struct GIFParseContext { int block_size; int etype; int delay; + int keyframe; } GIFParseContext; static int gif_find_frame_end(GIFParseContext *g, const uint8_t *buf, int buf_size, void *logctx) { + ParseContext *pc = &g->pc; int index, next = END_NOT_FOUND; for (index = 0; index < buf_size; index++) { @@ -63,9 +62,10 @@ static int gif_find_frame_end(GIFParseContext *g, const uint8_t *buf, !memcmp(buf + index, gif89a_sig, 6)) { g->state = GIF_HEADER; g->found_sig++; + g->keyframe = 1; } else if (buf[index] == GIF_EXTENSION_INTRODUCER) { g->state = GIF_EXTENSION; - g->found_start = 1; + g->found_start = pc->frame_start_found = 1; } else if (buf[index] == GIF_IMAGE_SEPARATOR) { g->state = GIF_IMAGE; } else if (buf[index] == GIF_TRAILER) { @@ -93,7 +93,7 @@ static int gif_find_frame_end(GIFParseContext *g, const uint8_t *buf, } else if (g->state == GIF_EXTENSION) { if (g->found_start && g->found_end && g->found_sig) { next = index; - g->found_start = 0; + g->found_start = pc->frame_start_found = 0; g->found_end = 0; g->index = 0; g->gct_flag = 0; @@ -140,7 +140,7 @@ static int gif_find_frame_end(GIFParseContext *g, const uint8_t *buf, } g->index++; } else if (g->state == GIF_IMAGE) { - if (g->index == 8) { + if (g->index == 9) { g->gct_flag = !!(buf[index] & 0x80); g->gct_size = 3 * (1 << ((buf[index] & 0x07) + 1)); } @@ -165,14 +165,24 @@ static int gif_parse(AVCodecParserContext *s, AVCodecContext *avctx, GIFParseContext *g = s->priv_data; int next; - next = gif_find_frame_end(g, buf, buf_size, avctx); - if (ff_combine_frame(&g->pc, next, &buf, &buf_size) < 0) { - *poutbuf = NULL; - *poutbuf_size = 0; - return buf_size; + *poutbuf_size = 0; + *poutbuf = NULL; + + if (s->flags & PARSER_FLAG_COMPLETE_FRAMES) { + next = buf_size; + } else { + next = gif_find_frame_end(g, buf, buf_size, avctx); + if (ff_combine_frame(&g->pc, next, &buf, &buf_size) < 0) { + *poutbuf = NULL; + *poutbuf_size = 0; + return buf_size; + } } - s->duration = g->delay; + s->duration = g->delay ? g->delay : 10; + s->key_frame = g->keyframe; + s->pict_type = g->keyframe ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; + g->keyframe = 0; *poutbuf = buf; *poutbuf_size = buf_size; diff --git a/src/third_party/ffmpeg/libavcodec/gifdec.c b/src/third_party/ffmpeg/libavcodec/gifdec.c index f47390c3..0835c5bd 100644 --- a/src/third_party/ffmpeg/libavcodec/gifdec.c +++ b/src/third_party/ffmpeg/libavcodec/gifdec.c @@ -501,7 +501,7 @@ static int gif_decode_frame(AVCodecContext *avctx, AVFrame *rframe, return AVERROR(ENOMEM); s->frame->pict_type = AV_PICTURE_TYPE_I; - s->frame->key_frame = 1; + s->frame->flags |= AV_FRAME_FLAG_KEY; s->keyframe_ok = 1; } else { if (!s->keyframe_ok) { @@ -513,7 +513,7 @@ static int gif_decode_frame(AVCodecContext *avctx, AVFrame *rframe, return ret; s->frame->pict_type = AV_PICTURE_TYPE_P; - s->frame->key_frame = 0; + s->frame->flags &= ~AV_FRAME_FLAG_KEY; } ret = gif_parse_next_image(s, s->frame); diff --git a/src/third_party/ffmpeg/libavcodec/h261dec.c b/src/third_party/ffmpeg/libavcodec/h261dec.c index 84962939..620b7eef 100644 --- a/src/third_party/ffmpeg/libavcodec/h261dec.c +++ b/src/third_party/ffmpeg/libavcodec/h261dec.c @@ -643,7 +643,10 @@ retry: // for skipping the frame s->current_picture.f->pict_type = s->pict_type; - s->current_picture.f->key_frame = s->pict_type == AV_PICTURE_TYPE_I; + if (s->pict_type == AV_PICTURE_TYPE_I) + s->current_picture.f->flags |= AV_FRAME_FLAG_KEY; + else + s->current_picture.f->flags &= ~AV_FRAME_FLAG_KEY; if ((avctx->skip_frame >= AVDISCARD_NONREF && s->pict_type == AV_PICTURE_TYPE_B) || (avctx->skip_frame >= AVDISCARD_NONKEY && s->pict_type != AV_PICTURE_TYPE_I) || diff --git a/src/third_party/ffmpeg/libavcodec/h264_parser.c b/src/third_party/ffmpeg/libavcodec/h264_parser.c index 19a23f0a..6ea4d534 100644 --- a/src/third_party/ffmpeg/libavcodec/h264_parser.c +++ b/src/third_party/ffmpeg/libavcodec/h264_parser.c @@ -568,7 +568,7 @@ static inline int parse_nal_units(AVCodecParserContext *s, if (p->sei.common.unregistered.x264_build < 44U) den *= 2; av_reduce(&avctx->framerate.den, &avctx->framerate.num, - sps->num_units_in_tick * avctx->ticks_per_frame, den, 1 << 30); + sps->num_units_in_tick * 2, den, 1 << 30); } av_freep(&rbsp.rbsp_buffer); @@ -625,7 +625,7 @@ static int h264_parse(AVCodecParserContext *s, parse_nal_units(s, avctx, buf, buf_size); if (avctx->framerate.num) - time_base = av_inv_q(av_mul_q(avctx->framerate, (AVRational){avctx->ticks_per_frame, 1})); + time_base = av_inv_q(av_mul_q(avctx->framerate, (AVRational){2, 1})); if (p->sei.picture_timing.cpb_removal_delay >= 0) { s->dts_sync_point = p->sei.buffering_period.present; s->dts_ref_dts_delta = p->sei.picture_timing.cpb_removal_delay; diff --git a/src/third_party/ffmpeg/libavcodec/h264_picture.c b/src/third_party/ffmpeg/libavcodec/h264_picture.c index 2661ff46..dcaf0fdb 100644 --- a/src/third_party/ffmpeg/libavcodec/h264_picture.c +++ b/src/third_party/ffmpeg/libavcodec/h264_picture.c @@ -154,8 +154,7 @@ int ff_h264_replace_picture(H264Context *h, H264Picture *dst, const H264Picture av_assert0(src->tf.f == src->f); dst->tf.f = dst->f; - ff_thread_release_ext_buffer(h->avctx, &dst->tf); - ret = ff_thread_ref_frame(&dst->tf, &src->tf); + ret = ff_thread_replace_frame(h->avctx, &dst->tf, &src->tf); if (ret < 0) goto fail; diff --git a/src/third_party/ffmpeg/libavcodec/h264_slice.c b/src/third_party/ffmpeg/libavcodec/h264_slice.c index 7767e16c..be7a8e0b 100644 --- a/src/third_party/ffmpeg/libavcodec/h264_slice.c +++ b/src/third_party/ffmpeg/libavcodec/h264_slice.c @@ -501,7 +501,7 @@ FF_ENABLE_DEPRECATION_WARNINGS * in later. * See decode_nal_units(). */ - pic->f->key_frame = 0; + pic->f->flags &= ~AV_FRAME_FLAG_KEY; pic->mmco_reset = 0; pic->recovered = 0; pic->invalid_gap = 0; @@ -809,8 +809,15 @@ static enum AVPixelFormat get_pixel_format(H264Context *h, int force_callback) *fmt++ = AV_PIX_FMT_YUV444P10; } else if (CHROMA422(h)) *fmt++ = AV_PIX_FMT_YUV422P10; - else + else { +#if CONFIG_H264_VAAPI_HWACCEL + // Just add as candidate. Whether VAProfileH264High10 usable or + // not is decided by vaapi_decode_make_config() defined in FFmpeg + // and vaQueryCodingProfile() defined in libva. + *fmt++ = AV_PIX_FMT_VAAPI; +#endif *fmt++ = AV_PIX_FMT_YUV420P10; + } break; case 12: if (CHROMA444(h)) { @@ -950,7 +957,7 @@ static int h264_slice_header_init(H264Context *h) if (h->x264_build < 44U) den *= 2; av_reduce(&h->avctx->framerate.den, &h->avctx->framerate.num, - sps->num_units_in_tick * h->avctx->ticks_per_frame, den, 1 << 30); + sps->num_units_in_tick * 2, den, 1 << 30); } ff_h264_free_tables(h); @@ -1148,9 +1155,10 @@ static int h264_export_frame_props(H264Context *h) const SPS *sps = h->ps.sps; H264Picture *cur = h->cur_pic_ptr; AVFrame *out = cur->f; + int interlaced_frame = 0, top_field_first = 0; int ret; - out->interlaced_frame = 0; + out->flags &= ~AV_FRAME_FLAG_INTERLACED; out->repeat_pict = 0; /* Signal interlacing information externally. */ @@ -1174,15 +1182,15 @@ static int h264_export_frame_props(H264Context *h) break; case H264_SEI_PIC_STRUCT_TOP_FIELD: case H264_SEI_PIC_STRUCT_BOTTOM_FIELD: - out->interlaced_frame = 1; + interlaced_frame = 1; break; case H264_SEI_PIC_STRUCT_TOP_BOTTOM: case H264_SEI_PIC_STRUCT_BOTTOM_TOP: if (FIELD_OR_MBAFF_PICTURE(h)) - out->interlaced_frame = 1; + interlaced_frame = 1; else // try to flag soft telecine progressive - out->interlaced_frame = h->prev_interlaced_frame; + interlaced_frame = !!h->prev_interlaced_frame; break; case H264_SEI_PIC_STRUCT_TOP_BOTTOM_TOP: case H264_SEI_PIC_STRUCT_BOTTOM_TOP_BOTTOM: @@ -1201,35 +1209,34 @@ static int h264_export_frame_props(H264Context *h) if ((pt->ct_type & 3) && pt->pic_struct <= H264_SEI_PIC_STRUCT_BOTTOM_TOP) - out->interlaced_frame = (pt->ct_type & (1 << 1)) != 0; + interlaced_frame = ((pt->ct_type & (1 << 1)) != 0); } else { /* Derive interlacing flag from used decoding process. */ - out->interlaced_frame = FIELD_OR_MBAFF_PICTURE(h); + interlaced_frame = !!FIELD_OR_MBAFF_PICTURE(h); } - h->prev_interlaced_frame = out->interlaced_frame; + h->prev_interlaced_frame = interlaced_frame; if (cur->field_poc[0] != cur->field_poc[1]) { /* Derive top_field_first from field pocs. */ - out->top_field_first = cur->field_poc[0] < cur->field_poc[1]; + top_field_first = (cur->field_poc[0] < cur->field_poc[1]); } else { if (sps->pic_struct_present_flag && h->sei.picture_timing.present) { /* Use picture timing SEI information. Even if it is a * information of a past frame, better than nothing. */ if (h->sei.picture_timing.pic_struct == H264_SEI_PIC_STRUCT_TOP_BOTTOM || h->sei.picture_timing.pic_struct == H264_SEI_PIC_STRUCT_TOP_BOTTOM_TOP) - out->top_field_first = 1; - else - out->top_field_first = 0; - } else if (out->interlaced_frame) { + top_field_first = 1; + } else if (interlaced_frame) { /* Default to top field first when pic_struct_present_flag * is not set but interlaced frame detected */ - out->top_field_first = 1; - } else { + top_field_first = 1; + } // else /* Most likely progressive */ - out->top_field_first = 0; - } } + out->flags |= (AV_FRAME_FLAG_INTERLACED * interlaced_frame) | + (AV_FRAME_FLAG_TOP_FIELD_FIRST * top_field_first); + ret = ff_h2645_sei_to_frame(out, &h->sei.common, AV_CODEC_ID_H264, h->avctx, &sps->vui, sps->bit_depth_luma, sps->bit_depth_chroma, cur->poc + (unsigned)(h->poc_offset << 5)); @@ -1319,7 +1326,7 @@ static int h264_select_output_frame(H264Context *h) out = h->delayed_pic[0]; out_idx = 0; for (i = 1; h->delayed_pic[i] && - !h->delayed_pic[i]->f->key_frame && + !(h->delayed_pic[i]->f->flags & AV_FRAME_FLAG_KEY) && !h->delayed_pic[i]->mmco_reset; i++) if (h->delayed_pic[i]->poc < out->poc) { @@ -1327,7 +1334,7 @@ static int h264_select_output_frame(H264Context *h) out_idx = i; } if (h->avctx->has_b_frames == 0 && - (h->delayed_pic[0]->f->key_frame || h->delayed_pic[0]->mmco_reset)) + ((h->delayed_pic[0]->f->flags & AV_FRAME_FLAG_KEY) || h->delayed_pic[0]->mmco_reset)) h->next_outputed_poc = INT_MIN; out_of_order = out->poc < h->next_outputed_poc; @@ -1338,7 +1345,7 @@ static int h264_select_output_frame(H264Context *h) } if (!out_of_order && pics > h->avctx->has_b_frames) { h->next_output_pic = out; - if (out_idx == 0 && h->delayed_pic[0] && (h->delayed_pic[0]->f->key_frame || h->delayed_pic[0]->mmco_reset)) { + if (out_idx == 0 && h->delayed_pic[0] && ((h->delayed_pic[0]->f->flags & AV_FRAME_FLAG_KEY) || h->delayed_pic[0]->mmco_reset)) { h->next_outputed_poc = INT_MIN; } else h->next_outputed_poc = out->poc; @@ -1628,7 +1635,7 @@ static int h264_field_start(H264Context *h, const H264SliceContext *sl, } } - h->cur_pic_ptr->f->key_frame |= (nal->type == H264_NAL_IDR_SLICE); + h->cur_pic_ptr->f->flags |= AV_FRAME_FLAG_KEY * !!(nal->type == H264_NAL_IDR_SLICE); if (nal->type == H264_NAL_IDR_SLICE || (h->recovery_frame == h->poc.frame_num && nal->ref_idc)) { diff --git a/src/third_party/ffmpeg/libavcodec/h264dec.c b/src/third_party/ffmpeg/libavcodec/h264dec.c index 9db2bf62..859260f7 100644 --- a/src/third_party/ffmpeg/libavcodec/h264dec.c +++ b/src/third_party/ffmpeg/libavcodec/h264dec.c @@ -382,7 +382,11 @@ static av_cold int h264_decode_init(AVCodecContext *avctx) return AVERROR_UNKNOWN; } +#if FF_API_TICKS_PER_FRAME +FF_DISABLE_DEPRECATION_WARNINGS avctx->ticks_per_frame = 2; +FF_ENABLE_DEPRECATION_WARNINGS +#endif if (!avctx->internal->is_copy) { if (avctx->extradata_size > 0 && avctx->extradata) { @@ -849,7 +853,7 @@ static int output_frame(H264Context *h, AVFrame *dst, H264Picture *srcp) av_dict_set(&dst->metadata, "stereo_mode", ff_h264_sei_stereo_mode(&h->sei.common.frame_packing), 0); if (srcp->sei_recovery_frame_cnt == 0) - dst->key_frame = 1; + dst->flags |= AV_FRAME_FLAG_KEY; if (h->avctx->export_side_data & AV_CODEC_EXPORT_DATA_VIDEO_ENC_PARAMS) { ret = h264_export_enc_params(dst, srcp); @@ -951,7 +955,7 @@ static int send_next_delayed_frame(H264Context *h, AVFrame *dst_frame, out_idx = 0; for (i = 1; h->delayed_pic[i] && - !h->delayed_pic[i]->f->key_frame && + !(h->delayed_pic[i]->f->flags & AV_FRAME_FLAG_KEY) && !h->delayed_pic[i]->mmco_reset; i++) if (h->delayed_pic[i]->poc < out->poc) { diff --git a/src/third_party/ffmpeg/libavcodec/hapdec.c b/src/third_party/ffmpeg/libavcodec/hapdec.c index 3df69e63..fee3c04d 100644 --- a/src/third_party/ffmpeg/libavcodec/hapdec.c +++ b/src/third_party/ffmpeg/libavcodec/hapdec.c @@ -328,7 +328,7 @@ static int hap_decode(AVCodecContext *avctx, AVFrame *frame, /* Frame is ready to be output */ frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; *got_frame = 1; return avpkt->size; diff --git a/src/third_party/ffmpeg/libavcodec/hdrdec.c b/src/third_party/ffmpeg/libavcodec/hdrdec.c index 99822774..9b6395bb 100644 --- a/src/third_party/ffmpeg/libavcodec/hdrdec.c +++ b/src/third_party/ffmpeg/libavcodec/hdrdec.c @@ -212,7 +212,7 @@ convert: } } - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; p->pict_type = AV_PICTURE_TYPE_I; *got_frame = 1; diff --git a/src/third_party/ffmpeg/libavcodec/hevc_ps.c b/src/third_party/ffmpeg/libavcodec/hevc_ps.c index 348e4d8d..043e1bf3 100644 --- a/src/third_party/ffmpeg/libavcodec/hevc_ps.c +++ b/src/third_party/ffmpeg/libavcodec/hevc_ps.c @@ -927,8 +927,18 @@ int ff_hevc_parse_sps(HEVCSPS *sps, GetBitContext *gb, unsigned int *sps_id, sps->output_window = sps->pic_conf_win; } - sps->bit_depth = get_ue_golomb_long(gb) + 8; - bit_depth_chroma = get_ue_golomb_long(gb) + 8; + sps->bit_depth = get_ue_golomb_31(gb) + 8; + if (sps->bit_depth > 16) { + av_log(avctx, AV_LOG_ERROR, "Luma bit depth (%d) is out of range\n", + sps->bit_depth); + return AVERROR_INVALIDDATA; + } + bit_depth_chroma = get_ue_golomb_31(gb) + 8; + if (bit_depth_chroma > 16) { + av_log(avctx, AV_LOG_ERROR, "Chroma bit depth (%d) is out of range\n", + bit_depth_chroma); + return AVERROR_INVALIDDATA; + } if (sps->chroma_format_idc && bit_depth_chroma != sps->bit_depth) { av_log(avctx, AV_LOG_ERROR, "Luma bit depth (%d) is different from chroma bit depth (%d), " @@ -1140,17 +1150,24 @@ int ff_hevc_parse_sps(HEVCSPS *sps, GetBitContext *gb, unsigned int *sps_id, sps->sps_curr_pic_ref_enabled_flag = get_bits1(gb); sps->palette_mode_enabled_flag = get_bits1(gb); if (sps->palette_mode_enabled_flag) { - sps->palette_max_size = get_ue_golomb_long(gb); - sps->delta_palette_max_predictor_size = get_ue_golomb_long(gb); + sps->palette_max_size = get_ue_golomb(gb); + sps->delta_palette_max_predictor_size = get_ue_golomb(gb); sps->sps_palette_predictor_initializers_present_flag = get_bits1(gb); if (sps->sps_palette_predictor_initializers_present_flag) { - sps->sps_num_palette_predictor_initializers_minus1 = get_ue_golomb_long(gb); + sps->sps_num_palette_predictor_initializers = get_ue_golomb(gb) + 1; + if (sps->sps_num_palette_predictor_initializers > HEVC_MAX_PALETTE_PREDICTOR_SIZE) { + av_log(avctx, AV_LOG_ERROR, + "sps_num_palette_predictor_initializers out of range: %u\n", + sps->sps_num_palette_predictor_initializers); + return AVERROR_INVALIDDATA; + } num_comps = !sps->chroma_format_idc ? 1 : 3; - for (int comp = 0; comp < num_comps; comp++) - for (i = 0; i <= sps->sps_num_palette_predictor_initializers_minus1; i++) - sps->sps_palette_predictor_initializer[comp][i] = - get_bits(gb, !comp ? sps->bit_depth : sps->bit_depth_chroma); + for (int comp = 0; comp < num_comps; comp++) { + int bit_depth = !comp ? sps->bit_depth : sps->bit_depth_chroma; + for (i = 0; i < sps->sps_num_palette_predictor_initializers; i++) + sps->sps_palette_predictor_initializer[comp][i] = get_bits(gb, bit_depth); + } } } sps->motion_vector_resolution_control_idc = get_bits(gb, 2); @@ -1324,7 +1341,7 @@ static void colour_mapping_octants(GetBitContext *gb, HEVCPPS *pps, int inp_dept int idx_y, int idx_cb, int idx_cr, int inp_length) { unsigned int split_octant_flag, part_num_y, coded_res_flag, res_coeff_q, res_coeff_r; - int bit_depth_cm_input_y, bit_depth_cm_output_y, cm_res_bits; + int cm_res_bits; part_num_y = 1 << pps->cm_y_part_num_log2; @@ -1346,10 +1363,9 @@ static void colour_mapping_octants(GetBitContext *gb, HEVCPPS *pps, int inp_dept if (coded_res_flag) for (int c = 0; c < 3; c++) { res_coeff_q = get_ue_golomb_long(gb); - bit_depth_cm_input_y = 8 + pps->luma_bit_depth_cm_input_minus8; - bit_depth_cm_output_y = 8 + pps->luma_bit_depth_cm_output_minus8; - cm_res_bits = FFMAX(0, 10 + bit_depth_cm_input_y - bit_depth_cm_output_y - - pps->cm_res_quant_bits - (pps->cm_delta_flc_bits_minus1 + 1)); + cm_res_bits = FFMAX(0, 10 + pps->luma_bit_depth_cm_input - + pps->luma_bit_depth_cm_output - + pps->cm_res_quant_bits - pps->cm_delta_flc_bits); res_coeff_r = cm_res_bits ? get_bits(gb, cm_res_bits) : 0; if (res_coeff_q || res_coeff_r) skip_bits1(gb); @@ -1358,22 +1374,27 @@ static void colour_mapping_octants(GetBitContext *gb, HEVCPPS *pps, int inp_dept } } -static void colour_mapping_table(GetBitContext *gb, HEVCPPS *pps) +static int colour_mapping_table(GetBitContext *gb, AVCodecContext *avctx, HEVCPPS *pps) { - pps->num_cm_ref_layers_minus1 = get_ue_golomb_long(gb); - for (int i = 0; i <= pps->num_cm_ref_layers_minus1; i++) + pps->num_cm_ref_layers = get_ue_golomb(gb) + 1; + if (pps->num_cm_ref_layers > 62) { + av_log(avctx, AV_LOG_ERROR, + "num_cm_ref_layers_minus1 shall be in the range [0, 61].\n"); + return AVERROR_INVALIDDATA; + } + for (int i = 0; i < pps->num_cm_ref_layers; i++) pps->cm_ref_layer_id[i] = get_bits(gb, 6); pps->cm_octant_depth = get_bits(gb, 2); pps->cm_y_part_num_log2 = get_bits(gb, 2); - pps->luma_bit_depth_cm_input_minus8 = get_ue_golomb_long(gb); - pps->chroma_bit_depth_cm_input_minus8 = get_ue_golomb_long(gb); - pps->luma_bit_depth_cm_output_minus8 = get_ue_golomb_long(gb); - pps->chroma_bit_depth_cm_output_minus8 = get_ue_golomb_long(gb); + pps->luma_bit_depth_cm_input = get_ue_golomb(gb) + 8; + pps->chroma_bit_depth_cm_input = get_ue_golomb(gb) + 8; + pps->luma_bit_depth_cm_output = get_ue_golomb(gb) + 8; + pps->chroma_bit_depth_cm_output = get_ue_golomb(gb) + 8; pps->cm_res_quant_bits = get_bits(gb, 2); - pps->cm_delta_flc_bits_minus1 = get_bits(gb, 2); + pps->cm_delta_flc_bits = get_bits(gb, 2) + 1; if (pps->cm_octant_depth == 1) { pps->cm_adapt_threshold_u_delta = get_se_golomb_long(gb); @@ -1381,17 +1402,22 @@ static void colour_mapping_table(GetBitContext *gb, HEVCPPS *pps) } colour_mapping_octants(gb, pps, 0, 0, 0, 0, 1 << pps->cm_octant_depth); + + return 0; } static int pps_multilayer_extension(GetBitContext *gb, AVCodecContext *avctx, - HEVCPPS *pps, HEVCSPS *sps) + HEVCPPS *pps, HEVCSPS *sps, HEVCVPS *vps) { pps->poc_reset_info_present_flag = get_bits1(gb); pps->pps_infer_scaling_list_flag = get_bits1(gb); if (pps->pps_infer_scaling_list_flag) pps->pps_scaling_list_ref_layer_id = get_bits(gb, 6); - pps->num_ref_loc_offsets = get_ue_golomb_long(gb); + pps->num_ref_loc_offsets = get_ue_golomb(gb); + if (pps->num_ref_loc_offsets > vps->vps_max_layers - 1) + return AVERROR_INVALIDDATA; + for (int i = 0; i < pps->num_ref_loc_offsets; i++) { pps->ref_loc_offset_layer_id[i] = get_bits(gb, 6); pps->scaled_ref_layer_offset_present_flag[i] = get_bits1(gb); @@ -1412,16 +1438,19 @@ static int pps_multilayer_extension(GetBitContext *gb, AVCodecContext *avctx, pps->resample_phase_set_present_flag[i] = get_bits1(gb); if (pps->resample_phase_set_present_flag[i]) { - pps->phase_hor_luma[pps->ref_loc_offset_layer_id[i]] = get_ue_golomb_long(gb); - pps->phase_ver_luma[pps->ref_loc_offset_layer_id[i]] = get_ue_golomb_long(gb); - pps->phase_hor_chroma_plus8[pps->ref_loc_offset_layer_id[i]] = get_ue_golomb_long(gb); - pps->phase_ver_chroma_plus8[pps->ref_loc_offset_layer_id[i]] = get_ue_golomb_long(gb); + pps->phase_hor_luma[pps->ref_loc_offset_layer_id[i]] = get_ue_golomb_31(gb); + pps->phase_ver_luma[pps->ref_loc_offset_layer_id[i]] = get_ue_golomb_31(gb); + pps->phase_hor_chroma[pps->ref_loc_offset_layer_id[i]] = get_ue_golomb(gb) - 8; + pps->phase_ver_chroma[pps->ref_loc_offset_layer_id[i]] = get_ue_golomb(gb) - 8; } } pps->colour_mapping_enabled_flag = get_bits1(gb); - if (pps->colour_mapping_enabled_flag) - colour_mapping_table(gb, pps); + if (pps->colour_mapping_enabled_flag) { + int ret = colour_mapping_table(gb, avctx, pps); + if (ret < 0) + return ret; + } return 0; } @@ -1476,33 +1505,33 @@ static int pps_range_extensions(GetBitContext *gb, AVCodecContext *avctx, HEVCPPS *pps, HEVCSPS *sps) { if (pps->transform_skip_enabled_flag) { - pps->log2_max_transform_skip_block_size = get_ue_golomb_long(gb) + 2; + pps->log2_max_transform_skip_block_size = get_ue_golomb_31(gb) + 2; } pps->cross_component_prediction_enabled_flag = get_bits1(gb); pps->chroma_qp_offset_list_enabled_flag = get_bits1(gb); if (pps->chroma_qp_offset_list_enabled_flag) { - pps->diff_cu_chroma_qp_offset_depth = get_ue_golomb_long(gb); - pps->chroma_qp_offset_list_len_minus1 = get_ue_golomb_long(gb); + pps->diff_cu_chroma_qp_offset_depth = get_ue_golomb_31(gb); + pps->chroma_qp_offset_list_len_minus1 = get_ue_golomb_31(gb); if (pps->chroma_qp_offset_list_len_minus1 > 5) { av_log(avctx, AV_LOG_ERROR, "chroma_qp_offset_list_len_minus1 shall be in the range [0, 5].\n"); return AVERROR_INVALIDDATA; } for (int i = 0; i <= pps->chroma_qp_offset_list_len_minus1; i++) { - pps->cb_qp_offset_list[i] = get_se_golomb_long(gb); + pps->cb_qp_offset_list[i] = get_se_golomb(gb); if (pps->cb_qp_offset_list[i]) { av_log(avctx, AV_LOG_WARNING, "cb_qp_offset_list not tested yet.\n"); } - pps->cr_qp_offset_list[i] = get_se_golomb_long(gb); + pps->cr_qp_offset_list[i] = get_se_golomb(gb); if (pps->cr_qp_offset_list[i]) { av_log(avctx, AV_LOG_WARNING, "cb_qp_offset_list not tested yet.\n"); } } } - pps->log2_sao_offset_scale_luma = get_ue_golomb_long(gb); - pps->log2_sao_offset_scale_chroma = get_ue_golomb_long(gb); + pps->log2_sao_offset_scale_luma = get_ue_golomb_31(gb); + pps->log2_sao_offset_scale_chroma = get_ue_golomb_31(gb); if ( pps->log2_sao_offset_scale_luma > FFMAX(sps->bit_depth - 10, 0) || pps->log2_sao_offset_scale_chroma > FFMAX(sps->bit_depth_chroma - 10, 0) @@ -1520,9 +1549,9 @@ static int pps_scc_extension(GetBitContext *gb, AVCodecContext *avctx, pps->pps_curr_pic_ref_enabled_flag = get_bits1(gb); if (pps->residual_adaptive_colour_transform_enabled_flag = get_bits1(gb)) { pps->pps_slice_act_qp_offsets_present_flag = get_bits1(gb); - pps->pps_act_y_qp_offset = get_se_golomb_long(gb) - 5; - pps->pps_act_cb_qp_offset = get_se_golomb_long(gb) - 5; - pps->pps_act_cr_qp_offset = get_se_golomb_long(gb) - 3; + pps->pps_act_y_qp_offset = get_se_golomb(gb) - 5; + pps->pps_act_cb_qp_offset = get_se_golomb(gb) - 5; + pps->pps_act_cr_qp_offset = get_se_golomb(gb) - 3; #define CHECK_QP_OFFSET(name) (pps->pps_act_ ## name ## _qp_offset <= -12 || \ pps->pps_act_ ## name ## _qp_offset >= 12) @@ -1536,17 +1565,28 @@ static int pps_scc_extension(GetBitContext *gb, AVCodecContext *avctx, } if (pps->pps_palette_predictor_initializers_present_flag = get_bits1(gb)) { - if ((pps->pps_num_palette_predictor_initializers = get_ue_golomb_long(gb)) > 0) { + pps->pps_num_palette_predictor_initializers = get_ue_golomb(gb); + if (pps->pps_num_palette_predictor_initializers > 0) { + if (pps->pps_num_palette_predictor_initializers > HEVC_MAX_PALETTE_PREDICTOR_SIZE) { + av_log(avctx, AV_LOG_ERROR, + "pps_num_palette_predictor_initializers out of range: %u\n", + pps->pps_num_palette_predictor_initializers); + return AVERROR_INVALIDDATA; + } pps->monochrome_palette_flag = get_bits1(gb); - pps->luma_bit_depth_entry_minus8 = get_ue_golomb_long(gb); + pps->luma_bit_depth_entry = get_ue_golomb_31(gb) + 8; if (!pps->monochrome_palette_flag) - pps->chroma_bit_depth_entry_minus8 = get_ue_golomb_long(gb); + pps->chroma_bit_depth_entry = get_ue_golomb_31(gb) + 8; + + if (pps->chroma_bit_depth_entry > 16 || pps->chroma_bit_depth_entry > 16) + return AVERROR_INVALIDDATA; + num_comps = pps->monochrome_palette_flag ? 1 : 3; - for (int comp = 0; comp < num_comps; comp++) + for (int comp = 0; comp < num_comps; comp++) { + int bit_depth = !comp ? pps->luma_bit_depth_entry : pps->chroma_bit_depth_entry; for (int i = 0; i < pps->pps_num_palette_predictor_initializers; i++) - pps->pps_palette_predictor_initializer[comp][i] = - get_bits(gb, 8 + (!comp ? pps->luma_bit_depth_entry_minus8 : - pps->chroma_bit_depth_entry_minus8)); + pps->pps_palette_predictor_initializer[comp][i] = get_bits(gb, bit_depth); + } } } @@ -1689,6 +1729,7 @@ int ff_hevc_decode_nal_pps(GetBitContext *gb, AVCodecContext *avctx, HEVCParamSets *ps) { HEVCSPS *sps = NULL; + HEVCVPS *vps = NULL; int i, ret = 0; unsigned int pps_id = 0; ptrdiff_t nal_size; @@ -1749,6 +1790,7 @@ int ff_hevc_decode_nal_pps(GetBitContext *gb, AVCodecContext *avctx, goto err; } sps = (HEVCSPS *)ps->sps_list[pps->sps_id]->data; + vps = (HEVCVPS *)ps->vps_list[sps->vps_id]->data; pps->dependent_slice_segments_enabled_flag = get_bits1(gb); pps->output_flag_present_flag = get_bits1(gb); @@ -1758,8 +1800,14 @@ int ff_hevc_decode_nal_pps(GetBitContext *gb, AVCodecContext *avctx, pps->cabac_init_present_flag = get_bits1(gb); - pps->num_ref_idx_l0_default_active = get_ue_golomb_long(gb) + 1; - pps->num_ref_idx_l1_default_active = get_ue_golomb_long(gb) + 1; + pps->num_ref_idx_l0_default_active = get_ue_golomb_31(gb) + 1; + pps->num_ref_idx_l1_default_active = get_ue_golomb_31(gb) + 1; + if (pps->num_ref_idx_l0_default_active >= HEVC_MAX_REFS || + pps->num_ref_idx_l1_default_active >= HEVC_MAX_REFS) { + av_log(avctx, AV_LOG_ERROR, "Too many default refs in PPS: %d/%d.\n", + pps->num_ref_idx_l0_default_active, pps->num_ref_idx_l1_default_active); + goto err; + } pps->pic_init_qp_minus26 = get_se_golomb(gb); @@ -1917,7 +1965,7 @@ int ff_hevc_decode_nal_pps(GetBitContext *gb, AVCodecContext *avctx, } if (pps->pps_multilayer_extension_flag) { - if ((ret = pps_multilayer_extension(gb, avctx, pps, sps)) < 0) + if ((ret = pps_multilayer_extension(gb, avctx, pps, sps, vps)) < 0) goto err; } diff --git a/src/third_party/ffmpeg/libavcodec/hevc_ps.h b/src/third_party/ffmpeg/libavcodec/hevc_ps.h index 1f704108..2124deb9 100644 --- a/src/third_party/ffmpeg/libavcodec/hevc_ps.h +++ b/src/third_party/ffmpeg/libavcodec/hevc_ps.h @@ -219,7 +219,7 @@ typedef struct HEVCSPS { int palette_max_size; int delta_palette_max_predictor_size; int sps_palette_predictor_initializers_present_flag; - int sps_num_palette_predictor_initializers_minus1; + int sps_num_palette_predictor_initializers; int sps_palette_predictor_initializer[3][HEVC_MAX_PALETTE_PREDICTOR_SIZE]; int motion_vector_resolution_control_idc; int intra_boundary_filtering_disabled_flag; @@ -314,34 +314,34 @@ typedef struct HEVCPPS { uint8_t poc_reset_info_present_flag; uint8_t pps_infer_scaling_list_flag; uint8_t pps_scaling_list_ref_layer_id; - uint16_t num_ref_loc_offsets; + uint8_t num_ref_loc_offsets; uint8_t ref_loc_offset_layer_id[64]; uint8_t scaled_ref_layer_offset_present_flag[64]; - int8_t scaled_ref_layer_left_offset[64]; - int8_t scaled_ref_layer_top_offset[64]; - int8_t scaled_ref_layer_right_offset[64]; - int8_t scaled_ref_layer_bottom_offset[64]; + int16_t scaled_ref_layer_left_offset[64]; + int16_t scaled_ref_layer_top_offset[64]; + int16_t scaled_ref_layer_right_offset[64]; + int16_t scaled_ref_layer_bottom_offset[64]; uint8_t ref_region_offset_present_flag[64]; - int8_t ref_region_left_offset[64]; - int8_t ref_region_top_offset[64]; - int8_t ref_region_right_offset[64]; - int8_t ref_region_bottom_offset[64]; + int16_t ref_region_left_offset[64]; + int16_t ref_region_top_offset[64]; + int16_t ref_region_right_offset[64]; + int16_t ref_region_bottom_offset[64]; uint8_t resample_phase_set_present_flag[64]; - uint16_t phase_hor_luma[64]; - uint16_t phase_ver_luma[64]; - uint16_t phase_hor_chroma_plus8[64]; - uint16_t phase_ver_chroma_plus8[64]; + uint8_t phase_hor_luma[64]; + uint8_t phase_ver_luma[64]; + int8_t phase_hor_chroma[64]; + int8_t phase_ver_chroma[64]; uint8_t colour_mapping_enabled_flag; - uint16_t num_cm_ref_layers_minus1; - uint8_t cm_ref_layer_id[63]; + uint8_t num_cm_ref_layers; + uint8_t cm_ref_layer_id[62]; uint8_t cm_octant_depth; uint8_t cm_y_part_num_log2; - uint16_t luma_bit_depth_cm_input_minus8; - uint16_t chroma_bit_depth_cm_input_minus8; - uint16_t luma_bit_depth_cm_output_minus8; - uint16_t chroma_bit_depth_cm_output_minus8; + uint8_t luma_bit_depth_cm_input; + uint8_t chroma_bit_depth_cm_input; + uint8_t luma_bit_depth_cm_output; + uint8_t chroma_bit_depth_cm_output; uint8_t cm_res_quant_bits; - uint8_t cm_delta_flc_bits_minus1; + uint8_t cm_delta_flc_bits; int8_t cm_adapt_threshold_u_delta; int8_t cm_adapt_threshold_v_delta; @@ -358,9 +358,9 @@ typedef struct HEVCPPS { uint8_t pps_palette_predictor_initializers_present_flag; uint8_t pps_num_palette_predictor_initializers; uint8_t monochrome_palette_flag; - uint8_t luma_bit_depth_entry_minus8; - uint8_t chroma_bit_depth_entry_minus8; - uint8_t pps_palette_predictor_initializer[3][HEVC_MAX_PALETTE_PREDICTOR_SIZE]; + uint8_t luma_bit_depth_entry; + uint8_t chroma_bit_depth_entry; + uint16_t pps_palette_predictor_initializer[3][HEVC_MAX_PALETTE_PREDICTOR_SIZE]; // Inferred parameters unsigned int *column_width; ///< ColumnWidth diff --git a/src/third_party/ffmpeg/libavcodec/hevc_refs.c b/src/third_party/ffmpeg/libavcodec/hevc_refs.c index 96153a24..e9be02c4 100644 --- a/src/third_party/ffmpeg/libavcodec/hevc_refs.c +++ b/src/third_party/ffmpeg/libavcodec/hevc_refs.c @@ -111,8 +111,11 @@ static HEVCFrame *alloc_frame(HEVCContext *s) for (j = 0; j < frame->ctb_count; j++) frame->rpl_tab[j] = (RefPicListTab *)frame->rpl_buf->data; - frame->frame->top_field_first = s->sei.picture_timing.picture_struct == AV_PICTURE_STRUCTURE_TOP_FIELD; - frame->frame->interlaced_frame = (s->sei.picture_timing.picture_struct == AV_PICTURE_STRUCTURE_TOP_FIELD) || (s->sei.picture_timing.picture_struct == AV_PICTURE_STRUCTURE_BOTTOM_FIELD); + if (s->sei.picture_timing.picture_struct == AV_PICTURE_STRUCTURE_TOP_FIELD) + frame->frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST; + if ((s->sei.picture_timing.picture_struct == AV_PICTURE_STRUCTURE_TOP_FIELD) || + (s->sei.picture_timing.picture_struct == AV_PICTURE_STRUCTURE_BOTTOM_FIELD)) + frame->frame->flags |= AV_FRAME_FLAG_INTERLACED; if (s->avctx->hwaccel) { const AVHWAccel *hwaccel = s->avctx->hwaccel; diff --git a/src/third_party/ffmpeg/libavcodec/hevcdec.c b/src/third_party/ffmpeg/libavcodec/hevcdec.c index 1a0beac9..7e1bf4e9 100644 --- a/src/third_party/ffmpeg/libavcodec/hevcdec.c +++ b/src/third_party/ffmpeg/libavcodec/hevcdec.c @@ -773,11 +773,11 @@ static int hls_slice_header(HEVCContext *s) sh->nb_refs[L1] = s->ps.pps->num_ref_idx_l1_default_active; if (get_bits1(gb)) { // num_ref_idx_active_override_flag - sh->nb_refs[L0] = get_ue_golomb_long(gb) + 1; + sh->nb_refs[L0] = get_ue_golomb_31(gb) + 1; if (sh->slice_type == HEVC_SLICE_B) - sh->nb_refs[L1] = get_ue_golomb_long(gb) + 1; + sh->nb_refs[L1] = get_ue_golomb_31(gb) + 1; } - if (sh->nb_refs[L0] > HEVC_MAX_REFS || sh->nb_refs[L1] > HEVC_MAX_REFS) { + if (sh->nb_refs[L0] >= HEVC_MAX_REFS || sh->nb_refs[L1] >= HEVC_MAX_REFS) { av_log(s->avctx, AV_LOG_ERROR, "Too many refs: %d/%d.\n", sh->nb_refs[L0], sh->nb_refs[L1]); return AVERROR_INVALIDDATA; @@ -2497,7 +2497,7 @@ static void hls_decode_neighbour(HEVCLocalContext *lc, int x_ctb, int y_ctb, lc->ctb_up_left_flag = ((x_ctb > 0) && (y_ctb > 0) && (ctb_addr_in_slice-1 >= s->ps.sps->ctb_width) && (s->ps.pps->tile_id[ctb_addr_ts] == s->ps.pps->tile_id[s->ps.pps->ctb_addr_rs_to_ts[ctb_addr_rs-1 - s->ps.sps->ctb_width]])); } -static int hls_decode_entry(AVCodecContext *avctxt, void *isFilterThread) +static int hls_decode_entry(AVCodecContext *avctxt, void *arg) { HEVCContext *s = avctxt->priv_data; HEVCLocalContext *const lc = s->HEVClc; @@ -2561,14 +2561,10 @@ static int hls_decode_entry(AVCodecContext *avctxt, void *isFilterThread) static int hls_slice_data(HEVCContext *s) { - int arg[2]; - int ret[2]; + int ret = 0; - arg[0] = 0; - arg[1] = 1; - - s->avctx->execute(s->avctx, hls_decode_entry, arg, ret , 1, sizeof(int)); - return ret[0]; + s->avctx->execute(s->avctx, hls_decode_entry, NULL, &ret , 1, 0); + return ret; } static int hls_decode_entry_wpp(AVCodecContext *avctxt, void *hevc_lclist, int job, int self_id) @@ -2914,7 +2910,10 @@ static int hevc_frame_start(HEVCContext *s) goto fail; } - s->ref->frame->key_frame = IS_IRAP(s); + if (IS_IRAP(s)) + s->ref->frame->flags |= AV_FRAME_FLAG_KEY; + else + s->ref->frame->flags &= ~AV_FRAME_FLAG_KEY; s->ref->needs_fg = s->sei.common.film_grain_characteristics.present && !(s->avctx->export_side_data & AV_CODEC_EXPORT_DATA_FILM_GRAIN) && diff --git a/src/third_party/ffmpeg/libavcodec/hnm4video.c b/src/third_party/ffmpeg/libavcodec/hnm4video.c index f223bb82..51e75789 100644 --- a/src/third_party/ffmpeg/libavcodec/hnm4video.c +++ b/src/third_party/ffmpeg/libavcodec/hnm4video.c @@ -420,7 +420,7 @@ static int hnm_decode_frame(AVCodecContext *avctx, AVFrame *frame, postprocess_current_frame(avctx); copy_processed_frame(avctx, frame); frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; memcpy(frame->data[1], hnm->palette, 256 * 4); *got_frame = 1; } else if (chunk_id == HNM4_CHUNK_ID_IU) { @@ -438,7 +438,7 @@ static int hnm_decode_frame(AVCodecContext *avctx, AVFrame *frame, } copy_processed_frame(avctx, frame); frame->pict_type = AV_PICTURE_TYPE_P; - frame->key_frame = 0; + frame->flags &= ~AV_FRAME_FLAG_KEY; memcpy(frame->data[1], hnm->palette, 256 * 4); *got_frame = 1; FFSWAP(uint8_t *, hnm->current, hnm->previous); diff --git a/src/third_party/ffmpeg/libavcodec/hq_hqa.c b/src/third_party/ffmpeg/libavcodec/hq_hqa.c index 6ce73b7a..db0ac7d9 100644 --- a/src/third_party/ffmpeg/libavcodec/hq_hqa.c +++ b/src/third_party/ffmpeg/libavcodec/hq_hqa.c @@ -354,7 +354,7 @@ static int hq_hqa_decode_frame(AVCodecContext *avctx, AVFrame *pic, return ret; } - pic->key_frame = 1; + pic->flags |= AV_FRAME_FLAG_KEY; pic->pict_type = AV_PICTURE_TYPE_I; *got_frame = 1; diff --git a/src/third_party/ffmpeg/libavcodec/hqx.c b/src/third_party/ffmpeg/libavcodec/hqx.c index 60839465..6554b15e 100644 --- a/src/third_party/ffmpeg/libavcodec/hqx.c +++ b/src/third_party/ffmpeg/libavcodec/hqx.c @@ -504,7 +504,7 @@ static int hqx_decode_frame(AVCodecContext *avctx, AVFrame *frame, avctx->execute2(avctx, decode_slice_thread, NULL, NULL, 16); - ctx->pic->key_frame = 1; + ctx->pic->flags |= AV_FRAME_FLAG_KEY; ctx->pic->pict_type = AV_PICTURE_TYPE_I; *got_picture_ptr = 1; diff --git a/src/third_party/ffmpeg/libavcodec/huffyuvdec.c b/src/third_party/ffmpeg/libavcodec/huffyuvdec.c index 868700ce..c9fcec30 100644 --- a/src/third_party/ffmpeg/libavcodec/huffyuvdec.c +++ b/src/third_party/ffmpeg/libavcodec/huffyuvdec.c @@ -695,9 +695,9 @@ static void decode_422_bitstream(HYuvDecContext *s, int count) /* TODO instead of restarting the read when the code isn't in the first level * of the joint table, jump into the 2nd level of the individual table. */ #define READ_2PIX_PLANE16(dst0, dst1, plane){\ - dst0 = get_vlc2(&s->gb, s->vlc[plane].table, VLC_BITS, 3)<<2;\ + dst0 = get_vlc2(&s->gb, s->vlc[plane].table, VLC_BITS, 3)*4;\ dst0 += get_bits(&s->gb, 2);\ - dst1 = get_vlc2(&s->gb, s->vlc[plane].table, VLC_BITS, 3)<<2;\ + dst1 = get_vlc2(&s->gb, s->vlc[plane].table, VLC_BITS, 3)*4;\ dst1 += get_bits(&s->gb, 2);\ } static void decode_plane_bitstream(HYuvDecContext *s, int width, int plane) diff --git a/src/third_party/ffmpeg/libavcodec/idcinvideo.c b/src/third_party/ffmpeg/libavcodec/idcinvideo.c index f6b8b3cd..d9e46335 100644 --- a/src/third_party/ffmpeg/libavcodec/idcinvideo.c +++ b/src/third_party/ffmpeg/libavcodec/idcinvideo.c @@ -224,7 +224,14 @@ static int idcin_decode_frame(AVCodecContext *avctx, AVFrame *frame, if (idcin_decode_vlcs(s, frame)) return AVERROR_INVALIDDATA; - frame->palette_has_changed = ff_copy_palette(s->pal, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS + frame->palette_has_changed = +#endif + ff_copy_palette(s->pal, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_ENABLE_DEPRECATION_WARNINGS +#endif /* make the palette available on the way out */ memcpy(frame->data[1], s->pal, AVPALETTE_SIZE); diff --git a/src/third_party/ffmpeg/libavcodec/iff.c b/src/third_party/ffmpeg/libavcodec/iff.c index e02d2e77..faf4e21c 100644 --- a/src/third_party/ffmpeg/libavcodec/iff.c +++ b/src/third_party/ffmpeg/libavcodec/iff.c @@ -1887,10 +1887,10 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, } if (avpkt->flags & AV_PKT_FLAG_KEY) { - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_I; } else { - frame->key_frame = 0; + frame->flags &= ~AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_P; } diff --git a/src/third_party/ffmpeg/libavcodec/imm4.c b/src/third_party/ffmpeg/libavcodec/imm4.c index ccec5dff..b95ad869 100644 --- a/src/third_party/ffmpeg/libavcodec/imm4.c +++ b/src/third_party/ffmpeg/libavcodec/imm4.c @@ -420,11 +420,11 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, switch (type) { case 0x19781977: - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_I; break; case 0x12250926: - frame->key_frame = 0; + frame->flags &= ~AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_P; break; default: @@ -434,7 +434,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, if (avctx->width != width || avctx->height != height) { - if (!frame->key_frame) { + if (!(frame->flags & AV_FRAME_FLAG_KEY)) { av_log(avctx, AV_LOG_ERROR, "Frame size change is unsupported.\n"); return AVERROR_INVALIDDATA; } @@ -445,10 +445,10 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, if (ret < 0) return ret; - if ((ret = ff_get_buffer(avctx, frame, frame->key_frame ? AV_GET_BUFFER_FLAG_REF : 0)) < 0) + if ((ret = ff_get_buffer(avctx, frame, (frame->flags & AV_FRAME_FLAG_KEY) ? AV_GET_BUFFER_FLAG_REF : 0)) < 0) return ret; - if (frame->key_frame) { + if (frame->flags & AV_FRAME_FLAG_KEY) { ret = decode_intra(avctx, gb, frame); if (ret < 0) return ret; diff --git a/src/third_party/ffmpeg/libavcodec/imx.c b/src/third_party/ffmpeg/libavcodec/imx.c index 44bab23c..0d9d9b5b 100644 --- a/src/third_party/ffmpeg/libavcodec/imx.c +++ b/src/third_party/ffmpeg/libavcodec/imx.c @@ -58,11 +58,19 @@ static int imx_decode_frame(AVCodecContext *avctx, AVFrame *rframe, return ret; if (ff_copy_palette(imx->pal, avpkt, avctx)) { +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = 1; - frame->key_frame = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif + frame->flags |= AV_FRAME_FLAG_KEY; } else { - frame->key_frame = 0; + frame->flags &= ~AV_FRAME_FLAG_KEY; +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = 0; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } bytestream2_init(&gb, avpkt->data, avpkt->size); @@ -92,7 +100,7 @@ static int imx_decode_frame(AVCodecContext *avctx, AVFrame *rframe, break; } - frame->key_frame = 0; + frame->flags &= ~AV_FRAME_FLAG_KEY; break; case 1: if (len == 0) { @@ -114,7 +122,7 @@ static int imx_decode_frame(AVCodecContext *avctx, AVFrame *rframe, break; } - frame->key_frame = 0; + frame->flags &= ~AV_FRAME_FLAG_KEY; } else { while (len > 0) { fill = bytestream2_get_byte(&gb); @@ -150,7 +158,7 @@ static int imx_decode_frame(AVCodecContext *avctx, AVFrame *rframe, } } - frame->pict_type = frame->key_frame ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; + frame->pict_type = (frame->flags & AV_FRAME_FLAG_KEY) ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; if ((ret = av_frame_ref(rframe, frame)) < 0) return ret; diff --git a/src/third_party/ffmpeg/libavcodec/internal.h b/src/third_party/ffmpeg/libavcodec/internal.h index a283c52e..dceae182 100644 --- a/src/third_party/ffmpeg/libavcodec/internal.h +++ b/src/third_party/ffmpeg/libavcodec/internal.h @@ -148,8 +148,6 @@ typedef struct AVCodecInternal { AVFrame *buffer_frame; int draining_done; - int showed_multi_packet_warning; - /* to prevent infinite loop on errors when draining */ int nb_draining_errors; diff --git a/src/third_party/ffmpeg/libavcodec/interplayacm.c b/src/third_party/ffmpeg/libavcodec/interplayacm.c index a0b9655e..057ab16e 100644 --- a/src/third_party/ffmpeg/libavcodec/interplayacm.c +++ b/src/third_party/ffmpeg/libavcodec/interplayacm.c @@ -37,6 +37,7 @@ static int mul_3x5 [5 * 5 * 5]; static int mul_2x11[11 * 11]; typedef struct InterplayACMContext { + AVCodecContext *avctx; GetBitContext gb; uint8_t *bitstream; int max_framesize; @@ -77,6 +78,7 @@ static av_cold int decode_init(AVCodecContext *avctx) static AVOnce init_static_once = AV_ONCE_INIT; InterplayACMContext *s = avctx->priv_data; + s->avctx = avctx; if (avctx->extradata_size < 14) return AVERROR_INVALIDDATA; @@ -343,7 +345,7 @@ static int t15(InterplayACMContext *s, unsigned ind, unsigned col) /* b = (x1) + (x2 * 3) + (x3 * 9) */ b = get_bits(gb, 5); if (b > 26) { - av_log(NULL, AV_LOG_ERROR, "Too large b = %d > 26\n", b); + av_log(s->avctx, AV_LOG_ERROR, "Too large b = %d > 26\n", b); return AVERROR_INVALIDDATA; } @@ -372,7 +374,7 @@ static int t27(InterplayACMContext *s, unsigned ind, unsigned col) /* b = (x1) + (x2 * 5) + (x3 * 25) */ b = get_bits(gb, 7); if (b > 124) { - av_log(NULL, AV_LOG_ERROR, "Too large b = %d > 124\n", b); + av_log(s->avctx, AV_LOG_ERROR, "Too large b = %d > 124\n", b); return AVERROR_INVALIDDATA; } @@ -400,7 +402,7 @@ static int t37(InterplayACMContext *s, unsigned ind, unsigned col) /* b = (x1) + (x2 * 11) */ b = get_bits(gb, 7); if (b > 120) { - av_log(NULL, AV_LOG_ERROR, "Too large b = %d > 120\n", b); + av_log(s->avctx, AV_LOG_ERROR, "Too large b = %d > 120\n", b); return AVERROR_INVALIDDATA; } diff --git a/src/third_party/ffmpeg/libavcodec/interplayvideo.c b/src/third_party/ffmpeg/libavcodec/interplayvideo.c index 1a3461bf..1f0414bb 100644 --- a/src/third_party/ffmpeg/libavcodec/interplayvideo.c +++ b/src/third_party/ffmpeg/libavcodec/interplayvideo.c @@ -1315,7 +1315,14 @@ static int ipvideo_decode_frame(AVCodecContext *avctx, AVFrame *frame, return ret; if (!s->is_16bpp) { - frame->palette_has_changed = ff_copy_palette(s->pal, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS + frame->palette_has_changed = +#endif + ff_copy_palette(s->pal, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_ENABLE_DEPRECATION_WARNINGS +#endif } switch (frame_format) { diff --git a/src/third_party/ffmpeg/libavcodec/ituh263enc.c b/src/third_party/ffmpeg/libavcodec/ituh263enc.c index c30ecad4..97abfb3f 100644 --- a/src/third_party/ffmpeg/libavcodec/ituh263enc.c +++ b/src/third_party/ffmpeg/libavcodec/ituh263enc.c @@ -865,6 +865,11 @@ av_cold void ff_h263_encode_init(MpegEncContext *s) s->c_dc_scale_table= ff_mpeg1_dc_scale_table; } + if (s->lmin > s->lmax) { + av_log(s->avctx, AV_LOG_WARNING, "Clipping lmin value to %d\n", s->lmax); + s->lmin = s->lmax; + } + ff_thread_once(&init_static_once, h263_encode_init_static); } diff --git a/src/third_party/ffmpeg/libavcodec/j2kenc.c b/src/third_party/ffmpeg/libavcodec/j2kenc.c index 6406f90a..2b0c58cf 100644 --- a/src/third_party/ffmpeg/libavcodec/j2kenc.c +++ b/src/third_party/ffmpeg/libavcodec/j2kenc.c @@ -115,6 +115,7 @@ typedef struct { int width, height; ///< image width and height uint8_t cbps[4]; ///< bits per sample in particular components + uint8_t comp_remap[4]; int chroma_shift[2]; uint8_t planar; int ncomponents; @@ -319,8 +320,8 @@ static int put_siz(Jpeg2000EncoderContext *s) for (i = 0; i < s->ncomponents; i++){ // Ssiz_i XRsiz_i, YRsiz_i bytestream_put_byte(&s->buf, s->cbps[i] - 1); - bytestream_put_byte(&s->buf, i?1<chroma_shift[0]:1); - bytestream_put_byte(&s->buf, i?1<chroma_shift[1]:1); + bytestream_put_byte(&s->buf, (i+1&2)?1<chroma_shift[0]:1); + bytestream_put_byte(&s->buf, (i+1&2)?1<chroma_shift[1]:1); } return 0; } @@ -431,7 +432,7 @@ static void compute_rates(Jpeg2000EncoderContext* s) for (compno = 0; compno < s->ncomponents; compno++) { int tilew = tile->comp[compno].coord[0][1] - tile->comp[compno].coord[0][0]; int tileh = tile->comp[compno].coord[1][1] - tile->comp[compno].coord[1][0]; - int scale = (compno?1 << s->chroma_shift[0]:1) * (compno?1 << s->chroma_shift[1]:1); + int scale = ((compno+1&2)?1 << s->chroma_shift[0]:1) * ((compno+1&2)?1 << s->chroma_shift[1]:1); for (layno = 0; layno < s->nlayers; layno++) { if (s->layer_rates[layno] > 0) { tile->layer_rates[layno] += (double)(tilew * tileh) * s->ncomponents * s->cbps[compno] / @@ -483,7 +484,7 @@ static int init_tiles(Jpeg2000EncoderContext *s) comp->coord[0][1] = comp->coord_o[0][1] = FFMIN((tilex+1)*s->tile_width, s->width); comp->coord[1][0] = comp->coord_o[1][0] = tiley * s->tile_height; comp->coord[1][1] = comp->coord_o[1][1] = FFMIN((tiley+1)*s->tile_height, s->height); - if (compno > 0) + if (compno + 1 & 2) for (i = 0; i < 2; i++) for (j = 0; j < 2; j++) comp->coord[i][j] = comp->coord_o[i][j] = ff_jpeg2000_ceildivpow2(comp->coord[i][j], s->chroma_shift[i]); @@ -492,8 +493,8 @@ static int init_tiles(Jpeg2000EncoderContext *s) codsty, qntsty, s->cbps[compno], - compno?1<chroma_shift[0]:1, - compno?1<chroma_shift[1]:1, + (compno+1&2)?1<chroma_shift[0]:1, + (compno+1&2)?1<chroma_shift[1]:1, s->avctx )) < 0) return ret; @@ -512,17 +513,18 @@ static int init_tiles(Jpeg2000EncoderContext *s) Jpeg2000Tile *tile = s->tile + tileno; \ if (s->planar){ \ for (compno = 0; compno < s->ncomponents; compno++){ \ + int icompno = s->comp_remap[compno]; \ Jpeg2000Component *comp = tile->comp + compno; \ int *dst = comp->i_data; \ int cbps = s->cbps[compno]; \ - line = (const PIXEL*)s->picture->data[compno] \ - + comp->coord[1][0] * (s->picture->linesize[compno] / sizeof(PIXEL)) \ + line = (const PIXEL*)s->picture->data[icompno] \ + + comp->coord[1][0] * (s->picture->linesize[icompno] / sizeof(PIXEL)) \ + comp->coord[0][0]; \ for (y = comp->coord[1][0]; y < comp->coord[1][1]; y++){ \ const PIXEL *ptr = line; \ for (x = comp->coord[0][0]; x < comp->coord[0][1]; x++) \ *dst++ = *ptr++ - (1 << (cbps - 1)); \ - line += s->picture->linesize[compno] / sizeof(PIXEL); \ + line += s->picture->linesize[icompno] / sizeof(PIXEL); \ } \ } \ } else{ \ @@ -721,11 +723,10 @@ static void encode_cblk(Jpeg2000EncoderContext *s, Jpeg2000T1Context *t1, Jpeg20 if (max == 0){ cblk->nonzerobits = 0; - bpno = 0; } else{ cblk->nonzerobits = av_log2(max) + 1 - NMSEDEC_FRACBITS; - bpno = cblk->nonzerobits - 1; } + bpno = cblk->nonzerobits - 1; cblk->data[0] = 0; ff_mqc_initenc(&t1->mqc, cblk->data + 1); @@ -1008,7 +1009,7 @@ static int encode_packets(Jpeg2000EncoderContext *s, Jpeg2000Tile *tile, int til Jpeg2000Component *comp = tile->comp + compno; uint8_t reducedresno = codsty->nreslevels - 1 -reslevelno; // ==> N_L - r Jpeg2000ResLevel *reslevel = comp->reslevel + reslevelno; - int log_subsampling[2] = { compno?s->chroma_shift[0]:0, compno?s->chroma_shift[1]:0}; + int log_subsampling[2] = { (compno+1&2)?s->chroma_shift[0]:0, (compno+1&2)?s->chroma_shift[1]:0}; unsigned prcx, prcy; int trx0, try0; @@ -1069,7 +1070,7 @@ static int encode_packets(Jpeg2000EncoderContext *s, Jpeg2000Tile *tile, int til for (x = tile_coord[0][0]; x < tile_coord[0][1]; x = (x/step_x + 1)*step_x) { for (compno = 0; compno < s->ncomponents; compno++) { Jpeg2000Component *comp = tile->comp + compno; - int log_subsampling[2] = { compno?s->chroma_shift[0]:0, compno?s->chroma_shift[1]:0}; + int log_subsampling[2] = { (compno+1&2)?s->chroma_shift[0]:0, (compno+1&2)?s->chroma_shift[1]:0}; for (reslevelno = 0; reslevelno < codsty->nreslevels; reslevelno++) { unsigned prcx, prcy; @@ -1115,7 +1116,7 @@ static int encode_packets(Jpeg2000EncoderContext *s, Jpeg2000Tile *tile, int til case JPEG2000_PGOD_CPRL: for (compno = 0; compno < s->ncomponents; compno++) { Jpeg2000Component *comp = tile->comp + compno; - int log_subsampling[2] = { compno?s->chroma_shift[0]:0, compno?s->chroma_shift[1]:0}; + int log_subsampling[2] = { (compno+1&2)?s->chroma_shift[0]:0, (compno+1&2)?s->chroma_shift[1]:0}; step_x = 32; step_y = 32; @@ -1531,6 +1532,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, int tileno, ret; Jpeg2000EncoderContext *s = avctx->priv_data; uint8_t *chunkstart, *jp2cstart, *jp2hstart; + const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt); if ((ret = ff_alloc_packet(avctx, pkt, avctx->width*avctx->height*9 + AV_INPUT_BUFFER_MIN_SIZE)) < 0) return ret; @@ -1543,7 +1545,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, s->lambda = s->picture->quality * LAMBDA_SCALE; - if (avctx->pix_fmt == AV_PIX_FMT_BGR48 || avctx->pix_fmt == AV_PIX_FMT_GRAY16) + if (s->cbps[0] > 8) copy_frame_16(s); else copy_frame_8(s); @@ -1587,7 +1589,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, bytestream_put_byte(&s->buf, 1); bytestream_put_byte(&s->buf, 0); bytestream_put_byte(&s->buf, 0); - if (avctx->pix_fmt == AV_PIX_FMT_RGB24 || avctx->pix_fmt == AV_PIX_FMT_PAL8) { + if ((desc->flags & AV_PIX_FMT_FLAG_RGB) || avctx->pix_fmt == AV_PIX_FMT_PAL8) { bytestream_put_be32(&s->buf, 16); } else if (s->ncomponents == 1) { bytestream_put_be32(&s->buf, 17); @@ -1717,6 +1719,7 @@ static av_cold int j2kenc_init(AVCodecContext *avctx) Jpeg2000EncoderContext *s = avctx->priv_data; Jpeg2000CodingStyle *codsty = &s->codsty; Jpeg2000QuantStyle *qntsty = &s->qntsty; + const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt); s->avctx = avctx; av_log(s->avctx, AV_LOG_DEBUG, "init\n"); @@ -1729,7 +1732,7 @@ static av_cold int j2kenc_init(AVCodecContext *avctx) if (avctx->pix_fmt == AV_PIX_FMT_PAL8 && (s->pred != FF_DWT97_INT || s->format != CODEC_JP2)) { av_log(s->avctx, AV_LOG_WARNING, "Forcing lossless jp2 for pal8\n"); - s->pred = FF_DWT97_INT; + s->pred = 1; s->format = CODEC_JP2; } @@ -1759,24 +1762,23 @@ static av_cold int j2kenc_init(AVCodecContext *avctx) s->width = avctx->width; s->height = avctx->height; - for (i = 0; i < 3; i++) { - if (avctx->pix_fmt == AV_PIX_FMT_GRAY16 || avctx->pix_fmt == AV_PIX_FMT_RGB48) - s->cbps[i] = 16; - else - s->cbps[i] = 8; + s->ncomponents = desc->nb_components; + for (i = 0; i < 4; i++) { + s->cbps[i] = desc->comp[i].depth; + s->comp_remap[i] = i; //default } - if (avctx->pix_fmt == AV_PIX_FMT_RGB24 || avctx->pix_fmt == AV_PIX_FMT_RGB48){ - s->ncomponents = 3; - } else if (avctx->pix_fmt == AV_PIX_FMT_GRAY8 || avctx->pix_fmt == AV_PIX_FMT_PAL8 || avctx->pix_fmt == AV_PIX_FMT_GRAY16){ - s->ncomponents = 1; - } else{ // planar YUV + if ((desc->flags & AV_PIX_FMT_FLAG_PLANAR) && s->ncomponents > 1) { s->planar = 1; - s->ncomponents = 3; ret = av_pix_fmt_get_chroma_sub_sample(avctx->pix_fmt, s->chroma_shift, s->chroma_shift + 1); if (ret) return ret; + if (desc->flags & AV_PIX_FMT_FLAG_RGB) { + s->comp_remap[0] = 2; + s->comp_remap[1] = 0; + s->comp_remap[2] = 1; + } } ff_thread_once(&init_static_once, init_luts); @@ -1810,7 +1812,7 @@ static const AVOption options[] = { { "tile_height", "Tile Height", OFFSET(tile_height), AV_OPT_TYPE_INT, { .i64 = 256 }, 1, 1<<30, VE, }, { "pred", "DWT Type", OFFSET(pred), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VE, "pred" }, { "dwt97int", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 0 }, INT_MIN, INT_MAX, VE, "pred" }, - { "dwt53", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 0 }, INT_MIN, INT_MAX, VE, "pred" }, + { "dwt53", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 1 }, INT_MIN, INT_MAX, VE, "pred" }, { "sop", "SOP marker", OFFSET(sop), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VE, }, { "eph", "EPH marker", OFFSET(eph), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VE, }, { "prog", "Progression Order", OFFSET(prog), AV_OPT_TYPE_INT, { .i64 = 0 }, JPEG2000_PGOD_LRCP, JPEG2000_PGOD_CPRL, VE, "prog" }, @@ -1835,17 +1837,30 @@ const FFCodec ff_jpeg2000_encoder = { CODEC_LONG_NAME("JPEG 2000"), .p.type = AVMEDIA_TYPE_VIDEO, .p.id = AV_CODEC_ID_JPEG2000, - .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE, + .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE | + AV_CODEC_CAP_FRAME_THREADS, .priv_data_size = sizeof(Jpeg2000EncoderContext), .init = j2kenc_init, FF_CODEC_ENCODE_CB(encode_frame), .close = j2kenc_destroy, .p.pix_fmts = (const enum AVPixelFormat[]) { - AV_PIX_FMT_RGB24, AV_PIX_FMT_YUV444P, AV_PIX_FMT_GRAY8, - AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV422P, - AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUV411P, + AV_PIX_FMT_RGB24, AV_PIX_FMT_RGB48, + AV_PIX_FMT_GBR24P,AV_PIX_FMT_GBRP9, AV_PIX_FMT_GBRP10, AV_PIX_FMT_GBRP12, AV_PIX_FMT_GBRP14, AV_PIX_FMT_GBRP16, + AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY9, AV_PIX_FMT_GRAY10, AV_PIX_FMT_GRAY12, AV_PIX_FMT_GRAY14, AV_PIX_FMT_GRAY16, + AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV420P9, AV_PIX_FMT_YUV420P10, AV_PIX_FMT_YUV420P12, AV_PIX_FMT_YUV420P14, AV_PIX_FMT_YUV420P16, + AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV422P9, AV_PIX_FMT_YUV422P10, AV_PIX_FMT_YUV422P12, AV_PIX_FMT_YUV422P14, AV_PIX_FMT_YUV422P16, + AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV444P9, AV_PIX_FMT_YUV444P10, AV_PIX_FMT_YUV444P12, AV_PIX_FMT_YUV444P14, AV_PIX_FMT_YUV444P16, + AV_PIX_FMT_YUV440P, AV_PIX_FMT_YUV440P10, AV_PIX_FMT_YUV440P12, + AV_PIX_FMT_YUV411P, + AV_PIX_FMT_YUV410P, + AV_PIX_FMT_YA8, AV_PIX_FMT_YA16, + AV_PIX_FMT_RGBA, AV_PIX_FMT_RGBA64, + AV_PIX_FMT_GBRAP, AV_PIX_FMT_GBRAP10, AV_PIX_FMT_GBRAP12, AV_PIX_FMT_GBRAP16, + AV_PIX_FMT_YUVA420P, AV_PIX_FMT_YUVA420P9, AV_PIX_FMT_YUVA420P10, AV_PIX_FMT_YUVA420P16, + AV_PIX_FMT_YUVA422P, AV_PIX_FMT_YUVA422P9, AV_PIX_FMT_YUVA422P10, AV_PIX_FMT_YUVA422P16, + AV_PIX_FMT_YUVA444P, AV_PIX_FMT_YUVA444P9, AV_PIX_FMT_YUVA444P10, AV_PIX_FMT_YUVA444P16, + AV_PIX_FMT_PAL8, - AV_PIX_FMT_RGB48, AV_PIX_FMT_GRAY16, AV_PIX_FMT_NONE }, .p.priv_class = &j2k_class, diff --git a/src/third_party/ffmpeg/libavcodec/jpeg2000.h b/src/third_party/ffmpeg/libavcodec/jpeg2000.h index e5ecb4cb..d004c08f 100644 --- a/src/third_party/ffmpeg/libavcodec/jpeg2000.h +++ b/src/third_party/ffmpeg/libavcodec/jpeg2000.h @@ -111,7 +111,7 @@ enum Jpeg2000Quantsty { // quantization style #define JPEG2000_CSTY_SOP 0x02 // SOP marker present #define JPEG2000_CSTY_EPH 0x04 // EPH marker present #define JPEG2000_CTSY_HTJ2K_F 0x40 // Only HT code-blocks (Rec. ITU-T T.814 | ISO/IEC 15444-15) are present -#define JPEG2000_CTSY_HTJ2K_M 0xC0 // HT code blocks (Rec. ITU-T T.814 | ISO/IEC 15444-15) can be present +#define JPEG2000_CTSY_HTJ2K_M 0xC0 // HT code-blocks (Rec. ITU-T T.814 | ISO/IEC 15444-15) can be present // Progression orders #define JPEG2000_PGOD_LRCP 0x00 // Layer-resolution level-component-position progression @@ -189,6 +189,9 @@ typedef struct Jpeg2000Cblk { Jpeg2000Pass *passes; Jpeg2000Layer *layers; int coord[2][2]; // border coordinates {{x0, x1}, {y0, y1}} + /* specific to HT code-blocks */ + int zbp; + int pass_lengths[2]; } Jpeg2000Cblk; // code block typedef struct Jpeg2000Prec { diff --git a/src/third_party/ffmpeg/libavcodec/jpeg2000dec.c b/src/third_party/ffmpeg/libavcodec/jpeg2000dec.c index c2b81ec1..0e95cca6 100644 --- a/src/third_party/ffmpeg/libavcodec/jpeg2000dec.c +++ b/src/third_party/ffmpeg/libavcodec/jpeg2000dec.c @@ -42,6 +42,8 @@ #include "jpeg2000.h" #include "jpeg2000dsp.h" #include "profiles.h" +#include "jpeg2000dec.h" +#include "jpeg2000htdec.h" #define JP2_SIG_TYPE 0x6A502020 #define JP2_SIG_VALUE 0x0D0A870A @@ -51,93 +53,6 @@ #define HAD_COC 0x01 #define HAD_QCC 0x02 -#define MAX_POCS 32 - -typedef struct Jpeg2000POCEntry { - uint16_t LYEpoc; - uint16_t CSpoc; - uint16_t CEpoc; - uint8_t RSpoc; - uint8_t REpoc; - uint8_t Ppoc; -} Jpeg2000POCEntry; - -typedef struct Jpeg2000POC { - Jpeg2000POCEntry poc[MAX_POCS]; - int nb_poc; - int is_default; -} Jpeg2000POC; - -typedef struct Jpeg2000TilePart { - uint8_t tile_index; // Tile index who refers the tile-part - const uint8_t *tp_end; - GetByteContext header_tpg; // bit stream of header if PPM header is used - GetByteContext tpg; // bit stream in tile-part -} Jpeg2000TilePart; - -/* RMK: For JPEG2000 DCINEMA 3 tile-parts in a tile - * one per component, so tile_part elements have a size of 3 */ -typedef struct Jpeg2000Tile { - Jpeg2000Component *comp; - uint8_t properties[4]; - Jpeg2000CodingStyle codsty[4]; - Jpeg2000QuantStyle qntsty[4]; - Jpeg2000POC poc; - Jpeg2000TilePart tile_part[32]; - uint8_t has_ppt; // whether this tile has a ppt marker - uint8_t *packed_headers; // contains packed headers. Used only along with PPT marker - int packed_headers_size; // size in bytes of the packed headers - GetByteContext packed_headers_stream; // byte context corresponding to packed headers - uint16_t tp_idx; // Tile-part index - int coord[2][2]; // border coordinates {{x0, x1}, {y0, y1}} -} Jpeg2000Tile; - -typedef struct Jpeg2000DecoderContext { - AVClass *class; - AVCodecContext *avctx; - GetByteContext g; - - int width, height; - int image_offset_x, image_offset_y; - int tile_offset_x, tile_offset_y; - uint8_t cbps[4]; // bits per sample in particular components - uint8_t sgnd[4]; // if a component is signed - uint8_t properties[4]; - - uint8_t has_ppm; - uint8_t *packed_headers; // contains packed headers. Used only along with PPM marker - int packed_headers_size; - GetByteContext packed_headers_stream; - uint8_t in_tile_headers; - - int cdx[4], cdy[4]; - int precision; - int ncomponents; - int colour_space; - uint32_t palette[256]; - int8_t pal8; - int cdef[4]; - int tile_width, tile_height; - unsigned numXtiles, numYtiles; - int maxtilelen; - AVRational sar; - - Jpeg2000CodingStyle codsty[4]; - Jpeg2000QuantStyle qntsty[4]; - Jpeg2000POC poc; - uint8_t roi_shift[4]; - - int bit_index; - - int curtileno; - - Jpeg2000Tile *tile; - Jpeg2000DSPContext dsp; - - /*options parameters*/ - int reduction_factor; -} Jpeg2000DecoderContext; - /* get_bits functions for JPEG2000 packet bitstream * It is a get_bit function with a bit-stuffing routine. If the value of the * byte is 0xFF, the next byte includes an extra zero bit stuffed into the MSB. @@ -449,6 +364,10 @@ static int get_siz(Jpeg2000DecoderContext *s) s->cdx[0] == s->cdx[1] && s->cdy[0] == s->cdy[1]) { s->avctx->pix_fmt = AV_PIX_FMT_YA8; i = 0; + } else if (ncomponents == 2 && s->precision == 16 && + s->cdx[0] == s->cdx[1] && s->cdy[0] == s->cdy[1]) { + s->avctx->pix_fmt = AV_PIX_FMT_YA16; + i = 0; } else if (ncomponents == 1 && s->precision == 8) { s->avctx->pix_fmt = AV_PIX_FMT_GRAY8; i = 0; @@ -522,12 +441,12 @@ static int get_cox(Jpeg2000DecoderContext *s, Jpeg2000CodingStyle *c) c->cblk_style = bytestream2_get_byteu(&s->g); if (c->cblk_style != 0) { // cblk style if (c->cblk_style & JPEG2000_CTSY_HTJ2K_M || c->cblk_style & JPEG2000_CTSY_HTJ2K_F) { - av_log(s->avctx, AV_LOG_ERROR, "Support for High throughput JPEG 2000 is not yet available\n"); - return AVERROR_PATCHWELCOME; + av_log(s->avctx,AV_LOG_TRACE,"High Throughput jpeg 2000 codestream.\n"); + } else { + av_log(s->avctx, AV_LOG_WARNING, "extra cblk styles %X\n", c->cblk_style); + if (c->cblk_style & JPEG2000_CBLK_BYPASS) + av_log(s->avctx, AV_LOG_WARNING, "Selective arithmetic coding bypass\n"); } - av_log(s->avctx, AV_LOG_WARNING, "extra cblk styles %X\n", c->cblk_style); - if (c->cblk_style & JPEG2000_CBLK_BYPASS) - av_log(s->avctx, AV_LOG_WARNING, "Selective arithmetic coding bypass\n"); } c->transform = bytestream2_get_byteu(&s->g); // DWT transformation type /* set integer 9/7 DWT in case of BITEXACT flag */ @@ -1152,13 +1071,15 @@ static int jpeg2000_decode_packet(Jpeg2000DecoderContext *s, Jpeg2000Tile *tile, return incl; if (!cblk->npasses) { - int v = expn[bandno] + numgbits - 1 - - tag_tree_decode(s, prec->zerobits + cblkno, 100); + int zbp = tag_tree_decode(s, prec->zerobits + cblkno, 100); + int v = expn[bandno] + numgbits - 1 - zbp; + if (v < 0 || v > 30) { av_log(s->avctx, AV_LOG_ERROR, "nonzerobits %d invalid or unsupported\n", v); return AVERROR_INVALIDDATA; } + cblk->zbp = zbp; cblk->nonzerobits = v; } if ((newpasses = getnpasses(s)) < 0) @@ -1199,8 +1120,23 @@ static int jpeg2000_decode_packet(Jpeg2000DecoderContext *s, Jpeg2000Tile *tile, } } - if ((ret = get_bits(s, av_log2(newpasses1) + cblk->lblock)) < 0) - return ret; + if (newpasses > 1 && (codsty->cblk_style & JPEG2000_CTSY_HTJ2K_F)) { + // Retrieve pass lengths for each pass + int href_passes = (cblk->npasses + newpasses - 1) % 3; + int eb = av_log2(newpasses - href_passes); + int extra_bit = newpasses > 2 ? 1 : 0; + if ((ret = get_bits(s, llen + eb + 3)) < 0) + return ret; + cblk->pass_lengths[0] = ret; + if ((ret = get_bits(s, llen + 3 + extra_bit)) < 0) + return ret; + cblk->pass_lengths[1] = ret; + ret = cblk->pass_lengths[0] + cblk->pass_lengths[1]; + } else { + if ((ret = get_bits(s, av_log2(newpasses1) + cblk->lblock)) < 0) + return ret; + cblk->pass_lengths[0] = ret; + } if (ret > cblk->data_allocated) { size_t new_size = FFMAX(2*cblk->data_allocated, ret); void *new = av_realloc(cblk->data, new_size); @@ -1949,9 +1885,12 @@ static inline void tile_codeblocks(const Jpeg2000DecoderContext *s, Jpeg2000Tile /* Loop on tile components */ for (compno = 0; compno < s->ncomponents; compno++) { - Jpeg2000Component *comp = tile->comp + compno; - Jpeg2000CodingStyle *codsty = tile->codsty + compno; + Jpeg2000Component *comp = tile->comp + compno; + Jpeg2000CodingStyle *codsty = tile->codsty + compno; + Jpeg2000QuantStyle *quantsty = tile->qntsty + compno; + int coded = 0; + int subbandno = 0; t1.stride = (1<log2_cblk_width) + 2; @@ -1959,7 +1898,7 @@ static inline void tile_codeblocks(const Jpeg2000DecoderContext *s, Jpeg2000Tile for (reslevelno = 0; reslevelno < codsty->nreslevels2decode; reslevelno++) { Jpeg2000ResLevel *rlevel = comp->reslevel + reslevelno; /* Loop on bands */ - for (bandno = 0; bandno < rlevel->nbands; bandno++) { + for (bandno = 0; bandno < rlevel->nbands; bandno++, subbandno++) { int nb_precincts, precno; Jpeg2000Band *band = rlevel->band + bandno; int cblkno = 0, bandpos; @@ -1979,12 +1918,23 @@ static inline void tile_codeblocks(const Jpeg2000DecoderContext *s, Jpeg2000Tile for (cblkno = 0; cblkno < prec->nb_codeblocks_width * prec->nb_codeblocks_height; cblkno++) { - int x, y; + int x, y, ret; + /* See Rec. ITU-T T.800, Equation E-2 */ + int magp = quantsty->expn[subbandno] + quantsty->nguardbits - 1; + Jpeg2000Cblk *cblk = prec->cblk + cblkno; - int ret = decode_cblk(s, codsty, &t1, cblk, - cblk->coord[0][1] - cblk->coord[0][0], - cblk->coord[1][1] - cblk->coord[1][0], - bandpos, comp->roi_shift); + + if (codsty->cblk_style & JPEG2000_CTSY_HTJ2K_F) + ret = ff_jpeg2000_decode_htj2k(s, codsty, &t1, cblk, + cblk->coord[0][1] - cblk->coord[0][0], + cblk->coord[1][1] - cblk->coord[1][0], + magp, comp->roi_shift); + else + ret = decode_cblk(s, codsty, &t1, cblk, + cblk->coord[0][1] - cblk->coord[0][0], + cblk->coord[1][1] - cblk->coord[1][0], + bandpos, comp->roi_shift); + if (ret) coded = 1; else @@ -2532,7 +2482,7 @@ static int jpeg2000_decode_frame(AVCodecContext *avctx, AVFrame *picture, if ((ret = ff_thread_get_buffer(avctx, picture, 0)) < 0) goto end; picture->pict_type = AV_PICTURE_TYPE_I; - picture->key_frame = 1; + picture->flags |= AV_FRAME_FLAG_KEY; if (ret = jpeg2000_read_bitstream_packets(s)) goto end; diff --git a/src/third_party/ffmpeg/libavcodec/jpeg2000dec.h b/src/third_party/ffmpeg/libavcodec/jpeg2000dec.h new file mode 100644 index 00000000..d0ca6e7a --- /dev/null +++ b/src/third_party/ffmpeg/libavcodec/jpeg2000dec.h @@ -0,0 +1,119 @@ +/* + * JPEG 2000 image decoder + * Copyright (c) 2007 Kamil Nowosad + * Copyright (c) 2013 Nicolas Bertrand + * Copyright (c) 2022 Caleb Etemesi + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_JPEG2000DEC_H +#define AVCODEC_JPEG2000DEC_H + +#include "bytestream.h" +#include "jpeg2000.h" +#include "jpeg2000dsp.h" + + +#define MAX_POCS 32 + +typedef struct Jpeg2000POCEntry { + uint16_t LYEpoc; + uint16_t CSpoc; + uint16_t CEpoc; + uint8_t RSpoc; + uint8_t REpoc; + uint8_t Ppoc; +} Jpeg2000POCEntry; + +typedef struct Jpeg2000POC { + Jpeg2000POCEntry poc[MAX_POCS]; + int nb_poc; + int is_default; +} Jpeg2000POC; + +typedef struct Jpeg2000TilePart { + uint8_t tile_index; // Tile index who refers the tile-part + const uint8_t *tp_end; + GetByteContext header_tpg; // bit stream of header if PPM header is used + GetByteContext tpg; // bit stream in tile-part +} Jpeg2000TilePart; + +/* RMK: For JPEG2000 DCINEMA 3 tile-parts in a tile + * one per component, so tile_part elements have a size of 3 */ +typedef struct Jpeg2000Tile { + Jpeg2000Component *comp; + uint8_t properties[4]; + Jpeg2000CodingStyle codsty[4]; + Jpeg2000QuantStyle qntsty[4]; + Jpeg2000POC poc; + Jpeg2000TilePart tile_part[32]; + uint8_t has_ppt; // whether this tile has a ppt marker + uint8_t *packed_headers; // contains packed headers. Used only along with PPT marker + int packed_headers_size; // size in bytes of the packed headers + GetByteContext packed_headers_stream; // byte context corresponding to packed headers + uint16_t tp_idx; // Tile-part index + int coord[2][2]; // border coordinates {{x0, x1}, {y0, y1}} +} Jpeg2000Tile; + +typedef struct Jpeg2000DecoderContext { + AVClass *class; + AVCodecContext *avctx; + GetByteContext g; + + int width, height; + int image_offset_x, image_offset_y; + int tile_offset_x, tile_offset_y; + uint8_t cbps[4]; // bits per sample in particular components + uint8_t sgnd[4]; // if a component is signed + uint8_t properties[4]; + + uint8_t has_ppm; + uint8_t *packed_headers; // contains packed headers. Used only along with PPM marker + int packed_headers_size; + GetByteContext packed_headers_stream; + uint8_t in_tile_headers; + + int cdx[4], cdy[4]; + int precision; + int ncomponents; + int colour_space; + uint32_t palette[256]; + int8_t pal8; + int cdef[4]; + int tile_width, tile_height; + unsigned numXtiles, numYtiles; + int maxtilelen; + AVRational sar; + + Jpeg2000CodingStyle codsty[4]; + Jpeg2000QuantStyle qntsty[4]; + Jpeg2000POC poc; + uint8_t roi_shift[4]; + + int bit_index; + + int curtileno; + + Jpeg2000Tile *tile; + Jpeg2000DSPContext dsp; + + /*options parameters*/ + int reduction_factor; +} Jpeg2000DecoderContext; + +#endif //AVCODEC_JPEG2000DEC_H diff --git a/src/third_party/ffmpeg/libavcodec/jpeg2000htdec.c b/src/third_party/ffmpeg/libavcodec/jpeg2000htdec.c new file mode 100644 index 00000000..51cd96e0 --- /dev/null +++ b/src/third_party/ffmpeg/libavcodec/jpeg2000htdec.c @@ -0,0 +1,1451 @@ +/* + * Copyright (c) 2022 Caleb Etemesi + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/* + * Copyright 2019 - 2021, Osamu Watanabe + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its contributors + * may be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include "libavutil/attributes.h" +#include "libavutil/common.h" +#include "libavutil/avassert.h" +#include "jpeg2000htdec.h" +#include "jpeg2000.h" +#include "jpeg2000dec.h" + +#define J2K_Q1 0 +#define J2K_Q2 1 + +#define HT_SHIFT_SIGMA 0 +#define HT_SHIFT_SCAN 4 +#define HT_SHIFT_REF 3 +#define HT_SHIFT_REF_IND 2 + +/* See Rec. ITU-T T.800, Table 2 */ +const static uint8_t mel_e[13] = { 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 4, 5 }; + +static const uint16_t dec_cxt_vlc_table1[1024]; +static const uint16_t dec_cxt_vlc_table0[1024]; + +typedef struct StateVars { + int32_t pos; + uint32_t bits; + uint32_t tmp; + uint32_t last; + uint8_t bits_left; + uint64_t bit_buf; +} StateVars; + +typedef struct MelDecoderState { + uint8_t k; + uint8_t run; + uint8_t one; +} MelDecoderState; + +/** + * Given a precomputed c, checks whether n % d == 0. c is precomputed from d + * using precompute_c(). + */ +av_always_inline +static uint32_t is_divisible(uint32_t n, uint64_t c) +{ + return n * c <= c - 1; +} + +/** + * Precompute the number c used by is_divisible(). + */ +av_always_inline +static uint64_t precompute_c(uint32_t d) +{ + return 1 + (0xffffffffffffffffull / d); +} + +static void jpeg2000_init_zero(StateVars *s) +{ + s->bits_left = 0; + s->bit_buf = 0; + s->tmp = 0; + s->bits = 0; + s->pos = 0; + s->last = 0; +} + +static void jpeg2000_init_mel(StateVars *s, uint32_t Pcup) +{ + jpeg2000_init_zero(s); + s->pos = Pcup; +} + +static void jpeg2000_init_mag_ref(StateVars *s, uint32_t Lref) +{ + s->pos = Lref - 2; + s->bits = 0; + s->last = 0xFF; + s->tmp = 0; + s->bits_left = 0; + s->bit_buf = 0; +} + +static void jpeg2000_init_mel_decoder(MelDecoderState *mel_state) +{ + mel_state->k = 0; + mel_state->run = 0; + mel_state->one = 0; +} + +/** + * Refill the buffer backwards in little endian while skipping over stuffing + * bits. Stuffing bits are those that appear in the position of any byte whose + * LSBs are all 1's if the last consumed byte was larger than 0x8F. + */ +static int jpeg2000_bitbuf_refill_backwards(StateVars *buffer, const uint8_t *array) +{ + uint64_t tmp = 0; + int32_t position = buffer->pos; + uint32_t new_bits = 32; + + if (buffer->bits_left >= 32) + return 0; // enough data, no need to pull in more bits + + /** + * We are reading bytes from end to start and need to handle being close to + * the end. Subtracting by 4 means we will read some of the bytes of the MEL + * byte stream since the MEL byte stream ends at the start of the VLC byte + * stream. This is okay as they are masked away since we check for cases + * where that occurs (when the position is less than 4). + */ + position -= 4; + + tmp = AV_RB32(&array[position + 1]); + + if (buffer->pos < 4){ + /* mask un-needed bits if we are close to input end */ + uint64_t mask = (1ull << (buffer->pos + 1) * 8) - 1; + tmp &= mask; + } + + /** + * Unstuff bits. Load a temporary byte, which precedes the position we + * currently at, to ensure that we can also un-stuff if the stuffed bit is + * the bottom most bits. + */ + tmp <<= 8; + tmp |= array[buffer->pos + 1]; + + if ((tmp & 0x7FFF000000) > 0x7F8F000000) { + tmp &= 0x7FFFFFFFFF; + new_bits--; + } + if ((tmp & 0x007FFF0000) > 0x007F8F0000) { + tmp = (tmp & 0x007FFFFFFF) + ((tmp & 0xFF00000000) >> 1); + new_bits--; + } + if ((tmp & 0x00007FFF00) > 0x00007F8F00) { + tmp = (tmp & 0x00007FFFFF) + ((tmp & 0xFFFF000000) >> 1); + new_bits--; + } + if ((tmp & 0x0000007FFF) > 0x0000007F8F) { + tmp = (tmp & 0x0000007FFF) + ((tmp & 0xFFFFFF0000) >> 1); + new_bits--; + } + + tmp >>= 8; // Remove temporary byte loaded + + /* Add bits to the MSB of the bit buffer */ + buffer->bit_buf |= tmp << buffer->bits_left; + buffer->bits_left += new_bits; + buffer->pos = FFMAX(0, position); + return 0; +} + +/** + * Refill the bit-buffer reading new bits going forward + * in the stream while skipping over stuffed bits. + */ +static void jpeg2000_bitbuf_refill_forward(StateVars *buffer, const uint8_t *array, + uint32_t length) +{ + while (buffer->bits_left < 32) { + buffer->tmp = 0xFF; + buffer->bits = (buffer->last == 0xFF) ? 7 : 8; + if (buffer->pos <= length) { + buffer->tmp = array[buffer->pos]; + buffer->pos += 1; + buffer->last = buffer->tmp; + } + buffer->bit_buf |= ((uint64_t) buffer->tmp) << buffer->bits_left; + buffer->bits_left += buffer->bits; + } +} + +/** + * Drops bits from lower bits in the bit buffer. buf contains the bit buffers. + * nbits is the number of bits to remove. + */ +av_always_inline +static void jpeg2000_bitbuf_drop_bits_lsb(StateVars *buf, uint8_t nbits) +{ + av_assert2(buf->bits_left >= nbits); // cannot read more bits than available + buf->bit_buf >>= nbits; + buf->bits_left -= nbits; +} + +/** + * Get bits from the bit buffer reading them from the least significant bits + * moving to the most significant bits. In case there are fewer bits, refill + * from buf moving backwards. + */ +av_always_inline +static uint64_t jpeg2000_bitbuf_get_bits_lsb(StateVars *bit_stream, uint8_t nbits, + const uint8_t *buf) +{ + uint64_t bits; + uint64_t mask = (1ull << nbits) - 1; + if (bit_stream->bits_left < nbits) + jpeg2000_bitbuf_refill_backwards(bit_stream, buf); + bits = bit_stream->bit_buf & mask; + jpeg2000_bitbuf_drop_bits_lsb(bit_stream, nbits); + return bits; +} + +/** + * Get bits from the bit buffer reading them from the least significant bits + * moving to the most significant bits. In case there are fewer bits, refill from + * buf moving forward. + */ +av_always_inline +static uint64_t jpeg2000_bitbuf_get_bits_lsb_forward(StateVars *bit_stream, + uint8_t nbits, const uint8_t *buf, + uint32_t length) +{ + uint64_t bits; + uint64_t mask = (1ull << nbits) - 1; + + if (bit_stream->bits_left <= nbits) + jpeg2000_bitbuf_refill_forward(bit_stream, buf, length); + bits = bit_stream->bit_buf & mask; + jpeg2000_bitbuf_drop_bits_lsb(bit_stream, nbits); + return bits; +} + +/** + * Look ahead bit buffer without discarding bits. + */ +av_always_inline +static uint64_t jpeg2000_bitbuf_peek_bits_lsb(StateVars *stream, uint8_t nbits) +{ + uint64_t mask = (1ull << nbits) - 1; + return stream->bit_buf & mask; +} + +static void jpeg2000_init_vlc(StateVars *s, uint32_t Lcup, uint32_t Pcup, + const uint8_t *Dcup) +{ + s->bits_left = 0; + s->bit_buf = 0; + s->pos = Lcup - 2 - Pcup; + s->last = Dcup[Lcup - 2]; + s->tmp = (s->last) >> 4; + s->bits = ((s->tmp & 7) < 7) ? 4 : 3; + + jpeg2000_bitbuf_refill_backwards(s, Dcup + Pcup); + jpeg2000_bitbuf_drop_bits_lsb(s, 4); +} + +/** + * Decode prefix codes for VLC segment. See Rec. ITU-T T.814, 7.3.5. + */ +av_always_inline +static int jpeg2000_decode_ctx_vlc(const Jpeg2000DecoderContext *s, + StateVars *vlc_stream, const uint16_t *table, + const uint8_t *Dcup, uint8_t *sig_pat, + uint8_t *res_off, uint8_t *emb_pat_k, + uint8_t *emb_pat_1, uint8_t pos, + uint32_t Pcup, uint16_t context) +{ + uint32_t value; + uint8_t len; + uint64_t index; + uint64_t code_word; + + jpeg2000_bitbuf_refill_backwards(vlc_stream, Dcup + Pcup); + + code_word = vlc_stream->bit_buf & 0x7f; + index = code_word + (context << 7); + + av_assert0(index < 1024); // The CxtVLC table has 1024 entries. + + value = table[index]; + + len = (value & 0x000F) >> 1; + + res_off[pos] = (uint8_t) (value & 1); + sig_pat[pos] = (uint8_t) ((value & 0x00F0) >> 4); + emb_pat_k[pos] = (uint8_t) ((value & 0x0F00) >> 8); + emb_pat_1[pos] = (uint8_t) ((value & 0xF000) >> 12); + + jpeg2000_bitbuf_drop_bits_lsb(vlc_stream, len); + return 0; +} + +/** + * Decode variable length u-vlc prefix. See decodeUPrefix procedure at Rec. + * ITU-T T.814, 7.3.6. + */ +av_always_inline +static uint8_t vlc_decode_u_prefix(StateVars *vlc_stream, const uint8_t *refill_array) +{ + static const uint8_t return_value[8] = { 5, 1, 2, 1, 3, 1, 2, 1 }; + static const uint8_t drop_bits[8] = { 3, 1, 2, 1, 3, 1, 2, 1 }; + + uint8_t bits; + + if (vlc_stream->bits_left < 3) + jpeg2000_bitbuf_refill_backwards(vlc_stream, refill_array); + + bits = jpeg2000_bitbuf_peek_bits_lsb(vlc_stream, 3); + + jpeg2000_bitbuf_drop_bits_lsb(vlc_stream, drop_bits[bits]); + return return_value[bits]; +} + +/** + * Decode variable length u-vlc suffix. See decodeUSuffix procedure at Rec. + * ITU-T T.814, 7.3.6. + */ +av_always_inline +static uint8_t vlc_decode_u_suffix(StateVars *vlc_stream, uint8_t suffix, + const uint8_t *refill_array) +{ + static const int mask[] = { 1, 31 }; + static const int drop_bits[] = { 1, 5 }; + + uint8_t bits; + int cond = suffix != 3; + if (suffix < 3) + return 0; + + if (vlc_stream->bits_left < 5) + jpeg2000_bitbuf_refill_backwards(vlc_stream, refill_array); + + bits = jpeg2000_bitbuf_peek_bits_lsb(vlc_stream, 5); + + jpeg2000_bitbuf_drop_bits_lsb(vlc_stream, drop_bits[cond]); + return bits & mask[cond]; +} + +/** + * Decode u-vlc extension values. See decodeUExtension procedure at Rec. ITU-T + * T.814, 7.3.6. + */ +av_always_inline +static uint8_t vlc_decode_u_extension(StateVars *vlc_stream, uint8_t suffix, + const uint8_t *refill_array) +{ + return jpeg2000_bitbuf_get_bits_lsb(vlc_stream, 4 * (suffix >= 28), refill_array); +} + +/** + * Magnitude and Sign decode procedures. See decodeMagSgnValue procedure at Rec. + * ITU-T T.814, 7.3.8. + */ +av_always_inline +static int32_t jpeg2000_decode_mag_sgn(StateVars *mag_sgn_stream, int32_t m_n, + int32_t i_n, const uint8_t *buf, uint32_t length) +{ + int32_t val = 0; + if (m_n > 0) { + val = jpeg2000_bitbuf_get_bits_lsb_forward(mag_sgn_stream,m_n,buf,length); + val += (i_n << m_n); + } + return val; +} + +av_always_inline +static void recover_mag_sgn(StateVars *mag_sgn, uint8_t pos, uint16_t q, int32_t m_n[2], + int32_t known_1[2], const uint8_t emb_pat_1[2], + int32_t v[2][4], int32_t m[2][4], uint8_t *E, + uint32_t *mu_n, const uint8_t *Dcup, uint32_t Pcup, + uint32_t pLSB) +{ + for (int i = 0; i < 4; i++) { + int32_t n = 4 * q + i; + m_n[pos] = m[pos][i]; + known_1[pos] = (emb_pat_1[pos] >> i) & 1; + v[pos][i] = jpeg2000_decode_mag_sgn(mag_sgn, m_n[pos], known_1[pos], Dcup, Pcup); + + if (m_n[pos] != 0) { + E[n] = 32 - ff_clz(v[pos][i] | 1); + mu_n[n] = (v[pos][i] >> 1) + 1; + mu_n[n] <<= pLSB; + mu_n[n] |= ((uint32_t) (v[pos][i] & 1)) << 31; // sign bit. + } + } +} + +static int jpeg2000_import_bit(StateVars *stream, const uint8_t *array, uint32_t length) +{ + int cond = stream->pos <= length; + int pos = FFMIN(stream->pos, length); + if (stream->bits == 0) { + stream->bits = (stream->tmp == 0xFF) ? 7 : 8; + stream->pos += cond; + stream->tmp = cond ? array[pos] : 0xFF; + } + stream->bits -= 1; + return (stream->tmp >> stream->bits) & 1; +} + +static int jpeg2000_peek_bit(StateVars *stream, const uint8_t *array, uint32_t length) +{ + if (stream->bits == 0) { + int cond = stream->pos <= length; + int pos = FFMIN(stream->pos, length); + stream->bits = (stream->tmp == 0xFF) ? 7 : 8; + stream->pos += cond; + stream->tmp = cond ? array[pos] : 0xFF; + } + return (stream->tmp >> stream->bits) & 1; +} + +static int jpeg2000_decode_mel_sym(MelDecoderState *mel_state, + StateVars *mel_stream, + const uint8_t *Dcup, + uint32_t Lcup) +{ + + if (mel_state->run == 0 && mel_state->one == 0) { + uint8_t eval; + uint8_t bit; + + eval = mel_e[mel_state->k]; + bit = jpeg2000_import_bit(mel_stream, Dcup, Lcup); + if (bit == 1) { + mel_state->run = 1 << eval; + mel_state->k = FFMIN(12, mel_state->k + 1); + } else { + mel_state->run = 0; + while (eval > 0) { + bit = jpeg2000_import_bit(mel_stream, Dcup, Lcup); + mel_state->run = (2 * (mel_state->run)) + bit; + eval -= 1; + } + mel_state->k = FFMAX(0, mel_state->k - 1); + mel_state->one = 1; + } + } + if (mel_state->run > 0) { + mel_state->run -= 1; + return 0; + } else { + mel_state->one = 0; + return 1; + } +} + +/** + * Magref decoding procedures. + */ +av_always_inline +static int jpeg2000_import_magref_bit(StateVars *stream, const uint8_t *array, + uint32_t length) +{ + return jpeg2000_bitbuf_get_bits_lsb(stream, 1, array); +} + +/** + * Signal EMB decode. + */ +static int jpeg2000_decode_sig_emb(const Jpeg2000DecoderContext *s, MelDecoderState *mel_state, + StateVars *mel_stream, StateVars *vlc_stream, + const uint16_t *vlc_table, const uint8_t *Dcup, + uint8_t *sig_pat, uint8_t *res_off, uint8_t *emb_pat_k, + uint8_t *emb_pat_1, uint8_t pos, uint16_t context, + uint32_t Lcup, uint32_t Pcup) +{ + if (context == 0) { + uint8_t sym; + sym = jpeg2000_decode_mel_sym(mel_state, mel_stream, Dcup, Lcup); + if (sym == 0) { + sig_pat[pos] = 0; + res_off[pos] = 0; + emb_pat_k[pos] = 0; + emb_pat_1[pos] = 0; + return 0; + } + } + return jpeg2000_decode_ctx_vlc(s, vlc_stream, vlc_table, Dcup, sig_pat, + res_off, emb_pat_k, emb_pat_1, pos, Pcup, + context); +} + +av_always_inline +static int jpeg2000_get_state(int x1, int x2, int width, int shift_by, + const uint8_t *block_states) +{ + return (block_states[(x1 + 1) * (width + 2) + (x2 + 1)] >> shift_by) & 1; +} + +av_always_inline +static void jpeg2000_modify_state(int x1, int x2, int width, + int value, uint8_t *block_states) +{ + block_states[(x1 + 1) * (width + 2) + (x2 + 1)] |= value; +} + +av_always_inline +static int jpeg2000_decode_ht_cleanup_segment(const Jpeg2000DecoderContext *s, + Jpeg2000Cblk *cblk, Jpeg2000T1Context *t1, + MelDecoderState *mel_state, + StateVars *mel_stream, StateVars *vlc_stream, + StateVars *mag_sgn_stream, const uint8_t *Dcup, + uint32_t Lcup, uint32_t Pcup, uint8_t pLSB, + int width, int height, int32_t *sample_buf, + uint8_t *block_states) +{ + uint16_t q = 0; // Represents current quad position + uint16_t q1, q2; + uint16_t context1, context2; + uint16_t context = 0; + + uint8_t sig_pat[2] = { 0 }; // significance pattern + uint8_t res_off[2] = { 0 }; // residual offset + uint8_t emb_pat_k[2] = { 0 }; // exponent Max Bound pattern K + uint8_t emb_pat_1[2] = { 0 }; // exponent Max Bound pattern 1 + uint8_t gamma[2] = { 0 }; + + uint8_t E_n[2] = { 0 }; + uint8_t E_ne[2] = { 0 }; + uint8_t E_nw[2] = { 0 }; + uint8_t E_nf[2] = { 0 }; + + uint8_t max_e[2] = { 0 }; + uint8_t u_pfx[2] = { 0 }; + uint8_t u_sfx[2] = { 0 }; + uint8_t u_ext[2] = { 0 }; + + int32_t u[2] = { 0 }; + int32_t U[2] = { 0 }; // exponent bound + int32_t m_n[2] = { 0 }; + int32_t known_1[2] = { 0 }; + + int32_t m[2][4] = { 0 }; + int32_t v[2][4] = { 0 }; + + uint8_t kappa[2] = { 1, 1 }; + + int ret = 0; + + int sp; + + uint64_t c; + + uint8_t *sigma; + uint32_t *mu; + + const uint8_t *vlc_buf = Dcup + Pcup; + + /* convert to raster-scan */ + const uint16_t is_border_x = width % 2; + const uint16_t is_border_y = height % 2; + + const uint16_t quad_width = ff_jpeg2000_ceildivpow2(width, 1); + const uint16_t quad_height = ff_jpeg2000_ceildivpow2(height, 1); + + size_t buf_size = 4 * quad_width * quad_height; + + uint8_t *sigma_n = av_calloc(buf_size, sizeof(uint8_t)); + uint8_t *E = av_calloc(buf_size, sizeof(uint8_t)); + uint32_t *mu_n = av_calloc(buf_size, sizeof(uint32_t)); + + if (!sigma_n || !E || !mu_n) { + ret = AVERROR(ENOMEM); + goto free; + } + + sigma = sigma_n; + mu = mu_n; + + while (q < quad_width - 1) { + q1 = q; + q2 = q1 + 1; + + if ((ret = jpeg2000_decode_sig_emb(s, mel_state, mel_stream, vlc_stream, + dec_cxt_vlc_table0, Dcup, sig_pat, res_off, + emb_pat_k, emb_pat_1, J2K_Q1, context, Lcup, + Pcup)) < 0) + goto free; + + for (int i = 0; i < 4; i++) + sigma_n[4 * q1 + i] = (sig_pat[J2K_Q1] >> i) & 1; + + /* calculate context */ + context = sigma_n[4 * q1]; // f + context |= sigma_n[4 * q1 + 1]; // sf + context += sigma_n[4 * q1 + 2] << 1; // w << 1 + context += sigma_n[4 * q1 + 3] << 2; + + if ((ret = jpeg2000_decode_sig_emb(s, mel_state, mel_stream, vlc_stream, + dec_cxt_vlc_table0, Dcup, sig_pat, res_off, + emb_pat_k, emb_pat_1, J2K_Q2, context, Lcup, + Pcup)) < 0) + goto free; + + for (int i = 0; i < 4; i++) + sigma_n[4 * q2 + i] = (sig_pat[J2K_Q2] >> i) & 1; + + /* calculate context for the next quad */ + context = sigma_n[4 * q2]; // f + context |= sigma_n[4 * q2 + 1]; // sf + context += sigma_n[4 * q2 + 2] << 1; // w << 1 + context += sigma_n[4 * q2 + 3] << 2; // sw << 2 + + u[0] = 0; + u[1] = 0; + + jpeg2000_bitbuf_refill_backwards(vlc_stream, vlc_buf); + + if (res_off[J2K_Q1] == 1 && res_off[J2K_Q2] == 1) { + + if (jpeg2000_decode_mel_sym(mel_state, mel_stream, Dcup, Lcup) == 1) { + + u_pfx[J2K_Q1] = vlc_decode_u_prefix(vlc_stream, vlc_buf); + u_pfx[J2K_Q2] = vlc_decode_u_prefix(vlc_stream, vlc_buf); + + u_sfx[J2K_Q1] = vlc_decode_u_suffix(vlc_stream, u_pfx[J2K_Q1], vlc_buf); + u_sfx[J2K_Q2] = vlc_decode_u_suffix(vlc_stream, u_pfx[J2K_Q2], vlc_buf); + + u_ext[J2K_Q1] = vlc_decode_u_extension(vlc_stream, u_sfx[J2K_Q1], vlc_buf); + u_ext[J2K_Q2] = vlc_decode_u_extension(vlc_stream, u_sfx[J2K_Q2], vlc_buf); + + u[J2K_Q1] = 2 + u_pfx[J2K_Q1] + u_sfx[J2K_Q1] + (u_ext[J2K_Q1] * 4); + u[J2K_Q2] = 2 + u_pfx[J2K_Q2] + u_sfx[J2K_Q2] + (u_ext[J2K_Q2] * 4); + + } else { + u_pfx[J2K_Q1] = vlc_decode_u_prefix(vlc_stream, vlc_buf); + + if (u_pfx[J2K_Q1] > 2) { + u[J2K_Q2] = jpeg2000_bitbuf_get_bits_lsb(vlc_stream, 1, vlc_buf) + 1; + u_sfx[J2K_Q1] = vlc_decode_u_suffix(vlc_stream, u_pfx[J2K_Q1], vlc_buf); + u_ext[J2K_Q1] = vlc_decode_u_extension(vlc_stream, u_sfx[J2K_Q1], vlc_buf); + } else { + u_pfx[J2K_Q2] = vlc_decode_u_prefix(vlc_stream, vlc_buf); + u_sfx[J2K_Q1] = vlc_decode_u_suffix(vlc_stream, u_pfx[J2K_Q1], vlc_buf); + u_sfx[J2K_Q2] = vlc_decode_u_suffix(vlc_stream, u_pfx[J2K_Q2], vlc_buf); + u_ext[J2K_Q1] = vlc_decode_u_extension(vlc_stream, u_sfx[J2K_Q1], vlc_buf); + u_ext[J2K_Q2] = vlc_decode_u_extension(vlc_stream, u_sfx[J2K_Q2], vlc_buf); + u[J2K_Q2] = u_pfx[J2K_Q2] + u_sfx[J2K_Q2] + (u_ext[J2K_Q2] * 4); + } + /* See Rec. ITU-T T.814, 7.3.6(3) */ + u[J2K_Q1] = u_pfx[J2K_Q1] + u_sfx[J2K_Q1] + (u_ext[J2K_Q1] * 4); + } + + } else if (res_off[J2K_Q1] == 1 || res_off[J2K_Q2] == 1) { + uint8_t pos = res_off[J2K_Q1] == 1 ? 0 : 1; + u_pfx[pos] = vlc_decode_u_prefix(vlc_stream, vlc_buf); + u_sfx[pos] = vlc_decode_u_suffix(vlc_stream, u_pfx[pos], vlc_buf); + u_ext[pos] = vlc_decode_u_extension(vlc_stream, u_sfx[pos], vlc_buf); + u[pos] = u_pfx[pos] + u_sfx[pos] + (u_ext[pos] * 4); + } + U[J2K_Q1] = kappa[J2K_Q1] + u[J2K_Q1]; + U[J2K_Q2] = kappa[J2K_Q2] + u[J2K_Q2]; + + for (int i = 0; i < 4; i++) { + m[J2K_Q1][i] = sigma_n[4 * q1 + i] * U[J2K_Q1] - ((emb_pat_k[J2K_Q1] >> i) & 1); + m[J2K_Q2][i] = sigma_n[4 * q2 + i] * U[J2K_Q2] - ((emb_pat_k[J2K_Q2] >> i) & 1); + } + + recover_mag_sgn(mag_sgn_stream, J2K_Q1, q1, m_n, known_1, emb_pat_1, v, m, + E, mu_n, Dcup, Pcup, pLSB); + + recover_mag_sgn(mag_sgn_stream, J2K_Q2, q2, m_n, known_1, emb_pat_1, v, m, + E, mu_n, Dcup, Pcup, pLSB); + + q += 2; // Move to the next quad pair + } + + if (quad_width % 2 == 1) { + q1 = q; + + if ((ret = jpeg2000_decode_sig_emb(s, mel_state, mel_stream, vlc_stream, + dec_cxt_vlc_table0, Dcup, sig_pat, res_off, + emb_pat_k, emb_pat_1, J2K_Q1, context, Lcup, + Pcup)) < 0) + goto free; + + for (int i = 0; i < 4; i++) + sigma_n[4 * q1 + i] = (sig_pat[J2K_Q1] >> i) & 1; + + u[J2K_Q1] = 0; + + if (res_off[J2K_Q1] == 1) { + u_pfx[J2K_Q1] = vlc_decode_u_prefix(vlc_stream, vlc_buf); + u_sfx[J2K_Q1] = vlc_decode_u_suffix(vlc_stream, u_pfx[J2K_Q1], vlc_buf); + u_ext[J2K_Q1] = vlc_decode_u_extension(vlc_stream, u_sfx[J2K_Q1], vlc_buf); + u[J2K_Q1] = u_pfx[J2K_Q1] + u_sfx[J2K_Q1] + (u_ext[J2K_Q1] * 4); + } + + U[J2K_Q1] = kappa[J2K_Q1] + u[J2K_Q1]; + + for (int i = 0; i < 4; i++) + m[J2K_Q1][i] = sigma_n[4 * q1 + i] * U[J2K_Q1] - ((emb_pat_k[J2K_Q1] >> i) & 1); + + recover_mag_sgn(mag_sgn_stream, J2K_Q1, q1, m_n, known_1, emb_pat_1, v, m, + E, mu_n, Dcup, Pcup, pLSB); + + q++; // move to next quad pair + } + + /** + * Initial line pair end. As an optimization, we can replace modulo + * operations with checking if a number is divisible , since that's the only + * thing we need. This is paired with is_divisible. Credits to Daniel Lemire + * blog post [1]. + * + * [1] + * https://lemire.me/blog/2019/02/08/faster-remainders-when-the-divisor-is-a-constant-beating-compilers-and-libdivide/ + * + * It's UB on zero, but the spec doesn't allow a quad being zero, so we + * error out early in case that's the case. + */ + c = precompute_c(quad_width); + + for (int row = 1; row < quad_height; row++) { + while ((q - (row * quad_width)) < quad_width - 1 && q < (quad_height * quad_width)) { + q1 = q; + q2 = q + 1; + context1 = sigma_n[4 * (q1 - quad_width) + 1]; + context1 += sigma_n[4 * (q1 - quad_width) + 3] << 2; // ne + + if (!is_divisible(q1, c)) { + context1 |= sigma_n[4 * (q1 - quad_width) - 1]; // nw + context1 += (sigma_n[4 * q1 - 1] | sigma_n[4 * q1 - 2]) << 1; // sw | q + } + if (!is_divisible(q1 + 1, c)) + context1 |= sigma_n[4 * (q1 - quad_width) + 5] << 2; + + if ((ret = jpeg2000_decode_sig_emb(s, mel_state, mel_stream, vlc_stream, + dec_cxt_vlc_table1, Dcup, sig_pat, res_off, + emb_pat_k, emb_pat_1, J2K_Q1, context1, Lcup, + Pcup)) + < 0) + goto free; + + for (int i = 0; i < 4; i++) + sigma_n[4 * q1 + i] = (sig_pat[J2K_Q1] >> i) & 1; + + context2 = sigma_n[4 * (q2 - quad_width) + 1]; + context2 += sigma_n[4 * (q2 - quad_width) + 3] << 2; + + if (!is_divisible(q2, c)) { + context2 |= sigma_n[4 * (q2 - quad_width) - 1]; + context2 += (sigma_n[4 * q2 - 1] | sigma_n[4 * q2 - 2]) << 1; + } + if (!is_divisible(q2 + 1, c)) + context2 |= sigma_n[4 * (q2 - quad_width) + 5] << 2; + + if ((ret = jpeg2000_decode_sig_emb(s, mel_state, mel_stream, vlc_stream, + dec_cxt_vlc_table1, Dcup, sig_pat, res_off, + emb_pat_k, emb_pat_1, J2K_Q2, context2, Lcup, + Pcup)) + < 0) + goto free; + + for (int i = 0; i < 4; i++) + sigma_n[4 * q2 + i] = (sig_pat[J2K_Q2] >> i) & 1; + + u[J2K_Q1] = 0; + u[J2K_Q2] = 0; + + jpeg2000_bitbuf_refill_backwards(vlc_stream, vlc_buf); + + if (res_off[J2K_Q1] == 1 && res_off[J2K_Q2] == 1) { + u_pfx[J2K_Q1] = vlc_decode_u_prefix(vlc_stream, vlc_buf); + u_pfx[J2K_Q2] = vlc_decode_u_prefix(vlc_stream, vlc_buf); + + u_sfx[J2K_Q1] = vlc_decode_u_suffix(vlc_stream, u_pfx[J2K_Q1], vlc_buf); + u_sfx[J2K_Q2] = vlc_decode_u_suffix(vlc_stream, u_pfx[J2K_Q2], vlc_buf); + + u_ext[J2K_Q1] = vlc_decode_u_extension(vlc_stream, u_sfx[J2K_Q1], vlc_buf); + u_ext[J2K_Q2] = vlc_decode_u_extension(vlc_stream, u_sfx[J2K_Q2], vlc_buf); + + u[J2K_Q1] = u_pfx[J2K_Q1] + u_sfx[J2K_Q1] + (u_ext[J2K_Q1] << 2); + u[J2K_Q2] = u_pfx[J2K_Q2] + u_sfx[J2K_Q2] + (u_ext[J2K_Q2] << 2); + + } else if (res_off[J2K_Q1] == 1 || res_off[J2K_Q2] == 1) { + uint8_t pos = res_off[J2K_Q1] == 1 ? 0 : 1; + + u_pfx[pos] = vlc_decode_u_prefix(vlc_stream, vlc_buf); + u_sfx[pos] = vlc_decode_u_suffix(vlc_stream, u_pfx[pos], vlc_buf); + u_ext[pos] = vlc_decode_u_extension(vlc_stream, u_sfx[pos], vlc_buf); + + u[pos] = u_pfx[pos] + u_sfx[pos] + (u_ext[pos] << 2); + } + sp = sig_pat[J2K_Q1]; + + gamma[J2K_Q1] = 1; + + if (sp == 0 || sp == 1 || sp == 2 || sp == 4 || sp == 8) + gamma[J2K_Q1] = 0; + + sp = sig_pat[J2K_Q2]; + + gamma[J2K_Q2] = 1; + + if (sp == 0 || sp == 1 || sp == 2 || sp == 4 || sp == 8) + gamma[J2K_Q2] = 0; + + E_n[J2K_Q1] = E[4 * (q1 - quad_width) + 1]; + E_n[J2K_Q2] = E[4 * (q2 - quad_width) + 1]; + + E_ne[J2K_Q1] = E[4 * (q1 - quad_width) + 3]; + E_ne[J2K_Q2] = E[4 * (q2 - quad_width) + 3]; + + E_nw[J2K_Q1] = (!is_divisible(q1, c)) * E[FFMAX((4 * (q1 - quad_width) - 1), 0)]; + E_nw[J2K_Q2] = (!is_divisible(q2, c)) * E[FFMAX((4 * (q2 - quad_width) - 1), 0)]; + + E_nf[J2K_Q1] = (!is_divisible(q1 + 1, c)) * E[4 * (q1 - quad_width) + 5]; + E_nf[J2K_Q2] = (!is_divisible(q2 + 1, c)) * E[4 * (q2 - quad_width) + 5]; + + max_e[J2K_Q1] = FFMAX(E_nw[J2K_Q1], FFMAX3(E_n[J2K_Q1], E_ne[J2K_Q1], E_nf[J2K_Q1])); + max_e[J2K_Q2] = FFMAX(E_nw[J2K_Q2], FFMAX3(E_n[J2K_Q2], E_ne[J2K_Q2], E_nf[J2K_Q2])); + + kappa[J2K_Q1] = FFMAX(1, gamma[J2K_Q1] * (max_e[J2K_Q1] - 1)); + kappa[J2K_Q2] = FFMAX(1, gamma[J2K_Q2] * (max_e[J2K_Q2] - 1)); + + U[J2K_Q1] = kappa[J2K_Q1] + u[J2K_Q1]; + U[J2K_Q2] = kappa[J2K_Q2] + u[J2K_Q2]; + + for (int i = 0; i < 4; i++) { + m[J2K_Q1][i] = sigma_n[4 * q1 + i] * U[J2K_Q1] - ((emb_pat_k[J2K_Q1] >> i) & 1); + m[J2K_Q2][i] = sigma_n[4 * q2 + i] * U[J2K_Q2] - ((emb_pat_k[J2K_Q2] >> i) & 1); + } + recover_mag_sgn(mag_sgn_stream, J2K_Q1, q1, m_n, known_1, emb_pat_1, v, m, + E, mu_n, Dcup, Pcup, pLSB); + + recover_mag_sgn(mag_sgn_stream, J2K_Q2, q2, m_n, known_1, emb_pat_1, v, m, + E, mu_n, Dcup, Pcup, pLSB); + + q += 2; // Move to the next quad pair + } + + if (quad_width % 2 == 1) { + q1 = q; + + /* calculate context for current quad */ + context1 = sigma_n[4 * (q1 - quad_width) + 1]; + context1 += (sigma_n[4 * (q1 - quad_width) + 3] << 2); + + if (!is_divisible(q1, c)) { + context1 |= sigma_n[4 * (q1 - quad_width) - 1]; + context1 += (sigma_n[4 * q1 - 1] | sigma_n[4 * q1 - 2]) << 1; + } + if (!is_divisible(q1 + 1, c)) + context1 |= sigma_n[4 * (q1 - quad_width) + 5] << 2; + + if ((ret = jpeg2000_decode_sig_emb(s, mel_state, mel_stream, vlc_stream, + dec_cxt_vlc_table1, Dcup, sig_pat, res_off, + emb_pat_k, emb_pat_1, J2K_Q1, context1, Lcup, + Pcup)) < 0) + goto free; + + for (int i = 0; i < 4; i++) + sigma_n[4 * q1 + i] = (sig_pat[J2K_Q1] >> i) & 1; + + u[J2K_Q1] = 0; + + /* Recover mag_sgn value */ + if (res_off[J2K_Q1] == 1) { + u_pfx[J2K_Q1] = vlc_decode_u_prefix(vlc_stream, vlc_buf); + u_sfx[J2K_Q1] = vlc_decode_u_suffix(vlc_stream, u_pfx[J2K_Q1], vlc_buf); + u_ext[J2K_Q1] = vlc_decode_u_extension(vlc_stream, u_sfx[J2K_Q1], vlc_buf); + + u[J2K_Q1] = u_pfx[J2K_Q1] + u_sfx[J2K_Q1] + (u_ext[J2K_Q1] << 2); + } + + sp = sig_pat[J2K_Q1]; + + gamma[J2K_Q1] = 1; + + if (sp == 0 || sp == 1 || sp == 2 || sp == 4 || sp == 8) + gamma[J2K_Q1] = 0; + + E_n[J2K_Q1] = E[4 * (q1 - quad_width) + 1]; + + E_ne[J2K_Q1] = E[4 * (q1 - quad_width) + 3]; + + E_nw[J2K_Q1] = (!is_divisible(q1, c)) * E[FFMAX((4 * (q1 - quad_width) - 1), 0)]; + + E_nf[J2K_Q1] = (!is_divisible(q1 + 1, c)) * E[4 * (q1 - quad_width) + 5]; + + max_e[J2K_Q1] = FFMAX(E_nw[J2K_Q1], FFMAX3(E_n[J2K_Q1], E_ne[J2K_Q1], E_nf[J2K_Q1])); + + kappa[J2K_Q1] = FFMAX(1, gamma[J2K_Q1] * (max_e[J2K_Q1] - 1)); + + U[J2K_Q1] = kappa[J2K_Q1] + u[J2K_Q1]; + + for (int i = 0; i < 4; i++) + m[J2K_Q1][i] = sigma_n[4 * q1 + i] * U[J2K_Q1] - ((emb_pat_k[J2K_Q1] >> i) & 1); + + recover_mag_sgn(mag_sgn_stream, J2K_Q1, q1, m_n, known_1, emb_pat_1, v, m, + E, mu_n, Dcup, Pcup, pLSB); + q += 1; + } + } + + // convert to raster-scan + for (int y = 0; y < quad_height; y++) { + for (int x = 0; x < quad_width; x++) { + int j1, j2; + int x1, x2 , x3; + + j1 = 2 * y; + j2 = 2 * x; + + sample_buf[j2 + (j1 * width)] = (int32_t)*mu; + jpeg2000_modify_state(j1, j2, width, *sigma, block_states); + sigma += 1; + mu += 1; + + x1 = y != quad_height - 1 || is_border_y == 0; + sample_buf[j2 + ((j1 + 1) * width)] = ((int32_t)*mu) * x1; + jpeg2000_modify_state(j1 + 1, j2, width, (*sigma) * x1, block_states); + sigma += 1; + mu += 1; + + x2 = x != quad_width - 1 || is_border_x == 0; + sample_buf[(j2 + 1) + (j1 * width)] = ((int32_t)*mu) * x2; + jpeg2000_modify_state(j1, j2 + 1, width, (*sigma) * x2, block_states); + sigma += 1; + mu += 1; + + x3 = x1 | x2; + sample_buf[(j2 + 1) + (j1 + 1) * width] = ((int32_t)*mu) * x3; + jpeg2000_modify_state(j1 + 1, j2 + 1, width, (*sigma) * x3, block_states); + sigma += 1; + mu += 1; + } + } + ret = 1; +free: + av_freep(&sigma_n); + av_freep(&E); + av_freep(&mu_n); + return ret; +} + +static void jpeg2000_calc_mbr(uint8_t *mbr, const uint16_t i, const uint16_t j, + const uint32_t mbr_info, uint8_t causal_cond, + uint8_t *block_states, int width) +{ + int local_mbr = 0; + + local_mbr |= jpeg2000_get_state(i - 1, j - 1, width, HT_SHIFT_SIGMA, block_states); + local_mbr |= jpeg2000_get_state(i - 1, j + 0, width, HT_SHIFT_SIGMA, block_states); + local_mbr |= jpeg2000_get_state(i - 1, j + 1, width, HT_SHIFT_SIGMA, block_states); + + local_mbr |= jpeg2000_get_state(i + 0, j - 1, width, HT_SHIFT_SIGMA, block_states); + local_mbr |= jpeg2000_get_state(i + 0, j + 1, width, HT_SHIFT_SIGMA, block_states); + + local_mbr |= jpeg2000_get_state(i + 1, j - 1, width, HT_SHIFT_SIGMA, block_states) * causal_cond; + local_mbr |= jpeg2000_get_state(i + 1, j + 0, width, HT_SHIFT_SIGMA, block_states) * causal_cond; + local_mbr |= jpeg2000_get_state(i + 1, j + 1, width, HT_SHIFT_SIGMA, block_states) * causal_cond; + + local_mbr |= jpeg2000_get_state(i - 1, j - 1, width, HT_SHIFT_REF, block_states) * + jpeg2000_get_state(i - 1, j - 1, width, HT_SHIFT_SCAN, block_states); + local_mbr |= jpeg2000_get_state(i - 1, j + 0, width, HT_SHIFT_REF, block_states) * + jpeg2000_get_state(i - 1, j - 1, width, HT_SHIFT_SCAN, block_states); + local_mbr |= jpeg2000_get_state(i - 1, j + 1, width, HT_SHIFT_REF, block_states) * + jpeg2000_get_state(i - 1, j + 1, width, HT_SHIFT_SCAN, block_states); + + local_mbr |= jpeg2000_get_state(i + 0, j - 1, width, HT_SHIFT_REF, block_states) * + jpeg2000_get_state(i + 0, j - 1, width, HT_SHIFT_SCAN, block_states); + local_mbr |= jpeg2000_get_state(i + 0, j + 1, width, HT_SHIFT_REF, block_states) * + jpeg2000_get_state(i + 0, j + 1, width, HT_SHIFT_SCAN, block_states); + + local_mbr |= jpeg2000_get_state(i + 1, j - 1, width, HT_SHIFT_REF, block_states) * + jpeg2000_get_state(i + 1, j - 1, width, HT_SHIFT_SCAN, block_states) * causal_cond; + local_mbr |= jpeg2000_get_state(i + 1, j + 0, width, HT_SHIFT_REF, block_states) * + jpeg2000_get_state(i + 1, j + 0, width, HT_SHIFT_SCAN, block_states) * causal_cond; + local_mbr |= jpeg2000_get_state(i + 1, j + 1, width, HT_SHIFT_REF, block_states) * + jpeg2000_get_state(i + 1, j + 1, width, HT_SHIFT_SCAN, block_states) * causal_cond; + + *mbr |= local_mbr; +} + +static void jpeg2000_process_stripes_block(StateVars *sig_prop, int i_s, int j_s, + int width, int height, int stride, int pLSB, + int32_t *sample_buf, uint8_t *block_states, + uint8_t *magref_segment, uint32_t magref_length) +{ + for (int j = j_s; j < j_s + width; j++) { + uint32_t mbr_info = 0; + for (int i = i_s; i < i_s + height; i++) { + int modify_state, cond; + uint8_t bit; + uint8_t causal_cond = i != (i_s + height - 1); + int32_t *sp = &sample_buf[j + (i * (stride - 2))]; + uint8_t mbr = 0; + + if (jpeg2000_get_state(i, j, stride - 2, HT_SHIFT_SIGMA, block_states) == 0) + jpeg2000_calc_mbr(&mbr, i, j, mbr_info & 0x1EF, causal_cond, block_states, stride - 2); + mbr_info >>= 3; + cond = mbr != 0; + bit = jpeg2000_peek_bit(sig_prop, magref_segment, magref_length); + *sp |= (bit * cond) << pLSB; + sig_prop->bits -= cond; + modify_state = (((1 << HT_SHIFT_REF_IND) | (1 << HT_SHIFT_REF)) * cond) | 1 << HT_SHIFT_SCAN; + jpeg2000_modify_state(i, j, stride - 2, modify_state, block_states); + } + } +} + +/** + * See procedure decodeSigPropMag at Rec. ITU-T T.814, 7.4. +*/ +av_noinline +static void jpeg2000_decode_sigprop_segment(Jpeg2000Cblk *cblk, uint16_t width, + uint16_t height, uint8_t *magref_segment, + uint32_t magref_length, uint8_t pLSB, + int32_t *sample_buf, uint8_t *block_states) +{ + StateVars sp_dec; + + const uint16_t num_v_stripe = height / 4; + const uint16_t num_h_stripe = width / 4; + int b_width = 4; + int b_height = 4; + int stride = width + 2; + + int last_width; + uint16_t i = 0, j = 0; + + jpeg2000_init_zero(&sp_dec); + + for (int n1 = 0; n1 < num_v_stripe; n1++) { + j = 0; + for (int n2 = 0; n2 < num_h_stripe; n2++) { + jpeg2000_process_stripes_block(&sp_dec, i, j, b_width, b_height, stride, + pLSB, sample_buf, block_states, magref_segment, + magref_length); + j += 4; + } + last_width = width % 4; + if (last_width) + jpeg2000_process_stripes_block(&sp_dec, i, j, last_width, b_height, stride, + pLSB, sample_buf, block_states, magref_segment, + magref_length); + i += 4; + } + + /* Decode remaining height stripes */ + b_height = height % 4; + j = 0; + for (int n2 = 0; n2 < num_h_stripe; n2++) { + jpeg2000_process_stripes_block(&sp_dec, i, j, b_width, b_height, stride, + pLSB, sample_buf, block_states, magref_segment, + magref_length); + j += 4; + } + last_width = width % 4; + if (last_width) + jpeg2000_process_stripes_block(&sp_dec, i, j, last_width, b_height, stride, + pLSB, sample_buf, block_states, magref_segment, + magref_length); +} + +/** + * See procedure decodeSigPropMag at Rec. ITU-T T.814, 7.5. +*/ +static int +jpeg2000_decode_magref_segment(Jpeg2000Cblk *cblk, uint16_t width, uint16_t block_height, uint8_t *magref_segment, + uint32_t magref_length, uint8_t pLSB, int32_t *sample_buf, uint8_t *block_states) +{ + + StateVars mag_ref = { 0 }; + const uint16_t num_v_stripe = block_height / 4; + uint16_t height = 4; + uint16_t i_start = 0; + int32_t *sp; + + jpeg2000_init_mag_ref(&mag_ref, magref_length); + + for (int n1 = 0; n1 < num_v_stripe; n1++) { + for (int j = 0; j < width; j++) { + for (int i = i_start; i < i_start + height; i++) { + /** + * We move column wise, going from one quad to another. See + * Rec. ITU-T T.814, Figure 7. + */ + sp = &sample_buf[j + i * width]; + if (jpeg2000_get_state(i, j, width, HT_SHIFT_SIGMA, block_states) != 0) { + jpeg2000_modify_state(i, j, width, 1 << HT_SHIFT_REF_IND, block_states); + *sp |= jpeg2000_import_magref_bit(&mag_ref, magref_segment, magref_length) << pLSB; + } + } + } + i_start += 4; + } + height = block_height % 4; + for (int j = 0; j < width; j++) { + for (int i = i_start; i < i_start + height; i++) { + sp = &sample_buf[j + i * width]; + if (jpeg2000_get_state(i, j, width, HT_SHIFT_SIGMA, block_states) != 0) { + jpeg2000_modify_state(i, j, width, 1 << HT_SHIFT_REF_IND, block_states); + *sp |= jpeg2000_import_magref_bit(&mag_ref, magref_segment, magref_length) << pLSB; + } + } + } + return 1; +} + + +int +ff_jpeg2000_decode_htj2k(const Jpeg2000DecoderContext *s, Jpeg2000CodingStyle *codsty, Jpeg2000T1Context *t1, Jpeg2000Cblk *cblk, + int width, int height, int magp, uint8_t roi_shift) +{ + uint8_t p0 = 0; // Number of placeholder passes + uint32_t Lcup; // Length of HT cleanup segment + uint32_t Lref; // Length of Refinement segment + uint32_t Scup; // HT cleanup segment suffix length + uint32_t Pcup; // HT cleanup segment prefix length + + uint8_t S_blk; // Number of skipped magnitude bitplanes + uint8_t pLSB; + + uint8_t *Dcup; // Byte of an HT cleanup segment + uint8_t *Dref; // Byte of an HT refinement segment + + int z_blk; // Number of ht coding pass + + uint8_t empty_passes; + + StateVars mag_sgn; // Magnitude and Sign + StateVars mel; // Adaptive run-length coding + StateVars vlc; // Variable Length coding + StateVars sig_prop; // Significance propagation + + MelDecoderState mel_state; + + int ret; + + /* Temporary buffers */ + int32_t *sample_buf; + uint8_t *block_states; + + int32_t n, val; // Post-processing + + int32_t M_b = magp; + + /* codeblock size as constrained by Rec. ITU-T T.800, Table A.18 */ + av_assert0(width <= 1024U && height <= 1024U); + av_assert0(width * height <= 4096); + av_assert0(width * height > 0); + + memset(t1->data, 0, t1->stride * height * sizeof(*t1->data)); + memset(t1->flags, 0, t1->stride * (height + 2) * sizeof(*t1->flags)); + + if (cblk->npasses == 0) + return 0; + + if (cblk->npasses > 3) + p0 = 0; + else if (cblk->length == 0) + p0 = 1; + + empty_passes = p0 * 3; + z_blk = cblk->npasses - empty_passes; + + if (z_blk <= 0) + return 0; // No passes within this set, continue + + Lcup = cblk->pass_lengths[0]; + Lref = cblk->pass_lengths[1]; + + if (Lcup < 2) { + av_log(s->avctx, AV_LOG_ERROR, + "Cleanup pass length must be at least 2 bytes in length\n"); + return AVERROR_INVALIDDATA; + } + Dcup = cblk->data; + Dref = cblk->data + Lcup; // Dref comes after the refinement segment + S_blk = p0 + cblk->zbp; + pLSB = 30 - S_blk; + + Scup = (Dcup[Lcup - 1] << 4) + (Dcup[Lcup - 2] & 0x0F); + + if (Scup < 2 || Scup > Lcup || Scup > 4079) { + av_log(s->avctx, AV_LOG_ERROR, "Cleanup pass suffix length is invalid %d\n", + Scup); + ret = AVERROR_INVALIDDATA; + goto free; + } + Pcup = Lcup - Scup; + + /* modDcup shall be done before the creation of vlc instance. */ + Dcup[Lcup - 1] = 0xFF; + Dcup[Lcup - 2] |= 0x0F; + + /* Magnitude and refinement */ + jpeg2000_init_zero(&mag_sgn); + jpeg2000_bitbuf_refill_forward(&mag_sgn, Dcup, Pcup); + + /* Significance propagation */ + jpeg2000_init_zero(&sig_prop); + + /* Adaptive run length */ + jpeg2000_init_mel(&mel, Pcup); + + /* Variable Length coding */ + jpeg2000_init_vlc(&vlc, Lcup, Pcup, Dcup); + + jpeg2000_init_mel_decoder(&mel_state); + + sample_buf = av_calloc((width + 4) * (height + 4), sizeof(int32_t)); + block_states = av_calloc((width + 4) * (height + 4), sizeof(uint8_t)); + + if (!sample_buf || !block_states) { + ret = AVERROR(ENOMEM); + goto free; + } + if ((ret = jpeg2000_decode_ht_cleanup_segment(s, cblk, t1, &mel_state, &mel, &vlc, + &mag_sgn, Dcup, Lcup, Pcup, pLSB, width, + height, sample_buf, block_states)) < 0) + goto free; + + if (cblk->npasses > 1) + jpeg2000_decode_sigprop_segment(cblk, width, height, Dref, Lref, + pLSB - 1, sample_buf, block_states); + + if (cblk->npasses > 2) + if ((ret = jpeg2000_decode_magref_segment(cblk, width, height, Dref, Lref, + pLSB - 1, sample_buf, block_states)) < 0) + goto free; + + pLSB = 31 - M_b; + + /* Reconstruct the sample values */ + for (int y = 0; y < height; y++) { + for (int x = 0; x < width; x++) { + n = x + (y * t1->stride); + val = sample_buf[x + (y * width)]; + /* Convert sign-magnitude to two's complement. */ + val = val >> 31 ? 0x80000000 - val : val; + val >>= (pLSB - 1); + t1->data[n] = val; + } + } +free: + av_freep(&sample_buf); + av_freep(&block_states); + return ret; +} + +/** + * CtxVLC tables (see Rec. ITU-T T.800, Annex C) as found at + * https://github.com/osamu620/OpenHTJ2K (author: Osamu Watanabe) + */ +static const uint16_t dec_cxt_vlc_table1[1024] = { + 0x0016, 0x006A, 0x0046, 0x00DD, 0x0086, 0x888B, 0x0026, 0x444D, 0x0016, 0x00AA, 0x0046, 0x88AD, 0x0086, + 0x003A, 0x0026, 0x00DE, 0x0016, 0x00CA, 0x0046, 0x009D, 0x0086, 0x005A, 0x0026, 0x222D, 0x0016, 0x009A, + 0x0046, 0x007D, 0x0086, 0x01FD, 0x0026, 0x007E, 0x0016, 0x006A, 0x0046, 0x88CD, 0x0086, 0x888B, 0x0026, + 0x111D, 0x0016, 0x00AA, 0x0046, 0x005D, 0x0086, 0x003A, 0x0026, 0x00EE, 0x0016, 0x00CA, 0x0046, 0x00BD, + 0x0086, 0x005A, 0x0026, 0x11FF, 0x0016, 0x009A, 0x0046, 0x003D, 0x0086, 0x04ED, 0x0026, 0x2AAF, 0x0016, + 0x006A, 0x0046, 0x00DD, 0x0086, 0x888B, 0x0026, 0x444D, 0x0016, 0x00AA, 0x0046, 0x88AD, 0x0086, 0x003A, + 0x0026, 0x44EF, 0x0016, 0x00CA, 0x0046, 0x009D, 0x0086, 0x005A, 0x0026, 0x222D, 0x0016, 0x009A, 0x0046, + 0x007D, 0x0086, 0x01FD, 0x0026, 0x00BE, 0x0016, 0x006A, 0x0046, 0x88CD, 0x0086, 0x888B, 0x0026, 0x111D, + 0x0016, 0x00AA, 0x0046, 0x005D, 0x0086, 0x003A, 0x0026, 0x4CCF, 0x0016, 0x00CA, 0x0046, 0x00BD, 0x0086, + 0x005A, 0x0026, 0x00FE, 0x0016, 0x009A, 0x0046, 0x003D, 0x0086, 0x04ED, 0x0026, 0x006F, 0x0002, 0x0088, + 0x0002, 0x005C, 0x0002, 0x0018, 0x0002, 0x00DE, 0x0002, 0x0028, 0x0002, 0x009C, 0x0002, 0x004A, 0x0002, + 0x007E, 0x0002, 0x0088, 0x0002, 0x00CC, 0x0002, 0x0018, 0x0002, 0x888F, 0x0002, 0x0028, 0x0002, 0x00FE, + 0x0002, 0x003A, 0x0002, 0x222F, 0x0002, 0x0088, 0x0002, 0x04FD, 0x0002, 0x0018, 0x0002, 0x00BE, 0x0002, + 0x0028, 0x0002, 0x00BF, 0x0002, 0x004A, 0x0002, 0x006E, 0x0002, 0x0088, 0x0002, 0x00AC, 0x0002, 0x0018, + 0x0002, 0x444F, 0x0002, 0x0028, 0x0002, 0x00EE, 0x0002, 0x003A, 0x0002, 0x113F, 0x0002, 0x0088, 0x0002, + 0x005C, 0x0002, 0x0018, 0x0002, 0x00CF, 0x0002, 0x0028, 0x0002, 0x009C, 0x0002, 0x004A, 0x0002, 0x006F, + 0x0002, 0x0088, 0x0002, 0x00CC, 0x0002, 0x0018, 0x0002, 0x009F, 0x0002, 0x0028, 0x0002, 0x00EF, 0x0002, + 0x003A, 0x0002, 0x233F, 0x0002, 0x0088, 0x0002, 0x04FD, 0x0002, 0x0018, 0x0002, 0x00AF, 0x0002, 0x0028, + 0x0002, 0x44FF, 0x0002, 0x004A, 0x0002, 0x005F, 0x0002, 0x0088, 0x0002, 0x00AC, 0x0002, 0x0018, 0x0002, + 0x007F, 0x0002, 0x0028, 0x0002, 0x00DF, 0x0002, 0x003A, 0x0002, 0x111F, 0x0002, 0x0028, 0x0002, 0x005C, + 0x0002, 0x008A, 0x0002, 0x00BF, 0x0002, 0x0018, 0x0002, 0x00FE, 0x0002, 0x00CC, 0x0002, 0x007E, 0x0002, + 0x0028, 0x0002, 0x8FFF, 0x0002, 0x004A, 0x0002, 0x007F, 0x0002, 0x0018, 0x0002, 0x00DF, 0x0002, 0x00AC, + 0x0002, 0x133F, 0x0002, 0x0028, 0x0002, 0x222D, 0x0002, 0x008A, 0x0002, 0x00BE, 0x0002, 0x0018, 0x0002, + 0x44EF, 0x0002, 0x2AAD, 0x0002, 0x006E, 0x0002, 0x0028, 0x0002, 0x15FF, 0x0002, 0x004A, 0x0002, 0x009E, + 0x0002, 0x0018, 0x0002, 0x00CF, 0x0002, 0x003C, 0x0002, 0x223F, 0x0002, 0x0028, 0x0002, 0x005C, 0x0002, + 0x008A, 0x0002, 0x2BBF, 0x0002, 0x0018, 0x0002, 0x04EF, 0x0002, 0x00CC, 0x0002, 0x006F, 0x0002, 0x0028, + 0x0002, 0x27FF, 0x0002, 0x004A, 0x0002, 0x009F, 0x0002, 0x0018, 0x0002, 0x00DE, 0x0002, 0x00AC, 0x0002, + 0x444F, 0x0002, 0x0028, 0x0002, 0x222D, 0x0002, 0x008A, 0x0002, 0x8AAF, 0x0002, 0x0018, 0x0002, 0x00EE, + 0x0002, 0x2AAD, 0x0002, 0x005F, 0x0002, 0x0028, 0x0002, 0x44FF, 0x0002, 0x004A, 0x0002, 0x888F, 0x0002, + 0x0018, 0x0002, 0xAAAF, 0x0002, 0x003C, 0x0002, 0x111F, 0x0004, 0x8FFD, 0x0028, 0x005C, 0x0004, 0x00BC, + 0x008A, 0x66FF, 0x0004, 0x00CD, 0x0018, 0x111D, 0x0004, 0x009C, 0x003A, 0x8AAF, 0x0004, 0x00FC, 0x0028, + 0x133D, 0x0004, 0x00AC, 0x004A, 0x3BBF, 0x0004, 0x2BBD, 0x0018, 0x5FFF, 0x0004, 0x006C, 0x157D, 0x455F, + 0x0004, 0x2FFD, 0x0028, 0x222D, 0x0004, 0x22AD, 0x008A, 0x44EF, 0x0004, 0x00CC, 0x0018, 0x4FFF, 0x0004, + 0x007C, 0x003A, 0x447F, 0x0004, 0x04DD, 0x0028, 0x233D, 0x0004, 0x009D, 0x004A, 0x00DE, 0x0004, 0x88BD, + 0x0018, 0xAFFF, 0x0004, 0x115D, 0x1FFD, 0x444F, 0x0004, 0x8FFD, 0x0028, 0x005C, 0x0004, 0x00BC, 0x008A, + 0x8CEF, 0x0004, 0x00CD, 0x0018, 0x111D, 0x0004, 0x009C, 0x003A, 0x888F, 0x0004, 0x00FC, 0x0028, 0x133D, + 0x0004, 0x00AC, 0x004A, 0x44DF, 0x0004, 0x2BBD, 0x0018, 0x8AFF, 0x0004, 0x006C, 0x157D, 0x006F, 0x0004, + 0x2FFD, 0x0028, 0x222D, 0x0004, 0x22AD, 0x008A, 0x00EE, 0x0004, 0x00CC, 0x0018, 0x2EEF, 0x0004, 0x007C, + 0x003A, 0x277F, 0x0004, 0x04DD, 0x0028, 0x233D, 0x0004, 0x009D, 0x004A, 0x1BBF, 0x0004, 0x88BD, 0x0018, + 0x37FF, 0x0004, 0x115D, 0x1FFD, 0x333F, 0x0002, 0x0088, 0x0002, 0x02ED, 0x0002, 0x00CA, 0x0002, 0x4CCF, + 0x0002, 0x0048, 0x0002, 0x23FF, 0x0002, 0x001A, 0x0002, 0x888F, 0x0002, 0x0088, 0x0002, 0x006C, 0x0002, + 0x002A, 0x0002, 0x00AF, 0x0002, 0x0048, 0x0002, 0x22EF, 0x0002, 0x00AC, 0x0002, 0x005F, 0x0002, 0x0088, + 0x0002, 0x444D, 0x0002, 0x00CA, 0x0002, 0xCCCF, 0x0002, 0x0048, 0x0002, 0x00FE, 0x0002, 0x001A, 0x0002, + 0x006F, 0x0002, 0x0088, 0x0002, 0x005C, 0x0002, 0x002A, 0x0002, 0x009F, 0x0002, 0x0048, 0x0002, 0x00DF, + 0x0002, 0x03FD, 0x0002, 0x222F, 0x0002, 0x0088, 0x0002, 0x02ED, 0x0002, 0x00CA, 0x0002, 0x8CCF, 0x0002, + 0x0048, 0x0002, 0x11FF, 0x0002, 0x001A, 0x0002, 0x007E, 0x0002, 0x0088, 0x0002, 0x006C, 0x0002, 0x002A, + 0x0002, 0x007F, 0x0002, 0x0048, 0x0002, 0x00EE, 0x0002, 0x00AC, 0x0002, 0x003E, 0x0002, 0x0088, 0x0002, + 0x444D, 0x0002, 0x00CA, 0x0002, 0x00BE, 0x0002, 0x0048, 0x0002, 0x00BF, 0x0002, 0x001A, 0x0002, 0x003F, + 0x0002, 0x0088, 0x0002, 0x005C, 0x0002, 0x002A, 0x0002, 0x009E, 0x0002, 0x0048, 0x0002, 0x00DE, 0x0002, + 0x03FD, 0x0002, 0x111F, 0x0004, 0x8AED, 0x0048, 0x888D, 0x0004, 0x00DC, 0x00CA, 0x3FFF, 0x0004, 0xCFFD, + 0x002A, 0x003D, 0x0004, 0x00BC, 0x005A, 0x8DDF, 0x0004, 0x8FFD, 0x0048, 0x006C, 0x0004, 0x027D, 0x008A, + 0x99FF, 0x0004, 0x00EC, 0x00FA, 0x003C, 0x0004, 0x00AC, 0x001A, 0x009F, 0x0004, 0x2FFD, 0x0048, 0x007C, + 0x0004, 0x44CD, 0x00CA, 0x67FF, 0x0004, 0x1FFD, 0x002A, 0x444D, 0x0004, 0x00AD, 0x005A, 0x8CCF, 0x0004, + 0x4FFD, 0x0048, 0x445D, 0x0004, 0x01BD, 0x008A, 0x4EEF, 0x0004, 0x45DD, 0x00FA, 0x111D, 0x0004, 0x009C, + 0x001A, 0x222F, 0x0004, 0x8AED, 0x0048, 0x888D, 0x0004, 0x00DC, 0x00CA, 0xAFFF, 0x0004, 0xCFFD, 0x002A, + 0x003D, 0x0004, 0x00BC, 0x005A, 0x11BF, 0x0004, 0x8FFD, 0x0048, 0x006C, 0x0004, 0x027D, 0x008A, 0x22EF, + 0x0004, 0x00EC, 0x00FA, 0x003C, 0x0004, 0x00AC, 0x001A, 0x227F, 0x0004, 0x2FFD, 0x0048, 0x007C, 0x0004, + 0x44CD, 0x00CA, 0x5DFF, 0x0004, 0x1FFD, 0x002A, 0x444D, 0x0004, 0x00AD, 0x005A, 0x006F, 0x0004, 0x4FFD, + 0x0048, 0x445D, 0x0004, 0x01BD, 0x008A, 0x11DF, 0x0004, 0x45DD, 0x00FA, 0x111D, 0x0004, 0x009C, 0x001A, + 0x155F, 0x0006, 0x00FC, 0x0018, 0x111D, 0x0048, 0x888D, 0x00AA, 0x4DDF, 0x0006, 0x2AAD, 0x005A, 0x67FF, + 0x0028, 0x223D, 0x00BC, 0xAAAF, 0x0006, 0x00EC, 0x0018, 0x5FFF, 0x0048, 0x006C, 0x008A, 0xCCCF, 0x0006, + 0x009D, 0x00CA, 0x44EF, 0x0028, 0x003C, 0x8FFD, 0x137F, 0x0006, 0x8EED, 0x0018, 0x1FFF, 0x0048, 0x007C, + 0x00AA, 0x4CCF, 0x0006, 0x227D, 0x005A, 0x1DDF, 0x0028, 0x444D, 0x4FFD, 0x155F, 0x0006, 0x00DC, 0x0018, + 0x2EEF, 0x0048, 0x445D, 0x008A, 0x22BF, 0x0006, 0x009C, 0x00CA, 0x8CDF, 0x0028, 0x222D, 0x2FFD, 0x226F, + 0x0006, 0x00FC, 0x0018, 0x111D, 0x0048, 0x888D, 0x00AA, 0x1BBF, 0x0006, 0x2AAD, 0x005A, 0x33FF, 0x0028, + 0x223D, 0x00BC, 0x8AAF, 0x0006, 0x00EC, 0x0018, 0x9BFF, 0x0048, 0x006C, 0x008A, 0x8ABF, 0x0006, 0x009D, + 0x00CA, 0x4EEF, 0x0028, 0x003C, 0x8FFD, 0x466F, 0x0006, 0x8EED, 0x0018, 0xCFFF, 0x0048, 0x007C, 0x00AA, + 0x8CCF, 0x0006, 0x227D, 0x005A, 0xAEEF, 0x0028, 0x444D, 0x4FFD, 0x477F, 0x0006, 0x00DC, 0x0018, 0xAFFF, + 0x0048, 0x445D, 0x008A, 0x2BBF, 0x0006, 0x009C, 0x00CA, 0x44DF, 0x0028, 0x222D, 0x2FFD, 0x133F, 0x00F6, + 0xAFFD, 0x1FFB, 0x003C, 0x0008, 0x23BD, 0x007A, 0x11DF, 0x00F6, 0x45DD, 0x2FFB, 0x4EEF, 0x00DA, 0x177D, + 0xCFFD, 0x377F, 0x00F6, 0x3FFD, 0x8FFB, 0x111D, 0x0008, 0x009C, 0x005A, 0x1BBF, 0x00F6, 0x00CD, 0x00BA, + 0x8DDF, 0x4FFB, 0x006C, 0x9BFD, 0x455F, 0x00F6, 0x67FD, 0x1FFB, 0x002C, 0x0008, 0x00AC, 0x007A, 0x009F, + 0x00F6, 0x00AD, 0x2FFB, 0x7FFF, 0x00DA, 0x004C, 0x5FFD, 0x477F, 0x00F6, 0x00EC, 0x8FFB, 0x001C, 0x0008, + 0x008C, 0x005A, 0x888F, 0x00F6, 0x00CC, 0x00BA, 0x2EEF, 0x4FFB, 0x115D, 0x8AED, 0x113F, 0x00F6, 0xAFFD, + 0x1FFB, 0x003C, 0x0008, 0x23BD, 0x007A, 0x1DDF, 0x00F6, 0x45DD, 0x2FFB, 0xBFFF, 0x00DA, 0x177D, 0xCFFD, + 0x447F, 0x00F6, 0x3FFD, 0x8FFB, 0x111D, 0x0008, 0x009C, 0x005A, 0x277F, 0x00F6, 0x00CD, 0x00BA, 0x22EF, + 0x4FFB, 0x006C, 0x9BFD, 0x444F, 0x00F6, 0x67FD, 0x1FFB, 0x002C, 0x0008, 0x00AC, 0x007A, 0x11BF, 0x00F6, + 0x00AD, 0x2FFB, 0xFFFF, 0x00DA, 0x004C, 0x5FFD, 0x233F, 0x00F6, 0x00EC, 0x8FFB, 0x001C, 0x0008, 0x008C, + 0x005A, 0x006F, 0x00F6, 0x00CC, 0x00BA, 0x8BBF, 0x4FFB, 0x115D, 0x8AED, 0x222F}; + +static const uint16_t dec_cxt_vlc_table0[1024] = { + 0x0026, 0x00AA, 0x0046, 0x006C, 0x0086, 0x8AED, 0x0018, 0x8DDF, 0x0026, 0x01BD, 0x0046, 0x5FFF, 0x0086, + 0x027D, 0x005A, 0x155F, 0x0026, 0x003A, 0x0046, 0x444D, 0x0086, 0x4CCD, 0x0018, 0xCCCF, 0x0026, 0x2EFD, + 0x0046, 0x99FF, 0x0086, 0x009C, 0x00CA, 0x133F, 0x0026, 0x00AA, 0x0046, 0x445D, 0x0086, 0x8CCD, 0x0018, + 0x11DF, 0x0026, 0x4FFD, 0x0046, 0xCFFF, 0x0086, 0x009D, 0x005A, 0x007E, 0x0026, 0x003A, 0x0046, 0x1FFF, + 0x0086, 0x88AD, 0x0018, 0x00BE, 0x0026, 0x8FFD, 0x0046, 0x4EEF, 0x0086, 0x888D, 0x00CA, 0x111F, 0x0026, + 0x00AA, 0x0046, 0x006C, 0x0086, 0x8AED, 0x0018, 0x45DF, 0x0026, 0x01BD, 0x0046, 0x22EF, 0x0086, 0x027D, + 0x005A, 0x227F, 0x0026, 0x003A, 0x0046, 0x444D, 0x0086, 0x4CCD, 0x0018, 0x11BF, 0x0026, 0x2EFD, 0x0046, + 0x00FE, 0x0086, 0x009C, 0x00CA, 0x223F, 0x0026, 0x00AA, 0x0046, 0x445D, 0x0086, 0x8CCD, 0x0018, 0x00DE, + 0x0026, 0x4FFD, 0x0046, 0xABFF, 0x0086, 0x009D, 0x005A, 0x006F, 0x0026, 0x003A, 0x0046, 0x6EFF, 0x0086, + 0x88AD, 0x0018, 0x2AAF, 0x0026, 0x8FFD, 0x0046, 0x00EE, 0x0086, 0x888D, 0x00CA, 0x222F, 0x0004, 0x00CA, + 0x0088, 0x027D, 0x0004, 0x4CCD, 0x0028, 0x00FE, 0x0004, 0x2AFD, 0x0048, 0x005C, 0x0004, 0x009D, 0x0018, + 0x00DE, 0x0004, 0x01BD, 0x0088, 0x006C, 0x0004, 0x88AD, 0x0028, 0x11DF, 0x0004, 0x8AED, 0x0048, 0x003C, + 0x0004, 0x888D, 0x0018, 0x111F, 0x0004, 0x00CA, 0x0088, 0x006D, 0x0004, 0x88CD, 0x0028, 0x88FF, 0x0004, + 0x8BFD, 0x0048, 0x444D, 0x0004, 0x009C, 0x0018, 0x00BE, 0x0004, 0x4EFD, 0x0088, 0x445D, 0x0004, 0x00AC, + 0x0028, 0x00EE, 0x0004, 0x45DD, 0x0048, 0x222D, 0x0004, 0x003D, 0x0018, 0x007E, 0x0004, 0x00CA, 0x0088, + 0x027D, 0x0004, 0x4CCD, 0x0028, 0x1FFF, 0x0004, 0x2AFD, 0x0048, 0x005C, 0x0004, 0x009D, 0x0018, 0x11BF, + 0x0004, 0x01BD, 0x0088, 0x006C, 0x0004, 0x88AD, 0x0028, 0x22EF, 0x0004, 0x8AED, 0x0048, 0x003C, 0x0004, + 0x888D, 0x0018, 0x227F, 0x0004, 0x00CA, 0x0088, 0x006D, 0x0004, 0x88CD, 0x0028, 0x4EEF, 0x0004, 0x8BFD, + 0x0048, 0x444D, 0x0004, 0x009C, 0x0018, 0x2AAF, 0x0004, 0x4EFD, 0x0088, 0x445D, 0x0004, 0x00AC, 0x0028, + 0x8DDF, 0x0004, 0x45DD, 0x0048, 0x222D, 0x0004, 0x003D, 0x0018, 0x155F, 0x0004, 0x005A, 0x0088, 0x006C, + 0x0004, 0x88DD, 0x0028, 0x23FF, 0x0004, 0x11FD, 0x0048, 0x444D, 0x0004, 0x00AD, 0x0018, 0x00BE, 0x0004, + 0x137D, 0x0088, 0x155D, 0x0004, 0x00CC, 0x0028, 0x00DE, 0x0004, 0x02ED, 0x0048, 0x111D, 0x0004, 0x009D, + 0x0018, 0x007E, 0x0004, 0x005A, 0x0088, 0x455D, 0x0004, 0x44CD, 0x0028, 0x00EE, 0x0004, 0x1FFD, 0x0048, + 0x003C, 0x0004, 0x00AC, 0x0018, 0x555F, 0x0004, 0x47FD, 0x0088, 0x113D, 0x0004, 0x02BD, 0x0028, 0x477F, + 0x0004, 0x4CDD, 0x0048, 0x8FFF, 0x0004, 0x009C, 0x0018, 0x222F, 0x0004, 0x005A, 0x0088, 0x006C, 0x0004, + 0x88DD, 0x0028, 0x00FE, 0x0004, 0x11FD, 0x0048, 0x444D, 0x0004, 0x00AD, 0x0018, 0x888F, 0x0004, 0x137D, + 0x0088, 0x155D, 0x0004, 0x00CC, 0x0028, 0x8CCF, 0x0004, 0x02ED, 0x0048, 0x111D, 0x0004, 0x009D, 0x0018, + 0x006F, 0x0004, 0x005A, 0x0088, 0x455D, 0x0004, 0x44CD, 0x0028, 0x1DDF, 0x0004, 0x1FFD, 0x0048, 0x003C, + 0x0004, 0x00AC, 0x0018, 0x227F, 0x0004, 0x47FD, 0x0088, 0x113D, 0x0004, 0x02BD, 0x0028, 0x22BF, 0x0004, + 0x4CDD, 0x0048, 0x22EF, 0x0004, 0x009C, 0x0018, 0x233F, 0x0006, 0x4DDD, 0x4FFB, 0xCFFF, 0x0018, 0x113D, + 0x005A, 0x888F, 0x0006, 0x23BD, 0x008A, 0x00EE, 0x002A, 0x155D, 0xAAFD, 0x277F, 0x0006, 0x44CD, 0x8FFB, + 0x44EF, 0x0018, 0x467D, 0x004A, 0x2AAF, 0x0006, 0x00AC, 0x555B, 0x99DF, 0x1FFB, 0x003C, 0x5FFD, 0x266F, + 0x0006, 0x1DDD, 0x4FFB, 0x6EFF, 0x0018, 0x177D, 0x005A, 0x1BBF, 0x0006, 0x88AD, 0x008A, 0x5DDF, 0x002A, + 0x444D, 0x2FFD, 0x667F, 0x0006, 0x00CC, 0x8FFB, 0x2EEF, 0x0018, 0x455D, 0x004A, 0x119F, 0x0006, 0x009C, + 0x555B, 0x8CCF, 0x1FFB, 0x111D, 0x8CED, 0x006E, 0x0006, 0x4DDD, 0x4FFB, 0x3FFF, 0x0018, 0x113D, 0x005A, + 0x11BF, 0x0006, 0x23BD, 0x008A, 0x8DDF, 0x002A, 0x155D, 0xAAFD, 0x222F, 0x0006, 0x44CD, 0x8FFB, 0x00FE, + 0x0018, 0x467D, 0x004A, 0x899F, 0x0006, 0x00AC, 0x555B, 0x00DE, 0x1FFB, 0x003C, 0x5FFD, 0x446F, 0x0006, + 0x1DDD, 0x4FFB, 0x9BFF, 0x0018, 0x177D, 0x005A, 0x00BE, 0x0006, 0x88AD, 0x008A, 0xCDDF, 0x002A, 0x444D, + 0x2FFD, 0x007E, 0x0006, 0x00CC, 0x8FFB, 0x4EEF, 0x0018, 0x455D, 0x004A, 0x377F, 0x0006, 0x009C, 0x555B, + 0x8BBF, 0x1FFB, 0x111D, 0x8CED, 0x233F, 0x0004, 0x00AA, 0x0088, 0x047D, 0x0004, 0x01DD, 0x0028, 0x11DF, + 0x0004, 0x27FD, 0x0048, 0x005C, 0x0004, 0x8AAD, 0x0018, 0x2BBF, 0x0004, 0x009C, 0x0088, 0x006C, 0x0004, + 0x00CC, 0x0028, 0x00EE, 0x0004, 0x8CED, 0x0048, 0x222D, 0x0004, 0x888D, 0x0018, 0x007E, 0x0004, 0x00AA, + 0x0088, 0x006D, 0x0004, 0x88CD, 0x0028, 0x00FE, 0x0004, 0x19FD, 0x0048, 0x003C, 0x0004, 0x2AAD, 0x0018, + 0xAAAF, 0x0004, 0x8BFD, 0x0088, 0x005D, 0x0004, 0x00BD, 0x0028, 0x4CCF, 0x0004, 0x44ED, 0x0048, 0x4FFF, + 0x0004, 0x223D, 0x0018, 0x111F, 0x0004, 0x00AA, 0x0088, 0x047D, 0x0004, 0x01DD, 0x0028, 0x99FF, 0x0004, + 0x27FD, 0x0048, 0x005C, 0x0004, 0x8AAD, 0x0018, 0x00BE, 0x0004, 0x009C, 0x0088, 0x006C, 0x0004, 0x00CC, + 0x0028, 0x00DE, 0x0004, 0x8CED, 0x0048, 0x222D, 0x0004, 0x888D, 0x0018, 0x444F, 0x0004, 0x00AA, 0x0088, + 0x006D, 0x0004, 0x88CD, 0x0028, 0x2EEF, 0x0004, 0x19FD, 0x0048, 0x003C, 0x0004, 0x2AAD, 0x0018, 0x447F, + 0x0004, 0x8BFD, 0x0088, 0x005D, 0x0004, 0x00BD, 0x0028, 0x009F, 0x0004, 0x44ED, 0x0048, 0x67FF, 0x0004, + 0x223D, 0x0018, 0x133F, 0x0006, 0x00CC, 0x008A, 0x9DFF, 0x2FFB, 0x467D, 0x1FFD, 0x99BF, 0x0006, 0x2AAD, + 0x002A, 0x66EF, 0x4FFB, 0x005C, 0x2EED, 0x377F, 0x0006, 0x89BD, 0x004A, 0x00FE, 0x8FFB, 0x006C, 0x67FD, + 0x889F, 0x0006, 0x888D, 0x001A, 0x5DDF, 0x00AA, 0x222D, 0x89DD, 0x444F, 0x0006, 0x2BBD, 0x008A, 0xCFFF, + 0x2FFB, 0x226D, 0x009C, 0x00BE, 0x0006, 0xAAAD, 0x002A, 0x1DDF, 0x4FFB, 0x003C, 0x4DDD, 0x466F, 0x0006, + 0x8AAD, 0x004A, 0xAEEF, 0x8FFB, 0x445D, 0x8EED, 0x177F, 0x0006, 0x233D, 0x001A, 0x4CCF, 0x00AA, 0xAFFF, + 0x88CD, 0x133F, 0x0006, 0x00CC, 0x008A, 0x77FF, 0x2FFB, 0x467D, 0x1FFD, 0x3BBF, 0x0006, 0x2AAD, 0x002A, + 0x00EE, 0x4FFB, 0x005C, 0x2EED, 0x007E, 0x0006, 0x89BD, 0x004A, 0x4EEF, 0x8FFB, 0x006C, 0x67FD, 0x667F, + 0x0006, 0x888D, 0x001A, 0x00DE, 0x00AA, 0x222D, 0x89DD, 0x333F, 0x0006, 0x2BBD, 0x008A, 0x57FF, 0x2FFB, + 0x226D, 0x009C, 0x199F, 0x0006, 0xAAAD, 0x002A, 0x99DF, 0x4FFB, 0x003C, 0x4DDD, 0x155F, 0x0006, 0x8AAD, + 0x004A, 0xCEEF, 0x8FFB, 0x445D, 0x8EED, 0x277F, 0x0006, 0x233D, 0x001A, 0x1BBF, 0x00AA, 0x3FFF, 0x88CD, + 0x111F, 0x0006, 0x45DD, 0x2FFB, 0x111D, 0x0018, 0x467D, 0x8FFD, 0xCCCF, 0x0006, 0x19BD, 0x004A, 0x22EF, + 0x002A, 0x222D, 0x3FFD, 0x888F, 0x0006, 0x00CC, 0x008A, 0x00FE, 0x0018, 0x115D, 0xCFFD, 0x8AAF, 0x0006, + 0x00AC, 0x003A, 0x8CDF, 0x1FFB, 0x133D, 0x66FD, 0x466F, 0x0006, 0x8CCD, 0x2FFB, 0x5FFF, 0x0018, 0x006C, + 0x4FFD, 0xABBF, 0x0006, 0x22AD, 0x004A, 0x00EE, 0x002A, 0x233D, 0xAEFD, 0x377F, 0x0006, 0x2BBD, 0x008A, + 0x55DF, 0x0018, 0x005C, 0x177D, 0x119F, 0x0006, 0x009C, 0x003A, 0x4CCF, 0x1FFB, 0x333D, 0x8EED, 0x444F, + 0x0006, 0x45DD, 0x2FFB, 0x111D, 0x0018, 0x467D, 0x8FFD, 0x99BF, 0x0006, 0x19BD, 0x004A, 0x2EEF, 0x002A, + 0x222D, 0x3FFD, 0x667F, 0x0006, 0x00CC, 0x008A, 0x4EEF, 0x0018, 0x115D, 0xCFFD, 0x899F, 0x0006, 0x00AC, + 0x003A, 0x00DE, 0x1FFB, 0x133D, 0x66FD, 0x226F, 0x0006, 0x8CCD, 0x2FFB, 0x9BFF, 0x0018, 0x006C, 0x4FFD, + 0x00BE, 0x0006, 0x22AD, 0x004A, 0x1DDF, 0x002A, 0x233D, 0xAEFD, 0x007E, 0x0006, 0x2BBD, 0x008A, 0xCEEF, + 0x0018, 0x005C, 0x177D, 0x277F, 0x0006, 0x009C, 0x003A, 0x8BBF, 0x1FFB, 0x333D, 0x8EED, 0x455F, 0x1FF9, + 0x1DDD, 0xAFFB, 0x00DE, 0x8FF9, 0x001C, 0xFFFB, 0x477F, 0x4FF9, 0x177D, 0x3FFB, 0x3BBF, 0x2FF9, 0xAEEF, + 0x8EED, 0x444F, 0x1FF9, 0x22AD, 0x000A, 0x8BBF, 0x8FF9, 0x00FE, 0xCFFD, 0x007E, 0x4FF9, 0x115D, 0x5FFB, + 0x577F, 0x2FF9, 0x8DDF, 0x2EED, 0x333F, 0x1FF9, 0x2BBD, 0xAFFB, 0x88CF, 0x8FF9, 0xBFFF, 0xFFFB, 0x377F, + 0x4FF9, 0x006D, 0x3FFB, 0x00BE, 0x2FF9, 0x66EF, 0x9FFD, 0x133F, 0x1FF9, 0x009D, 0x000A, 0xABBF, 0x8FF9, + 0xDFFF, 0x6FFD, 0x006E, 0x4FF9, 0x002C, 0x5FFB, 0x888F, 0x2FF9, 0xCDDF, 0x4DDD, 0x222F, 0x1FF9, 0x1DDD, + 0xAFFB, 0x4CCF, 0x8FF9, 0x001C, 0xFFFB, 0x277F, 0x4FF9, 0x177D, 0x3FFB, 0x99BF, 0x2FF9, 0xCEEF, 0x8EED, + 0x004E, 0x1FF9, 0x22AD, 0x000A, 0x00AE, 0x8FF9, 0x7FFF, 0xCFFD, 0x005E, 0x4FF9, 0x115D, 0x5FFB, 0x009E, + 0x2FF9, 0x5DDF, 0x2EED, 0x003E, 0x1FF9, 0x2BBD, 0xAFFB, 0x00CE, 0x8FF9, 0xEFFF, 0xFFFB, 0x667F, 0x4FF9, + 0x006D, 0x3FFB, 0x8AAF, 0x2FF9, 0x00EE, 0x9FFD, 0x233F, 0x1FF9, 0x009D, 0x000A, 0x1BBF, 0x8FF9, 0x4EEF, + 0x6FFD, 0x455F, 0x4FF9, 0x002C, 0x5FFB, 0x008E, 0x2FF9, 0x99DF, 0x4DDD, 0x111F}; diff --git a/src/third_party/ffmpeg/libavcodec/jpeg2000htdec.h b/src/third_party/ffmpeg/libavcodec/jpeg2000htdec.h new file mode 100644 index 00000000..572d095c --- /dev/null +++ b/src/third_party/ffmpeg/libavcodec/jpeg2000htdec.h @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2022 Caleb Etemesi + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_JPEG2000HTDEC_H +#define AVCODEC_JPEG2000HTDEC_H + +#include "jpeg2000dec.h" + +/** + * HT Block decoder as specified in Rec. ITU-T T.814 | ISO/IEC 15444-15 + */ + +int ff_jpeg2000_decode_htj2k(const Jpeg2000DecoderContext *s, Jpeg2000CodingStyle *codsty, + Jpeg2000T1Context *t1, Jpeg2000Cblk *cblk, int width, + int height, int magp, uint8_t roi_shift); + +#endif /* AVCODEC_JPEG2000HTDEC_H */ diff --git a/src/third_party/ffmpeg/libavcodec/jvdec.c b/src/third_party/ffmpeg/libavcodec/jvdec.c index e0287a9c..13ede906 100644 --- a/src/third_party/ffmpeg/libavcodec/jvdec.c +++ b/src/third_party/ffmpeg/libavcodec/jvdec.c @@ -37,7 +37,9 @@ typedef struct JvContext { BlockDSPContext bdsp; AVFrame *frame; uint32_t palette[AVPALETTE_COUNT]; +#if FF_API_PALETTE_HAS_CHANGED int palette_has_changed; +#endif } JvContext; static av_cold int decode_init(AVCodecContext *avctx) @@ -207,14 +209,20 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, s->palette[i] = 0xFFU << 24 | pal << 2 | ((pal >> 4) & 0x30303); buf += 3; } +#if FF_API_PALETTE_HAS_CHANGED s->palette_has_changed = 1; +#endif } if (video_size) { - s->frame->key_frame = 1; + s->frame->flags |= AV_FRAME_FLAG_KEY; s->frame->pict_type = AV_PICTURE_TYPE_I; +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS s->frame->palette_has_changed = s->palette_has_changed; s->palette_has_changed = 0; +FF_ENABLE_DEPRECATION_WARNINGS +#endif memcpy(s->frame->data[1], s->palette, AVPALETTE_SIZE); if ((ret = av_frame_ref(rframe, s->frame)) < 0) diff --git a/src/third_party/ffmpeg/libavcodec/kmvc.c b/src/third_party/ffmpeg/libavcodec/kmvc.c index 153cea03..83aba4b2 100644 --- a/src/third_party/ffmpeg/libavcodec/kmvc.c +++ b/src/third_party/ffmpeg/libavcodec/kmvc.c @@ -273,7 +273,14 @@ static int decode_frame(AVCodecContext * avctx, AVFrame *frame, if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) return ret; - frame->palette_has_changed = ff_copy_palette(ctx->pal, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS + frame->palette_has_changed = +#endif + ff_copy_palette(ctx->pal, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_ENABLE_DEPRECATION_WARNINGS +#endif header = bytestream2_get_byte(&ctx->g); @@ -288,15 +295,19 @@ static int decode_frame(AVCodecContext * avctx, AVFrame *frame, } if (header & KMVC_KEYFRAME) { - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_I; } else { - frame->key_frame = 0; + frame->flags &= ~AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_P; } if (header & KMVC_PALETTE) { +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif // palette starts from index 1 and has 127 entries for (i = 1; i <= ctx->palsize; i++) { ctx->pal[i] = 0xFFU << 24 | bytestream2_get_be24(&ctx->g); @@ -305,7 +316,11 @@ static int decode_frame(AVCodecContext * avctx, AVFrame *frame, if (ctx->setpal) { ctx->setpal = 0; +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } /* make the palette available on the way out */ diff --git a/src/third_party/ffmpeg/libavcodec/lagarith.c b/src/third_party/ffmpeg/libavcodec/lagarith.c index 78ccbc15..ebc1f761 100644 --- a/src/third_party/ffmpeg/libavcodec/lagarith.c +++ b/src/third_party/ffmpeg/libavcodec/lagarith.c @@ -550,7 +550,7 @@ static int lag_decode_frame(AVCodecContext *avctx, AVFrame *p, int i, j, planes = 3; int ret = 0; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; p->pict_type = AV_PICTURE_TYPE_I; frametype = buf[0]; diff --git a/src/third_party/ffmpeg/libavcodec/lcldec.c b/src/third_party/ffmpeg/libavcodec/lcldec.c index 5cc0a29b..ed78d9d5 100644 --- a/src/third_party/ffmpeg/libavcodec/lcldec.c +++ b/src/third_party/ffmpeg/libavcodec/lcldec.c @@ -152,6 +152,8 @@ static int zlib_decomp(AVCodecContext *avctx, const uint8_t *src, int src_len, i if (expected != (unsigned int)zstream->total_out) { av_log(avctx, AV_LOG_ERROR, "Decoded size differs (%d != %lu)\n", expected, zstream->total_out); + if (expected > (unsigned int)zstream->total_out) + return (unsigned int)zstream->total_out; return AVERROR_UNKNOWN; } return zstream->total_out; @@ -169,8 +171,8 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, int row, col; unsigned char *encoded = avpkt->data, *outptr; uint8_t *y_out, *u_out, *v_out; - unsigned int width = avctx->width; // Real image width - unsigned int height = avctx->height; // Real image height + int width = avctx->width; // Real image width + int height = avctx->height; // Real image height unsigned int mszh_dlen; unsigned char yq, y1q, uq, vq; int uqvq, ret; @@ -219,7 +221,9 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, if (c->decomp_size != mszh_dlen) { av_log(avctx, AV_LOG_ERROR, "Decoded size differs (%d != %d)\n", c->decomp_size, mszh_dlen); - return AVERROR_INVALIDDATA; + if (c->decomp_size != mszh_dlen && + c->decomp_size != mszh_dlen + 2) // YUV420 306x306 is missing 2 bytes + return AVERROR_INVALIDDATA; } encoded = c->decomp_buf; len = mszh_dlen; @@ -276,12 +280,13 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, ret = zlib_decomp(avctx, buf + 8 + mthread_inlen, len - 8 - mthread_inlen, mthread_outlen, mthread_outlen); if (ret < 0) return ret; + len = c->decomp_size; } else { int ret = zlib_decomp(avctx, buf, len, 0, c->decomp_size); if (ret < 0) return ret; + len = ret; } encoded = c->decomp_buf; - len = c->decomp_size; break; #endif default: @@ -403,6 +408,11 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, v_out[ col >> 1 ] = *encoded++ + 128; v_out[(col >> 1) + 1] = *encoded++ + 128; } + if (col && col < width) { + u_out[ col >> 1 ] = u_out[(col>>1) - 1]; + v_out[ col >> 1 ] = v_out[(col>>1) - 1]; + } + y_out -= frame->linesize[0]; u_out -= frame->linesize[1]; v_out -= frame->linesize[2]; @@ -424,6 +434,10 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, u_out[col >> 2] = *encoded++ + 128; v_out[col >> 2] = *encoded++ + 128; } + if (col && col < width) { + u_out[col >> 2] = u_out[(col>>2) - 1]; + v_out[col >> 2] = v_out[(col>>2) - 1]; + } y_out -= frame->linesize[0]; u_out -= frame->linesize[1]; v_out -= frame->linesize[2]; @@ -464,7 +478,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, return AVERROR_INVALIDDATA; } - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_I; *got_frame = 1; @@ -481,6 +495,7 @@ static av_cold int decode_init(AVCodecContext *avctx) FFALIGN(avctx->height, 4); unsigned int max_decomp_size; int subsample_h, subsample_v; + int partial_h_supported = 0; if (avctx->extradata_size < 8) { av_log(avctx, AV_LOG_ERROR, "Extradata size too small.\n"); @@ -502,26 +517,24 @@ static av_cold int decode_init(AVCodecContext *avctx) av_log(avctx, AV_LOG_DEBUG, "Image type is YUV 1:1:1.\n"); break; case IMGTYPE_YUV422: - c->decomp_size = basesize * 2; + c->decomp_size = (avctx->width & ~3) * avctx->height * 2; max_decomp_size = max_basesize * 2; avctx->pix_fmt = AV_PIX_FMT_YUV422P; av_log(avctx, AV_LOG_DEBUG, "Image type is YUV 4:2:2.\n"); - if (avctx->width % 4) { - avpriv_request_sample(avctx, "Unsupported dimensions"); - return AVERROR_INVALIDDATA; - } + partial_h_supported = 1; break; case IMGTYPE_RGB24: - c->decomp_size = basesize * 3; + c->decomp_size = FFALIGN(avctx->width*3, 4) * avctx->height; max_decomp_size = max_basesize * 3; avctx->pix_fmt = AV_PIX_FMT_BGR24; av_log(avctx, AV_LOG_DEBUG, "Image type is RGB 24.\n"); break; case IMGTYPE_YUV411: - c->decomp_size = basesize / 2 * 3; + c->decomp_size = (avctx->width & ~3) * avctx->height / 2 * 3; max_decomp_size = max_basesize / 2 * 3; avctx->pix_fmt = AV_PIX_FMT_YUV411P; av_log(avctx, AV_LOG_DEBUG, "Image type is YUV 4:1:1.\n"); + partial_h_supported = 1; break; case IMGTYPE_YUV211: c->decomp_size = basesize * 2; @@ -541,7 +554,7 @@ static av_cold int decode_init(AVCodecContext *avctx) } av_pix_fmt_get_chroma_sub_sample(avctx->pix_fmt, &subsample_h, &subsample_v); - if (avctx->width % (1<height % (1<width % (1<height % (1<decoder, AOMD_GET_FRAME_FLAGS, &flags); if (ret == AOM_CODEC_OK) { - picture->key_frame = !!(flags & AOM_FRAME_IS_KEY); + if (flags & AOM_FRAME_IS_KEY) + picture->flags |= AV_FRAME_FLAG_KEY; + else + picture->flags &= ~AV_FRAME_FLAG_KEY; if (flags & (AOM_FRAME_IS_KEY | AOM_FRAME_IS_INTRAONLY)) picture->pict_type = AV_PICTURE_TYPE_I; else if (flags & AOM_FRAME_IS_SWITCH) diff --git a/src/third_party/ffmpeg/libavcodec/libaomenc.c b/src/third_party/ffmpeg/libavcodec/libaomenc.c index 0b88102c..16747e7e 100644 --- a/src/third_party/ffmpeg/libavcodec/libaomenc.c +++ b/src/third_party/ffmpeg/libavcodec/libaomenc.c @@ -1295,8 +1295,18 @@ static int aom_encode(AVCodecContext *avctx, AVPacket *pkt, if (frame->duration > ULONG_MAX) { av_log(avctx, AV_LOG_WARNING, "Frame duration too large: %"PRId64"\n", frame->duration); - } else - duration = frame->duration ? frame->duration : avctx->ticks_per_frame; + } else if (frame->duration) + duration = frame->duration; + else if (avctx->framerate.num > 0 && avctx->framerate.den > 0) + duration = av_rescale_q(1, av_inv_q(avctx->framerate), avctx->time_base); + else +FF_DISABLE_DEPRECATION_WARNINGS + duration = +#if FF_API_TICKS_PER_FRAME + avctx->ticks_per_frame ? avctx->ticks_per_frame : +#endif + 1; +FF_ENABLE_DEPRECATION_WARNINGS switch (frame->color_range) { case AVCOL_RANGE_MPEG: diff --git a/src/third_party/ffmpeg/libavcodec/libdav1d.c b/src/third_party/ffmpeg/libavcodec/libdav1d.c index ddf2311a..c263157a 100644 --- a/src/third_party/ffmpeg/libavcodec/libdav1d.c +++ b/src/third_party/ffmpeg/libavcodec/libdav1d.c @@ -30,6 +30,7 @@ #include "libavutil/opt.h" #include "atsc_a53.h" +#include "av1_parse.h" #include "avcodec.h" #include "bytestream.h" #include "codec_internal.h" @@ -154,12 +155,9 @@ static void libdav1d_init_params(AVCodecContext *c, const Dav1dSequenceHeader *s else c->pix_fmt = pix_fmt[seq->layout][seq->hbd]; - if (seq->num_units_in_tick && seq->time_scale) { - av_reduce(&c->framerate.den, &c->framerate.num, - seq->num_units_in_tick, seq->time_scale, INT_MAX); - if (seq->equal_picture_interval) - c->ticks_per_frame = seq->num_ticks_per_picture; - } + c->framerate = ff_av1_framerate(seq->num_ticks_per_picture, + (unsigned)seq->num_units_in_tick, + (unsigned)seq->time_scale); if (seq->film_grain_present) c->properties |= FF_CODEC_PROPERTY_FILM_GRAIN; @@ -278,6 +276,15 @@ static av_cold int libdav1d_init(AVCodecContext *c) if (res < 0) return AVERROR(ENOMEM); +#if FF_DAV1D_VERSION_AT_LEAST(6,7) + res = dav1d_get_frame_delay(&s); + if (res < 0) // Should not happen + return AVERROR_EXTERNAL; + + // When dav1d_get_frame_delay() returns 1, there's no delay whatsoever + c->delay = res > 1 ? res : 0; +#endif + return 0; } @@ -309,20 +316,14 @@ static void libdav1d_user_data_free(const uint8_t *data, void *opaque) { av_packet_free(&pkt); } -static int libdav1d_receive_frame(AVCodecContext *c, AVFrame *frame) +static int libdav1d_receive_frame_internal(AVCodecContext *c, Dav1dPicture *p) { Libdav1dContext *dav1d = c->priv_data; Dav1dData *data = &dav1d->data; - Dav1dPicture pic = { 0 }, *p = &pic; - AVPacket *pkt; - OpaqueData *od = NULL; -#if FF_DAV1D_VERSION_AT_LEAST(5,1) - enum Dav1dEventFlags event_flags = 0; -#endif int res; if (!data->sz) { - pkt = av_packet_alloc(); + AVPacket *pkt = av_packet_alloc(); if (!pkt) return AVERROR(ENOMEM); @@ -334,6 +335,8 @@ static int libdav1d_receive_frame(AVCodecContext *c, AVFrame *frame) } if (pkt->size) { + OpaqueData *od = NULL; + res = dav1d_data_wrap(data, pkt->data, pkt->size, libdav1d_data_free, pkt->buf); if (res < 0) { @@ -393,12 +396,31 @@ FF_ENABLE_DEPRECATION_WARNINGS if (res < 0) { if (res == AVERROR(EINVAL)) res = AVERROR_INVALIDDATA; - else if (res == AVERROR(EAGAIN) && c->internal->draining) - res = AVERROR_EOF; - - return res; + else if (res == AVERROR(EAGAIN)) + res = c->internal->draining ? AVERROR_EOF : 1; } + return res; +} + +static int libdav1d_receive_frame(AVCodecContext *c, AVFrame *frame) +{ + Libdav1dContext *dav1d = c->priv_data; + Dav1dPicture pic = { 0 }, *p = &pic; + AVPacket *pkt; + OpaqueData *od = NULL; +#if FF_DAV1D_VERSION_AT_LEAST(5,1) + enum Dav1dEventFlags event_flags = 0; +#endif + int res; + + do { + res = libdav1d_receive_frame_internal(c, p); + } while (res > 0); + + if (res < 0) + return res; + av_assert0(p->data[0] && p->allocator_data); // This requires the custom allocator above @@ -463,7 +485,10 @@ FF_ENABLE_DEPRECATION_WARNINGS goto fail; frame->pkt_dts = pkt->pts; - frame->key_frame = p->frame_hdr->frame_type == DAV1D_FRAME_TYPE_KEY; + if (p->frame_hdr->frame_type == DAV1D_FRAME_TYPE_KEY) + frame->flags |= AV_FRAME_FLAG_KEY; + else + frame->flags &= ~AV_FRAME_FLAG_KEY; switch (p->frame_hdr->frame_type) { case DAV1D_FRAME_TYPE_KEY: @@ -511,10 +536,16 @@ FF_ENABLE_DEPRECATION_WARNINGS light->MaxFALL = p->content_light->max_frame_average_light_level; } if (p->itut_t35) { +#if FF_DAV1D_VERSION_AT_LEAST(6,9) + for (size_t i = 0; i < p->n_itut_t35; i++) { + const Dav1dITUTT35 *itut_t35 = &p->itut_t35[i]; +#else + const Dav1dITUTT35 *itut_t35 = p->itut_t35; +#endif GetByteContext gb; int provider_code; - bytestream2_init(&gb, p->itut_t35->payload, p->itut_t35->payload_size); + bytestream2_init(&gb, itut_t35->payload, itut_t35->payload_size); provider_code = bytestream2_get_be16(&gb); switch (provider_code) { @@ -546,7 +577,7 @@ FF_ENABLE_DEPRECATION_WARNINGS int provider_oriented_code = bytestream2_get_be16(&gb); int application_identifier = bytestream2_get_byte(&gb); - if (p->itut_t35->country_code != 0xB5 || + if (itut_t35->country_code != 0xB5 || provider_oriented_code != 1 || application_identifier != 4) break; @@ -565,6 +596,9 @@ FF_ENABLE_DEPRECATION_WARNINGS default: // ignore unsupported provider codes break; } +#if FF_DAV1D_VERSION_AT_LEAST(6,9) + } +#endif } if (p->frame_hdr->film_grain.present && (!dav1d->apply_grain || (c->export_side_data & AV_CODEC_EXPORT_DATA_FILM_GRAIN))) { diff --git a/src/third_party/ffmpeg/libavcodec/libfdk-aacenc.c b/src/third_party/ffmpeg/libavcodec/libfdk-aacenc.c index eb97e0fb..e08c6a0c 100644 --- a/src/third_party/ffmpeg/libavcodec/libfdk-aacenc.c +++ b/src/third_party/ffmpeg/libavcodec/libfdk-aacenc.c @@ -55,6 +55,7 @@ typedef struct AACContext { int metadata_mode; AACENC_MetaData metaDataSetup; int delay_sent; + int frame_length; AudioFrameQueue afq; } AACContext; @@ -78,6 +79,7 @@ static const AVOption aac_enc_options[] = { { "comp_profile", "The desired compression profile for AAC DRC", offsetof(AACContext, comp_profile), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 256, AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM }, { "comp_target_ref", "Expected target reference level at decoder side in dB (for clipping prevention/limiter)", offsetof(AACContext, comp_target_ref), AV_OPT_TYPE_INT, { .i64 = 0.0 }, -31.75, 0, AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM }, { "prog_ref", "The program reference level or dialog level in dB", offsetof(AACContext, prog_ref), AV_OPT_TYPE_INT, { .i64 = 0.0 }, -31.75, 0, AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM }, + { "frame_length", "The desired frame length", offsetof(AACContext, frame_length), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 1024, AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM }, FF_AAC_PROFILE_OPTS { NULL } }; @@ -132,6 +134,44 @@ static int aac_encode_close(AVCodecContext *avctx) return 0; } +static void aac_encode_flush(AVCodecContext *avctx) +{ + AACContext *s = avctx->priv_data; + AACENC_BufDesc in_buf = { 0 }, out_buf = { 0 }; + AACENC_InArgs in_args = { 0 }; + AACENC_OutArgs out_args; + int64_t pts, duration; + uint8_t dummy_in[1], dummy_out[1]; + int in_buffer_identifiers[] = { IN_AUDIO_DATA, IN_METADATA_SETUP }; + int in_buffer_element_sizes[] = { 2, sizeof(AACENC_MetaData) }; + int in_buffer_sizes[] = { 0, sizeof(s->metaDataSetup) }; + int out_buffer_identifier = OUT_BITSTREAM_DATA; + int out_buffer_size = sizeof(dummy_out), out_buffer_element_size = 1; + void* inBuffer[] = { dummy_in, &s->metaDataSetup }; + void *out_ptr = dummy_out; + AACENC_ERROR err; + + ff_af_queue_remove(&s->afq, s->afq.frame_count, &pts, &duration); + + in_buf.bufs = (void **)inBuffer; + in_buf.numBufs = s->metadata_mode == 0 ? 1 : 2; + in_buf.bufferIdentifiers = in_buffer_identifiers; + in_buf.bufSizes = in_buffer_sizes; + in_buf.bufElSizes = in_buffer_element_sizes; + + out_buf.numBufs = 1; + out_buf.bufs = &out_ptr; + out_buf.bufferIdentifiers = &out_buffer_identifier; + out_buf.bufSizes = &out_buffer_size; + out_buf.bufElSizes = &out_buffer_element_size; + + err = aacEncEncode(s->handle, &in_buf, &out_buf, &in_args, &out_args); + if (err != AACENC_OK) { + av_log(avctx, AV_LOG_ERROR, "Unexpected error while flushing: %s\n", + aac_get_error(err)); + } +} + static av_cold int aac_encode_init(AVCodecContext *avctx) { AACContext *s = avctx->priv_data; @@ -166,6 +206,15 @@ static av_cold int aac_encode_init(AVCodecContext *avctx) } } + if (s->frame_length >= 0) { + if ((err = aacEncoder_SetParam(s->handle, AACENC_GRANULE_LENGTH, + s->frame_length)) != AACENC_OK) { + av_log(avctx, AV_LOG_ERROR, "Unable to set granule length: %s\n", + aac_get_error(err)); + goto error; + } + } + if ((err = aacEncoder_SetParam(s->handle, AACENC_SAMPLERATE, avctx->sample_rate)) != AACENC_OK) { av_log(avctx, AV_LOG_ERROR, "Unable to set the sample rate %d: %s\n", @@ -561,11 +610,13 @@ const FFCodec ff_libfdk_aac_encoder = { .p.type = AVMEDIA_TYPE_AUDIO, .p.id = AV_CODEC_ID_AAC, .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY | + AV_CODEC_CAP_ENCODER_FLUSH | AV_CODEC_CAP_SMALL_LAST_FRAME, .caps_internal = FF_CODEC_CAP_NOT_INIT_THREADSAFE, .priv_data_size = sizeof(AACContext), .init = aac_encode_init, FF_CODEC_ENCODE_CB(aac_encode_frame), + .flush = aac_encode_flush, .close = aac_encode_close, .p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE }, diff --git a/src/third_party/ffmpeg/libavcodec/libjxldec.c b/src/third_party/ffmpeg/libavcodec/libjxldec.c index 045a1535..65966b7b 100644 --- a/src/third_party/ffmpeg/libavcodec/libjxldec.c +++ b/src/third_party/ffmpeg/libavcodec/libjxldec.c @@ -411,7 +411,7 @@ static int libjxl_decode_frame(AVCodecContext *avctx, AVFrame *frame, int *got_f /* full image is one frame, even if animated */ av_log(avctx, AV_LOG_DEBUG, "FULL_IMAGE event emitted\n"); frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; if (ctx->iccp) { AVFrameSideData *sd = av_frame_new_side_data_from_buf(frame, AV_FRAME_DATA_ICC_PROFILE, ctx->iccp); if (!sd) diff --git a/src/third_party/ffmpeg/libavcodec/libjxlenc.c b/src/third_party/ffmpeg/libavcodec/libjxlenc.c index 897452f5..d707f3a6 100644 --- a/src/third_party/ffmpeg/libavcodec/libjxlenc.c +++ b/src/third_party/ffmpeg/libavcodec/libjxlenc.c @@ -335,11 +335,11 @@ static int libjxl_encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFra break; case AVCOL_TRC_GAMMA22: jxl_color.transfer_function = JXL_TRANSFER_FUNCTION_GAMMA; - jxl_color.gamma = 2.2; + jxl_color.gamma = 1/2.2f; break; case AVCOL_TRC_GAMMA28: jxl_color.transfer_function = JXL_TRANSFER_FUNCTION_GAMMA; - jxl_color.gamma = 2.8; + jxl_color.gamma = 1/2.8f; break; default: if (pix_desc->flags & AV_PIX_FMT_FLAG_FLOAT) { diff --git a/src/third_party/ffmpeg/libavcodec/libkvazaar.c b/src/third_party/ffmpeg/libavcodec/libkvazaar.c index 168486f4..2ef34dd8 100644 --- a/src/third_party/ffmpeg/libavcodec/libkvazaar.c +++ b/src/third_party/ffmpeg/libavcodec/libkvazaar.c @@ -85,13 +85,14 @@ static av_cold int libkvazaar_init(AVCodecContext *avctx) cfg->framerate_num = avctx->framerate.num; cfg->framerate_denom = avctx->framerate.den; } else { - if (avctx->ticks_per_frame > INT_MAX / avctx->time_base.num) { - av_log(avctx, AV_LOG_ERROR, - "Could not set framerate for kvazaar: integer overflow\n"); - return AVERROR(EINVAL); - } cfg->framerate_num = avctx->time_base.den; - cfg->framerate_denom = avctx->time_base.num * avctx->ticks_per_frame; +FF_DISABLE_DEPRECATION_WARNINGS + cfg->framerate_denom = avctx->time_base.num +#if FF_API_TICKS_PER_FRAME + * avctx->ticks_per_frame +#endif + ; +FF_ENABLE_DEPRECATION_WARNINGS } cfg->target_bitrate = avctx->bit_rate; cfg->vui.sar_width = avctx->sample_aspect_ratio.num; diff --git a/src/third_party/ffmpeg/libavcodec/libmp3lame.c b/src/third_party/ffmpeg/libavcodec/libmp3lame.c index e119189f..312bc423 100644 --- a/src/third_party/ffmpeg/libavcodec/libmp3lame.c +++ b/src/third_party/ffmpeg/libavcodec/libmp3lame.c @@ -55,6 +55,8 @@ typedef struct LAMEContext { float *samples_flt[2]; AudioFrameQueue afq; AVFloatDSPContext *fdsp; + int copyright; + int original; } LAMEContext; @@ -137,6 +139,12 @@ static av_cold int mp3lame_encode_init(AVCodecContext *avctx) /* bit reservoir usage */ lame_set_disable_reservoir(s->gfp, !s->reservoir); + /* copyright flag */ + lame_set_copyright(s->gfp, s->copyright); + + /* original flag */ + lame_set_original(s->gfp, s->original); + /* set specified parameters */ if (lame_init_params(s->gfp) < 0) { ret = AVERROR_EXTERNAL; @@ -303,9 +311,11 @@ static int mp3lame_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, #define OFFSET(x) offsetof(LAMEContext, x) #define AE AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM static const AVOption options[] = { - { "reservoir", "use bit reservoir", OFFSET(reservoir), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, AE }, - { "joint_stereo", "use joint stereo", OFFSET(joint_stereo), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, AE }, - { "abr", "use ABR", OFFSET(abr), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, AE }, + { "reservoir", "use bit reservoir", OFFSET(reservoir), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, AE }, + { "joint_stereo", "use joint stereo", OFFSET(joint_stereo), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, AE }, + { "abr", "use ABR", OFFSET(abr), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, AE }, + { "copyright", "set copyright flag", OFFSET(copyright), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, AE}, + { "original", "set original flag", OFFSET(original), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, AE}, { NULL }, }; diff --git a/src/third_party/ffmpeg/libavcodec/libopenh264enc.c b/src/third_party/ffmpeg/libavcodec/libopenh264enc.c index 8b4755f5..5b59af6f 100644 --- a/src/third_party/ffmpeg/libavcodec/libopenh264enc.c +++ b/src/third_party/ffmpeg/libavcodec/libopenh264enc.c @@ -139,12 +139,13 @@ static av_cold int svc_encode_init(AVCodecContext *avctx) if (avctx->framerate.num > 0 && avctx->framerate.den > 0) { param.fMaxFrameRate = av_q2d(avctx->framerate); } else { - if (avctx->ticks_per_frame > INT_MAX / avctx->time_base.num) { - av_log(avctx, AV_LOG_ERROR, - "Could not set framerate for libopenh264enc: integer overflow\n"); - return AVERROR(EINVAL); - } - param.fMaxFrameRate = 1.0 / av_q2d(avctx->time_base) / FFMAX(avctx->ticks_per_frame, 1); +FF_DISABLE_DEPRECATION_WARNINGS + param.fMaxFrameRate = 1.0 / av_q2d(avctx->time_base) +#if FF_API_TICKS_PER_FRAME + / FFMAX(avctx->ticks_per_frame, 1) +#endif + ; +FF_ENABLE_DEPRECATION_WARNINGS } param.iPicWidth = avctx->width; param.iPicHeight = avctx->height; @@ -311,15 +312,15 @@ static av_cold int svc_encode_init(AVCodecContext *avctx) #if OPENH264_VER_AT_LEAST(1, 6) param.sSpatialLayers[0].uiVideoFormat = VF_UNDEF; + if (avctx->color_range != AVCOL_RANGE_UNSPECIFIED) { - param.sSpatialLayers[0].bVideoSignalTypePresent = true; param.sSpatialLayers[0].bFullRange = (avctx->color_range == AVCOL_RANGE_JPEG); - } + } else if (avctx->pix_fmt == AV_PIX_FMT_YUVJ420P) + param.sSpatialLayers[0].bFullRange = 1; if (avctx->colorspace != AVCOL_SPC_UNSPECIFIED || avctx->color_primaries != AVCOL_PRI_UNSPECIFIED || avctx->color_trc != AVCOL_TRC_UNSPECIFIED) { - param.sSpatialLayers[0].bVideoSignalTypePresent = true; param.sSpatialLayers[0].bColorDescriptionPresent = true; } @@ -329,6 +330,9 @@ static av_cold int svc_encode_init(AVCodecContext *avctx) param.sSpatialLayers[0].uiColorPrimaries = avctx->color_primaries; if (avctx->color_trc != AVCOL_TRC_UNSPECIFIED) param.sSpatialLayers[0].uiTransferCharacteristics = avctx->color_trc; + + param.sSpatialLayers[0].bVideoSignalTypePresent = + (param.sSpatialLayers[0].bFullRange || param.sSpatialLayers[0].bColorDescriptionPresent); #endif if ((*s->encoder)->InitializeExt(s->encoder, ¶m) != cmResultSuccess) { @@ -443,6 +447,7 @@ const FFCodec ff_libopenh264_encoder = { .caps_internal = FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_AUTO_THREADS, .p.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, + AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_NONE }, .defaults = svc_enc_defaults, .p.priv_class = &class, diff --git a/src/third_party/ffmpeg/libavcodec/librav1e.c b/src/third_party/ffmpeg/libavcodec/librav1e.c index 08affabe..56539435 100644 --- a/src/third_party/ffmpeg/libavcodec/librav1e.c +++ b/src/third_party/ffmpeg/libavcodec/librav1e.c @@ -219,10 +219,15 @@ static av_cold int librav1e_encode_init(AVCodecContext *avctx) avctx->framerate.den, avctx->framerate.num }); } else { +FF_DISABLE_DEPRECATION_WARNINGS rav1e_config_set_time_base(cfg, (RaRational) { - avctx->time_base.num * avctx->ticks_per_frame, - avctx->time_base.den + avctx->time_base.num +#if FF_API_TICKS_PER_FRAME + * avctx->ticks_per_frame +#endif + , avctx->time_base.den }); +FF_ENABLE_DEPRECATION_WARNINGS } if ((avctx->flags & AV_CODEC_FLAG_PASS1 || avctx->flags & AV_CODEC_FLAG_PASS2) && !avctx->bit_rate) { diff --git a/src/third_party/ffmpeg/libavcodec/librsvgdec.c b/src/third_party/ffmpeg/libavcodec/librsvgdec.c index 9c8aa2de..2f160edc 100644 --- a/src/third_party/ffmpeg/libavcodec/librsvgdec.c +++ b/src/third_party/ffmpeg/libavcodec/librsvgdec.c @@ -73,7 +73,7 @@ static int librsvg_decode_frame(AVCodecContext *avctx, AVFrame *frame, if ((ret = ff_get_buffer(avctx, frame, 0))) return ret; frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; image = cairo_image_surface_create_for_data(frame->data[0], CAIRO_FORMAT_ARGB32, frame->width, frame->height, diff --git a/src/third_party/ffmpeg/libavcodec/libspeexdec.c b/src/third_party/ffmpeg/libavcodec/libspeexdec.c index 47fc5d6a..84b30849 100644 --- a/src/third_party/ffmpeg/libavcodec/libspeexdec.c +++ b/src/third_party/ffmpeg/libavcodec/libspeexdec.c @@ -195,7 +195,11 @@ const FFCodec ff_libspeex_decoder = { CODEC_LONG_NAME("libspeex Speex"), .p.type = AVMEDIA_TYPE_AUDIO, .p.id = AV_CODEC_ID_SPEEX, - .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF, + .p.capabilities = +#if FF_API_SUBFRAMES + AV_CODEC_CAP_SUBFRAMES | +#endif + AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF, .p.wrapper_name = "libspeex", .caps_internal = FF_CODEC_CAP_NOT_INIT_THREADSAFE, .priv_data_size = sizeof(LibSpeexContext), diff --git a/src/third_party/ffmpeg/libavcodec/libsvtav1.c b/src/third_party/ffmpeg/libavcodec/libsvtav1.c index 9174e275..718a04d2 100644 --- a/src/third_party/ffmpeg/libavcodec/libsvtav1.c +++ b/src/third_party/ffmpeg/libavcodec/libsvtav1.c @@ -170,7 +170,7 @@ static int config_enc_params(EbSvtAv1EncConfiguration *param, param->look_ahead_distance = svt_enc->la_depth; #endif - if (svt_enc->enc_mode >= 0) + if (svt_enc->enc_mode >= -1) param->enc_mode = svt_enc->enc_mode; if (avctx->bit_rate) { @@ -250,7 +250,13 @@ static int config_enc_params(EbSvtAv1EncConfiguration *param, param->frame_rate_denominator = avctx->framerate.den; } else { param->frame_rate_numerator = avctx->time_base.den; - param->frame_rate_denominator = avctx->time_base.num * avctx->ticks_per_frame; +FF_DISABLE_DEPRECATION_WARNINGS + param->frame_rate_denominator = avctx->time_base.num +#if FF_API_TICKS_PER_FRAME + * avctx->ticks_per_frame +#endif + ; +FF_ENABLE_DEPRECATION_WARNINGS } /* 2 = IDR, closed GOP, 1 = CRA, open GOP */ @@ -593,7 +599,7 @@ static const AVOption options[] = { { "high", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 1 }, 0, 0, VE, "tier" }, #endif { "preset", "Encoding preset", - OFFSET(enc_mode), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, MAX_ENC_PRESET, VE }, + OFFSET(enc_mode), AV_OPT_TYPE_INT, { .i64 = -2 }, -2, MAX_ENC_PRESET, VE }, FF_AV1_PROFILE_OPTS diff --git a/src/third_party/ffmpeg/libavcodec/libuavs3d.c b/src/third_party/ffmpeg/libavcodec/libuavs3d.c index 5c08d2b8..66e8d310 100644 --- a/src/third_party/ffmpeg/libavcodec/libuavs3d.c +++ b/src/third_party/ffmpeg/libavcodec/libuavs3d.c @@ -96,7 +96,10 @@ FF_ENABLE_DEPRECATION_WARNINGS av_log(NULL, AV_LOG_WARNING, "Error frame type in uavs3d: %d.\n", dec_frame->type); } else { frm->pict_type = ff_avs3_image_type[dec_frame->type]; - frm->key_frame = (frm->pict_type == AV_PICTURE_TYPE_I); + if (frm->pict_type == AV_PICTURE_TYPE_I) + frm->flags |= AV_FRAME_FLAG_KEY; + else + frm->flags &= ~AV_FRAME_FLAG_KEY; } for (i = 0; i < 3; i++) { diff --git a/src/third_party/ffmpeg/libavcodec/libvpxenc.c b/src/third_party/ffmpeg/libavcodec/libvpxenc.c index a20e9498..8833df2d 100644 --- a/src/third_party/ffmpeg/libavcodec/libvpxenc.c +++ b/src/third_party/ffmpeg/libavcodec/libvpxenc.c @@ -1692,6 +1692,7 @@ static int vpx_encode(AVCodecContext *avctx, AVPacket *pkt, const struct vpx_codec_enc_cfg *enccfg = ctx->encoder.config.enc; vpx_svc_layer_id_t layer_id; int layer_id_valid = 0; + unsigned long duration = 0; if (avctx->qmax >= 0 && enccfg->rc_max_quantizer != avctx->qmax) { struct vpx_codec_enc_cfg cfg = *enccfg; @@ -1820,8 +1821,24 @@ static int vpx_encode(AVCodecContext *avctx, AVPacket *pkt, #endif } + if (frame && frame->duration > ULONG_MAX) { + av_log(avctx, AV_LOG_WARNING, + "Frame duration too large: %"PRId64"\n", frame->duration); + } else if (frame && frame->duration) + duration = frame->duration; + else if (avctx->framerate.num > 0 && avctx->framerate.den > 0) + duration = av_rescale_q(1, av_inv_q(avctx->framerate), avctx->time_base); + else +FF_DISABLE_DEPRECATION_WARNINGS + duration = +#if FF_API_TICKS_PER_FRAME + avctx->ticks_per_frame ? avctx->ticks_per_frame : +#endif + 1; +FF_ENABLE_DEPRECATION_WARNINGS + res = vpx_codec_encode(&ctx->encoder, rawimg, timestamp, - avctx->ticks_per_frame, flags, ctx->deadline); + duration, flags, ctx->deadline); if (res != VPX_CODEC_OK) { log_encoder_error(avctx, "Error encoding frame"); return AVERROR_INVALIDDATA; @@ -1829,7 +1846,7 @@ static int vpx_encode(AVCodecContext *avctx, AVPacket *pkt, if (ctx->is_alpha) { res = vpx_codec_encode(&ctx->encoder_alpha, rawimg_alpha, timestamp, - avctx->ticks_per_frame, flags, ctx->deadline); + duration, flags, ctx->deadline); if (res != VPX_CODEC_OK) { log_encoder_error(avctx, "Error encoding alpha frame"); return AVERROR_INVALIDDATA; diff --git a/src/third_party/ffmpeg/libavcodec/libx264.c b/src/third_party/ffmpeg/libavcodec/libx264.c index cf7a9a78..774c23da 100644 --- a/src/third_party/ffmpeg/libavcodec/libx264.c +++ b/src/third_party/ffmpeg/libavcodec/libx264.c @@ -151,7 +151,7 @@ static int encode_nals(AVCodecContext *ctx, AVPacket *pkt, { X264Context *x4 = ctx->priv_data; uint8_t *p; - uint64_t size = x4->sei_size; + uint64_t size = FFMAX(x4->sei_size, 0); int ret; if (!nnal) @@ -178,8 +178,8 @@ static int encode_nals(AVCodecContext *ctx, AVPacket *pkt, memcpy(p, x4->sei, x4->sei_size); p += x4->sei_size; size -= x4->sei_size; - x4->sei_size = 0; - av_freep(&x4->sei); + /* Keep the value around in case of flush */ + x4->sei_size = -x4->sei_size; } /* x264 guarantees the payloads of the NALs @@ -196,9 +196,9 @@ static void reconfig_encoder(AVCodecContext *ctx, const AVFrame *frame) if (x4->avcintra_class < 0) { - if (x4->params.b_interlaced && x4->params.b_tff != frame->top_field_first) { + if (x4->params.b_interlaced && x4->params.b_tff != !!(frame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST)) { - x4->params.b_tff = frame->top_field_first; + x4->params.b_tff = !!(frame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST); x264_encoder_reconfig(x4->enc, &x4->params); } if (x4->params.vui.i_sar_height*ctx->sample_aspect_ratio.num != ctx->sample_aspect_ratio.den * x4->params.vui.i_sar_width) { @@ -339,7 +339,7 @@ static int setup_roi(AVCodecContext *ctx, x264_picture_t *pic, int bit_depth, av_log(ctx, AV_LOG_WARNING, "Adaptive quantization must be enabled to use ROI encoding, skipping ROI.\n"); } return 0; - } else if (frame->interlaced_frame) { + } else if (frame->flags & AV_FRAME_FLAG_INTERLACED) { if (!x4->roi_warned) { x4->roi_warned = 1; av_log(ctx, AV_LOG_WARNING, "interlaced_frame not supported for ROI encoding yet, skipping ROI.\n"); @@ -664,6 +664,24 @@ FF_ENABLE_DEPRECATION_WARNINGS return 0; } +static void X264_flush(AVCodecContext *avctx) +{ + X264Context *x4 = avctx->priv_data; + x264_nal_t *nal; + int nnal, ret; + x264_picture_t pic_out = {0}; + + do { + ret = x264_encoder_encode(x4->enc, &nal, &nnal, NULL, &pic_out); + } while (ret > 0 && x264_encoder_delayed_frames(x4->enc)); + + for (int i = 0; i < x4->nb_reordered_opaque; i++) + opaque_uninit(&x4->reordered_opaque[i]); + + if (x4->sei_size < 0) + x4->sei_size = -x4->sei_size; +} + static av_cold int X264_close(AVCodecContext *avctx) { X264Context *x4 = avctx->priv_data; @@ -1016,7 +1034,13 @@ static av_cold int X264_init(AVCodecContext *avctx) x4->params.i_fps_den = avctx->framerate.den; } else { x4->params.i_fps_num = avctx->time_base.den; - x4->params.i_fps_den = avctx->time_base.num * avctx->ticks_per_frame; +FF_DISABLE_DEPRECATION_WARNINGS + x4->params.i_fps_den = avctx->time_base.num +#if FF_API_TICKS_PER_FRAME + * avctx->ticks_per_frame +#endif + ; +FF_ENABLE_DEPRECATION_WARNINGS } x4->params.analyse.b_psnr = avctx->flags & AV_CODEC_FLAG_PSNR; @@ -1351,12 +1375,14 @@ FFCodec ff_libx264_encoder = { .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY | AV_CODEC_CAP_OTHER_THREADS | AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE | + AV_CODEC_CAP_ENCODER_FLUSH | AV_CODEC_CAP_ENCODER_RECON_FRAME, .p.priv_class = &x264_class, .p.wrapper_name = "libx264", .priv_data_size = sizeof(X264Context), .init = X264_init, FF_CODEC_ENCODE_CB(X264_frame), + .flush = X264_flush, .close = X264_close, .defaults = x264_defaults, #if X264_BUILD < 153 diff --git a/src/third_party/ffmpeg/libavcodec/libx265.c b/src/third_party/ffmpeg/libavcodec/libx265.c index 420d0953..873b3021 100644 --- a/src/third_party/ffmpeg/libavcodec/libx265.c +++ b/src/third_party/ffmpeg/libavcodec/libx265.c @@ -220,7 +220,13 @@ static av_cold int libx265_encode_init(AVCodecContext *avctx) ctx->params->fpsDenom = avctx->framerate.den; } else { ctx->params->fpsNum = avctx->time_base.den; - ctx->params->fpsDenom = avctx->time_base.num * avctx->ticks_per_frame; +FF_DISABLE_DEPRECATION_WARNINGS + ctx->params->fpsDenom = avctx->time_base.num +#if FF_API_TICKS_PER_FRAME + * avctx->ticks_per_frame +#endif + ; +FF_ENABLE_DEPRECATION_WARNINGS } ctx->params->sourceWidth = avctx->width; ctx->params->sourceHeight = avctx->height; diff --git a/src/third_party/ffmpeg/libavcodec/loco.c b/src/third_party/ffmpeg/libavcodec/loco.c index d57a6731..3d118232 100644 --- a/src/third_party/ffmpeg/libavcodec/loco.c +++ b/src/third_party/ffmpeg/libavcodec/loco.c @@ -206,7 +206,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, if ((ret = ff_get_buffer(avctx, p, 0)) < 0) return ret; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; #define ADVANCE_BY_DECODED do { \ if (decoded < 0 || decoded >= buf_size) goto buf_too_small; \ diff --git a/src/third_party/ffmpeg/libavcodec/lscrdec.c b/src/third_party/ffmpeg/libavcodec/lscrdec.c index 76a46751..415914bf 100644 --- a/src/third_party/ffmpeg/libavcodec/lscrdec.c +++ b/src/third_party/ffmpeg/libavcodec/lscrdec.c @@ -154,10 +154,13 @@ static int decode_frame_lscr(AVCodecContext *avctx, AVFrame *rframe, size = bytestream2_get_le32(gb); - frame->key_frame = (nb_blocks == 1) && - (w == avctx->width) && - (h == avctx->height) && - (x == 0) && (y == 0); + if ((nb_blocks == 1) && + (w == avctx->width) && + (h == avctx->height) && + (x == 0) && (y == 0)) + frame->flags |= AV_FRAME_FLAG_KEY; + else + frame->flags &= ~AV_FRAME_FLAG_KEY; bytestream2_seek(gb, 2 + nb_blocks * 12 + offset, SEEK_SET); csize = bytestream2_get_be32(gb); @@ -199,7 +202,7 @@ static int decode_frame_lscr(AVCodecContext *avctx, AVFrame *rframe, } } - frame->pict_type = frame->key_frame ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; + frame->pict_type = (frame->flags & AV_FRAME_FLAG_KEY) ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; if ((ret = av_frame_ref(rframe, frame)) < 0) return ret; diff --git a/src/third_party/ffmpeg/libavcodec/m101.c b/src/third_party/ffmpeg/libavcodec/m101.c index 3def577b..43a3c7bb 100644 --- a/src/third_party/ffmpeg/libavcodec/m101.c +++ b/src/third_party/ffmpeg/libavcodec/m101.c @@ -67,15 +67,17 @@ static int m101_decode_frame(AVCodecContext *avctx, AVFrame *frame, if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) return ret; frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; - frame->interlaced_frame = ((avctx->extradata[3*4] & 3) != 3); - if (frame->interlaced_frame) - frame->top_field_first = avctx->extradata[3*4] & 1; + frame->flags |= AV_FRAME_FLAG_KEY; + if ((avctx->extradata[3*4] & 3) != 3) { + frame->flags |= AV_FRAME_FLAG_INTERLACED; + if (avctx->extradata[3*4] & 1) + frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST; + } for (y = 0; y < avctx->height; y++) { int src_y = y; - if (frame->interlaced_frame) - src_y = ((y&1)^frame->top_field_first) ? y/2 : (y/2 + avctx->height/2); + if (frame->flags & AV_FRAME_FLAG_INTERLACED) + src_y = ((y&1) ^ !!(frame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST)) ? y/2 : (y/2 + avctx->height/2); if (bits == 8) { uint8_t *line = frame->data[0] + y*frame->linesize[0]; memcpy(line, buf + src_y*stride, 2*avctx->width); diff --git a/src/third_party/ffmpeg/libavcodec/magicyuv.c b/src/third_party/ffmpeg/libavcodec/magicyuv.c index 62263409..7898cd5b 100644 --- a/src/third_party/ffmpeg/libavcodec/magicyuv.c +++ b/src/third_party/ffmpeg/libavcodec/magicyuv.c @@ -637,7 +637,7 @@ static int magy_decode_frame(AVCodecContext *avctx, AVFrame *p, return ret; p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; if ((ret = ff_thread_get_buffer(avctx, p, 0)) < 0) return ret; diff --git a/src/third_party/ffmpeg/libavcodec/mdec.c b/src/third_party/ffmpeg/libavcodec/mdec.c index 640b671a..44b12471 100644 --- a/src/third_party/ffmpeg/libavcodec/mdec.c +++ b/src/third_party/ffmpeg/libavcodec/mdec.c @@ -177,7 +177,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, if ((ret = ff_thread_get_buffer(avctx, frame, 0)) < 0) return ret; frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; av_fast_padded_malloc(&a->bitstream_buffer, &a->bitstream_buffer_size, buf_size); if (!a->bitstream_buffer) diff --git a/src/third_party/ffmpeg/libavcodec/me_cmp.c b/src/third_party/ffmpeg/libavcodec/me_cmp.c index e2f9f84b..cd05e63f 100644 --- a/src/third_party/ffmpeg/libavcodec/me_cmp.c +++ b/src/third_party/ffmpeg/libavcodec/me_cmp.c @@ -473,8 +473,9 @@ static int zero_cmp(MpegEncContext *s, const uint8_t *a, const uint8_t *b, return 0; } -void ff_set_cmp(MECmpContext *c, me_cmp_func *cmp, int type) +int ff_set_cmp(MECmpContext *c, me_cmp_func *cmp, int type) { + int ret = 0; int i; memset(cmp, 0, sizeof(void *) * 6); @@ -533,9 +534,13 @@ void ff_set_cmp(MECmpContext *c, me_cmp_func *cmp, int type) #endif default: av_log(NULL, AV_LOG_ERROR, - "internal error in cmp function selection\n"); + "invalid cmp function selection\n"); + ret = -1; + break; } } + + return ret; } #define BUTTERFLY2(o1, o2, i1, i2) \ diff --git a/src/third_party/ffmpeg/libavcodec/me_cmp.h b/src/third_party/ffmpeg/libavcodec/me_cmp.h index 90ea76c8..aefd32a7 100644 --- a/src/third_party/ffmpeg/libavcodec/me_cmp.h +++ b/src/third_party/ffmpeg/libavcodec/me_cmp.h @@ -89,7 +89,7 @@ void ff_me_cmp_init_ppc(MECmpContext *c, AVCodecContext *avctx); void ff_me_cmp_init_x86(MECmpContext *c, AVCodecContext *avctx); void ff_me_cmp_init_mips(MECmpContext *c, AVCodecContext *avctx); -void ff_set_cmp(MECmpContext *c, me_cmp_func *cmp, int type); +int ff_set_cmp(MECmpContext *c, me_cmp_func *cmp, int type); void ff_dsputil_init_dwt(MECmpContext *c); diff --git a/src/third_party/ffmpeg/libavcodec/mediacodec_wrapper.c b/src/third_party/ffmpeg/libavcodec/mediacodec_wrapper.c index d1fb640e..eb69ad7e 100644 --- a/src/third_party/ffmpeg/libavcodec/mediacodec_wrapper.c +++ b/src/third_party/ffmpeg/libavcodec/mediacodec_wrapper.c @@ -319,10 +319,49 @@ int ff_AMediaCodecProfile_getProfileFromAVCodecContext(AVCodecContext *avctx) static const int HEVCProfileMain10HDR10 = 0x1000; static const int HEVCProfileMain10HDR10Plus = 0x2000; + static const int VP9Profile0 = 0x01; + static const int VP9Profile1 = 0x02; + static const int VP9Profile2 = 0x04; + static const int VP9Profile3 = 0x08; + static const int VP9Profile2HDR = 0x1000; + static const int VP9Profile3HDR = 0x2000; + static const int VP9Profile2HDR10Plus = 0x4000; + static const int VP9Profile3HDR10Plus = 0x8000; + + static const int MPEG4ProfileSimple = 0x01; + static const int MPEG4ProfileSimpleScalable = 0x02; + static const int MPEG4ProfileCore = 0x04; + static const int MPEG4ProfileMain = 0x08; + static const int MPEG4ProfileNbit = 0x10; + static const int MPEG4ProfileScalableTexture = 0x20; + static const int MPEG4ProfileSimpleFBA = 0x80; + static const int MPEG4ProfileSimpleFace = 0x40; + static const int MPEG4ProfileBasicAnimated = 0x100; + static const int MPEG4ProfileHybrid = 0x200; + static const int MPEG4ProfileAdvancedRealTime = 0x400; + static const int MPEG4ProfileCoreScalable = 0x800; + static const int MPEG4ProfileAdvancedCoding = 0x1000; + static const int MPEG4ProfileAdvancedCore = 0x2000; + static const int MPEG4ProfileAdvancedScalable = 0x4000; + static const int MPEG4ProfileAdvancedSimple = 0x8000; + + + static const int AV1ProfileMain8 = 0x1; + static const int AV1ProfileMain10 = 0x2; + static const int AV1ProfileMain10HDR10 = 0x1000; + static const int AV1ProfileMain10HDR10Plus = 0x2000; + // Unused yet. (void)AVCProfileConstrainedHigh; (void)HEVCProfileMain10HDR10; (void)HEVCProfileMain10HDR10Plus; + (void)VP9Profile2HDR; + (void)VP9Profile3HDR; + (void)VP9Profile2HDR10Plus; + (void)VP9Profile3HDR10Plus; + (void)AV1ProfileMain10; + (void)AV1ProfileMain10HDR10; + (void)AV1ProfileMain10HDR10Plus; if (avctx->codec_id == AV_CODEC_ID_H264) { switch(avctx->profile) { @@ -357,6 +396,65 @@ int ff_AMediaCodecProfile_getProfileFromAVCodecContext(AVCodecContext *avctx) case FF_PROFILE_HEVC_MAIN_10: return HEVCProfileMain10; } + } else if (avctx->codec_id == AV_CODEC_ID_VP9) { + switch (avctx->profile) { + case FF_PROFILE_VP9_0: + return VP9Profile0; + case FF_PROFILE_VP9_1: + return VP9Profile1; + case FF_PROFILE_VP9_2: + return VP9Profile2; + case FF_PROFILE_VP9_3: + return VP9Profile3; + } + } else if(avctx->codec_id == AV_CODEC_ID_MPEG4) { + switch (avctx->profile) + { + case FF_PROFILE_MPEG4_SIMPLE: + return MPEG4ProfileSimple; + case FF_PROFILE_MPEG4_SIMPLE_SCALABLE: + return MPEG4ProfileSimpleScalable; + case FF_PROFILE_MPEG4_CORE: + return MPEG4ProfileCore; + case FF_PROFILE_MPEG4_MAIN: + return MPEG4ProfileMain; + case FF_PROFILE_MPEG4_N_BIT: + return MPEG4ProfileNbit; + case FF_PROFILE_MPEG4_SCALABLE_TEXTURE: + return MPEG4ProfileScalableTexture; + case FF_PROFILE_MPEG4_SIMPLE_FACE_ANIMATION: + return MPEG4ProfileSimpleFBA; + case FF_PROFILE_MPEG4_BASIC_ANIMATED_TEXTURE: + return MPEG4ProfileBasicAnimated; + case FF_PROFILE_MPEG4_HYBRID: + return MPEG4ProfileHybrid; + case FF_PROFILE_MPEG4_ADVANCED_REAL_TIME: + return MPEG4ProfileAdvancedRealTime; + case FF_PROFILE_MPEG4_CORE_SCALABLE: + return MPEG4ProfileCoreScalable; + case FF_PROFILE_MPEG4_ADVANCED_CODING: + return MPEG4ProfileAdvancedCoding; + case FF_PROFILE_MPEG4_ADVANCED_CORE: + return MPEG4ProfileAdvancedCore; + case FF_PROFILE_MPEG4_ADVANCED_SCALABLE_TEXTURE: + return MPEG4ProfileAdvancedScalable; + case FF_PROFILE_MPEG4_ADVANCED_SIMPLE: + return MPEG4ProfileAdvancedSimple; + case FF_PROFILE_MPEG4_SIMPLE_STUDIO: + // Studio profiles are not supported by mediacodec. + default: + break; + } + } else if(avctx->codec_id == AV_CODEC_ID_AV1) { + switch (avctx->profile) + { + case FF_PROFILE_AV1_MAIN: + return AV1ProfileMain8; + case FF_PROFILE_AV1_HIGH: + case FF_PROFILE_AV1_PROFESSIONAL: + default: + break; + } } return -1; diff --git a/src/third_party/ffmpeg/libavcodec/mediacodecenc.c b/src/third_party/ffmpeg/libavcodec/mediacodecenc.c index 2ab56597..d23745c1 100644 --- a/src/third_party/ffmpeg/libavcodec/mediacodecenc.c +++ b/src/third_party/ffmpeg/libavcodec/mediacodecenc.c @@ -164,6 +164,18 @@ static av_cold int mediacodec_init(AVCodecContext *avctx) case AV_CODEC_ID_HEVC: codec_mime = "video/hevc"; break; + case AV_CODEC_ID_VP8: + codec_mime = "video/x-vnd.on2.vp8"; + break; + case AV_CODEC_ID_VP9: + codec_mime = "video/x-vnd.on2.vp9"; + break; + case AV_CODEC_ID_MPEG4: + codec_mime = "video/mp4v-es"; + break; + case AV_CODEC_ID_AV1: + codec_mime = "video/av01"; + break; default: av_assert0(0); } @@ -317,6 +329,10 @@ static av_cold int mediacodec_init(AVCodecContext *avctx) goto bailout; mediacodec_output_format(avctx); + if (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) + av_log(avctx, AV_LOG_WARNING, + "Mediacodec encoder doesn't support AV_CODEC_FLAG_GLOBAL_HEADER. " + "Use extract_extradata bsf when necessary.\n"); s->frame = av_frame_alloc(); if (!s->frame) @@ -764,3 +780,223 @@ static const AVOption hevc_options[] = { DECLARE_MEDIACODEC_ENCODER(hevc, "H.265", AV_CODEC_ID_HEVC) #endif // CONFIG_HEVC_MEDIACODEC_ENCODER + +#if CONFIG_VP8_MEDIACODEC_ENCODER + +enum MediaCodecVP8Level { + VP8Level_Version0 = 0x01, + VP8Level_Version1 = 0x02, + VP8Level_Version2 = 0x04, + VP8Level_Version3 = 0x08, +}; + +static const AVOption vp8_options[] = { + COMMON_OPTION + { "level", "Specify tier and level", + OFFSET(level), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, VE, "level" }, + { "V0", "Level Version 0", + 0, AV_OPT_TYPE_CONST, { .i64 = VP8Level_Version0 }, 0, 0, VE, "level" }, + { "V1", "Level Version 1", + 0, AV_OPT_TYPE_CONST, { .i64 = VP8Level_Version1 }, 0, 0, VE, "level" }, + { "V2", "Level Version 2", + 0, AV_OPT_TYPE_CONST, { .i64 = VP8Level_Version2 }, 0, 0, VE, "level" }, + { "V3", "Level Version 3", + 0, AV_OPT_TYPE_CONST, { .i64 = VP8Level_Version3 }, 0, 0, VE, "level" }, + { NULL, } +}; + +DECLARE_MEDIACODEC_ENCODER(vp8, "VP8", AV_CODEC_ID_VP8) + +#endif // CONFIG_VP8_MEDIACODEC_ENCODER + +#if CONFIG_VP9_MEDIACODEC_ENCODER + +enum MediaCodecVP9Level { + VP9Level1 = 0x1, + VP9Level11 = 0x2, + VP9Level2 = 0x4, + VP9Level21 = 0x8, + VP9Level3 = 0x10, + VP9Level31 = 0x20, + VP9Level4 = 0x40, + VP9Level41 = 0x80, + VP9Level5 = 0x100, + VP9Level51 = 0x200, + VP9Level52 = 0x400, + VP9Level6 = 0x800, + VP9Level61 = 0x1000, + VP9Level62 = 0x2000, +}; + +static const AVOption vp9_options[] = { + COMMON_OPTION + { "level", "Specify tier and level", + OFFSET(level), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, VE, "level" }, + { "1", "Level 1", + 0, AV_OPT_TYPE_CONST, { .i64 = VP9Level1 }, 0, 0, VE, "level" }, + { "1.1", "Level 1.1", + 0, AV_OPT_TYPE_CONST, { .i64 = VP9Level11 }, 0, 0, VE, "level" }, + { "2", "Level 2", + 0, AV_OPT_TYPE_CONST, { .i64 = VP9Level2 }, 0, 0, VE, "level" }, + { "2.1", "Level 2.1", + 0, AV_OPT_TYPE_CONST, { .i64 = VP9Level21 }, 0, 0, VE, "level" }, + { "3", "Level 3", + 0, AV_OPT_TYPE_CONST, { .i64 = VP9Level3 }, 0, 0, VE, "level" }, + { "3.1", "Level 3.1", + 0, AV_OPT_TYPE_CONST, { .i64 = VP9Level31 }, 0, 0, VE, "level" }, + { "4", "Level 4", + 0, AV_OPT_TYPE_CONST, { .i64 = VP9Level4 }, 0, 0, VE, "level" }, + { "4.1", "Level 4.1", + 0, AV_OPT_TYPE_CONST, { .i64 = VP9Level41 }, 0, 0, VE, "level" }, + { "5", "Level 5", + 0, AV_OPT_TYPE_CONST, { .i64 = VP9Level5 }, 0, 0, VE, "level" }, + { "5.1", "Level 5.1", + 0, AV_OPT_TYPE_CONST, { .i64 = VP9Level51 }, 0, 0, VE, "level" }, + { "5.2", "Level 5.2", + 0, AV_OPT_TYPE_CONST, { .i64 = VP9Level52 }, 0, 0, VE, "level" }, + { "6", "Level 6", + 0, AV_OPT_TYPE_CONST, { .i64 = VP9Level6 }, 0, 0, VE, "level" }, + { "6.1", "Level 4.1", + 0, AV_OPT_TYPE_CONST, { .i64 = VP9Level61 }, 0, 0, VE, "level" }, + { "6.2", "Level 6.2", + 0, AV_OPT_TYPE_CONST, { .i64 = VP9Level62 }, 0, 0, VE, "level" }, + { NULL, } +}; + +DECLARE_MEDIACODEC_ENCODER(vp9, "VP9", AV_CODEC_ID_VP9) + +#endif // CONFIG_VP9_MEDIACODEC_ENCODER + +#if CONFIG_MPEG4_MEDIACODEC_ENCODER + +enum MediaCodecMpeg4Level { + MPEG4Level0 = 0x01, + MPEG4Level0b = 0x02, + MPEG4Level1 = 0x04, + MPEG4Level2 = 0x08, + MPEG4Level3 = 0x10, + MPEG4Level3b = 0x18, + MPEG4Level4 = 0x20, + MPEG4Level4a = 0x40, + MPEG4Level5 = 0x80, + MPEG4Level6 = 0x100, +}; + +static const AVOption mpeg4_options[] = { + COMMON_OPTION + { "level", "Specify tier and level", + OFFSET(level), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, VE, "level" }, + { "0", "Level 0", + 0, AV_OPT_TYPE_CONST, { .i64 = MPEG4Level0 }, 0, 0, VE, "level" }, + { "0b", "Level 0b", + 0, AV_OPT_TYPE_CONST, { .i64 = MPEG4Level0b }, 0, 0, VE, "level" }, + { "1", "Level 1", + 0, AV_OPT_TYPE_CONST, { .i64 = MPEG4Level1 }, 0, 0, VE, "level" }, + { "2", "Level 2", + 0, AV_OPT_TYPE_CONST, { .i64 = MPEG4Level2 }, 0, 0, VE, "level" }, + { "3", "Level 3", + 0, AV_OPT_TYPE_CONST, { .i64 = MPEG4Level3 }, 0, 0, VE, "level" }, + { "3b", "Level 3b", + 0, AV_OPT_TYPE_CONST, { .i64 = MPEG4Level3b }, 0, 0, VE, "level" }, + { "4", "Level 4", + 0, AV_OPT_TYPE_CONST, { .i64 = MPEG4Level4 }, 0, 0, VE, "level" }, + { "4a", "Level 4a", + 0, AV_OPT_TYPE_CONST, { .i64 = MPEG4Level4a }, 0, 0, VE, "level" }, + { "5", "Level 5", + 0, AV_OPT_TYPE_CONST, { .i64 = MPEG4Level5 }, 0, 0, VE, "level" }, + { "6", "Level 6", + 0, AV_OPT_TYPE_CONST, { .i64 = MPEG4Level6 }, 0, 0, VE, "level" }, + { NULL, } +}; + +DECLARE_MEDIACODEC_ENCODER(mpeg4, "MPEG-4", AV_CODEC_ID_MPEG4) + +#endif // CONFIG_MPEG4_MEDIACODEC_ENCODER + +#if CONFIG_AV1_MEDIACODEC_ENCODER + +enum MediaCodecAV1Level { + AV1Level2 = 0x1, + AV1Level21 = 0x2, + AV1Level22 = 0x4, + AV1Level23 = 0x8, + AV1Level3 = 0x10, + AV1Level31 = 0x20, + AV1Level32 = 0x40, + AV1Level33 = 0x80, + AV1Level4 = 0x100, + AV1Level41 = 0x200, + AV1Level42 = 0x400, + AV1Level43 = 0x800, + AV1Level5 = 0x1000, + AV1Level51 = 0x2000, + AV1Level52 = 0x4000, + AV1Level53 = 0x8000, + AV1Level6 = 0x10000, + AV1Level61 = 0x20000, + AV1Level62 = 0x40000, + AV1Level63 = 0x80000, + AV1Level7 = 0x100000, + AV1Level71 = 0x200000, + AV1Level72 = 0x400000, + AV1Level73 = 0x800000, +}; + +static const AVOption av1_options[] = { + COMMON_OPTION + { "level", "Specify tier and level", + OFFSET(level), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, VE, "level" }, + { "2", "Level 2", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level2 }, 0, 0, VE, "level" }, + { "2.1", "Level 2.1", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level21 }, 0, 0, VE, "level" }, + { "2.2", "Level 2.2", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level22 }, 0, 0, VE, "level" }, + { "2.3", "Level 2.3", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level23 }, 0, 0, VE, "level" }, + { "3", "Level 3", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level3 }, 0, 0, VE, "level" }, + { "3.1", "Level 3.1", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level31 }, 0, 0, VE, "level" }, + { "3.2", "Level 3.2", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level32 }, 0, 0, VE, "level" }, + { "3.3", "Level 3.3", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level33 }, 0, 0, VE, "level" }, + { "4", "Level 4", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level4 }, 0, 0, VE, "level" }, + { "4.1", "Level 4.1", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level41 }, 0, 0, VE, "level" }, + { "4.2", "Level 4.2", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level42 }, 0, 0, VE, "level" }, + { "4.3", "Level 4.3", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level43 }, 0, 0, VE, "level" }, + { "5", "Level 5", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level5 }, 0, 0, VE, "level" }, + { "5.1", "Level 5.1", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level51 }, 0, 0, VE, "level" }, + { "5.2", "Level 5.2", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level52 }, 0, 0, VE, "level" }, + { "5.3", "Level 5.3", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level53 }, 0, 0, VE, "level" }, + { "6", "Level 6", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level6 }, 0, 0, VE, "level" }, + { "6.1", "Level 6.1", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level61 }, 0, 0, VE, "level" }, + { "6.2", "Level 6.2", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level62 }, 0, 0, VE, "level" }, + { "6.3", "Level 6.3", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level63 }, 0, 0, VE, "level" }, + { "7", "Level 7", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level7 }, 0, 0, VE, "level" }, + { "7.1", "Level 7.1", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level71 }, 0, 0, VE, "level" }, + { "7.2", "Level 7.2", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level72 }, 0, 0, VE, "level" }, + { "7.3", "Level 7.3", + 0, AV_OPT_TYPE_CONST, { .i64 = AV1Level73 }, 0, 0, VE, "level" }, + { NULL, } +}; + +DECLARE_MEDIACODEC_ENCODER(av1, "AV1", AV_CODEC_ID_AV1) + +#endif // CONFIG_AV1_MEDIACODEC_ENCODER diff --git a/src/third_party/ffmpeg/libavcodec/mfenc.c b/src/third_party/ffmpeg/libavcodec/mfenc.c index f3415df1..8d950a31 100644 --- a/src/third_party/ffmpeg/libavcodec/mfenc.c +++ b/src/third_party/ffmpeg/libavcodec/mfenc.c @@ -659,7 +659,11 @@ static int mf_encv_output_adjust(AVCodecContext *avctx, IMFMediaType *type) framerate = avctx->framerate; } else { framerate = av_inv_q(avctx->time_base); +#if FF_API_TICKS_PER_FRAME +FF_DISABLE_DEPRECATION_WARNINGS framerate.den *= avctx->ticks_per_frame; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } ff_MFSetAttributeRatio((IMFAttributes *)type, &MF_MT_FRAME_RATE, framerate.num, framerate.den); diff --git a/src/third_party/ffmpeg/libavcodec/midivid.c b/src/third_party/ffmpeg/libavcodec/midivid.c index 599d5c8f..70730231 100644 --- a/src/third_party/ffmpeg/libavcodec/midivid.c +++ b/src/third_party/ffmpeg/libavcodec/midivid.c @@ -222,7 +222,10 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, return ret; frame->pict_type = key ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; - frame->key_frame = key; + if (key) + frame->flags |= AV_FRAME_FLAG_KEY; + else + frame->flags &= ~AV_FRAME_FLAG_KEY; *got_frame = 1; return avpkt->size; diff --git a/src/third_party/ffmpeg/libavcodec/misc4.c b/src/third_party/ffmpeg/libavcodec/misc4.c index 1bf162e1..72ac944e 100644 --- a/src/third_party/ffmpeg/libavcodec/misc4.c +++ b/src/third_party/ffmpeg/libavcodec/misc4.c @@ -179,7 +179,10 @@ const FFCodec ff_misc4_decoder = { .priv_data_size = sizeof(MISC4Context), .init = misc4_init, FF_CODEC_DECODE_CB(misc4_decode), - .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_SUBFRAMES | + .p.capabilities = AV_CODEC_CAP_DR1 | +#if FF_API_SUBFRAMES + AV_CODEC_CAP_SUBFRAMES | +#endif AV_CODEC_CAP_CHANNEL_CONF, .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE }, diff --git a/src/third_party/ffmpeg/libavcodec/mjpegdec.c b/src/third_party/ffmpeg/libavcodec/mjpegdec.c index c833d66c..ab7fa738 100644 --- a/src/third_party/ffmpeg/libavcodec/mjpegdec.c +++ b/src/third_party/ffmpeg/libavcodec/mjpegdec.c @@ -441,8 +441,8 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s) s->height < ((s->orig_height * 3) / 4)) { s->interlaced = 1; s->bottom_field = s->interlace_polarity; - s->picture_ptr->interlaced_frame = 1; - s->picture_ptr->top_field_first = !s->interlace_polarity; + s->picture_ptr->flags |= AV_FRAME_FLAG_INTERLACED; + s->picture_ptr->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST * !s->interlace_polarity; height *= 2; } @@ -545,6 +545,18 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s) } av_assert0(s->nb_components == 4); break; + case 0x11412100: + if (s->bits > 8) + goto unk_pixfmt; + if (s->component_id[0] == 'R' && s->component_id[1] == 'G' && s->component_id[2] == 'B') { + s->avctx->pix_fmt = AV_PIX_FMT_GBRP; + s->upscale_h[0] = 4; + s->upscale_h[1] = 0; + s->upscale_h[2] = 1; + } else { + goto unk_pixfmt; + } + break; case 0x22111122: case 0x22111111: if (s->adobe_transform == 0 && s->bits <= 8) { @@ -571,10 +583,15 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s) case 0x22221100: case 0x22112200: case 0x11222200: - if (s->bits <= 8) s->avctx->pix_fmt = s->cs_itu601 ? AV_PIX_FMT_YUV444P : AV_PIX_FMT_YUVJ444P; - else + if (s->bits > 8) goto unk_pixfmt; - s->avctx->color_range = s->cs_itu601 ? AVCOL_RANGE_MPEG : AVCOL_RANGE_JPEG; + if (s->adobe_transform == 0 || s->component_id[0] == 'R' && + s->component_id[1] == 'G' && s->component_id[2] == 'B') { + s->avctx->pix_fmt = AV_PIX_FMT_GBRP; + } else { + s->avctx->pix_fmt = s->cs_itu601 ? AV_PIX_FMT_YUV444P : AV_PIX_FMT_YUVJ444P; + s->avctx->color_range = s->cs_itu601 ? AVCOL_RANGE_MPEG : AVCOL_RANGE_JPEG; + } break; case 0x11000000: case 0x13000000: @@ -599,7 +616,7 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s) if (s->bits <= 8) s->avctx->pix_fmt = AV_PIX_FMT_GBRP; else goto unk_pixfmt; - s->upscale_v[0] = s->upscale_v[1] = 1; + s->upscale_v[1] = s->upscale_v[2] = 1; } else { if (pix_fmt_id == 0x14111100) s->upscale_v[1] = s->upscale_v[2] = 1; @@ -614,13 +631,22 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s) if (s->bits <= 8) s->avctx->pix_fmt = AV_PIX_FMT_GBRP; else goto unk_pixfmt; - s->upscale_h[0] = s->upscale_h[1] = 1; + s->upscale_h[1] = s->upscale_h[2] = 1; } else { if (s->bits <= 8) s->avctx->pix_fmt = s->cs_itu601 ? AV_PIX_FMT_YUV422P : AV_PIX_FMT_YUVJ422P; else s->avctx->pix_fmt = AV_PIX_FMT_YUV422P16; s->avctx->color_range = s->cs_itu601 ? AVCOL_RANGE_MPEG : AVCOL_RANGE_JPEG; } break; + case 0x11311100: + if (s->bits > 8) + goto unk_pixfmt; + if (s->component_id[0] == 'R' && s->component_id[1] == 'G' && s->component_id[2] == 'B') + s->avctx->pix_fmt = AV_PIX_FMT_GBRP; + else + goto unk_pixfmt; + s->upscale_h[0] = s->upscale_h[2] = 2; + break; case 0x31111100: if (s->bits > 8) goto unk_pixfmt; @@ -630,6 +656,7 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s) break; case 0x22121100: case 0x22111200: + case 0x41211100: if (s->bits <= 8) s->avctx->pix_fmt = s->cs_itu601 ? AV_PIX_FMT_YUV422P : AV_PIX_FMT_YUVJ422P; else goto unk_pixfmt; @@ -673,10 +700,6 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s) avpriv_report_missing_feature(s->avctx, "Lowres for weird subsampling"); return AVERROR_PATCHWELCOME; } - if ((AV_RB32(s->upscale_h) || AV_RB32(s->upscale_v)) && s->progressive && s->avctx->pix_fmt == AV_PIX_FMT_GBRP) { - avpriv_report_missing_feature(s->avctx, "progressive for weird subsampling"); - return AVERROR_PATCHWELCOME; - } if (s->ls) { memset(s->upscale_h, 0, sizeof(s->upscale_h)); memset(s->upscale_v, 0, sizeof(s->upscale_v)); @@ -722,7 +745,7 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s) if (s->avctx->skip_frame == AVDISCARD_ALL) { s->picture_ptr->pict_type = AV_PICTURE_TYPE_I; - s->picture_ptr->key_frame = 1; + s->picture_ptr->flags |= AV_FRAME_FLAG_KEY; s->got_picture = 1; return 0; } @@ -731,7 +754,7 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s) if (ff_get_buffer(s->avctx, s->picture_ptr, AV_GET_BUFFER_FLAG_REF) < 0) return -1; s->picture_ptr->pict_type = AV_PICTURE_TYPE_I; - s->picture_ptr->key_frame = 1; + s->picture_ptr->flags |= AV_FRAME_FLAG_KEY; s->got_picture = 1; // Lets clear the palette to avoid leaving uninitialized values in it @@ -1697,9 +1720,6 @@ int ff_mjpeg_decode_sos(MJpegDecodeContext *s, const uint8_t *mb_bitmask, s->h_scount[i] = s->h_count[index]; s->v_scount[i] = s->v_count[index]; - if((nb_components == 1 || nb_components == 3) && s->nb_components == 3 && s->avctx->pix_fmt == AV_PIX_FMT_GBR24P) - index = (index+2)%3; - s->comp_index[i] = index; s->dc_index[i] = get_bits(&s->gb, 4); @@ -2607,6 +2627,8 @@ the_end: avctx->pix_fmt == AV_PIX_FMT_YUVJ440P || avctx->pix_fmt == AV_PIX_FMT_YUV440P || avctx->pix_fmt == AV_PIX_FMT_YUVA444P || + avctx->pix_fmt == AV_PIX_FMT_YUVJ422P || + avctx->pix_fmt == AV_PIX_FMT_YUV422P || avctx->pix_fmt == AV_PIX_FMT_YUVJ420P || avctx->pix_fmt == AV_PIX_FMT_YUV420P || avctx->pix_fmt == AV_PIX_FMT_YUV420P16|| @@ -2656,6 +2678,24 @@ the_end: for (index = w - 3; index > 0; index--) { line[index] = (line[index / 3] + line[(index + 1) / 3] + line[(index + 2) / 3] + 1) / 3; } + } else if (s->upscale_h[p] == 4){ + if (is16bit) { + uint16_t *line16 = (uint16_t *) line; + line16[w - 1] = line16[(w - 1) >> 2]; + if (w > 1) + line16[w - 2] = (line16[(w - 1) >> 2] * 3 + line16[(w - 2) >> 2]) >> 2; + if (w > 2) + line16[w - 3] = (line16[(w - 1) >> 2] + line16[(w - 2) >> 2]) >> 1; + } else { + line[w - 1] = line[(w - 1) >> 2]; + if (w > 1) + line[w - 2] = (line[(w - 1) >> 2] * 3 + line[(w - 2) >> 2]) >> 2; + if (w > 2) + line[w - 3] = (line[(w - 1) >> 2] + line[(w - 2) >> 2]) >> 1; + } + for (index = w - 4; index > 0; index--) + line[index] = (line[(index + 3) >> 2] + line[(index + 2) >> 2] + + line[(index + 1) >> 2] + line[index >> 2]) >> 2; } line += s->linesize[p]; } @@ -2722,6 +2762,15 @@ the_end: } } } + + if (s->avctx->pix_fmt == AV_PIX_FMT_GBRP) { + av_assert0(s->nb_components == 3); + FFSWAP(uint8_t *, frame->data[0], frame->data[2]); + FFSWAP(uint8_t *, frame->data[0], frame->data[1]); + FFSWAP(int, frame->linesize[0], frame->linesize[2]); + FFSWAP(int, frame->linesize[0], frame->linesize[1]); + } + if (s->adobe_transform == 0 && s->avctx->pix_fmt == AV_PIX_FMT_GBRAP) { int w = s->picture_ptr->width; int h = s->picture_ptr->height; @@ -3003,6 +3052,8 @@ static void smv_process_frame(AVCodecContext *avctx, AVFrame *frame) frame->crop_top = FFMIN(s->smv_next_frame * avctx->height, frame->height); frame->crop_bottom = frame->height - (s->smv_next_frame + 1) * avctx->height; + if (s->smv_frame->pts != AV_NOPTS_VALUE) + s->smv_frame->pts += s->smv_frame->duration; s->smv_next_frame = (s->smv_next_frame + 1) % s->smv_frames_per_jpeg; if (s->smv_next_frame == 0) @@ -3013,26 +3064,20 @@ static int smvjpeg_receive_frame(AVCodecContext *avctx, AVFrame *frame) { MJpegDecodeContext *s = avctx->priv_data; AVPacket *const pkt = avctx->internal->in_pkt; - int64_t pkt_dts; int got_frame = 0; int ret; - if (s->smv_next_frame > 0) { - av_assert0(s->smv_frame->buf[0]); - ret = av_frame_ref(frame, s->smv_frame); - if (ret < 0) - return ret; - - smv_process_frame(avctx, frame); - return 0; - } + if (s->smv_next_frame > 0) + goto return_frame; ret = ff_decode_get_packet(avctx, pkt); if (ret < 0) return ret; - ret = ff_mjpeg_decode_frame(avctx, frame, &got_frame, pkt); - pkt_dts = pkt->dts; + av_frame_unref(s->smv_frame); + + ret = ff_mjpeg_decode_frame(avctx, s->smv_frame, &got_frame, pkt); + s->smv_frame->pkt_dts = pkt->dts; av_packet_unref(pkt); if (ret < 0) return ret; @@ -3040,11 +3085,12 @@ static int smvjpeg_receive_frame(AVCodecContext *avctx, AVFrame *frame) if (!got_frame) return AVERROR(EAGAIN); - frame->pkt_dts = pkt_dts; + // packet duration covers all the frames in the packet + s->smv_frame->duration /= s->smv_frames_per_jpeg; - av_assert0(frame->buf[0]); - av_frame_unref(s->smv_frame); - ret = av_frame_ref(s->smv_frame, frame); +return_frame: + av_assert0(s->smv_frame->buf[0]); + ret = av_frame_ref(frame, s->smv_frame); if (ret < 0) return ret; diff --git a/src/third_party/ffmpeg/libavcodec/mmaldec.c b/src/third_party/ffmpeg/libavcodec/mmaldec.c index 3092f585..9bfb6778 100644 --- a/src/third_party/ffmpeg/libavcodec/mmaldec.c +++ b/src/third_party/ffmpeg/libavcodec/mmaldec.c @@ -622,8 +622,10 @@ static int ffmal_copy_frame(AVCodecContext *avctx, AVFrame *frame, MMALDecodeContext *ctx = avctx->priv_data; int ret = 0; - frame->interlaced_frame = ctx->interlaced_frame; - frame->top_field_first = ctx->top_field_first; + if (ctx->interlaced_frame) + frame->flags |= AV_FRAME_FLAG_INTERLACED; + if (ctx->top_field_first) + frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST; if (avctx->pix_fmt == AV_PIX_FMT_MMAL) { if (!ctx->pool_out) diff --git a/src/third_party/ffmpeg/libavcodec/mobiclip.c b/src/third_party/ffmpeg/libavcodec/mobiclip.c index c3b2383d..381b492d 100644 --- a/src/third_party/ffmpeg/libavcodec/mobiclip.c +++ b/src/third_party/ffmpeg/libavcodec/mobiclip.c @@ -1235,7 +1235,7 @@ static int mobiclip_decode(AVCodecContext *avctx, AVFrame *rframe, if (get_bits1(gb)) { frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; s->moflex = get_bits1(gb); s->dct_tab_idx = get_bits1(gb); @@ -1256,7 +1256,7 @@ static int mobiclip_decode(AVCodecContext *avctx, AVFrame *rframe, memset(motion, 0, s->motion_size); frame->pict_type = AV_PICTURE_TYPE_P; - frame->key_frame = 0; + frame->flags &= ~AV_FRAME_FLAG_KEY; s->dct_tab_idx = 0; ret = setup_qtables(avctx, s->quantizer + (int64_t)get_se_golomb(gb)); diff --git a/src/third_party/ffmpeg/libavcodec/motion_est.c b/src/third_party/ffmpeg/libavcodec/motion_est.c index d17ffe42..df9d1bef 100644 --- a/src/third_party/ffmpeg/libavcodec/motion_est.c +++ b/src/third_party/ffmpeg/libavcodec/motion_est.c @@ -309,6 +309,7 @@ int ff_init_me(MpegEncContext *s){ MotionEstContext * const c= &s->me; int cache_size= FFMIN(ME_MAP_SIZE>>ME_MAP_SHIFT, 1<avctx->dia_size)&255, FFABS(s->avctx->pre_dia_size)&255); + int ret; if(FFMIN(s->avctx->dia_size, s->avctx->pre_dia_size) < -FFMIN(ME_MAP_SIZE, MAX_SAB_SIZE)){ av_log(s->avctx, AV_LOG_ERROR, "ME_MAP size is too small for SAB diamond\n"); @@ -324,10 +325,12 @@ int ff_init_me(MpegEncContext *s){ av_log(s->avctx, AV_LOG_INFO, "ME_MAP size may be a little small for the selected diamond size\n"); } - ff_set_cmp(&s->mecc, s->mecc.me_pre_cmp, c->avctx->me_pre_cmp); - ff_set_cmp(&s->mecc, s->mecc.me_cmp, c->avctx->me_cmp); - ff_set_cmp(&s->mecc, s->mecc.me_sub_cmp, c->avctx->me_sub_cmp); - ff_set_cmp(&s->mecc, s->mecc.mb_cmp, c->avctx->mb_cmp); + ret = ff_set_cmp(&s->mecc, s->mecc.me_pre_cmp, c->avctx->me_pre_cmp); + ret |= ff_set_cmp(&s->mecc, s->mecc.me_cmp, c->avctx->me_cmp); + ret |= ff_set_cmp(&s->mecc, s->mecc.me_sub_cmp, c->avctx->me_sub_cmp); + ret |= ff_set_cmp(&s->mecc, s->mecc.mb_cmp, c->avctx->mb_cmp); + if (ret < 0) + return ret; c->flags = get_flags(c, 0, c->avctx->me_cmp &FF_CMP_CHROMA); c->sub_flags= get_flags(c, 0, c->avctx->me_sub_cmp&FF_CMP_CHROMA); diff --git a/src/third_party/ffmpeg/libavcodec/mpeg12dec.c b/src/third_party/ffmpeg/libavcodec/mpeg12dec.c index 2b9fb8cb..52fc78a8 100644 --- a/src/third_party/ffmpeg/libavcodec/mpeg12dec.c +++ b/src/third_party/ffmpeg/libavcodec/mpeg12dec.c @@ -1265,7 +1265,11 @@ static int mpeg_decode_postinit(AVCodecContext *avctx) if (avctx->codec_id == AV_CODEC_ID_MPEG1VIDEO) { // MPEG-1 fps avctx->framerate = ff_mpeg12_frame_rate_tab[s1->frame_rate_index]; +#if FF_API_TICKS_PER_FRAME +FF_DISABLE_DEPRECATION_WARNINGS avctx->ticks_per_frame = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif avctx->chroma_sample_location = AVCHROMA_LOC_CENTER; } else { // MPEG-2 @@ -1275,7 +1279,11 @@ static int mpeg_decode_postinit(AVCodecContext *avctx) ff_mpeg12_frame_rate_tab[s1->frame_rate_index].num * s1->frame_rate_ext.num, ff_mpeg12_frame_rate_tab[s1->frame_rate_index].den * s1->frame_rate_ext.den, 1 << 30); +#if FF_API_TICKS_PER_FRAME +FF_DISABLE_DEPRECATION_WARNINGS avctx->ticks_per_frame = 2; +FF_ENABLE_DEPRECATION_WARNINGS +#endif switch (s->chroma_format) { case 1: avctx->chroma_sample_location = AVCHROMA_LOC_LEFT; break; @@ -1343,7 +1351,10 @@ static int mpeg1_decode_picture(AVCodecContext *avctx, const uint8_t *buf, s->mpeg_f_code[1][1] = f_code; } s->current_picture.f->pict_type = s->pict_type; - s->current_picture.f->key_frame = s->pict_type == AV_PICTURE_TYPE_I; + if (s->pict_type == AV_PICTURE_TYPE_I) + s->current_picture.f->flags |= AV_FRAME_FLAG_KEY; + else + s->current_picture.f->flags &= ~AV_FRAME_FLAG_KEY; if (avctx->debug & FF_DEBUG_PICT_INFO) av_log(avctx, AV_LOG_DEBUG, @@ -1525,7 +1536,10 @@ static int mpeg_decode_picture_coding_extension(Mpeg1Context *s1) } else s->pict_type = AV_PICTURE_TYPE_B; s->current_picture.f->pict_type = s->pict_type; - s->current_picture.f->key_frame = s->pict_type == AV_PICTURE_TYPE_I; + if (s->pict_type == AV_PICTURE_TYPE_I) + s->current_picture.f->flags |= AV_FRAME_FLAG_KEY; + else + s->current_picture.f->flags &= ~AV_FRAME_FLAG_KEY; } s->intra_dc_precision = get_bits(&s->gb, 2); @@ -3046,7 +3060,7 @@ static int ipu_decode_frame(AVCodecContext *avctx, AVFrame *frame, return AVERROR_INVALIDDATA; frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; *got_frame = 1; return avpkt->size; diff --git a/src/third_party/ffmpeg/libavcodec/mpeg12enc.c b/src/third_party/ffmpeg/libavcodec/mpeg12enc.c index a932b596..4aa45e9e 100644 --- a/src/third_party/ffmpeg/libavcodec/mpeg12enc.c +++ b/src/third_party/ffmpeg/libavcodec/mpeg12enc.c @@ -290,7 +290,7 @@ static void mpeg1_encode_sequence_header(MpegEncContext *s) AVRational aspect_ratio = s->avctx->sample_aspect_ratio; int aspect_ratio_info; - if (!s->current_picture.f->key_frame) + if (!(s->current_picture.f->flags & AV_FRAME_FLAG_KEY)) return; if (aspect_ratio.num == 0 || aspect_ratio.den == 0) @@ -530,7 +530,7 @@ void ff_mpeg1_encode_picture_header(MpegEncContext *s) if (s->progressive_sequence) put_bits(&s->pb, 1, 0); /* no repeat */ else - put_bits(&s->pb, 1, s->current_picture_ptr->f->top_field_first); + put_bits(&s->pb, 1, !!(s->current_picture_ptr->f->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST)); /* XXX: optimize the generation of this flag with entropy measures */ s->frame_pred_frame_dct = s->progressive_sequence; diff --git a/src/third_party/ffmpeg/libavcodec/mpeg4videoenc.c b/src/third_party/ffmpeg/libavcodec/mpeg4videoenc.c index c3e9ebea..777635c4 100644 --- a/src/third_party/ffmpeg/libavcodec/mpeg4videoenc.c +++ b/src/third_party/ffmpeg/libavcodec/mpeg4videoenc.c @@ -1101,7 +1101,7 @@ int ff_mpeg4_encode_picture_header(MpegEncContext *s) } put_bits(&s->pb, 3, 0); /* intra dc VLC threshold */ if (!s->progressive_sequence) { - put_bits(&s->pb, 1, s->current_picture_ptr->f->top_field_first); + put_bits(&s->pb, 1, !!(s->current_picture_ptr->f->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST)); put_bits(&s->pb, 1, s->alternate_scan); } // FIXME sprite stuff diff --git a/src/third_party/ffmpeg/libavcodec/mpegvideo_dec.c b/src/third_party/ffmpeg/libavcodec/mpegvideo_dec.c index 522a0aad..765ccd0b 100644 --- a/src/third_party/ffmpeg/libavcodec/mpegvideo_dec.c +++ b/src/third_party/ffmpeg/libavcodec/mpegvideo_dec.c @@ -331,19 +331,22 @@ FF_ENABLE_DEPRECATION_WARNINGS s->current_picture_ptr = pic; // FIXME use only the vars from current_pic - s->current_picture_ptr->f->top_field_first = s->top_field_first; + s->current_picture_ptr->f->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST * !!s->top_field_first; if (s->codec_id == AV_CODEC_ID_MPEG1VIDEO || s->codec_id == AV_CODEC_ID_MPEG2VIDEO) { if (s->picture_structure != PICT_FRAME) - s->current_picture_ptr->f->top_field_first = - (s->picture_structure == PICT_TOP_FIELD) == s->first_field; + s->current_picture_ptr->f->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST * + ((s->picture_structure == PICT_TOP_FIELD) == s->first_field); } - s->current_picture_ptr->f->interlaced_frame = !s->progressive_frame && - !s->progressive_sequence; + s->current_picture_ptr->f->flags |= AV_FRAME_FLAG_INTERLACED * (!s->progressive_frame && + !s->progressive_sequence); s->current_picture_ptr->field_picture = s->picture_structure != PICT_FRAME; s->current_picture_ptr->f->pict_type = s->pict_type; - s->current_picture_ptr->f->key_frame = s->pict_type == AV_PICTURE_TYPE_I; + if (s->pict_type == AV_PICTURE_TYPE_I) + s->current_picture.f->flags |= AV_FRAME_FLAG_KEY; + else + s->current_picture.f->flags &= ~AV_FRAME_FLAG_KEY; if ((ret = ff_mpeg_ref_picture(s->avctx, &s->current_picture, s->current_picture_ptr)) < 0) @@ -382,7 +385,7 @@ FF_ENABLE_DEPRECATION_WARNINGS s->last_picture_ptr = &s->picture[idx]; s->last_picture_ptr->reference = 3; - s->last_picture_ptr->f->key_frame = 0; + s->last_picture_ptr->f->flags &= ~AV_FRAME_FLAG_KEY; s->last_picture_ptr->f->pict_type = AV_PICTURE_TYPE_P; if (alloc_picture(s, s->last_picture_ptr) < 0) { @@ -424,7 +427,7 @@ FF_ENABLE_DEPRECATION_WARNINGS s->next_picture_ptr = &s->picture[idx]; s->next_picture_ptr->reference = 3; - s->next_picture_ptr->f->key_frame = 0; + s->next_picture_ptr->f->flags &= ~AV_FRAME_FLAG_KEY; s->next_picture_ptr->f->pict_type = AV_PICTURE_TYPE_P; if (alloc_picture(s, s->next_picture_ptr) < 0) { diff --git a/src/third_party/ffmpeg/libavcodec/mpegvideo_enc.c b/src/third_party/ffmpeg/libavcodec/mpegvideo_enc.c index 7d3c8875..9bdf5dbe 100644 --- a/src/third_party/ffmpeg/libavcodec/mpegvideo_enc.c +++ b/src/third_party/ffmpeg/libavcodec/mpegvideo_enc.c @@ -798,6 +798,11 @@ av_cold int ff_mpv_encode_init(AVCodecContext *avctx) AV_CODEC_FLAG_INTERLACED_ME) || s->alternate_scan); + if (s->lmin > s->lmax) { + av_log(avctx, AV_LOG_WARNING, "Clipping lmin value to %d\n", s->lmax); + s->lmin = s->lmax; + } + /* init */ ff_mpv_idct_init(s); if ((ret = ff_mpv_common_init(s)) < 0) @@ -902,8 +907,10 @@ av_cold int ff_mpv_encode_init(AVCodecContext *avctx) s->quant_precision = 5; - ff_set_cmp(&s->mecc, s->mecc.ildct_cmp, avctx->ildct_cmp); - ff_set_cmp(&s->mecc, s->mecc.frame_skip_cmp, s->frame_skip_cmp); + ret = ff_set_cmp(&s->mecc, s->mecc.ildct_cmp, avctx->ildct_cmp); + ret |= ff_set_cmp(&s->mecc, s->mecc.frame_skip_cmp, s->frame_skip_cmp); + if (ret < 0) + return AVERROR(EINVAL); if (CONFIG_H263_ENCODER && s->out_format == FMT_H263) { ff_h263_encode_init(s); @@ -1696,7 +1703,10 @@ static int frame_start(MpegEncContext *s) } s->current_picture_ptr->f->pict_type = s->pict_type; - s->current_picture_ptr->f->key_frame = s->pict_type == AV_PICTURE_TYPE_I; + if (s->pict_type == AV_PICTURE_TYPE_I) + s->current_picture.f->flags |= AV_FRAME_FLAG_KEY; + else + s->current_picture.f->flags &= ~AV_FRAME_FLAG_KEY; ff_mpeg_unref_picture(s->avctx, &s->current_picture); if ((ret = ff_mpeg_ref_picture(s->avctx, &s->current_picture, @@ -1972,7 +1982,7 @@ vbv_retry: return ret; } - if (s->current_picture.f->key_frame) + if (s->current_picture.f->flags & AV_FRAME_FLAG_KEY) pkt->flags |= AV_PKT_FLAG_KEY; if (s->mb_info) av_packet_shrink_side_data(pkt, AV_PKT_DATA_H263_MB_INFO, s->mb_info_size); @@ -3776,12 +3786,17 @@ static int encode_picture(MpegEncContext *s) } //FIXME var duplication - s->current_picture_ptr->f->key_frame = - s->current_picture.f->key_frame = s->pict_type == AV_PICTURE_TYPE_I; //FIXME pic_ptr + if (s->pict_type == AV_PICTURE_TYPE_I) { + s->current_picture_ptr->f->flags |= AV_FRAME_FLAG_KEY; //FIXME pic_ptr + s->current_picture.f->flags |= AV_FRAME_FLAG_KEY; + } else { + s->current_picture_ptr->f->flags &= ~AV_FRAME_FLAG_KEY; //FIXME pic_ptr + s->current_picture.f->flags &= ~AV_FRAME_FLAG_KEY; + } s->current_picture_ptr->f->pict_type = s->current_picture.f->pict_type = s->pict_type; - if (s->current_picture.f->key_frame) + if (s->current_picture.f->flags & AV_FRAME_FLAG_KEY) s->picture_in_gop_number=0; s->mb_x = s->mb_y = 0; diff --git a/src/third_party/ffmpeg/libavcodec/mpegvideo_parser.c b/src/third_party/ffmpeg/libavcodec/mpegvideo_parser.c index 8e7e88ff..1204789c 100644 --- a/src/third_party/ffmpeg/libavcodec/mpegvideo_parser.c +++ b/src/third_party/ffmpeg/libavcodec/mpegvideo_parser.c @@ -129,6 +129,7 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s, s->pict_type = (buf[1] >> 3) & 7; if (bytes_left >= 4) vbv_delay = ((buf[1] & 0x07) << 13) | (buf[2] << 5) | (buf[3] >> 3); + s->repeat_pict = 1; } break; case SEQ_START_CODE: @@ -144,7 +145,11 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s, pc->frame_rate = avctx->framerate = ff_mpeg12_frame_rate_tab[frame_rate_index]; bit_rate = (buf[4]<<10) | (buf[5]<<2) | (buf[6]>>6); avctx->codec_id = AV_CODEC_ID_MPEG1VIDEO; +#if FF_API_TICKS_PER_FRAME +FF_DISABLE_DEPRECATION_WARNINGS avctx->ticks_per_frame = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } break; case EXT_START_CODE: @@ -176,7 +181,11 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s, avctx->framerate.num = pc->frame_rate.num * (frame_rate_ext_n + 1); avctx->framerate.den = pc->frame_rate.den * (frame_rate_ext_d + 1); avctx->codec_id = AV_CODEC_ID_MPEG2VIDEO; +#if FF_API_TICKS_PER_FRAME +FF_DISABLE_DEPRECATION_WARNINGS avctx->ticks_per_frame = 2; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } break; case 0x8: /* picture coding extension */ @@ -186,7 +195,6 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s, progressive_frame = buf[4] & (1 << 7); /* check if we must repeat the frame */ - s->repeat_pict = 1; if (repeat_first_field) { if (pc->progressive_sequence) { if (top_field_first) diff --git a/src/third_party/ffmpeg/libavcodec/mscc.c b/src/third_party/ffmpeg/libavcodec/mscc.c index e8406aa2..d1d23e67 100644 --- a/src/third_party/ffmpeg/libavcodec/mscc.c +++ b/src/third_party/ffmpeg/libavcodec/mscc.c @@ -150,7 +150,11 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, const uint8_t *pal = av_packet_get_side_data(avpkt, AV_PKT_DATA_PALETTE, &size); if (pal && size == AVPALETTE_SIZE) { +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif for (j = 0; j < 256; j++) s->pal[j] = 0xFF000000 | AV_RL32(pal + j * 4); } else if (pal) { @@ -200,7 +204,7 @@ inflate_error: s->uncomp_buf + s->bpp * j * avctx->width, s->bpp * avctx->width); } - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_I; *got_frame = 1; diff --git a/src/third_party/ffmpeg/libavcodec/msmpeg4enc.c b/src/third_party/ffmpeg/libavcodec/msmpeg4enc.c index 54121438..9828901b 100644 --- a/src/third_party/ffmpeg/libavcodec/msmpeg4enc.c +++ b/src/third_party/ffmpeg/libavcodec/msmpeg4enc.c @@ -280,7 +280,19 @@ void ff_msmpeg4_encode_picture_header(MpegEncContext * s) void ff_msmpeg4_encode_ext_header(MpegEncContext * s) { - unsigned fps = s->avctx->time_base.den / s->avctx->time_base.num / FFMAX(s->avctx->ticks_per_frame, 1); + unsigned fps; + + if (s->avctx->framerate.num > 0 && s->avctx->framerate.den > 0) + fps = s->avctx->framerate.num / s->avctx->framerate.den; + else +FF_DISABLE_DEPRECATION_WARNINGS + fps = s->avctx->time_base.den / s->avctx->time_base.num +#if FF_API_TICKS_PER_FRAME + / FFMAX(s->avctx->ticks_per_frame, 1) +#endif + ; +FF_ENABLE_DEPRECATION_WARNINGS + put_bits(&s->pb, 5, FFMIN(fps, 31)); //yes 29.97 -> 29 put_bits(&s->pb, 11, FFMIN(s->bit_rate / 1024, 2047)); diff --git a/src/third_party/ffmpeg/libavcodec/msp2dec.c b/src/third_party/ffmpeg/libavcodec/msp2dec.c index 9c51c35c..30a2825e 100644 --- a/src/third_party/ffmpeg/libavcodec/msp2dec.c +++ b/src/third_party/ffmpeg/libavcodec/msp2dec.c @@ -47,7 +47,7 @@ static int msp2_decode_frame(AVCodecContext *avctx, AVFrame *p, return ret; p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; bytestream2_init(&idx, buf, 2 * avctx->height); buf += 2 * avctx->height; diff --git a/src/third_party/ffmpeg/libavcodec/msrle.c b/src/third_party/ffmpeg/libavcodec/msrle.c index b6fa7f7a..51e843e4 100644 --- a/src/third_party/ffmpeg/libavcodec/msrle.c +++ b/src/third_party/ffmpeg/libavcodec/msrle.c @@ -95,7 +95,14 @@ static int msrle_decode_frame(AVCodecContext *avctx, AVFrame *rframe, return ret; if (avctx->bits_per_coded_sample > 1 && avctx->bits_per_coded_sample <= 8) { - s->frame->palette_has_changed = ff_copy_palette(s->pal, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS + s->frame->palette_has_changed = +#endif + ff_copy_palette(s->pal, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_ENABLE_DEPRECATION_WARNINGS +#endif /* make the palette available */ memcpy(s->frame->data[1], s->pal, AVPALETTE_SIZE); diff --git a/src/third_party/ffmpeg/libavcodec/mss1.c b/src/third_party/ffmpeg/libavcodec/mss1.c index 77585210..fb5fc34e 100644 --- a/src/third_party/ffmpeg/libavcodec/mss1.c +++ b/src/third_party/ffmpeg/libavcodec/mss1.c @@ -165,12 +165,12 @@ static int mss1_decode_frame(AVCodecContext *avctx, AVFrame *rframe, c->corrupted = 0; ff_mss12_slicecontext_reset(&ctx->sc); pal_changed = decode_pal(c, &acoder); - ctx->pic->key_frame = 1; + ctx->pic->flags |= AV_FRAME_FLAG_KEY; ctx->pic->pict_type = AV_PICTURE_TYPE_I; } else { if (c->corrupted) return AVERROR_INVALIDDATA; - ctx->pic->key_frame = 0; + ctx->pic->flags &= ~AV_FRAME_FLAG_KEY; ctx->pic->pict_type = AV_PICTURE_TYPE_P; } c->corrupted = ff_mss12_decode_rect(&ctx->sc, &acoder, 0, 0, @@ -178,7 +178,11 @@ static int mss1_decode_frame(AVCodecContext *avctx, AVFrame *rframe, if (c->corrupted) return AVERROR_INVALIDDATA; memcpy(ctx->pic->data[1], c->pal, AVPALETTE_SIZE); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS ctx->pic->palette_has_changed = pal_changed; +FF_ENABLE_DEPRECATION_WARNINGS +#endif if ((ret = av_frame_ref(rframe, ctx->pic)) < 0) return ret; diff --git a/src/third_party/ffmpeg/libavcodec/mss2.c b/src/third_party/ffmpeg/libavcodec/mss2.c index 1d1ed11f..98103f7f 100644 --- a/src/third_party/ffmpeg/libavcodec/mss2.c +++ b/src/third_party/ffmpeg/libavcodec/mss2.c @@ -660,7 +660,10 @@ static int mss2_decode_frame(AVCodecContext *avctx, AVFrame *frame, frame->linesize[0] * (avctx->height - 1); c->rgb_stride = -frame->linesize[0]; - frame->key_frame = keyframe; + if (keyframe) + frame->flags |= AV_FRAME_FLAG_KEY; + else + frame->flags &= ~AV_FRAME_FLAG_KEY; frame->pict_type = keyframe ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; if (is_555) { diff --git a/src/third_party/ffmpeg/libavcodec/mss3.c b/src/third_party/ffmpeg/libavcodec/mss3.c index 023f110e..2701e9b9 100644 --- a/src/third_party/ffmpeg/libavcodec/mss3.c +++ b/src/third_party/ffmpeg/libavcodec/mss3.c @@ -740,7 +740,10 @@ static int mss3_decode_frame(AVCodecContext *avctx, AVFrame *rframe, if ((ret = ff_reget_buffer(avctx, c->pic, 0)) < 0) return ret; - c->pic->key_frame = keyframe; + if (keyframe) + c->pic->flags |= AV_FRAME_FLAG_KEY; + else + c->pic->flags &= ~AV_FRAME_FLAG_KEY; c->pic->pict_type = keyframe ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; if (!bytestream2_get_bytes_left(&gb)) { if ((ret = av_frame_ref(rframe, c->pic)) < 0) diff --git a/src/third_party/ffmpeg/libavcodec/mss4.c b/src/third_party/ffmpeg/libavcodec/mss4.c index dceb42da..75f31bed 100644 --- a/src/third_party/ffmpeg/libavcodec/mss4.c +++ b/src/third_party/ffmpeg/libavcodec/mss4.c @@ -503,7 +503,10 @@ static int mss4_decode_frame(AVCodecContext *avctx, AVFrame *rframe, if ((ret = ff_reget_buffer(avctx, c->pic, 0)) < 0) return ret; - c->pic->key_frame = (frame_type == INTRA_FRAME); + if (frame_type == INTRA_FRAME) + c->pic->flags |= AV_FRAME_FLAG_KEY; + else + c->pic->flags &= ~AV_FRAME_FLAG_KEY; c->pic->pict_type = (frame_type == INTRA_FRAME) ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; if (frame_type == SKIP_FRAME) { diff --git a/src/third_party/ffmpeg/libavcodec/msvideo1.c b/src/third_party/ffmpeg/libavcodec/msvideo1.c index 9903ff36..ca4583d8 100644 --- a/src/third_party/ffmpeg/libavcodec/msvideo1.c +++ b/src/third_party/ffmpeg/libavcodec/msvideo1.c @@ -312,7 +312,14 @@ static int msvideo1_decode_frame(AVCodecContext *avctx, AVFrame *rframe, return ret; if (s->mode_8bit) { - s->frame->palette_has_changed = ff_copy_palette(s->pal, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS + s->frame->palette_has_changed = +#endif + ff_copy_palette(s->pal, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_ENABLE_DEPRECATION_WARNINGS +#endif } if (s->mode_8bit) diff --git a/src/third_party/ffmpeg/libavcodec/msvideo1enc.c b/src/third_party/ffmpeg/libavcodec/msvideo1enc.c index 36cfd39a..1fb8be88 100644 --- a/src/third_party/ffmpeg/libavcodec/msvideo1enc.c +++ b/src/third_party/ffmpeg/libavcodec/msvideo1enc.c @@ -84,6 +84,8 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, if(!c->prev) c->prev = av_malloc(avctx->width * 3 * (avctx->height + 3)); + if (!c->prev) + return AVERROR(ENOMEM); prevptr = c->prev + avctx->width * 3 * (FFALIGN(avctx->height, 4) - 1); src = (const uint16_t*)(p->data[0] + p->linesize[0]*(FFALIGN(avctx->height, 4) - 1)); if(c->keyint >= avctx->keyint_min) diff --git a/src/third_party/ffmpeg/libavcodec/mv30.c b/src/third_party/ffmpeg/libavcodec/mv30.c index 24b04400..c2d05470 100644 --- a/src/third_party/ffmpeg/libavcodec/mv30.c +++ b/src/third_party/ffmpeg/libavcodec/mv30.c @@ -623,9 +623,8 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, get_qtable(s->intraq_tab[0], s->intra_quant, luma_tab); get_qtable(s->intraq_tab[1], s->intra_quant, chroma_tab); - frame->key_frame = s->is_inter == 0; - - if (frame->key_frame) { + if (s->is_inter == 0) { + frame->flags |= AV_FRAME_FLAG_KEY; ret = decode_intra(avctx, gb, frame); if (ret < 0) return ret; @@ -638,6 +637,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, return AVERROR_INVALIDDATA; } + frame->flags &= ~AV_FRAME_FLAG_KEY; ret = decode_inter(avctx, gb, frame, s->prev_frame); if (ret < 0) return ret; diff --git a/src/third_party/ffmpeg/libavcodec/mvcdec.c b/src/third_party/ffmpeg/libavcodec/mvcdec.c index 1e99f44a..6c971f70 100644 --- a/src/third_party/ffmpeg/libavcodec/mvcdec.c +++ b/src/third_party/ffmpeg/libavcodec/mvcdec.c @@ -247,7 +247,7 @@ static int mvc_decode_frame(AVCodecContext *avctx, AVFrame *frame, return ret; frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; *got_frame = 1; diff --git a/src/third_party/ffmpeg/libavcodec/mvha.c b/src/third_party/ffmpeg/libavcodec/mvha.c index 55056c91..8fb4a69e 100644 --- a/src/third_party/ffmpeg/libavcodec/mvha.c +++ b/src/third_party/ffmpeg/libavcodec/mvha.c @@ -272,7 +272,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, } frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; *got_frame = 1; return avpkt->size; diff --git a/src/third_party/ffmpeg/libavcodec/mwsc.c b/src/third_party/ffmpeg/libavcodec/mwsc.c index f57648bb..c7045ac7 100644 --- a/src/third_party/ffmpeg/libavcodec/mwsc.c +++ b/src/third_party/ffmpeg/libavcodec/mwsc.c @@ -119,10 +119,13 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, bytestream2_init(&gbp, s->prev_frame->data[0], avctx->height * s->prev_frame->linesize[0]); bytestream2_init_writer(&pb, frame->data[0], avctx->height * frame->linesize[0]); - frame->key_frame = rle_uncompress(&gb, &pb, &gbp, avctx->width, avctx->height, avctx->width * 3, - frame->linesize[0], s->prev_frame->linesize[0]); + if (rle_uncompress(&gb, &pb, &gbp, avctx->width, avctx->height, avctx->width * 3, + frame->linesize[0], s->prev_frame->linesize[0])) + frame->flags |= AV_FRAME_FLAG_KEY; + else + frame->flags &= ~AV_FRAME_FLAG_KEY; - frame->pict_type = frame->key_frame ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; + frame->pict_type = (frame->flags & AV_FRAME_FLAG_KEY) ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; av_frame_unref(s->prev_frame); if ((ret = av_frame_ref(s->prev_frame, frame)) < 0) diff --git a/src/third_party/ffmpeg/libavcodec/mxpegdec.c b/src/third_party/ffmpeg/libavcodec/mxpegdec.c index 760b12f0..73df2ff9 100644 --- a/src/third_party/ffmpeg/libavcodec/mxpegdec.c +++ b/src/third_party/ffmpeg/libavcodec/mxpegdec.c @@ -286,11 +286,11 @@ static int mxpeg_decode_frame(AVCodecContext *avctx, AVFrame *rframe, AV_GET_BUFFER_FLAG_REF)) < 0) return ret; jpg->picture_ptr->pict_type = AV_PICTURE_TYPE_P; - jpg->picture_ptr->key_frame = 0; + jpg->picture_ptr->flags &= ~AV_FRAME_FLAG_KEY; jpg->got_picture = 1; } else { jpg->picture_ptr->pict_type = AV_PICTURE_TYPE_I; - jpg->picture_ptr->key_frame = 1; + jpg->picture_ptr->flags |= AV_FRAME_FLAG_KEY; } if (s->got_mxm_bitmask) { diff --git a/src/third_party/ffmpeg/libavcodec/notchlc.c b/src/third_party/ffmpeg/libavcodec/notchlc.c index 90704e1a..d973c83a 100644 --- a/src/third_party/ffmpeg/libavcodec/notchlc.c +++ b/src/third_party/ffmpeg/libavcodec/notchlc.c @@ -514,7 +514,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, return ret; p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; *got_frame = 1; diff --git a/src/third_party/ffmpeg/libavcodec/nuv.c b/src/third_party/ffmpeg/libavcodec/nuv.c index d5391eee..82048e93 100644 --- a/src/third_party/ffmpeg/libavcodec/nuv.c +++ b/src/third_party/ffmpeg/libavcodec/nuv.c @@ -263,7 +263,10 @@ retry: } c->pic->pict_type = keyframe ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; - c->pic->key_frame = keyframe; + if (keyframe) + c->pic->flags |= AV_FRAME_FLAG_KEY; + else + c->pic->flags &= ~AV_FRAME_FLAG_KEY; // decompress/copy/whatever data switch (comptype) { case NUV_LZO: diff --git a/src/third_party/ffmpeg/libavcodec/nvdec_mpeg12.c b/src/third_party/ffmpeg/libavcodec/nvdec_mpeg12.c index e1073558..3b9ff607 100644 --- a/src/third_party/ffmpeg/libavcodec/nvdec_mpeg12.c +++ b/src/third_party/ffmpeg/libavcodec/nvdec_mpeg12.c @@ -83,8 +83,9 @@ static int nvdec_mpeg12_start_frame(AVCodecContext *avctx, const uint8_t *buffer }; for (i = 0; i < 64; ++i) { - ppc->QuantMatrixIntra[i] = s->intra_matrix[i]; - ppc->QuantMatrixInter[i] = s->inter_matrix[i]; + int n = s->idsp.idct_permutation[i]; + ppc->QuantMatrixIntra[i] = s->intra_matrix[n]; + ppc->QuantMatrixInter[i] = s->inter_matrix[n]; } return 0; diff --git a/src/third_party/ffmpeg/libavcodec/nvdec_mpeg4.c b/src/third_party/ffmpeg/libavcodec/nvdec_mpeg4.c index eac138cc..c193f6b6 100644 --- a/src/third_party/ffmpeg/libavcodec/nvdec_mpeg4.c +++ b/src/third_party/ffmpeg/libavcodec/nvdec_mpeg4.c @@ -88,8 +88,9 @@ static int nvdec_mpeg4_start_frame(AVCodecContext *avctx, const uint8_t *buffer, }; for (i = 0; i < 64; ++i) { - ppc->QuantMatrixIntra[i] = s->intra_matrix[i]; - ppc->QuantMatrixInter[i] = s->inter_matrix[i]; + int n = s->idsp.idct_permutation[i]; + ppc->QuantMatrixIntra[i] = s->intra_matrix[n]; + ppc->QuantMatrixInter[i] = s->inter_matrix[n]; } // We need to pass the full frame buffer and not just the slice diff --git a/src/third_party/ffmpeg/libavcodec/nvenc.c b/src/third_party/ffmpeg/libavcodec/nvenc.c index 9acf3e86..c1798ce5 100644 --- a/src/third_party/ffmpeg/libavcodec/nvenc.c +++ b/src/third_party/ffmpeg/libavcodec/nvenc.c @@ -1571,7 +1571,13 @@ static av_cold int nvenc_setup_encoder(AVCodecContext *avctx) ctx->init_encode_params.frameRateDen = avctx->framerate.den; } else { ctx->init_encode_params.frameRateNum = avctx->time_base.den; - ctx->init_encode_params.frameRateDen = avctx->time_base.num * avctx->ticks_per_frame; +FF_DISABLE_DEPRECATION_WARNINGS + ctx->init_encode_params.frameRateDen = avctx->time_base.num +#if FF_API_TICKS_PER_FRAME + * avctx->ticks_per_frame +#endif + ; +FF_ENABLE_DEPRECATION_WARNINGS } ctx->init_encode_params.enableEncodeAsync = 0; @@ -2266,7 +2272,14 @@ static int nvenc_set_timestamp(AVCodecContext *avctx, dts = reorder_queue_dequeue(ctx->reorder_queue, avctx, pkt); if (avctx->codec_descriptor->props & AV_CODEC_PROP_REORDER) { - pkt->dts = dts - FFMAX(ctx->encode_config.frameIntervalP - 1, 0) * FFMAX(avctx->ticks_per_frame, 1); +FF_DISABLE_DEPRECATION_WARNINGS + pkt->dts = dts - + FFMAX(ctx->encode_config.frameIntervalP - 1, 0) +#if FF_API_TICKS_PER_FRAME + * FFMAX(avctx->ticks_per_frame, 1) +#endif + * FFMAX(avctx->time_base.num, 1); +FF_ENABLE_DEPRECATION_WARNINGS } else { pkt->dts = pkt->pts; } @@ -2633,7 +2646,7 @@ static int nvenc_send_frame(AVCodecContext *avctx, const AVFrame *frame) pic_params.outputBitstream = in_surf->output_surface; if (avctx->flags & AV_CODEC_FLAG_INTERLACED_DCT) { - if (frame->top_field_first) + if (frame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST) pic_params.pictureStruct = NV_ENC_PIC_STRUCT_FIELD_TOP_BOTTOM; else pic_params.pictureStruct = NV_ENC_PIC_STRUCT_FIELD_BOTTOM_TOP; diff --git a/src/third_party/ffmpeg/libavcodec/options_table.h b/src/third_party/ffmpeg/libavcodec/options_table.h index f331ce28..03059cc3 100644 --- a/src/third_party/ffmpeg/libavcodec/options_table.h +++ b/src/third_party/ffmpeg/libavcodec/options_table.h @@ -259,8 +259,8 @@ static const AVOption avcodec_options[] = { {"default" , "discard useless frames", 0, AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_DEFAULT }, INT_MIN, INT_MAX, V|D, "avdiscard"}, {"noref" , "discard all non-reference frames", 0, AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_NONREF }, INT_MIN, INT_MAX, V|D, "avdiscard"}, {"bidir" , "discard all bidirectional frames", 0, AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_BIDIR }, INT_MIN, INT_MAX, V|D, "avdiscard"}, -{"nokey" , "discard all frames except keyframes", 0, AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_NONKEY }, INT_MIN, INT_MAX, V|D, "avdiscard"}, {"nointra" , "discard all frames except I frames", 0, AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_NONINTRA}, INT_MIN, INT_MAX, V|D, "avdiscard"}, +{"nokey" , "discard all frames except keyframes", 0, AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_NONKEY }, INT_MIN, INT_MAX, V|D, "avdiscard"}, {"all" , "discard all frames", 0, AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_ALL }, INT_MIN, INT_MAX, V|D, "avdiscard"}, {"bidir_refine", "refine the two motion vectors used in bidirectional macroblocks", OFFSET(bidir_refine), AV_OPT_TYPE_INT, {.i64 = 1 }, 0, 4, V|E}, {"keyint_min", "minimum interval between IDR-frames", OFFSET(keyint_min), AV_OPT_TYPE_INT, {.i64 = 25 }, INT_MIN, INT_MAX, V|E}, @@ -276,7 +276,9 @@ static const AVOption avcodec_options[] = { #endif {"rc_max_vbv_use", NULL, OFFSET(rc_max_available_vbv_use), AV_OPT_TYPE_FLOAT, {.dbl = 0 }, 0.0, FLT_MAX, V|E}, {"rc_min_vbv_use", NULL, OFFSET(rc_min_vbv_overflow_use), AV_OPT_TYPE_FLOAT, {.dbl = 3 }, 0.0, FLT_MAX, V|E}, +#if FF_API_TICKS_PER_FRAME {"ticks_per_frame", NULL, OFFSET(ticks_per_frame), AV_OPT_TYPE_INT, {.i64 = 1 }, 1, INT_MAX, A|V|E|D}, +#endif {"color_primaries", "color primaries", OFFSET(color_primaries), AV_OPT_TYPE_INT, {.i64 = AVCOL_PRI_UNSPECIFIED }, 1, INT_MAX, V|E|D, "color_primaries_type"}, {"bt709", "BT.709", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_PRI_BT709 }, INT_MIN, INT_MAX, V|E|D, "color_primaries_type"}, {"unknown", "Unspecified", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_PRI_UNSPECIFIED }, INT_MIN, INT_MAX, V|E|D, "color_primaries_type"}, diff --git a/src/third_party/ffmpeg/libavcodec/pafvideo.c b/src/third_party/ffmpeg/libavcodec/pafvideo.c index 458fe9ff..14eb4243 100644 --- a/src/third_party/ffmpeg/libavcodec/pafvideo.c +++ b/src/third_party/ffmpeg/libavcodec/pafvideo.c @@ -296,10 +296,10 @@ static int paf_video_decode(AVCodecContext *avctx, AVFrame *rframe, if (code & 0x20) { // frame is keyframe memset(c->pic->data[1], 0, AVPALETTE_SIZE); c->current_frame = 0; - c->pic->key_frame = 1; + c->pic->flags |= AV_FRAME_FLAG_KEY; c->pic->pict_type = AV_PICTURE_TYPE_I; } else { - c->pic->key_frame = 0; + c->pic->flags &= ~AV_FRAME_FLAG_KEY; c->pic->pict_type = AV_PICTURE_TYPE_P; } @@ -327,7 +327,11 @@ static int paf_video_decode(AVCodecContext *avctx, AVFrame *rframe, b = b << 2 | b >> 4; *out++ = (0xFFU << 24) | (r << 16) | (g << 8) | b; } +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS c->pic->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } c->dirty[c->current_frame] = 1; diff --git a/src/third_party/ffmpeg/libavcodec/parser.c b/src/third_party/ffmpeg/libavcodec/parser.c index 49de7e6a..efc28b89 100644 --- a/src/third_party/ffmpeg/libavcodec/parser.c +++ b/src/third_party/ffmpeg/libavcodec/parser.c @@ -166,6 +166,10 @@ int av_parser_parse2(AVCodecParserContext *s, AVCodecContext *avctx, #define FILL(name) if(s->name > 0 && avctx->name <= 0) avctx->name = s->name if (avctx->codec_type == AVMEDIA_TYPE_VIDEO) { FILL(field_order); + FILL(coded_width); + FILL(coded_height); + FILL(width); + FILL(height); } /* update the file pointer */ diff --git a/src/third_party/ffmpeg/libavcodec/pcm_rechunk_bsf.c b/src/third_party/ffmpeg/libavcodec/pcm_rechunk_bsf.c index 108d9e90..28b5722a 100644 --- a/src/third_party/ffmpeg/libavcodec/pcm_rechunk_bsf.c +++ b/src/third_party/ffmpeg/libavcodec/pcm_rechunk_bsf.c @@ -139,6 +139,7 @@ static int rechunk_filter(AVBSFContext *ctx, AVPacket *pkt) av_packet_move_ref(pkt, s->out_pkt); return send_packet(s, nb_samples, pkt); } + av_assert0(!s->in_pkt->size); } else if (s->in_pkt->size > data_size) { ret = av_packet_ref(pkt, s->in_pkt); if (ret < 0) @@ -151,7 +152,8 @@ static int rechunk_filter(AVBSFContext *ctx, AVPacket *pkt) av_packet_move_ref(pkt, s->in_pkt); return send_packet(s, nb_samples, pkt); } - } + } else + av_packet_unref(s->in_pkt); ret = ff_bsf_get_packet_ref(ctx, s->in_pkt); if (ret == AVERROR_EOF && s->out_pkt->size) { diff --git a/src/third_party/ffmpeg/libavcodec/pdvdec.c b/src/third_party/ffmpeg/libavcodec/pdvdec.c new file mode 100644 index 00000000..d50c4e72 --- /dev/null +++ b/src/third_party/ffmpeg/libavcodec/pdvdec.c @@ -0,0 +1,141 @@ +/* + * PDV video format + * + * Copyright (c) 2023 Paul B Mahol + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "avcodec.h" +#include "codec_internal.h" +#include "decode.h" +#include "zlib_wrapper.h" + +#include + +typedef struct PDVContext { + AVFrame *previous_frame; + FFZStream zstream; +} PDVContext; + +static av_cold int decode_init(AVCodecContext *avctx) +{ + PDVContext *s = avctx->priv_data; + + avctx->pix_fmt = AV_PIX_FMT_MONOBLACK; + + s->previous_frame = av_frame_alloc(); + if (!s->previous_frame) + return AVERROR(ENOMEM); + + return ff_inflate_init(&s->zstream, avctx); +} + +static av_cold int decode_end(AVCodecContext *avctx) +{ + PDVContext *s = avctx->priv_data; + + av_frame_free(&s->previous_frame); + ff_inflate_end(&s->zstream); + + return 0; +} + +static int decode_frame(AVCodecContext *avctx, AVFrame *frame, + int *got_frame, AVPacket *avpkt) +{ + PDVContext *s = avctx->priv_data; + AVFrame *prev_frame = s->previous_frame; + z_stream *const zstream = &s->zstream.zstream; + uint8_t *dst, *prev = prev_frame->data[0]; + int ret, zret; + + if (avctx->skip_frame >= AVDISCARD_ALL || + (avctx->skip_frame >= AVDISCARD_NONINTRA && + !(avpkt->flags & AV_PKT_FLAG_KEY))) + return avpkt->size; + + zret = inflateReset(zstream); + if (zret != Z_OK) { + av_log(avctx, AV_LOG_ERROR, "Could not reset inflate: %d.\n", zret); + return AVERROR_INVALIDDATA; + } + + if ((ret = ff_get_buffer(avctx, frame, AV_GET_BUFFER_FLAG_REF)) < 0) + return ret; + + zstream->next_in = avpkt->data; + zstream->avail_in = avpkt->size; + + dst = frame->data[0]; + for (int i = 0; i < avctx->height; i++) { + zstream->next_out = dst; + zstream->avail_out = (avctx->width + 7) >> 3; + + zret = inflate(zstream, Z_SYNC_FLUSH); + if (zret != Z_OK && zret != Z_STREAM_END) { + av_log(avctx, AV_LOG_ERROR, + "Inflate failed with return code: %d.\n", zret); + return AVERROR_INVALIDDATA; + } + + if (prev && !(avpkt->flags & AV_PKT_FLAG_KEY)) { + for (int j = 0; j < (avctx->width + 7) >> 3; j++) + dst[j] ^= prev[j]; + prev += prev_frame->linesize[0]; + } + + dst += frame->linesize[0]; + } + + av_frame_unref(s->previous_frame); + if ((ret = av_frame_ref(s->previous_frame, frame)) < 0) + return ret; + + if (avpkt->flags & AV_PKT_FLAG_KEY) { + frame->flags |= AV_FRAME_FLAG_KEY; + frame->pict_type = AV_PICTURE_TYPE_I; + } else { + frame->pict_type = AV_PICTURE_TYPE_P; + } + + *got_frame = 1; + + return avpkt->size; +} + +static void decode_flush(AVCodecContext *avctx) +{ + PDVContext *s = avctx->priv_data; + + av_frame_unref(s->previous_frame); +} + +const FFCodec ff_pdv_decoder = { + .p.name = "pdv", + CODEC_LONG_NAME("PDV (PlayDate Video)"), + .priv_data_size = sizeof(PDVContext), + .p.type = AVMEDIA_TYPE_VIDEO, + .p.id = AV_CODEC_ID_PDV, + .p.capabilities = AV_CODEC_CAP_DR1, + .caps_internal = FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM | + FF_CODEC_CAP_INIT_CLEANUP, + .init = decode_init, + .close = decode_end, + .flush = decode_flush, + FF_CODEC_DECODE_CB(decode_frame), +}; diff --git a/src/third_party/ffmpeg/libavcodec/pgxdec.c b/src/third_party/ffmpeg/libavcodec/pgxdec.c index e5d1df78..cc7cdb8c 100644 --- a/src/third_party/ffmpeg/libavcodec/pgxdec.c +++ b/src/third_party/ffmpeg/libavcodec/pgxdec.c @@ -140,7 +140,7 @@ static int pgx_decode_frame(AVCodecContext *avctx, AVFrame *p, if ((ret = ff_get_buffer(avctx, p, 0)) < 0) return ret; p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; avctx->bits_per_raw_sample = depth; if (bpp == 8) write_frame_8(p, &g, width, height, sign, depth); diff --git a/src/third_party/ffmpeg/libavcodec/photocd.c b/src/third_party/ffmpeg/libavcodec/photocd.c index 3030a80e..3a09b819 100644 --- a/src/third_party/ffmpeg/libavcodec/photocd.c +++ b/src/third_party/ffmpeg/libavcodec/photocd.c @@ -332,7 +332,7 @@ static int photocd_decode_frame(AVCodecContext *avctx, AVFrame *p, return ret; p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; bytestream2_init(gb, avpkt->data, avpkt->size); diff --git a/src/third_party/ffmpeg/libavcodec/pictordec.c b/src/third_party/ffmpeg/libavcodec/pictordec.c index aef3d3de..5aaa725b 100644 --- a/src/third_party/ffmpeg/libavcodec/pictordec.c +++ b/src/third_party/ffmpeg/libavcodec/pictordec.c @@ -191,7 +191,11 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, return ret; memset(frame->data[0], 0, s->height * frame->linesize[0]); frame->pict_type = AV_PICTURE_TYPE_I; +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif pos_after_pal = bytestream2_tell(&s->g) + esize; palette = (uint32_t*)frame->data[1]; diff --git a/src/third_party/ffmpeg/libavcodec/pixlet.c b/src/third_party/ffmpeg/libavcodec/pixlet.c index b349d397..6e925308 100644 --- a/src/third_party/ffmpeg/libavcodec/pixlet.c +++ b/src/third_party/ffmpeg/libavcodec/pixlet.c @@ -667,7 +667,7 @@ static int pixlet_decode_frame(AVCodecContext *avctx, AVFrame *p, bytestream2_skip(&ctx->gb, 8); p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; p->color_range = AVCOL_RANGE_JPEG; ret = ff_thread_get_buffer(avctx, p, 0); diff --git a/src/third_party/ffmpeg/libavcodec/pngdec.c b/src/third_party/ffmpeg/libavcodec/pngdec.c index 9403d72f..0369d1c4 100644 --- a/src/third_party/ffmpeg/libavcodec/pngdec.c +++ b/src/third_party/ffmpeg/libavcodec/pngdec.c @@ -98,6 +98,7 @@ typedef struct PNGDecContext { int bpp; int has_trns; uint8_t transparent_color_be[6]; + int significant_bits; uint32_t palette[256]; uint8_t *crow_buf; @@ -716,6 +717,14 @@ static int populate_avctx_color_fields(AVCodecContext *avctx, AVFrame *frame) avctx->colorspace = frame->colorspace = AVCOL_SPC_RGB; avctx->color_range = frame->color_range = AVCOL_RANGE_JPEG; + /* + * tRNS sets alpha depth to full, so we ignore sBIT if set. + * As a result we must wait until now to set + * avctx->bits_per_raw_sample in case tRNS appears after sBIT + */ + if (!s->has_trns && s->significant_bits > 0) + avctx->bits_per_raw_sample = s->significant_bits; + return 0; } @@ -725,6 +734,8 @@ static int decode_idat_chunk(AVCodecContext *avctx, PNGDecContext *s, int ret; size_t byte_depth = s->bit_depth > 8 ? 2 : 1; + if (!p) + return AVERROR_INVALIDDATA; if (!(s->hdr_state & PNG_IHDR)) { av_log(avctx, AV_LOG_ERROR, "IDAT without IHDR\n"); return AVERROR_INVALIDDATA; @@ -831,8 +842,8 @@ static int decode_idat_chunk(AVCodecContext *avctx, PNGDecContext *s, } p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; - p->interlaced_frame = !!s->interlace_type; + p->flags |= AV_FRAME_FLAG_KEY; + p->flags |= AV_FRAME_FLAG_INTERLACED * !!s->interlace_type; if ((ret = populate_avctx_color_fields(avctx, p)) < 0) return ret; @@ -963,7 +974,7 @@ static int decode_trns_chunk(AVCodecContext *avctx, PNGDecContext *s, return 0; } -static int decode_iccp_chunk(PNGDecContext *s, GetByteContext *gb, AVFrame *f) +static int decode_iccp_chunk(PNGDecContext *s, GetByteContext *gb) { int ret, cnt = 0; AVBPrint bp; @@ -996,6 +1007,41 @@ fail: return ret; } +static int decode_sbit_chunk(AVCodecContext *avctx, PNGDecContext *s, + GetByteContext *gb) +{ + int bits = 0; + int channels; + + if (!(s->hdr_state & PNG_IHDR)) { + av_log(avctx, AV_LOG_ERROR, "sBIT before IHDR\n"); + return AVERROR_INVALIDDATA; + } + + if (s->pic_state & PNG_IDAT) { + av_log(avctx, AV_LOG_ERROR, "sBIT after IDAT\n"); + return AVERROR_INVALIDDATA; + } + + channels = ff_png_get_nb_channels(s->color_type); + + if (bytestream2_get_bytes_left(gb) != channels) + return AVERROR_INVALIDDATA; + + for (int i = 0; i < channels; i++) { + int b = bytestream2_get_byteu(gb); + bits = FFMAX(b, bits); + } + + if (bits < 0 || bits > s->bit_depth) { + av_log(avctx, AV_LOG_ERROR, "Invalid significant bits: %d\n", bits); + return AVERROR_INVALIDDATA; + } + s->significant_bits = bits; + + return 0; +} + static void handle_small_bpp(PNGDecContext *s, AVFrame *p) { if (s->bits_per_pixel == 1 && s->color_type == PNG_COLOR_TYPE_PALETTE) { @@ -1422,7 +1468,7 @@ static int decode_frame_common(AVCodecContext *avctx, PNGDecContext *s, s->have_srgb = 1; break; case MKTAG('i', 'C', 'C', 'P'): { - if ((ret = decode_iccp_chunk(s, &gb_chunk, p)) < 0) + if ((ret = decode_iccp_chunk(s, &gb_chunk)) < 0) goto fail; break; } @@ -1440,6 +1486,10 @@ static int decode_frame_common(AVCodecContext *avctx, PNGDecContext *s, break; } + case MKTAG('s', 'B', 'I', 'T'): + if ((ret = decode_sbit_chunk(avctx, s, &gb_chunk)) < 0) + goto fail; + break; case MKTAG('g', 'A', 'M', 'A'): { AVBPrint bp; char *gamma_str; @@ -1467,6 +1517,9 @@ static int decode_frame_common(AVCodecContext *avctx, PNGDecContext *s, } exit_loop: + if (!p) + return AVERROR_INVALIDDATA; + if (avctx->codec_id == AV_CODEC_ID_PNG && avctx->skip_frame == AVDISCARD_ALL) { return 0; @@ -1679,7 +1732,7 @@ static int decode_frame_apng(AVCodecContext *avctx, AVFrame *p, if ((ret = inflateReset(&s->zstream.zstream)) != Z_OK) return AVERROR_EXTERNAL; bytestream2_init(&s->gb, avctx->extradata, avctx->extradata_size); - if ((ret = decode_frame_common(avctx, s, p, avpkt)) < 0) + if ((ret = decode_frame_common(avctx, s, NULL, avpkt)) < 0) return ret; } diff --git a/src/third_party/ffmpeg/libavcodec/pngenc.c b/src/third_party/ffmpeg/libavcodec/pngenc.c index 1489256d..21b033ea 100644 --- a/src/third_party/ffmpeg/libavcodec/pngenc.c +++ b/src/third_party/ffmpeg/libavcodec/pngenc.c @@ -442,6 +442,12 @@ static int encode_headers(AVCodecContext *avctx, const AVFrame *pict) if (png_get_gama(pict->color_trc, s->buf)) png_write_chunk(&s->bytestream, MKTAG('g', 'A', 'M', 'A'), s->buf, 4); + if (avctx->bits_per_raw_sample > 0 && avctx->bits_per_raw_sample < s->bit_depth) { + int len = ff_png_get_nb_channels(s->color_type); + memset(s->buf, avctx->bits_per_raw_sample, len); + png_write_chunk(&s->bytestream, MKTAG('s', 'B', 'I', 'T'), s->buf, len); + } + /* put the palette if needed, must be after colorspace information */ if (s->color_type == PNG_COLOR_TYPE_PALETTE) { int has_alpha, alpha, i; diff --git a/src/third_party/ffmpeg/libavcodec/pnmdec.c b/src/third_party/ffmpeg/libavcodec/pnmdec.c index 978e4c03..72bc83b2 100644 --- a/src/third_party/ffmpeg/libavcodec/pnmdec.c +++ b/src/third_party/ffmpeg/libavcodec/pnmdec.c @@ -65,7 +65,7 @@ static int pnm_decode_frame(AVCodecContext *avctx, AVFrame *p, if ((ret = ff_get_buffer(avctx, p, 0)) < 0) return ret; p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; avctx->bits_per_raw_sample = av_log2(s->maxval) + 1; switch (avctx->pix_fmt) { diff --git a/src/third_party/ffmpeg/libavcodec/proresdec2.c b/src/third_party/ffmpeg/libavcodec/proresdec2.c index c821a078..6445d948 100644 --- a/src/third_party/ffmpeg/libavcodec/proresdec2.c +++ b/src/third_party/ffmpeg/libavcodec/proresdec2.c @@ -252,8 +252,9 @@ static int decode_frame_header(ProresContext *ctx, const uint8_t *buf, ctx->scan = ctx->progressive_scan; // permuted } else { ctx->scan = ctx->interlaced_scan; // permuted - ctx->frame->interlaced_frame = 1; - ctx->frame->top_field_first = ctx->frame_type == 1; + ctx->frame->flags |= AV_FRAME_FLAG_INTERLACED; + if (ctx->frame_type == 1) + ctx->frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST; } if (ctx->alpha_info) { @@ -706,7 +707,7 @@ static int decode_slice_thread(AVCodecContext *avctx, void *arg, int jobnr, int dest_u = pic->data[1] + (slice->mb_y << 4) * chroma_stride + (slice->mb_x << mb_x_shift); dest_v = pic->data[2] + (slice->mb_y << 4) * chroma_stride + (slice->mb_x << mb_x_shift); - if (ctx->frame_type && ctx->first_field ^ ctx->frame->top_field_first) { + if (ctx->frame_type && ctx->first_field ^ !!(ctx->frame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST)) { dest_y += pic->linesize[0]; dest_u += pic->linesize[1]; dest_v += pic->linesize[2]; @@ -792,7 +793,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, ctx->frame = frame; ctx->frame->pict_type = AV_PICTURE_TYPE_I; - ctx->frame->key_frame = 1; + ctx->frame->flags |= AV_FRAME_FLAG_KEY; ctx->first_field = 1; buf += 8; diff --git a/src/third_party/ffmpeg/libavcodec/proresenc_anatoliy.c b/src/third_party/ffmpeg/libavcodec/proresenc_anatoliy.c index 09196c7a..fc48c97d 100644 --- a/src/third_party/ffmpeg/libavcodec/proresenc_anatoliy.c +++ b/src/third_party/ffmpeg/libavcodec/proresenc_anatoliy.c @@ -746,7 +746,8 @@ static int prores_encode_frame(AVCodecContext *avctx, AVPacket *pkt, if (avctx->profile >= FF_PROFILE_PRORES_4444) /* 4444 or 4444 Xq */ frame_flags |= 0x40; /* 444 chroma */ if (ctx->is_interlaced) { - if (pict->top_field_first || !pict->interlaced_frame) { /* tff frame or progressive frame interpret as tff */ + if ((pict->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST) || !(pict->flags & AV_FRAME_FLAG_INTERLACED)) { + /* tff frame or progressive frame interpret as tff */ av_log(avctx, AV_LOG_DEBUG, "use interlaced encoding, top field first\n"); frame_flags |= 0x04; /* interlaced tff */ is_top_field_first = 1; diff --git a/src/third_party/ffmpeg/libavcodec/proresenc_kostya.c b/src/third_party/ffmpeg/libavcodec/proresenc_kostya.c index 1940e037..77ab5240 100644 --- a/src/third_party/ffmpeg/libavcodec/proresenc_kostya.c +++ b/src/third_party/ffmpeg/libavcodec/proresenc_kostya.c @@ -585,7 +585,7 @@ static int encode_slice(AVCodecContext *avctx, const AVFrame *pic, if (ctx->pictures_per_frame == 1) line_add = 0; else - line_add = ctx->cur_picture_idx ^ !pic->top_field_first; + line_add = ctx->cur_picture_idx ^ !(pic->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST); if (ctx->force_quant) { qmat = ctx->quants[0]; @@ -838,7 +838,7 @@ static int find_slice_quant(AVCodecContext *avctx, if (ctx->pictures_per_frame == 1) line_add = 0; else - line_add = ctx->cur_picture_idx ^ !ctx->pic->top_field_first; + line_add = ctx->cur_picture_idx ^ !(ctx->pic->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST); mbs = x + mbs_per_slice; for (i = 0; i < ctx->num_planes; i++) { @@ -1045,7 +1045,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, frame_flags = ctx->chroma_factor << 6; if (avctx->flags & AV_CODEC_FLAG_INTERLACED_DCT) - frame_flags |= pic->top_field_first ? 0x04 : 0x08; + frame_flags |= (pic->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST) ? 0x04 : 0x08; bytestream_put_byte (&buf, frame_flags); bytestream_put_byte (&buf, 0); // reserved diff --git a/src/third_party/ffmpeg/libavcodec/prosumer.c b/src/third_party/ffmpeg/libavcodec/prosumer.c index e199d1aa..a1ed6a9e 100644 --- a/src/third_party/ffmpeg/libavcodec/prosumer.c +++ b/src/third_party/ffmpeg/libavcodec/prosumer.c @@ -195,7 +195,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, } frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; *got_frame = 1; return avpkt->size; diff --git a/src/third_party/ffmpeg/libavcodec/psd.c b/src/third_party/ffmpeg/libavcodec/psd.c index ee96bd12..d3456e6b 100644 --- a/src/third_party/ffmpeg/libavcodec/psd.c +++ b/src/third_party/ffmpeg/libavcodec/psd.c @@ -532,7 +532,11 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *picture, } if (s->color_mode == PSD_INDEXED) { +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS picture->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif memcpy(picture->data[1], s->palette, AVPALETTE_SIZE); } diff --git a/src/third_party/ffmpeg/libavcodec/pthread_frame.c b/src/third_party/ffmpeg/libavcodec/pthread_frame.c index 74864e19..773e78ae 100644 --- a/src/third_party/ffmpeg/libavcodec/pthread_frame.c +++ b/src/third_party/ffmpeg/libavcodec/pthread_frame.c @@ -286,7 +286,11 @@ static int update_context_from_thread(AVCodecContext *dst, AVCodecContext *src, dst->level = src->level; dst->bits_per_raw_sample = src->bits_per_raw_sample; +#if FF_API_TICKS_PER_FRAME +FF_DISABLE_DEPRECATION_WARNINGS dst->ticks_per_frame = src->ticks_per_frame; +FF_ENABLE_DEPRECATION_WARNINGS +#endif dst->color_primaries = src->color_primaries; dst->color_trc = src->color_trc; diff --git a/src/third_party/ffmpeg/libavcodec/qdrw.c b/src/third_party/ffmpeg/libavcodec/qdrw.c index e41451e9..21a53b8e 100644 --- a/src/third_party/ffmpeg/libavcodec/qdrw.c +++ b/src/third_party/ffmpeg/libavcodec/qdrw.c @@ -384,7 +384,11 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, ret = parse_palette(avctx, &gbc, (uint32_t *)p->data[1], colors, flags & 0x8000); if (ret < 0) return ret; +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS p->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif /* jump to image data */ bytestream2_skip(&gbc, 18); @@ -503,7 +507,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, if (*got_frame) { p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; return avpkt->size; } else { diff --git a/src/third_party/ffmpeg/libavcodec/qoidec.c b/src/third_party/ffmpeg/libavcodec/qoidec.c index 9414d2fb..37bc2084 100644 --- a/src/third_party/ffmpeg/libavcodec/qoidec.c +++ b/src/third_party/ffmpeg/libavcodec/qoidec.c @@ -106,7 +106,7 @@ static int qoi_decode_frame(AVCodecContext *avctx, AVFrame *p, memcpy(&dst[off_x * channels], px, channels); } - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; p->pict_type = AV_PICTURE_TYPE_I; *got_frame = 1; diff --git a/src/third_party/ffmpeg/libavcodec/qpeg.c b/src/third_party/ffmpeg/libavcodec/qpeg.c index 5bca338a..1f76ebc5 100644 --- a/src/third_party/ffmpeg/libavcodec/qpeg.c +++ b/src/third_party/ffmpeg/libavcodec/qpeg.c @@ -297,14 +297,24 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, } /* make the palette available on the way out */ - p->palette_has_changed = ff_copy_palette(a->pal, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS + p->palette_has_changed = +#endif + ff_copy_palette(a->pal, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_ENABLE_DEPRECATION_WARNINGS +#endif memcpy(p->data[1], a->pal, AVPALETTE_SIZE); av_frame_unref(ref); if ((ret = av_frame_ref(ref, p)) < 0) return ret; - p->key_frame = intra; + if (intra) + p->flags |= AV_FRAME_FLAG_KEY; + else + p->flags &= ~AV_FRAME_FLAG_KEY; p->pict_type = intra ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; *got_frame = 1; diff --git a/src/third_party/ffmpeg/libavcodec/qsv_internal.h b/src/third_party/ffmpeg/libavcodec/qsv_internal.h index 5119ef4d..c2d301b4 100644 --- a/src/third_party/ffmpeg/libavcodec/qsv_internal.h +++ b/src/third_party/ffmpeg/libavcodec/qsv_internal.h @@ -23,9 +23,9 @@ #include "config.h" -#if CONFIG_VAAPI +#if CONFIG_VAAPI && !defined(_WIN32) // Do not enable for libva-win32 on Windows #define AVCODEC_QSV_LINUX_SESSION_HANDLE -#endif //CONFIG_VAAPI +#endif //CONFIG_VAAPI && !defined(_WIN32) #ifdef AVCODEC_QSV_LINUX_SESSION_HANDLE #include @@ -35,7 +35,6 @@ #endif #include #include -#include #include "libavutil/hwcontext_vaapi.h" #endif diff --git a/src/third_party/ffmpeg/libavcodec/qsvdec.c b/src/third_party/ffmpeg/libavcodec/qsvdec.c index 6bc85116..da700f25 100644 --- a/src/third_party/ffmpeg/libavcodec/qsvdec.c +++ b/src/third_party/ffmpeg/libavcodec/qsvdec.c @@ -828,14 +828,18 @@ static int qsv_decode(AVCodecContext *avctx, QSVContext *q, outsurf->Info.PicStruct & MFX_PICSTRUCT_FRAME_TRIPLING ? 4 : outsurf->Info.PicStruct & MFX_PICSTRUCT_FRAME_DOUBLING ? 2 : outsurf->Info.PicStruct & MFX_PICSTRUCT_FIELD_REPEATED ? 1 : 0; - frame->top_field_first = - outsurf->Info.PicStruct & MFX_PICSTRUCT_FIELD_TFF; - frame->interlaced_frame = + frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST * + !!(outsurf->Info.PicStruct & MFX_PICSTRUCT_FIELD_TFF); + frame->flags |= AV_FRAME_FLAG_INTERLACED * !(outsurf->Info.PicStruct & MFX_PICSTRUCT_PROGRESSIVE); frame->pict_type = ff_qsv_map_pictype(aframe.frame->dec_info.FrameType); //Key frame is IDR frame is only suitable for H264. For HEVC, IRAPs are key frames. - if (avctx->codec_id == AV_CODEC_ID_H264) - frame->key_frame = !!(aframe.frame->dec_info.FrameType & MFX_FRAMETYPE_IDR); + if (avctx->codec_id == AV_CODEC_ID_H264) { + if (aframe.frame->dec_info.FrameType & MFX_FRAMETYPE_IDR) + frame->flags |= AV_FRAME_FLAG_KEY; + else + frame->flags &= ~AV_FRAME_FLAG_KEY; + } /* update the surface properties */ if (avctx->pix_fmt == AV_PIX_FMT_QSV) diff --git a/src/third_party/ffmpeg/libavcodec/qsvenc.c b/src/third_party/ffmpeg/libavcodec/qsvenc.c index c975302b..0ed1f757 100644 --- a/src/third_party/ffmpeg/libavcodec/qsvenc.c +++ b/src/third_party/ffmpeg/libavcodec/qsvenc.c @@ -1947,8 +1947,8 @@ static int submit_frame(QSVEncContext *q, const AVFrame *frame, qf->surface.Info = q->param.mfx.FrameInfo; qf->surface.Info.PicStruct = - !frame->interlaced_frame ? MFX_PICSTRUCT_PROGRESSIVE : - frame->top_field_first ? MFX_PICSTRUCT_FIELD_TFF : + !(frame->flags & AV_FRAME_FLAG_INTERLACED) ? MFX_PICSTRUCT_PROGRESSIVE : + (frame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST) ? MFX_PICSTRUCT_FIELD_TFF : MFX_PICSTRUCT_FIELD_BFF; if (frame->repeat_pict == 1) qf->surface.Info.PicStruct |= MFX_PICSTRUCT_FIELD_REPEATED; @@ -2402,7 +2402,7 @@ static int encode_frame(AVCodecContext *avctx, QSVEncContext *q, goto free; } - if (ret == MFX_WRN_INCOMPATIBLE_VIDEO_PARAM && frame && frame->interlaced_frame) + if (ret == MFX_WRN_INCOMPATIBLE_VIDEO_PARAM && frame && (frame->flags & AV_FRAME_FLAG_INTERLACED)) print_interlace_msg(avctx, q); ret = 0; diff --git a/src/third_party/ffmpeg/libavcodec/qtrle.c b/src/third_party/ffmpeg/libavcodec/qtrle.c index 5cb18c86..9b016d7e 100644 --- a/src/third_party/ffmpeg/libavcodec/qtrle.c +++ b/src/third_party/ffmpeg/libavcodec/qtrle.c @@ -537,7 +537,14 @@ static int qtrle_decode_frame(AVCodecContext *avctx, AVFrame *rframe, } if(has_palette) { - s->frame->palette_has_changed = ff_copy_palette(s->pal, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS + s->frame->palette_has_changed = +#endif + ff_copy_palette(s->pal, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_ENABLE_DEPRECATION_WARNINGS +#endif /* make the palette available on the way out */ memcpy(s->frame->data[1], s->pal, AVPALETTE_SIZE); diff --git a/src/third_party/ffmpeg/libavcodec/r210dec.c b/src/third_party/ffmpeg/libavcodec/r210dec.c index ae80f46e..fe6a0259 100644 --- a/src/third_party/ffmpeg/libavcodec/r210dec.c +++ b/src/third_party/ffmpeg/libavcodec/r210dec.c @@ -57,7 +57,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *pic, return ret; pic->pict_type = AV_PICTURE_TYPE_I; - pic->key_frame = 1; + pic->flags |= AV_FRAME_FLAG_KEY; g_line = pic->data[0]; b_line = pic->data[1]; r_line = pic->data[2]; diff --git a/src/third_party/ffmpeg/libavcodec/rasc.c b/src/third_party/ffmpeg/libavcodec/rasc.c index cfa3d6b0..4d057e80 100644 --- a/src/third_party/ffmpeg/libavcodec/rasc.c +++ b/src/third_party/ffmpeg/libavcodec/rasc.c @@ -740,7 +740,10 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, if (!s->skip_cursor) draw_cursor(avctx); - s->frame->key_frame = intra; + if (intra) + s->frame->flags |= AV_FRAME_FLAG_KEY; + else + s->frame->flags &= ~AV_FRAME_FLAG_KEY; s->frame->pict_type = intra ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; *got_frame = 1; diff --git a/src/third_party/ffmpeg/libavcodec/ratecontrol.c b/src/third_party/ffmpeg/libavcodec/ratecontrol.c index 6a40f9cb..649f570c 100644 --- a/src/third_party/ffmpeg/libavcodec/ratecontrol.c +++ b/src/third_party/ffmpeg/libavcodec/ratecontrol.c @@ -57,7 +57,16 @@ void ff_write_pass1_stats(MpegEncContext *s) static double get_fps(AVCodecContext *avctx) { - return 1.0 / av_q2d(avctx->time_base) / FFMAX(avctx->ticks_per_frame, 1); + if (avctx->framerate.num > 0 && avctx->framerate.den > 0) + return av_q2d(avctx->framerate); + +FF_DISABLE_DEPRECATION_WARNINGS + return 1.0 / av_q2d(avctx->time_base) +#if FF_API_TICKS_PER_FRAME + / FFMAX(avctx->ticks_per_frame, 1) +#endif + ; +FF_ENABLE_DEPRECATION_WARNINGS } static inline double qp2bits(RateControlEntry *rce, double qp) diff --git a/src/third_party/ffmpeg/libavcodec/rawdec.c b/src/third_party/ffmpeg/libavcodec/rawdec.c index c20c317f..8e9358f9 100644 --- a/src/third_party/ffmpeg/libavcodec/rawdec.c +++ b/src/third_party/ffmpeg/libavcodec/rawdec.c @@ -227,15 +227,16 @@ static int raw_decode(AVCodecContext *avctx, AVFrame *frame, need_copy = !avpkt->buf || context->is_1_2_4_8_bpp || context->is_yuv2 || context->is_lt_16bpp; frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; res = ff_decode_frame_props(avctx, frame); if (res < 0) return res; if (context->tff >= 0) { - frame->interlaced_frame = 1; - frame->top_field_first = context->tff; + frame->flags |= AV_FRAME_FLAG_INTERLACED; + if (context->tff == 1) + frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST; } if ((res = av_image_check_size(avctx->width, avctx->height, 0, avctx)) < 0) @@ -372,7 +373,11 @@ static int raw_decode(AVCodecContext *avctx, AVFrame *frame, } if (ff_copy_palette(context->palette->data, avpkt, avctx)) { +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } else if (context->is_nut_pal8) { int vid_size = avctx->width * avctx->height; int pal_size = avpkt->size - vid_size; @@ -380,7 +385,11 @@ static int raw_decode(AVCodecContext *avctx, AVFrame *frame, if (avpkt->size > vid_size && pal_size <= AVPALETTE_SIZE) { const uint8_t *pal = avpkt->data + vid_size; memcpy(context->palette->data, pal, pal_size); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } } } @@ -459,9 +468,9 @@ static int raw_decode(AVCodecContext *avctx, AVFrame *frame, } if (avctx->field_order > AV_FIELD_PROGRESSIVE) { /* we have interlaced material flagged in container */ - frame->interlaced_frame = 1; + frame->flags |= AV_FRAME_FLAG_INTERLACED; if (avctx->field_order == AV_FIELD_TT || avctx->field_order == AV_FIELD_TB) - frame->top_field_first = 1; + frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST; } *got_frame = 1; diff --git a/src/third_party/ffmpeg/libavcodec/rka.c b/src/third_party/ffmpeg/libavcodec/rka.c index 2212e3f9..3e86d838 100644 --- a/src/third_party/ffmpeg/libavcodec/rka.c +++ b/src/third_party/ffmpeg/libavcodec/rka.c @@ -737,7 +737,7 @@ static int decode_filter(RKAContext *s, ChContext *ctx, ACoder *ac, int off, uns } ctx->buf0[off] = ctx->buf1[off] + ctx->buf0[off + -1]; } else { - val *= 1 << ctx->cmode; + val *= 1U << ctx->cmode; sum += ctx->buf0[off + -1] + val; switch (s->bps) { case 16: sum = av_clip_int16(sum); break; diff --git a/src/third_party/ffmpeg/libavcodec/rkmppdec.c b/src/third_party/ffmpeg/libavcodec/rkmppdec.c index 8bf7c6ed..5768568b 100644 --- a/src/third_party/ffmpeg/libavcodec/rkmppdec.c +++ b/src/third_party/ffmpeg/libavcodec/rkmppdec.c @@ -404,8 +404,10 @@ static int rkmpp_retrieve_frame(AVCodecContext *avctx, AVFrame *frame) frame->colorspace = mpp_frame_get_colorspace(mppframe); mode = mpp_frame_get_mode(mppframe); - frame->interlaced_frame = ((mode & MPP_FRAME_FLAG_FIELD_ORDER_MASK) == MPP_FRAME_FLAG_DEINTERLACED); - frame->top_field_first = ((mode & MPP_FRAME_FLAG_FIELD_ORDER_MASK) == MPP_FRAME_FLAG_TOP_FIRST); + if ((mode & MPP_FRAME_FLAG_FIELD_ORDER_MASK) == MPP_FRAME_FLAG_DEINTERLACED) + frame->flags |= AV_FRAME_FLAG_INTERLACED; + if ((mode & MPP_FRAME_FLAG_FIELD_ORDER_MASK) == MPP_FRAME_FLAG_TOP_FIRST) + frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST; mppformat = mpp_frame_get_fmt(mppframe); drmformat = rkmpp_get_frameformat(mppformat); diff --git a/src/third_party/ffmpeg/libavcodec/rscc.c b/src/third_party/ffmpeg/libavcodec/rscc.c index 61a25df3..ace9aeeb 100644 --- a/src/third_party/ffmpeg/libavcodec/rscc.c +++ b/src/third_party/ffmpeg/libavcodec/rscc.c @@ -339,14 +339,21 @@ static int rscc_decode_frame(AVCodecContext *avctx, AVFrame *frame, /* Keyframe when the number of pixels updated matches the whole surface */ if (pixel_size == ctx->inflated_size) { frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; } else { frame->pict_type = AV_PICTURE_TYPE_P; } /* Palette handling */ if (avctx->pix_fmt == AV_PIX_FMT_PAL8) { - frame->palette_has_changed = ff_copy_palette(ctx->palette, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS + frame->palette_has_changed = +#endif + ff_copy_palette(ctx->palette, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_ENABLE_DEPRECATION_WARNINGS +#endif memcpy(frame->data[1], ctx->palette, AVPALETTE_SIZE); } // We only return a picture when enough of it is undamaged, this avoids copying nearly broken frames around diff --git a/src/third_party/ffmpeg/libavcodec/rv34.c b/src/third_party/ffmpeg/libavcodec/rv34.c index 45f64666..51f18147 100644 --- a/src/third_party/ffmpeg/libavcodec/rv34.c +++ b/src/third_party/ffmpeg/libavcodec/rv34.c @@ -1692,6 +1692,8 @@ int ff_rv34_decode_frame(AVCodecContext *avctx, AVFrame *pict, int i; r->tmp_b_block_base = av_malloc(s->linesize * 48); + if (!r->tmp_b_block_base) + return AVERROR(ENOMEM); for (i = 0; i < 2; i++) r->tmp_b_block_y[i] = r->tmp_b_block_base + i * 16 * s->linesize; diff --git a/src/third_party/ffmpeg/libavcodec/sanm.c b/src/third_party/ffmpeg/libavcodec/sanm.c index bec3c770..b70daab7 100644 --- a/src/third_party/ffmpeg/libavcodec/sanm.c +++ b/src/third_party/ffmpeg/libavcodec/sanm.c @@ -1484,11 +1484,13 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, return ret; ctx->rotate_code = header.rotate_code; - if ((ctx->frame->key_frame = !header.seq_num)) { + if (!header.seq_num) { + ctx->frame->flags |= AV_FRAME_FLAG_KEY; ctx->frame->pict_type = AV_PICTURE_TYPE_I; fill_frame(ctx->frm1, ctx->npixels, header.bg_color); fill_frame(ctx->frm2, ctx->npixels, header.bg_color); } else { + ctx->frame->flags &= ~AV_FRAME_FLAG_KEY; ctx->frame->pict_type = AV_PICTURE_TYPE_P; } diff --git a/src/third_party/ffmpeg/libavcodec/scpr.c b/src/third_party/ffmpeg/libavcodec/scpr.c index 7630adb3..b096965d 100644 --- a/src/third_party/ffmpeg/libavcodec/scpr.c +++ b/src/third_party/ffmpeg/libavcodec/scpr.c @@ -516,18 +516,18 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, s->version = 1; s->get_freq = get_freq0; s->decode = decode0; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; ret = decompress_i(avctx, (uint32_t *)s->current_frame->data[0], s->current_frame->linesize[0] / 4); } else if (type == 18) { s->version = 2; s->get_freq = get_freq; s->decode = decode; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; ret = decompress_i(avctx, (uint32_t *)s->current_frame->data[0], s->current_frame->linesize[0] / 4); } else if (type == 34) { - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; s->version = 3; ret = decompress_i3(avctx, (uint32_t *)s->current_frame->data[0], s->current_frame->linesize[0] / 4); @@ -538,7 +538,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, if (bytestream2_get_bytes_left(gb) < 3) return AVERROR_INVALIDDATA; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; bytestream2_skip(gb, 1); if (avctx->bits_per_coded_sample == 16) { uint16_t value = bytestream2_get_le16(gb); @@ -557,7 +557,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, dst += s->current_frame->linesize[0] / 4; } } else if (type == 0 || type == 1) { - frame->key_frame = 0; + frame->flags &= ~AV_FRAME_FLAG_KEY; if (s->version == 1 || s->version == 2) ret = decompress_p(avctx, (uint32_t *)s->current_frame->data[0], @@ -612,7 +612,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, } } - frame->pict_type = frame->key_frame ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; + frame->pict_type = (frame->flags & AV_FRAME_FLAG_KEY) ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; FFSWAP(AVFrame *, s->current_frame, s->last_frame); diff --git a/src/third_party/ffmpeg/libavcodec/screenpresso.c b/src/third_party/ffmpeg/libavcodec/screenpresso.c index 0d9e4850..b2715499 100644 --- a/src/third_party/ffmpeg/libavcodec/screenpresso.c +++ b/src/third_party/ffmpeg/libavcodec/screenpresso.c @@ -173,7 +173,7 @@ static int screenpresso_decode_frame(AVCodecContext *avctx, AVFrame *frame, /* Usual properties */ if (keyframe) { frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; } else { frame->pict_type = AV_PICTURE_TYPE_P; } diff --git a/src/third_party/ffmpeg/libavcodec/sga.c b/src/third_party/ffmpeg/libavcodec/sga.c index d3f49242..eae691ad 100644 --- a/src/third_party/ffmpeg/libavcodec/sga.c +++ b/src/third_party/ffmpeg/libavcodec/sga.c @@ -497,9 +497,13 @@ static int sga_decode_frame(AVCodecContext *avctx, AVFrame *frame, } memcpy(frame->data[1], s->pal, AVPALETTE_SIZE); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; *got_frame = 1; diff --git a/src/third_party/ffmpeg/libavcodec/sgidec.c b/src/third_party/ffmpeg/libavcodec/sgidec.c index 92083f23..04a347c5 100644 --- a/src/third_party/ffmpeg/libavcodec/sgidec.c +++ b/src/third_party/ffmpeg/libavcodec/sgidec.c @@ -249,7 +249,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, break; } p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; /* Skip header. */ bytestream2_seek(&g, SGI_HEADER_SIZE, SEEK_SET); diff --git a/src/third_party/ffmpeg/libavcodec/sgirledec.c b/src/third_party/ffmpeg/libavcodec/sgirledec.c index 9e3a220a..18bf8081 100644 --- a/src/third_party/ffmpeg/libavcodec/sgirledec.c +++ b/src/third_party/ffmpeg/libavcodec/sgirledec.c @@ -124,7 +124,7 @@ static int sgirle_decode_frame(AVCodecContext *avctx, AVFrame *frame, return ret; frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; *got_frame = 1; diff --git a/src/third_party/ffmpeg/libavcodec/sheervideo.c b/src/third_party/ffmpeg/libavcodec/sheervideo.c index eee60147..d9c94ea9 100644 --- a/src/third_party/ffmpeg/libavcodec/sheervideo.c +++ b/src/third_party/ffmpeg/libavcodec/sheervideo.c @@ -1973,7 +1973,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, } p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; if ((ret = ff_thread_get_buffer(avctx, p, 0)) < 0) return ret; diff --git a/src/third_party/ffmpeg/libavcodec/shorten.c b/src/third_party/ffmpeg/libavcodec/shorten.c index 1b2abd76..eca0c4e8 100644 --- a/src/third_party/ffmpeg/libavcodec/shorten.c +++ b/src/third_party/ffmpeg/libavcodec/shorten.c @@ -814,8 +814,10 @@ const FFCodec ff_shorten_decoder = { FF_CODEC_DECODE_CB(shorten_decode_frame), .p.capabilities = AV_CODEC_CAP_CHANNEL_CONF | AV_CODEC_CAP_DELAY | - AV_CODEC_CAP_DR1 | - AV_CODEC_CAP_SUBFRAMES , +#if FF_API_SUBFRAMES + AV_CODEC_CAP_SUBFRAMES | +#endif + AV_CODEC_CAP_DR1, .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P, AV_SAMPLE_FMT_U8P, AV_SAMPLE_FMT_NONE }, diff --git a/src/third_party/ffmpeg/libavcodec/smacker.c b/src/third_party/ffmpeg/libavcodec/smacker.c index 4b05575e..7ee9fe85 100644 --- a/src/third_party/ffmpeg/libavcodec/smacker.c +++ b/src/third_party/ffmpeg/libavcodec/smacker.c @@ -107,16 +107,16 @@ enum SmkBlockTypes { * Can read SMKTREE_DECODE_MAX_RECURSION before the first check; * does not overread gb on success. */ -static int smacker_decode_tree(GetBitContext *gb, HuffContext *hc, int length) +static int smacker_decode_tree(AVCodecContext *avctx, GetBitContext *gb, HuffContext *hc, int length) { if (length > SMKTREE_DECODE_MAX_RECURSION || length > 3 * SMKTREE_BITS) { - av_log(NULL, AV_LOG_ERROR, "Maximum tree recursion level exceeded.\n"); + av_log(avctx, AV_LOG_ERROR, "Maximum tree recursion level exceeded.\n"); return AVERROR_INVALIDDATA; } if(!get_bits1(gb)){ //Leaf if (hc->current >= 256) { - av_log(NULL, AV_LOG_ERROR, "Tree size exceeded!\n"); + av_log(avctx, AV_LOG_ERROR, "Tree size exceeded!\n"); return AVERROR_INVALIDDATA; } if (get_bits_left(gb) < 8) @@ -126,10 +126,10 @@ static int smacker_decode_tree(GetBitContext *gb, HuffContext *hc, int length) } else { //Node int r; length++; - r = smacker_decode_tree(gb, hc, length); + r = smacker_decode_tree(avctx, gb, hc, length); if(r) return r; - return smacker_decode_tree(gb, hc, length); + return smacker_decode_tree(avctx, gb, hc, length); } } @@ -138,7 +138,7 @@ static int smacker_decode_tree(GetBitContext *gb, HuffContext *hc, int length) * * Checks before the first read, can overread by 6 * SMKTREE_BITS on success. */ -static int smacker_decode_bigtree(GetBitContext *gb, DBCtx *ctx, int length) +static int smacker_decode_bigtree(AVCodecContext *avctx, GetBitContext *gb, DBCtx *ctx, int length) { // Larger length can cause segmentation faults due to too deep recursion. if (length > SMKTREE_DECODE_BIG_MAX_RECURSION) { @@ -176,12 +176,12 @@ static int smacker_decode_bigtree(GetBitContext *gb, DBCtx *ctx, int length) int r = 0, r_new, t; t = ctx->current++; - r = smacker_decode_bigtree(gb, ctx, length + 1); + r = smacker_decode_bigtree(avctx, gb, ctx, length + 1); if(r < 0) return r; ctx->values[t] = SMK_NODE | r; r++; - r_new = smacker_decode_bigtree(gb, ctx, length + 1); + r_new = smacker_decode_bigtree(avctx, gb, ctx, length + 1); if (r_new < 0) return r_new; return r + r_new; @@ -215,7 +215,7 @@ static int smacker_decode_header_tree(SmackVContext *smk, GetBitContext *gb, int i ? "high" : "low"); continue; } - err = smacker_decode_tree(gb, &h, 0); + err = smacker_decode_tree(smk->avctx, gb, &h, 0); if (err < 0) goto error; skip_bits1(gb); @@ -253,7 +253,7 @@ static int smacker_decode_header_tree(SmackVContext *smk, GetBitContext *gb, int } *recodes = ctx.values; - err = smacker_decode_bigtree(gb, &ctx, 0); + err = smacker_decode_bigtree(smk->avctx, gb, &ctx, 0); if (err < 0) goto error; skip_bits1(gb); @@ -392,12 +392,18 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, pal = (uint32_t*)smk->pic->data[1]; bytestream2_init(&gb2, avpkt->data, avpkt->size); flags = bytestream2_get_byteu(&gb2); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS smk->pic->palette_has_changed = flags & 1; - smk->pic->key_frame = !!(flags & 2); - if (smk->pic->key_frame) +FF_ENABLE_DEPRECATION_WARNINGS +#endif + if (flags & 2) { + smk->pic->flags |= AV_FRAME_FLAG_KEY; smk->pic->pict_type = AV_PICTURE_TYPE_I; - else + } else { + smk->pic->flags &= ~AV_FRAME_FLAG_KEY; smk->pic->pict_type = AV_PICTURE_TYPE_P; + } for(i = 0; i < 256; i++) *pal++ = 0xFFU << 24 | bytestream2_get_be24u(&gb2); @@ -649,7 +655,7 @@ static int smka_decode_frame(AVCodecContext *avctx, AVFrame *frame, HuffContext h; h.current = 0; skip_bits1(&gb); - if ((ret = smacker_decode_tree(&gb, &h, 0)) < 0) + if ((ret = smacker_decode_tree(avctx, &gb, &h, 0)) < 0) goto error; skip_bits1(&gb); if (h.current > 1) { diff --git a/src/third_party/ffmpeg/libavcodec/smc.c b/src/third_party/ffmpeg/libavcodec/smc.c index 2b10e743..3e8a89ce 100644 --- a/src/third_party/ffmpeg/libavcodec/smc.c +++ b/src/third_party/ffmpeg/libavcodec/smc.c @@ -437,7 +437,14 @@ static int smc_decode_frame(AVCodecContext *avctx, AVFrame *rframe, if ((ret = ff_reget_buffer(avctx, s->frame, 0)) < 0) return ret; - s->frame->palette_has_changed = ff_copy_palette(s->pal, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS + s->frame->palette_has_changed = +#endif + ff_copy_palette(s->pal, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_ENABLE_DEPRECATION_WARNINGS +#endif bytestream2_init(&gb, buf, buf_size); ret = smc_decode_stream(s, &gb); diff --git a/src/third_party/ffmpeg/libavcodec/snow.c b/src/third_party/ffmpeg/libavcodec/snow.c index b6c8d5e2..5eb3ee1e 100644 --- a/src/third_party/ffmpeg/libavcodec/snow.c +++ b/src/third_party/ffmpeg/libavcodec/snow.c @@ -606,7 +606,7 @@ int ff_snow_frame_start(SnowContext *s){ }else{ int i; for(i=0; imax_ref_frames && s->last_picture[i]->data[0]; i++) - if(i && s->last_picture[i-1]->key_frame) + if(i && (s->last_picture[i-1]->flags & AV_FRAME_FLAG_KEY)) break; s->ref_frames= i; if(s->ref_frames==0){ @@ -617,7 +617,10 @@ int ff_snow_frame_start(SnowContext *s){ if ((ret = ff_snow_get_buffer(s, s->current_picture)) < 0) return ret; - s->current_picture->key_frame= s->keyframe; + if (s->keyframe) + s->current_picture->flags |= AV_FRAME_FLAG_KEY; + else + s->current_picture->flags &= ~AV_FRAME_FLAG_KEY; return 0; } diff --git a/src/third_party/ffmpeg/libavcodec/snowenc.c b/src/third_party/ffmpeg/libavcodec/snowenc.c index 4cf7ff11..1360343a 100644 --- a/src/third_party/ffmpeg/libavcodec/snowenc.c +++ b/src/third_party/ffmpeg/libavcodec/snowenc.c @@ -130,8 +130,10 @@ static av_cold int encode_init(AVCodecContext *avctx) if (ret) return ret; - ff_set_cmp(&s->mecc, s->mecc.me_cmp, s->avctx->me_cmp); - ff_set_cmp(&s->mecc, s->mecc.me_sub_cmp, s->avctx->me_sub_cmp); + ret = ff_set_cmp(&s->mecc, s->mecc.me_cmp, s->avctx->me_cmp); + ret |= ff_set_cmp(&s->mecc, s->mecc.me_sub_cmp, s->avctx->me_sub_cmp); + if (ret < 0) + return AVERROR(EINVAL); s->input_picture = av_frame_alloc(); if (!s->input_picture) @@ -1761,7 +1763,7 @@ redo_frame: ff_build_rac_states(c, (1LL<<32)/20, 256-8); pic->pict_type= AV_PICTURE_TYPE_I; s->keyframe=1; - s->current_picture->key_frame=1; + s->current_picture->flags |= AV_FRAME_FLAG_KEY; goto redo_frame; } @@ -1889,7 +1891,7 @@ redo_frame: } pkt->size = ff_rac_terminate(c, 0); - if (s->current_picture->key_frame) + if (s->current_picture->flags & AV_FRAME_FLAG_KEY) pkt->flags |= AV_PKT_FLAG_KEY; *got_packet = 1; diff --git a/src/third_party/ffmpeg/libavcodec/sonic.c b/src/third_party/ffmpeg/libavcodec/sonic.c index 62e6193a..0544fecf 100644 --- a/src/third_party/ffmpeg/libavcodec/sonic.c +++ b/src/third_party/ffmpeg/libavcodec/sonic.c @@ -473,7 +473,7 @@ static void predictor_init_state(int *k, int *state, int order) static int predictor_calc_error(int *k, int *state, int order, int error) { - int i, x = error - shift_down(k[order-1] * (unsigned)state[order-1], LATTICE_SHIFT); + int i, x = error - (unsigned)shift_down(k[order-1] * (unsigned)state[order-1], LATTICE_SHIFT); #if 1 int *k_ptr = &(k[order-2]), @@ -1013,7 +1013,7 @@ static int sonic_decode_frame(AVCodecContext *avctx, AVFrame *frame, if (s->lossless) quant = 1; else - quant = get_symbol(&c, state, 0) * SAMPLE_FACTOR; + quant = get_symbol(&c, state, 0) * (unsigned)SAMPLE_FACTOR; // av_log(NULL, AV_LOG_INFO, "quant: %d\n", quant); diff --git a/src/third_party/ffmpeg/libavcodec/speedhqdec.c b/src/third_party/ffmpeg/libavcodec/speedhqdec.c index e1e6f9a5..ff106009 100644 --- a/src/third_party/ffmpeg/libavcodec/speedhqdec.c +++ b/src/third_party/ffmpeg/libavcodec/speedhqdec.c @@ -436,7 +436,7 @@ static int speedhq_decode_frame(AVCodecContext *avctx, AVFrame *frame, if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) { return ret; } - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; if (second_field_offset == 4 || second_field_offset == (buf_size-4)) { /* diff --git a/src/third_party/ffmpeg/libavcodec/svq3.c b/src/third_party/ffmpeg/libavcodec/svq3.c index df514030..2d03dbc4 100644 --- a/src/third_party/ffmpeg/libavcodec/svq3.c +++ b/src/third_party/ffmpeg/libavcodec/svq3.c @@ -1408,7 +1408,10 @@ static int svq3_decode_frame(AVCodecContext *avctx, AVFrame *rframe, /* for skipping the frame */ s->cur_pic->f->pict_type = s->pict_type; - s->cur_pic->f->key_frame = (s->pict_type == AV_PICTURE_TYPE_I); + if (s->pict_type == AV_PICTURE_TYPE_I) + s->cur_pic->f->flags |= AV_FRAME_FLAG_KEY; + else + s->cur_pic->f->flags &= ~AV_FRAME_FLAG_KEY; ret = get_buffer(avctx, s->cur_pic); if (ret < 0) diff --git a/src/third_party/ffmpeg/libavcodec/tak.c b/src/third_party/ffmpeg/libavcodec/tak.c index f26574c9..99678e98 100644 --- a/src/third_party/ffmpeg/libavcodec/tak.c +++ b/src/third_party/ffmpeg/libavcodec/tak.c @@ -92,10 +92,10 @@ int ff_tak_check_crc(const uint8_t *buf, unsigned int buf_size) return 0; } -void ff_tak_parse_streaminfo(TAKStreamInfo *s, GetBitContext *gb) +static int tak_parse_streaminfo(TAKStreamInfo *s, GetBitContext *gb) { uint64_t channel_mask = 0; - int frame_type, i; + int frame_type, i, ret; s->codec = get_bits(gb, TAK_ENCODER_CODEC_BITS); skip_bits(gb, TAK_ENCODER_PROFILE_BITS); @@ -124,7 +124,13 @@ void ff_tak_parse_streaminfo(TAKStreamInfo *s, GetBitContext *gb) } s->ch_layout = channel_mask; - s->frame_samples = tak_get_nb_samples(s->sample_rate, frame_type); + + ret = tak_get_nb_samples(s->sample_rate, frame_type); + if (ret < 0) + return ret; + s->frame_samples = ret; + + return 0; } int avpriv_tak_parse_streaminfo(TAKStreamInfo *s, const uint8_t *buf, int size) @@ -135,9 +141,7 @@ int avpriv_tak_parse_streaminfo(TAKStreamInfo *s, const uint8_t *buf, int size) if (ret < 0) return AVERROR_INVALIDDATA; - ff_tak_parse_streaminfo(s, &gb); - - return 0; + return tak_parse_streaminfo(s, &gb); } int ff_tak_decode_frame_header(AVCodecContext *avctx, GetBitContext *gb, @@ -159,7 +163,9 @@ int ff_tak_decode_frame_header(AVCodecContext *avctx, GetBitContext *gb, } if (ti->flags & TAK_FRAME_FLAG_HAS_INFO) { - ff_tak_parse_streaminfo(ti, gb); + int ret = tak_parse_streaminfo(ti, gb); + if (ret < 0) + return ret; if (get_bits(gb, 6)) skip_bits(gb, 25); @@ -169,6 +175,9 @@ int ff_tak_decode_frame_header(AVCodecContext *avctx, GetBitContext *gb, if (ti->flags & TAK_FRAME_FLAG_HAS_METADATA) return AVERROR_INVALIDDATA; + if (get_bits_left(gb) < 24) + return AVERROR_INVALIDDATA; + skip_bits(gb, 24); return 0; diff --git a/src/third_party/ffmpeg/libavcodec/tak.h b/src/third_party/ffmpeg/libavcodec/tak.h index 60691189..5e43598d 100644 --- a/src/third_party/ffmpeg/libavcodec/tak.h +++ b/src/third_party/ffmpeg/libavcodec/tak.h @@ -149,8 +149,6 @@ int ff_tak_check_crc(const uint8_t *buf, unsigned int buf_size); */ int avpriv_tak_parse_streaminfo(TAKStreamInfo *s, const uint8_t *buf, int size); -void ff_tak_parse_streaminfo(TAKStreamInfo *s, GetBitContext *gb); - /** * Validate and decode a frame header. * @param avctx AVCodecContext to use as av_log() context diff --git a/src/third_party/ffmpeg/libavcodec/targa.c b/src/third_party/ffmpeg/libavcodec/targa.c index 07005f2b..59fdc428 100644 --- a/src/third_party/ffmpeg/libavcodec/targa.c +++ b/src/third_party/ffmpeg/libavcodec/targa.c @@ -249,7 +249,11 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, } break; } +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS p->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } } diff --git a/src/third_party/ffmpeg/libavcodec/targa_y216dec.c b/src/third_party/ffmpeg/libavcodec/targa_y216dec.c index d5234c16..2874a51a 100644 --- a/src/third_party/ffmpeg/libavcodec/targa_y216dec.c +++ b/src/third_party/ffmpeg/libavcodec/targa_y216dec.c @@ -47,7 +47,7 @@ static int y216_decode_frame(AVCodecContext *avctx, AVFrame *pic, if ((ret = ff_get_buffer(avctx, pic, 0)) < 0) return ret; - pic->key_frame = 1; + pic->flags |= AV_FRAME_FLAG_KEY; pic->pict_type = AV_PICTURE_TYPE_I; y = (uint16_t *)pic->data[0]; diff --git a/src/third_party/ffmpeg/libavcodec/tdsc.c b/src/third_party/ffmpeg/libavcodec/tdsc.c index b5ab2e17..739738d9 100644 --- a/src/third_party/ffmpeg/libavcodec/tdsc.c +++ b/src/third_party/ffmpeg/libavcodec/tdsc.c @@ -612,7 +612,7 @@ static int tdsc_decode_frame(AVCodecContext *avctx, AVFrame *frame, /* Frame is ready to be output */ if (keyframe) { frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; } else { frame->pict_type = AV_PICTURE_TYPE_P; } diff --git a/src/third_party/ffmpeg/libavcodec/tests/avcodec.c b/src/third_party/ffmpeg/libavcodec/tests/avcodec.c index 4c173042..d78447d0 100644 --- a/src/third_party/ffmpeg/libavcodec/tests/avcodec.c +++ b/src/third_party/ffmpeg/libavcodec/tests/avcodec.c @@ -149,8 +149,7 @@ int main(void){ FF_CODEC_CAP_SETS_FRAME_PROPS) || codec->capabilities & (AV_CODEC_CAP_AVOID_PROBING | AV_CODEC_CAP_CHANNEL_CONF | - AV_CODEC_CAP_DRAW_HORIZ_BAND | - AV_CODEC_CAP_SUBFRAMES)) + AV_CODEC_CAP_DRAW_HORIZ_BAND)) ERR("Encoder %s has decoder-only capabilities set\n"); if (codec->capabilities & AV_CODEC_CAP_FRAME_THREADS && codec->capabilities & AV_CODEC_CAP_ENCODER_FLUSH) diff --git a/src/third_party/ffmpeg/libavcodec/threadframe.h b/src/third_party/ffmpeg/libavcodec/threadframe.h index d2f93c5c..d581c408 100644 --- a/src/third_party/ffmpeg/libavcodec/threadframe.h +++ b/src/third_party/ffmpeg/libavcodec/threadframe.h @@ -84,6 +84,9 @@ void ff_thread_release_ext_buffer(AVCodecContext *avctx, ThreadFrame *f); int ff_thread_ref_frame(ThreadFrame *dst, const ThreadFrame *src); +int ff_thread_replace_frame(AVCodecContext *avctx, ThreadFrame *dst, + const ThreadFrame *src); + int ff_thread_can_start_frame(AVCodecContext *avctx); #endif diff --git a/src/third_party/ffmpeg/libavcodec/tiertexseqv.c b/src/third_party/ffmpeg/libavcodec/tiertexseqv.c index 19c0671b..cdc88555 100644 --- a/src/third_party/ffmpeg/libavcodec/tiertexseqv.c +++ b/src/third_party/ffmpeg/libavcodec/tiertexseqv.c @@ -182,7 +182,11 @@ static int seqvideo_decode(SeqVideoContext *seq, const unsigned char *data, int c[j] = (*data << 2) | (*data >> 4); palette[i] = 0xFFU << 24 | AV_RB24(c); } +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS seq->frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } if (flags & 2) { diff --git a/src/third_party/ffmpeg/libavcodec/tiff.c b/src/third_party/ffmpeg/libavcodec/tiff.c index 1a1879de..14896459 100644 --- a/src/third_party/ffmpeg/libavcodec/tiff.c +++ b/src/third_party/ffmpeg/libavcodec/tiff.c @@ -1036,7 +1036,7 @@ static int dng_decode_tiles(AVCodecContext *avctx, AVFrame *frame, /* Frame is ready to be output */ frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; return avpkt->size; } @@ -1451,7 +1451,7 @@ static int tiff_decode_tag(TiffContext *s, AVFrame *frame) break; case TIFF_GRAY_RESPONSE_CURVE: case DNG_LINEARIZATION_TABLE: - if (count > FF_ARRAY_ELEMS(s->dng_lut)) + if (count < 1 || count > FF_ARRAY_ELEMS(s->dng_lut)) return AVERROR_INVALIDDATA; for (int i = 0; i < count; i++) s->dng_lut[i] = ff_tget(&s->gb, type, s->le); @@ -2379,6 +2379,7 @@ again: } } + p->flags |= AV_FRAME_FLAG_KEY; *got_frame = 1; return avpkt->size; diff --git a/src/third_party/ffmpeg/libavcodec/tmv.c b/src/third_party/ffmpeg/libavcodec/tmv.c index cdb83452..2a7e1a10 100644 --- a/src/third_party/ffmpeg/libavcodec/tmv.c +++ b/src/third_party/ffmpeg/libavcodec/tmv.c @@ -57,10 +57,14 @@ static int tmv_decode_frame(AVCodecContext *avctx, AVFrame *frame, } frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; dst = frame->data[0]; +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif memcpy(frame->data[1], ff_cga_palette, 16 * 4); memset(frame->data[1] + 16 * 4, 0, AVPALETTE_SIZE - 16 * 4); diff --git a/src/third_party/ffmpeg/libavcodec/truemotion2.c b/src/third_party/ffmpeg/libavcodec/truemotion2.c index b168b9cd..73c93359 100644 --- a/src/third_party/ffmpeg/libavcodec/truemotion2.c +++ b/src/third_party/ffmpeg/libavcodec/truemotion2.c @@ -930,11 +930,13 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, } offset += t; } - p->key_frame = tm2_decode_blocks(l, p); - if (p->key_frame) + if (tm2_decode_blocks(l, p)) { + p->flags |= AV_FRAME_FLAG_KEY; p->pict_type = AV_PICTURE_TYPE_I; - else + } else { + p->flags &= ~AV_FRAME_FLAG_KEY; p->pict_type = AV_PICTURE_TYPE_P; + } l->cur = !l->cur; *got_frame = 1; diff --git a/src/third_party/ffmpeg/libavcodec/truemotion2rt.c b/src/third_party/ffmpeg/libavcodec/truemotion2rt.c index c6015b27..4f8590fc 100644 --- a/src/third_party/ffmpeg/libavcodec/truemotion2rt.c +++ b/src/third_party/ffmpeg/libavcodec/truemotion2rt.c @@ -202,7 +202,7 @@ static int truemotion2rt_decode_frame(AVCodecContext *avctx, AVFrame *p, } p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; *got_frame = 1; return avpkt->size; diff --git a/src/third_party/ffmpeg/libavcodec/tscc.c b/src/third_party/ffmpeg/libavcodec/tscc.c index 0ebe641a..346d93e1 100644 --- a/src/third_party/ffmpeg/libavcodec/tscc.c +++ b/src/third_party/ffmpeg/libavcodec/tscc.c @@ -106,7 +106,11 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, /* make the palette available on the way out */ if (c->avctx->pix_fmt == AV_PIX_FMT_PAL8) { +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = palette_has_changed; +FF_ENABLE_DEPRECATION_WARNINGS +#endif memcpy(frame->data[1], c->pal, AVPALETTE_SIZE); } diff --git a/src/third_party/ffmpeg/libavcodec/utils.c b/src/third_party/ffmpeg/libavcodec/utils.c index 599da21d..a8514ba6 100644 --- a/src/third_party/ffmpeg/libavcodec/utils.c +++ b/src/third_party/ffmpeg/libavcodec/utils.c @@ -317,7 +317,7 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height, } if (s->codec_id == AV_CODEC_ID_IFF_ILBM) { - w_align = FFMAX(w_align, 8); + w_align = FFMAX(w_align, 16); } *width = FFALIGN(*width, w_align); @@ -915,6 +915,27 @@ int ff_thread_ref_frame(ThreadFrame *dst, const ThreadFrame *src) return 0; } +int ff_thread_replace_frame(AVCodecContext *avctx, ThreadFrame *dst, + const ThreadFrame *src) +{ + int ret; + + dst->owner[0] = src->owner[0]; + dst->owner[1] = src->owner[1]; + + ret = av_frame_replace(dst->f, src->f); + if (ret < 0) + return ret; + + ret = av_buffer_replace(&dst->progress, src->progress); + if (ret < 0) { + ff_thread_release_ext_buffer(dst->owner[0], dst); + return ret; + } + + return 0; +} + #if !HAVE_THREADS int ff_thread_get_buffer(AVCodecContext *avctx, AVFrame *f, int flags) diff --git a/src/third_party/ffmpeg/libavcodec/utvideodec.c b/src/third_party/ffmpeg/libavcodec/utvideodec.c index 9face52d..66c84352 100644 --- a/src/third_party/ffmpeg/libavcodec/utvideodec.c +++ b/src/third_party/ffmpeg/libavcodec/utvideodec.c @@ -869,9 +869,10 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, break; } - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_I; - frame->interlaced_frame = !!c->interlaced; + if (c->interlaced) + frame->flags |= AV_FRAME_FLAG_INTERLACED; *got_frame = 1; diff --git a/src/third_party/ffmpeg/libavcodec/v210dec.c b/src/third_party/ffmpeg/libavcodec/v210dec.c index 43b92f6e..814d65bb 100644 --- a/src/third_party/ffmpeg/libavcodec/v210dec.c +++ b/src/third_party/ffmpeg/libavcodec/v210dec.c @@ -187,7 +187,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *pic, return ret; pic->pict_type = AV_PICTURE_TYPE_I; - pic->key_frame = 1; + pic->flags |= AV_FRAME_FLAG_KEY; if (stride) { td.stride = stride; @@ -207,9 +207,9 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *pic, if (avctx->field_order > AV_FIELD_PROGRESSIVE) { /* we have interlaced material flagged in container */ - pic->interlaced_frame = 1; + pic->flags |= AV_FRAME_FLAG_INTERLACED; if (avctx->field_order == AV_FIELD_TT || avctx->field_order == AV_FIELD_TB) - pic->top_field_first = 1; + pic->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST; } *got_frame = 1; diff --git a/src/third_party/ffmpeg/libavcodec/v210x.c b/src/third_party/ffmpeg/libavcodec/v210x.c index 96594e2a..55630fa2 100644 --- a/src/third_party/ffmpeg/libavcodec/v210x.c +++ b/src/third_party/ffmpeg/libavcodec/v210x.c @@ -62,7 +62,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *pic, vdst = (uint16_t *)pic->data[2]; yend = ydst + width; pic->pict_type = AV_PICTURE_TYPE_I; - pic->key_frame = 1; + pic->flags |= AV_FRAME_FLAG_KEY; for (;;) { uint32_t v = av_be2ne32(*src++); diff --git a/src/third_party/ffmpeg/libavcodec/v308dec.c b/src/third_party/ffmpeg/libavcodec/v308dec.c index a81771fc..4bc4ea4e 100644 --- a/src/third_party/ffmpeg/libavcodec/v308dec.c +++ b/src/third_party/ffmpeg/libavcodec/v308dec.c @@ -48,7 +48,7 @@ static int v308_decode_frame(AVCodecContext *avctx, AVFrame *pic, if ((ret = ff_get_buffer(avctx, pic, 0)) < 0) return ret; - pic->key_frame = 1; + pic->flags |= AV_FRAME_FLAG_KEY; pic->pict_type = AV_PICTURE_TYPE_I; y = pic->data[0]; diff --git a/src/third_party/ffmpeg/libavcodec/v408dec.c b/src/third_party/ffmpeg/libavcodec/v408dec.c index edc9976d..191c050f 100644 --- a/src/third_party/ffmpeg/libavcodec/v408dec.c +++ b/src/third_party/ffmpeg/libavcodec/v408dec.c @@ -51,7 +51,7 @@ static int v408_decode_frame(AVCodecContext *avctx, AVFrame *pic, if ((ret = ff_get_buffer(avctx, pic, 0)) < 0) return ret; - pic->key_frame = 1; + pic->flags |= AV_FRAME_FLAG_KEY; pic->pict_type = AV_PICTURE_TYPE_I; y = pic->data[0]; diff --git a/src/third_party/ffmpeg/libavcodec/v410dec.c b/src/third_party/ffmpeg/libavcodec/v410dec.c index fb859e8c..35e4a8ae 100644 --- a/src/third_party/ffmpeg/libavcodec/v410dec.c +++ b/src/third_party/ffmpeg/libavcodec/v410dec.c @@ -102,7 +102,7 @@ static int v410_decode_frame(AVCodecContext *avctx, AVFrame *pic, if ((ret = ff_thread_get_buffer(avctx, pic, 0)) < 0) return ret; - pic->key_frame = 1; + pic->flags |= AV_FRAME_FLAG_KEY; pic->pict_type = AV_PICTURE_TYPE_I; td.buf = src; diff --git a/src/third_party/ffmpeg/libavcodec/v4l2_buffers.c b/src/third_party/ffmpeg/libavcodec/v4l2_buffers.c index 3f547106..22771356 100644 --- a/src/third_party/ffmpeg/libavcodec/v4l2_buffers.c +++ b/src/third_party/ffmpeg/libavcodec/v4l2_buffers.c @@ -427,7 +427,8 @@ int ff_v4l2_buffer_buf_to_avframe(AVFrame *frame, V4L2Buffer *avbuf) return ret; /* 2. get frame information */ - frame->key_frame = !!(avbuf->buf.flags & V4L2_BUF_FLAG_KEYFRAME); + if (avbuf->buf.flags & V4L2_BUF_FLAG_KEYFRAME) + frame->flags |= AV_FRAME_FLAG_KEY; frame->color_primaries = v4l2_get_color_primaries(avbuf); frame->colorspace = v4l2_get_color_space(avbuf); frame->color_range = v4l2_get_color_range(avbuf); diff --git a/src/third_party/ffmpeg/libavcodec/vaapi_decode.c b/src/third_party/ffmpeg/libavcodec/vaapi_decode.c index ab8c12e3..dd55cbd6 100644 --- a/src/third_party/ffmpeg/libavcodec/vaapi_decode.c +++ b/src/third_party/ffmpeg/libavcodec/vaapi_decode.c @@ -398,6 +398,11 @@ static const struct { MAP(MPEG4, MPEG4_ADVANCED_SIMPLE, MPEG4AdvancedSimple), MAP(MPEG4, MPEG4_MAIN, MPEG4Main ), +#if VA_CHECK_VERSION(1, 18, 0) + MAP(H264, H264_HIGH_10_INTRA, + H264High10 ), + MAP(H264, H264_HIGH_10, H264High10 ), +#endif MAP(H264, H264_CONSTRAINED_BASELINE, H264ConstrainedBaseline), MAP(H264, H264_MAIN, H264Main ), diff --git a/src/third_party/ffmpeg/libavcodec/vaapi_encode_h264.c b/src/third_party/ffmpeg/libavcodec/vaapi_encode_h264.c index 645f6a97..9ad017d5 100644 --- a/src/third_party/ffmpeg/libavcodec/vaapi_encode_h264.c +++ b/src/third_party/ffmpeg/libavcodec/vaapi_encode_h264.c @@ -23,6 +23,7 @@ #include "libavutil/avassert.h" #include "libavutil/common.h" +#include "libavutil/pixdesc.h" #include "libavutil/internal.h" #include "libavutil/opt.h" @@ -301,10 +302,21 @@ static int vaapi_encode_h264_init_sequence_params(AVCodecContext *avctx) H264RawPPS *pps = &priv->raw_pps; VAEncSequenceParameterBufferH264 *vseq = ctx->codec_sequence_params; VAEncPictureParameterBufferH264 *vpic = ctx->codec_picture_params; + const AVPixFmtDescriptor *desc; + int bit_depth; memset(sps, 0, sizeof(*sps)); memset(pps, 0, sizeof(*pps)); + desc = av_pix_fmt_desc_get(priv->common.input_frames->sw_format); + av_assert0(desc); + if (desc->nb_components == 1 || desc->log2_chroma_w != 1 || desc->log2_chroma_h != 1) { + av_log(avctx, AV_LOG_ERROR, "Chroma format of input pixel format " + "%s is not supported.\n", desc->name); + return AVERROR(EINVAL); + } + bit_depth = desc->comp[0].depth; + sps->nal_unit_header.nal_ref_idc = 3; sps->nal_unit_header.nal_unit_type = H264_NAL_SPS; @@ -314,11 +326,11 @@ static int vaapi_encode_h264_init_sequence_params(AVCodecContext *avctx) avctx->profile == FF_PROFILE_H264_MAIN) sps->constraint_set1_flag = 1; - if (avctx->profile == FF_PROFILE_H264_HIGH) + if (avctx->profile == FF_PROFILE_H264_HIGH || avctx->profile == FF_PROFILE_H264_HIGH_10) sps->constraint_set3_flag = ctx->gop_size == 1; if (avctx->profile == FF_PROFILE_H264_MAIN || - avctx->profile == FF_PROFILE_H264_HIGH) { + avctx->profile == FF_PROFILE_H264_HIGH || avctx->profile == FF_PROFILE_H264_HIGH_10) { sps->constraint_set4_flag = 1; sps->constraint_set5_flag = ctx->b_per_p == 0; } @@ -359,6 +371,8 @@ static int vaapi_encode_h264_init_sequence_params(AVCodecContext *avctx) sps->seq_parameter_set_id = 0; sps->chroma_format_idc = 1; + sps->bit_depth_luma_minus8 = bit_depth - 8; + sps->bit_depth_chroma_minus8 = bit_depth - 8; sps->log2_max_frame_num_minus4 = 4; sps->pic_order_cnt_type = ctx->max_b_depth ? 0 : 2; @@ -1144,6 +1158,9 @@ static av_cold int vaapi_encode_h264_configure(AVCodecContext *avctx) } static const VAAPIEncodeProfile vaapi_encode_h264_profiles[] = { +#if VA_CHECK_VERSION(1, 18, 0) + { FF_PROFILE_H264_HIGH_10, 10, 3, 1, 1, VAProfileH264High10 }, +#endif { FF_PROFILE_H264_HIGH, 8, 3, 1, 1, VAProfileH264High }, { FF_PROFILE_H264_MAIN, 8, 3, 1, 1, VAProfileH264Main }, { FF_PROFILE_H264_CONSTRAINED_BASELINE, @@ -1208,10 +1225,9 @@ static av_cold int vaapi_encode_h264_init(AVCodecContext *avctx) av_log(avctx, AV_LOG_ERROR, "H.264 extended profile " "is not supported.\n"); return AVERROR_PATCHWELCOME; - case FF_PROFILE_H264_HIGH_10: case FF_PROFILE_H264_HIGH_10_INTRA: - av_log(avctx, AV_LOG_ERROR, "H.264 10-bit profiles " - "are not supported.\n"); + av_log(avctx, AV_LOG_ERROR, "H.264 high 10 intra profile " + "is not supported.\n"); return AVERROR_PATCHWELCOME; case FF_PROFILE_H264_HIGH_422: case FF_PROFILE_H264_HIGH_422_INTRA: @@ -1304,6 +1320,7 @@ static const AVOption vaapi_encode_h264_options[] = { { PROFILE("constrained_baseline", FF_PROFILE_H264_CONSTRAINED_BASELINE) }, { PROFILE("main", FF_PROFILE_H264_MAIN) }, { PROFILE("high", FF_PROFILE_H264_HIGH) }, + { PROFILE("high10", FF_PROFILE_H264_HIGH_10) }, #undef PROFILE { "level", "Set level (level_idc)", diff --git a/src/third_party/ffmpeg/libavcodec/vaapi_hevc.c b/src/third_party/ffmpeg/libavcodec/vaapi_hevc.c index 984af75c..8b12484f 100644 --- a/src/third_party/ffmpeg/libavcodec/vaapi_hevc.c +++ b/src/third_party/ffmpeg/libavcodec/vaapi_hevc.c @@ -60,10 +60,10 @@ static void fill_vaapi_pic(VAPictureHEVC *va_pic, const HEVCFrame *pic, int rps_ if (pic->flags & HEVC_FRAME_FLAG_LONG_REF) va_pic->flags |= VA_PICTURE_HEVC_LONG_TERM_REFERENCE; - if (pic->frame->interlaced_frame) { + if (pic->frame->flags & AV_FRAME_FLAG_INTERLACED) { va_pic->flags |= VA_PICTURE_HEVC_FIELD_PIC; - if (!pic->frame->top_field_first) + if (!(pic->frame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST)) va_pic->flags |= VA_PICTURE_HEVC_BOTTOM_FIELD; } } @@ -259,7 +259,7 @@ static int vaapi_hevc_start_frame(AVCodecContext *avctx, pre_palette_size = pps->pps_palette_predictor_initializers_present_flag ? pps->pps_num_palette_predictor_initializers : (sps->sps_palette_predictor_initializers_present_flag ? - sps->sps_num_palette_predictor_initializers_minus1 + 1 : + sps->sps_num_palette_predictor_initializers : 0); if (avctx->profile == FF_PROFILE_HEVC_SCC) { diff --git a/src/third_party/ffmpeg/libavcodec/vb.c b/src/third_party/ffmpeg/libavcodec/vb.c index 8b0e2164..5744faa9 100644 --- a/src/third_party/ffmpeg/libavcodec/vb.c +++ b/src/third_party/ffmpeg/libavcodec/vb.c @@ -230,7 +230,11 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, } memcpy(frame->data[1], c->pal, AVPALETTE_SIZE); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = flags & VB_HAS_PALETTE; +FF_ENABLE_DEPRECATION_WARNINGS +#endif outptr = frame->data[0]; srcptr = c->frame; diff --git a/src/third_party/ffmpeg/libavcodec/vble.c b/src/third_party/ffmpeg/libavcodec/vble.c index 9307b0d1..7711bf1b 100644 --- a/src/third_party/ffmpeg/libavcodec/vble.c +++ b/src/third_party/ffmpeg/libavcodec/vble.c @@ -135,7 +135,7 @@ static int vble_decode_frame(AVCodecContext *avctx, AVFrame *pic, return ret; /* Set flags */ - pic->key_frame = 1; + pic->flags |= AV_FRAME_FLAG_KEY; pic->pict_type = AV_PICTURE_TYPE_I; /* Version should always be 1 */ diff --git a/src/third_party/ffmpeg/libavcodec/vbndec.c b/src/third_party/ffmpeg/libavcodec/vbndec.c index d92dcd46..02ed43f8 100644 --- a/src/third_party/ffmpeg/libavcodec/vbndec.c +++ b/src/third_party/ffmpeg/libavcodec/vbndec.c @@ -151,7 +151,7 @@ static int vbn_decode_frame(AVCodecContext *avctx, goto out; frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; if (format == VBN_FORMAT_RAW) { uint8_t *flipped = frame->data[0] + frame->linesize[0] * (frame->height - 1); diff --git a/src/third_party/ffmpeg/libavcodec/vc1.c b/src/third_party/ffmpeg/libavcodec/vc1.c index d4014d25..795c6db5 100644 --- a/src/third_party/ffmpeg/libavcodec/vc1.c +++ b/src/third_party/ffmpeg/libavcodec/vc1.c @@ -418,6 +418,14 @@ static int decode_sequence_header_adv(VC1Context *v, GetBitContext *gb) v->s.loop_filter, v->chromaformat, v->broadcast, v->interlace, v->tfcntrflag, v->finterpflag); +#if FF_API_TICKS_PER_FRAME +FF_DISABLE_DEPRECATION_WARNINGS + if (v->broadcast) { // Pulldown may be present + v->s.avctx->ticks_per_frame = 2; + } +FF_ENABLE_DEPRECATION_WARNINGS +#endif + v->psf = get_bits1(gb); if (v->psf) { //PsF, 6.1.13 av_log(v->s.avctx, AV_LOG_ERROR, "Progressive Segmented Frame mode: not supported (yet)\n"); @@ -467,9 +475,6 @@ static int decode_sequence_header_adv(VC1Context *v, GetBitContext *gb) v->s.avctx->framerate.num = ff_vc1_fps_nr[nr - 1] * 1000; } } - if (v->broadcast) { // Pulldown may be present - v->s.avctx->ticks_per_frame = 2; - } } if (get_bits1(gb)) { diff --git a/src/third_party/ffmpeg/libavcodec/vc1_mc.c b/src/third_party/ffmpeg/libavcodec/vc1_mc.c index 1b8d8799..8f0b3f6f 100644 --- a/src/third_party/ffmpeg/libavcodec/vc1_mc.c +++ b/src/third_party/ffmpeg/libavcodec/vc1_mc.c @@ -233,7 +233,7 @@ void ff_vc1_mc_1mv(VC1Context *v, int dir) luty = v->last_luty; lutuv = v->last_lutuv; use_ic = v->last_use_ic; - interlace = s->last_picture.f->interlaced_frame; + interlace = !!(s->last_picture.f->flags & AV_FRAME_FLAG_INTERLACED); } } else { srcY = s->next_picture.f->data[0]; @@ -242,7 +242,7 @@ void ff_vc1_mc_1mv(VC1Context *v, int dir) luty = v->next_luty; lutuv = v->next_lutuv; use_ic = v->next_use_ic; - interlace = s->next_picture.f->interlaced_frame; + interlace = !!(s->next_picture.f->flags & AV_FRAME_FLAG_INTERLACED); } if (!srcY || !srcU) { @@ -482,13 +482,13 @@ void ff_vc1_mc_4mv_luma(VC1Context *v, int n, int dir, int avg) srcY = s->last_picture.f->data[0]; luty = v->last_luty; use_ic = v->last_use_ic; - interlace = s->last_picture.f->interlaced_frame; + interlace = !!(s->last_picture.f->flags & AV_FRAME_FLAG_INTERLACED); } } else { srcY = s->next_picture.f->data[0]; luty = v->next_luty; use_ic = v->next_use_ic; - interlace = s->next_picture.f->interlaced_frame; + interlace = !!(s->next_picture.f->flags & AV_FRAME_FLAG_INTERLACED); } if (!srcY) { @@ -708,14 +708,14 @@ void ff_vc1_mc_4mv_chroma(VC1Context *v, int dir) srcV = s->last_picture.f->data[2]; lutuv = v->last_lutuv; use_ic = v->last_use_ic; - interlace = s->last_picture.f->interlaced_frame; + interlace = !!(s->last_picture.f->flags & AV_FRAME_FLAG_INTERLACED); } } else { srcU = s->next_picture.f->data[1]; srcV = s->next_picture.f->data[2]; lutuv = v->next_lutuv; use_ic = v->next_use_ic; - interlace = s->next_picture.f->interlaced_frame; + interlace = !!(s->next_picture.f->flags & AV_FRAME_FLAG_INTERLACED); } if (!srcU) { @@ -884,13 +884,13 @@ void ff_vc1_mc_4mv_chroma4(VC1Context *v, int dir, int dir2, int avg) srcV = s->next_picture.f->data[2]; lutuv = v->next_lutuv; use_ic = v->next_use_ic; - interlace = s->next_picture.f->interlaced_frame; + interlace = !!(s->next_picture.f->flags & AV_FRAME_FLAG_INTERLACED); } else { srcU = s->last_picture.f->data[1]; srcV = s->last_picture.f->data[2]; lutuv = v->last_lutuv; use_ic = v->last_use_ic; - interlace = s->last_picture.f->interlaced_frame; + interlace = !!(s->last_picture.f->flags & AV_FRAME_FLAG_INTERLACED); } if (!srcU) return; @@ -1034,7 +1034,7 @@ void ff_vc1_interp_mc(VC1Context *v) srcU = s->next_picture.f->data[1]; srcV = s->next_picture.f->data[2]; - interlace = s->next_picture.f->interlaced_frame; + interlace = !!(s->next_picture.f->flags & AV_FRAME_FLAG_INTERLACED); src_x = s->mb_x * 16 + (mx >> 2); src_y = s->mb_y * 16 + (my >> 2); diff --git a/src/third_party/ffmpeg/libavcodec/vc1_parser.c b/src/third_party/ffmpeg/libavcodec/vc1_parser.c index 4167215f..ec284dca 100644 --- a/src/third_party/ffmpeg/libavcodec/vc1_parser.c +++ b/src/third_party/ffmpeg/libavcodec/vc1_parser.c @@ -89,11 +89,10 @@ static void vc1_extract_header(AVCodecParserContext *s, AVCodecContext *avctx, else s->pict_type = vpc->v.s.pict_type; - if (avctx->ticks_per_frame > 1){ + if (vpc->v.broadcast){ // process pulldown flags s->repeat_pict = 1; // Pulldown flags are only valid when 'broadcast' has been set. - // So ticks_per_frame will be 2 if (vpc->v.rff){ // repeat field s->repeat_pict = 2; diff --git a/src/third_party/ffmpeg/libavcodec/vc1dec.c b/src/third_party/ffmpeg/libavcodec/vc1dec.c index 5cb4c544..9e343d00 100644 --- a/src/third_party/ffmpeg/libavcodec/vc1dec.c +++ b/src/third_party/ffmpeg/libavcodec/vc1dec.c @@ -836,6 +836,7 @@ static int vc1_decode_frame(AVCodecContext *avctx, AVFrame *pict, const uint8_t *rawbuf; int raw_size; } *slices = NULL, *tmp; + unsigned slices_allocated = 0; v->second_field = 0; @@ -859,6 +860,7 @@ static int vc1_decode_frame(AVCodecContext *avctx, AVFrame *pict, //for advanced profile we may need to parse and unescape data if (avctx->codec_id == AV_CODEC_ID_VC1 || avctx->codec_id == AV_CODEC_ID_VC1IMAGE) { int buf_size2 = 0; + size_t next_allocated = 0; buf2 = av_mallocz(buf_size + AV_INPUT_BUFFER_PADDING_SIZE); if (!buf2) return AVERROR(ENOMEM); @@ -882,7 +884,8 @@ static int vc1_decode_frame(AVCodecContext *avctx, AVFrame *pict, int buf_size3; if (avctx->hwaccel) buf_start_second_field = start; - tmp = av_realloc_array(slices, sizeof(*slices), n_slices+1); + av_size_mult(sizeof(*slices), n_slices+1, &next_allocated); + tmp = next_allocated ? av_fast_realloc(slices, &slices_allocated, next_allocated) : NULL; if (!tmp) { ret = AVERROR(ENOMEM); goto err; @@ -911,7 +914,8 @@ static int vc1_decode_frame(AVCodecContext *avctx, AVFrame *pict, break; case VC1_CODE_SLICE: { int buf_size3; - tmp = av_realloc_array(slices, sizeof(*slices), n_slices+1); + av_size_mult(sizeof(*slices), n_slices+1, &next_allocated); + tmp = next_allocated ? av_fast_realloc(slices, &slices_allocated, next_allocated) : NULL; if (!tmp) { ret = AVERROR(ENOMEM); goto err; @@ -946,7 +950,8 @@ static int vc1_decode_frame(AVCodecContext *avctx, AVFrame *pict, } else { // found field marker, unescape second field if (avctx->hwaccel) buf_start_second_field = divider; - tmp = av_realloc_array(slices, sizeof(*slices), n_slices+1); + av_size_mult(sizeof(*slices), n_slices+1, &next_allocated); + tmp = next_allocated ? av_fast_realloc(slices, &slices_allocated, next_allocated) : NULL; if (!tmp) { ret = AVERROR(ENOMEM); goto err; @@ -1055,7 +1060,10 @@ static int vc1_decode_frame(AVCodecContext *avctx, AVFrame *pict, // for skipping the frame s->current_picture.f->pict_type = s->pict_type; - s->current_picture.f->key_frame = s->pict_type == AV_PICTURE_TYPE_I; + if (s->pict_type == AV_PICTURE_TYPE_I) + s->current_picture.f->flags |= AV_FRAME_FLAG_KEY; + else + s->current_picture.f->flags &= ~AV_FRAME_FLAG_KEY; /* skip B-frames if we don't have reference frames */ if (!s->last_picture_ptr && s->pict_type == AV_PICTURE_TYPE_B) { @@ -1073,13 +1081,12 @@ static int vc1_decode_frame(AVCodecContext *avctx, AVFrame *pict, } v->s.current_picture_ptr->field_picture = v->field_mode; - v->s.current_picture_ptr->f->interlaced_frame = (v->fcm != PROGRESSIVE); - v->s.current_picture_ptr->f->top_field_first = v->tff; + v->s.current_picture_ptr->f->flags |= AV_FRAME_FLAG_INTERLACED * (v->fcm != PROGRESSIVE); + v->s.current_picture_ptr->f->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST * !!v->tff; // process pulldown flags s->current_picture_ptr->f->repeat_pict = 0; // Pulldown flags are only valid when 'broadcast' has been set. - // So ticks_per_frame will be 2 if (v->rff) { // repeat field s->current_picture_ptr->f->repeat_pict = 1; diff --git a/src/third_party/ffmpeg/libavcodec/vcr1.c b/src/third_party/ffmpeg/libavcodec/vcr1.c index 853d4459..771337e2 100644 --- a/src/third_party/ffmpeg/libavcodec/vcr1.c +++ b/src/third_party/ffmpeg/libavcodec/vcr1.c @@ -63,7 +63,7 @@ static int vcr1_decode_frame(AVCodecContext *avctx, AVFrame *p, if ((ret = ff_get_buffer(avctx, p, 0)) < 0) return ret; p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; for (i = 0; i < 16; i++) { a->delta[i] = *bytestream++; diff --git a/src/third_party/ffmpeg/libavcodec/vdpau_mpeg12.c b/src/third_party/ffmpeg/libavcodec/vdpau_mpeg12.c index 354239ca..79007aa1 100644 --- a/src/third_party/ffmpeg/libavcodec/vdpau_mpeg12.c +++ b/src/third_party/ffmpeg/libavcodec/vdpau_mpeg12.c @@ -75,8 +75,9 @@ static int vdpau_mpeg_start_frame(AVCodecContext *avctx, info->f_code[1][0] = s->mpeg_f_code[1][0]; info->f_code[1][1] = s->mpeg_f_code[1][1]; for (i = 0; i < 64; ++i) { - info->intra_quantizer_matrix[i] = s->intra_matrix[i]; - info->non_intra_quantizer_matrix[i] = s->inter_matrix[i]; + int n = s->idsp.idct_permutation[i]; + info->intra_quantizer_matrix[i] = s->intra_matrix[n]; + info->non_intra_quantizer_matrix[i] = s->inter_matrix[n]; } return ff_vdpau_common_start_frame(pic_ctx, buffer, size); diff --git a/src/third_party/ffmpeg/libavcodec/vdpau_mpeg4.c b/src/third_party/ffmpeg/libavcodec/vdpau_mpeg4.c index 6e082eef..1211b1df 100644 --- a/src/third_party/ffmpeg/libavcodec/vdpau_mpeg4.c +++ b/src/third_party/ffmpeg/libavcodec/vdpau_mpeg4.c @@ -74,8 +74,9 @@ static int vdpau_mpeg4_start_frame(AVCodecContext *avctx, info->alternate_vertical_scan_flag = s->alternate_scan; info->top_field_first = s->top_field_first; for (i = 0; i < 64; ++i) { - info->intra_quantizer_matrix[i] = s->intra_matrix[i]; - info->non_intra_quantizer_matrix[i] = s->inter_matrix[i]; + int n = s->idsp.idct_permutation[i]; + info->intra_quantizer_matrix[i] = s->intra_matrix[n]; + info->non_intra_quantizer_matrix[i] = s->inter_matrix[n]; } ff_vdpau_common_start_frame(pic_ctx, buffer, size); diff --git a/src/third_party/ffmpeg/libavcodec/version.h b/src/third_party/ffmpeg/libavcodec/version.h index 7acb261b..c2007219 100644 --- a/src/third_party/ffmpeg/libavcodec/version.h +++ b/src/third_party/ffmpeg/libavcodec/version.h @@ -29,8 +29,8 @@ #include "version_major.h" -#define LIBAVCODEC_VERSION_MINOR 7 -#define LIBAVCODEC_VERSION_MICRO 100 +#define LIBAVCODEC_VERSION_MINOR 14 +#define LIBAVCODEC_VERSION_MICRO 101 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ LIBAVCODEC_VERSION_MINOR, \ diff --git a/src/third_party/ffmpeg/libavcodec/version_major.h b/src/third_party/ffmpeg/libavcodec/version_major.h index 40db2134..2f5138d0 100644 --- a/src/third_party/ffmpeg/libavcodec/version_major.h +++ b/src/third_party/ffmpeg/libavcodec/version_major.h @@ -46,6 +46,8 @@ #define FF_API_VT_HWACCEL_CONTEXT (LIBAVCODEC_VERSION_MAJOR < 61) #define FF_API_AVCTX_FRAME_NUMBER (LIBAVCODEC_VERSION_MAJOR < 61) #define FF_API_SLICE_OFFSET (LIBAVCODEC_VERSION_MAJOR < 61) +#define FF_API_SUBFRAMES (LIBAVCODEC_VERSION_MAJOR < 61) +#define FF_API_TICKS_PER_FRAME (LIBAVCODEC_VERSION_MAJOR < 61) // reminder to remove CrystalHD decoders on next major bump #define FF_CODEC_CRYSTAL_HD (LIBAVCODEC_VERSION_MAJOR < 61) diff --git a/src/third_party/ffmpeg/libavcodec/videotoolbox.c b/src/third_party/ffmpeg/libavcodec/videotoolbox.c index e42fea6f..64443255 100644 --- a/src/third_party/ffmpeg/libavcodec/videotoolbox.c +++ b/src/third_party/ffmpeg/libavcodec/videotoolbox.c @@ -799,6 +799,9 @@ static CFDictionaryRef videotoolbox_buffer_attributes_create(int width, static CFDictionaryRef videotoolbox_decoder_config_create(CMVideoCodecType codec_type, AVCodecContext *avctx) { + CFMutableDictionaryRef avc_info; + CFDataRef data = NULL; + CFMutableDictionaryRef config_info = CFDictionaryCreateMutable(kCFAllocatorDefault, 0, &kCFTypeDictionaryKeyCallBacks, @@ -810,9 +813,6 @@ static CFDictionaryRef videotoolbox_decoder_config_create(CMVideoCodecType codec kVTVideoDecoderSpecification_RequireHardwareAcceleratedVideoDecoder, kCFBooleanTrue); - CFMutableDictionaryRef avc_info; - CFDataRef data = NULL; - avc_info = CFDictionaryCreateMutable(kCFAllocatorDefault, 1, &kCFTypeDictionaryKeyCallBacks, @@ -1072,13 +1072,14 @@ static int videotoolbox_hevc_end_frame(AVCodecContext *avctx) HEVCContext *h = avctx->priv_data; AVFrame *frame = h->ref->frame; VTContext *vtctx = avctx->internal->hwaccel_priv_data; + int ret; h->output_frame->crop_right = 0; h->output_frame->crop_left = 0; h->output_frame->crop_top = 0; h->output_frame->crop_bottom = 0; - int ret = ff_videotoolbox_common_end_frame(avctx, frame); + ret = ff_videotoolbox_common_end_frame(avctx, frame); vtctx->bitstream_size = 0; return ret; } @@ -1132,15 +1133,17 @@ static int videotoolbox_prores_end_frame(AVCodecContext *avctx) } static enum AVPixelFormat videotoolbox_best_pixel_format(AVCodecContext *avctx) { + int depth; const AVPixFmtDescriptor *descriptor = av_pix_fmt_desc_get(avctx->sw_pix_fmt); if (!descriptor) return AV_PIX_FMT_NV12; // same as av_videotoolbox_alloc_context() - int depth = descriptor->comp[0].depth; if (descriptor->flags & AV_PIX_FMT_FLAG_ALPHA) return AV_PIX_FMT_AYUV64; + depth = descriptor->comp[0].depth; + #if HAVE_KCVPIXELFORMATTYPE_444YPCBCR16BIPLANARVIDEORANGE if (depth > 10) return descriptor->log2_chroma_w == 0 ? AV_PIX_FMT_P416 : AV_PIX_FMT_P216; @@ -1194,6 +1197,7 @@ int ff_videotoolbox_common_init(AVCodecContext *avctx) VTContext *vtctx = avctx->internal->hwaccel_priv_data; AVHWFramesContext *hw_frames; int err; + bool full_range; vtctx->logctx = avctx; @@ -1241,7 +1245,7 @@ int ff_videotoolbox_common_init(AVCodecContext *avctx) goto fail; } - bool full_range = avctx->color_range == AVCOL_RANGE_JPEG; + full_range = avctx->color_range == AVCOL_RANGE_JPEG; vtctx->vt_ctx->cv_pix_fmt_type = av_map_videotoolbox_format_from_pixfmt2(hw_frames->sw_format, full_range); if (!vtctx->vt_ctx->cv_pix_fmt_type) { diff --git a/src/third_party/ffmpeg/libavcodec/videotoolboxenc.c b/src/third_party/ffmpeg/libavcodec/videotoolboxenc.c index 56971471..b017c90c 100644 --- a/src/third_party/ffmpeg/libavcodec/videotoolboxenc.c +++ b/src/third_party/ffmpeg/libavcodec/videotoolboxenc.c @@ -63,7 +63,21 @@ typedef OSStatus (*getParameterSetAtIndex)(CMFormatDescriptionRef videoDesc, size_t *parameterSetCountOut, int *NALUnitHeaderLengthOut); -//These symbols may not be present +/* + * Symbols that aren't available in MacOS 10.8 and iOS 8.0 need to be accessed + * from compat_keys, or it will cause compiler errors when compiling for older + * OS versions. + * + * For example, kVTCompressionPropertyKey_H264EntropyMode was added in + * MacOS 10.9. If this constant were used directly, a compiler would generate + * an error when it has access to the MacOS 10.8 headers, but does not have + * 10.9 headers. + * + * Runtime errors will still occur when unknown keys are set. A warning is + * logged and encoding continues where possible. + * + * When adding new symbols, they should be loaded/set in loadVTEncSymbols(). + */ static struct{ CFStringRef kCVImageBufferColorPrimaries_ITU_R_2020; CFStringRef kCVImageBufferTransferFunction_ITU_R_2020; @@ -105,6 +119,7 @@ static struct{ CFStringRef kVTVideoEncoderSpecification_EnableHardwareAcceleratedVideoEncoder; CFStringRef kVTVideoEncoderSpecification_RequireHardwareAcceleratedVideoEncoder; + CFStringRef kVTVideoEncoderSpecification_EnableLowLatencyRateControl; getParameterSetAtIndex CMVideoFormatDescriptionGetHEVCParameterSetAtIndex; } compat_keys; @@ -120,7 +135,7 @@ do{ \ static pthread_once_t once_ctrl = PTHREAD_ONCE_INIT; -static void loadVTEncSymbols(){ +static void loadVTEncSymbols(void){ compat_keys.CMVideoFormatDescriptionGetHEVCParameterSetAtIndex = (getParameterSetAtIndex)dlsym( RTLD_DEFAULT, @@ -171,6 +186,8 @@ static void loadVTEncSymbols(){ "EnableHardwareAcceleratedVideoEncoder"); GET_SYM(kVTVideoEncoderSpecification_RequireHardwareAcceleratedVideoEncoder, "RequireHardwareAcceleratedVideoEncoder"); + GET_SYM(kVTVideoEncoderSpecification_EnableLowLatencyRateControl, + "EnableLowLatencyRateControl"); } typedef enum VT_H264Profile { @@ -1245,6 +1262,13 @@ static int vtenc_create_encoder(AVCodecContext *avctx, compat_keys.kVTCompressionPropertyKey_TargetQualityForAlpha, alpha_quality_num); CFRelease(alpha_quality_num); + + if (status) { + av_log(avctx, + AV_LOG_ERROR, + "Error setting alpha quality: %d\n", + status); + } } } @@ -1441,6 +1465,17 @@ static int vtenc_create_encoder(AVCodecContext *avctx, } } + // low-latency mode: eliminate frame reordering, follow a one-in-one-out encoding mode + if ((avctx->flags & AV_CODEC_FLAG_LOW_DELAY) && avctx->codec_id == AV_CODEC_ID_H264) { + status = VTSessionSetProperty(vtctx->session, + compat_keys.kVTVideoEncoderSpecification_EnableLowLatencyRateControl, + kCFBooleanTrue); + + if (status) { + av_log(avctx, AV_LOG_ERROR, "Error setting low latency property: %d\n", status); + } + } + status = VTCompressionSessionPrepareToEncodeFrames(vtctx->session); if (status) { av_log(avctx, AV_LOG_ERROR, "Error: cannot prepare encoder: %d\n", status); @@ -1650,8 +1685,8 @@ static int find_sei_end(AVCodecContext *avctx, { int nal_type; size_t sei_payload_size = 0; - *sei_end = NULL; uint8_t *nal_start = nal_data; + *sei_end = NULL; if (!nal_size) return 0; @@ -2041,7 +2076,7 @@ static int vtenc_cm_to_avpacket( return AVERROR_EXTERNAL; } - int status = get_params_size(avctx, vid_fmt, &header_size); + status = get_params_size(avctx, vid_fmt, &header_size); if (status) return status; } diff --git a/src/third_party/ffmpeg/libavcodec/vmnc.c b/src/third_party/ffmpeg/libavcodec/vmnc.c index 8daaf08c..17e3a2f3 100644 --- a/src/third_party/ffmpeg/libavcodec/vmnc.c +++ b/src/third_party/ffmpeg/libavcodec/vmnc.c @@ -339,7 +339,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, if ((ret = ff_reget_buffer(avctx, c->pic, 0)) < 0) return ret; - c->pic->key_frame = 0; + c->pic->flags &= ~AV_FRAME_FLAG_KEY; c->pic->pict_type = AV_PICTURE_TYPE_P; // restore screen after cursor @@ -441,7 +441,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, bytestream2_skip(gb, 4); break; case MAGIC_WMVi: // ServerInitialization struct - c->pic->key_frame = 1; + c->pic->flags |= AV_FRAME_FLAG_KEY; c->pic->pict_type = AV_PICTURE_TYPE_I; depth = bytestream2_get_byte(gb); if (depth != c->bpp) { diff --git a/src/third_party/ffmpeg/libavcodec/vorbisdec.c b/src/third_party/ffmpeg/libavcodec/vorbisdec.c index e9dad4ef..1d2a0997 100644 --- a/src/third_party/ffmpeg/libavcodec/vorbisdec.c +++ b/src/third_party/ffmpeg/libavcodec/vorbisdec.c @@ -368,6 +368,10 @@ static int vorbis_parse_setup_hdr_codebooks(vorbis_context *vc) unsigned codebook_value_bits = get_bits(gb, 4) + 1; unsigned codebook_sequence_p = get_bits1(gb); + if (!isfinite(codebook_minimum_value) || !isfinite(codebook_delta_value)) { + ret = AVERROR_INVALIDDATA; + goto error; + } ff_dlog(NULL, " We expect %d numbers for building the codevectors. \n", codebook_lookup_values); ff_dlog(NULL, " delta %f minmum %f \n", diff --git a/src/third_party/ffmpeg/libavcodec/vp3.c b/src/third_party/ffmpeg/libavcodec/vp3.c index 9660def6..9e097c89 100644 --- a/src/third_party/ffmpeg/libavcodec/vp3.c +++ b/src/third_party/ffmpeg/libavcodec/vp3.c @@ -2353,6 +2353,8 @@ static av_cold int vp3_decode_init(AVCodecContext *avctx) s->avctx = avctx; s->width = FFALIGN(avctx->coded_width, 16); s->height = FFALIGN(avctx->coded_height, 16); + if (s->width < 18) + return AVERROR_PATCHWELCOME; if (avctx->codec_id != AV_CODEC_ID_THEORA) avctx->pix_fmt = AV_PIX_FMT_YUV420P; avctx->chroma_sample_location = AVCHROMA_LOC_CENTER; @@ -2675,7 +2677,10 @@ static int vp3_decode_frame(AVCodecContext *avctx, AVFrame *frame, s->current_frame.f->pict_type = s->keyframe ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; - s->current_frame.f->key_frame = s->keyframe; + if (s->keyframe) + s->current_frame.f->flags |= AV_FRAME_FLAG_KEY; + else + s->current_frame.f->flags &= ~AV_FRAME_FLAG_KEY; if ((ret = ff_thread_get_ext_buffer(avctx, &s->current_frame, AV_GET_BUFFER_FLAG_REF)) < 0) goto error; @@ -2919,7 +2924,9 @@ static int theora_decode_header(AVCodecContext *avctx, GetBitContext *gb) /* sanity check */ if (av_image_check_size(visible_width, visible_height, 0, avctx) < 0 || visible_width + offset_x > s->width || - visible_height + offset_y > s->height) { + visible_height + offset_y > s->height || + visible_width < 18 + ) { av_log(avctx, AV_LOG_ERROR, "Invalid frame dimensions - w:%d h:%d x:%d y:%d (%dx%d).\n", visible_width, visible_height, offset_x, offset_y, @@ -2965,6 +2972,8 @@ static int theora_decode_header(AVCodecContext *avctx, GetBitContext *gb) } else avctx->pix_fmt = AV_PIX_FMT_YUV420P; + if (s->width < 18) + return AVERROR_PATCHWELCOME; ret = ff_set_dimensions(avctx, s->width, s->height); if (ret < 0) return ret; diff --git a/src/third_party/ffmpeg/libavcodec/vp5.c b/src/third_party/ffmpeg/libavcodec/vp5.c index 57933350..78d4b38c 100644 --- a/src/third_party/ffmpeg/libavcodec/vp5.c +++ b/src/third_party/ffmpeg/libavcodec/vp5.c @@ -44,10 +44,13 @@ static int vp5_parse_header(VP56Context *s, const uint8_t *buf, int buf_size) ret = ff_vpx_init_range_decoder(&s->c, buf, buf_size); if (ret < 0) return ret; - s->frames[VP56_FRAME_CURRENT]->key_frame = !vpx_rac_get(c); + if (!vpx_rac_get(c)) + s->frames[VP56_FRAME_CURRENT]->flags |= AV_FRAME_FLAG_KEY; + else + s->frames[VP56_FRAME_CURRENT]->flags &= ~AV_FRAME_FLAG_KEY; vpx_rac_get(c); ff_vp56_init_dequant(s, vp56_rac_gets(c, 6)); - if (s->frames[VP56_FRAME_CURRENT]->key_frame) + if (s->frames[VP56_FRAME_CURRENT]->flags & AV_FRAME_FLAG_KEY) { int render_x, render_y; @@ -148,7 +151,7 @@ static int vp5_parse_coeff_models(VP56Context *s) if (vpx_rac_get_prob_branchy(c, vp5_dccv_pct[pt][node])) { def_prob[node] = vp56_rac_gets_nn(c, 7); model->coeff_dccv[pt][node] = def_prob[node]; - } else if (s->frames[VP56_FRAME_CURRENT]->key_frame) { + } else if (s->frames[VP56_FRAME_CURRENT]->flags & AV_FRAME_FLAG_KEY) { model->coeff_dccv[pt][node] = def_prob[node]; } @@ -159,7 +162,7 @@ static int vp5_parse_coeff_models(VP56Context *s) if (vpx_rac_get_prob_branchy(c, vp5_ract_pct[ct][pt][cg][node])) { def_prob[node] = vp56_rac_gets_nn(c, 7); model->coeff_ract[pt][ct][cg][node] = def_prob[node]; - } else if (s->frames[VP56_FRAME_CURRENT]->key_frame) { + } else if (s->frames[VP56_FRAME_CURRENT]->flags & AV_FRAME_FLAG_KEY) { model->coeff_ract[pt][ct][cg][node] = def_prob[node]; } diff --git a/src/third_party/ffmpeg/libavcodec/vp56.c b/src/third_party/ffmpeg/libavcodec/vp56.c index bd994428..a5c5b236 100644 --- a/src/third_party/ffmpeg/libavcodec/vp56.c +++ b/src/third_party/ffmpeg/libavcodec/vp56.c @@ -350,7 +350,7 @@ static void vp56_mc(VP56Context *s, int b, int plane, uint8_t *src, if (s->avctx->skip_loop_filter >= AVDISCARD_ALL || (s->avctx->skip_loop_filter >= AVDISCARD_NONKEY - && !s->frames[VP56_FRAME_CURRENT]->key_frame)) + && !(s->frames[VP56_FRAME_CURRENT]->flags & AV_FRAME_FLAG_KEY))) deblock_filtering = 0; dx = s->mv[b].x / s->vp56_coord_div[b]; @@ -493,7 +493,7 @@ static int vp56_decode_mb(VP56Context *s, int row, int col, int is_alpha) VP56mb mb_type; int ret; - if (s->frames[VP56_FRAME_CURRENT]->key_frame) + if (s->frames[VP56_FRAME_CURRENT]->flags & AV_FRAME_FLAG_KEY) mb_type = VP56_MB_INTRA; else mb_type = vp56_decode_mv(s, row, col); @@ -511,7 +511,7 @@ static int vp56_conceal_mb(VP56Context *s, int row, int col, int is_alpha) { VP56mb mb_type; - if (s->frames[VP56_FRAME_CURRENT]->key_frame) + if (s->frames[VP56_FRAME_CURRENT]->flags & AV_FRAME_FLAG_KEY) mb_type = VP56_MB_INTRA; else mb_type = vp56_conceal_mv(s, row, col); @@ -596,6 +596,7 @@ int ff_vp56_decode_frame(AVCodecContext *avctx, AVFrame *rframe, if (s->alpha_context) av_frame_unref(s->alpha_context->frames[i]); } + s->frames[VP56_FRAME_CURRENT]->flags |= AV_FRAME_FLAG_KEY; //FIXME } ret = ff_get_buffer(avctx, p, AV_GET_BUFFER_FLAG_REF); @@ -670,7 +671,7 @@ static int ff_vp56_decode_mbs(AVCodecContext *avctx, void *data, int res; int damaged = 0; - if (p->key_frame) { + if (p->flags & AV_FRAME_FLAG_KEY) { p->pict_type = AV_PICTURE_TYPE_I; s->default_models_init(s); for (block=0; blockmb_height*s->mb_width; block++) @@ -762,7 +763,7 @@ static int ff_vp56_decode_mbs(AVCodecContext *avctx, void *data, s->have_undamaged_frame = 1; next: - if (p->key_frame || s->golden_frame) { + if ((p->flags & AV_FRAME_FLAG_KEY) || s->golden_frame) { av_frame_unref(s->frames[VP56_FRAME_GOLDEN]); if ((res = av_frame_ref(s->frames[VP56_FRAME_GOLDEN], p)) < 0) return res; diff --git a/src/third_party/ffmpeg/libavcodec/vp6.c b/src/third_party/ffmpeg/libavcodec/vp6.c index 9bbfa0eb..7a519cf1 100644 --- a/src/third_party/ffmpeg/libavcodec/vp6.c +++ b/src/third_party/ffmpeg/libavcodec/vp6.c @@ -57,10 +57,13 @@ static int vp6_parse_header(VP56Context *s, const uint8_t *buf, int buf_size) int ret; int separated_coeff = buf[0] & 1; - s->frames[VP56_FRAME_CURRENT]->key_frame = !(buf[0] & 0x80); + if (!(buf[0] & 0x80)) + s->frames[VP56_FRAME_CURRENT]->flags |= AV_FRAME_FLAG_KEY; + else + s->frames[VP56_FRAME_CURRENT]->flags &= ~AV_FRAME_FLAG_KEY; ff_vp56_init_dequant(s, (buf[0] >> 1) & 0x3F); - if (s->frames[VP56_FRAME_CURRENT]->key_frame) { + if (s->frames[VP56_FRAME_CURRENT]->flags & AV_FRAME_FLAG_KEY) { sub_version = buf[1] >> 3; if (sub_version > 8) return AVERROR_INVALIDDATA; @@ -299,7 +302,7 @@ static int vp6_parse_coeff_models(VP56Context *s) if (vpx_rac_get_prob_branchy(c, vp6_dccv_pct[pt][node])) { def_prob[node] = vp56_rac_gets_nn(c, 7); model->coeff_dccv[pt][node] = def_prob[node]; - } else if (s->frames[VP56_FRAME_CURRENT]->key_frame) { + } else if (s->frames[VP56_FRAME_CURRENT]->flags & AV_FRAME_FLAG_KEY) { model->coeff_dccv[pt][node] = def_prob[node]; } @@ -322,7 +325,7 @@ static int vp6_parse_coeff_models(VP56Context *s) if (vpx_rac_get_prob_branchy(c, vp6_ract_pct[ct][pt][cg][node])) { def_prob[node] = vp56_rac_gets_nn(c, 7); model->coeff_ract[pt][ct][cg][node] = def_prob[node]; - } else if (s->frames[VP56_FRAME_CURRENT]->key_frame) { + } else if (s->frames[VP56_FRAME_CURRENT]->flags & AV_FRAME_FLAG_KEY) { model->coeff_ract[pt][ct][cg][node] = def_prob[node]; } diff --git a/src/third_party/ffmpeg/libavcodec/vp8.c b/src/third_party/ffmpeg/libavcodec/vp8.c index db2419de..2ab06c82 100644 --- a/src/third_party/ffmpeg/libavcodec/vp8.c +++ b/src/third_party/ffmpeg/libavcodec/vp8.c @@ -2732,7 +2732,10 @@ int vp78_decode_frame(AVCodecContext *avctx, AVFrame *rframe, int *got_frame, goto err; } - curframe->tf.f->key_frame = s->keyframe; + if (s->keyframe) + curframe->tf.f->flags |= AV_FRAME_FLAG_KEY; + else + curframe->tf.f->flags &= ~AV_FRAME_FLAG_KEY; curframe->tf.f->pict_type = s->keyframe ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; if ((ret = vp8_alloc_frame(s, curframe, referenced)) < 0) diff --git a/src/third_party/ffmpeg/libavcodec/vp8data.c b/src/third_party/ffmpeg/libavcodec/vp8data.c new file mode 100644 index 00000000..85740692 --- /dev/null +++ b/src/third_party/ffmpeg/libavcodec/vp8data.c @@ -0,0 +1,42 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include + +// cat 1 and 2 are defined in vp8data.h +static const uint8_t vp8_dct_cat3_prob[] = { + 173, 148, 140, 0 +}; +static const uint8_t vp8_dct_cat4_prob[] = { + 176, 155, 140, 135, 0 +}; +static const uint8_t vp8_dct_cat5_prob[] = { + 180, 157, 141, 134, 130, 0 +}; +static const uint8_t vp8_dct_cat6_prob[] = { + 254, 254, 243, 230, 196, 177, 153, 140, 133, 130, 129, 0 +}; + +// only used for cat3 and above; cat 1 and 2 are referenced directly. +const uint8_t *const ff_vp8_dct_cat_prob[] = { + vp8_dct_cat3_prob, + vp8_dct_cat4_prob, + vp8_dct_cat5_prob, + vp8_dct_cat6_prob, +}; + diff --git a/src/third_party/ffmpeg/libavcodec/vp8data.h b/src/third_party/ffmpeg/libavcodec/vp8data.h index 1fcce134..8b8f1ed1 100644 --- a/src/third_party/ffmpeg/libavcodec/vp8data.h +++ b/src/third_party/ffmpeg/libavcodec/vp8data.h @@ -339,26 +339,8 @@ static const uint8_t vp8_dct_cat1_prob[] = { static const uint8_t vp8_dct_cat2_prob[] = { 165, 145, 0 }; -static const uint8_t vp8_dct_cat3_prob[] = { - 173, 148, 140, 0 -}; -static const uint8_t vp8_dct_cat4_prob[] = { - 176, 155, 140, 135, 0 -}; -static const uint8_t vp8_dct_cat5_prob[] = { - 180, 157, 141, 134, 130, 0 -}; -static const uint8_t vp8_dct_cat6_prob[] = { - 254, 254, 243, 230, 196, 177, 153, 140, 133, 130, 129, 0 -}; -// only used for cat3 and above; cat 1 and 2 are referenced directly -const uint8_t *const ff_vp8_dct_cat_prob[] = { - vp8_dct_cat3_prob, - vp8_dct_cat4_prob, - vp8_dct_cat5_prob, - vp8_dct_cat6_prob, -}; +extern const uint8_t *const ff_vp8_dct_cat_prob[]; static const uint8_t vp8_token_default_probs[4][8][3][NUM_DCT_TOKENS - 1] = { { diff --git a/src/third_party/ffmpeg/libavcodec/vp9.c b/src/third_party/ffmpeg/libavcodec/vp9.c index 7ff387fa..d8a31507 100644 --- a/src/third_party/ffmpeg/libavcodec/vp9.c +++ b/src/third_party/ffmpeg/libavcodec/vp9.c @@ -1613,7 +1613,10 @@ static int vp9_decode_frame(AVCodecContext *avctx, AVFrame *frame, if ((ret = vp9_frame_alloc(avctx, &s->s.frames[CUR_FRAME])) < 0) return ret; f = s->s.frames[CUR_FRAME].tf.f; - f->key_frame = s->s.h.keyframe; + if (s->s.h.keyframe) + f->flags |= AV_FRAME_FLAG_KEY; + else + f->flags &= ~AV_FRAME_FLAG_KEY; f->pict_type = (s->s.h.keyframe || s->s.h.intraonly) ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; if (s->s.frames[REF_FRAME_SEGMAP].tf.f->buf[0] && diff --git a/src/third_party/ffmpeg/libavcodec/vqavideo.c b/src/third_party/ffmpeg/libavcodec/vqavideo.c index 0573696d..2977cf9a 100644 --- a/src/third_party/ffmpeg/libavcodec/vqavideo.c +++ b/src/third_party/ffmpeg/libavcodec/vqavideo.c @@ -809,7 +809,11 @@ static int vqa_decode_frame(AVCodecContext *avctx, AVFrame *rframe, /* make the palette available on the way out */ memcpy(s->frame->data[1], s->palette, PALETTE_COUNT * 4); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS s->frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } else if (avctx->pix_fmt == AV_PIX_FMT_RGB555LE) { if ((res = vqa_decode_frame_hicolor(s, s->frame)) < 0) return res; diff --git a/src/third_party/ffmpeg/libavcodec/wavarc.c b/src/third_party/ffmpeg/libavcodec/wavarc.c index 8d37af95..7bfc276d 100644 --- a/src/third_party/ffmpeg/libavcodec/wavarc.c +++ b/src/third_party/ffmpeg/libavcodec/wavarc.c @@ -343,13 +343,15 @@ static int decode_2slp(AVCodecContext *avctx, break; case 0: order = get_urice(gb, 2); + if ((unsigned)order >= FF_ARRAY_ELEMS(s->filter[ch])) + return AVERROR_INVALIDDATA; for (int o = 0; o < order; o++) s->filter[ch][o] = get_srice(gb, 2); for (int n = 0; n < s->nb_samples; n++) { int sum = 15; for (int o = 0; o < order; o++) - sum += s->filter[ch][o] * samples[n + 70 - o - 1]; + sum += s->filter[ch][o] * (unsigned)samples[n + 70 - o - 1]; samples[n + 70] = get_srice(gb, k) + (sum >> 4); } @@ -452,7 +454,7 @@ fail: const int *src = s->samples[ch] + s->offset; for (int n = 0; n < frame->nb_samples; n++) - dst[n] = src[n] * (1 << s->shift) + 0x80U; + dst[n] = src[n] * (1U << s->shift) + 0x80U; } break; case AV_SAMPLE_FMT_S16P: @@ -461,7 +463,7 @@ fail: const int *src = s->samples[ch] + s->offset; for (int n = 0; n < frame->nb_samples; n++) - dst[n] = src[n] * (1 << s->shift); + dst[n] = src[n] * (1U << s->shift); } break; } @@ -497,7 +499,9 @@ const FFCodec ff_wavarc_decoder = { FF_CODEC_DECODE_CB(wavarc_decode), .close = wavarc_close, .p.capabilities = AV_CODEC_CAP_DR1 | +#if FF_API_SUBFRAMES AV_CODEC_CAP_SUBFRAMES | +#endif AV_CODEC_CAP_DELAY, .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_U8P, AV_SAMPLE_FMT_S16P, diff --git a/src/third_party/ffmpeg/libavcodec/wavpackenc.c b/src/third_party/ffmpeg/libavcodec/wavpackenc.c index 3d2d4536..9271e879 100644 --- a/src/third_party/ffmpeg/libavcodec/wavpackenc.c +++ b/src/third_party/ffmpeg/libavcodec/wavpackenc.c @@ -2824,7 +2824,7 @@ static void fill_buffer(WavPackEncodeContext *s, switch (s->avctx->sample_fmt) { case AV_SAMPLE_FMT_U8P: - COPY_SAMPLES(int8_t, 0x80, 0); + COPY_SAMPLES(uint8_t, 0x80, 0); break; case AV_SAMPLE_FMT_S16P: COPY_SAMPLES(int16_t, 0, 0); diff --git a/src/third_party/ffmpeg/libavcodec/wbmpdec.c b/src/third_party/ffmpeg/libavcodec/wbmpdec.c index 8b105bc1..3b5753ab 100644 --- a/src/third_party/ffmpeg/libavcodec/wbmpdec.c +++ b/src/third_party/ffmpeg/libavcodec/wbmpdec.c @@ -74,7 +74,7 @@ static int wbmp_decode_frame(AVCodecContext *avctx, AVFrame *p, else readbits(p->data[0], width, height, p->linesize[0], gb.buffer, gb.buffer_end - gb.buffer); - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; p->pict_type = AV_PICTURE_TYPE_I; *got_frame = 1; diff --git a/src/third_party/ffmpeg/libavcodec/wcmv.c b/src/third_party/ffmpeg/libavcodec/wcmv.c index 097ac8b8..b2413ee9 100644 --- a/src/third_party/ffmpeg/libavcodec/wcmv.c +++ b/src/third_party/ffmpeg/libavcodec/wcmv.c @@ -195,7 +195,10 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, } } - s->prev_frame->key_frame = intra; + if (intra) + s->prev_frame->flags |= AV_FRAME_FLAG_KEY; + else + s->prev_frame->flags &= ~AV_FRAME_FLAG_KEY; s->prev_frame->pict_type = intra ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; if ((ret = av_frame_ref(frame, s->prev_frame)) < 0) diff --git a/src/third_party/ffmpeg/libavcodec/webp.c b/src/third_party/ffmpeg/libavcodec/webp.c index b4357f95..d35cb66f 100644 --- a/src/third_party/ffmpeg/libavcodec/webp.c +++ b/src/third_party/ffmpeg/libavcodec/webp.c @@ -1186,7 +1186,7 @@ static int vp8_lossless_decode_frame(AVCodecContext *avctx, AVFrame *p, *got_frame = 1; p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; ret = data_size; free_and_return: diff --git a/src/third_party/ffmpeg/libavcodec/wmalosslessdec.c b/src/third_party/ffmpeg/libavcodec/wmalosslessdec.c index d545d848..5d1c7ac6 100644 --- a/src/third_party/ffmpeg/libavcodec/wmalosslessdec.c +++ b/src/third_party/ffmpeg/libavcodec/wmalosslessdec.c @@ -1334,7 +1334,11 @@ const FFCodec ff_wmalossless_decoder = { .close = decode_close, FF_CODEC_DECODE_CB(decode_packet), .flush = flush, - .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY, + .p.capabilities = +#if FF_API_SUBFRAMES + AV_CODEC_CAP_SUBFRAMES | +#endif + AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P, AV_SAMPLE_FMT_S32P, diff --git a/src/third_party/ffmpeg/libavcodec/wmaprodec.c b/src/third_party/ffmpeg/libavcodec/wmaprodec.c index 35e9caec..f523f363 100644 --- a/src/third_party/ffmpeg/libavcodec/wmaprodec.c +++ b/src/third_party/ffmpeg/libavcodec/wmaprodec.c @@ -2094,7 +2094,11 @@ const FFCodec ff_wmapro_decoder = { .init = wmapro_decode_init, .close = wmapro_decode_end, FF_CODEC_DECODE_CB(wmapro_decode_packet), - .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1, + .p.capabilities = +#if FF_API_SUBFRAMES + AV_CODEC_CAP_SUBFRAMES | +#endif + AV_CODEC_CAP_DR1, .flush = wmapro_flush, .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_NONE }, @@ -2111,7 +2115,11 @@ const FFCodec ff_xma1_decoder = { .close = xma_decode_end, FF_CODEC_DECODE_CB(xma_decode_packet), .flush = xma_flush, - .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY, + .p.capabilities = +#if FF_API_SUBFRAMES + AV_CODEC_CAP_SUBFRAMES | +#endif + AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY, .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_NONE }, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, @@ -2127,7 +2135,11 @@ const FFCodec ff_xma2_decoder = { .close = xma_decode_end, FF_CODEC_DECODE_CB(xma_decode_packet), .flush = xma_flush, - .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY, + .p.capabilities = +#if FF_API_SUBFRAMES + AV_CODEC_CAP_SUBFRAMES | +#endif + AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY, .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_NONE }, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, diff --git a/src/third_party/ffmpeg/libavcodec/wmavoice.c b/src/third_party/ffmpeg/libavcodec/wmavoice.c index bb98f841..44fda0e2 100644 --- a/src/third_party/ffmpeg/libavcodec/wmavoice.c +++ b/src/third_party/ffmpeg/libavcodec/wmavoice.c @@ -2004,7 +2004,11 @@ const FFCodec ff_wmavoice_decoder = { .init = wmavoice_decode_init, .close = wmavoice_decode_end, FF_CODEC_DECODE_CB(wmavoice_decode_packet), - .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY, + .p.capabilities = +#if FF_API_SUBFRAMES + AV_CODEC_CAP_SUBFRAMES | +#endif + AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, .flush = wmavoice_flush, }; diff --git a/src/third_party/ffmpeg/libavcodec/wnv1.c b/src/third_party/ffmpeg/libavcodec/wnv1.c index 88532ee4..5c57db00 100644 --- a/src/third_party/ffmpeg/libavcodec/wnv1.c +++ b/src/third_party/ffmpeg/libavcodec/wnv1.c @@ -69,7 +69,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, if ((ret = ff_get_buffer(avctx, p, 0)) < 0) return ret; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; if ((ret = init_get_bits8(&gb, buf + 8, buf_size - 8)) < 0) return ret; diff --git a/src/third_party/ffmpeg/libavcodec/x86/cabac.h b/src/third_party/ffmpeg/libavcodec/x86/cabac.h index b046a56a..ce2aefcb 100644 --- a/src/third_party/ffmpeg/libavcodec/x86/cabac.h +++ b/src/third_party/ffmpeg/libavcodec/x86/cabac.h @@ -178,7 +178,7 @@ #if HAVE_7REGS && !BROKEN_COMPILER #define get_cabac_inline get_cabac_inline_x86 static -#if defined(_WIN32) && !defined(_WIN64) && defined(__clang__) +#if ARCH_X86_32 av_noinline #else av_always_inline diff --git a/src/third_party/ffmpeg/libavcodec/xbmdec.c b/src/third_party/ffmpeg/libavcodec/xbmdec.c index a0cc1cb8..ecfc957a 100644 --- a/src/third_party/ffmpeg/libavcodec/xbmdec.c +++ b/src/third_party/ffmpeg/libavcodec/xbmdec.c @@ -130,7 +130,7 @@ static int xbm_decode_frame(AVCodecContext *avctx, AVFrame *p, } } - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; p->pict_type = AV_PICTURE_TYPE_I; *got_frame = 1; diff --git a/src/third_party/ffmpeg/libavcodec/xl.c b/src/third_party/ffmpeg/libavcodec/xl.c index 283cd39a..f008d56e 100644 --- a/src/third_party/ffmpeg/libavcodec/xl.c +++ b/src/third_party/ffmpeg/libavcodec/xl.c @@ -60,7 +60,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, if ((ret = ff_get_buffer(avctx, p, 0)) < 0) return ret; p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; Y = p->data[0]; U = p->data[1]; diff --git a/src/third_party/ffmpeg/libavcodec/xpmdec.c b/src/third_party/ffmpeg/libavcodec/xpmdec.c index 2550afb9..5bc02378 100644 --- a/src/third_party/ffmpeg/libavcodec/xpmdec.c +++ b/src/third_party/ffmpeg/libavcodec/xpmdec.c @@ -422,7 +422,7 @@ static int xpm_decode_frame(AVCodecContext *avctx, AVFrame *p, ptr += mod_strcspn(ptr, ",") + 1; } - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; p->pict_type = AV_PICTURE_TYPE_I; *got_frame = 1; diff --git a/src/third_party/ffmpeg/libavcodec/xwddec.c b/src/third_party/ffmpeg/libavcodec/xwddec.c index 6c5bc44a..f691587b 100644 --- a/src/third_party/ffmpeg/libavcodec/xwddec.c +++ b/src/third_party/ffmpeg/libavcodec/xwddec.c @@ -216,7 +216,7 @@ static int xwd_decode_frame(AVCodecContext *avctx, AVFrame *p, if ((ret = ff_get_buffer(avctx, p, 0)) < 0) return ret; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; p->pict_type = AV_PICTURE_TYPE_I; if (avctx->pix_fmt == AV_PIX_FMT_PAL8) { diff --git a/src/third_party/ffmpeg/libavcodec/y41pdec.c b/src/third_party/ffmpeg/libavcodec/y41pdec.c index b461f349..14e36dc9 100644 --- a/src/third_party/ffmpeg/libavcodec/y41pdec.c +++ b/src/third_party/ffmpeg/libavcodec/y41pdec.c @@ -51,7 +51,7 @@ static int y41p_decode_frame(AVCodecContext *avctx, AVFrame *pic, if ((ret = ff_get_buffer(avctx, pic, 0)) < 0) return ret; - pic->key_frame = 1; + pic->flags |= AV_FRAME_FLAG_KEY; pic->pict_type = AV_PICTURE_TYPE_I; for (i = avctx->height - 1; i >= 0 ; i--) { diff --git a/src/third_party/ffmpeg/libavcodec/ylc.c b/src/third_party/ffmpeg/libavcodec/ylc.c index 29c10f05..c0c4d27c 100644 --- a/src/third_party/ffmpeg/libavcodec/ylc.c +++ b/src/third_party/ffmpeg/libavcodec/ylc.c @@ -427,7 +427,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, } p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->flags |= AV_FRAME_FLAG_KEY; *got_frame = 1; return avpkt->size; diff --git a/src/third_party/ffmpeg/libavcodec/yop.c b/src/third_party/ffmpeg/libavcodec/yop.c index 14244c94..1294c5cc 100644 --- a/src/third_party/ffmpeg/libavcodec/yop.c +++ b/src/third_party/ffmpeg/libavcodec/yop.c @@ -232,7 +232,11 @@ static int yop_decode_frame(AVCodecContext *avctx, AVFrame *rframe, (palette[i + firstcolor] >> 6) & 0x30303; } +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif for (y = 0; y < avctx->height; y += 2) { for (x = 0; x < avctx->width; x += 2) { diff --git a/src/third_party/ffmpeg/libavcodec/yuv4dec.c b/src/third_party/ffmpeg/libavcodec/yuv4dec.c index 15424b19..ad83a212 100644 --- a/src/third_party/ffmpeg/libavcodec/yuv4dec.c +++ b/src/third_party/ffmpeg/libavcodec/yuv4dec.c @@ -46,7 +46,7 @@ static int yuv4_decode_frame(AVCodecContext *avctx, AVFrame *pic, if ((ret = ff_get_buffer(avctx, pic, 0)) < 0) return ret; - pic->key_frame = 1; + pic->flags |= AV_FRAME_FLAG_KEY; pic->pict_type = AV_PICTURE_TYPE_I; y = pic->data[0]; diff --git a/src/third_party/ffmpeg/libavcodec/zerocodec.c b/src/third_party/ffmpeg/libavcodec/zerocodec.c index 42fb24ff..6c3bcebc 100644 --- a/src/third_party/ffmpeg/libavcodec/zerocodec.c +++ b/src/third_party/ffmpeg/libavcodec/zerocodec.c @@ -40,7 +40,7 @@ static int zerocodec_decode_frame(AVCodecContext *avctx, AVFrame *pic, int i, j, zret, ret; if (avpkt->flags & AV_PKT_FLAG_KEY) { - pic->key_frame = 1; + pic->flags |= AV_FRAME_FLAG_KEY; pic->pict_type = AV_PICTURE_TYPE_I; } else { if (!prev) { @@ -50,7 +50,7 @@ static int zerocodec_decode_frame(AVCodecContext *avctx, AVFrame *pic, prev += (avctx->height - 1) * prev_pic->linesize[0]; - pic->key_frame = 0; + pic->flags &= ~AV_FRAME_FLAG_KEY; pic->pict_type = AV_PICTURE_TYPE_P; } diff --git a/src/third_party/ffmpeg/libavcodec/zmbv.c b/src/third_party/ffmpeg/libavcodec/zmbv.c index 0b448518..d309a861 100644 --- a/src/third_party/ffmpeg/libavcodec/zmbv.c +++ b/src/third_party/ffmpeg/libavcodec/zmbv.c @@ -559,11 +559,11 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, return ret; if (c->flags & ZMBV_KEYFRAME) { - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_I; zmbv_decode_intra(c); } else { - frame->key_frame = 0; + frame->flags &= ~AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_P; if (c->decomp_len < 2LL * ((c->width + c->bw - 1) / c->bw) * ((c->height + c->bh - 1) / c->bh)) return AVERROR_INVALIDDATA; diff --git a/src/third_party/ffmpeg/libavutil/frame.c b/src/third_party/ffmpeg/libavutil/frame.c index c905e8d6..b6cee2d8 100644 --- a/src/third_party/ffmpeg/libavutil/frame.c +++ b/src/third_party/ffmpeg/libavutil/frame.c @@ -55,7 +55,6 @@ FF_DISABLE_DEPRECATION_WARNINGS FF_ENABLE_DEPRECATION_WARNINGS #endif frame->time_base = (AVRational){ 0, 1 }; - frame->key_frame = 1; frame->sample_aspect_ratio = (AVRational){ 0, 1 }; frame->format = -1; /* unknown */ frame->extended_data = frame->data; @@ -265,7 +264,11 @@ static int frame_copy_props(AVFrame *dst, const AVFrame *src, int force_copy) { int ret; +#if FF_API_FRAME_KEY +FF_DISABLE_DEPRECATION_WARNINGS dst->key_frame = src->key_frame; +FF_ENABLE_DEPRECATION_WARNINGS +#endif dst->pict_type = src->pict_type; dst->sample_aspect_ratio = src->sample_aspect_ratio; dst->crop_top = src->crop_top; @@ -275,9 +278,17 @@ static int frame_copy_props(AVFrame *dst, const AVFrame *src, int force_copy) dst->pts = src->pts; dst->duration = src->duration; dst->repeat_pict = src->repeat_pict; +#if FF_API_INTERLACED_FRAME +FF_DISABLE_DEPRECATION_WARNINGS dst->interlaced_frame = src->interlaced_frame; dst->top_field_first = src->top_field_first; +FF_ENABLE_DEPRECATION_WARNINGS +#endif +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS dst->palette_has_changed = src->palette_has_changed; +FF_ENABLE_DEPRECATION_WARNINGS +#endif dst->sample_rate = src->sample_rate; dst->opaque = src->opaque; dst->pkt_dts = src->pkt_dts; @@ -468,6 +479,133 @@ fail: return ret; } +int av_frame_replace(AVFrame *dst, const AVFrame *src) +{ + int ret = 0; + + if (dst == src) + return AVERROR(EINVAL); + + if (!src->buf[0]) { + av_frame_unref(dst); + + /* duplicate the frame data if it's not refcounted */ + if ( src->data[0] || src->data[1] + || src->data[2] || src->data[3]) + return av_frame_ref(dst, src); + + ret = frame_copy_props(dst, src, 0); + if (ret < 0) + goto fail; + } + + dst->format = src->format; + dst->width = src->width; + dst->height = src->height; + dst->nb_samples = src->nb_samples; +#if FF_API_OLD_CHANNEL_LAYOUT +FF_DISABLE_DEPRECATION_WARNINGS + dst->channels = src->channels; + dst->channel_layout = src->channel_layout; + if (!av_channel_layout_check(&src->ch_layout)) { + av_channel_layout_uninit(&dst->ch_layout); + if (src->channel_layout) + av_channel_layout_from_mask(&dst->ch_layout, src->channel_layout); + else { + dst->ch_layout.nb_channels = src->channels; + dst->ch_layout.order = AV_CHANNEL_ORDER_UNSPEC; + } + } else { +#endif + ret = av_channel_layout_copy(&dst->ch_layout, &src->ch_layout); + if (ret < 0) + goto fail; +#if FF_API_OLD_CHANNEL_LAYOUT + } +FF_ENABLE_DEPRECATION_WARNINGS +#endif + + wipe_side_data(dst); + av_dict_free(&dst->metadata); + ret = frame_copy_props(dst, src, 0); + if (ret < 0) + goto fail; + + /* replace the buffers */ + for (int i = 0; i < FF_ARRAY_ELEMS(src->buf); i++) { + ret = av_buffer_replace(&dst->buf[i], src->buf[i]); + if (ret < 0) + goto fail; + } + + if (src->extended_buf) { + if (dst->nb_extended_buf != src->nb_extended_buf) { + int nb_extended_buf = FFMIN(dst->nb_extended_buf, src->nb_extended_buf); + void *tmp; + + for (int i = nb_extended_buf; i < dst->nb_extended_buf; i++) + av_buffer_unref(&dst->extended_buf[i]); + + tmp = av_realloc_array(dst->extended_buf, sizeof(*dst->extended_buf), + src->nb_extended_buf); + if (!tmp) { + ret = AVERROR(ENOMEM); + goto fail; + } + dst->extended_buf = tmp; + dst->nb_extended_buf = src->nb_extended_buf; + + memset(&dst->extended_buf[nb_extended_buf], 0, + (src->nb_extended_buf - nb_extended_buf) * sizeof(*dst->extended_buf)); + } + + for (int i = 0; i < src->nb_extended_buf; i++) { + ret = av_buffer_replace(&dst->extended_buf[i], src->extended_buf[i]); + if (ret < 0) + goto fail; + } + } else if (dst->extended_buf) { + for (int i = 0; i < dst->nb_extended_buf; i++) + av_buffer_unref(&dst->extended_buf[i]); + av_freep(&dst->extended_buf); + } + + ret = av_buffer_replace(&dst->hw_frames_ctx, src->hw_frames_ctx); + if (ret < 0) + goto fail; + + if (dst->extended_data != dst->data) + av_freep(&dst->extended_data); + + if (src->extended_data != src->data) { + int ch = dst->ch_layout.nb_channels; + + if (!ch) { + ret = AVERROR(EINVAL); + goto fail; + } + + if (ch > SIZE_MAX / sizeof(*dst->extended_data)) + goto fail; + + dst->extended_data = av_memdup(src->extended_data, sizeof(*dst->extended_data) * ch); + if (!dst->extended_data) { + ret = AVERROR(ENOMEM); + goto fail; + } + } else + dst->extended_data = dst->data; + + memcpy(dst->data, src->data, sizeof(src->data)); + memcpy(dst->linesize, src->linesize, sizeof(src->linesize)); + + return 0; + +fail: + av_frame_unref(dst); + return ret; +} + AVFrame *av_frame_clone(const AVFrame *src) { AVFrame *ret = av_frame_alloc(); @@ -600,7 +738,7 @@ int av_frame_copy_props(AVFrame *dst, const AVFrame *src) return frame_copy_props(dst, src, 1); } -AVBufferRef *av_frame_get_plane_buffer(AVFrame *frame, int plane) +AVBufferRef *av_frame_get_plane_buffer(const AVFrame *frame, int plane) { uint8_t *data; int planes; diff --git a/src/third_party/ffmpeg/libavutil/frame.h b/src/third_party/ffmpeg/libavutil/frame.h index 7be1b87c..575ded3c 100644 --- a/src/third_party/ffmpeg/libavutil/frame.h +++ b/src/third_party/ffmpeg/libavutil/frame.h @@ -416,10 +416,15 @@ typedef struct AVFrame { */ int format; +#if FF_API_FRAME_KEY /** * 1 -> keyframe, 0-> not + * + * @deprecated Use AV_FRAME_FLAG_KEY instead */ + attribute_deprecated int key_frame; +#endif /** * Picture type of the frame. @@ -486,25 +491,50 @@ typedef struct AVFrame { void *opaque; /** - * When decoding, this signals how much the picture must be delayed. - * extra_delay = repeat_pict / (2*fps) + * Number of fields in this frame which should be repeated, i.e. the total + * duration of this frame should be repeat_pict + 2 normal field durations. + * + * For interlaced frames this field may be set to 1, which signals that this + * frame should be presented as 3 fields: beginning with the first field (as + * determined by AV_FRAME_FLAG_TOP_FIELD_FIRST being set or not), followed + * by the second field, and then the first field again. + * + * For progressive frames this field may be set to a multiple of 2, which + * signals that this frame's duration should be (repeat_pict + 2) / 2 + * normal frame durations. + * + * @note This field is computed from MPEG2 repeat_first_field flag and its + * associated flags, H.264 pic_struct from picture timing SEI, and + * their analogues in other codecs. Typically it should only be used when + * higher-layer timing information is not available. */ int repeat_pict; +#if FF_API_INTERLACED_FRAME /** * The content of the picture is interlaced. + * + * @deprecated Use AV_FRAME_FLAG_INTERLACED instead */ + attribute_deprecated int interlaced_frame; /** * If the content is interlaced, is top field displayed first. + * + * @deprecated Use AV_FRAME_FLAG_TOP_FIELD_FIRST instead */ + attribute_deprecated int top_field_first; +#endif +#if FF_API_PALETTE_HAS_CHANGED /** * Tell user application that palette has changed from previous frame. */ + attribute_deprecated int palette_has_changed; +#endif #if FF_API_REORDERED_OPAQUE /** @@ -584,10 +614,23 @@ typedef struct AVFrame { * The frame data may be corrupted, e.g. due to decoding errors. */ #define AV_FRAME_FLAG_CORRUPT (1 << 0) +/** + * A flag to mark frames that are keyframes. + */ +#define AV_FRAME_FLAG_KEY (1 << 1) /** * A flag to mark the frames which need to be decoded, but shouldn't be output. */ #define AV_FRAME_FLAG_DISCARD (1 << 2) +/** + * A flag to mark frames whose content is interlaced. + */ +#define AV_FRAME_FLAG_INTERLACED (1 << 3) +/** + * A flag to mark frames where the top field is displayed first if the content + * is interlaced. + */ +#define AV_FRAME_FLAG_TOP_FIELD_FIRST (1 << 4) /** * @} */ @@ -795,6 +838,19 @@ void av_frame_free(AVFrame **frame); */ int av_frame_ref(AVFrame *dst, const AVFrame *src); +/** + * Ensure the destination frame refers to the same data described by the source + * frame, either by creating a new reference for each AVBufferRef from src if + * they differ from those in dst, by allocating new buffers and copying data if + * src is not reference counted, or by unrefencing it if src is empty. + * + * Frame properties on dst will be replaced by those from src. + * + * @return 0 on success, a negative AVERROR on error. On error, dst is + * unreferenced. + */ +int av_frame_replace(AVFrame *dst, const AVFrame *src); + /** * Create a new frame that references the same data as src. * @@ -903,7 +959,7 @@ int av_frame_copy_props(AVFrame *dst, const AVFrame *src); * @return the buffer reference that contains the plane or NULL if the input * frame is not valid. */ -AVBufferRef *av_frame_get_plane_buffer(AVFrame *frame, int plane); +AVBufferRef *av_frame_get_plane_buffer(const AVFrame *frame, int plane); /** * Add a new side data to a frame. diff --git a/src/third_party/ffmpeg/libavutil/hdr_dynamic_metadata.c b/src/third_party/ffmpeg/libavutil/hdr_dynamic_metadata.c index d458788c..7033f060 100644 --- a/src/third_party/ffmpeg/libavutil/hdr_dynamic_metadata.c +++ b/src/third_party/ffmpeg/libavutil/hdr_dynamic_metadata.c @@ -18,14 +18,13 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "avassert.h" #include "hdr_dynamic_metadata.h" #include "mem.h" #include "libavcodec/defs.h" #include "libavcodec/get_bits.h" #include "libavcodec/put_bits.h" -#define T35_PAYLOAD_MAX_SIZE 907 - static const int64_t luminance_den = 1; static const int32_t peak_luminance_den = 15; static const int64_t rgb_den = 100000; @@ -62,14 +61,14 @@ AVDynamicHDRPlus *av_dynamic_hdr_plus_create_side_data(AVFrame *frame) int av_dynamic_hdr_plus_from_t35(AVDynamicHDRPlus *s, const uint8_t *data, size_t size) { - uint8_t padded_buf[T35_PAYLOAD_MAX_SIZE + AV_INPUT_BUFFER_PADDING_SIZE]; + uint8_t padded_buf[AV_HDR_PLUS_MAX_PAYLOAD_SIZE + AV_INPUT_BUFFER_PADDING_SIZE]; GetBitContext gbc, *gb = &gbc; int ret; if (!s) return AVERROR(ENOMEM); - if (size > T35_PAYLOAD_MAX_SIZE) + if (size > AV_HDR_PLUS_MAX_PAYLOAD_SIZE) return AVERROR(EINVAL); memcpy(padded_buf, data, size); @@ -243,8 +242,10 @@ int av_dynamic_hdr_plus_to_t35(const AVDynamicHDRPlus *s, uint8_t **data, size_t size_t size_bits, size_bytes; PutBitContext pbc, *pb = &pbc; - if (!s || !data) + if (!s) return AVERROR(EINVAL); + if ((!data || *data) && !size) + return AVERROR(EINVAL); /** * Buffer size per CTA-861-H p.253-254: @@ -296,9 +297,20 @@ int av_dynamic_hdr_plus_to_t35(const AVDynamicHDRPlus *s, uint8_t **data, size_t size_bytes = (size_bits + 7) / 8; - buf = av_mallocz(size_bytes); - if (!buf) - return AVERROR(ENOMEM); + av_assert0(size_bytes <= AV_HDR_PLUS_MAX_PAYLOAD_SIZE); + + if (!data) { + *size = size_bytes; + return 0; + } else if (*data) { + if (*size < size_bytes) + return AVERROR_BUFFER_TOO_SMALL; + buf = *data; + } else { + buf = av_malloc(size_bytes); + if (!buf) + return AVERROR(ENOMEM); + } init_put_bits(pb, buf, size_bytes); diff --git a/src/third_party/ffmpeg/libavutil/hdr_dynamic_metadata.h b/src/third_party/ffmpeg/libavutil/hdr_dynamic_metadata.h index 771bb8f4..09e9d8bb 100644 --- a/src/third_party/ffmpeg/libavutil/hdr_dynamic_metadata.h +++ b/src/third_party/ffmpeg/libavutil/hdr_dynamic_metadata.h @@ -353,13 +353,21 @@ AVDynamicHDRPlus *av_dynamic_hdr_plus_create_side_data(AVFrame *frame); int av_dynamic_hdr_plus_from_t35(AVDynamicHDRPlus *s, const uint8_t *data, size_t size); +#define AV_HDR_PLUS_MAX_PAYLOAD_SIZE 907 + /** * Serialize dynamic HDR10+ metadata to a user data registered ITU-T T.35 buffer, * excluding the first 48 bytes of the header, and beginning with the application mode. * @param s A pointer containing the decoded AVDynamicHDRPlus structure. - * @param data A pointer to a byte buffer to be allocated and filled - * with the serialized metadata. - * @param size A pointer to a size to be set to the returned buffer's size (optional). + * @param data[in,out] A pointer to pointer to a byte buffer to be filled with the + * serialized metadata. + * If *data is NULL, a buffer be will be allocated and a pointer to + * it stored in its place. The caller assumes ownership of the buffer. + * May be NULL, in which case the function will only store the + * required buffer size in *size. + * @param size[in,out] A pointer to a size to be set to the returned buffer's size. + * If *data is not NULL, *size must contain the size of the input + * buffer. May be NULL only if *data is NULL. * * @return >= 0 on success. Otherwise, returns the appropriate AVERROR. */ diff --git a/src/third_party/ffmpeg/libavutil/hwcontext_qsv.c b/src/third_party/ffmpeg/libavutil/hwcontext_qsv.c index 67804288..4ed4242d 100644 --- a/src/third_party/ffmpeg/libavutil/hwcontext_qsv.c +++ b/src/third_party/ffmpeg/libavutil/hwcontext_qsv.c @@ -2126,8 +2126,6 @@ static int qsv_device_create(AVHWDeviceContext *ctx, const char *device, "\"%s\".\n", e->value); return AVERROR(EINVAL); } - } else if (CONFIG_VAAPI) { - child_device_type = AV_HWDEVICE_TYPE_VAAPI; #if QSV_ONEVPL } else if (CONFIG_D3D11VA) { // Use D3D11 by default if d3d11va is enabled av_log(ctx, AV_LOG_VERBOSE, @@ -2147,11 +2145,23 @@ static int qsv_device_create(AVHWDeviceContext *ctx, const char *device, } else if (CONFIG_D3D11VA) { child_device_type = AV_HWDEVICE_TYPE_D3D11VA; #endif + } else if (CONFIG_VAAPI) { + child_device_type = AV_HWDEVICE_TYPE_VAAPI; } else { av_log(ctx, AV_LOG_ERROR, "No supported child device type is enabled\n"); return AVERROR(ENOSYS); } +#if CONFIG_VAAPI && defined(_WIN32) + /* AV_HWDEVICE_TYPE_VAAPI on Windows/Libva-win32 not supported */ + /* Reject user specified child_device_type or CONFIG_VAAPI on Windows */ + if (child_device_type == AV_HWDEVICE_TYPE_VAAPI) { + av_log(ctx, AV_LOG_ERROR, "VAAPI child device type not supported for oneVPL on Windows" + "\"%s\".\n", e->value); + return AVERROR(EINVAL); + } +#endif + child_device_opts = NULL; switch (child_device_type) { #if CONFIG_VAAPI diff --git a/src/third_party/ffmpeg/libavutil/hwcontext_vaapi.c b/src/third_party/ffmpeg/libavutil/hwcontext_vaapi.c index 90c2c191..6c3a227d 100644 --- a/src/third_party/ffmpeg/libavutil/hwcontext_vaapi.c +++ b/src/third_party/ffmpeg/libavutil/hwcontext_vaapi.c @@ -18,6 +18,15 @@ #include "config.h" +#if HAVE_VAAPI_WIN32 +# include +#define COBJMACROS +# include +# include +# include "compat/w32dlfcn.h" +# include +typedef HRESULT (WINAPI *PFN_CREATE_DXGI_FACTORY)(REFIID riid, void **ppFactory); +#endif #if HAVE_VAAPI_X11 # include #endif @@ -1663,7 +1672,7 @@ static int vaapi_device_create(AVHWDeviceContext *ctx, const char *device, VAAPIDevicePriv *priv; VADisplay display = NULL; const AVDictionaryEntry *ent; - int try_drm, try_x11, try_all; + int try_drm, try_x11, try_win32, try_all; priv = av_mallocz(sizeof(*priv)); if (!priv) @@ -1676,11 +1685,13 @@ static int vaapi_device_create(AVHWDeviceContext *ctx, const char *device, ent = av_dict_get(opts, "connection_type", NULL, 0); if (ent) { - try_all = try_drm = try_x11 = 0; + try_all = try_drm = try_x11 = try_win32 = 0; if (!strcmp(ent->value, "drm")) { try_drm = 1; } else if (!strcmp(ent->value, "x11")) { try_x11 = 1; + } else if (!strcmp(ent->value, "win32")) { + try_win32 = 1; } else { av_log(ctx, AV_LOG_ERROR, "Invalid connection type %s.\n", ent->value); @@ -1690,6 +1701,7 @@ static int vaapi_device_create(AVHWDeviceContext *ctx, const char *device, try_all = 1; try_drm = HAVE_VAAPI_DRM; try_x11 = HAVE_VAAPI_X11; + try_win32 = HAVE_VAAPI_WIN32; } #if HAVE_VAAPI_DRM @@ -1797,6 +1809,68 @@ static int vaapi_device_create(AVHWDeviceContext *ctx, const char *device, } #endif +#if HAVE_VAAPI_WIN32 + if (!display && try_win32) { + // Try to create a display from the specified device, if any. + if (!device) { + display = vaGetDisplayWin32(NULL); + } else { + IDXGIFactory2 *pDXGIFactory = NULL; + IDXGIAdapter *pAdapter = NULL; +#if !HAVE_UWP + HANDLE dxgi = dlopen("dxgi.dll", 0); + if (!dxgi) { + av_log(ctx, AV_LOG_ERROR, "Failed to load dxgi.dll\n"); + return AVERROR_UNKNOWN; + } + PFN_CREATE_DXGI_FACTORY pfnCreateDXGIFactory = + (PFN_CREATE_DXGI_FACTORY)dlsym(dxgi, "CreateDXGIFactory"); + if (!pfnCreateDXGIFactory) { + av_log(ctx, AV_LOG_ERROR, "CreateDXGIFactory load failed\n"); + dlclose(dxgi); + return AVERROR_UNKNOWN; + } +#else + // In UWP (which lacks LoadLibrary), CreateDXGIFactory isn't + // available, only CreateDXGIFactory1 + PFN_CREATE_DXGI_FACTORY pfnCreateDXGIFactory = + (PFN_CREATE_DXGI_FACTORY)CreateDXGIFactory1; +#endif + if (SUCCEEDED(pfnCreateDXGIFactory(&IID_IDXGIFactory2, + (void **)&pDXGIFactory))) { + int adapter = atoi(device); + if (SUCCEEDED(IDXGIFactory2_EnumAdapters(pDXGIFactory, + adapter, + &pAdapter))) { + DXGI_ADAPTER_DESC desc; + if (SUCCEEDED(IDXGIAdapter2_GetDesc(pAdapter, &desc))) { + av_log(ctx, AV_LOG_INFO, + "Using device %04x:%04x (%ls) - LUID %lu %ld.\n", + desc.VendorId, desc.DeviceId, desc.Description, + desc.AdapterLuid.LowPart, + desc.AdapterLuid.HighPart); + display = vaGetDisplayWin32(&desc.AdapterLuid); + } + IDXGIAdapter_Release(pAdapter); + } + IDXGIFactory2_Release(pDXGIFactory); + } +#if !HAVE_UWP + dlclose(dxgi); +#endif + } + + if (!display) { + av_log(ctx, AV_LOG_ERROR, "Cannot open a VA display " + "from Win32 display.\n"); + return AVERROR_UNKNOWN; + } + + av_log(ctx, AV_LOG_VERBOSE, "Opened VA display via " + "Win32 display.\n"); + } +#endif + if (!display) { if (device) av_log(ctx, AV_LOG_ERROR, "No VA display found for " diff --git a/src/third_party/ffmpeg/libavutil/internal.h b/src/third_party/ffmpeg/libavutil/internal.h index 941830c6..a71c39e0 100644 --- a/src/third_party/ffmpeg/libavutil/internal.h +++ b/src/third_party/ffmpeg/libavutil/internal.h @@ -40,7 +40,6 @@ #include #include "config.h" #include "attributes.h" -#include "timer.h" #include "macros.h" #include "pixfmt.h" diff --git a/src/third_party/ffmpeg/libavutil/mathematics.h b/src/third_party/ffmpeg/libavutil/mathematics.h index e4aff1e9..3e7b52ee 100644 --- a/src/third_party/ffmpeg/libavutil/mathematics.h +++ b/src/third_party/ffmpeg/libavutil/mathematics.h @@ -36,30 +36,81 @@ #ifndef M_E #define M_E 2.7182818284590452354 /* e */ #endif +#ifndef M_Ef +#define M_Ef 2.7182818284590452354f /* e */ +#endif #ifndef M_LN2 #define M_LN2 0.69314718055994530942 /* log_e 2 */ #endif +#ifndef M_LN2f +#define M_LN2f 0.69314718055994530942f /* log_e 2 */ +#endif #ifndef M_LN10 #define M_LN10 2.30258509299404568402 /* log_e 10 */ #endif +#ifndef M_LN10f +#define M_LN10f 2.30258509299404568402f /* log_e 10 */ +#endif #ifndef M_LOG2_10 #define M_LOG2_10 3.32192809488736234787 /* log_2 10 */ #endif +#ifndef M_LOG2_10f +#define M_LOG2_10f 3.32192809488736234787f /* log_2 10 */ +#endif #ifndef M_PHI #define M_PHI 1.61803398874989484820 /* phi / golden ratio */ #endif +#ifndef M_PHIf +#define M_PHIf 1.61803398874989484820f /* phi / golden ratio */ +#endif #ifndef M_PI #define M_PI 3.14159265358979323846 /* pi */ #endif +#ifndef M_PIf +#define M_PIf 3.14159265358979323846f /* pi */ +#endif #ifndef M_PI_2 #define M_PI_2 1.57079632679489661923 /* pi/2 */ #endif +#ifndef M_PI_2f +#define M_PI_2f 1.57079632679489661923f /* pi/2 */ +#endif +#ifndef M_PI_4 +#define M_PI_4 0.78539816339744830962 /* pi/4 */ +#endif +#ifndef M_PI_4f +#define M_PI_4f 0.78539816339744830962f /* pi/4 */ +#endif +#ifndef M_1_PI +#define M_1_PI 0.31830988618379067154 /* 1/pi */ +#endif +#ifndef M_1_PIf +#define M_1_PIf 0.31830988618379067154f /* 1/pi */ +#endif +#ifndef M_2_PI +#define M_2_PI 0.63661977236758134308 /* 2/pi */ +#endif +#ifndef M_2_PIf +#define M_2_PIf 0.63661977236758134308f /* 2/pi */ +#endif +#ifndef M_2_SQRTPI +#define M_2_SQRTPI 1.12837916709551257390 /* 2/sqrt(pi) */ +#endif +#ifndef M_2_SQRTPIf +#define M_2_SQRTPIf 1.12837916709551257390f /* 2/sqrt(pi) */ +#endif #ifndef M_SQRT1_2 #define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */ #endif +#ifndef M_SQRT1_2f +#define M_SQRT1_2f 0.70710678118654752440f /* 1/sqrt(2) */ +#endif #ifndef M_SQRT2 #define M_SQRT2 1.41421356237309504880 /* sqrt(2) */ #endif +#ifndef M_SQRT2f +#define M_SQRT2f 1.41421356237309504880f /* sqrt(2) */ +#endif #ifndef NAN #define NAN av_int2float(0x7fc00000) #endif diff --git a/src/third_party/ffmpeg/libavutil/riscv/bswap.h b/src/third_party/ffmpeg/libavutil/riscv/bswap.h index de1429c0..ce75de97 100644 --- a/src/third_party/ffmpeg/libavutil/riscv/bswap.h +++ b/src/third_party/ffmpeg/libavutil/riscv/bswap.h @@ -23,52 +23,10 @@ #include "config.h" #include "libavutil/attributes.h" -#if defined (__riscv_zbb) && (__riscv_zbb > 0) && HAVE_INLINE_ASM +#if defined (__GNUC__) || defined (__clang__) +#define av_bswap16 __builtin_bswap16 +#define av_bswap32 __builtin_bswap32 +#define av_bswap64 __builtin_bswap64 +#endif -static av_always_inline av_const uintptr_t av_bswap_xlen(uintptr_t x) -{ - uintptr_t y; - - __asm__("rev8 %0, %1" : "=r" (y) : "r" (x)); - return y; -} - -#define av_bswap16 av_bswap16 - -static av_always_inline av_const uint_fast16_t av_bswap16(uint_fast16_t x) -{ - return av_bswap_xlen(x) >> (__riscv_xlen - 16); -} - -#if (__riscv_xlen == 32) -#define av_bswap32 av_bswap_xlen -#define av_bswap64 av_bswap64 - -static av_always_inline av_const uint64_t av_bswap64(uint64_t x) -{ - return (((uint64_t)av_bswap32(x)) << 32) | av_bswap32(x >> 32); -} - -#else -#define av_bswap32 av_bswap32 - -static av_always_inline av_const uint_fast32_t av_bswap32(uint_fast32_t x) -{ - return av_bswap_xlen(x) >> (__riscv_xlen - 32); -} - -#if (__riscv_xlen == 64) -#define av_bswap64 av_bswap_xlen - -#else -#define av_bswap64 av_bswap64 - -static av_always_inline av_const uint_fast64_t av_bswap64(uint_fast64_t x) -{ - return av_bswap_xlen(x) >> (__riscv_xlen - 64); -} - -#endif /* __riscv_xlen > 64 */ -#endif /* __riscv_xlen > 32 */ -#endif /* __riscv_zbb */ #endif /* AVUTIL_RISCV_BSWAP_H */ diff --git a/src/third_party/ffmpeg/libavutil/riscv/intmath.h b/src/third_party/ffmpeg/libavutil/riscv/intmath.h index 45bce9a0..ae9ee777 100644 --- a/src/third_party/ffmpeg/libavutil/riscv/intmath.h +++ b/src/third_party/ffmpeg/libavutil/riscv/intmath.h @@ -69,35 +69,13 @@ static av_always_inline av_const int av_clip_intp2_rvi(int a, int p) return b; } -#if defined (__riscv_zbb) && (__riscv_zbb > 0) && HAVE_INLINE_ASM - -#define av_popcount av_popcount_rvb -static av_always_inline av_const int av_popcount_rvb(uint32_t x) -{ - int ret; - +#if defined (__GNUC__) || defined (__clang__) +#define av_popcount __builtin_popcount #if (__riscv_xlen >= 64) - __asm__ ("cpopw %0, %1\n" : "=r" (ret) : "r" (x)); +#define av_popcount64 __builtin_popcountl #else - __asm__ ("cpop %0, %1\n" : "=r" (ret) : "r" (x)); +#define av_popcount64 __builtin_popcountll #endif - return ret; -} - -#if (__riscv_xlen >= 64) -#define av_popcount64 av_popcount64_rvb -static av_always_inline av_const int av_popcount64_rvb(uint64_t x) -{ - int ret; - -#if (__riscv_xlen >= 128) - __asm__ ("cpopd %0, %1\n" : "=r" (ret) : "r" (x)); -#else - __asm__ ("cpop %0, %1\n" : "=r" (ret) : "r" (x)); #endif - return ret; -} -#endif /* __riscv_xlen >= 64 */ -#endif /* __riscv_zbb */ #endif /* AVUTIL_RISCV_INTMATH_H */ diff --git a/src/third_party/ffmpeg/libavutil/tests/hwdevice.c b/src/third_party/ffmpeg/libavutil/tests/hwdevice.c index 7eb355c9..c5758661 100644 --- a/src/third_party/ffmpeg/libavutil/tests/hwdevice.c +++ b/src/third_party/ffmpeg/libavutil/tests/hwdevice.c @@ -140,7 +140,7 @@ static const struct { { AV_HWDEVICE_TYPE_OPENCL, { "0.0", "0.1", "1.0", "1.1" } }, { AV_HWDEVICE_TYPE_VAAPI, - { "/dev/dri/renderD128", "/dev/dri/renderD129", ":0" } }, + { "/dev/dri/renderD128", "/dev/dri/renderD129", ":0", "0", "1" } }, }; static int test_device_type(enum AVHWDeviceType type) diff --git a/src/third_party/ffmpeg/libavutil/tx_priv.h b/src/third_party/ffmpeg/libavutil/tx_priv.h index 72f336ee..d5ff8e14 100644 --- a/src/third_party/ffmpeg/libavutil/tx_priv.h +++ b/src/third_party/ffmpeg/libavutil/tx_priv.h @@ -102,6 +102,12 @@ typedef void TXComplex; #define FOLD(a, b) ((a) + (b)) +#define BF(x, y, a, b) \ + do { \ + x = (a) - (b); \ + y = (a) + (b); \ + } while (0) + #elif defined(TX_INT32) /* Properly rounds the result */ @@ -132,14 +138,14 @@ typedef void TXComplex; #define FOLD(x, y) ((int32_t)((x) + (unsigned)(y) + 32) >> 6) -#endif /* TX_INT32 */ - #define BF(x, y, a, b) \ do { \ - x = (a) - (b); \ - y = (a) + (b); \ + x = (a) - (unsigned)(b); \ + y = (a) + (unsigned)(b); \ } while (0) +#endif /* TX_INT32 */ + #define CMUL3(c, a, b) CMUL((c).re, (c).im, (a).re, (a).im, (b).re, (b).im) /* Codelet flags, used to pick codelets. Must be a superset of enum AVTXFlags, diff --git a/src/third_party/ffmpeg/libavutil/version.h b/src/third_party/ffmpeg/libavutil/version.h index a232381b..8c7ea1a4 100644 --- a/src/third_party/ffmpeg/libavutil/version.h +++ b/src/third_party/ffmpeg/libavutil/version.h @@ -79,7 +79,7 @@ */ #define LIBAVUTIL_VERSION_MAJOR 58 -#define LIBAVUTIL_VERSION_MINOR 5 +#define LIBAVUTIL_VERSION_MINOR 9 #define LIBAVUTIL_VERSION_MICRO 100 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ @@ -115,6 +115,9 @@ #define FF_API_FRAME_PICTURE_NUMBER (LIBAVUTIL_VERSION_MAJOR < 59) #define FF_API_HDR_VIVID_THREE_SPLINE (LIBAVUTIL_VERSION_MAJOR < 59) #define FF_API_FRAME_PKT (LIBAVUTIL_VERSION_MAJOR < 59) +#define FF_API_INTERLACED_FRAME (LIBAVUTIL_VERSION_MAJOR < 59) +#define FF_API_FRAME_KEY (LIBAVUTIL_VERSION_MAJOR < 59) +#define FF_API_PALETTE_HAS_CHANGED (LIBAVUTIL_VERSION_MAJOR < 59) /** * @} diff --git a/src/third_party/ffmpeg/libavutil/wchar_filename.h b/src/third_party/ffmpeg/libavutil/wchar_filename.h index 9a04a069..fbc0a551 100644 --- a/src/third_party/ffmpeg/libavutil/wchar_filename.h +++ b/src/third_party/ffmpeg/libavutil/wchar_filename.h @@ -32,7 +32,8 @@ static inline int utf8towchar(const char *filename_utf8, wchar_t **filename_w) num_chars = MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, filename_utf8, -1, NULL, 0); if (num_chars <= 0) { *filename_w = NULL; - return 0; + errno = EINVAL; + return -1; } *filename_w = (wchar_t *)av_calloc(num_chars, sizeof(wchar_t)); if (!*filename_w) { @@ -52,7 +53,8 @@ static inline int wchartocp(unsigned int code_page, const wchar_t *filename_w, NULL, 0, NULL, NULL); if (num_chars <= 0) { *filename = NULL; - return 0; + errno = EINVAL; + return -1; } *filename = (char*)av_malloc_array(num_chars, sizeof *filename); if (!*filename) {