【分享】FFMpeg checkout 版本n4.2.5,得到master版本, 导致后续OpenCV 4.5.4编译错误; 切换到指定远程分支,解决问题。
对FFMpeg checkout 版本n4.2.5,实际得到master版本,导致后续OpenCV 4.5.4编译错误。使用“git checkout -b n4.2.hankf.01 remotes/origin/release/4.2”,解决问题,后续OpenCV编译成功。
FFMpeg编译信息。
~/proj/slam$ git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg
Cloning into 'ffmpeg'...
remote: Enumerating objects: 650932, done.
remote: Counting objects: 100% (650932/650932), done.
remote: Compressing objects: 100% (126584/126584), done.
Receiving objects: 6% (40396/650932), 10.98 MiB | 234.00 KiB/s
remote: Total 650932 (delta 525929), reused 647605 (delta 523068)
Receiving objects: 100% (650932/650932), 127.97 MiB | 438.00 KiB/s, done.
Resolving deltas: 100% (525929/525929), done.
Checking out files: 100% (7631/7631), done.
~/proj/slam$ cd ffmpeg/
~/proj/slam/ffmpeg$ git branch
* master
~/proj/slam/ffmpeg$ git checkout master
Switched to branch 'master'
Your branch is up to date with 'origin/master'.
~/proj/slam/ffmpeg$ git branch
* master
~/proj/slam/ffmpeg$ git tag -l n4.*
n4.2
n4.2-dev
n4.2.1
n4.2.2
n4.2.3
n4.2.4
n4.2.5
n4.3
n4.3-dev
n4.3.1
n4.3.2
n4.3.3
n4.4
n4.4-dev
n4.4.1
n4.5-dev
~/proj/slam/ffmpeg$ git checkout -b n4.2.5
Switched to a new branch 'n4.2.5'
~/proj/slam/ffmpeg$ git branch
master
* n4.2.5
~/proj/slam/ffmpeg$ git log
commit dcc9454ab914f9532ddb7f06a2f756ed472a1a85 (HEAD -> n4.2.5, origin/master, origin/HEAD, master)
Author: Rudolf Polzer <rpolzer-at-google.com@ffmpeg.org>
Date: Mon Jan 10 10:25:31 2022 -0800
vf_paletteuse: fix color cache lookup for Bayer dithering mode.
To trigger this bug, use `paletteuse=dither=bayer:bayer_scale=0`; you will see
that adjacent pixel lines will use the same dither pattern, instead of being
shifted from each other by 32 units (0x20).
One way to demostrate the bug is:
$ convert -size 64x256 gradient:black-white -rotate 270 grad.png
$ echo 'P2 2 1 255 0 255' > bw.pnm
$ ffmpeg -i grad.png -filter_complex 'movie=bw.pnm,scale=256x1[bw]; [0:v][bw]paletteuse=dither=bayer:bayer_scale=0' gradbw.png
Previously: https://www.rm.cloudns.org/img/uploaded/0bd152c11b9cd99e5945115534b1bdde.png
Now: https://www.rm.cloudns.org/img/uploaded/89caaa5e36c38bc2c01755b30811f969.png
This was caused by passing inconsistent color vs (a,r,g,b) parameters to
color_get(), and NBITS being 5 meaning actually hitting the same cache node
does happen in this case, but ONLY if bayer_scale is zero.
The fix is passing the correct color value to color_get().
Also added a previous-failing FATE test; image comparison of the first frame:
Previously: https://www.rm.cloudns.org/img/uploaded/d0ff9db8d8a7d8a3b8b88bbe92bf5fed.png
Now: https://www.rm.cloudns.org/img/uploaded/a72389707e719b5cd1c58916a9e79ca8.png
(on this less synthetic test image, the bug basically causes noise from cache
hits vs misses)
Tested: FATE passes, which exercises this filter but at the default bayer_scale.
Reviewed-by: Paul B Mahol <onemda@gmail.com>
commit bca30570d28bbaa07badadabf55ec3589201a82f
Author: Gyan Doshi <ffmpeg@gyani.pro>
~/proj/slam/ffmpeg$ git branch -a
master
* n4.2.5
remotes/origin/HEAD -> origin/master
remotes/origin/master
remotes/origin/release/4.1
remotes/origin/release/4.2
remotes/origin/release/4.3
remotes/origin/release/4.4
remotes/origin/release/5.0
~/proj/slam/ffmpeg$ git checkout master
Switched to branch 'master'
Your branch is up to date with 'origin/master'.
~/proj/slam/ffmpeg$ git branch -D n4.2.5
Deleted branch n4.2.5 (was dcc9454ab9).
~/proj/slam/ffmpeg$ git tag -l n4.2.*
n4.2.1
n4.2.2
n4.2.3
n4.2.4
n4.2.5
~/proj/slam/ffmpeg$ git checkout -b n4.2.5
Switched to a new branch 'n4.2.5'
~/proj/slam/ffmpeg$ git branch
master
* n4.2.5
~/proj/slam/ffmpeg$ git log
commit dcc9454ab914f9532ddb7f06a2f756ed472a1a85 (HEAD -> n4.2.5, origin/master, origin/HEAD, master)
Author: Rudolf Polzer <rpolzer-at-google.com@ffmpeg.org>
Date: Mon Jan 10 10:25:31 2022 -0800
vf_paletteuse: fix color cache lookup for Bayer dithering mode.
To trigger this bug, use `paletteuse=dither=bayer:bayer_scale=0`; you will see
that adjacent pixel lines will use the same dither pattern, instead of being
shifted from each other by 32 units (0x20).
One way to demostrate the bug is:
$ convert -size 64x256 gradient:black-white -rotate 270 grad.png
$ echo 'P2 2 1 255 0 255' > bw.pnm
$ ffmpeg -i grad.png -filter_complex 'movie=bw.pnm,scale=256x1[bw]; [0:v][bw]paletteuse=dither=bayer:bayer_scale=0' gradbw.png
Previously: https://www.rm.cloudns.org/img/uploaded/0bd152c11b9cd99e5945115534b1bdde.png
Now: https://www.rm.cloudns.org/img/uploaded/89caaa5e36c38bc2c01755b30811f969.png
This was caused by passing inconsistent color vs (a,r,g,b) parameters to
color_get(), and NBITS being 5 meaning actually hitting the same cache node
does happen in this case, but ONLY if bayer_scale is zero.
The fix is passing the correct color value to color_get().
Also added a previous-failing FATE test; image comparison of the first frame:
Previously: https://www.rm.cloudns.org/img/uploaded/d0ff9db8d8a7d8a3b8b88bbe92bf5fed.png
Now: https://www.rm.cloudns.org/img/uploaded/a72389707e719b5cd1c58916a9e79ca8.png
(on this less synthetic test image, the bug basically causes noise from cache
hits vs misses)
Tested: FATE passes, which exercises this filter but at the default bayer_scale.
Reviewed-by: Paul B Mahol <onemda@gmail.com>
commit bca30570d28bbaa07badadabf55ec3589201a82f
Author: Gyan Doshi <ffmpeg@gyani.pro>
~/proj/slam/ffmpeg$ git checkout master
Switched to branch 'master'
Your branch is up to date with 'origin/master'.
~/proj/slam/ffmpeg$ git branch -D n4.2.5
Deleted branch n4.2.5 (was dcc9454ab9).
~/proj/slam/ffmpeg$ git tag -l n4.2.*
n4.2.1
n4.2.2
n4.2.3
n4.2.4
n4.2.5
~/proj/slam/ffmpeg$ git checkout -b n4.2.5.hankf.01 remotes/origin/n4.2.5
fatal: 'remotes/origin/n4.2.5' is not a commit and a branch 'n4.2.5.hankf.01' cannot be created from it
~/proj/slam/ffmpeg$ git checkout -b n4.2.hankf.01 remotes/origin/release/4.2
Branch 'n4.2.hankf.01' set up to track remote branch 'release/4.2' from 'origin'.
Switched to a new branch 'n4.2.hankf.01'
~/proj/slam/ffmpeg$ git log
commit bf85c589d75e45f9f1376d3a57df3458382b8e8d (HEAD -> n4.2.hankf.01, origin/release/4.2)
Author: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Date: Wed Jan 5 19:57:58 2022 +0100
configure: Add missing libshine->mpegaudioheader dependency
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
(cherry picked from commit e228d7b0db7d6cb02a73bee6d3bf4f6ecf92d0bf)
commit 60037d6693f51d475e1b619c0763234287fcf422 (tag: n4.2.5)
Author: Michael Niedermayer <michael@niedermayer.cc>
Date: Tue Oct 12 16:47:10 2021 +0200
Changelog: update
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
commit a9febd587051f14f991c2033e2120f59bbe30fab
Author: Lynne <dev@lynne.ee>
Date: Fri Jan 1 00:00:00 2021 +0100
configure: update copyright year
(cherry picked from commit 63505fc60a8031ebea824a3e78a07b73c6dc049f)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
commit c0b6f4b38da9523621eb1f3956fa2b0a0f64331d
Author: Michael Niedermayer <michael@niedermayer.cc>
Date: Thu Jun 24 19:53:47 2021 +0200
avformat/matroskadec: Reset state also on failure in matroska_reset_status()
The calling code does not handle failures and will fail with assertion failures later.
Seeking can always fail even when the position was previously read.
Fixes: Assertion failure
Fixes: 35253/clusterfuzz-testcase-minimized-ffmpeg_dem_MATROSKA_fuzzer-4693059982983168
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit d115eec97929e23fd1b06df2d95f48cf5000eb87)
~/proj/slam/ffmpeg$ ls -l
total 3104
-rw-rw-r-- 1 hankf hankf 115932 1月 18 17:55 Changelog
drwxrwxr-x 12 hankf hankf 4096 1月 18 17:55 compat
-rw-rw-r-- 1 hankf hankf 87041 1月 18 15:40 config.asm
-rw-rw-r-- 1 hankf hankf 87637 1月 18 15:40 config.h
-rwxrwxr-x 1 hankf hankf 251997 1月 18 17:55 configure
-rw-rw-r-- 1 hankf hankf 418 1月 18 15:13 CONTRIBUTING.md
-rw-rw-r-- 1 hankf hankf 18092 1月 18 15:13 COPYING.GPLv2
-rw-rw-r-- 1 hankf hankf 35147 1月 18 15:13 COPYING.GPLv3
-rw-rw-r-- 1 hankf hankf 26526 1月 18 15:13 COPYING.LGPLv2.1
-rw-rw-r-- 1 hankf hankf 7651 1月 18 15:13 COPYING.LGPLv3
-rw-rw-r-- 1 hankf hankf 274 1月 18 15:13 CREDITS
drwxrwxr-x 4 hankf hankf 12288 1月 18 17:55 doc
drwxrwxr-x 2 hankf hankf 4096 1月 18 17:55 ffbuild
-rwxrwxr-x 1 hankf hankf 284832 1月 18 16:26 ffmpeg
-rwxrwxr-x 1 hankf hankf 1090752 1月 18 16:26 ffmpeg_g
-rwxrwxr-x 1 hankf hankf 162504 1月 18 16:26 ffprobe
-rwxrwxr-x 1 hankf hankf 633824 1月 18 16:26 ffprobe_g
drwxrwxr-x 2 hankf hankf 4096 1月 18 17:55 fftools
-rw-rw-r-- 1 hankf hankf 596 1月 18 15:13 INSTALL.md
drwxrwxr-x 14 hankf hankf 118784 1月 18 17:55 libavcodec
drwxrwxr-x 3 hankf hankf 4096 1月 18 17:55 libavdevice
drwxrwxr-x 7 hankf hankf 40960 1月 18 17:55 libavfilter
drwxrwxr-x 3 hankf hankf 40960 1月 18 17:55 libavformat
drwxrwxr-x 6 hankf hankf 4096 1月 18 17:55 libavresample
drwxrwxr-x 12 hankf hankf 16384 1月 18 17:55 libavutil
drwxrwxr-x 2 hankf hankf 4096 1月 18 17:55 libpostproc
drwxrwxr-x 6 hankf hankf 4096 1月 18 17:55 libswresample
drwxrwxr-x 7 hankf hankf 4096 1月 18 17:55 libswscale
-rw-rw-r-- 1 hankf hankf 3825 1月 18 17:55 LICENSE.md
-rw-rw-r-- 1 hankf hankf 29540 1月 18 17:55 MAINTAINERS
-rw-rw-r-- 1 hankf hankf 5633 1月 18 17:55 Makefile
drwxrwxr-x 2 hankf hankf 4096 1月 18 15:13 presets
-rw-rw-r-- 1 hankf hankf 1790 1月 18 17:55 README.md
-rw-rw-r-- 1 hankf hankf 6 1月 18 17:55 RELEASE
-rw-rw-r-- 1 hankf hankf 829 1月 18 17:55 RELEASE_NOTES
drwxrwxr-x 7 hankf hankf 4096 1月 18 17:55 tests
drwxrwxr-x 3 hankf hankf 4096 1月 18 17:55 tools
~/proj/slam/ffmpeg$ make clean
~/proj/slam/ffmpeg$ tree -L 1 -d
.
├── compat
├── doc
├── ffbuild
├── fftools
├── libavcodec
├── libavdevice
├── libavfilter
├── libavformat
├── libavresample
├── libavutil
├── libpostproc
├── libswresample
├── libswscale
├── presets
├── tests
└── tools
16 directories
~/proj/slam/ffmpeg$ ./configure --enable-nonfree --enable-pic --enable-shared
install prefix /usr/local
source path .
C compiler gcc
C library glibc
ARCH x86 (generic)
big-endian no
runtime cpu detection yes
standalone assembly yes
x86 assembler nasm
MMX enabled yes
MMXEXT enabled yes
3DNow! enabled yes
3DNow! extended enabled yes
SSE enabled yes
SSSE3 enabled yes
AESNI enabled yes
AVX enabled yes
AVX2 enabled yes
AVX-512 enabled yes
XOP enabled yes
FMA3 enabled yes
FMA4 enabled yes
i686 features enabled yes
CMOV is fast yes
EBX available yes
EBP available yes
debug symbols yes
strip symbols yes
optimize for size no
optimizations yes
static yes
shared yes
postprocessing support no
network support yes
threading support pthreads
safe bitstream reader yes
texi2html enabled no
perl enabled yes
pod2man enabled yes
makeinfo enabled yes
makeinfo supports HTML yes
.......
License: nonfree and unredistributable
libavutil/avconfig.h is unchanged
libavdevice/indev_list.c is unchanged
libavdevice/outdev_list.c is unchanged
~/proj/slam/ffmpeg$ make -j
GEN libavutil/libavutil.version
GEN libswscale/libswscale.version
GEN libswresample/libswresample.version
GEN libavcodec/libavcodec.version
GEN libavformat/libavformat.version
GEN libavfilter/libavfilter.version
GEN libavdevice/libavdevice.version
CC libavdevice/alldevices.o
CC libavdevice/alsa.o
CC libavdevice/alsa_dec.o
CC libavdevice/alsa_enc.o
........
libavfilter/vf_qp.c: In function ‘filter_frame’:
CC libavutil/blowfish.o
CC libavutil/bprint.o
libavfilter/vf_qp.c:113:5: warning: ‘av_frame_get_qp_table’ is deprecated [-Wdeprecated-declarations]
in_qp_table = av_frame_get_qp_table(in, &stride, &type);
^~~~~~~~~~~
In file included from libavfilter/avfilter.h:44:0,
from libavfilter/vf_qp.c:26:
./libavutil/frame.h:720:9: note: declared here
int8_t *av_frame_get_qp_table(AVFrame *f, int *stride, int *type);
^~~~~~~~~~~~~~~~~~~~~
CC libavutil/camellia.o
libavfilter/vf_qp.c:114:5: warning: ‘av_frame_set_qp_table’ is deprecated [-Wdeprecated-declarations]
av_frame_set_qp_table(out, out_qp_table_buf, s->qstride, type);
^~~~~~~~~~~~~~~~~~~~~
In file included from libavfilter/avfilter.h:44:0,
from libavfilter/vf_qp.c:26:
./libavutil/frame.h:722:5: note: declared here
int av_frame_set_qp_table(AVFrame *f, AVBufferRef *buf, int stride, int type);
^~~~~~~~~~~~~~~~~~~~~
CC libavutil/cast5.o
CC libavutil/buffer.o
CC libavutil/crc.o
CC libavutil/color_utils.o
CC libavutil/cpu.o
CC libavutil/channel_layout.o
libavfilter/src_movie.c: In function ‘open_stream’:
libavfilter/src_movie.c:175:5: warning: ‘refcounted_frames’ is deprecated [-Wdeprecated-declarations]
st->codec_ctx->refcounted_frames = 1;
^~
In file included from libavfilter/src_movie.c:41:0:
./libavcodec/avcodec.h:2396:9: note: declared here
int refcounted_frames;
^~~~~~~~~~~~~~~~~
CC libavutil/display.o
CC libavutil/dict.o
CC libavutil/downmix_info.o
CC libavutil/des.o
libavfilter/src_movie.c: In function ‘movie_push_frame’:
libavfilter/src_movie.c:529:9: warning: ‘avcodec_decode_video2’ is deprecated [-Wdeprecated-declarations]
ret = avcodec_decode_video2(st->codec_ctx, frame, &got_frame, pkt);
^~~
In file included from libavfilter/src_movie.c:41:0:
./libavcodec/avcodec.h:4828:5: note: declared here
int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture,
^~~~~~~~~~~~~~~~~~~~~
libavfilter/avfiltergraph.c: In function ‘avfilter_graph_free’:
libavfilter/avfiltergraph.c:135:5: warning: ‘resample_lavr_opts’ is deprecated [-Wdeprecated-declarations]
av_freep(&(*graph)->resample_lavr_opts);
^~~~~~~~
In file included from libavfilter/avfiltergraph.c:39:0:
libavfilter/avfilter.h:847:32: note: declared here
attribute_deprecated char *resample_lavr_opts; ///< libavresample options to use for the auto-inserted resample filters
^~~~~~~~~~~~~~~~~~
CC libavutil/eval.o
CC libavutil/error.o
CC libavutil/fifo.o
CC libavutil/encryption_info.o
libavfilter/src_movie.c:532:9: warning: ‘avcodec_decode_audio4’ is deprecated [-Wdeprecated-declarations]
ret = avcodec_decode_audio4(st->codec_ctx, frame, &got_frame, pkt);
^~~
In file included from libavfilter/src_movie.c:41:0:
./libavcodec/avcodec.h:4779:5: note: declared here
int avcodec_decode_audio4(AVCodecContext *avctx, AVFrame *frame,
^~~~~~~~~~~~~~~~~~~~~
libavfilter/vf_codecview.c: In function ‘filter_frame’:
libavfilter/vf_codecview.c:223:9: warning: ‘av_frame_get_qp_table’ is deprecated [-Wdeprecated-declarations]
int8_t *qp_table = av_frame_get_qp_table(frame, &qstride, &qp_type);
^~~~~~
In file included from libavfilter/avfilter.h:44:0,
from libavfilter/vf_codecview.c:35:
./libavutil/frame.h:720:9: note: declared here
int8_t *av_frame_get_qp_table(AVFrame *f, int *stride, int *type);
^~~~~~~~~~~~~~~~~~~~~
CC libavutil/float_dsp.o
CC libavutil/file_open.o
CC libavutil/fixed_dsp.o
CC libavutil/file.o
CC libavutil/hmac.o
CC libavutil/hash.o
CC libavutil/hdr_dynamic_metadata.o
CC libavutil/frame.o
CC libavutil/hwcontext.o
In file included from ./libavutil/common.h:491:0,
from ./libavutil/avutil.h:296,
from libavfilter/avfilter.h:41,
from libavfilter/vf_scale.c:29:
libavfilter/vf_scale.c: In function ‘scale_slice’:
CC libavutil/lfg.o
CC libavutil/intmath.o
CC libavutil/integer.o
CC libavutil/imgutils.o
libavfilter/vf_scale.c:391:65: warning: ‘*’ in boolean context, suggest ‘&&’ instead [-Wint-in-bool-context]
in[i] = FF_PTR_ADD(cur_pic->data[i], ((y>>vsub)+field) * cur_pic->linesize[i]);
./libavutil/internal.h:176:32: note: in definition of macro ‘FF_PTR_ADD’
#define FF_PTR_ADD(ptr, off) ((off) ? (ptr) + (off) : (ptr))
^~~
libavfilter/vf_scale.c:392:65: warning: ‘*’ in boolean context, suggest ‘&&’ instead [-Wint-in-bool-context]
out[i] = FF_PTR_ADD(out_buf->data[i], field * out_buf->linesize[i]);
./libavutil/internal.h:176:32: note: in definition of macro ‘FF_PTR_ADD’
#define FF_PTR_ADD(ptr, off) ((off) ? (ptr) + (off) : (ptr))
^~~
CC libavutil/lzo.o
CC libavutil/lls.o
CC libavutil/log.o
..........
CC libavformat/jacosubenc.o
CC libavformat/jvdec.o
CC libavformat/latmenc.o
CC libavformat/lrc.o
CC libavformat/loasdec.o
CC libavformat/lmlm4.o
CC libavformat/log2_tab.o
libavformat/dump.c: In function ‘dump_stream_format’:
libavformat/dump.c:475:5: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
avctx->properties = st->codec->properties;
^~~~~
In file included from libavformat/dump.c:37:0:
libavformat/avformat.h:885:21: note: declared here
AVCodecContext *codec;
^~~~~
libavformat/dump.c:476:5: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
avctx->codec = st->codec->codec;
^~~~~
In file included from libavformat/dump.c:37:0:
libavformat/avformat.h:885:21: note: declared here
AVCodecContext *codec;
^~~~~
libavformat/dump.c:477:5: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
avctx->qmin = st->codec->qmin;
^~~~~
In file included from libavformat/dump.c:37:0:
libavformat/avformat.h:885:21: note: declared here
AVCodecContext *codec;
^~~~~
CC libavformat/lrcdec.o
libavformat/dump.c:478:5: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
avctx->qmax = st->codec->qmax;
^~~~~
In file included from libavformat/dump.c:37:0:
libavformat/avformat.h:885:21: note: declared here
AVCodecContext *codec;
^~~~~
libavformat/dump.c:479:5: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
avctx->coded_width = st->codec->coded_width;
^~~~~
In file included from libavformat/dump.c:37:0:
libavformat/avformat.h:885:21: note: declared here
AVCodecContext *codec;
^~~~~
libavformat/dump.c:480:5: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
avctx->coded_height = st->codec->coded_height;
^~~~~
In file included from libavformat/dump.c:37:0:
libavformat/avformat.h:885:21: note: declared here
AVCodecContext *codec;
^~~~~
libavformat/dump.c:515:9: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
int tbc = st->codec->time_base.den && st->codec->time_base.num;
^~~
CC libavformat/lrcenc.o
In file included from libavformat/dump.c:37:0:
libavformat/avformat.h:885:21: note: declared here
AVCodecContext *codec;
^~~~~
libavformat/dump.c:515:9: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
int tbc = st->codec->time_base.den && st->codec->time_base.num;
^~~
In file included from libavformat/dump.c:37:0:
libavformat/avformat.h:885:21: note: declared here
AVCodecContext *codec;
^~~~~
libavformat/dump.c:527:13: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
print_fps(1 / av_q2d(st->codec->time_base), "tbc");
^~~~~~~~~
CC libavformat/lvfdec.o
In file included from libavformat/dump.c:37:0:
libavformat/avformat.h:885:21: note: declared here
AVCodecContext *codec;
^~~~~
CC libavformat/m4vdec.o
CC libavformat/matroska.o
CC libavformat/lxfdec.o
CC libavformat/matroskaenc.o
CC libavformat/metadata.o
CC libavformat/md5proto.o
CC libavformat/matroskadec.o
CC libavformat/microdvddec.o
CC libavformat/mgsts.o
CC libavformat/microdvdenc.o
CC libavformat/mj2kdec.o
CC libavformat/mm.o
CC libavformat/mkvtimestamp_v2.o
CC libavformat/mlpdec.o
CC libavformat/mlvdec.o
CC libavformat/mmsh.o
CC libavformat/mmf.o
CC libavformat/mov.o
CC libavformat/mov_chan.o
CC libavformat/mmst.o
CC libavformat/mms.o
CC libavformat/movenccenc.o
CC libavformat/movenc.o
CC libavformat/movenchint.o
CC libavformat/mov_esds.o
CC libavformat/mp3dec.o
CC libavformat/mp3enc.o
CC libavformat/mpc.o
CC libavformat/mpeg.o
CC libavformat/mpegenc.o
CC libavformat/mpc8.o
CC libavformat/mpjpeg.o
CC libavformat/mpegtsenc.o
CC libavformat/mpegvideodec.o
CC libavformat/mpegts.o
libavformat/hcom.c: In function ‘hcom_read_header’:
libavformat/hcom.c:41:36: warning: variable ‘huffcount’ set but not used [-Wunused-but-set-variable]
unsigned data_size, rsrc_size, huffcount;
^~~~~~~~~
libavformat/hcom.c:41:25: warning: variable ‘rsrc_size’ set but not used [-Wunused-but-set-variable]
unsigned data_size, rsrc_size, huffcount;
^~~~~~~~~
libavformat/hcom.c:41:14: warning: variable ‘data_size’ set but not used [-Wunused-but-set-variable]
unsigned data_size, rsrc_size, huffcount;
^~~~~~~~~
CC libavformat/msf.o
CC libavformat/mpsubdec.o
CC libavformat/mpl2dec.o
CC libavformat/mpjpegdec.o
..............
CC libavcodec/aacenc_ltp.o
CC libavcodec/aacenc_tns.o
CC libavcodec/aacenctab.o
CC libavcodec/aacpsdsp_fixed.o
CC libavcodec/aacps_fixed.o
CC libavcodec/aacpsdsp_float.o
CC libavcodec/aacps_float.o
libavformat/dashenc.c: In function ‘dash_init’:
libavformat/dashenc.c:848:49: warning: ‘__builtin___snprintf_chk’ output may be truncated before the last format character -Wformat-truncation=]
snprintf(as->id, sizeof(as->id), "%d", i);
^
In file included from /usr/include/stdio.h:862:0,
from ./libavutil/common.h:38,
from ./libavutil/avutil.h:296,
from ./libavutil/avassert.h:31,
from libavformat/dashenc.c:28:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:64:10: note: ‘__builtin___snprintf_chk’ output between 2 and 11 bytes into a destination of size 10
return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
__bos (__s), __fmt, __va_arg_pack ());
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libavformat/dashenc.c:1272:49: warning: ‘%s’ directive output may be truncated writing up to 1023 bytes into a region of size between 1 and 1024 [-Wformat-truncation=]
snprintf(filename, sizeof(filename), "%s%s", c->dirname, os->initfile);
^~
In file included from /usr/include/stdio.h:862:0,
from ./libavutil/common.h:38,
from ./libavutil/avutil.h:296,
from ./libavutil/avassert.h:31,
from libavformat/dashenc.c:28:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:64:10: note: ‘__builtin___snprintf_chk’ output between 1 and 2047 bytes into a destination of size 1024
return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
__bos (__s), __fmt, __va_arg_pack ());
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC libavcodec/aacpsy.o
CC libavcodec/aandcttab.o
CC libavcodec/aactab.o
CC libavcodec/aacsbr_fixed.o
CC libavcodec/aacsbr.o
libavformat/sdp.c: In function ‘sdp_write_media_attributes’:
CC libavcodec/ac3dec_data.o
CC libavcodec/ac3.o
libavformat/sdp.c:707:13: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
if (st->codec) {
^~
In file included from libavformat/sdp.c:29:0:
libavformat/avformat.h:885:21: note: declared here
AVCodecContext *codec;
^~~~~
CC libavcodec/ac3_parser.o
libavformat/sdp.c:711:17: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
if (st->codec->flags & AV_CODEC_FLAG_QSCALE)
^~
In file included from libavformat/sdp.c:29:0:
libavformat/avformat.h:885:21: note: declared here
AVCodecContext *codec;
^~~~~
libavformat/sdp.c:713:17: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
else if (!av_opt_get_int(st->codec, "vad", AV_OPT_FLAG_ENCODING_PARAM, &vad_option) && vad_option)
^~~~
In file included from libavformat/sdp.c:29:0:
libavformat/avformat.h:885:21: note: declared here
AVCodecContext *codec;
^~~~~
CC libavcodec/aasc.o
CC libavcodec/ac3dec_float.o
CC libavcodec/ac3dec_fixed.o
CC libavcodec/ac3dsp.o
CC libavcodec/ac3enc_fixed.o
CC libavcodec/ac3tab.o
CC libavcodec/acelp_filters.o
CC libavcodec/ac3enc_float.o
CC libavcodec/ac3enc.o
CC libavcodec/acelp_pitch_delay.o
CC libavcodec/adpcm_data.o
CC libavcodec/adpcm.o
CC libavcodec/acelp_vectors.o
CC libavcodec/adx.o
CC libavcodec/adts_header.o
CC libavcodec/adts_parser.o
CC libavcodec/adpcmenc.o
CC libavcodec/agm.o
CC libavcodec/adxenc.o
CC libavcodec/adxdec.o
CC libavcodec/adx_parser.o
CC libavcodec/alac_data.o
CC libavcodec/alacdsp.o
CC libavcodec/aic.o
CC libavcodec/alac.o
CC libavcodec/alacenc.o
CC libavcodec/aliaspixdec.o
CC libavcodec/aliaspixenc.o
CC libavcodec/amrnbdec.o
CC libavcodec/allcodecs.o
CC libavcodec/amrwbdec.o
CC libavcodec/alsdec.o
CC libavcodec/apedec.o
CC libavcodec/aptx.o
CC libavcodec/ansi.o
CC libavcodec/anm.o
CC libavcodec/ass_split.o
CC libavcodec/ass.o
CC libavcodec/arbc.o
CC libavcodec/assdec.o
CC libavcodec/asvdec.o
CC libavcodec/asvenc.o
CC libavcodec/asv.o
CC libavcodec/assenc.o
CC libavcodec/atrac.o
CC libavcodec/atrac1.o
CC libavcodec/atrac3plus.o
libavformat/utils.c: In function ‘find_probe_decoder’:
libavformat/utils.c:225:9: warning: ‘av_codec_next’ is deprecated [-Wdeprecated-declarations]
while (probe_codec = av_codec_next(probe_codec)) {
^~~~~
In file included from ./libavcodec/internal.h:33:0,
from libavformat/utils.c:41:
./libavcodec/avcodec.h:4118:10: note: declared here
AVCodec *av_codec_next(const AVCodec *c);
^~~~~~~~~~~~~
CC libavcodec/atrac3.o
CC libavcodec/audio_frame_queue.o
CC libavcodec/atrac3plusdec.o
CC libavcodec/atrac9dec.o
............
GEN libavfilter/libavfilter.ver
AR libavfilter/libavfilter.a
STRIP libavcodec/x86/hevc_deblock.o
STRIP libavcodec/x86/vp9lpf_16bpp.o
STRIP libavcodec/x86/vp9itxfm_16bpp.o
GEN libswscale/libswscale.ver
AR libswscale/libswscale.a
LD libswscale/libswscale.so.5
STRIP libavcodec/x86/vp9lpf.o
STRIP libavcodec/x86/simple_idct.o
STRIP libavcodec/x86/hevc_mc.o
STRIP libavcodec/x86/vp9itxfm.o
GEN libavcodec/libavcodec.ver
AR libavcodec/libavcodec.a
LD libavcodec/libavcodec.so.58
LD libavformat/libavformat.so.58
LD libavfilter/libavfilter.so.7
LD libavdevice/libavdevice.so.58
LD ffmpeg_g
LD ffprobe_g
STRIP ffprobe
STRIP ffmpeg
~/proj/slam/ffmpeg$ sudo make install
[sudo] password for hankf:
INSTALL libavdevice/libavdevice.a
INSTALL libavdevice/libavdevice.so
STRIP install-libavdevice-shared
INSTALL libavfilter/libavfilter.a
INSTALL libavfilter/libavfilter.so
STRIP install-libavfilter-shared
INSTALL libavformat/libavformat.a
INSTALL libavformat/libavformat.so
STRIP install-libavformat-shared
INSTALL libavcodec/libavcodec.a
.................
INSTALL libavutil/rc4.h
INSTALL libavutil/rational.h
INSTALL libavutil/replaygain.h
INSTALL libavutil/ripemd.h
INSTALL libavutil/samplefmt.h
INSTALL libavutil/sha.h
INSTALL libavutil/sha512.h
INSTALL libavutil/spherical.h
INSTALL libavutil/stereo3d.h
INSTALL libavutil/threadmessage.h
INSTALL libavutil/time.h
INSTALL libavutil/timecode.h
INSTALL libavutil/timestamp.h
INSTALL libavutil/tree.h
INSTALL libavutil/twofish.h
INSTALL libavutil/version.h
INSTALL libavutil/xtea.h
INSTALL libavutil/tea.h
INSTALL libavutil/tx.h
INSTALL libavutil/lzo.h
INSTALL libavutil/avconfig.h
INSTALL libavutil/ffversion.h
INSTALL libavutil/libavutil.pc
OpenCV 4.5.4的编译错误信息
[ 47%] Building CXX object modules/calib3d/CMakeFiles/opencv_calib3d.dir/src/five-point.cpp.o
[ 47%] Building CXX object modules/calib3d/CMakeFiles/opencv_calib3d.dir/src/usac/utils.cpp.o
In file included from /home/hankf/proj/slam/opencv-4.5.4/modules/videoio/src/cap_ffmpeg.cpp:50:0:
/home/hankf/proj/slam/opencv-4.5.4/modules/videoio/src/cap_ffmpeg_impl.hpp:537:5: error: ‘AVBSFContext’ does not name a type; did you mean ‘AVIOContext’?
AVBSFContext* bsfc;
^~~~~~~~~~~~
AVIOContext
/home/hankf/proj/slam/opencv-4.5.4/modules/videoio/src/cap_ffmpeg_impl.hpp: In member function ‘void CvCapture_FFMPEG::init()’:
/home/hankf/proj/slam/opencv-4.5.4/modules/videoio/src/cap_ffmpeg_impl.hpp:583:5: error: ‘bsfc’ was not declared in this scope
bsfc = NULL;
^~~~
/home/hankf/proj/slam/opencv-4.5.4/modules/videoio/src/cap_ffmpeg_impl.hpp:583:5: note: suggested alternative: ‘erfc’
bsfc = NULL;
^~~~
erfc
/home/hankf/proj/slam/opencv-4.5.4/modules/videoio/src/cap_ffmpeg_impl.hpp: In member function ‘void CvCapture_FFMPEG::close()’:
/home/hankf/proj/slam/opencv-4.5.4/modules/videoio/src/cap_ffmpeg_impl.hpp:613:34: error: ‘AVStream {aka struct AVStream}’ has no member named ‘codec’
avcodec_close( video_st->codec );
^~~~~
/home/hankf/proj/slam/opencv-4.5.4/modules/videoio/src/cap_ffmpeg_impl.hpp:648:9: error: ‘bsfc’ was not declared in this scope
if (bsfc)
^~~~
/home/hankf/proj/slam/opencv-4.5.4/modules/videoio/src/cap_ffmpeg_impl.hpp:648:9: note: suggested alternative: ‘erfc’
if (bsfc)
^~~~
erfc
/home/hankf/proj/slam/opencv-4.5.4/modules/videoio/src/cap_ffmpeg_impl.hpp:651:9: error: ‘av_bsf_free’ was not declared in this scope
av_bsf_free(&bsfc);
^~~~~~~~~~~
/home/hankf/proj/slam/opencv-4.5.4/modules/videoio/src/cap_ffmpeg_impl.hpp:651:9: note: suggested alternative: ‘av_opt_free’
av_bsf_free(&bsfc);
^~~~~~~~~~~
av_opt_free
/home/hankf/proj/slam/opencv-4.5.4/modules/videoio/src/cap_ffmpeg_impl.hpp: At global scope:
/home/hankf/proj/slam/opencv-4.5.4/modules/videoio/src/cap_ffmpeg_impl.hpp:796:39: error: ‘AVLockOp’ has not been declared
static int LockCallBack(void **mutex, AVLockOp op)
^~~~~~~~
/home/hankf/proj/slam/opencv-4.5.4/modules/videoio/src/cap_ffmpeg_impl.hpp: In function ‘int LockCallBack(void**, int)’:
/home/hankf/proj/slam/opencv-4.5.4/modules/videoio/src/cap_ffmpeg_impl.hpp:801:14: error: ‘AV_LOCK_CREATE’ was not declared in this scope
case AV_LOCK_CREATE:
^~~~~~~~~~~~~~
/home/hankf/proj/slam/opencv-4.5.4/modules/videoio/src/cap_ffmpeg_impl.hpp:801:14: note: suggested alternative: ‘AV_LOG_TRACE’
case AV_LOCK_CREATE:
^~~~~~~~~~~~~~
AV_LOG_TRACE
/home/hankf/proj/slam/opencv-4.5.4/modules/videoio/src/cap_ffmpeg_impl.hpp:810:14: error: ‘AV_LOCK_OBTAIN’ was not declared in this scope
case AV_LOCK_OBTAIN:
^~~~~~~~~~~~~~
付汉杰 hankf@amd.com