mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-28 02:12:28 +00:00
76b33704b6
For 422 frames we should not use hard coded 8 to calculate mb size for uv plane. Chroma shift should be taken into consideration to be compatiple with different sampling format. The error is reported by fate test when av_cpu_max_align() return 64 on the platform supporting AVX512. This is a hidden error and it is exposed after commit17a59a634c
. mpeg2enc has a mechanism to reuse frames. When it computes SSE (sum of squared error) on current mb, reconstructed mb will be wrote to the previous mb space, so that the memory can be saved. However if the align is 64, the frame is shared in somewhere else, so the frame cannot be reused and a new frame to store reconstrued data is created. Because the height of mb is wrong when compute sse on 422 frame, starting from the second line of macro block, changed data is read when frame is reused (we need to read row 16 rather than row 8 if frame is 422), and unchanged data is read when frame is not reused (a new frame is created so the original frame will not be changed). That is why commit17a59a634c
exposes this issue, because it add av_cpu_max_align() and this function return 64 on platform supporting AVX512 which lead to creating a frame in mpeg2enc, and this lead to the different outputs. Signed-off-by: Wenbin Chen <wenbin.chen@intel.com> Signed-off-by: Marton Balint <cus@passwd.hu>
5 lines
292 B
Plaintext
5 lines
292 B
Plaintext
87e5c69775b363db649c253050536045 *tests/data/fate/vsynth_lena-mpeg2-422.mpeg2video
|
|
361341 tests/data/fate/vsynth_lena-mpeg2-422.mpeg2video
|
|
93cefcf101e6d0814acfaa626a02be90 *tests/data/fate/vsynth_lena-mpeg2-422.out.rawvideo
|
|
stddev: 2.97 PSNR: 38.67 MAXDIFF: 57 bytes: 7603200/ 7603200
|