Opened 4 years ago

Closed 4 years ago

#8866 closed defect (fixed)

libavfilter/vf_yadif_cuda fails to compile

Reported by: Daniel Cantarín Owned by:
Priority: important Component: avfilter
Version: git-master Keywords: yadif_cuda yadif regression
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:

Today I can't compile ffmpeg with yadif_cuda filter.
It was fine yesterday, but it's not working today.

Here's the error log:

(...)
CC	libavfilter/vf_yadif.o
CC	libavfilter/vf_yadif_cuda.o
NVCC	libavfilter/vf_yadif_cuda.ptx
src/libavfilter/vf_yadif_cuda.c: In function 'filter':
src/libavfilter/vf_yadif_cuda.c:134:22: error: 'YADIFContext {aka struct YADIFContext}' has no member named 'csp'
     for (i = 0; i < y->csp->nb_components; i++) {
                      ^~
src/libavfilter/vf_yadif_cuda.c:138:47: error: 'YADIFContext {aka struct YADIFContext}' has no member named 'csp'
         const AVComponentDescriptor *comp = &y->csp->comp[i];
                                               ^~
src/libavfilter/vf_yadif_cuda.c:149:74: error: 'YADIFContext {aka struct YADIFContext}' has no member named 'csp'
             av_log(ctx, AV_LOG_ERROR, "Unsupported pixel format: %s\n", y->csp->name);
                                                                          ^~
src/libavfilter/vf_yadif_cuda.c:162:74: error: 'YADIFContext {aka struct YADIFContext}' has no member named 'csp'
             av_log(ctx, AV_LOG_ERROR, "Unsupported pixel format: %s\n", y->csp->name);
                                                                          ^~
In file included from src/libavutil/avutil.h:296:0,
                 from src/libavutil/avassert.h:31,
                 from src/libavfilter/vf_yadif_cuda.c:21:
src/libavfilter/vf_yadif_cuda.c:173:56: error: 'YADIFContext {aka struct YADIFContext}' has no member named 'csp'
                     AV_CEIL_RSHIFT(y->cur->width, i ? y->csp->log2_chroma_w : 0),
                                                        ^
src/libavutil/common.h:58:53: note: in definition of macro 'AV_CEIL_RSHIFT'
 #define AV_CEIL_RSHIFT(a,b) (!av_builtin_constant_p(b) ? -((-(a)) >> (b)) \
                                                     ^
src/libavfilter/vf_yadif_cuda.c:173:56: error: 'YADIFContext {aka struct YADIFContext}' has no member named 'csp'
                     AV_CEIL_RSHIFT(y->cur->width, i ? y->csp->log2_chroma_w : 0),
                                                        ^
src/libavutil/common.h:58:71: note: in definition of macro 'AV_CEIL_RSHIFT'
 #define AV_CEIL_RSHIFT(a,b) (!av_builtin_constant_p(b) ? -((-(a)) >> (b)) \
                                                                       ^
src/libavfilter/vf_yadif_cuda.c:173:56: error: 'YADIFContext {aka struct YADIFContext}' has no member named 'csp'
                     AV_CEIL_RSHIFT(y->cur->width, i ? y->csp->log2_chroma_w : 0),
                                                        ^
src/libavutil/common.h:59:70: note: in definition of macro 'AV_CEIL_RSHIFT'
                                                        : ((a) + (1<<(b)) - 1) >> (b))
                                                                      ^
src/libavfilter/vf_yadif_cuda.c:173:56: error: 'YADIFContext {aka struct YADIFContext}' has no member named 'csp'
                     AV_CEIL_RSHIFT(y->cur->width, i ? y->csp->log2_chroma_w : 0),
                                                        ^
src/libavutil/common.h:59:83: note: in definition of macro 'AV_CEIL_RSHIFT'
                                                        : ((a) + (1<<(b)) - 1) >> (b))
                                                                                   ^
src/libavfilter/vf_yadif_cuda.c:174:57: error: 'YADIFContext {aka struct YADIFContext}' has no member named 'csp'
                     AV_CEIL_RSHIFT(y->cur->height, i ? y->csp->log2_chroma_h : 0),
                                                         ^
src/libavutil/common.h:58:53: note: in definition of macro 'AV_CEIL_RSHIFT'
 #define AV_CEIL_RSHIFT(a,b) (!av_builtin_constant_p(b) ? -((-(a)) >> (b)) \
                                                     ^
src/libavfilter/vf_yadif_cuda.c:174:57: error: 'YADIFContext {aka struct YADIFContext}' has no member named 'csp'
                     AV_CEIL_RSHIFT(y->cur->height, i ? y->csp->log2_chroma_h : 0),
                                                         ^
src/libavutil/common.h:58:71: note: in definition of macro 'AV_CEIL_RSHIFT'
 #define AV_CEIL_RSHIFT(a,b) (!av_builtin_constant_p(b) ? -((-(a)) >> (b)) \
                                                                       ^
src/libavfilter/vf_yadif_cuda.c:174:57: error: 'YADIFContext {aka struct YADIFContext}' has no member named 'csp'
                     AV_CEIL_RSHIFT(y->cur->height, i ? y->csp->log2_chroma_h : 0),
                                                         ^
src/libavutil/common.h:59:70: note: in definition of macro 'AV_CEIL_RSHIFT'
                                                        : ((a) + (1<<(b)) - 1) >> (b))
                                                                      ^
src/libavfilter/vf_yadif_cuda.c:174:57: error: 'YADIFContext {aka struct YADIFContext}' has no member named 'csp'
                     AV_CEIL_RSHIFT(y->cur->height, i ? y->csp->log2_chroma_h : 0),
                                                         ^
src/libavutil/common.h:59:83: note: in definition of macro 'AV_CEIL_RSHIFT'
                                                        : ((a) + (1<<(b)) - 1) >> (b))
                                                                                   ^
src/libavfilter/vf_yadif_cuda.c:177:53: error: 'YADIFContext {aka struct YADIFContext}' has no member named 'csp'
                     AV_CEIL_RSHIFT(dst->width, i ? y->csp->log2_chroma_w : 0),
                                                     ^
src/libavutil/common.h:58:53: note: in definition of macro 'AV_CEIL_RSHIFT'
 #define AV_CEIL_RSHIFT(a,b) (!av_builtin_constant_p(b) ? -((-(a)) >> (b)) \
                                                     ^
src/libavfilter/vf_yadif_cuda.c:177:53: error: 'YADIFContext {aka struct YADIFContext}' has no member named 'csp'
                     AV_CEIL_RSHIFT(dst->width, i ? y->csp->log2_chroma_w : 0),
                                                     ^
src/libavutil/common.h:58:71: note: in definition of macro 'AV_CEIL_RSHIFT'
 #define AV_CEIL_RSHIFT(a,b) (!av_builtin_constant_p(b) ? -((-(a)) >> (b)) \
                                                                       ^
src/libavfilter/vf_yadif_cuda.c:177:53: error: 'YADIFContext {aka struct YADIFContext}' has no member named 'csp'
                     AV_CEIL_RSHIFT(dst->width, i ? y->csp->log2_chroma_w : 0),
                                                     ^
src/libavutil/common.h:59:70: note: in definition of macro 'AV_CEIL_RSHIFT'
                                                        : ((a) + (1<<(b)) - 1) >> (b))
                                                                      ^
src/libavfilter/vf_yadif_cuda.c:177:53: error: 'YADIFContext {aka struct YADIFContext}' has no member named 'csp'
                     AV_CEIL_RSHIFT(dst->width, i ? y->csp->log2_chroma_w : 0),
                                                     ^
src/libavutil/common.h:59:83: note: in definition of macro 'AV_CEIL_RSHIFT'
                                                        : ((a) + (1<<(b)) - 1) >> (b))
                                                                                   ^
src/libavfilter/vf_yadif_cuda.c:178:54: error: 'YADIFContext {aka struct YADIFContext}' has no member named 'csp'
                     AV_CEIL_RSHIFT(dst->height, i ? y->csp->log2_chroma_h : 0),
                                                      ^
src/libavutil/common.h:58:53: note: in definition of macro 'AV_CEIL_RSHIFT'
 #define AV_CEIL_RSHIFT(a,b) (!av_builtin_constant_p(b) ? -((-(a)) >> (b)) \
                                                     ^
src/libavfilter/vf_yadif_cuda.c:178:54: error: 'YADIFContext {aka struct YADIFContext}' has no member named 'csp'
                     AV_CEIL_RSHIFT(dst->height, i ? y->csp->log2_chroma_h : 0),
                                                      ^
src/libavutil/common.h:58:71: note: in definition of macro 'AV_CEIL_RSHIFT'
 #define AV_CEIL_RSHIFT(a,b) (!av_builtin_constant_p(b) ? -((-(a)) >> (b)) \
                                                                       ^
src/libavfilter/vf_yadif_cuda.c:178:54: error: 'YADIFContext {aka struct YADIFContext}' has no member named 'csp'
                     AV_CEIL_RSHIFT(dst->height, i ? y->csp->log2_chroma_h : 0),
                                                      ^
src/libavutil/common.h:59:70: note: in definition of macro 'AV_CEIL_RSHIFT'
                                                        : ((a) + (1<<(b)) - 1) >> (b))
                                                                      ^
src/libavfilter/vf_yadif_cuda.c:178:54: error: 'YADIFContext {aka struct YADIFContext}' has no member named 'csp'
                     AV_CEIL_RSHIFT(dst->height, i ? y->csp->log2_chroma_h : 0),
                                                      ^
src/libavutil/common.h:59:83: note: in definition of macro 'AV_CEIL_RSHIFT'
                                                        : ((a) + (1<<(b)) - 1) >> (b))
                                                                                   ^
src/libavfilter/vf_yadif_cuda.c: In function 'config_output':
src/libavfilter/vf_yadif_cuda.c:315:6: error: 'YADIFContext {aka struct YADIFContext}' has no member named 'csp'
     y->csp = av_pix_fmt_desc_get(output_frames->sw_format);
      ^~
/opt/src/build/ffmpeg/ffbuild/common.mak:67: recipe for target 'libavfilter/vf_yadif_cuda.o' failed
make: *** [libavfilter/vf_yadif_cuda.o] Error 1

I believe the cause may be this, which is from minutes ago: https://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=2a9b934675b9e2d3850b46f8a618c19b03f02551

Looks like a code simplification that broke the interface yadif_cuda filter uses. But I'm no expert, so please take a look at it if you can.

How to reproduce:

wget -O ffmpeg-snapshot.tar.bz2 https://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2 && tar xjvf ffmpeg-snapshot.tar.bz2

mkdir -v ffmpeg_build
cd ffmpeg_build
../ffmpeg/configure --prefix="./" --disable-shared --extra-cflags=-I/usr/local/include \
--extra-cflags=-I/usr/local/cuda/targets/x86_64-linux/include --extra-cflags=-I../nvidia/cudautils \
--extra-ldflags=-L/usr/local/cuda/targets/x86_64-linux/lib --extra-ldflags=-L../nvidia/cudautils \
--enable-nonfree --enable-gpl --enable-version3 --enable-avresample --enable-avisynth --enable-openal \
--enable-opencl --enable-opengl --enable-libnpp --enable-nvenc --enable-libxvid --enable-libxml2 \
--enable-cuda --enable-cuda-sdk --enable-vaapi --enable-vdpau --enable-libx264 --enable-libx265 \
--enable-libass --enable-libwavpack --enable-libsoxr --enable-libfdk-aac --enable-libfreetype \
--enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx \
--enable-libssh --enable-openssl --enable-libsrt --enable-libzmq

Thanks.

Change History (3)

comment:1 by Carl Eugen Hoyos, 4 years ago

Keywords: csp removed
Priority: normalimportant

comment:2 by Daniel Cantarín, 4 years ago

Hi there.

I can compile again.
I see there was a revert of yesterday's yadif rework, here: https://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=71ec3e4583def61fbb32a4815376773ef7c80dee

IDK if this is enough to close the ticket, but I guess it's important to note it here.

Thanks.

comment:3 by Carl Eugen Hoyos, 4 years ago

Keywords: regression added
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.