From 17793da1f5b82862cdd06e26c4be884ee5f4868e Mon Sep 17 00:00:00 2001 From: vanhofen Date: Fri, 16 Jun 2017 11:40:17 +0200 Subject: [PATCH] libdvbsub: allow FullHD resolution dimensions Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/31918aefff20107f8fdc63495c4430c166a78da3 Author: vanhofen Date: 2017-06-16 (Fri, 16 Jun 2017) Origin message was: ------------------ - libdvbsub: allow FullHD resolution dimensions --- lib/libdvbsub/dvbsubtitle.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/libdvbsub/dvbsubtitle.cpp b/lib/libdvbsub/dvbsubtitle.cpp index 3ab952574..4901c8dd8 100644 --- a/lib/libdvbsub/dvbsubtitle.cpp +++ b/lib/libdvbsub/dvbsubtitle.cpp @@ -164,7 +164,12 @@ void cDvbSubtitleBitmaps::Draw(int &min_x, int &min_y, int &max_x, int &max_y) yoff = ystart; } #endif - int h2 = (width == 1280) ? 720 : 576; + int h2 = 576; + switch (width) + { + case 1280: h2 = 720; break; + case 1920: h2 = 1080; break; + } xoff = sub.rects[i]->x * sw / width; yoff = sub.rects[i]->y * sh / h2; int nw = width * sw / width;