aboutsummaryrefslogtreecommitdiffstats
path: root/tests/tiny_ssim.c
diff options
context:
space:
mode:
authorZhao Zhili <zhilizhao@tencent.com>2024-07-17 17:47:13 +0800
committerTimo Rothenpieler <timo@rothenpieler.org>2024-08-02 17:57:19 +0200
commit670ff6c7ce0c70798a9909b334310625fe067a34 (patch)
tree3b81144fb5f0be33158829fd760f0597e9fd9cec /tests/tiny_ssim.c
parentbcea693f75dac9f689fe8789f0e97b8e952499c1 (diff)
downloadffmpeg-670ff6c7ce0c70798a9909b334310625fe067a34.tar.gz
avcodec/nvenc: rework on DTS generation
Before the patch, the method to generate DTS only works with timebase equal to 1/fps. With timebase like 1/1000 ./ffmpeg -i foo.mp4 -an -c:v h264_nvenc -enc_time_base 1/1000 bar.mp4 pts 0 dts -3 pts 160 dts 37 pts 80 dts 77 pts 40 dts 117 <-- invalid pts 120 dts 157 pts 320 dts 197 pts 240 dts 237 pts 200 dts 277 <-- invalid pts 280 dts 317 <-- invalid The generated DTS can be larger than PTS, since it only reorder the input PTS and minus the number of frame delay, which doesn't take timebase into account. It should minus the "time" of frame delay. 9a245bd trying to fix the issue, but the implementation is incomplete, which only use time_base.num. Then it got reverted by ac7c265b33b. After this patch: pts 0 dts -120 pts 160 dts -80 pts 80 dts -40 pts 40 dts 0 pts 120 dts 40 pts 320 dts 80 pts 240 dts 120 pts 200 dts 160 pts 280 dts 200 Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
Diffstat (limited to 'tests/tiny_ssim.c')
0 files changed, 0 insertions, 0 deletions