打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
How b_adapt works
How b_adapt works?
Subject: Re: How b_adapt works?
On Fri, 1 Jul 2005, Tuukka Toivonen wrote:
I'm trying to understand b_adapt algorithm from the latestsvn, but it's hard to make sense of it.It looks like it encodes a lowres version of some framesusing different frame types (P/B), computes a score usingSATD and the lowres frame, and does a decision based onthat.There seems to be two algorithms, first disabled (#if 0).What means "BFS"?What is this "path" thing?
"BFS" = breadth first search
The idea of the disabled algo is: Given some set of future frames (more than max_b_frames), try all possible combinations of frame types, and use the one with minimum total SATD. As stated that would take exponential time, but that's where BFS comes in: Since I use only 1 past reference frame and I'm not actually encoding the frames, to calculate the cost of frame N I don't need to care about the types before the previous P-frame. A "path" here is a list of frame types. paths[i] is the lowest cost path that ends on frame i (where i is counted starting from the last encoded frame).
Example:Let buffer size = 5    paths[1] = P    paths[2] = BP    paths[3] = BPP    paths[4] = PBBP
To compute paths[5], we try paths[1]+BBBP vs paths[2]+BBP vs paths[3]+BP vs paths[4]+P. Say the lowest cost is paths[2]+BBP = BPBBP. We have no more frames to consider, so this is the best estimate of optimal frametypes. So we encode the first bunch (BP), read in the next two input frames, and call x264_slicetype_analyse again. It can then calculate the new paths[1..3] for free, since the frame costs are cached.
 
What the indices are in frame->i_cost_est[16][16]?
 
The 1st index is the distance from the current frame to list0ref0. The 2nd index is 0 for P-frames or distance to list1ref0 for B-frames.
 
What are the last three parameters p0,p1,b in x264_slicetype_frame_cost?
 
p0 is the frame number of list0ref0, where counting starts with #0 = the last frame coded so far, and 1+ are the frames whose types are to be decided.
b is the frame number of the frame currently being analysed.p1 is the frame number of list1ref0, or equal to b for P-frames.
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
筹码峰突破选股公式
筹码移动副图公式
按部就班-(通达信指标 源码)
魔笛量化波段选股指标公式
通达信锅底右侧指标公式
单峰密集
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服