Skip to content

Conversation

@Luodian
Copy link
Collaborator

@Luodian Luodian commented Jan 4, 2026

Summary

  • Remove duplicate _split_yuv420_planes function definition in hevc_feature_decoder_mv.py
  • Replace broad except Exception: with specific exception types in HEVC decoder files

Changes

File Changes
hevc_feature_decoder.py Replace 10 broad exceptions with specific types
hevc_feature_decoder_mv.py Remove duplicate function (-29 lines), fix 5 broad exceptions

Benefits

  • Debuggability: Specific exception types make it easier to locate issues
  • Safety: KeyboardInterrupt and SystemExit will no longer be silently swallowed
  • Code quality: Removed 29 lines of duplicate code

Test plan

  • Python syntax check passed
  • Manual verification of HEVC decoder functionality

- Remove duplicate _split_yuv420_planes function in hevc_feature_decoder_mv.py
- Replace broad `except Exception:` with specific types (ValueError, TypeError,
  OSError, IndexError, AttributeError, cv2.error) in hevc_feature_decoder.py
  and hevc_feature_decoder_mv.py
- This improves debuggability and allows KeyboardInterrupt/SystemExit to propagate
@Luodian Luodian marked this pull request as draft January 4, 2026 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants