Log in

View Full Version : x265 Merge mode not ok?


fifer55
14th May 2015, 21:56
OK guys, I want to see if anyone is experiencing this one.

The build of x265 I am using:
x265 [info]: HEVC encoder version 1.6+451-8592bf81d084
x265 [info]: build info [Mac OS X][clang 6.1.0][64 bit][CHECKED] 16bpp

Here is the command line:
~/x265/build/linux/x265 --input /Volumes/media/TOS_Source_Assets/TOS_4096x1714_ProRes_4444_XQ.mov --fps 24000/1001 --input-res 4096x1714 --input-depth 10 --input-csp i444 --ssim --profile main10 --level-idc 51 --preset faster --tune ssim --bitrate 5000 --output-depth 10 --log-level full --output /Volumes/media/hevcRAW_16b_5mbps_ProRes444XQ_v3.hevc

I have really dumbed down my commands and with this particular preset, I get the following:

yuv [info]: 4096x1714 fps 24000/1001 i444p10 frames 0 - 2728 of 2729
raw [info]: output file: /Volumes/media/hevcRAW_16b_5mbps_ProRes444XQ_v3.hevc
x265 [info]: HEVC encoder version 1.6+451-8592bf81d084
x265 [info]: build info [Mac OS X][clang 6.1.0][64 bit][CHECKED] 16bpp
x265 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
x265 [info]: Main 4:4:4 10 profile, Level-5 (Main tier)
x265 [info]: Thread pool created using 12 threads
x265 [info]: frame threads / pool features : 3 / wpp(27 rows)
x265 [info]: Internal bit depth : 10
x265 [info]: Coding QT: max CU size, min CU size : 64 / 8
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
x265 [info]: ME / range / subpel / merge : hex / 57 / 2 / 2
x265 [info]: Keyframe min / max / scenecut : 23 / 250 / 40
x265 [info]: Lookahead / bframes / badapt : 15 / 4 / 0
x265 [info]: b-pyramid / weightp / weightb / refs: 1 / 1 / 0 / 1
x265 [info]: AQ: mode / str / qg-size / cu-tree : 2 / 1.0 / 64 / 0
x265 [info]: Rate Control / qCompress : ABR-5000 kbps / 0.60
x265 [info]: tools: rd=2 early-skip signhide tmvp fast-intra
x265 [info]: tools: strong-intra-smoothing deblock sao
x265 [full]: poc: 2 weights: [L0:R0 Y{15/16+9}U{60/64+8}V{60/64+8}]
x265 [error]: Merge mode not ok
Illegal instruction: 4

My original commands would get this error over and over. Before this, no issues with this build:
x265 [info]: HEVC encoder version 1.6+411-3700169eb622
x265 [info]: build info [Mac OS X][clang 6.1.0][64 bit] 16bpp

With some testing, the following presets work fine (all other commands remain the same):

Slower
Slow
Medium
Fast


I have tried uninstalling and resintalling to no avail.

captainadamo
14th May 2015, 22:09
The "illegal instruction: 4" is an OS level error. It means you're using a binary compiled with -mmacosx-version-min that is newer than the version of your OS X. What version of OS X are you using and what was -mmacosx-version-min set to for the x265 you're running?

fifer55
14th May 2015, 22:39
What version of OS X are you using and what was -mmacosx-version-min set to for the x265 you're running?

Mac OS X (Yosemite) = 10.10.3 (14D136)
-mmacosx-version-min = ??

Everything was done with homebrew and upgrade && update ran, with a new download of x265 and recompile. Same errors. Also checked Mac OS X updates and all is up to date.

How would I check the "-mmacosx-version-min"? From everything I am seeing, it seems to be an issues with the coder.

http://stackoverflow.com/questions/25352389/difference-between-macosx-deployment-target-and-mmacosx-version-min-compiler-op

http://stackoverflow.com/questions/2923502/what-does-macosx-version-min-imply

Thanks.

captainadamo
14th May 2015, 23:00
You would have to see what homebrew is using to set the min version at because it seems to be setting that incorrectly to create that error.

fifer55
14th May 2015, 23:01
A text file got created in:
~/x265_check_failures.txt

The contents are:
/Users/user/x265/source/encoder/analysis.cpp:1323
Merge mode not ok

Looking at this analysis.cpp file, line 1323 = "X265_CHECK(md.bestMode->ok(), "Merge mode not ok\n");"

interesting...

fifer55
14th May 2015, 23:41
Looks like I am within the min version:

/usr/local/Library/Homebrew/compat/macos.rb

Contents:
module OS
module Mac
def xcode_folder
Xcode.folder
end

def xcode_prefix
Xcode.prefix
end

def xcode_installed?
Xcode.installed?
end

def xcode_version
Xcode.version
end

def clt_installed?
CLT.installed?
end

def clt_version?
CLT.version
end

def x11_installed?
X11.installed?
end

def x11_prefix
X11.prefix
end

def leopard?
version == "10.5"
end

def snow_leopard?
version >= "10.6"
end
alias_method :snow_leopard_or_newer?, :snow_leopard?

def lion?
version >= "10.7"
end
alias_method :lion_or_newer?, :lion?

def mountain_lion?
version >= "10.8"
end
alias_method :mountain_lion_or_newer?, :mountain_lion?

def macports_or_fink_installed?
!macports_or_fink.empty?
end
end
end

foxyshadis
15th May 2015, 00:21
The "illegal instruction: 4" is an OS level error. It means you're using a binary compiled with -mmacosx-version-min that is newer than the version of your OS X. What version of OS X are you using and what was -mmacosx-version-min set to for the x265 you're running?

Not in this case. He's running a checked build, which means any check failures cause an abort (implemented with an illegal instruction for the debugger to catch). I'm not sure why Homebrew builds checked, but in this case something went seriously wrong, so it's a good thing it was caught. The x265 team needs to get in touch to find out why and how it went wrong.

Note that overheating and overclocking can potentially produce runtime errors like this.

fifer55
15th May 2015, 04:37
Not in this case. He's running a checked build, which means any check failures cause an abort (implemented with an illegal instruction for the debugger to catch). I'm not sure why Homebrew builds checked, but in this case something went seriously wrong, so it's a good thing it was caught. The x265 team needs to get in touch to find out why and how it went wrong.

Note that overheating and overclocking can potentially produce runtime errors like this.

Thanks for that foxyshadis. I am running a stock Mac Pro, with nothing overclocked or overheating.

From another thread, I always build with debug and checked versions of x265 using homebrew.

I assume that the x265 team needs to get in contact with the homebrew team?

benwaggoner
19th May 2015, 18:38
I assume that the x265 team needs to get in contact with the homebrew team?
If you want the x265's team attention, the best way is to file an issue here:

https://bitbucket.org/multicoreware/x265/issues?status=new&status=open

x265_Project
19th May 2015, 22:18
Thanks for that foxyshadis. I am running a stock Mac Pro, with nothing overclocked or overheating.

From another thread, I always build with debug and checked versions of x265 using homebrew.

I assume that the x265 team needs to get in contact with the homebrew team?

I agree with Ben; you should file an issue with our issue tracker. We definitely want to support other important open-source projects like Homebrew. It's hard to tell if the bug is with x265 or with Homebrew, or something in between (git mirror of x265 mercurial repo, Mac BSD Unix?).

fifer55
20th May 2015, 21:58
Thanks guys, I have posted in the appropriate board as suggested by Ben and x265 (issue # 133).

x265_Project
20th May 2015, 22:45
Thanks guys, I have posted in the appropriate board as suggested by Ben and x265 (issue # 133).
You can call me Tom. :)

fifer55
29th May 2015, 19:06
Thanks for your guidance guys. It turned out to be the source I was using. When I created a YUV file from the ProRes, all was good.