Graphics
未读OPENGL + FFMPEG 实现全景播放器
加载并编译着色器,用于处理顶点和片段着色。
创建一个球体模型,用于映射视频帧。
实现渲染帧的功能,将解码后的帧数据传递给GPU并绘制在球体上
Video 视频处理 编解码闪屏问题每次渲染新帧时,屏幕可能会出现闪屏现象,这可能是渲染的帧没有正确地显示或者上一帧的内容在新帧显示之前被清空。启用了VSync(垂直同步)。VSync会使得帧刷新率与显示器的刷新率同步,避免在图像未完全刷新时就进行绘制,从而减少闪屏和撕裂的情况。
双缓存问题启用双缓冲机制。这会使得渲染完成的一帧不会立即显示,而是先保存在一个缓冲区中,直到当前帧全部渲染完成后再交换缓冲区,避免屏幕上出现不完整的图像。
1glfwWindowHint(GLFW_DOUBLEBUFFER, GL_TRUE);
多线程处理,其中一个线程专门负责视频解码和帧数据准备,而主线程只负责渲染。这种方法有效地避免了主线程因为解码而阻塞导致的渲染延迟,从而消除了闪屏问题。
123456789101112131415161718192021222324252627// 解码线程,负责解码视频帧vo ...
COEN 329 MidPart1Q-in-Q frame format, function
Basic Q-in-Q
Selective Q-in-Q
Network Processor:
fast path, process path,
CAM
Layer 2, Layer 3 Methods
Scheduling
Classification
Forwarding
STUN
DRR (Deficit Round Robin)
Link aggregation
VPLS
Concept
Loop prevention,
PEs function
Full mesh
MPLS 做了什么
VPN是什么
Mac in Mac in the backbone we use it
double level 是什么 我们有两个level outer level和inner level作为vpn level 和vpn 等等
外层level就是这些
inner level是cus ...
Interview
未读Binary Search Problem Set1. Template Binary Search ProblemsThese are the classic binary search applications, usually searching directly in arrays or matrices.
704. Binary Search Given a sorted array of integers and a target value, return the index if the target is found. If not, return -1.
702. Search in a Sorted Array of Unknown Size You are given an array-like data structure with get(index) API but you don’t know the size. Find the target in this sorted structure with minimal calls to get.
74 ...
Interview
未读Traversal (遍历型递归)144. Binary Tree Preorder TraversalDescription: Return the preorder traversal of a binary tree (Root → Left → Right). Interview Thought: Think “when I arrive at this node, what should I record?” Maintain a result list. Preorder means process root first, then recurse left, then right. Traversal template applies directly.
94. Binary Tree Inorder TraversalDescription: Return the inorder traversal of a binary tree (Left → Root → Right). Interview Thought: Standard DFS order problem ...
Interview
未读Graphic Interview QuestionC++Day1
What are references in C++?
What is a virtual function in C++ and why is it used?
What is the difference between new and malloc()?
Explain the inline keyword.
Day2
What is the difference between reference and pointer?
What is the difference between function overloading and operator overloading?
What is the difference between virtual functions and pure virtual functions?
When should we use multiple inheritance?
What are destructors in C++?
Is destructor overlo ...
Interview
未读Behavior QuestionTight Deadline
Deliver Result
Tell me a time when you work under tight deadline
Why is so tight (explain the situation)
what have you done to accelerate the development process
get more colleague involved
ask for consult/guidance from some senior engineers
cut off some feature
Quick Decision with Incomplete DataPrinciple: Bias for Action
Tell me a time when you had to make a quick decision with limited or incomplete data.
Why was the data incomplete?
What step ...
VCPKG 使用安装VCPKG1. 克隆库12git clone https://github.com/microsoft/vcpkg.gitcd vcpkg
2. 安装库1./bootstrap-vcpkg.bat
3. 使用123456789101112// 查找库./vcpkg search <library-name>./vcpkg search glfw// 安装库./vcpkg install <library-name>./vcpkg install glfw3./vcpkg install <package-name>:<version>// 查看安装包和版本号vcpkg list// 查看详细版本信息vcpkg x-history fmtvcpkg remove package
4. 集成1./vcpkg integrate install
(最简单的)VS-2022搭建opengl开发环境_vcpkg安装opengl-CSDN博客
https://blog.tryhardzhang.xyz/2024/08/02/graphics/opengl/Opengl/
https://blog.tryhardzhang.xyz/2024/07/30/intern/FFMPE%E4%B8%8ESDL%E6%92%AD%E6%94%BE%E5%99%A8%E6%9E%B6%E6%9E%84/
https://blog.tryhardzhang.xyz/2024/07/20/intern/%E8%A7%86%E9%A2%91%E6%92%AD%E6%94%BE%E5%99%A8/
OpenGL
与窗口分离
OpenGL本身不负责创建窗口、管理窗口事件或者处理输入设备。这些任务通常由其他库或操作系统提供的窗口系统接口来处理。
由于viewport视口
右手坐标系
GLFWGLFW(Graphics Library Framework)是一个用于创建窗口、处理输入以及管理OpenGL上下文的开源库。它简化了OpenGL程序的开发,提供了跨平台的接口,使得开发者可以专注于渲染和图形处理,而不必担心底层平台特定的窗口系统和输入处理 ...