Skip to content

Commit

Permalink
#4345 nvenc produces frames with bigger padding now
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Sep 4, 2024
1 parent 3a6be55 commit 124baa8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions xpra/codecs/openh264/decoder.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,12 @@ cdef class Decoder:
strides = [ystride, uvstride, uvstride]
cdef int width = buf_info.UsrData.sSystemBuffer.iWidth
cdef int height = buf_info.UsrData.sSystemBuffer.iHeight
if abs(width-self.width) > 1 or abs(height-self.height) > 1:
log.warn("Warning: image bigger than expected")
log.warn(f" {width}x{height} instead of {self.width}x{self.height}")
cdef int wdelta = width - self.width
cdef int hdelta = height - self.height
if abs(wdelta) > 1 or abs(hdelta) > 1:
if (wdelta & 0xffe0) > 0 or (hdelta & 0xfffe0) > 0:
log.warn("Warning: image bigger than expected")
log.warn(f" {width}x{height} instead of {self.width}x{self.height}")
pixels = [
yuv[0][:ystride*height],
yuv[1][:uvstride*(height//2)],
Expand Down

0 comments on commit 124baa8

Please sign in to comment.