Re: [FFmpeg-devel] [PATCH 3/5] avcodec/magicyuvenc: Don't modify input frame
lgtm ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 1/5] avcodec/magicyuvenc: Avoid unnecessary av_frame_clone()
lgtm ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 2/5] avcodec/magicyuvenc: Add const where appropriate
lgtm ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 1/6] avutil/cpu: add AVX512 Icelake flag
From: Wu Jianhua Signed-off-by: Wu Jianhua --- configure | 13 +++--- libavutil/cpu.c | 1 + libavutil/cpu.h | 1 + libavutil/x86/cpu.c | 8 -- libavutil/x86/cpu.h | 1 + libavutil/x86/x86inc.asm | 53 --- tests/checkasm/checkasm.c | 35 +- 7 files changed, 63 insertions(+), 49 deletions(-) diff --git a/configure b/configure index 1535dc3c5b..d88c2ae979 100755 --- a/configure +++ b/configure @@ -444,6 +444,7 @@ Optimization options (experts only): --disable-fma4 disable FMA4 optimizations --disable-avx2 disable AVX2 optimizations --disable-avx512 disable AVX-512 optimizations + --disable-avx512icl disable AVX-512ICL optimizations --disable-aesni disable AESNI optimizations --disable-armv5tedisable armv5te optimizations --disable-armv6 disable armv6 optimizations @@ -2098,6 +2099,7 @@ ARCH_EXT_LIST_X86_SIMD=" avx avx2 avx512 +avx512icl fma3 fma4 mmx @@ -2666,6 +2668,7 @@ fma3_deps="avx" fma4_deps="avx" avx2_deps="avx" avx512_deps="avx2" +avx512icl_deps="avx512" mmx_external_deps="x86asm" mmx_inline_deps="inline_asm x86" @@ -6128,10 +6131,11 @@ EOF elf*) enabled debug && append X86ASMFLAGS $x86asm_debug ;; esac -enabled avx512 && check_x86asm avx512_external "vmovdqa32 [eax]{k1}{z}, zmm0" -enabled avx2 && check_x86asm avx2_external "vextracti128 xmm0, ymm0, 0" -enabled xop&& check_x86asm xop_external"vpmacsdd xmm0, xmm1, xmm2, xmm3" -enabled fma4 && check_x86asm fma4_external "vfmaddps ymm0, ymm1, ymm2, ymm3" +enabled avx512&& check_x86asm avx512_external"vmovdqa32 [eax]{k1}{z}, zmm0" +enabled avx512icl && check_x86asm avx512icl_external "vpdpwssds zmm31{k1}{z}, zmm29, zmm28" +enabled avx2 && check_x86asm avx2_external "vextracti128 xmm0, ymm0, 0" +enabled xop && check_x86asm xop_external "vpmacsdd xmm0, xmm1, xmm2, xmm3" +enabled fma4 && check_x86asm fma4_external "vfmaddps ymm0, ymm1, ymm2, ymm3" check_x86asm cpunop "CPU amdnop" fi @@ -7471,6 +7475,7 @@ if enabled x86; then echo "AVX enabled ${avx-no}" echo "AVX2 enabled ${avx2-no}" echo "AVX-512 enabled ${avx512-no}" +echo "AVX-512ICL enabled${avx512icl-no}" echo "XOP enabled ${xop-no}" echo "FMA3 enabled ${fma3-no}" echo "FMA4 enabled ${fma4-no}" diff --git a/libavutil/cpu.c b/libavutil/cpu.c index 1368502245..833c220192 100644 --- a/libavutil/cpu.c +++ b/libavutil/cpu.c @@ -137,6 +137,7 @@ int av_parse_cpu_caps(unsigned *flags, const char *s) { "cmov", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_CMOV },.unit = "flags" }, { "aesni",NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_AESNI },.unit = "flags" }, { "avx512" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_AVX512 },.unit = "flags" }, +{ "avx512icl", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_AVX512ICL }, .unit = "flags" }, { "slowgather", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_SLOW_GATHER }, .unit = "flags" }, #define CPU_FLAG_P2 AV_CPU_FLAG_CMOV | AV_CPU_FLAG_MMX diff --git a/libavutil/cpu.h b/libavutil/cpu.h index ce9bf14bf7..9711e574c5 100644 --- a/libavutil/cpu.h +++ b/libavutil/cpu.h @@ -54,6 +54,7 @@ #define AV_CPU_FLAG_BMI10x2 ///< Bit Manipulation Instruction Set 1 #define AV_CPU_FLAG_BMI20x4 ///< Bit Manipulation Instruction Set 2 #define AV_CPU_FLAG_AVX512 0x10 ///< AVX-512 functions: requires OS support even if YMM/ZMM registers aren't used +#define AV_CPU_FLAG_AVX512ICL 0x20 ///< F/CD/BW/DQ/VL/VNNI/IFMA/VBMI/VBMI2/VPOPCNTDQ/BITALG/GFNI/VAES/VPCLMULQDQ #define AV_CPU_FLAG_SLOW_GATHER 0x200 ///< CPU has slow gathers. #define AV_CPU_FLAG_ALTIVEC 0x0001 ///< standard diff --git a/libavutil/x86/cpu.c b/libavutil/x86/cpu.c index 7b13fcae91..d6cd4fab9c 100644 --- a/libavutil/x86/cpu.c +++ b/libavutil/x86/cpu.c @@ -150,9 +150,13 @@ int ff_get_cpu_flags_x86(void) rval |= AV_CPU_FLAG_AVX2; #if HAVE_AVX512 /* F, CD, BW, DQ, VL */ if ((xcr0_lo & 0xe0) == 0xe0) { /* OPMASK/ZMM state */ -if ((rval & AV_CPU_FLAG_AVX2) && (ebx & 0xd003) == 0xd003) +if ((rval & AV_CPU_FLAG_AVX2) && (ebx & 0xd003) == 0xd003) { rval |= AV_CPU_FLAG_AVX512; - +#if HAVE_AVX512ICL +if ((ebx & 0xd020) == 0xd020 && (ecx & 0x5f42) == 0x5f42) +rval |= AV_CPU_FLAG_AVX512ICL; +#endif /* HAVE_AVX512ICL */ +} } #endif /* HAVE_AVX512 */ #endif /* HAVE_AVX2 */ diff --git a/libavutil/x86
[FFmpeg-devel] [PATCH 2/6] avcodec/x86/hevc_mc: add qpel_h8_8_avx512icl and qpel_hv8_8_avx512icl
From: Wu Jianhua This commit uses the instruction `vpdpbusd` introduced by AVX512 VNNI to calculate the horizontal filter. ff_hevc_put_hevc_qpel_h8_8_sse4 1039169 ff_hevc_put_hevc_qpel_h8_8_avx512icl 677153 ff_hevc_put_hevc_qpel_hv8_8_sse4 3603511 ff_hevc_put_hevc_qpel_hv8_8_avx512icl 2995354 Signed-off-by: Wu Jianhua --- libavcodec/x86/hevc_mc.asm| 139 ++ libavcodec/x86/hevcdsp.h | 3 + libavcodec/x86/hevcdsp_init.c | 4 + 3 files changed, 146 insertions(+) diff --git a/libavcodec/x86/hevc_mc.asm b/libavcodec/x86/hevc_mc.asm index ff6ed0711a..026b6b48ee 100644 --- a/libavcodec/x86/hevc_mc.asm +++ b/libavcodec/x86/hevc_mc.asm @@ -87,6 +87,26 @@ QPEL_TABLE 12, 4, w, sse4 QPEL_TABLE 8,16, b, avx2 QPEL_TABLE 10, 8, w, avx2 +QPEL_TABLE 8, 1, b, avx512icl_h +QPEL_TABLE 8, 1, d, avx512icl_v + +pb_qpel_shuffle_index: db 0, 1, 2, 3 + db 1, 2, 3, 4 + db 2, 3, 4, 5 + db 3, 4, 5, 6 + db 4, 5, 6, 7 + db 5, 6, 7, 8 + db 6, 7, 8, 9 + db 7, 8, 9, 10 + db 4, 5, 6, 7 + db 5, 6, 7, 8 + db 6, 7, 8, 9 + db 7, 8, 9, 10 + db 8, 9, 10, 11 + db 9, 10, 11, 12 + db 10, 11, 12, 13 + db 11, 12, 13, 14 + SECTION .text %define MAX_PB_SIZE 64 @@ -1670,3 +1690,122 @@ HEVC_PUT_HEVC_QPEL_HV 16, 10 %endif ;AVX2 %endif ; ARCH_X86_64 + +%macro QPEL_FILTER_H 5 +%define %%table hevc_qpel_filters_avx512icl_h_%1 +%assign %%offset 4 +dec %2q +shl %2q, 3 +%ifdef PIC +lea %5q, [%%table] +%define FILTER %5q +%else +%define FILTER %%table +%endif +vpbroadcastd m%3, [FILTER + %2q + 0*%%offset] +vpbroadcastd m%4, [FILTER + %2q + 1*%%offset] +%endmacro + +%macro QPEL_FILTER_V 5 +vpbroadcastd m%3, [%5 + %2q + 4*%4] +%endmacro + +%macro QPEL_LOAD_SHUF 2 +movu m%1, [pb_qpel_shuffle_index + 0] +movu m%2, [pb_qpel_shuffle_index + 32] +%endmacro + +; required: m0-m5 +; %1: dst register index +; %2: name for src +%macro QPEL_H_LOAD_COMPUTE 2 +pxorm%1, m%1 +movuxm4, [%2q - 3] +vpermb m5, m2, m4 +vpermb m4, m3, m4 +vpdpbusdm%1, m5, m0 +vpdpbusdm%1, m4, m1 +%endmacro + +%macro HEVC_PUT_HEVC_QPEL_AVX512ICL 2 +cglobal hevc_put_hevc_qpel_h%1_%2, 5, 6, 8, dst, src, srcstride, height, mx, tmp +QPEL_FILTER_H %1, mx, 0, 1, tmp +QPEL_LOAD_SHUF 2, 3 +.loop: +QPEL_H_LOAD_COMPUTE 6, src +vpmovdw xm6, m6 +movu [dstq], xm6 +LOOP_ENDdst, src, srcstride +RET +%endmacro + +%macro HEVC_PUT_HEVC_QPEL_HV_AVX512ICL 2 +cglobal hevc_put_hevc_qpel_hv%1_%2, 6, 7, 8, dst, src, srcstride, height, mx, my, tmp +%assign %%shift 6 +%assign %%extra 7 +QPEL_FILTER_H%1, mx, 0, 1, tmp +QPEL_LOAD_SHUF2, 3 +leatmpq, [srcstrideq*3] +subsrcq, tmpq +sub myq, 1 +shl myq, 5 +%ifdef PIC +%define %%table hevc_qpel_filters_avx512icl_v_%1 +lea tmpq, [%%table] +%define FILTER tmpq +%else +%define FILTER %%table +%endif +%assign %%i 6 +%assign %%j 0 +%rep %1 +QPEL_FILTER_V %1, my, %%i, %%j, FILTER +%assign %%i %%i+1 +%assign %%j %%j+1 +%endrep +%rep %%extra +QPEL_H_LOAD_COMPUTE %%i, src +add srcq, srcstrideq +%assign %%i %%i+1 +%endrep +.loop: +QPEL_H_LOAD_COMPUTE %%i, src +vpmulld m22, m14, m6 +vpmulld m23, m15, m7 +vpmulld m24, m16, m8 +vpmulld m25, m17, m9 +vpadddm26, m22, m23 +vpadddm24, m25 +vpadddm26, m24 +vpmulld m22, m18, m10 +vpmulld m23, m19, m11 +vpmulld m24, m20, m12 +vpmulld m25, m21, m13 +vpadddm22, m22, m23 +vpadddm24, m25 +vpadddm26, m24 +vpadddm22, m26 +mova m14, m15 +mova m15, m16 +mova m16, m17 +mova m17, m18 +mova m18, m19 +mova m19, m20 +mova m20, m21 +vpsradm22, %%shift +vpmovdw xm22, m22 +movu [dstq], xm22 +LOOP_END dst, src, srcstride + +RET +%endmacro + +%if ARCH_X86_64 +%if HAVE_AVX512ICL_EXTERNAL + +INIT_YMM avx512icl +HEVC_PUT_HEVC_QPEL_AVX512ICL 8, 8 +HEVC_PUT_HEVC_QPEL_HV_AVX512ICL 8, 8 + +%endif +%endif diff --git a/libavcodec/x86/hevcdsp.h b/libavcodec/x86/hevcdsp.h index 67be0a9059..5a495d2563 100644 --- a/libavcodec/x86/hevcdsp.h +++ b/libavcodec/x86/hevcdsp.h @@ -233,6 +233,9 @@ WEIGHTING_PROTOTYPES(8, sse4); WEIGHTING_P
[FFmpeg-devel] [PATCH 3/6] avcodec/x86/hevc_mc: add qpel_h16_8_avx512icl
From: Wu Jianhua ff_hevc_put_hevc_qpel_h16_8_sse4 3290870 ff_hevc_put_hevc_qpel_h16_8_avx512icl 1730033 Signed-off-by: Wu Jianhua --- libavcodec/x86/hevc_mc.asm| 39 ++- libavcodec/x86/hevcdsp.h | 1 + libavcodec/x86/hevcdsp_init.c | 1 + 3 files changed, 36 insertions(+), 5 deletions(-) diff --git a/libavcodec/x86/hevc_mc.asm b/libavcodec/x86/hevc_mc.asm index 026b6b48ee..8c128f5202 100644 --- a/libavcodec/x86/hevc_mc.asm +++ b/libavcodec/x86/hevc_mc.asm @@ -89,6 +89,7 @@ QPEL_TABLE 10, 8, w, avx2 QPEL_TABLE 8, 1, b, avx512icl_h QPEL_TABLE 8, 1, d, avx512icl_v +QPEL_TABLE 16, 1, b, avx512icl_h pb_qpel_shuffle_index: db 0, 1, 2, 3 db 1, 2, 3, 4 @@ -98,6 +99,14 @@ pb_qpel_shuffle_index: db 0, 1, 2, 3 db 5, 6, 7, 8 db 6, 7, 8, 9 db 7, 8, 9, 10 + db 8, 9, 10, 11 + db 9, 10, 11, 12 + db 10, 11, 12, 13 + db 11, 12, 13, 14 + db 12, 13, 14, 15 + db 13, 14, 15, 16 + db 14, 15, 16, 17 + db 15, 16, 17, 18 db 4, 5, 6, 7 db 5, 6, 7, 8 db 6, 7, 8, 9 @@ -106,6 +115,14 @@ pb_qpel_shuffle_index: db 0, 1, 2, 3 db 9, 10, 11, 12 db 10, 11, 12, 13 db 11, 12, 13, 14 + db 12, 13, 14, 15 + db 13, 14, 15, 16 + db 14, 15, 16, 17 + db 15, 16, 17, 18 + db 16, 17, 18, 19 + db 17, 18, 19, 20 + db 18, 19, 20, 21 + db 19, 20, 21, 22 SECTION .text @@ -1712,7 +1729,7 @@ HEVC_PUT_HEVC_QPEL_HV 16, 10 %macro QPEL_LOAD_SHUF 2 movu m%1, [pb_qpel_shuffle_index + 0] -movu m%2, [pb_qpel_shuffle_index + 32] +movu m%2, [pb_qpel_shuffle_index + 64] %endmacro ; required: m0-m5 @@ -1720,7 +1737,11 @@ HEVC_PUT_HEVC_QPEL_HV 16, 10 ; %2: name for src %macro QPEL_H_LOAD_COMPUTE 2 pxorm%1, m%1 -movuxm4, [%2q - 3] +%if mmsize == 64 +movuym4, [%2] +%else +movuxm4, [%2] +%endif vpermb m5, m2, m4 vpermb m4, m3, m4 vpdpbusdm%1, m5, m0 @@ -1732,9 +1753,14 @@ cglobal hevc_put_hevc_qpel_h%1_%2, 5, 6, 8, dst, src, srcstride, height, mx, tmp QPEL_FILTER_H %1, mx, 0, 1, tmp QPEL_LOAD_SHUF 2, 3 .loop: -QPEL_H_LOAD_COMPUTE 6, src +QPEL_H_LOAD_COMPUTE 6, srcq - 3 +%if %1 == 8 vpmovdw xm6, m6 movu [dstq], xm6 +%else +vpmovdw ym6, m6 +movu [dstq], ym6 +%endif LOOP_ENDdst, src, srcstride RET %endmacro @@ -1764,12 +1790,12 @@ cglobal hevc_put_hevc_qpel_hv%1_%2, 6, 7, 8, dst, src, srcstride, height, mx, my %assign %%j %%j+1 %endrep %rep %%extra -QPEL_H_LOAD_COMPUTE %%i, src +QPEL_H_LOAD_COMPUTE %%i, srcq - 3 add srcq, srcstrideq %assign %%i %%i+1 %endrep .loop: -QPEL_H_LOAD_COMPUTE %%i, src +QPEL_H_LOAD_COMPUTE %%i, srcq - 3 vpmulld m22, m14, m6 vpmulld m23, m15, m7 vpmulld m24, m16, m8 @@ -1807,5 +1833,8 @@ INIT_YMM avx512icl HEVC_PUT_HEVC_QPEL_AVX512ICL 8, 8 HEVC_PUT_HEVC_QPEL_HV_AVX512ICL 8, 8 +INIT_ZMM avx512icl +HEVC_PUT_HEVC_QPEL_AVX512ICL 16, 8 + %endif %endif diff --git a/libavcodec/x86/hevcdsp.h b/libavcodec/x86/hevcdsp.h index 5a495d2563..6e3fc01ad0 100644 --- a/libavcodec/x86/hevcdsp.h +++ b/libavcodec/x86/hevcdsp.h @@ -234,6 +234,7 @@ WEIGHTING_PROTOTYPES(10, sse4); WEIGHTING_PROTOTYPES(12, sse4); void ff_hevc_put_hevc_qpel_h8_8_avx512icl(int16_t *dst, uint8_t *_src, ptrdiff_t _srcstride, int height, intptr_t mx, intptr_t my, int width); +void ff_hevc_put_hevc_qpel_h16_8_avx512icl(int16_t *dst, uint8_t *_src, ptrdiff_t _srcstride, int height, intptr_t mx, intptr_t my, int width); void ff_hevc_put_hevc_qpel_hv8_8_avx512icl(int16_t *dst, uint8_t *_src, ptrdiff_t _srcstride, int height, intptr_t mx, intptr_t my, int width); /// diff --git a/libavcodec/x86/hevcdsp_init.c b/libavcodec/x86/hevcdsp_init.c index 0341835944..4023faa654 100644 --- a/libavcodec/x86/hevcdsp_init.c +++ b/libavcodec/x86/hevcdsp_init.c @@ -880,6 +880,7 @@ void ff_hevc_dsp_init_x86(HEVCDSPContext *c, const int bit_depth) } if (EXTERNAL_AVX512ICL(cpu_flags)) { c->put_hevc_qpel[3][0][1] = ff_hevc_put_hevc_qpel_h8_8_avx512icl; +c->put_hevc_qpel[5][0][1] = ff_hevc_put_hevc_qpel_h16_8_avx512icl; c->put_hevc_qpel[3][1][1] = ff_hevc_put_hevc_qpe
[FFmpeg-devel] [PATCH 4/6] avcodec/x86/hevc_mc: add qpel_h4_8_avx512icl
From: Wu Jianhua ff_hevc_put_hevc_qpel_h4_8_sse4 993694 ff_hevc_put_hevc_qpel_h4_8_avx512icl 686647 Signed-off-by: Wu Jianhua --- libavcodec/x86/hevc_mc.asm| 12 ++-- libavcodec/x86/hevcdsp.h | 1 + libavcodec/x86/hevcdsp_init.c | 1 + 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/libavcodec/x86/hevc_mc.asm b/libavcodec/x86/hevc_mc.asm index 8c128f5202..25880b8858 100644 --- a/libavcodec/x86/hevc_mc.asm +++ b/libavcodec/x86/hevc_mc.asm @@ -87,6 +87,7 @@ QPEL_TABLE 12, 4, w, sse4 QPEL_TABLE 8,16, b, avx2 QPEL_TABLE 10, 8, w, avx2 +QPEL_TABLE 4, 1, b, avx512icl_h QPEL_TABLE 8, 1, b, avx512icl_h QPEL_TABLE 8, 1, d, avx512icl_v QPEL_TABLE 16, 1, b, avx512icl_h @@ -1734,7 +1735,7 @@ HEVC_PUT_HEVC_QPEL_HV 16, 10 ; required: m0-m5 ; %1: dst register index -; %2: name for src +; %2: src %macro QPEL_H_LOAD_COMPUTE 2 pxorm%1, m%1 %if mmsize == 64 @@ -1754,9 +1755,13 @@ cglobal hevc_put_hevc_qpel_h%1_%2, 5, 6, 8, dst, src, srcstride, height, mx, tmp QPEL_LOAD_SHUF 2, 3 .loop: QPEL_H_LOAD_COMPUTE 6, srcq - 3 -%if %1 == 8 +%if %1 < 16 vpmovdw xm6, m6 +%if %1 == 4 +movq [dstq], xm6 +%else movu [dstq], xm6 +%endif %else vpmovdw ym6, m6 movu [dstq], ym6 @@ -1829,6 +1834,9 @@ cglobal hevc_put_hevc_qpel_hv%1_%2, 6, 7, 8, dst, src, srcstride, height, mx, my %if ARCH_X86_64 %if HAVE_AVX512ICL_EXTERNAL +INIT_XMM avx512icl +HEVC_PUT_HEVC_QPEL_AVX512ICL 4, 8 + INIT_YMM avx512icl HEVC_PUT_HEVC_QPEL_AVX512ICL 8, 8 HEVC_PUT_HEVC_QPEL_HV_AVX512ICL 8, 8 diff --git a/libavcodec/x86/hevcdsp.h b/libavcodec/x86/hevcdsp.h index 6e3fc01ad0..51ffdc9628 100644 --- a/libavcodec/x86/hevcdsp.h +++ b/libavcodec/x86/hevcdsp.h @@ -233,6 +233,7 @@ WEIGHTING_PROTOTYPES(8, sse4); WEIGHTING_PROTOTYPES(10, sse4); WEIGHTING_PROTOTYPES(12, sse4); +void ff_hevc_put_hevc_qpel_h4_8_avx512icl(int16_t *dst, uint8_t *_src, ptrdiff_t _srcstride, int height, intptr_t mx, intptr_t my, int width); void ff_hevc_put_hevc_qpel_h8_8_avx512icl(int16_t *dst, uint8_t *_src, ptrdiff_t _srcstride, int height, intptr_t mx, intptr_t my, int width); void ff_hevc_put_hevc_qpel_h16_8_avx512icl(int16_t *dst, uint8_t *_src, ptrdiff_t _srcstride, int height, intptr_t mx, intptr_t my, int width); void ff_hevc_put_hevc_qpel_hv8_8_avx512icl(int16_t *dst, uint8_t *_src, ptrdiff_t _srcstride, int height, intptr_t mx, intptr_t my, int width); diff --git a/libavcodec/x86/hevcdsp_init.c b/libavcodec/x86/hevcdsp_init.c index 4023faa654..be1484d06e 100644 --- a/libavcodec/x86/hevcdsp_init.c +++ b/libavcodec/x86/hevcdsp_init.c @@ -879,6 +879,7 @@ void ff_hevc_dsp_init_x86(HEVCDSPContext *c, const int bit_depth) c->add_residual[3] = ff_hevc_add_residual_32_8_avx2; } if (EXTERNAL_AVX512ICL(cpu_flags)) { +c->put_hevc_qpel[1][0][1] = ff_hevc_put_hevc_qpel_h4_8_avx512icl; c->put_hevc_qpel[3][0][1] = ff_hevc_put_hevc_qpel_h8_8_avx512icl; c->put_hevc_qpel[5][0][1] = ff_hevc_put_hevc_qpel_h16_8_avx512icl; c->put_hevc_qpel[3][1][1] = ff_hevc_put_hevc_qpel_hv8_8_avx512icl; -- 2.17.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 5/6] avcodec/x86/hevc_mc: add qpel_h32_8_avx512icl
From: Wu Jianhua ff_hevc_put_hevc_qpel_h32_8_sse4 14122151 ff_hevc_put_hevc_qpel_h32_8_avx29337675 ff_hevc_put_hevc_qpel_h32_8_avx512icl 6424654 Signed-off-by: Wu Jianhua --- libavcodec/x86/hevc_mc.asm| 7 +++ libavcodec/x86/hevcdsp.h | 1 + libavcodec/x86/hevcdsp_init.c | 1 + 3 files changed, 9 insertions(+) diff --git a/libavcodec/x86/hevc_mc.asm b/libavcodec/x86/hevc_mc.asm index 25880b8858..4cf5dcd338 100644 --- a/libavcodec/x86/hevc_mc.asm +++ b/libavcodec/x86/hevc_mc.asm @@ -91,6 +91,7 @@ QPEL_TABLE 4, 1, b, avx512icl_h QPEL_TABLE 8, 1, b, avx512icl_h QPEL_TABLE 8, 1, d, avx512icl_v QPEL_TABLE 16, 1, b, avx512icl_h +QPEL_TABLE 32, 1, b, avx512icl_h pb_qpel_shuffle_index: db 0, 1, 2, 3 db 1, 2, 3, 4 @@ -1765,6 +1766,11 @@ cglobal hevc_put_hevc_qpel_h%1_%2, 5, 6, 8, dst, src, srcstride, height, mx, tmp %else vpmovdw ym6, m6 movu [dstq], ym6 +%endif +%if %1 == 32 +QPEL_H_LOAD_COMPUTE 7, srcq + 16 - 3 +vpmovdw ym7, m7 +movu[dstq + 32], ym7 %endif LOOP_ENDdst, src, srcstride RET @@ -1843,6 +1849,7 @@ HEVC_PUT_HEVC_QPEL_HV_AVX512ICL 8, 8 INIT_ZMM avx512icl HEVC_PUT_HEVC_QPEL_AVX512ICL 16, 8 +HEVC_PUT_HEVC_QPEL_AVX512ICL 32, 8 %endif %endif diff --git a/libavcodec/x86/hevcdsp.h b/libavcodec/x86/hevcdsp.h index 51ffdc9628..8d3c3cc75f 100644 --- a/libavcodec/x86/hevcdsp.h +++ b/libavcodec/x86/hevcdsp.h @@ -236,6 +236,7 @@ WEIGHTING_PROTOTYPES(12, sse4); void ff_hevc_put_hevc_qpel_h4_8_avx512icl(int16_t *dst, uint8_t *_src, ptrdiff_t _srcstride, int height, intptr_t mx, intptr_t my, int width); void ff_hevc_put_hevc_qpel_h8_8_avx512icl(int16_t *dst, uint8_t *_src, ptrdiff_t _srcstride, int height, intptr_t mx, intptr_t my, int width); void ff_hevc_put_hevc_qpel_h16_8_avx512icl(int16_t *dst, uint8_t *_src, ptrdiff_t _srcstride, int height, intptr_t mx, intptr_t my, int width); +void ff_hevc_put_hevc_qpel_h32_8_avx512icl(int16_t *dst, uint8_t *_src, ptrdiff_t _srcstride, int height, intptr_t mx, intptr_t my, int width); void ff_hevc_put_hevc_qpel_hv8_8_avx512icl(int16_t *dst, uint8_t *_src, ptrdiff_t _srcstride, int height, intptr_t mx, intptr_t my, int width); /// diff --git a/libavcodec/x86/hevcdsp_init.c b/libavcodec/x86/hevcdsp_init.c index be1484d06e..e9002c8b15 100644 --- a/libavcodec/x86/hevcdsp_init.c +++ b/libavcodec/x86/hevcdsp_init.c @@ -882,6 +882,7 @@ void ff_hevc_dsp_init_x86(HEVCDSPContext *c, const int bit_depth) c->put_hevc_qpel[1][0][1] = ff_hevc_put_hevc_qpel_h4_8_avx512icl; c->put_hevc_qpel[3][0][1] = ff_hevc_put_hevc_qpel_h8_8_avx512icl; c->put_hevc_qpel[5][0][1] = ff_hevc_put_hevc_qpel_h16_8_avx512icl; +c->put_hevc_qpel[7][0][1] = ff_hevc_put_hevc_qpel_h32_8_avx512icl; c->put_hevc_qpel[3][1][1] = ff_hevc_put_hevc_qpel_hv8_8_avx512icl; } } else if (bit_depth == 10) { -- 2.17.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 6/6] avcodec/x86/hevc_mc: add qpel_h64_8_avx512icl
From: Wu Jianhua ff_hevc_put_hevc_qpel_h64_8_sse4 56782981 ff_hevc_put_hevc_qpel_h64_8_avx2 40097816 ff_hevc_put_hevc_qpel_h64_8_avx512icl 25488576 Signed-off-by: Wu Jianhua --- libavcodec/x86/hevc_mc.asm| 12 +++- libavcodec/x86/hevcdsp.h | 1 + libavcodec/x86/hevcdsp_init.c | 1 + 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/libavcodec/x86/hevc_mc.asm b/libavcodec/x86/hevc_mc.asm index 4cf5dcd338..37264962af 100644 --- a/libavcodec/x86/hevc_mc.asm +++ b/libavcodec/x86/hevc_mc.asm @@ -92,6 +92,7 @@ QPEL_TABLE 8, 1, b, avx512icl_h QPEL_TABLE 8, 1, d, avx512icl_v QPEL_TABLE 16, 1, b, avx512icl_h QPEL_TABLE 32, 1, b, avx512icl_h +QPEL_TABLE 64, 1, b, avx512icl_h pb_qpel_shuffle_index: db 0, 1, 2, 3 db 1, 2, 3, 4 @@ -1767,10 +1768,18 @@ cglobal hevc_put_hevc_qpel_h%1_%2, 5, 6, 8, dst, src, srcstride, height, mx, tmp vpmovdw ym6, m6 movu [dstq], ym6 %endif -%if %1 == 32 +%if %1 > 16 QPEL_H_LOAD_COMPUTE 7, srcq + 16 - 3 vpmovdw ym7, m7 movu[dstq + 32], ym7 +%endif +%if %1 > 32 +QPEL_H_LOAD_COMPUTE 6, srcq + 32 - 3 +QPEL_H_LOAD_COMPUTE 7, srcq + 48 - 3 +vpmovdw ym6, m6 +vpmovdw ym7, m7 +movu[dstq + 64], ym6 +movu[dstq + 96], ym7 %endif LOOP_ENDdst, src, srcstride RET @@ -1850,6 +1859,7 @@ HEVC_PUT_HEVC_QPEL_HV_AVX512ICL 8, 8 INIT_ZMM avx512icl HEVC_PUT_HEVC_QPEL_AVX512ICL 16, 8 HEVC_PUT_HEVC_QPEL_AVX512ICL 32, 8 +HEVC_PUT_HEVC_QPEL_AVX512ICL 64, 8 %endif %endif diff --git a/libavcodec/x86/hevcdsp.h b/libavcodec/x86/hevcdsp.h index 8d3c3cc75f..24e35bc032 100644 --- a/libavcodec/x86/hevcdsp.h +++ b/libavcodec/x86/hevcdsp.h @@ -237,6 +237,7 @@ void ff_hevc_put_hevc_qpel_h4_8_avx512icl(int16_t *dst, uint8_t *_src, ptrdiff_t void ff_hevc_put_hevc_qpel_h8_8_avx512icl(int16_t *dst, uint8_t *_src, ptrdiff_t _srcstride, int height, intptr_t mx, intptr_t my, int width); void ff_hevc_put_hevc_qpel_h16_8_avx512icl(int16_t *dst, uint8_t *_src, ptrdiff_t _srcstride, int height, intptr_t mx, intptr_t my, int width); void ff_hevc_put_hevc_qpel_h32_8_avx512icl(int16_t *dst, uint8_t *_src, ptrdiff_t _srcstride, int height, intptr_t mx, intptr_t my, int width); +void ff_hevc_put_hevc_qpel_h64_8_avx512icl(int16_t *dst, uint8_t *_src, ptrdiff_t _srcstride, int height, intptr_t mx, intptr_t my, int width); void ff_hevc_put_hevc_qpel_hv8_8_avx512icl(int16_t *dst, uint8_t *_src, ptrdiff_t _srcstride, int height, intptr_t mx, intptr_t my, int width); /// diff --git a/libavcodec/x86/hevcdsp_init.c b/libavcodec/x86/hevcdsp_init.c index e9002c8b15..64fa5bc1f8 100644 --- a/libavcodec/x86/hevcdsp_init.c +++ b/libavcodec/x86/hevcdsp_init.c @@ -883,6 +883,7 @@ void ff_hevc_dsp_init_x86(HEVCDSPContext *c, const int bit_depth) c->put_hevc_qpel[3][0][1] = ff_hevc_put_hevc_qpel_h8_8_avx512icl; c->put_hevc_qpel[5][0][1] = ff_hevc_put_hevc_qpel_h16_8_avx512icl; c->put_hevc_qpel[7][0][1] = ff_hevc_put_hevc_qpel_h32_8_avx512icl; +c->put_hevc_qpel[9][0][1] = ff_hevc_put_hevc_qpel_h64_8_avx512icl; c->put_hevc_qpel[3][1][1] = ff_hevc_put_hevc_qpel_hv8_8_avx512icl; } } else if (bit_depth == 10) { -- 2.17.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 1/7] avutil/uuid: add utility library for manipulating UUIDs as specified in RFC 4122
23 Feb 2022, 07:48 by z...@zanevaniperen.com: >> Why the double header in the header file? It doesn't contain >> any libuuid code. >> > > It does, this was copy/pasted from libuuid, then had things stripped from it. > Some examples: > - > https://github.com/util-linux/util-linux/blob/d65eb48039a03cdacd5450e644af917a0f08bc88/libuuid/src/unparse.c#L43 > - > https://github.com/util-linux/util-linux/blob/d65eb48039a03cdacd5450e644af917a0f08bc88/libuuid/src/parse.c#L52 > I said the header *file*. It's just function definitions, there's no code there. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 211/281] flac: convert to new channel layout API
Quoting James Almer (2022-01-13 03:04:50) > From: Anton Khirnov > > Signed-off-by: Vittorio Giovara > Signed-off-by: Anton Khirnov > Signed-off-by: James Almer > --- > libavcodec/flac.c| 39 +-- > libavcodec/flac.h| 2 +- > libavcodec/flac_parser.c | 7 ++- > libavcodec/flacdec.c | 9 - > libavcodec/flacenc.c | 26 +- > 5 files changed, 41 insertions(+), 42 deletions(-) > > diff --git a/libavcodec/flac.c b/libavcodec/flac.c > index 7b075d4bd3..51014faea1 100644 > --- a/libavcodec/flac.c > +++ b/libavcodec/flac.c > @@ -29,15 +29,15 @@ > > static const int8_t sample_size_table[] = { 0, 8, 12, 0, 16, 20, 24, 0 }; > > -static const uint64_t flac_channel_layouts[8] = { > -AV_CH_LAYOUT_MONO, > -AV_CH_LAYOUT_STEREO, > -AV_CH_LAYOUT_SURROUND, > -AV_CH_LAYOUT_QUAD, > -AV_CH_LAYOUT_5POINT0, > -AV_CH_LAYOUT_5POINT1, > -AV_CH_LAYOUT_6POINT1, > -AV_CH_LAYOUT_7POINT1 > +static const AVChannelLayout flac_channel_layouts[8] = { > +AV_CHANNEL_LAYOUT_MONO, > +AV_CHANNEL_LAYOUT_STEREO, > +AV_CHANNEL_LAYOUT_SURROUND, > +AV_CHANNEL_LAYOUT_QUAD, > +AV_CHANNEL_LAYOUT_5POINT0, > +AV_CHANNEL_LAYOUT_5POINT1, > +AV_CHANNEL_LAYOUT_6POINT1, > +AV_CHANNEL_LAYOUT_7POINT1 > }; > > static int64_t get_utf8(GetBitContext *gb) > @@ -193,12 +193,19 @@ int ff_flac_is_extradata_valid(AVCodecContext *avctx, > return 1; > } > > -void ff_flac_set_channel_layout(AVCodecContext *avctx) > +void ff_flac_set_channel_layout(AVCodecContext *avctx, int channels) > { > -if (avctx->channels <= FF_ARRAY_ELEMS(flac_channel_layouts)) > -avctx->channel_layout = flac_channel_layouts[avctx->channels - 1]; > +if (channels == avctx->ch_layout.nb_channels && > +avctx->ch_layout.order == AV_CHANNEL_ORDER_NATIVE && > +avctx->ch_layout.u.mask) Not sure why I wrote this check like this originally, now it seems better to check for order != UNSPEC, so that a user-supplied custom layout is preserved. -- Anton Khirnov ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 1/7] avutil/uuid: add utility library for manipulating UUIDs as specified in RFC 4122
On 23/2/22 19:54, Lynne wrote: 23 Feb 2022, 07:48 by z...@zanevaniperen.com: Why the double header in the header file? It doesn't contain any libuuid code. It does, this was copy/pasted from libuuid, then had things stripped from it. Some examples: - https://github.com/util-linux/util-linux/blob/d65eb48039a03cdacd5450e644af917a0f08bc88/libuuid/src/unparse.c#L43 - https://github.com/util-linux/util-linux/blob/d65eb48039a03cdacd5450e644af917a0f08bc88/libuuid/src/parse.c#L52 I said the header *file*. It's just function definitions, there's no code there. Oh right, of course. Fixed. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 211/281] flac: convert to new channel layout API
On 2/23/2022 7:24 AM, Anton Khirnov wrote: Quoting James Almer (2022-01-13 03:04:50) From: Anton Khirnov Signed-off-by: Vittorio Giovara Signed-off-by: Anton Khirnov Signed-off-by: James Almer --- libavcodec/flac.c| 39 +-- libavcodec/flac.h| 2 +- libavcodec/flac_parser.c | 7 ++- libavcodec/flacdec.c | 9 - libavcodec/flacenc.c | 26 +- 5 files changed, 41 insertions(+), 42 deletions(-) diff --git a/libavcodec/flac.c b/libavcodec/flac.c index 7b075d4bd3..51014faea1 100644 --- a/libavcodec/flac.c +++ b/libavcodec/flac.c @@ -29,15 +29,15 @@ static const int8_t sample_size_table[] = { 0, 8, 12, 0, 16, 20, 24, 0 }; -static const uint64_t flac_channel_layouts[8] = { -AV_CH_LAYOUT_MONO, -AV_CH_LAYOUT_STEREO, -AV_CH_LAYOUT_SURROUND, -AV_CH_LAYOUT_QUAD, -AV_CH_LAYOUT_5POINT0, -AV_CH_LAYOUT_5POINT1, -AV_CH_LAYOUT_6POINT1, -AV_CH_LAYOUT_7POINT1 +static const AVChannelLayout flac_channel_layouts[8] = { +AV_CHANNEL_LAYOUT_MONO, +AV_CHANNEL_LAYOUT_STEREO, +AV_CHANNEL_LAYOUT_SURROUND, +AV_CHANNEL_LAYOUT_QUAD, +AV_CHANNEL_LAYOUT_5POINT0, +AV_CHANNEL_LAYOUT_5POINT1, +AV_CHANNEL_LAYOUT_6POINT1, +AV_CHANNEL_LAYOUT_7POINT1 }; static int64_t get_utf8(GetBitContext *gb) @@ -193,12 +193,19 @@ int ff_flac_is_extradata_valid(AVCodecContext *avctx, return 1; } -void ff_flac_set_channel_layout(AVCodecContext *avctx) +void ff_flac_set_channel_layout(AVCodecContext *avctx, int channels) { -if (avctx->channels <= FF_ARRAY_ELEMS(flac_channel_layouts)) -avctx->channel_layout = flac_channel_layouts[avctx->channels - 1]; +if (channels == avctx->ch_layout.nb_channels && +avctx->ch_layout.order == AV_CHANNEL_ORDER_NATIVE && +avctx->ch_layout.u.mask) Not sure why I wrote this check like this originally, now it seems better to check for order != UNSPEC, so that a user-supplied custom layout is preserved. You didn't write that, i did it to prevent the failure of fate-matroska-flac-extradata-update (a very recent test). Changing it to != UNSPEC also works, so I'll do that. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH v4] avformat/nutdec: Add check for avformat_new_stream
On Wed, Feb 23, 2022 at 10:31:59AM +0800, Jiasheng Jiang wrote: > As the potential failure of the memory allocation, > the avformat_new_stream() could return NULL pointer. > Therefore, it should be better to check it and return > error if fails. > Also, the caller, nut_read_header(), needs to deal with > the return value of the decode_main_header() and return > error if memory allocation fails. > And 'time_base_count' has already checked and it > will return AVERROR_INVALIDDATA if fails, which is different > from ENOMEM. > > Fixes: 619d8e2e58 ("updating nut demuxer to latest spec no muxing yet no > index yet no seeking yet libnuts crcs dont match mine (didnt investigate yet) > samplerate is stored wrong by libnut (demuxer has a workaround) code is not > clean or beautifull yet, but i thought its better to commit early before > someone unneccesarily wastes his time duplicating the work demuxer split from > muxer") > Signed-off-by: Jiasheng Jiang > --- > Changelog: > > v1 -> v2 > > * Change 1. Add the error handling for ENOMEM from decode_main_header() > in nut_read_header(). > * Change 2. Check for the 'time_base_count'. > > v2 -> v3 > > * Change 1. Remove the check for 'time_base_count'. > * Change 2. Change the av_free to av_freep. > > v3 -> v4 > > * Change 1. Remove the av_freep. > --- > libavformat/nutdec.c | 16 > 1 file changed, 12 insertions(+), 4 deletions(-) will apply thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB When the tyrant has disposed of foreign enemies by conquest or treaty, and there is nothing more to fear from them, then he is always stirring up some war or other, in order that the people may require a leader. -- Plato signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH v2 1/4] lavc/vaapi_encode_h265: Add P frame to GPB frame support for hevc_vaapi
> -Original Message- > From: ffmpeg-devel On Behalf Of Wang, > Fei W > Sent: Tuesday, February 22, 2022 4:49 PM > To: ffmpeg-devel@ffmpeg.org > Subject: Re: [FFmpeg-devel] [PATCH v2 1/4] lavc/vaapi_encode_h265: Add P > frame to GPB frame support for hevc_vaapi > > On Tue, 2022-02-22 at 05:46 +, Xiang, Haihao wrote: > > On Mon, 2022-02-21 at 12:06 +, Mark Thompson wrote: > > > On 21/02/2022 02:13, Fei Wang wrote: > > > > From: Linjie Fu > > > > > > > > Use GPB frames to replace regular P frames if backend driver does > > > > not support it. > > > > > > > > - GPB: > > > > Generalized P and B picture. P frames replaced by B frames > > > > with > > > > forward-predict only, L0 == L1. Normal B frames still have 2 > > > > different ref_lists and allow bi-prediction > > > > > > > > Signed-off-by: Linjie Fu > > > > Signed-off-by: Fei Wang > > > > --- > > > > libavcodec/vaapi_encode.c | 33 > > > > +++-- > > > > libavcodec/vaapi_encode.h | 1 + > > > > libavcodec/vaapi_encode_h265.c | 15 +++ > > > > 3 files changed, 47 insertions(+), 2 deletions(-) > > > > > > This always fails immediately on current iHD > > > (7e357b4bea76b2fe2522e6af41ae02ea69cec49e): > > > > > > $ ./ffmpeg_g -v 44 -y -hwaccel vaapi -hwaccel_output_format vaapi -i > > > in.mp4 -an -c:v hevc_vaapi -low_power 1 out.mp4 ... > > > [hevc_vaapi @ 0x560e81d45e80] Using input frames context (format > > > vaapi) with > > > hevc_vaapi encoder. > > > [hevc_vaapi @ 0x560e81d45e80] Input surface format is nv12. > > > [hevc_vaapi @ 0x560e81d45e80] Using VAAPI profile VAProfileHEVCMain > > > (17). > > > [hevc_vaapi @ 0x560e81d45e80] Using VAAPI entrypoint > > > VAEntrypointEncSliceLP (8). > > > [hevc_vaapi @ 0x560e81d45e80] Using VAAPI render target format > > > YUV420 (0x1). > > > [hevc_vaapi @ 0x560e81d45e80] Using CTU size 64x64, min CB size 8x8. > > > [hevc_vaapi @ 0x560e81d45e80] No quality level set; using default > > > (25). > > > [hevc_vaapi @ 0x560e81d45e80] RC mode: CQP. > > > [hevc_vaapi @ 0x560e81d45e80] RC quality: 25. > > > [hevc_vaapi @ 0x560e81d45e80] RC framerate: 3/1001 (29.97 fps). > > > [hevc_vaapi @ 0x560e81d45e80] Use GPB B frames to replace regular P > > > frames. > > > [hevc_vaapi @ 0x560e81d45e80] Using intra, GPB-B-frames and B- > > > frames (supported references: 3 / 3). > > > [hevc_vaapi @ 0x560e81d45e80] All wanted packed headers available > > > (wanted 0xd, found 0x1f). > > > [hevc_vaapi @ 0x560e81d45e80] Using level 4. > > > ... > > > [hevc_vaapi @ 0x560e81d45e80] Failed to end picture encode issue: > > > 24 (internal > > > encoding error). > > > [hevc_vaapi @ 0x560e81d45e80] Encode failed: -5. > > > Video encoding failed > > > ... > > > $ cat /proc/cpuinfo | grep 'model name' | head -1 > > > model name : Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz > > > $ uname -v > > > #1 SMP PREEMPT Debian 5.16.7-2 (2022-02-09) > > > > > > Do you get this too, or is your setup different somehow? > > > > Hi Mark, > > > > I tested this patchset with iHD > > (7e357b4bea76b2fe2522e6af41ae02ea69cec49e) on CFL (low_power=0), RKL > > and DG1, i965 on SKL, and didn't see this issue before. > > This day I reproduced this issue on ICL. It seems iHD driver doesn't > > return right values for ICL. > > Thanks Mark to report this issue on ICL. > > I tested on TGL and CFL before submitted this patch set, all looks good. I > will > check why this fail on ICL. > > And will fix your other comments together in next version. > > Fei > Thanks > > > > > > > > diff --git a/libavcodec/vaapi_encode.c b/libavcodec/vaapi_encode.c > > > > index 3bf379b1a0..95eca7c288 100644 > > > > --- a/libavcodec/vaapi_encode.c > > > > +++ b/libavcodec/vaapi_encode.c > > > > @@ -1845,6 +1845,30 @@ static av_cold int > > > > vaapi_encode_init_gop_structure(AVCodecContext *avctx) > > > > ref_l1 = attr.value >> 16 & 0x; > > > > } > > > > > > > > +ctx->p_to_gpb = 0; > > > > + > > > > +#if VA_CHECK_VERSION(1, 9, 0) > > > > +attr = (VAConfigAttrib) { VAConfigAttribPredictionDirection > > > > }; > > > > +vas = vaGetConfigAttributes(ctx->hwctx->display, > > > > +ctx->va_profile, > > > > +ctx->va_entrypoint, > > > > +&attr, 1); > > > > > > This probably shouldn't be done at all if the user has selected a > > > codec without B-frames or a configuration which is intra-only, > > > because the log message is confusing: > > > > > > [mjpeg_vaapi @ 0x55b90d72ee00] Driver does not report whether > > > support GPB, use regular P frames. > > > [mjpeg_vaapi @ 0x55b90d72ee00] Using intra frames only. > > > > > > > +if (vas != VA_STATUS_SUCCESS) { > > > > +av_log(avctx, AV_LOG_WARNING, "Failed to query > > > > prediction direction > > > > " > > > > + "attribute: %d (%s).\n", vas, vaErrorStr(vas)); > > > > > > And fail? > > > > 4/4 also ignores the e
[FFmpeg-devel] [PATCH] configure: Fix detecting/using getauxval
While trying to detect getauxval, this actually never output HAVE_GETAUXVAL into config.h before. Signed-off-by: Martin Storsjö --- configure | 1 + 1 file changed, 1 insertion(+) diff --git a/configure b/configure index 4f30140221..d4502ba90c 100755 --- a/configure +++ b/configure @@ -2266,6 +2266,7 @@ SYSTEM_FUNCS=" closesocket CommandLineToArgvW fcntl +getauxval getaddrinfo gethrtime getopt -- 2.32.0 (Apple Git-132) ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] configure: Fix detecting/using getauxval
Martin Storsjö: > While trying to detect getauxval, this actually never output > HAVE_GETAUXVAL into config.h before. > > Signed-off-by: Martin Storsjö > --- > configure | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/configure b/configure > index 4f30140221..d4502ba90c 100755 > --- a/configure > +++ b/configure > @@ -2266,6 +2266,7 @@ SYSTEM_FUNCS=" > closesocket > CommandLineToArgvW > fcntl > +getauxval > getaddrinfo > gethrtime > getopt 'd' < 'u' - Andreas ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH v2] configure: Fix detecting/using getauxval
While trying to detect getauxval, this actually never output HAVE_GETAUXVAL into config.h before. Signed-off-by: Martin Storsjö --- Fixed the alphabetical ordering. --- configure | 1 + 1 file changed, 1 insertion(+) diff --git a/configure b/configure index 4f30140221..e8fdb3813d 100755 --- a/configure +++ b/configure @@ -2267,6 +2267,7 @@ SYSTEM_FUNCS=" CommandLineToArgvW fcntl getaddrinfo +getauxval gethrtime getopt GetModuleHandle -- 2.32.0 (Apple Git-132) ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 00/13] [RFC] Reduce unnecessary recompilation
Hi, When updating the ffmpeg source, one quite often ends up in a situation where practically all of the codebase (or all of a library) gets rebuilt, due to updates to headers that are included in most files. In some cases, full rebuilds are warranted of course, but they could also be avoided in many cases - e.g. such as if the minor/micro version of a library has been bumped, or if a new component (codec, demuxer, filter etc) has been enabled (or removed if reconfiguring with an older source version). Very few source files are affected by exactly what the full library version is, or by the full list of enabled components. To avoid such rebuilds, I've got a proof of concept patchset that splits headers, so that most source files avoid including the bits that change often and that shouldn't affect how they are built. - The version.h headers are split into a separate version_major.h which contains only the major library version, and accompanying FF_API_* defines. The main library headers only include version_major.h, and files that need the exact version (e.g. LIB_VERSION* or LIB_IDENT) can include version.h explicitly. This is a minor break of the public API though, as definitions that used to be available no longer are. This works mostly fine for most libraries, but there's little point in splitting libavutil/version.h, because LIBAVUTIL_VERSION_INT is used in every source file that defines an AVClass. By splitting version.h, and update to the minor/micro version numbers of all libraries except avutil now would require recompiling 30 files instead of 1653 before. (This change also should lower the barrier to and reduce the risk of forgetting to bump the version numbers, which one otherwise often postpones while working on a patch, as it forces rebuilds.) - config.h is split into a separate config_components.h that includes the list of enabled/disabled components (corresponding to $ALL_COMPONENTS in configure). One could consider splitting up config.h even more, but that probably gives less benefit compared to the amount of churn. Surprisingly, a nontrivial number of source files do depend on the state of specific encoders/decoders/components, so quite a few files do end up requiring including config_components.h. (Also this change can possibly break compilation of source files that require external dependencies that I haven't tested.) In practice, this reduces the number of rebuilt source files from 1979 to 193, if there's a change to the list of enabled components but not to the rest of config.h. What do you think - is it worth the slight churn to avoid pointless rebuilds? Martin Storsjö (13): libavutil: Remove leftover uses of version.h libavcodec: Remove unnecessary includes of version.h libavformat: Remove unnecessary includes of version.h libavdevice: Remove unnecessary includes of version.h libavcodec: Split version.h libavformat: Split version.h libavdevice: Split version.h libpostproc: Split version.h libswresample: Split version.h libswscale: Split version.h libavfilter: Split version.h doc: Add an entry to APIchanges about no longer implicitly including version.h configure: Use a separate config_components.h header for $ALL_COMPONENTS configure | 17 +++-- doc/APIchanges | 6 fftools/cmdutils.c | 7 fftools/ffmpeg.c | 1 + fftools/ffplay.c | 1 + fftools/ffprobe.c | 7 libavcodec/8svx.c | 1 + libavcodec/Makefile| 1 + libavcodec/a64multienc.c | 1 + libavcodec/aac_ac3_parser.c| 1 + libavcodec/aacenc.c| 1 + libavcodec/aactab.c| 1 + libavcodec/aarch64/h264cmc_neon.S | 1 + libavcodec/ac3_parser.c| 1 + libavcodec/ac3dec.c| 1 + libavcodec/ac3enc.c| 1 + libavcodec/ac3enc_template.c | 1 + libavcodec/adpcm.c | 1 + libavcodec/adpcmenc.c | 1 + libavcodec/allcodecs.c | 1 + libavcodec/aptxdec.c | 1 + libavcodec/aptxenc.c | 1 + libavcodec/arm/flacdsp_init_arm.c | 1 + libavcodec/arm/h264cmc_neon.S | 1 + libavcodec/assdec.c| 1 + libavcodec/assenc.c| 1 + libavcodec/asvdec.c| 1 + libavcodec/asvenc.c| 1 + libavcodec/audiotoolboxdec.c | 1 + libavcodec/av1dec.c| 1 + libavcodec/avcodec.c | 1 + libavcodec/avcodec.h | 2 +- libavcodec/binkaudio.c | 1 + libavcodec/bintext.c | 1 + libavcodec/bsf.c | 1 + libavcodec/codec.h | 2 +- libavcodec/cyuv.c | 1 + libavcodec/dpxenc.c| 1 + libavcodec/flashsv.c | 1 +
[FFmpeg-devel] [PATCH 02/13] libavcodec: Remove unnecessary includes of version.h
These files probably have used defines like FF_API_* before, but no longer do that, and doesn't directly seem to use anything else from that header either. --- libavcodec/mediacodec.c | 1 - libavcodec/mediacodec_wrapper.c | 1 - libavcodec/x86/blockdsp_init.c | 1 - libavcodec/xvmc.h | 1 - 4 files changed, 4 deletions(-) diff --git a/libavcodec/mediacodec.c b/libavcodec/mediacodec.c index aa14624fd0..33bde8112e 100644 --- a/libavcodec/mediacodec.c +++ b/libavcodec/mediacodec.c @@ -35,7 +35,6 @@ #include "ffjni.h" #include "mediacodecdec_common.h" -#include "version.h" AVMediaCodecContext *av_mediacodec_alloc_context(void) { diff --git a/libavcodec/mediacodec_wrapper.c b/libavcodec/mediacodec_wrapper.c index c829941d6b..8ffc58e1d8 100644 --- a/libavcodec/mediacodec_wrapper.c +++ b/libavcodec/mediacodec_wrapper.c @@ -28,7 +28,6 @@ #include "avcodec.h" #include "ffjni.h" -#include "version.h" #include "mediacodec_wrapper.h" struct JNIAMediaCodecListFields { diff --git a/libavcodec/x86/blockdsp_init.c b/libavcodec/x86/blockdsp_init.c index be3eef0021..44ac97407b 100644 --- a/libavcodec/x86/blockdsp_init.c +++ b/libavcodec/x86/blockdsp_init.c @@ -24,7 +24,6 @@ #include "libavutil/cpu.h" #include "libavutil/x86/cpu.h" #include "libavcodec/blockdsp.h" -#include "libavcodec/version.h" void ff_clear_block_mmx(int16_t *block); void ff_clear_block_sse(int16_t *block); diff --git a/libavcodec/xvmc.h b/libavcodec/xvmc.h index 78ec4530c2..52e70c0d77 100644 --- a/libavcodec/xvmc.h +++ b/libavcodec/xvmc.h @@ -32,7 +32,6 @@ #include #include "libavutil/attributes.h" -#include "version.h" #include "avcodec.h" /** -- 2.32.0 (Apple Git-132) ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 01/13] libavutil: Remove leftover uses of version.h
These headers probably have used defines like FF_API_* before, but no longer do that, and doesn't directly seem to use anything else from that header either. --- libavutil/common.h | 1 - libavutil/internal.h | 1 - 2 files changed, 2 deletions(-) diff --git a/libavutil/common.h b/libavutil/common.h index 3eb9bc5f74..fd1404be6c 100644 --- a/libavutil/common.h +++ b/libavutil/common.h @@ -41,7 +41,6 @@ #include "attributes.h" #include "macros.h" -#include "version.h" //rounded division & shift #define RSHIFT(a,b) ((a) > 0 ? ((a) + ((1<<(b))>>1))>>(b) : ((a) + ((1<<(b))>>1)-1)>>(b)) diff --git a/libavutil/internal.h b/libavutil/internal.h index 0a7f1c6257..79c2130be0 100644 --- a/libavutil/internal.h +++ b/libavutil/internal.h @@ -43,7 +43,6 @@ #include "dict.h" #include "macros.h" #include "pixfmt.h" -#include "version.h" #if ARCH_X86 # include "x86/emms.h" -- 2.32.0 (Apple Git-132) ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 03/13] libavformat: Remove unnecessary includes of version.h
This header probably has used defines like FF_API_* before, but no longer do that, and doesn't directly seem to use anything else from that header either. --- libavformat/url.h | 1 - 1 file changed, 1 deletion(-) diff --git a/libavformat/url.h b/libavformat/url.h index a129150d76..3cfe3ecc5c 100644 --- a/libavformat/url.h +++ b/libavformat/url.h @@ -25,7 +25,6 @@ #define AVFORMAT_URL_H #include "avio.h" -#include "libavformat/version.h" #include "libavutil/dict.h" #include "libavutil/log.h" -- 2.32.0 (Apple Git-132) ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 04/13] libavdevice: Remove unnecessary includes of version.h
--- libavdevice/android_camera.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/libavdevice/android_camera.c b/libavdevice/android_camera.c index f089d1b6f9..1934999c18 100644 --- a/libavdevice/android_camera.c +++ b/libavdevice/android_camera.c @@ -43,8 +43,6 @@ #include "libavutil/threadmessage.h" #include "libavutil/time.h" -#include "version.h" - /* This image format is available on all Android devices * supporting the Camera2 API */ #define IMAGE_FORMAT_ANDROID AIMAGE_FORMAT_YUV_420_888 -- 2.32.0 (Apple Git-132) ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 08/13] libpostproc: Split version.h
--- fftools/cmdutils.c | 1 + fftools/ffprobe.c | 1 + libpostproc/Makefile| 1 + libpostproc/postprocess.c | 1 + libpostproc/postprocess.h | 2 +- libpostproc/version.h | 3 ++- libpostproc/version_major.h | 31 +++ 7 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 libpostproc/version_major.h diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c index 21ec11226e..f52015708c 100644 --- a/fftools/cmdutils.c +++ b/fftools/cmdutils.c @@ -39,6 +39,7 @@ #include "libswscale/swscale.h" #include "libswresample/swresample.h" #include "libpostproc/postprocess.h" +#include "libpostproc/version.h" #include "libavutil/attributes.h" #include "libavutil/avassert.h" #include "libavutil/avstring.h" diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index 0f4d14574c..a0b9854004 100644 --- a/fftools/ffprobe.c +++ b/fftools/ffprobe.c @@ -56,6 +56,7 @@ #include "libswscale/swscale.h" #include "libswresample/swresample.h" #include "libpostproc/postprocess.h" +#include "libpostproc/version.h" #include "cmdutils.h" #include "libavutil/thread.h" diff --git a/libpostproc/Makefile b/libpostproc/Makefile index 34317193a8..f7debb8eeb 100644 --- a/libpostproc/Makefile +++ b/libpostproc/Makefile @@ -4,6 +4,7 @@ FFLIBS = avutil HEADERS = postprocess.h\ version.h\ + version_major.h \ OBJS = postprocess.o diff --git a/libpostproc/postprocess.c b/libpostproc/postprocess.c index 2ca7a3779d..b954dc2eaa 100644 --- a/libpostproc/postprocess.c +++ b/libpostproc/postprocess.c @@ -89,6 +89,7 @@ try to unroll inner for(x=0 ... loop to avoid these damn if(x ... checks //#define DEBUG_BRIGHTNESS #include "postprocess.h" #include "postprocess_internal.h" +#include "version.h" #include "libavutil/avstring.h" #include "libavutil/ppc/util_altivec.h" diff --git a/libpostproc/postprocess.h b/libpostproc/postprocess.h index ba456cf3e0..cf4e78c83a 100644 --- a/libpostproc/postprocess.h +++ b/libpostproc/postprocess.h @@ -34,7 +34,7 @@ * @{ */ -#include "libpostproc/version.h" +#include "libpostproc/version_major.h" /** * Return the LIBPOSTPROC_VERSION_INT constant. diff --git a/libpostproc/version.h b/libpostproc/version.h index e8bd6afdc8..4459d251d4 100644 --- a/libpostproc/version.h +++ b/libpostproc/version.h @@ -28,7 +28,8 @@ #include "libavutil/version.h" -#define LIBPOSTPROC_VERSION_MAJOR 56 +#include "version_major.h" + #define LIBPOSTPROC_VERSION_MINOR 4 #define LIBPOSTPROC_VERSION_MICRO 100 diff --git a/libpostproc/version_major.h b/libpostproc/version_major.h new file mode 100644 index 00..7afc4dbb72 --- /dev/null +++ b/libpostproc/version_major.h @@ -0,0 +1,31 @@ +/* + * Version macros. + * + * 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 POSTPROC_VERSION_MAJOR_H +#define POSTPROC_VERSION_MAJOR_H + +/** + * @file + * Libpostproc version macros + */ + +#define LIBPOSTPROC_VERSION_MAJOR 56 + +#endif /* POSTPROC_VERSION_MAJOR_H */ -- 2.32.0 (Apple Git-132) ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 05/13] libavcodec: Split version.h
This avoids including version.h in all source files, avoiding unnecessary rebuilds when the version number is bumped. Only version_major.h is included by the main header, which defines availability of e.g. FF_API_* macros, and which is bumped much less often. --- fftools/cmdutils.c | 1 + fftools/ffmpeg.c | 1 + fftools/ffprobe.c | 1 + libavcodec/Makefile| 1 + libavcodec/aacenc.c| 1 + libavcodec/avcodec.c | 1 + libavcodec/avcodec.h | 2 +- libavcodec/codec.h | 2 +- libavcodec/dpxenc.c| 1 + libavcodec/j2kenc.c| 1 + libavcodec/libvorbisenc.c | 1 + libavcodec/mjpegenc_common.c | 1 + libavcodec/mpeg4videoenc.c | 1 + libavcodec/options_table.h | 2 +- libavcodec/packet.h| 2 +- libavcodec/pthread_frame.c | 2 +- libavcodec/tiffenc.c | 1 + libavcodec/vaapi_encode_h264.c | 1 + libavcodec/version.h | 28 ++--- libavcodec/version_major.h | 55 ++ libavformat/movenc.c | 1 + 21 files changed, 76 insertions(+), 31 deletions(-) create mode 100644 libavcodec/version_major.h diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c index 4b50e15eef..869b5ec012 100644 --- a/fftools/cmdutils.c +++ b/fftools/cmdutils.c @@ -55,6 +55,7 @@ #include "libavutil/ffversion.h" #include "libavutil/version.h" #include "libavcodec/bsf.h" +#include "libavcodec/version.h" #include "cmdutils.h" #if HAVE_SYS_RESOURCE_H #include diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 7beea11933..6f48168477 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -64,6 +64,7 @@ #include "libavutil/thread.h" #include "libavutil/threadmessage.h" #include "libavcodec/mathops.h" +#include "libavcodec/version.h" #include "libavformat/os_support.h" # include "libavfilter/avfilter.h" diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index 38b7e7e00f..69dedead0c 100644 --- a/fftools/ffprobe.c +++ b/fftools/ffprobe.c @@ -30,6 +30,7 @@ #include "libavformat/avformat.h" #include "libavcodec/avcodec.h" +#include "libavcodec/version.h" #include "libavutil/avassert.h" #include "libavutil/avstring.h" #include "libavutil/bprint.h" diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 6076b4ad80..dc413c8ac6 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -22,6 +22,7 @@ HEADERS = ac3_parser.h \ qsv.h \ vdpau.h \ version.h \ + version_major.h \ videotoolbox.h\ vorbis_parser.h \ xvmc.h\ diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c index a1004c3e98..38f2d15f78 100644 --- a/libavcodec/aacenc.c +++ b/libavcodec/aacenc.c @@ -41,6 +41,7 @@ #include "mpeg4audio.h" #include "sinewin.h" #include "profiles.h" +#include "version.h" #include "aac.h" #include "aactab.h" diff --git a/libavcodec/avcodec.c b/libavcodec/avcodec.c index 92639dda6b..838c009a19 100644 --- a/libavcodec/avcodec.c +++ b/libavcodec/avcodec.c @@ -39,6 +39,7 @@ #include "frame_thread_encoder.h" #include "internal.h" #include "thread.h" +#include "version.h" #include "libavutil/ffversion.h" const char av_codec_ffversion[] = "FFmpeg version " FFMPEG_VERSION; diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 79af8dcc05..6e2be910dc 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -43,7 +43,7 @@ #include "codec_id.h" #include "defs.h" #include "packet.h" -#include "version.h" +#include "version_major.h" /** * @defgroup libavc libavcodec diff --git a/libavcodec/codec.h b/libavcodec/codec.h index a8147ec21f..42dd95d225 100644 --- a/libavcodec/codec.h +++ b/libavcodec/codec.h @@ -31,7 +31,7 @@ #include "libavutil/samplefmt.h" #include "libavcodec/codec_id.h" -#include "libavcodec/version.h" +#include "libavcodec/version_major.h" /** * @addtogroup lavc_core diff --git a/libavcodec/dpxenc.c b/libavcodec/dpxenc.c index 0db6aa832d..c4f9ae09bb 100644 --- a/libavcodec/dpxenc.c +++ b/libavcodec/dpxenc.c @@ -25,6 +25,7 @@ #include "avcodec.h" #include "encode.h" #include "internal.h" +#include "version.h" typedef struct DPXContext { int big_endian; diff --git a/libavcodec/j2kenc.c b/libavcodec/j2kenc.c index c06752f43a..95573c6799 100644 --- a/libavcodec/j2kenc.c +++ b/libavcodec/j2kenc.c @@ -70,6 +70,7 @@ #include "internal.h" #include "bytestream.h" #include "jpeg2000.h" +#include "version.h" #include "libavutil/common.h" #include "libavutil/pixdesc.h" #include "l
[FFmpeg-devel] [PATCH 06/13] libavformat: Split version.h
--- fftools/cmdutils.c| 1 + fftools/ffprobe.c | 1 + libavdevice/pulse_audio_dec.c | 1 + libavdevice/pulse_audio_enc.c | 1 + libavformat/Makefile | 1 + libavformat/avformat.h| 2 +- libavformat/avio.h| 2 +- libavformat/flacenc.c | 1 + libavformat/framehash.c | 1 + libavformat/matroskaenc.c | 1 + libavformat/mmf.c | 1 + libavformat/movenc.c | 1 + libavformat/mux.c | 1 + libavformat/mxfenc.c | 1 + libavformat/nutenc.c | 1 + libavformat/oggenc.c | 1 + libavformat/rtmpproto.c | 1 + libavformat/rtsp.c| 1 + libavformat/rtspdec.c | 1 + libavformat/utils.c | 1 + libavformat/version.h | 23 ++-- libavformat/version_major.h | 52 +++ 22 files changed, 74 insertions(+), 23 deletions(-) create mode 100644 libavformat/version_major.h diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c index 869b5ec012..87f410e975 100644 --- a/fftools/cmdutils.c +++ b/fftools/cmdutils.c @@ -32,6 +32,7 @@ #include "config.h" #include "compat/va_copy.h" #include "libavformat/avformat.h" +#include "libavformat/version.h" #include "libavfilter/avfilter.h" #include "libavdevice/avdevice.h" #include "libswscale/swscale.h" diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index 69dedead0c..8f5aa12600 100644 --- a/fftools/ffprobe.c +++ b/fftools/ffprobe.c @@ -29,6 +29,7 @@ #include #include "libavformat/avformat.h" +#include "libavformat/version.h" #include "libavcodec/avcodec.h" #include "libavcodec/version.h" #include "libavutil/avassert.h" diff --git a/libavdevice/pulse_audio_dec.c b/libavdevice/pulse_audio_dec.c index b23d08e4d3..5a42f71ede 100644 --- a/libavdevice/pulse_audio_dec.c +++ b/libavdevice/pulse_audio_dec.c @@ -30,6 +30,7 @@ #include "libavformat/avformat.h" #include "libavformat/internal.h" +#include "libavformat/version.h" #include "pulse_audio_common.h" #include "timefilter.h" diff --git a/libavdevice/pulse_audio_enc.c b/libavdevice/pulse_audio_enc.c index 4ff425d33f..7b50517fc7 100644 --- a/libavdevice/pulse_audio_enc.c +++ b/libavdevice/pulse_audio_enc.c @@ -23,6 +23,7 @@ #include #include "libavformat/avformat.h" #include "libavformat/internal.h" +#include "libavformat/version.h" #include "libavutil/channel_layout.h" #include "libavutil/internal.h" #include "libavutil/opt.h" diff --git a/libavformat/Makefile b/libavformat/Makefile index 6566e40cac..dc4bc06c5c 100644 --- a/libavformat/Makefile +++ b/libavformat/Makefile @@ -4,6 +4,7 @@ DESC = FFmpeg container format library HEADERS = avformat.h\ avio.h\ version.h \ + version_major.h \ OBJS = allformats.o \ avio.o \ diff --git a/libavformat/avformat.h b/libavformat/avformat.h index b4b8075ae6..d37a582838 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -319,7 +319,7 @@ #include "libavutil/log.h" #include "avio.h" -#include "libavformat/version.h" +#include "libavformat/version_major.h" struct AVFormatContext; struct AVStream; diff --git a/libavformat/avio.h b/libavformat/avio.h index cd63322a62..a7a0fbdead 100644 --- a/libavformat/avio.h +++ b/libavformat/avio.h @@ -32,7 +32,7 @@ #include "libavutil/dict.h" #include "libavutil/log.h" -#include "libavformat/version.h" +#include "libavformat/version_major.h" /** * Seeking works like for a local file. diff --git a/libavformat/flacenc.c b/libavformat/flacenc.c index b267197ccc..88dbe87af4 100644 --- a/libavformat/flacenc.c +++ b/libavformat/flacenc.c @@ -30,6 +30,7 @@ #include "flacenc.h" #include "id3v2.h" #include "internal.h" +#include "version.h" #include "vorbiscomment.h" diff --git a/libavformat/framehash.c b/libavformat/framehash.c index 04c40825b9..43b8ab3be2 100644 --- a/libavformat/framehash.c +++ b/libavformat/framehash.c @@ -20,6 +20,7 @@ #include "libavutil/channel_layout.h" #include "internal.h" +#include "version.h" int ff_framehash_write_header(AVFormatContext *s) { diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index 38d9485288..e8df5db3bd 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -35,6 +35,7 @@ #include "isom.h" #include "matroska.h" #include "riff.h" +#include "version.h" #include "vorbiscomment.h" #include "wv.h" diff --git a/libavformat/mmf.c b/libavformat/mmf.c index 0c067a1025..e836390bff 100644 --- a/libavformat/mmf.c +++ b/libavformat/mmf.c @@ -26,6 +26,7 @@ #include "pcm.h" #include "rawenc.h" #include "riff.h" +#include "version.h" typedef struct MMFContext { int64_t atrpos, atsqpos, awapos; diff --git a/libavformat/movenc.c b/lib
[FFmpeg-devel] [PATCH 09/13] libswresample: Split version.h
--- fftools/cmdutils.c| 1 + fftools/ffprobe.c | 1 + libswresample/Makefile| 1 + libswresample/swresample.c| 1 + libswresample/swresample.h| 2 +- libswresample/version.h | 3 ++- libswresample/version_major.h | 31 +++ 7 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 libswresample/version_major.h diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c index f52015708c..dd5d4f5849 100644 --- a/fftools/cmdutils.c +++ b/fftools/cmdutils.c @@ -38,6 +38,7 @@ #include "libavdevice/version.h" #include "libswscale/swscale.h" #include "libswresample/swresample.h" +#include "libswresample/version.h" #include "libpostproc/postprocess.h" #include "libpostproc/version.h" #include "libavutil/attributes.h" diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index a0b9854004..9f04354c7e 100644 --- a/fftools/ffprobe.c +++ b/fftools/ffprobe.c @@ -55,6 +55,7 @@ #include "libavdevice/version.h" #include "libswscale/swscale.h" #include "libswresample/swresample.h" +#include "libswresample/version.h" #include "libpostproc/postprocess.h" #include "libpostproc/version.h" #include "cmdutils.h" diff --git a/libswresample/Makefile b/libswresample/Makefile index f528427f55..b74ee20987 100644 --- a/libswresample/Makefile +++ b/libswresample/Makefile @@ -4,6 +4,7 @@ FFLIBS = avutil HEADERS = swresample.h \ version.h \ + version_major.h\ OBJS = audioconvert.o\ dither.o \ diff --git a/libswresample/swresample.c b/libswresample/swresample.c index 16734c9df9..82e979c4c9 100644 --- a/libswresample/swresample.c +++ b/libswresample/swresample.c @@ -24,6 +24,7 @@ #include "libavutil/avassert.h" #include "libavutil/channel_layout.h" #include "libavutil/internal.h" +#include "version.h" #include diff --git a/libswresample/swresample.h b/libswresample/swresample.h index c7b84fbcac..aebdbafcfc 100644 --- a/libswresample/swresample.h +++ b/libswresample/swresample.h @@ -124,7 +124,7 @@ #include "libavutil/frame.h" #include "libavutil/samplefmt.h" -#include "libswresample/version.h" +#include "libswresample/version_major.h" /** * @name Option constants diff --git a/libswresample/version.h b/libswresample/version.h index 61d0057cf5..9a514e6d6f 100644 --- a/libswresample/version.h +++ b/libswresample/version.h @@ -28,7 +28,8 @@ #include "libavutil/version.h" -#define LIBSWRESAMPLE_VERSION_MAJOR 4 +#include "version_major.h" + #define LIBSWRESAMPLE_VERSION_MINOR 4 #define LIBSWRESAMPLE_VERSION_MICRO 100 diff --git a/libswresample/version_major.h b/libswresample/version_major.h new file mode 100644 index 00..7f265c2073 --- /dev/null +++ b/libswresample/version_major.h @@ -0,0 +1,31 @@ +/* + * Version macros. + * + * This file is part of libswresample + * + * libswresample 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. + * + * libswresample 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 libswresample; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef SWRESAMPLE_VERSION_MAJOR_H +#define SWRESAMPLE_VERSION_MAJOR_H + +/** + * @file + * Libswresample version macros + */ + +#define LIBSWRESAMPLE_VERSION_MAJOR 4 + +#endif /* SWRESAMPLE_VERSION_MAJOR_H */ -- 2.32.0 (Apple Git-132) ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 10/13] libswscale: Split version.h
--- fftools/cmdutils.c| 1 + fftools/ffprobe.c | 1 + libswscale/Makefile | 1 + libswscale/swscale.h | 2 +- libswscale/swscale_internal.h | 1 - libswscale/utils.c| 1 + libswscale/version.h | 9 ++--- libswscale/version_major.h| 35 +++ 8 files changed, 42 insertions(+), 9 deletions(-) create mode 100644 libswscale/version_major.h diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c index dd5d4f5849..d5cadec695 100644 --- a/fftools/cmdutils.c +++ b/fftools/cmdutils.c @@ -37,6 +37,7 @@ #include "libavdevice/avdevice.h" #include "libavdevice/version.h" #include "libswscale/swscale.h" +#include "libswscale/version.h" #include "libswresample/swresample.h" #include "libswresample/version.h" #include "libpostproc/postprocess.h" diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index 9f04354c7e..2e74580ca8 100644 --- a/fftools/ffprobe.c +++ b/fftools/ffprobe.c @@ -54,6 +54,7 @@ #include "libavdevice/avdevice.h" #include "libavdevice/version.h" #include "libswscale/swscale.h" +#include "libswscale/version.h" #include "libswresample/swresample.h" #include "libswresample/version.h" #include "libpostproc/postprocess.h" diff --git a/libswscale/Makefile b/libswscale/Makefile index a0ec71e06f..1f02b56421 100644 --- a/libswscale/Makefile +++ b/libswscale/Makefile @@ -3,6 +3,7 @@ DESC = FFmpeg image rescaling library HEADERS = swscale.h \ version.h \ + version_major.h \ OBJS = alphablend.o \ hscale.o \ diff --git a/libswscale/swscale.h b/libswscale/swscale.h index daa53dc01e..07c69e1ae7 100644 --- a/libswscale/swscale.h +++ b/libswscale/swscale.h @@ -33,7 +33,7 @@ #include "libavutil/frame.h" #include "libavutil/log.h" #include "libavutil/pixfmt.h" -#include "version.h" +#include "version_major.h" /** * @defgroup libsws libswscale diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h index 26d28d42e6..3cf96d5fbc 100644 --- a/libswscale/swscale_internal.h +++ b/libswscale/swscale_internal.h @@ -24,7 +24,6 @@ #include #include "config.h" -#include "version.h" #include "libavutil/avassert.h" #include "libavutil/avutil.h" diff --git a/libswscale/utils.c b/libswscale/utils.c index 7c8e1bbdde..ee8e5c9364 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -59,6 +59,7 @@ #include "rgb2rgb.h" #include "swscale.h" #include "swscale_internal.h" +#include "version.h" static SwsVector *sws_getIdentityVec(void); static void sws_addVec(SwsVector *a, SwsVector *b); diff --git a/libswscale/version.h b/libswscale/version.h index 0e5583aa47..c13db31c43 100644 --- a/libswscale/version.h +++ b/libswscale/version.h @@ -26,7 +26,8 @@ #include "libavutil/version.h" -#define LIBSWSCALE_VERSION_MAJOR 6 +#include "version_major.h" + #define LIBSWSCALE_VERSION_MINOR 5 #define LIBSWSCALE_VERSION_MICRO 100 @@ -40,10 +41,4 @@ #define LIBSWSCALE_IDENT"SwS" AV_STRINGIFY(LIBSWSCALE_VERSION) -/** - * FF_API_* defines may be placed below to indicate public API that will be - * dropped at a future version bump. The defines themselves are not part of - * the public API and may change, break or disappear at any time. - */ - #endif /* SWSCALE_VERSION_H */ diff --git a/libswscale/version_major.h b/libswscale/version_major.h new file mode 100644 index 00..2f8418780c --- /dev/null +++ b/libswscale/version_major.h @@ -0,0 +1,35 @@ +/* + * 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 SWSCALE_VERSION_MAJOR_H +#define SWSCALE_VERSION_MAJOR_H + +/** + * @file + * swscale version macros + */ + +#define LIBSWSCALE_VERSION_MAJOR 6 + +/** + * FF_API_* defines may be placed below to indicate public API that will be + * dropped at a future version bump. The defines themselves are not part of + * the public API and may change, break or disappear at any time. + */ + +#endif /* SWSCALE_VERSION_MAJOR_H */ -- 2.32.0 (Apple Git-132) ___ ffm
[FFmpeg-devel] [PATCH 07/13] libavdevice: Split version.h
--- fftools/cmdutils.c | 1 + fftools/ffprobe.c | 1 + libavdevice/Makefile| 1 + libavdevice/avdevice.c | 1 + libavdevice/avdevice.h | 2 +- libavdevice/version.h | 10 ++ libavdevice/version_major.h | 37 + 7 files changed, 44 insertions(+), 9 deletions(-) create mode 100644 libavdevice/version_major.h diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c index 87f410e975..21ec11226e 100644 --- a/fftools/cmdutils.c +++ b/fftools/cmdutils.c @@ -35,6 +35,7 @@ #include "libavformat/version.h" #include "libavfilter/avfilter.h" #include "libavdevice/avdevice.h" +#include "libavdevice/version.h" #include "libswscale/swscale.h" #include "libswresample/swresample.h" #include "libpostproc/postprocess.h" diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index 8f5aa12600..0f4d14574c 100644 --- a/fftools/ffprobe.c +++ b/fftools/ffprobe.c @@ -52,6 +52,7 @@ #include "libavutil/timecode.h" #include "libavutil/timestamp.h" #include "libavdevice/avdevice.h" +#include "libavdevice/version.h" #include "libswscale/swscale.h" #include "libswresample/swresample.h" #include "libpostproc/postprocess.h" diff --git a/libavdevice/Makefile b/libavdevice/Makefile index 53efda0514..99fea7133a 100644 --- a/libavdevice/Makefile +++ b/libavdevice/Makefile @@ -3,6 +3,7 @@ DESC= FFmpeg device handling library HEADERS = avdevice.h\ version.h \ + version_major.h \ OBJS= alldevices.o \ avdevice.o\ diff --git a/libavdevice/avdevice.c b/libavdevice/avdevice.c index 8f460c7564..833d200054 100644 --- a/libavdevice/avdevice.c +++ b/libavdevice/avdevice.c @@ -22,6 +22,7 @@ #include "avdevice.h" #include "internal.h" #include "config.h" +#include "version.h" #include "libavutil/ffversion.h" const char av_device_ffversion[] = "FFmpeg version " FFMPEG_VERSION; diff --git a/libavdevice/avdevice.h b/libavdevice/avdevice.h index 6f24976dcc..6de0e33819 100644 --- a/libavdevice/avdevice.h +++ b/libavdevice/avdevice.h @@ -19,7 +19,7 @@ #ifndef AVDEVICE_AVDEVICE_H #define AVDEVICE_AVDEVICE_H -#include "version.h" +#include "version_major.h" /** * @file diff --git a/libavdevice/version.h b/libavdevice/version.h index 05234e7f21..513c0bb1bc 100644 --- a/libavdevice/version.h +++ b/libavdevice/version.h @@ -27,7 +27,8 @@ #include "libavutil/version.h" -#define LIBAVDEVICE_VERSION_MAJOR 59 +#include "version_major.h" + #define LIBAVDEVICE_VERSION_MINOR 5 #define LIBAVDEVICE_VERSION_MICRO 100 @@ -41,11 +42,4 @@ #define LIBAVDEVICE_IDENT "Lavd" AV_STRINGIFY(LIBAVDEVICE_VERSION) -/** - * FF_API_* defines may be placed below to indicate public API that will be - * dropped at a future version bump. The defines themselves are not part of - * the public API and may change, break or disappear at any time. - */ -#define FF_API_DEVICE_CAPABILITIES (LIBAVDEVICE_VERSION_MAJOR < 60) - #endif /* AVDEVICE_VERSION_H */ diff --git a/libavdevice/version_major.h b/libavdevice/version_major.h new file mode 100644 index 00..d255ff6992 --- /dev/null +++ b/libavdevice/version_major.h @@ -0,0 +1,37 @@ +/* + * 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 AVDEVICE_VERSION_MAJOR_H +#define AVDEVICE_VERSION_MAJOR_H + +/** + * @file + * @ingroup lavd + * Libavdevice version macros + */ + +#define LIBAVDEVICE_VERSION_MAJOR 59 + +/** + * FF_API_* defines may be placed below to indicate public API that will be + * dropped at a future version bump. The defines themselves are not part of + * the public API and may change, break or disappear at any time. + */ +#define FF_API_DEVICE_CAPABILITIES (LIBAVDEVICE_VERSION_MAJOR < 60) + +#endif /* AVDEVICE_VERSION_MAJOR_H */ -- 2.32.0 (Apple Git-132) ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "
[FFmpeg-devel] [PATCH 11/13] libavfilter: Split version.h
--- fftools/cmdutils.c | 1 + fftools/ffprobe.c | 1 + libavfilter/Makefile| 1 + libavfilter/avfilter.c | 1 + libavfilter/avfilter.h | 2 +- libavfilter/internal.h | 1 - libavfilter/version.h | 13 ++-- libavfilter/version_major.h | 42 + 8 files changed, 49 insertions(+), 13 deletions(-) create mode 100644 libavfilter/version_major.h diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c index d5cadec695..9cceb68412 100644 --- a/fftools/cmdutils.c +++ b/fftools/cmdutils.c @@ -34,6 +34,7 @@ #include "libavformat/avformat.h" #include "libavformat/version.h" #include "libavfilter/avfilter.h" +#include "libavfilter/version.h" #include "libavdevice/avdevice.h" #include "libavdevice/version.h" #include "libswscale/swscale.h" diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index 2e74580ca8..adbf538dbc 100644 --- a/fftools/ffprobe.c +++ b/fftools/ffprobe.c @@ -59,6 +59,7 @@ #include "libswresample/version.h" #include "libpostproc/postprocess.h" #include "libpostproc/version.h" +#include "libavfilter/version.h" #include "cmdutils.h" #include "libavutil/thread.h" diff --git a/libavfilter/Makefile b/libavfilter/Makefile index 56d33e6480..d5fc27a575 100644 --- a/libavfilter/Makefile +++ b/libavfilter/Makefile @@ -5,6 +5,7 @@ HEADERS = avfilter.h \ buffersink.h \ buffersrc.h \ version.h \ + version_major.h \ OBJS = allfilters.o \ audio.o \ diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index 1f37a70179..859c5b837b 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -43,6 +43,7 @@ #include "formats.h" #include "framepool.h" #include "internal.h" +#include "version.h" #include "libavutil/ffversion.h" const char av_filter_ffversion[] = "FFmpeg version " FFMPEG_VERSION; diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h index b105dc3159..37effcf5cd 100644 --- a/libavfilter/avfilter.h +++ b/libavfilter/avfilter.h @@ -47,7 +47,7 @@ #include "libavutil/pixfmt.h" #include "libavutil/rational.h" -#include "libavfilter/version.h" +#include "libavfilter/version_major.h" /** * Return the LIBAVFILTER_VERSION_INT constant. diff --git a/libavfilter/internal.h b/libavfilter/internal.h index 1099b82b4b..53883101a8 100644 --- a/libavfilter/internal.h +++ b/libavfilter/internal.h @@ -28,7 +28,6 @@ #include "avfilter.h" #include "formats.h" #include "framequeue.h" -#include "version.h" #include "video.h" typedef struct AVFilterCommand { diff --git a/libavfilter/version.h b/libavfilter/version.h index 9a890c014f..40fa8d9c47 100644 --- a/libavfilter/version.h +++ b/libavfilter/version.h @@ -29,7 +29,8 @@ #include "libavutil/version.h" -#define LIBAVFILTER_VERSION_MAJOR 8 +#include "version_major.h" + #define LIBAVFILTER_VERSION_MINOR 27 #define LIBAVFILTER_VERSION_MICRO 100 @@ -44,14 +45,4 @@ #define LIBAVFILTER_IDENT "Lavfi" AV_STRINGIFY(LIBAVFILTER_VERSION) -/** - * FF_API_* defines may be placed below to indicate public API that will be - * dropped at a future version bump. The defines themselves are not part of - * the public API and may change, break or disappear at any time. - */ - -#define FF_API_SWS_PARAM_OPTION (LIBAVFILTER_VERSION_MAJOR < 9) -#define FF_API_BUFFERSINK_ALLOC (LIBAVFILTER_VERSION_MAJOR < 9) -#define FF_API_PAD_COUNT(LIBAVFILTER_VERSION_MAJOR < 9) - #endif /* AVFILTER_VERSION_H */ diff --git a/libavfilter/version_major.h b/libavfilter/version_major.h new file mode 100644 index 00..de0cf6e979 --- /dev/null +++ b/libavfilter/version_major.h @@ -0,0 +1,42 @@ +/* + * Version macros. + * + * 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 AVFILTER_VERSION_MAJOR_H +#define AVFILTER_VERSION_MAJOR_H + +/** + * @file + * @ingroup lavfi + * Libavfilt
[FFmpeg-devel] [PATCH 12/13] doc: Add an entry to APIchanges about no longer implicitly including version.h
--- doc/APIchanges | 6 ++ 1 file changed, 6 insertions(+) diff --git a/doc/APIchanges b/doc/APIchanges index ea402f6118..adbfc79e13 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -14,6 +14,12 @@ libavutil: 2021-04-27 API changes, most recent first: +2022-*-* - xx - all libraries + No longer implicitly include lib/version.h in lib/.h. + Users who depend on defines from these files (LIB_VERSION*, + LIB_IDENT) must explicitly include these headers instead of + relying on them being included implicitly. + 2022-02-07 - xx - lavu 57.21.100 - fifo.h Deprecate AVFifoBuffer and the API around it, namely av_fifo_alloc(), av_fifo_alloc_array(), av_fifo_free(), av_fifo_freep(), av_fifo_reset(), -- 2.32.0 (Apple Git-132) ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 13/13] configure: Use a separate config_components.h header for $ALL_COMPONENTS
This avoids unnecessary rebuilds of most source files if only the list of enabled components has changed, but not the other properties of the build, set in config.h. --- configure | 17 +++-- fftools/ffplay.c | 1 + libavcodec/8svx.c | 1 + libavcodec/a64multienc.c | 1 + libavcodec/aac_ac3_parser.c| 1 + libavcodec/aactab.c| 1 + libavcodec/aarch64/h264cmc_neon.S | 1 + libavcodec/ac3_parser.c| 1 + libavcodec/ac3dec.c| 1 + libavcodec/ac3enc.c| 1 + libavcodec/ac3enc_template.c | 1 + libavcodec/adpcm.c | 1 + libavcodec/adpcmenc.c | 1 + libavcodec/allcodecs.c | 1 + libavcodec/aptxdec.c | 1 + libavcodec/aptxenc.c | 1 + libavcodec/arm/flacdsp_init_arm.c | 1 + libavcodec/arm/h264cmc_neon.S | 1 + libavcodec/assdec.c| 1 + libavcodec/assenc.c| 1 + libavcodec/asvdec.c| 1 + libavcodec/asvenc.c| 1 + libavcodec/audiotoolboxdec.c | 1 + libavcodec/av1dec.c| 1 + libavcodec/binkaudio.c | 1 + libavcodec/bintext.c | 1 + libavcodec/bsf.c | 1 + libavcodec/cyuv.c | 1 + libavcodec/flashsv.c | 1 + libavcodec/g726.c | 1 + libavcodec/gsmdec.c| 1 + libavcodec/h263dec.c | 1 + libavcodec/h264_slice.c| 1 + libavcodec/h264dec.c | 2 ++ libavcodec/hevcdec.c | 1 + libavcodec/huffyuvdec.c| 1 + libavcodec/huffyuvenc.c| 1 + libavcodec/idctdsp.c | 1 + libavcodec/iff.c | 1 + libavcodec/imc.c | 1 + libavcodec/ituh263dec.c| 1 + libavcodec/ituh263enc.c| 1 + libavcodec/lcldec.c| 1 + libavcodec/libgsmdec.c | 1 + libavcodec/libgsmenc.c | 1 + libavcodec/libopencore-amr.c | 1 + libavcodec/libvpx.c| 1 + libavcodec/libvpxdec.c | 1 + libavcodec/libvpxenc.c | 1 + libavcodec/libx264.c | 1 + libavcodec/me_cmp.c| 1 + libavcodec/metasound_data.c| 1 + libavcodec/mjpegdec.c | 1 + libavcodec/mjpegenc.c | 1 + libavcodec/mlpdec.c| 1 + libavcodec/mlpenc.c| 1 + libavcodec/mpeg12dec.c | 1 + libavcodec/mpeg12enc.c | 1 + libavcodec/mpeg4videodec.c | 1 + libavcodec/mpegaudiodec_fixed.c| 1 + libavcodec/mpegaudiodec_float.c| 1 + libavcodec/mpegvideo.c | 1 + libavcodec/mpegvideo_enc.c | 1 + libavcodec/mpegvideo_motion.c | 1 + libavcodec/msmpeg4.c | 1 + libavcodec/msmpeg4dec.c| 1 + libavcodec/mvcdec.c| 1 + libavcodec/options.c | 1 + libavcodec/opus_pvq.c | 1 + libavcodec/pcm.c | 1 + libavcodec/pngdec.c| 1 + libavcodec/pnmdec.c| 1 + libavcodec/pnmenc.c| 1 + libavcodec/proresdec2.c| 1 + libavcodec/qpeldsp.c | 1 + libavcodec/r210dec.c | 1 + libavcodec/r210enc.c | 1 + libavcodec/rv34_parser.c | 1 + libavcodec/sonic.c | 1 + libavcodec/sp5xdec.c | 1 + libavcodec/speedhq.c | 1 + libavcodec/speedhqenc.c| 1 + libavcodec/srtdec.c| 1 + libavcodec/srtenc.c| 1 + libavcodec/textdec.c | 1 + libavcodec/v408dec.c | 1 + libavcodec/v408enc.c | 1 + libavcodec/vc1dec.c| 1 + libavcodec/vc1dsp.c| 1 + libavcodec/videotoolbox.c | 1 + libavcodec/vorbis_parser.c | 1 + libavcodec/vp3.c | 1 + libavcodec/vp56dsp.c | 1 + libavcodec/vp8.c | 1 + libavcodec/vp8dsp.c| 1 + libavcodec/vp9.c | 1 + libavcodec/wmadec.c| 1 + libavcodec/wmaenc.c| 1 + libavcodec/x86/flacdsp_init.c | 1 + libavcodec/x86/hpeldsp_init.c | 1 + libavfilter/aeval.c| 1 + libavfilter/af_afade.c | 1 + libavfilter/af_agate.c | 1 + libavfilter/af_biquads.c | 1 + libavfilter/af_sidechaincompress.c | 1 + libavfilter/avf_showspectrum.c | 1 + libavfilter/avf_showwaves.c| 1 + libavfilter/f_bench.c | 1 + libavfilter/f_cue.c| 1 + libavfilter/f_drawgraph.c | 1 + libavfilter/f_graphmonitor.c | 1 + libavfilter/f_interleave.c |
[FFmpeg-devel] [PATCH] Remove mentions of a nonexistent avversion.h
Signed-off-by: Martin Storsjö --- .gitignore | 1 - Makefile | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 1a5bb29ad5..f06d853edf 100644 --- a/.gitignore +++ b/.gitignore @@ -36,7 +36,6 @@ /config.asm /config.h /coverage.info -/avversion.h /lcov/ /src /mapfile diff --git a/Makefile b/Makefile index 2d622ecd9c..1c38c522fb 100644 --- a/Makefile +++ b/Makefile @@ -159,7 +159,7 @@ clean:: $(RM) -rf coverage.info coverage.info.in lcov distclean:: clean - $(RM) .version avversion.h config.asm config.h mapfile \ + $(RM) .version config.asm config.h mapfile \ ffbuild/.config ffbuild/config.* libavutil/avconfig.h \ version.h libavutil/ffversion.h libavcodec/codec_names.h \ libavcodec/bsf_list.c libavformat/protocol_list.c \ -- 2.32.0 (Apple Git-132) ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 06/19] avformat/avio: Don't include common.h
On Tue, 15 Feb 2022, Andreas Rheinhardt wrote: Signed-off-by: Andreas Rheinhardt --- libavformat/avio.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/avio.h b/libavformat/avio.h index cd63322a62..ca970b1ce3 100644 --- a/libavformat/avio.h +++ b/libavformat/avio.h @@ -27,8 +27,9 @@ */ #include +#include -#include "libavutil/common.h" +#include "libavutil/attributes.h" #include "libavutil/dict.h" #include "libavutil/log.h" -- LGTM // Martin ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 07/19] avutil/log: Don't include avutil.h
On Tue, 15 Feb 2022, Andreas Rheinhardt wrote: It has been included since af5f434f8c0fb3b4ee3b206ebc1946ca660a8abe for deprecation reasons, but removing it has been forgotten after it had served is purpose. So remove it. For convenience, include version.h instead as LIBAVUTIL_VERSION_INT is supposed to be used when creating AVClasses. Signed-off-by: Andreas Rheinhardt --- libavcodec/ffjni.c | 1 + libavcodec/libopenh264.c | 1 + libavformat/avc.h | 1 + libavformat/data_uri.c | 1 + libavformat/ip.c | 2 ++ libavutil/cuda_check.h | 1 + libavutil/log.h| 2 +- libavutil/tests/camellia.c | 4 libavutil/tests/cast5.c| 4 libavutil/tests/twofish.c | 2 ++ libavutil/thread.h | 4 libavutil/timecode.c | 1 + libavutil/timer.h | 1 + tools/ffescape.c | 6 ++ 14 files changed, 30 insertions(+), 1 deletion(-) LGTM // Martin ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 08/19] avutil/audio_fifo: Avoid avutil.h inclusion
On Tue, 15 Feb 2022, Andreas Rheinhardt wrote: Signed-off-by: Andreas Rheinhardt --- libavutil/audio_fifo.c | 7 +-- libavutil/audio_fifo.h | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) LGTM // Martin ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 09/19] avutil/fifo: Don't include avutil.h
On Tue, 15 Feb 2022, Andreas Rheinhardt wrote: Signed-off-by: Andreas Rheinhardt --- libavutil/fifo.c | 5 - libavutil/fifo.h | 4 +++- libavutil/threadmessage.c | 2 ++ 3 files changed, 9 insertions(+), 2 deletions(-) LGTM // Martin ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 10/19] avutil/file: Don't include avutil.h
On Tue, 15 Feb 2022, Andreas Rheinhardt wrote: Signed-off-by: Andreas Rheinhardt --- libavutil/file.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) LGTM // Martin ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 11/19] avutil/eval: Don't include avutil.h
On Tue, 15 Feb 2022, Andreas Rheinhardt wrote: It has been added for an FF_API_* at a time when these were in avutil.h. Signed-off-by: Andreas Rheinhardt --- libavutil/eval.h | 2 -- 1 file changed, 2 deletions(-) LGTM // Martin ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 12/19] avutil/imgutils: Don't include avutil.h
On Tue, 15 Feb 2022, Andreas Rheinhardt wrote: It is a remnant of an FF_API_* inclusion (back from when they were in avutil.h and not in version.h). Signed-off-by: Andreas Rheinhardt --- libavutil/imgutils.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) LGTM // Martin ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 13/19] avutil/samplefmt: Don't include attributes.h, avutil.h
On Tue, 15 Feb 2022, Andreas Rheinhardt wrote: Signed-off-by: Andreas Rheinhardt --- libavutil/samplefmt.c | 6 -- libavutil/samplefmt.h | 3 --- 2 files changed, 4 insertions(+), 5 deletions(-) LGTM // Martin ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 14/19] avutil/pixelutils: Don't include common.h
On Tue, 15 Feb 2022, Andreas Rheinhardt wrote: Signed-off-by: Andreas Rheinhardt --- libavutil/pixelutils.h | 1 - 1 file changed, 1 deletion(-) LGTM // Martin ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 15/19] avutil/integer: Don't include common.h
On Tue, 15 Feb 2022, Andreas Rheinhardt wrote: Signed-off-by: Andreas Rheinhardt --- libavutil/integer.c | 4 +++- libavutil/integer.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) LGTM // Martin ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 16/19] avutil/display: Don't include avutil.h
On Tue, 15 Feb 2022, Andreas Rheinhardt wrote: Signed-off-by: Andreas Rheinhardt --- libavutil/display.c | 1 + libavutil/display.h | 1 - libavutil/tests/display.c | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) LGTM // Martin ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 17/19] Remove obsolete version.h inclusions
On Tue, 15 Feb 2022, Andreas Rheinhardt wrote: Forgotten in e7bd47e657bbf9e1ce9915e93bc80cb1a29fb7f3. Signed-off-by: Andreas Rheinhardt --- libavcodec/vc2enc.c| 2 +- libavcodec/x86/blockdsp_init.c | 2 -- libavfilter/internal.h | 1 - libavfilter/vf_swapuv.c| 1 - libavformat/url.h | 1 - libavutil/common.h | 1 - libavutil/internal.h | 1 - libswscale/swscale_internal.h | 1 - 8 files changed, 1 insertion(+), 9 deletions(-) LGTM What do you think of the includes of version.h in libavdevice/android_camera.c, libavcodec/mediacodec.c, libavcodec/mediacodec_wrapper.c and libavcodec/xvmc.h? // Martin ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 1/2] doc/examples/transcode_aac: Don't ignore last encoded frame
The last encoded frame is now fetched on EOF. It was previously left in the encoder and caused a "1 frame left in queue" warning. Signed-off-by: Andreas Unterweger --- doc/examples/transcode_aac.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/doc/examples/transcode_aac.c b/doc/examples/transcode_aac.c index 1cf6317e27..a09690fe45 100644 --- a/doc/examples/transcode_aac.c +++ b/doc/examples/transcode_aac.c @@ -381,6 +381,8 @@ static int decode_audio_frame(AVFrame *frame, if (error < 0) return error; +*data_present = 0; +*finished = 0; /* Read one audio frame from the input file into a temporary packet. */ if ((error = av_read_frame(input_format_context, input_packet)) < 0) { /* If we are at the end of the file, flush the decoder below. */ @@ -559,7 +561,7 @@ static int read_decode_convert_and_store(AVAudioFifo *fifo, AVFrame *input_frame = NULL; /* Temporary storage for the converted input samples. */ uint8_t **converted_input_samples = NULL; -int data_present = 0; +int data_present; int ret = AVERROR_EXIT; /* Initialize temporary storage for one input frame. */ @@ -679,18 +681,17 @@ static int encode_audio_frame(AVFrame *frame, frame->pts = pts; pts += frame->nb_samples; } - + +*data_present = 0; /* Send the audio frame stored in the temporary packet to the encoder. * The output audio stream encoder is used to do this. */ error = avcodec_send_frame(output_codec_context, frame); -/* The encoder signals that it has nothing more to encode. */ -if (error == AVERROR_EOF) { -error = 0; -goto cleanup; -} else if (error < 0) { -fprintf(stderr, "Could not send packet for encoding (error '%s')\n", -av_err2str(error)); -goto cleanup; +/* Check for errors, but proceed with fetching encoded samples if the + * encoder signals that it has nothing more to encode. */ +if (error < 0 && error != AVERROR_EOF) { + fprintf(stderr, "Could not send packet for encoding (error '%s')\n", + av_err2str(error)); + goto cleanup; } /* Receive one encoded frame from the encoder. */ @@ -861,7 +862,6 @@ int main(int argc, char **argv) int data_written; /* Flush the encoder as it may have delayed frames. */ do { -data_written = 0; if (encode_audio_frame(NULL, output_format_context, output_codec_context, &data_written)) goto cleanup; -- 2.30.2 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 2/2] doc/examples/transcode_aac: Set decoder packet timebase
Previously, the default timebase caused two warnings during decoding about not being able to update timestamps for skipped and discarded samples, respectively. Signed-off-by: Andreas Unterweger --- doc/examples/transcode_aac.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/examples/transcode_aac.c b/doc/examples/transcode_aac.c index a09690fe45..55bce475b5 100644 --- a/doc/examples/transcode_aac.c +++ b/doc/examples/transcode_aac.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2018 Andreas Unterweger + * Copyright (c) 2013-2022 Andreas Unterweger * * This file is part of FFmpeg. * @@ -120,6 +120,10 @@ static int open_input_file(const char *filename, avformat_close_input(input_format_context); return error; } + +/* Set the packet timebase for the decoder. The input file's sample + * rate is used as the denominator for simplicity. */ +avctx->pkt_timebase = (AVRational) { 1, avctx->sample_rate }; /* Save the decoder context for easier access later. */ *input_codec_context = avctx; -- 2.30.2 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 18/19] avutil/avassert: Don't include avutil.h
On Tue, 15 Feb 2022, Andreas Rheinhardt wrote: Signed-off-by: Andreas Rheinhardt --- libavcodec/dct.c | 2 ++ libavcodec/mpegaudiodec_common.c | 1 + libavcodec/mqcenc.c | 2 ++ libavcodec/put_bits.h | 1 + libavcodec/rdft.c | 1 + libavcodec/tests/fft.c| 1 + libavcodec/x86/mdct15_init.c | 2 ++ libavfilter/colorspacedsp.c | 1 + libavfilter/window_func.h | 1 + libavutil/avassert.h | 2 +- libavutil/mathematics.c | 1 + libavutil/slicethread.c | 1 + libavutil/tests/aes_ctr.c | 2 ++ libavutil/tests/encryption_info.c | 1 + 14 files changed, 18 insertions(+), 1 deletion(-) LGTM // Martin ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 19/19] Remove unnecessary libavutil/(avutil|common|internal).h inclusions
On Tue, 15 Feb 2022, Andreas Rheinhardt wrote: Some of these were made possible by moving several common macros to libavutil/macros.h. While just at it, also improve the other headers a bit. Signed-off-by: Andreas Rheinhardt --- libavcodec/ac3.c | 3 ++- libavcodec/ac3.h | 1 + libavcodec/ass_split.c| 8 +++- libavcodec/av1_parse.h| 2 +- libavcodec/bitstream.c| 2 +- libavcodec/cabac.c| 5 + libavcodec/celp_math.c| 7 +++ libavcodec/codec_desc.c | 3 ++- libavcodec/dca_exss.h | 2 +- libavcodec/dcadct.c | 2 +- libavcodec/dcadct.h | 3 ++- libavcodec/dcadec.h | 4 +++- libavcodec/dcahuff.c | 2 +- libavcodec/dirac_vlc.h| 2 +- libavcodec/dnxhddata.c| 4 +++- libavcodec/dnxhddata.h| 3 ++- libavcodec/dv_profile.c | 3 ++- libavcodec/elsdec.c | 7 +-- libavcodec/exrdsp.h | 2 +- libavcodec/flacdsp.c | 1 + libavcodec/flacdsp.h | 2 +- libavcodec/flacdsp_lpc_template.c | 2 +- libavcodec/flacdsp_template.c | 2 +- libavcodec/fmtconvert.c | 3 ++- libavcodec/golomb.c | 2 +- libavcodec/h264_levels.c | 2 +- libavcodec/h264_redundant_pps_bsf.c | 7 --- libavcodec/h264_sei.c | 2 +- libavcodec/huffman.c | 5 - libavcodec/jfdctfst.c | 5 ++--- libavcodec/jpeg2000dwt.c | 3 ++- libavcodec/jrevdct.c | 4 +++- libavcodec/lagarithrac.h | 1 - libavcodec/libopus.c | 1 - libavcodec/lsp.c | 4 ++-- libavcodec/lzwenc.c | 2 +- libavcodec/mdct15.c | 3 ++- libavcodec/mips/mpegaudiodsp_mips_fixed.c | 1 + libavcodec/mips/mpegaudiodsp_mips_float.c | 1 + libavcodec/mjpegenc_huffman.c | 3 --- libavcodec/mpegaudiodecheader.c | 2 +- libavcodec/mpegaudiodsp.h | 2 +- libavcodec/msmpeg4data.h | 2 +- libavcodec/opusdsp.c | 2 ++ libavcodec/opusdsp.h | 2 -- libavcodec/pngdsp.c | 2 +- libavcodec/ra288.h| 2 +- libavcodec/rangecoder.h | 2 +- libavcodec/raw.c | 2 +- libavcodec/rle.c | 2 +- libavcodec/scpr3.h| 7 +-- libavcodec/tests/cabac.c | 2 +- libavcodec/tests/jpeg2000dwt.c| 5 + libavcodec/tests/rangecoder.c | 1 + libavcodec/trace_headers_bsf.c| 4 ++-- libavcodec/videodsp.c | 3 ++- libavcodec/vp56data.h | 2 +- libavcodec/vp56rac.c | 4 +++- libavcodec/vp9dsp.c | 4 +++- libavcodec/wavpack.h | 5 - libavcodec/wavpackenc.h | 2 ++ libavcodec/x86/fdct.c | 3 ++- libavcodec/x86/mpegaudiodsp.c | 4 +++- libavcodec/x86/pngdsp_init.c | 3 ++- libavcodec/xiph.c | 2 ++ libavcodec/xiph.h | 2 +- libavdevice/timefilter.c | 6 +- libavfilter/af_afir.h | 13 ++--- libavfilter/af_volume.h | 4 ++-- libavfilter/avfiltergraph.c | 2 -- libavfilter/colorspace.h | 2 +- libavfilter/ebur128.c | 3 ++- libavfilter/motion_estimation.c | 1 + libavfilter/motion_estimation.h | 2 +- libavfilter/pthread.c | 6 +++--- libavformat/argo_asf.h| 2 +- libavformat/asfcrypt.c| 3 ++- libavformat/avlanguage.c | 3 +-- libavformat/hlsplaylist.h | 1 - libavformat/matroska.h| 2 +- libavformat/network.c | 1 - libavformat/riff.c| 3 ++- libavformat/tee_common.c | 5 +++-- libavformat/webmdashenc.c | 2 ++ libavformat/wv.c | 3 ++- libavutil/adler32.c | 2 +- libavutil/aes.c | 8 ++-- libavutil/aes_ctr.c | 5 - libavutil/avsscanf.c | 8 +--- libavutil/avstring.c | 5 - libavutil/base64.c| 6 -- libavutil/blowfish.c | 5 +++-- libavutil/bprint.c| 3 ++-
[FFmpeg-devel] [PATCH 1/4 v2] ffmpeg: flush delayed frames in codec copy scenarios
Bitstream filters inserted between the input and output were never drained, resulting packets being lost if the bsf had any buffered. Signed-off-by: James Almer --- Now also flushing packets when forcing a record duration. fftools/ffmpeg.c| 13 - fftools/ffmpeg.h| 1 + fftools/ffmpeg_filter.c | 1 + fftools/ffmpeg_opt.c| 4 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index e5de099d14..44043ef203 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -2010,7 +2010,7 @@ static int check_output_constraints(InputStream *ist, OutputStream *ost) if (ost->source_index != ist_index) return 0; -if (ost->finished) +if (ost->finished & MUXER_FINISHED) return 0; if (of->start_time != AV_NOPTS_VALUE && ist->pts < of->start_time) @@ -2743,7 +2743,9 @@ static int process_input_packet(InputStream *ist, const AVPacket *pkt, int no_eo } ist->pts = ist->dts; ist->next_pts = ist->next_dts; -} +} else if (!ist->decoding_needed) +eof_reached = 1; + for (i = 0; i < nb_output_streams; i++) { OutputStream *ost = output_streams[i]; @@ -4224,11 +4226,12 @@ static int process_input(int file_index) for (i = 0; i < ifile->nb_streams; i++) { ist = input_streams[ifile->ist_index + i]; avctx = ist->dec_ctx; -if (ist->decoding_needed) { +if (ist->processing_needed) { ret = process_input_packet(ist, NULL, 1); if (ret>0) return 0; -avcodec_flush_buffers(avctx); +if (ist->decoding_needed) +avcodec_flush_buffers(avctx); } } #if HAVE_THREADS @@ -4258,7 +4261,7 @@ static int process_input(int file_index) for (i = 0; i < ifile->nb_streams; i++) { ist = input_streams[ifile->ist_index + i]; -if (ist->decoding_needed) { +if (ist->processing_needed) { ret = process_input_packet(ist, NULL, 0); if (ret>0) return 0; diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index 649f6ee047..82f3db6b6d 100644 --- a/fftools/ffmpeg.h +++ b/fftools/ffmpeg.h @@ -306,6 +306,7 @@ typedef struct InputStream { int decoding_needed; /* non zero if the packets must be decoded in 'raw_fifo', see DECODING_FOR_* */ #define DECODING_FOR_OST1 #define DECODING_FOR_FILTER 2 +int processing_needed; /* non zero if the packets must be processed */ AVCodecContext *dec_ctx; const AVCodec *dec; diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index 31d9a8076e..0845c631a5 100644 --- a/fftools/ffmpeg_filter.c +++ b/fftools/ffmpeg_filter.c @@ -294,6 +294,7 @@ static void init_input_filter(FilterGraph *fg, AVFilterInOut *in) ist->discard = 0; ist->decoding_needed |= DECODING_FOR_FILTER; +ist->processing_needed = 1; ist->st->discard = AVDISCARD_NONE; ifilter = ALLOC_ARRAY_ELEM(fg->inputs, fg->nb_inputs); diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index 76b9020e83..7ff3936dcf 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -2615,6 +2615,7 @@ loop_end: if (ost->encoding_needed && ost->source_index >= 0) { InputStream *ist = input_streams[ost->source_index]; ist->decoding_needed |= DECODING_FOR_OST; +ist->processing_needed = 1; if (ost->st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO || ost->st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) { @@ -2627,6 +2628,9 @@ loop_end: exit_program(1); } } +} else if (ost->stream_copy && ost->source_index >= 0) { +InputStream *ist = input_streams[ost->source_index]; +ist->processing_needed = 1; } /* set the filter output constraints */ -- 2.35.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 2/4 v2] ffmpeg: ensure a keyframe was not seen before skipping packets
A keyframe could be buffered in the bsf and not be output until more packets had been fed to it. Signed-off-by: James Almer --- Changed the check from pkt to !eof, since a packet is always provided. fftools/ffmpeg.c | 4 +++- fftools/ffmpeg.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 44043ef203..2b61c0d5aa 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -890,6 +890,8 @@ static void output_packet(OutputFile *of, AVPacket *pkt, /* apply the output bitstream filters */ if (ost->bsf_ctx) { +if (!eof && pkt->flags & AV_PKT_FLAG_KEY) +ost->seen_kf = 1; ret = av_bsf_send_packet(ost->bsf_ctx, eof ? NULL : pkt); if (ret < 0) goto finish; @@ -2035,7 +2037,7 @@ static void do_streamcopy(InputStream *ist, OutputStream *ost, const AVPacket *p } if ((!ost->frame_number && !(pkt->flags & AV_PKT_FLAG_KEY)) && -!ost->copy_initial_nonkeyframes) +!ost->copy_initial_nonkeyframes && !ost->seen_kf) return; if (!ost->frame_number && !ost->copy_prior_start) { diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index 82f3db6b6d..6a19dc9c7c 100644 --- a/fftools/ffmpeg.h +++ b/fftools/ffmpeg.h @@ -534,6 +534,7 @@ typedef struct OutputStream { int inputs_done; const char *attachment_filename; +int seen_kf; int copy_initial_nonkeyframes; int copy_prior_start; char *disposition; -- 2.35.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 3/4] avcodec/setts_bsf: add NEXT_PTS/DTS expression constants
They correspond to the relevant fields from the packet that follows the one where the expressions are being applied. Signed-off-by: James Almer --- No changes since last version. Already LGTM'd by Paul. libavcodec/setts_bsf.c | 75 -- 1 file changed, 50 insertions(+), 25 deletions(-) diff --git a/libavcodec/setts_bsf.c b/libavcodec/setts_bsf.c index d604f91f71..f0243a1114 100644 --- a/libavcodec/setts_bsf.c +++ b/libavcodec/setts_bsf.c @@ -37,6 +37,8 @@ static const char *const var_names[] = { "PREV_INDTS", ///< previous input DTS "PREV_OUTPTS", ///< previous output PTS "PREV_OUTDTS", ///< previous output DTS +"NEXT_PTS",///< next input PTS +"NEXT_DTS",///< next input DTS "PTS", ///< original PTS in the file of the frame "DTS", ///< original DTS in the file of the frame "STARTPTS",///< PTS at start of movie @@ -55,6 +57,8 @@ enum var_name { VAR_PREV_INDTS, VAR_PREV_OUTPTS, VAR_PREV_OUTDTS, +VAR_NEXT_PTS, +VAR_NEXT_DTS, VAR_PTS, VAR_DTS, VAR_STARTPTS, @@ -76,16 +80,16 @@ typedef struct SetTSContext { int64_t start_pts; int64_t start_dts; -int64_t prev_inpts; -int64_t prev_indts; -int64_t prev_outpts; -int64_t prev_outdts; double var_values[VAR_VARS_NB]; AVExpr *ts_expr; AVExpr *pts_expr; AVExpr *dts_expr; + +AVPacket *prev_inpkt; +AVPacket *prev_outpkt; +AVPacket *cur_pkt; } SetTSContext; static int setts_init(AVBSFContext *ctx) @@ -93,6 +97,12 @@ static int setts_init(AVBSFContext *ctx) SetTSContext *s = ctx->priv_data; int ret; +s->prev_inpkt = av_packet_alloc(); +s->prev_outpkt = av_packet_alloc(); +s->cur_pkt = av_packet_alloc(); +if (!s->prev_inpkt || !s->prev_outpkt || !s->cur_pkt) +return AVERROR(ENOMEM); + if ((ret = av_expr_parse(&s->ts_expr, s->ts_str, var_names, NULL, NULL, NULL, NULL, 0, ctx)) < 0) { av_log(ctx, AV_LOG_ERROR, "Error while parsing ts expression '%s'\n", s->ts_str); @@ -118,10 +128,6 @@ static int setts_init(AVBSFContext *ctx) s->frame_number= 0; s->start_pts = AV_NOPTS_VALUE; s->start_dts = AV_NOPTS_VALUE; -s->prev_inpts = AV_NOPTS_VALUE; -s->prev_indts = AV_NOPTS_VALUE; -s->prev_outpts = AV_NOPTS_VALUE; -s->prev_outdts = AV_NOPTS_VALUE; s->var_values[VAR_NOPTS] = AV_NOPTS_VALUE; return 0; @@ -134,24 +140,31 @@ static int setts_filter(AVBSFContext *ctx, AVPacket *pkt) int ret; ret = ff_bsf_get_packet_ref(ctx, pkt); -if (ret < 0) +if (ret < 0 && (ret != AVERROR_EOF || !s->cur_pkt->data)) return ret; +if (!s->cur_pkt->data) { + av_packet_move_ref(s->cur_pkt, pkt); + return AVERROR(EAGAIN); +} + if (s->start_pts == AV_NOPTS_VALUE) -s->start_pts = pkt->pts; +s->start_pts = s->cur_pkt->pts; if (s->start_dts == AV_NOPTS_VALUE) -s->start_dts = pkt->dts; +s->start_dts = s->cur_pkt->dts; s->var_values[VAR_N] = s->frame_number++; -s->var_values[VAR_TS] = pkt->dts; -s->var_values[VAR_POS] = pkt->pos; -s->var_values[VAR_PTS] = pkt->pts; -s->var_values[VAR_DTS] = pkt->dts; -s->var_values[VAR_PREV_INPTS] = s->prev_inpts; -s->var_values[VAR_PREV_INDTS] = s->prev_indts; -s->var_values[VAR_PREV_OUTPTS] = s->prev_outpts; -s->var_values[VAR_PREV_OUTDTS] = s->prev_outdts; +s->var_values[VAR_TS] = s->cur_pkt->dts; +s->var_values[VAR_POS] = s->cur_pkt->pos; +s->var_values[VAR_PTS] = s->cur_pkt->pts; +s->var_values[VAR_DTS] = s->cur_pkt->dts; +s->var_values[VAR_PREV_INPTS] = s->prev_inpkt->pts; +s->var_values[VAR_PREV_INDTS] = s->prev_inpkt->dts; +s->var_values[VAR_PREV_OUTPTS] = s->prev_outpkt->pts; +s->var_values[VAR_PREV_OUTDTS] = s->prev_outpkt->dts; +s->var_values[VAR_NEXT_PTS]= pkt->pts; +s->var_values[VAR_NEXT_DTS]= pkt->dts; s->var_values[VAR_STARTPTS]= s->start_pts; s->var_values[VAR_STARTDTS]= s->start_dts; s->var_values[VAR_TB] = ctx->time_base_out.den ? av_q2d(ctx->time_base_out) : 0; @@ -160,27 +173,35 @@ static int setts_filter(AVBSFContext *ctx, AVPacket *pkt) new_ts = llrint(av_expr_eval(s->ts_expr, s->var_values, NULL)); if (s->pts_str) { -s->var_values[VAR_TS] = pkt->pts; +s->var_values[VAR_TS] = s->cur_pkt->pts; new_pts = llrint(av_expr_eval(s->pts_expr, s->var_values, NULL)); } else { new_pts = new_ts; } if (s->dts_str) { -s->var_values[VAR_TS] = pkt->dts; +s->var_values[VAR_TS] = s->cur_pkt->dts; new_dts = llrint(av_expr_eval(s->dts_expr, s->var_values, NULL)); } else { new_dts = new_ts; } -s->prev_inpts = pkt->pts; -s->prev_indts
[FFmpeg-devel] [PATCH 4/4 v2] avcodec/setts_bsf: add constants to modify packet duration
Signed-off-by: James Almer --- No changes since last version. Already LGTM'd by Paul. libavcodec/setts_bsf.c | 25 - 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/libavcodec/setts_bsf.c b/libavcodec/setts_bsf.c index f0243a1114..eadc4e4d34 100644 --- a/libavcodec/setts_bsf.c +++ b/libavcodec/setts_bsf.c @@ -35,12 +35,16 @@ static const char *const var_names[] = { "POS", ///< original position in the file of the frame "PREV_INPTS", ///< previous input PTS "PREV_INDTS", ///< previous input DTS +"PREV_INDURATION", ///< previous input duration "PREV_OUTPTS", ///< previous output PTS "PREV_OUTDTS", ///< previous output DTS +"PREV_OUTDURATION", ///< previous output duration "NEXT_PTS",///< next input PTS "NEXT_DTS",///< next input DTS +"NEXT_DURATION", ///< next input duration "PTS", ///< original PTS in the file of the frame "DTS", ///< original DTS in the file of the frame +"DURATION",///< original duration in the file of the frame "STARTPTS",///< PTS at start of movie "STARTDTS",///< DTS at start of movie "TB", ///< timebase of the stream @@ -55,12 +59,16 @@ enum var_name { VAR_POS, VAR_PREV_INPTS, VAR_PREV_INDTS, +VAR_PREV_INDUR, VAR_PREV_OUTPTS, VAR_PREV_OUTDTS, +VAR_PREV_OUTDUR, VAR_NEXT_PTS, VAR_NEXT_DTS, +VAR_NEXT_DUR, VAR_PTS, VAR_DTS, +VAR_DURATION, VAR_STARTPTS, VAR_STARTDTS, VAR_TB, @@ -75,6 +83,7 @@ typedef struct SetTSContext { char *ts_str; char *pts_str; char *dts_str; +char *duration_str; int64_t frame_number; @@ -86,6 +95,7 @@ typedef struct SetTSContext { AVExpr *ts_expr; AVExpr *pts_expr; AVExpr *dts_expr; +AVExpr *duration_expr; AVPacket *prev_inpkt; AVPacket *prev_outpkt; @@ -109,6 +119,12 @@ static int setts_init(AVBSFContext *ctx) return ret; } +if ((ret = av_expr_parse(&s->duration_expr, s->duration_str, + var_names, NULL, NULL, NULL, NULL, 0, ctx)) < 0) { +av_log(ctx, AV_LOG_ERROR, "Error while parsing duration expression '%s'\n", s->duration_str); +return ret; +} + if (s->pts_str) { if ((ret = av_expr_parse(&s->pts_expr, s->pts_str, var_names, NULL, NULL, NULL, NULL, 0, ctx)) < 0) { @@ -136,7 +152,7 @@ static int setts_init(AVBSFContext *ctx) static int setts_filter(AVBSFContext *ctx, AVPacket *pkt) { SetTSContext *s = ctx->priv_data; -int64_t new_ts, new_pts, new_dts; +int64_t new_ts, new_pts, new_dts, new_duration; int ret; ret = ff_bsf_get_packet_ref(ctx, pkt); @@ -159,18 +175,23 @@ static int setts_filter(AVBSFContext *ctx, AVPacket *pkt) s->var_values[VAR_POS] = s->cur_pkt->pos; s->var_values[VAR_PTS] = s->cur_pkt->pts; s->var_values[VAR_DTS] = s->cur_pkt->dts; +s->var_values[VAR_DURATION]= s->cur_pkt->duration; s->var_values[VAR_PREV_INPTS] = s->prev_inpkt->pts; s->var_values[VAR_PREV_INDTS] = s->prev_inpkt->dts; +s->var_values[VAR_PREV_INDUR] = s->prev_inpkt->duration; s->var_values[VAR_PREV_OUTPTS] = s->prev_outpkt->pts; s->var_values[VAR_PREV_OUTDTS] = s->prev_outpkt->dts; +s->var_values[VAR_PREV_OUTDUR] = s->prev_outpkt->duration; s->var_values[VAR_NEXT_PTS]= pkt->pts; s->var_values[VAR_NEXT_DTS]= pkt->dts; +s->var_values[VAR_NEXT_DUR]= pkt->duration; s->var_values[VAR_STARTPTS]= s->start_pts; s->var_values[VAR_STARTDTS]= s->start_dts; s->var_values[VAR_TB] = ctx->time_base_out.den ? av_q2d(ctx->time_base_out) : 0; s->var_values[VAR_SR] = ctx->par_in->sample_rate; new_ts = llrint(av_expr_eval(s->ts_expr, s->var_values, NULL)); +new_duration = llrint(av_expr_eval(s->duration_expr, s->var_values, NULL)); if (s->pts_str) { s->var_values[VAR_TS] = s->cur_pkt->pts; @@ -197,6 +218,7 @@ static int setts_filter(AVBSFContext *ctx, AVPacket *pkt) pkt->pts = new_pts; pkt->dts = new_dts; +pkt->duration = new_duration; ret = av_packet_ref(s->prev_outpkt, pkt); if (ret < 0) @@ -228,6 +250,7 @@ static const AVOption options[] = { { "ts", "set expression for packet PTS and DTS", OFFSET(ts_str), AV_OPT_TYPE_STRING, {.str="TS"}, 0, 0, FLAGS }, { "pts", "set expression for packet PTS", OFFSET(pts_str), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, FLAGS }, { "dts", "set expression for packet DTS", OFFSET(dts_str), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, FLAGS }, +{ "duration", "set expression for packet duration", OFFSET(duration_str), AV_OPT_TYPE_STRING, {.str="DURATION"}, 0, 0, FLAGS }, { NULL }, }; -- 2.35.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffm
Re: [FFmpeg-devel] [PATCH 17/19] Remove obsolete version.h inclusions
Martin Storsjö: > On Tue, 15 Feb 2022, Andreas Rheinhardt wrote: > >> Forgotten in e7bd47e657bbf9e1ce9915e93bc80cb1a29fb7f3. >> >> Signed-off-by: Andreas Rheinhardt >> --- >> libavcodec/vc2enc.c | 2 +- >> libavcodec/x86/blockdsp_init.c | 2 -- >> libavfilter/internal.h | 1 - >> libavfilter/vf_swapuv.c | 1 - >> libavformat/url.h | 1 - >> libavutil/common.h | 1 - >> libavutil/internal.h | 1 - >> libswscale/swscale_internal.h | 1 - >> 8 files changed, 1 insertion(+), 9 deletions(-) > > LGTM > > What do you think of the includes of version.h in > libavdevice/android_camera.c, libavcodec/mediacodec.c, > libavcodec/mediacodec_wrapper.c and libavcodec/xvmc.h? > > // Martin > The one from android_camera.c stems from a misunderstanding: It used LIBAVDEVICE_VERSION_INT until 13b77af2f0b56d6c87bb147947337981c21f4245, so it is safe to remove (or replace by lavu/version.h). The mediacodec.c has been added for reasons unknown and seems to have been unnecessary all the time. The one in mediacodec_wrapper.c stems from the same misunderstanding as for android_camera.c. Has been fixed in c0bce367e4932f0fb09195e6978ac1a5a60480a4. xvmc.h's inclusion is certainly unnecessary. But who cares given that this header isn't included anywhere? - Andreas ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 06/19] avformat/avio: Don't include common.h
Martin Storsjö: > On Tue, 15 Feb 2022, Andreas Rheinhardt wrote: > >> Signed-off-by: Andreas Rheinhardt >> --- >> libavformat/avio.h | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/libavformat/avio.h b/libavformat/avio.h >> index cd63322a62..ca970b1ce3 100644 >> --- a/libavformat/avio.h >> +++ b/libavformat/avio.h >> @@ -27,8 +27,9 @@ >> */ >> >> #include >> +#include >> >> -#include "libavutil/common.h" >> +#include "libavutil/attributes.h" >> #include "libavutil/dict.h" >> #include "libavutil/log.h" >> >> -- > > LGTM > > // Martin > Thanks for taking a look at this patchset. Will apply it tomorrow unless there are objections. - Andreas ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] Too many project ideas in GSOC 2022 FFmpeg
On Mon, Feb 21, 2022 at 07:24:15PM +0100, Michael Niedermayer wrote: > On Mon, Feb 21, 2022 at 08:59:16AM -0800, Pierre-Anthony Lemieux wrote: > > Hi Michael, > > > > What is the typical size of a successful GSOC project? Any good > > example(s) from the past? > > for past Results > see: (and replace teh year by other years) > https://trac.ffmpeg.org/wiki/SponsoringPrograms/GSoC/2020/Results > > but also keep in mind it makes a big difference if the student had > previously outside gsoc contributed to FFmpeg > > also this year there are multiple changes in GSOC > there will be 2 project sizes and more people will be eligible IIUC Note to everyone, please add the project duration to your entry on trac this year there are 2 sizes, so we should say something about that. It may be possible to also leave that open for now, ive seen other organizations do that. But we should say something for each project. Ive also reorganized my 2 projects so there is now a long and a short one and about the checkasm project, i think its a really good idea and i hope someone will mentor it. But as long as noone mentors it it should be moved to a section for projects without mentors I took the liberty to CC the people who added the other entries, as the time before google reviews this is unknown to me PS: And we need backup mentors for all projects, google has been allergic to projects which do not list a backup mentor thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Many that live deserve death. And some that die deserve life. Can you give it to them? Then do not be too eager to deal out death in judgement. For even the very wise cannot see all ends. -- Gandalf signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] Too many project ideas in GSOC 2022 FFmpeg
On Wed, Feb 23, 2022 at 5:22 PM Michael Niedermayer wrote: > On Mon, Feb 21, 2022 at 07:24:15PM +0100, Michael Niedermayer wrote: > > On Mon, Feb 21, 2022 at 08:59:16AM -0800, Pierre-Anthony Lemieux wrote: > > > Hi Michael, > > > > > > What is the typical size of a successful GSOC project? Any good > > > example(s) from the past? > > > > for past Results > > see: (and replace teh year by other years) > > https://trac.ffmpeg.org/wiki/SponsoringPrograms/GSoC/2020/Results > > > > but also keep in mind it makes a big difference if the student had > > previously outside gsoc contributed to FFmpeg > > > > also this year there are multiple changes in GSOC > > there will be 2 project sizes and more people will be eligible IIUC > > Note to everyone, please add the project duration to your entry on trac > this year there are 2 sizes, so we should say something about that. > It may be possible to also leave that open for now, ive seen other > organizations do that. But we should say something for each project. > > Ive also reorganized my 2 projects so there is now a long and a short > one > > and about the checkasm project, i think its a really good idea and i > hope someone will mentor it. > But as long as noone mentors it it should be moved to a section > for projects without mentors > > I took the liberty to CC the people who added the other entries, as > the time before google reviews this is unknown to me > > PS: And we need backup mentors for all projects, google has been allergic > to projects which do not list a backup mentor > > > thx > > [...] > > -- > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB > > Many that live deserve death. And some that die deserve life. Can you give > it to them? Then do not be too eager to deal out death in judgement. For > even the very wise cannot see all ends. -- Gandalf > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". > Perhaps this one is not for ffmpeg itself but more of a research project? I've recently become aware of the LCECV [1] codec. That's sadly partly free. It would be amazing if someone for GSoC could "invent" something like LCEVC. ffmpeg would probably be a nice place for that. The knowledge certainly is in this community! The result would be an alternative - and open - alternative to LCEVC. I kinda like this codec concept because it manages to get out higher quality with current hardware and current codecs that those codecs on their own can't reach. See [2] for much more information if you're interested. Just an idea. [1] https://en.wikipedia.org/wiki/LCEVC [2] https://www.youtube.com/watch?v=Frrw8O2ax6I ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 1/2] avformat/avisynth: remove unused variable 'frameprop'
On 2/19/22 4:41 PM, Stephen Hutchinson wrote: Since the check got simplified and stdbool was no longer necessary to include, neither is that variable. Silences a warning. Signed-off-by: Stephen Hutchinson --- libavformat/avisynth.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libavformat/avisynth.c b/libavformat/avisynth.c index 2bd0c6949b..03489f180f 100644 --- a/libavformat/avisynth.c +++ b/libavformat/avisynth.c @@ -245,7 +245,6 @@ static int avisynth_create_stream_video(AVFormatContext *s, AVStream *st) const AVS_Map *avsmap; AVS_VideoFrame *frame; int framedata, error; -bool frameprop; int planar = 0; // 0: packed, 1: YUV, 2: Y8, 3: Planar RGB, 4: YUVA, 5: Planar RGBA st->codecpar->codec_type = AVMEDIA_TYPE_VIDEO; Pushed. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] avformat/avisynth: remove framedata variable
On 2/19/22 7:09 PM, Stephen Hutchinson wrote: It's just a simple index. Addresses Coverity issue 1500290 Signed-off-by: Stephen Hutchinson --- libavformat/avisynth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/avisynth.c b/libavformat/avisynth.c index 03489f180f..318588ff52 100644 --- a/libavformat/avisynth.c +++ b/libavformat/avisynth.c @@ -244,7 +244,7 @@ static int avisynth_create_stream_video(AVFormatContext *s, AVStream *st) AviSynthContext *avs = s->priv_data; const AVS_Map *avsmap; AVS_VideoFrame *frame; -int framedata, error; +int error; int planar = 0; // 0: packed, 1: YUV, 2: Y8, 3: Planar RGB, 4: YUVA, 5: Planar RGBA st->codecpar->codec_type = AVMEDIA_TYPE_VIDEO; @@ -507,7 +507,7 @@ static int avisynth_create_stream_video(AVFormatContext *s, AVStream *st) if (avs_library.avs_get_version(avs->clip) >= 9) { -frame = avs_library.avs_get_frame(avs->clip, framedata); +frame = avs_library.avs_get_frame(avs->clip, 0); avsmap = avs_library.avs_get_frame_props_ro(avs->env, frame); /* Field order */ Pushed. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] RPL Acorn Replay Video - type 7 files
Greetings I encountered some RPL acorn replay video files of a compression type 7 that ffmpeg doesn't have support for. I submitted a bug report here: https://trac.ffmpeg.org/ticket/9655 It includes sample files and a link to the file format. I'd love to see support added to ffmpeg for this compression type. I am willing to fund the development of adding that type, if that's something that can help get it added :) ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 17/19] Remove obsolete version.h inclusions
On Wed, 23 Feb 2022, Andreas Rheinhardt wrote: Martin Storsjö: On Tue, 15 Feb 2022, Andreas Rheinhardt wrote: Forgotten in e7bd47e657bbf9e1ce9915e93bc80cb1a29fb7f3. Signed-off-by: Andreas Rheinhardt --- libavcodec/vc2enc.c | 2 +- libavcodec/x86/blockdsp_init.c | 2 -- libavfilter/internal.h | 1 - libavfilter/vf_swapuv.c | 1 - libavformat/url.h | 1 - libavutil/common.h | 1 - libavutil/internal.h | 1 - libswscale/swscale_internal.h | 1 - 8 files changed, 1 insertion(+), 9 deletions(-) LGTM What do you think of the includes of version.h in libavdevice/android_camera.c, libavcodec/mediacodec.c, libavcodec/mediacodec_wrapper.c and libavcodec/xvmc.h? // Martin The one from android_camera.c stems from a misunderstanding: It used LIBAVDEVICE_VERSION_INT until 13b77af2f0b56d6c87bb147947337981c21f4245, so it is safe to remove (or replace by lavu/version.h). The mediacodec.c has been added for reasons unknown and seems to have been unnecessary all the time. The one in mediacodec_wrapper.c stems from the same misunderstanding as for android_camera.c. Has been fixed in c0bce367e4932f0fb09195e6978ac1a5a60480a4. Thanks! xvmc.h's inclusion is certainly unnecessary. But who cares given that this header isn't included anywhere? It just came up when grepping for 'version.h', and I was trying to check whether it could be enough with 'version_major.h' in my patchset or not. // Martin ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH v2] swscale: Take the destination range into account for yuv->rgb->yuv conversions
The range parameters need to be set up before calling sws_init_context (which selects which fastpaths can be used; this gets called by sws_getContext); solely passing them via sws_setColorspaceDetails isn't enough. This fixes producing full range YUV range output when doing YUV->YUV conversions between different YUV color spaces. Signed-off-by: Martin Storsjö --- libswscale/utils.c| 11 --- tests/fate/libswscale.mak | 16 tests/ref/fate/sws-yuv-colorspace | 6 ++ tests/ref/fate/sws-yuv-range | 6 ++ 4 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 tests/ref/fate/sws-yuv-colorspace create mode 100644 tests/ref/fate/sws-yuv-range diff --git a/libswscale/utils.c b/libswscale/utils.c index 7c8e1bbdde..34f7f0b869 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -1037,11 +1037,16 @@ int sws_setColorspaceDetails(struct SwsContext *c, const int inv_table[4], srcRange, table, dstRange, brightness, contrast, saturation); -c->cascaded_context[1] = sws_getContext(tmp_width, tmp_height, tmp_format, -dstW, dstH, c->dstFormat, -c->flags, NULL, NULL, c->param); +c->cascaded_context[1] = sws_alloc_set_opts(tmp_width, tmp_height, tmp_format, +dstW, dstH, c->dstFormat, +c->flags, c->param); if (!c->cascaded_context[1]) return -1; +c->cascaded_context[1]->srcRange = srcRange; +c->cascaded_context[1]->dstRange = dstRange; +ret = sws_init_context(c->cascaded_context[1], NULL , NULL); +if (ret < 0) +return ret; sws_setColorspaceDetails(c->cascaded_context[1], inv_table, srcRange, table, dstRange, 0, 1 << 16, 1 << 16); diff --git a/tests/fate/libswscale.mak b/tests/fate/libswscale.mak index cf9319ec44..f8572f9c37 100644 --- a/tests/fate/libswscale.mak +++ b/tests/fate/libswscale.mak @@ -17,6 +17,22 @@ $(SWS_SLICE_TEST-yes): tools/scale_slice_test$(EXESUF) $(SWS_SLICE_TEST-yes): REF = /dev/null FATE_LIBSWSCALE_SAMPLES += $(SWS_SLICE_TEST-yes) +FATE_LIBSWSCALE-$(CONFIG_RAWVIDEO_DEMUXER) += fate-sws-yuv-colorspace +fate-sws-yuv-colorspace: tests/data/vsynth1.yuv +fate-sws-yuv-colorspace: ffmpeg$(PROGSSUF)$(EXESUF) +fate-sws-yuv-colorspace: CMD = framecrc \ + -f rawvideo -s 352x288 -pix_fmt yuv420p -i $(TARGET_PATH)/tests/data/vsynth1.yuv \ + -frames 1 \ + -vf scale=in_color_matrix=bt709:in_range=limited:out_color_matrix=bt601:out_range=full:flags=+accurate_rnd+bitexact + +FATE_LIBSWSCALE-$(CONFIG_RAWVIDEO_DEMUXER) += fate-sws-yuv-range +fate-sws-yuv-range: tests/data/vsynth1.yuv +fate-sws-yuv-range: ffmpeg$(PROGSSUF)$(EXESUF) +fate-sws-yuv-range: CMD = framecrc \ + -f rawvideo -s 352x288 -pix_fmt yuv420p -i $(TARGET_PATH)/tests/data/vsynth1.yuv \ + -frames 1 \ + -vf scale=in_color_matrix=bt601:in_range=limited:out_color_matrix=bt601:out_range=full:flags=+accurate_rnd+bitexact + FATE_LIBSWSCALE += $(FATE_LIBSWSCALE-yes) FATE_LIBSWSCALE_SAMPLES += $(FATE_LIBSWSCALE_SAMPLES-yes) FATE-$(CONFIG_SWSCALE) += $(FATE_LIBSWSCALE) diff --git a/tests/ref/fate/sws-yuv-colorspace b/tests/ref/fate/sws-yuv-colorspace new file mode 100644 index 00..bcf3c4b89c --- /dev/null +++ b/tests/ref/fate/sws-yuv-colorspace @@ -0,0 +1,6 @@ +#tb 0: 1/25 +#media_type 0: video +#codec_id 0: rawvideo +#dimensions 0: 352x288 +#sar 0: 0/1 +0, 0, 0,1, 152064, 0xcbcb97b9 diff --git a/tests/ref/fate/sws-yuv-range b/tests/ref/fate/sws-yuv-range new file mode 100644 index 00..5b6f93b225 --- /dev/null +++ b/tests/ref/fate/sws-yuv-range @@ -0,0 +1,6 @@ +#tb 0: 1/25 +#media_type 0: video +#codec_id 0: rawvideo +#dimensions 0: 352x288 +#sar 0: 0/1 +0, 0, 0,1, 152064, 0xe75c71a9 -- 2.32.0 (Apple Git-132) ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 1/3] fftools/ffmpeg_opt: Simplify adding new input/output streams
Signed-off-by: Andreas Rheinhardt --- fftools/ffmpeg_opt.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index 3102851885..c22c6aca06 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -784,7 +784,7 @@ static void add_input_streams(OptionsContext *o, AVFormatContext *ic) for (i = 0; i < ic->nb_streams; i++) { AVStream *st = ic->streams[i]; AVCodecParameters *par = st->codecpar; -InputStream *ist = av_mallocz(sizeof(*ist)); +InputStream *ist; char *framerate = NULL, *hwaccel_device = NULL; const char *hwaccel = NULL; char *hwaccel_output_format = NULL; @@ -795,12 +795,7 @@ static void add_input_streams(OptionsContext *o, AVFormatContext *ic) const AVOption *discard_opt = av_opt_find(&cc, "skip_frame", NULL, 0, AV_OPT_SEARCH_FAKE_OBJ); -if (!ist) -exit_program(1); - -GROW_ARRAY(input_streams, nb_input_streams); -input_streams[nb_input_streams - 1] = ist; - +ist = ALLOC_ARRAY_ELEM(input_streams, nb_input_streams); ist->st = st; ist->file_index = nb_input_files; ist->discard = 1; @@ -1445,10 +1440,7 @@ static OutputStream *new_output_stream(OptionsContext *o, AVFormatContext *oc, e if (oc->nb_streams - 1 < o->nb_streamid_map) st->id = o->streamid_map[oc->nb_streams - 1]; -GROW_ARRAY(output_streams, nb_output_streams); -if (!(ost = av_mallocz(sizeof(*ost -exit_program(1); -output_streams[nb_output_streams - 1] = ost; +ost = ALLOC_ARRAY_ELEM(output_streams, nb_output_streams); ost->file_index = nb_output_files - 1; ost->index = idx; -- 2.32.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 2/3] fftools/ffmpeg_opt: Simplify adding complex filtergraph
Signed-off-by: Andreas Rheinhardt --- fftools/ffmpeg_opt.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index c22c6aca06..44ec759e35 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -3271,9 +3271,8 @@ static int opt_audio_qscale(void *optctx, const char *opt, const char *arg) static int opt_filter_complex(void *optctx, const char *opt, const char *arg) { -FilterGraph *fg; -ALLOC_ARRAY_ELEM(filtergraphs, nb_filtergraphs); -fg = filtergraphs[nb_filtergraphs - 1]; +FilterGraph *fg = ALLOC_ARRAY_ELEM(filtergraphs, nb_filtergraphs); + fg->index = nb_filtergraphs - 1; fg->graph_desc = av_strdup(arg); if (!fg->graph_desc) -- 2.32.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 3/3] fftools/ffmpeg: Don't presume frame_queue to have been allocated
Fixes segfaults upon allocation failure. Signed-off-by: Andreas Rheinhardt --- fftools/ffmpeg.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 7beea11933..e9de8fb430 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -527,11 +527,13 @@ static void ffmpeg_cleanup(int ret) for (j = 0; j < fg->nb_inputs; j++) { InputFilter *ifilter = fg->inputs[j]; struct InputStream *ist = ifilter->ist; -AVFrame *frame; -while (av_fifo_read(ifilter->frame_queue, &frame, 1) >= 0) -av_frame_free(&frame); -av_fifo_freep2(&ifilter->frame_queue); +if (ifilter->frame_queue) { +AVFrame *frame; +while (av_fifo_read(ifilter->frame_queue, &frame, 1) >= 0) +av_frame_free(&frame); +av_fifo_freep2(&ifilter->frame_queue); +} av_freep(&ifilter->displaymatrix); if (ist->sub2video.sub_queue) { AVSubtitle sub; -- 2.32.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 3/3] avformat/rmdec: Better duplicate tags check
Fixes: memleaks Fixes: 44810/clusterfuzz-testcase-minimized-ffmpeg_dem_IVR_fuzzer-5619494647627776 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavformat/rmdec.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c index 3a3f6aaf09..b0a38bee83 100644 --- a/libavformat/rmdec.c +++ b/libavformat/rmdec.c @@ -127,10 +127,6 @@ static int rm_read_audio_stream_info(AVFormatContext *s, AVIOContext *pb, uint32_t version; int ret; -// Duplicate tags -if (st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) -return AVERROR_INVALIDDATA; - /* ra type header */ version = avio_rb16(pb); /* version */ if (version == 3) { @@ -330,6 +326,11 @@ int ff_rm_read_mdpr_codecdata(AVFormatContext *s, AVIOContext *pb, if (codec_data_size == 0) return 0; +// Duplicate tags +if ( st->codecpar->codec_type != AVMEDIA_TYPE_UNKNOWN +&& st->codecpar->codec_type != AVMEDIA_TYPE_DATA) +return AVERROR_INVALIDDATA; + avpriv_set_pts_info(st, 64, 1, 1000); codec_pos = avio_tell(pb); v = avio_rb32(pb); -- 2.17.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 1/3] tools/target_dem_fuzzer: Check fmt before dereferencing
Fixes: NULL pointer dereference Fixes: 44884/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-4656748688965632 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- tools/target_dem_fuzzer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/target_dem_fuzzer.c b/tools/target_dem_fuzzer.c index 687989ccc8..32767a0182 100644 --- a/tools/target_dem_fuzzer.c +++ b/tools/target_dem_fuzzer.c @@ -173,7 +173,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { } // HLS uses a loop with sleep, we thus must breakout or we timeout -if (!strcmp(fmt->name, "hls")) +if (fmt && !strcmp(fmt->name, "hls")) interrupt_counter &= 31; if (!io_buffer_size || size / io_buffer_size > maxblocks) -- 2.17.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 2/3] tools/target_dec_fuzzer: Adjust threshold for targa
Fixes: Timeout Fixes: 44877/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TARGA_fuzzer-4870505251864576 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- tools/target_dec_fuzzer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/target_dec_fuzzer.c b/tools/target_dec_fuzzer.c index 13766d22b9..cef71e1e0a 100644 --- a/tools/target_dec_fuzzer.c +++ b/tools/target_dec_fuzzer.c @@ -200,6 +200,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { case AV_CODEC_ID_SCREENPRESSO:maxpixels /= 64;break; case AV_CODEC_ID_SMACKVIDEO: maxpixels /= 64;break; case AV_CODEC_ID_SNOW:maxpixels /= 128; break; +case AV_CODEC_ID_TARGA: maxpixels /= 128; break; case AV_CODEC_ID_TAK: maxsamples /= 1024; break; case AV_CODEC_ID_TGV: maxpixels /= 32;break; case AV_CODEC_ID_THEORA: maxpixels /= 16384; break; -- 2.17.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH] tools/target_bsf_fuzzer: simplify the loop feeding packets to the filter
This also follows the suggested API usage in the doxy. Signed-off-by: James Almer --- tools/target_bsf_fuzzer.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/tools/target_bsf_fuzzer.c b/tools/target_bsf_fuzzer.c index d6aaee3bd9..1aae4a12e5 100644 --- a/tools/target_bsf_fuzzer.c +++ b/tools/target_bsf_fuzzer.c @@ -146,16 +146,13 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { av_bsf_flush(bsf); flushpattern = (flushpattern >> 3) + (flushpattern << 61); -while (in->size) { -res = av_bsf_send_packet(bsf, in); -if (res < 0 && res != AVERROR(EAGAIN)) -break; -res = av_bsf_receive_packet(bsf, out); -if (res < 0) -break; -av_packet_unref(out); +res = av_bsf_send_packet(bsf, in); +if (res < 0) { +av_packet_unref(in); +continue; } -av_packet_unref(in); +while ((res = av_bsf_receive_packet(bsf, out)) >= 0); +av_packet_unref(out); } res = av_bsf_send_packet(bsf, NULL); -- 2.35.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH] qsv: add return value check for MFXQueryIMPL
add a return value check for function MFXQueryIMPL to handle the error message. Signed-off-by: Tong Wu --- libavcodec/qsv.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavcodec/qsv.c b/libavcodec/qsv.c index 1a432dbd82..18f34f05fd 100644 --- a/libavcodec/qsv.c +++ b/libavcodec/qsv.c @@ -408,7 +408,10 @@ int ff_qsv_init_internal_session(AVCodecContext *avctx, QSVSession *qs, return ret; } -MFXQueryIMPL(qs->session, &impl); +ret = MFXQueryIMPL(qs->session, &impl); +if (ret != MFX_ERR_NONE) +return ff_qsv_print_error(avctx, ret, + "Error querying the session attributes"); switch (MFX_IMPL_BASETYPE(impl)) { case MFX_IMPL_SOFTWARE: -- 2.16.1.windows.4 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH] qsvenc: avoid dereferencing the null pointer
The variable AVFrame *frame could be a null pointer, now add a null pointer check to avoid dereferencing the null pointer. Signed-off-by: Tong Wu --- libavcodec/qsvenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c index 07be4287b7..998e43753e 100644 --- a/libavcodec/qsvenc.c +++ b/libavcodec/qsvenc.c @@ -1726,7 +1726,7 @@ static int encode_frame(AVCodecContext *avctx, QSVEncContext *q, goto free; } -if (ret == MFX_WRN_INCOMPATIBLE_VIDEO_PARAM && frame->interlaced_frame) +if (ret == MFX_WRN_INCOMPATIBLE_VIDEO_PARAM && frame && frame->interlaced_frame) print_interlace_msg(avctx, q); ret = 0; -- 2.16.1.windows.4 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".