Interview Questions and Tips for Sr. Video Software Engineer in C++

Domain Knowledge: Video/Image/Streaming/Camera:

  1. For every question, the Q&A will be in 3W: What? Why? And How?
  2. Pick up one work/experience from his resume. Ask him to explain: project, his role, design, coding implement, unit test, any challenges and how to handle them?
  3. What are the main differences between HEVC and H.264? How does HEVC make it better? H.264: Macroblock block size?(16X16). Macroblock partition? (down to 4X4) HEVC: Coding Tree Unit(CTUs) size? (up to 64X64)
  4. How does the encoder select encoding block size either 4X4 or 32X32? Based on what? What is the outcome? Detailed areas or smooth areas.
  5. Can you draw a block diagram of HEVC or H.264 encoder? What is “Synthesis by Analysis” in video encoder? Why? How does it work?
  6. What are the most important steps in encoder to achieve high compression efficiency? (1)Motion compensation? (2)DCT transform? (3)Quantization? (4)Entropy encode? Which one is #1? Why? How does it work?
  7. I-frame? Intra-frame prediction. P-frame? Inter-frame prediction. How does the encoder select I-frame or P-frame prediction? Based on what? Scene switching? Packet lost? IDR? Prediction residual.
  8. What is the difference between I-frame and IDR-frame? How often do they occur? IDR-frame: How does it work? The reference frame buffer gets cleared out in encoder or in decoder or in both?
  9. Motion estimation & compensation? Processing block size? Macroblock and microblock-partition. How to decide the best motion estimation/compensation block? Minimize the prediction residual. What are the outputs? Prediction residual frame and the motion vector.
  10. How does the encoder control the tradeoff between the output bitrate (lower for better compression efficiency) and the video quality? By adjusting what parameter(s)? Rate-distortion performance?
  11. “In-loop De-blocking filter” in video encoder? Why is it needed? Block based encoding has blocking or ringing distortion. How does it work? Smooths the block edges by Extrapolation. Which region of a frame/picture is this De-blocking filter applied to? Microblock boundaries. Why is it called “In-loop”? It is placed inside the encoding and decoding loops.
  12. “Slices” in H.264 & HEVC? “Tiles” in HEVC? Why? What purpose? Independent decoding without reference to any previous slices. (1)Error resilience. Re-sync decoder with encoder in case of packet loss. (2)Parallel encoding/decoding in multi-cores CPU and GPU.
  13. (Image) What are color spaces? RGB? YCbCr? YUV? Why YCbCr or YUV? Human eye and brain are less sensitive to color than luminance, so we can represent color in lower resolution to save bandwidth.YUV sampling formats? YUV420, YUV422 and YUV444? How do they look like? Can you draw a picture?
  14. (Video) FRC(Frame Rate Conversion) Can you convert 30FPS(NTSC) or 25FPS(PAL) to 24FPS(Cinema screen)? 30FPS up-sampling by 4 ->120FPS down-sampling by 5 -> 24FPS? Either drop frames or slow down the playback?
  15. (Streaming)Any streaming experience? How does Adaptive Bitrate Streaming(ABR) work? Is it in the source side, server side or in the receiver(player) side? What are the ABR streaming protocols? HLS? DASH?
  16. (Camera) Camera ISP pipeline? Can you draw a block diagram? Image sensor(raw-bayer 1920X1080 pixels at 12-bits)->Debayer(device-rgb)->3X3 matrix(device-rgb to sensor- rgb)->Gamma correction(sensor rgb to display rgb)->3X3 matrix(rgb to YUV)->Chroma down-sampling(YUV444 to YUV420)->JPG encoder.
  17. (Camera) Mosaic patterns or Bayer format? CFA(Color Filter Array)? Demosaicing algorithms? Interpolation: Biliner, Cubic, or AHD(Adaptive Homogeneity-Directed: industry standard)?
  18. (Camera) AWB(Auto-White-Balance)? What problem here? How does it work?
  19. (Camera) Auto-Exposure? What problem here? How does it work?

C++ Programming Knowledge:

  1. For every question, the Q&A will be in 3W: What? Why? And How?
  2. What are differences between process vs thread? How to decide using process or thread? Any tradeoff? Give me an example?
  3. What are differences between semaphore vs mutex? Protect sharing resources? Signaling and synchronization?
  4. What is dead-lock? How to avoid it?
  5. Using “static” keyword? Static class members: static data and static functions. Belong to class but not the objects of the class. When can you access class static data? Before any objects are created! How to access class static data? ClassName::dataName.
  6. Is “new” in C++ any better than old malloc()? new/delete? malloc()/free()? Yes! It does more: (1)Object construction: “new” and “delete” create and destroy objects, while malloc() and free() merely allocate and deallocate memory. (2)Safety: “new” returns a correct type of pointer while malloc() return s void* which can be converted to any other types of point and it isn’t type safe. (3)Flexibility: “new” can be overloaded by a class. But malloc() can’t. Can we use “new”/free() or malloc()/delete? No.
  7. What is dynamic binding (run-time) instead of static binding(compile time)? Polymorphism? Why is it needed? How to use it? Virtual keyword.
  8. How does C++ compiler achieve dynamic binding or polymorphism? The cost? Virtual table “vtable” per class. Virtual point “vpointer” per object.
  9. Using any C++ STL containers? vector? deque? list? What differences are among them? list vs forward_list? set vs multiset? set vs unordered_set? set vs map?
  10. Using any C++ smart pointers? raw-pointer? unique_ptr? shared-ptr? weak_ptr? Why are they needed? How do they work? What differences are among them? Class destructor to release memory, reference count to share_ptr. Why weak_ptr? Ring or cycle of objects.

11. Using any C++ design patterns? Singleton? Factory? Or others? Give me an example. Why? How?

Programming Coding Skills:

  1. Reverse a string: void reverse(char *ptr)? time-complexity = O(?), space-complexity = O(?), in-place?
  2. Write a function to find the index of the third largest item in the array. time-complexity = O(?), space-complexity = O(?)
  3. Merge two sorted arrays? time-complexity = O(?), space-complexity = O(?), in-place?
  4. Merge two sorted singly linked lists? time-complexity = O(?), space-complexity = O(?), in-place?
  5. Search the Nth node to the end of a singly-linked-list? Two-pass? Or Single-pass?
  6. How to detect the cycle in a singly linked list? Two-pointers?




Sr. Media Software Engineer at Avail Medsystems

Love podcasts or audiobooks? Learn on the go with our new app.

Istio Multi Cluster on Different GCP Project

Node: 1 | Vulnhub Walkthrough

Shellman reborn

Why should you treat infrastructure like software?

FUGU’s AMA Debut

How I Help Developers Sleep at Night

Being in the hpaPaaS Big League

How to Adapt with the Adapter Design Pattern

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Derek Q. Wang

Derek Q. Wang

Sr. Media Software Engineer at Avail Medsystems

More from Medium

Check and Mate

How to Prepare for a Scrum Master Interview

What is the Difference Between Consumer and Enterprise Product Management?

WOC 2.0 LLVM Compiler Infrastructure Experience