Author Topic: Compiling Avidemux v2.5.6 on Windows  (Read 23938 times)

pulkitw

  • Newbie
  • *
  • Posts: 21
Re: Compiling Avidemux v2.5.6 on Windows
« Reply #30 on: July 06, 2012, 09:32:54 AM »
I see, i'll use that to capture the errors next time :)

I added the include folder to my CFLAGS CXXFLAGS and CMAKE_INCLUDE_PATH but i'm getting the same error :
These errors come when i make ffmpeg :

Code: [Select]
c:/devavi/avidemux/avidemux/ADM_libraries/ffmpeg/libavcodec/dxva2_h264.c:28:5: error: unknown type name 'DXVA_PicParams_H264'
c:/devavi/avidemux/avidemux/ADM_libraries/ffmpeg/libavcodec/dxva2_h264.c:29:5: error: unknown type name 'DXVA_Qmatrix_H264'
c:/devavi/avidemux/avidemux/ADM_libraries/ffmpeg/libavcodec/dxva2_h264.c:31:5: error: unknown type name 'DXVA_Slice_H264_Short'
c:/devavi/avidemux/avidemux/ADM_libraries/ffmpeg/libavcodec/dxva2_h264.c:32:5: error: unknown type name 'DXVA_Slice_H264_Long'
c:/devavi/avidemux/avidemux/ADM_libraries/ffmpeg/libavcodec/dxva2_h264.c:37:32: error: unknown type name 'DXVA_PicEntry_H264'
c:/devavi/avidemux/avidemux/ADM_libraries/ffmpeg/libavcodec/dxva2_h264.c:45:37: error: unknown type name 'DXVA_PicParams_H264'
c:/devavi/avidemux/avidemux/ADM_libraries/ffmpeg/libavcodec/dxva2_h264.c:156:80: error: unknown type name 'DXVA_Qmatrix_H264'
c:/devavi/avidemux/avidemux/ADM_libraries/ffmpeg/libavcodec/dxva2_h264.c:188:30: error: unknown type name 'DXVA_Slice_H264_Short'
c:/devavi/avidemux/avidemux/ADM_libraries/ffmpeg/libavcodec/dxva2_h264.c:197:52: error: unknown type name 'DXVA_Slice_H264_Long'
c:/devavi/avidemux/avidemux/ADM_libraries/ffmpeg/libavcodec/dxva2_h264.c: In function 'commit_bitstream_and_slice_buffer':
c:/devavi/avidemux/avidemux/ADM_libraries/ffmpeg/libavcodec/dxva2_h264.c:284:5: error: unknown type name 'DXVA_Slice_H264_Short'
c:/devavi/avidemux/avidemux/ADM_libraries/ffmpeg/libavcodec/dxva2_h264.c:293:5: warning: passing argument 3 of 'ctx->decoder->lpVtbl->GetBuffer' from incompatible pointer type [enabled by default]
c:/devavi/avidemux/avidemux/ADM_libraries/ffmpeg/libavcodec/dxva2_h264.c:293:5: note: expected 'void **' but argument is of type 'uint8_t **'
c:/devavi/avidemux/avidemux/ADM_libraries/ffmpeg/libavcodec/dxva2_h264.c:313:22: error: 'DXVA_Slice_H264_Short' undeclared (first use in this function)
c:/devavi/avidemux/avidemux/ADM_libraries/ffmpeg/libavcodec/dxva2_h264.c:313:22: note: each undeclared identifier is reported only once for each function it appears in
c:/devavi/avidemux/avidemux/ADM_libraries/ffmpeg/libavcodec/dxva2_h264.c:313:44: error: expected expression before ')' token
c:/devavi/avidemux/avidemux/ADM_libraries/ffmpeg/libavcodec/dxva2_h264.c:315:25: error: request for member 'BSNALunitDataLocation' in something not a structure or union
c:/devavi/avidemux/avidemux/ADM_libraries/ffmpeg/libavcodec/dxva2_h264.c:316:25: error: request for member 'SliceBytesInBuffer' in something not a structure or union
c:/devavi/avidemux/avidemux/ADM_libraries/ffmpeg/libavcodec/dxva2_h264.c:322:14: error: request for member 'BSNALunitDataLocation' in something not a structure or union
c:/devavi/avidemux/avidemux/ADM_libraries/ffmpeg/libavcodec/dxva2_h264.c:323:14: error: request for member 'SliceBytesInBuffer' in something not a structure or union
c:/devavi/avidemux/avidemux/ADM_libraries/ffmpeg/libavcodec/dxva2_h264.c:326:13: error: unknown type name 'DXVA_Slice_H264_Long'
c:/devavi/avidemux/avidemux/ADM_libraries/ffmpeg/libavcodec/dxva2_h264.c:326:49: error: 'DXVA_Slice_H264_Long' undeclared (first use in this function)
c:/devavi/avidemux/avidemux/ADM_libraries/ffmpeg/libavcodec/dxva2_h264.c:326:70: error: expected expression before ')' token
c:/devavi/avidemux/avidemux/ADM_libraries/ffmpeg/libavcodec/dxva2_h264.c:328:27: error: request for member 'NumMbsForSlice' in something not a structure or union
c:/devavi/avidemux/avidemux/ADM_libraries/ffmpeg/libavcodec/dxva2_h264.c:329:34: error: request for member 'first_mb_in_slice' in something not a structure or union
c:/devavi/avidemux/avidemux/ADM_libraries/ffmpeg/libavcodec/dxva2_h264.c:329:68: error: request for member 'first_mb_in_slice' in something not a structure or union
c:/devavi/avidemux/avidemux/ADM_libraries/ffmpeg/libavcodec/dxva2_h264.c:331:27: error: request for member 'NumMbsForSlice' in something not a structure or union
c:/devavi/avidemux/avidemux/ADM_libraries/ffmpeg/libavcodec/dxva2_h264.c:331:67: error: request for member 'first_mb_in_slice' in something not a structure or union
c:/devavi/avidemux/avidemux/ADM_libraries/ffmpeg/libavcodec/dxva2_h264.c:345:14: error: request for member 'SliceBytesInBuffer' in something not a structure or union
c:/devavi/avidemux/avidemux/ADM_libraries/ffmpeg/libavcodec/dxva2_h264.c: In function 'start_frame':
c:/devavi/avidemux/avidemux/ADM_libraries/ffmpeg/libavcodec/dxva2_h264.c:385:5: error: implicit declaration of function 'fill_picture_parameters' [-Werror=implicit-function-declaration]
c:/devavi/avidemux/avidemux/ADM_libraries/ffmpeg/libavcodec/dxva2_h264.c:388:5: error: implicit declaration of function 'fill_scaling_lists' [-Werror=implicit-function-declaration]
c:/devavi/avidemux/avidemux/ADM_libraries/ffmpeg/libavcodec/dxva2_h264.c: In function 'decode_slice':
c:/devavi/avidemux/avidemux/ADM_libraries/ffmpeg/libavcodec/dxva2_h264.c:414:9: error: implicit declaration of function 'fill_slice_short' [-Werror=implicit-function-declaration]
c:/devavi/avidemux/avidemux/ADM_libraries/ffmpeg/libavcodec/dxva2_h264.c:417:9: error: implicit declaration of function 'fill_slice_long' [-Werror=implicit-function-declaration]
c:/devavi/avidemux/avidemux/ADM_libraries/ffmpeg/libavcodec/dxva2_h264.c:422:20: error: request for member 'wBitFields' in something not a structure or union
cc1.exe: some warnings being treated as errors
make[4]: *** [libavcodec/dxva2_h264.o] Error 1

gruntster

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 607
    • http://avidemux.razorbyte.com.au
Re: Compiling Avidemux v2.5.6 on Windows
« Reply #31 on: July 08, 2012, 05:40:25 AM »
Ok, I can reproduce the issue now.  The latest MinGW-w64 release (2.0.4) includes changes to dxva2api.h which borks the FFmpeg build.  FFmpeg have already updated their sources.  So I guess you have two options:

1. Add the following line to libavcodec/dxva2_internal.h:
Code: [Select]
#include <dxva.h>
2. Revert to niXman's 4.7.1-rev0 build, which includes MinGW-w64 2.0.3.

pulkitw

  • Newbie
  • *
  • Posts: 21
Re: Compiling Avidemux v2.5.6 on Windows
« Reply #32 on: July 09, 2012, 06:16:27 AM »
Gruntster, First of all, thanks for putting that much efforts, i really appreciate that :)
I followed it as you said, now make ffmpeg gets stuck at h264_cabac.o

Code: [Select]
C:\Users\pulkitw\AppData\Local\Temp\ccq3PDbo.s: Assembler messages:
C:\Users\pulkitw\AppData\Local\Temp\ccq3PDbo.s:18: Error: junk `:2ff_h264_lps_range' after expression
C:\Users\pulkitw\AppData\Local\Temp\ccq3PDbo.s:31: Error: junk `:2ff_h264_norm_shift' after expression
C:\Users\pulkitw\AppData\Local\Temp\ccq3PDbo.s:33: Error: junk `:2ff_h264_mlps_state+128' after expression
C:\Users\pulkitw\AppData\Local\Temp\ccq3PDbo.s:46: Error: junk `:2ff_h264_norm_shift' after expression
C:\Users\pulkitw\AppData\Local\Temp\ccq3PDbo.s:81: Error: junk `:2ff_h264_lps_range' after expression
C:\Users\pulkitw\AppData\Local\Temp\ccq3PDbo.s:94: Error: junk `:2ff_h264_norm_shift' after expression
C:\Users\pulkitw\AppData\Local\Temp\ccq3PDbo.s:96: Error: junk `:2ff_h264_mlps_state+128' after expression
C:\Users\pulkitw\AppData\Local\Temp\ccq3PDbo.s:109: Error: junk `:2ff_h264_norm_shift' after expression
C:\Users\pulkitw\AppData\Local\Temp\ccq3PDbo.s:1552: Error: junk `:2ff_h264_lps_range' after expression
C:\Users\pulkitw\AppData\Local\Temp\ccq3PDbo.s:1565: Error: junk `:2ff_h264_norm_shift' after expression
C:\Users\pulkitw\AppData\Local\Temp\ccq3PDbo.s:1567: Error: junk `:2ff_h264_mlps_state+128' after expression
C:\Users\pulkitw\AppData\Local\Temp\ccq3PDbo.s:1580: Error: junk `:2ff_h264_norm_shift' after expression
C:\Users\pulkitw\AppData\Local\Temp\ccq3PDbo.s:1593: Error: junk `:2ff_h264_lps_range' after expression
C:\Users\pulkitw\AppData\Local\Temp\ccq3PDbo.s:1606: Error: junk `:2ff_h264_norm_shift' after expression
C:\Users\pulkitw\AppData\Local\Temp\ccq3PDbo.s:1608: Error: junk `:2ff_h264_mlps_state+128' after expression
C:\Users\pulkitw\AppData\Local\Temp\ccq3PDbo.s:1621: Error: junk `:2ff_h264_norm_shift' after expression
C:\Users\pulkitw\AppData\Local\Temp\ccq3PDbo.s:3153: Error: junk `:2ff_h264_lps_range' after expression
C:\Users\pulkitw\AppData\Local\Temp\ccq3PDbo.s:3166: Error: junk `:2ff_h264_norm_shift' after expression
C:\Users\pulkitw\AppData\Local\Temp\ccq3PDbo.s:3168: Error: junk `:2ff_h264_mlps_state+128' after expression
C:\Users\pulkitw\AppData\Local\Temp\ccq3PDbo.s:3181: Error: junk `:2ff_h264_norm_shift' after expression
C:\Users\pulkitw\AppData\Local\Temp\ccq3PDbo.s:3191: Error: junk `:2last_coeff_flag_offset_8x8' after expression
C:\Users\pulkitw\AppData\Local\Temp\ccq3PDbo.s:3196: Error: junk `:2ff_h264_lps_range' after expression
C:\Users\pulkitw\AppData\Local\Temp\ccq3PDbo.s:3209: Error: junk `:2ff_h264_norm_shift' after expression
C:\Users\pulkitw\AppData\Local\Temp\ccq3PDbo.s:3211: Error: junk `:2ff_h264_mlps_state+128' after expression
C:\Users\pulkitw\AppData\Local\Temp\ccq3PDbo.s:3224: Error: junk `:2ff_h264_norm_shift' after expression
make[4]: *** [libavcodec/h264_cabac.o] Error 1


gruntster

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 607
    • http://avidemux.razorbyte.com.au
Re: Compiling Avidemux v2.5.6 on Windows
« Reply #33 on: July 09, 2012, 07:10:32 AM »
Did you patch source or use new compiler?  Did you perform a fresh build?  You still have -m32 flags set?

pulkitw

  • Newbie
  • *
  • Posts: 21
Re: Compiling Avidemux v2.5.6 on Windows
« Reply #34 on: July 09, 2012, 07:48:59 AM »
i downloaded niXman's  4.7.1-rev0 build, and started from the scratch.
and yes -m32 flags are still set.

gruntster

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 607
    • http://avidemux.razorbyte.com.au
Re: Compiling Avidemux v2.5.6 on Windows
« Reply #35 on: July 09, 2012, 09:14:54 AM »
I'm grasping at straws but there is one step I forgot.  For 32-bit builds you now need to include /mingw/x86_64-w64-mingw32/lib32 at the start of your PATH environment variable.

pulkitw

  • Newbie
  • *
  • Posts: 21
Re: Compiling Avidemux v2.5.6 on Windows
« Reply #36 on: July 09, 2012, 09:36:18 AM »
I did the same but it did not help.  :-\

gruntster

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 607
    • http://avidemux.razorbyte.com.au
Re: Compiling Avidemux v2.5.6 on Windows
« Reply #37 on: July 09, 2012, 01:10:04 PM »
Everything builds fine for me with largely the same setup.  I find the error message a bit vague so not sure exactly what the problem is.

Yasm definitely runs from the console?  Executing "as -v" reports version 2.22.52?  Perhaps try niXman's i686 build to make 100% sure that everything is built as 32-bit?

pulkitw

  • Newbie
  • *
  • Posts: 21
Re: Compiling Avidemux v2.5.6 on Windows
« Reply #38 on: July 11, 2012, 06:31:14 AM »
1) yasm runs from the console
2) executing "as -v" reports version 2.22.52
3) using niXman's i686 build gives different errors.
I do not think that many errors should come while compiling it, well I think I should start from the scratch with tried and tested versions of all the packages. Could you please guide me with the same..