Body: <p>For a while I have been using a build of ffmpeg from 2019:</p>
  <pre><code>ffmpeg version N-94150-g231d0c819f Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 9.1.1 (GCC) 20190621
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
  libavutil      56. 30.100 / 56. 30.100
  libavcodec     58. 53.101 / 58. 53.101
  libavformat    58. 28.101 / 58. 28.101
  libavdevice    58.  7.100 / 58.  7.100
  libavfilter     7. 55.100 /  7. 55.100
  libswscale      5.  4.101 /  5.  4.101
  libswresample   3.  4.100 /  3.  4.100
  libpostproc    55.  4.100 / 55.  4.100
  </code></pre>
  <p>I recently tried out this version:</p>
  <pre><code>ffmpeg version 2021-07-14-git-ca56299fb3-full_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 10.3.0 (Rev2, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libglslang --enable-vulkan --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
  libavutil      57.  0.100 / 57.  0.100
  libavcodec     59.  3.101 / 59.  3.101
  libavformat    59.  4.100 / 59.  4.100
  libavdevice    59.  0.100 / 59.  0.100
  libavfilter     8.  0.103 /  8.  0.103
  libswscale      6.  0.100 /  6.  0.100
  libswresample   4.  0.100 /  4.  0.100
  libpostproc    56.  0.100 / 56.  0.100
  </code></pre>
  <p>I decided to compare the output files I get when using each version of ffempg above:</p>
  <p><code>ffmpeg -i inpath -y -c:v libx264 -x264-params &quot;nal-hrd=cbr&quot; -b:v 120M -minrate 120M -maxrate 120M -bufsize 2M -pix_fmt yuv420p out.mov</code></p>
  <p>They look visually similar and are only a few bytes different in file size. However, the binaries are not identical and the compression isn't the same. For example, here is the pixelwise difference between the output <code>.mov</code> files from each version of ffmpeg using the same input file (with the brightness increased for visibility of the artifacts):</p>
  <p><a href="https://i.sstatic.net/Mx5dX.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Mx5dX.jpg" alt="enter image description here" /></a></p>
  <p>Looking at the difference in the header of the file binaries, I see this:</p>
  <p><a href="https://i.sstatic.net/ZqD3q.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/ZqD3q.png" alt="enter image description here" /></a></p>
  <p>(this is not the only difference between the files, just in the header)</p>
  <p>Apparently the older version is using &quot;core 157&quot; while the newer version is using &quot;core 164.&quot; I can't find any information about these when I search them online. What is difference between these two codecs? Why aren't the artifacts identical given the input file and the settings are the same?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-07-20T04:22:09.570Z
Comments.Text: It's the same encoder - the version has been upgraded. There have been a few bug fixes and assembly optimizations.
Comments.UserDisplayName: Gyan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-07-21T02:59:17.280Z
Comments.Text: If they are just optimizations and bug fixes, why does that affect the artifacts? Shouldn't they be the same? Or do the optimizations affect the the way it is encoded?
Comments.UserDisplayName: EllipticalInitial
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-07-21T04:11:10.623Z
Comments.Text: Yes, bug fixes which alter the result of certain computations will alter the final result.
Comments.UserDisplayName: Gyan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-10-11T21:27:00.370Z
Comments.Text: Use `strings` or `mediainfo` to extract the x264 version/config-options string.  As for pixel differences, the default is `--deterministic` so different runs of the same version should be the same (not dependent on thread scheduling).  But across different versions, the encoding choices it makes could differ due to a different order of looking at frames or something.  Your binary diff shows no difference in config options for the default "medium" preset you were using ('slow' changed somewhat recently from me=umh to trellis=2 as the thing that's different from 'medium'.)
Comments.UserDisplayName: Peter Cordes
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-10-11T21:38:30.173Z
Comments.Text: x264 is open source, if you really want to dig in, see https://forum.doom9.org/showthread.php?t=168378 and the git repository: https://code.videolan.org/videolan/x264/-/commits/master  I didn't find any good summary changelogs when googling (not since about 2013 when it was still reaching maturity), so there's just the commit history of every detailed change.
Comments.UserDisplayName: Peter Cordes
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-10-11T21:40:08.977Z
Comments.Text: The "core 164" and "core 157" numbers come from `#define X264_BUILD 164` in x264.h - https://code.videolan.org/videolan/x264/-/blob/master/x264.h?ref_type=heads#L48.  You can look at the git history of that file (or that line) to find the version that bumped the library ABI.  Also, the `r3065` version numbering is just a count of git commits, like how SVN used to auto-number, so you can I guess use that number to find the latest change your version has.
Comments.UserDisplayName: Peter Cordes
Tags: <ffmpeg><encoding><h.264><x264>
Title: ffmpeg libx264 core 157 vs core 164
UserDisplayName: EllipticalInitial
ThreadText: # ffmpeg libx264 core 157 vs core 164
  
  (Asked by: username_0 on 2021-07-19)
  
  For a while I have been using a build of ffmpeg from 2019:
  
  ```
  ffmpeg version N-94150-g231d0c819f Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 9.1.1 (GCC) 20190621
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
  libavutil      56. 30.100 / 56. 30.100
  libavcodec     58. 53.101 / 58. 53.101
  libavformat    58. 28.101 / 58. 28.101
  libavdevice    58.  7.100 / 58.  7.100
  libavfilter     7. 55.100 /  7. 55.100
  libswscale      5.  4.101 /  5.  4.101
  libswresample   3.  4.100 /  3.  4.100
  libpostproc    55.  4.100 / 55.  4.100
  
  ```
  
  I recently tried out this version:
  
  ```
  ffmpeg version 2021-07-14-git-ca56299fb3-full_build-www.username_1.dev Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 10.3.0 (Rev2, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libglslang --enable-vulkan --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
  libavutil      57.  0.100 / 57.  0.100
  libavcodec     59.  3.101 / 59.  3.101
  libavformat    59.  4.100 / 59.  4.100
  libavdevice    59.  0.100 / 59.  0.100
  libavfilter     8.  0.103 /  8.  0.103
  libswscale      6.  0.100 /  6.  0.100
  libswresample   4.  0.100 /  4.  0.100
  libpostproc    56.  0.100 / 56.  0.100
  
  ```
  
  I decided to compare the output files I get when using each version of ffempg above:
  
  `ffmpeg -i inpath -y -c:v libx264 -x264-params "nal-hrd=cbr" -b:v 120M -minrate 120M -maxrate 120M -bufsize 2M -pix_fmt yuv420p out.mov`
  
  They look visually similar and are only a few bytes different in file size. However, the binaries are not identical and the compression isn't the same. For example, here is the pixelwise difference between the output `.mov` files from each version of ffmpeg using the same input file (with the brightness increased for visibility of the artifacts):
  
  [![enter image description here](https://i.sstatic.net/Mx5dX.jpg)](https://i.sstatic.net/Mx5dX.jpg)
  
  Looking at the difference in the header of the file binaries, I see this:
  
  [![enter image description here](https://i.sstatic.net/ZqD3q.png)](https://i.sstatic.net/ZqD3q.png)
  
  (this is not the only difference between the files, just in the header)
  
  Apparently the older version is using "core 157" while the newer version is using "core 164." I can't find any information about these when I search them online. What is difference between these two codecs? Why aren't the artifacts identical given the input file and the settings are the same?
  
  **Tags:** ffmpeg, encoding, h.264, x264
  
  > **Comments:**
  > **username_1**: It's the same encoder - the version has been upgraded. There have been a few bug fixes and assembly optimizations.  
  > **username_0**: If they are just optimizations and bug fixes, why does that affect the artifacts? Shouldn't they be the same? Or do the optimizations affect the the way it is encoded?  
  > **username_1**: Yes, bug fixes which alter the result of certain computations will alter the final result.  
  > **username_2**: Use `strings` or `mediainfo` to extract the x264 version/config-options string.  As for pixel differences, the default is `--deterministic` so different runs of the same version should be the same (not dependent on thread scheduling).  But across different versions, the encoding choices it makes could differ due to a different order of looking at frames or something.  Your binary diff shows no difference in config options for the default "medium" preset you were using ('slow' changed somewhat recently from me=umh to trellis=2 as the thing that's different from 'medium'.)  
  > **username_2**: x264 is open source, if you really want to dig in, see https://forum.doom9.org/showthread.php?t=168378 and the git repository: https://code.videolan.org/videolan/x264/-/commits/master  I didn't find any good summary changelogs when googling (not since about 2013 when it was still reaching maturity), so there's just the commit history of every detailed change.  
  > **username_2**: The "core 164" and "core 157" numbers come from `#define X264_BUILD 164` in x264.h - https://code.videolan.org/videolan/x264/-/blob/master/x264.h?ref_type=heads#L48.  You can look at the git history of that file (or that line) to find the version that bumped the library ABI.  Also, the `r3065` version numbering is just a count of git commits, like how SVN used to auto-number, so you can I guess use that number to find the latest change your version has.  
  
  ---
  
  ## 0 answers
  
  