Opened 15 years ago
Closed 15 years ago
#6203 closed patch (fixed)
Comment describing rtfileheader.aspect is inconsistent with how it is used
Reported by: | Owned by: | Isaac Richards | |
---|---|---|---|
Priority: | trivial | Milestone: | unknown |
Component: | MythTV - General | Version: | head |
Severity: | low | Keywords: | |
Cc: | Ticket locked: | no |
Description
In format.h, the definition of struct rtfileheader includes the following:
22 double aspect; 1.0 .. square pixel (1.5 .. e.g. width=480: width*1.5=720
23 for capturing for svcd material
This describes the aspect ratio of a single pixel, whereas in NuppelVideoRecorder?.cpp, it is used as a frame aspect ratio (video_aspect defaults to 1.33333 as of Changeset 5627):
1914 fileheader.aspect = video_aspect;
There is similar behavior in nuppeldecoder.cpp, except a special case for aspect 1.0:
208 if (fileheader.aspect > .999 && fileheader.aspect < 1.001)
209 fileheader.aspect = 4.0 / 3;
210 current_aspect = fileheader.aspect;
This causes problems when a nuv file generated by MythTV is played in MPlayer, for example, since the result is a 640x480 4:3 video is interpreted by MPlayer as being 16:9, and a 720x480 4:3 video is interpreted as 2:1.
Seeing as this has been the behavior for 4 years, I can understand that changing MythTV's behavior is undesirable. In fact, it looks like libavformat in FFmpeg svn has been modified to match MythTV's behaviour as of last July. Because of this, the attached patch simply modifies the comment to make it describe how this variable is actually used.
Attachments (1)
Change History (2)
Changed 15 years ago by
Attachment: | format.h.patch added |
---|
comment:1 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In [19888]) Change the rtfileheader.aspect comment in format.h to correctly describe MythTV's usage of this field. The original (non)usage of this field was changed in [5627] to allow MythTV to support frames where the width:height of the frame was not equal to the desired display aspect ratio.
Closes #6203.