From d0a539f602a32617694849dea34bc5c38d6085ad Mon Sep 17 00:00:00 2001 From: GetAway Date: Thu, 26 Apr 2018 09:09:24 +0200 Subject: [PATCH 1/4] fix HD51 mix-up letterbox<->panscan Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/4157945d6040b0702d963028a1dff634abfbc530 Author: GetAway Date: 2018-04-26 (Thu, 26 Apr 2018) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- libarmbox/video_lib.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libarmbox/video_lib.h b/libarmbox/video_lib.h index 1631cb4..7a914fe 100644 --- a/libarmbox/video_lib.h +++ b/libarmbox/video_lib.h @@ -73,8 +73,12 @@ typedef enum { } DISPLAY_AR; typedef enum { - DISPLAY_AR_MODE_PANSCAN = 0, - DISPLAY_AR_MODE_LETTERBOX, + /* FIX for HD51 mix-up of letterbox / panscan + Standard is 1. PANSCAN 2. LETTERBOX + If next drivers are correct please revert + this and pzapit.cpp */ + DISPLAY_AR_MODE_LETTERBOX = 0, + DISPLAY_AR_MODE_PANSCAN, DISPLAY_AR_MODE_NONE, DISPLAY_AR_MODE_PANSCAN2 } DISPLAY_AR_MODE; From 0c87d7b495251cc51f1c3696e1bad6392e6ea55a Mon Sep 17 00:00:00 2001 From: TangoCash Date: Fri, 27 Apr 2018 07:53:48 +0200 Subject: [PATCH 2/4] small fix Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/d0b8259baa435eef02ad082447009e09e6f537ed Author: TangoCash Date: 2018-04-27 (Fri, 27 Apr 2018) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- libarmbox/video.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libarmbox/video.cpp b/libarmbox/video.cpp index a9f6bda..b3e5f96 100644 --- a/libarmbox/video.cpp +++ b/libarmbox/video.cpp @@ -363,7 +363,7 @@ int cVideo::setAspectRatio(int aspect, int mode) { static const char *a[] = { "n/a", "4:3", "14:9", "16:9" }; // static const char *m[] = { "panscan", "letterbox", "bestfit", "nonlinear", "(unset)" }; - static const char *m[] = { "letterbox", "panscan", "bestfit", "nonlinear", "(unset)" }; + static const char *m[] = { "letterbox", "panscan", "bestfit", "nonlinear", "(unset)" }; int n; lt_debug("%s: a:%d m:%d %s\n", __func__, aspect, mode, m[(mode < 0||mode > 3) ? 4 : mode]); From 5c95f1f8f997a9275e4406617471623d31180058 Mon Sep 17 00:00:00 2001 From: GetAway Date: Thu, 26 Apr 2018 09:10:04 +0200 Subject: [PATCH 3/4] fix possible segfault Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/01240cf168c02a1394be4ab44ecc8db83422eb38 Author: GetAway Date: 2018-04-26 (Thu, 26 Apr 2018) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- azbox/video.cpp | 8 +++++--- libarmbox/video.cpp | 8 +++++--- libspark/video.cpp | 8 +++++--- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/azbox/video.cpp b/azbox/video.cpp index bf08c65..8ce3817 100644 --- a/azbox/video.cpp +++ b/azbox/video.cpp @@ -158,7 +158,9 @@ int cVideo::setAspectRatio(int aspect, int mode) /* { "panscan", "letterbox", "fullscreen", "14:9", "(unset)" } */ static const char *m[] = { "1", "2", "0", "1", "(unset)" }; int n; - lt_debug("%s: a:%d m:%d %s\n", __func__, aspect, mode, m[(mode < 0||mode > 3) ? 4 : mode]); + + int mo = (mode < 0||mode > 3) ? 4 : mode; + lt_debug("%s: a:%d m:%d %s\n", __func__, aspect, mode, m[(mo]); if (aspect > 3 || aspect == 0) lt_info("%s: invalid aspect: %d\n", __func__, aspect); @@ -173,8 +175,8 @@ int cVideo::setAspectRatio(int aspect, int mode) if (mode == -1) return 0; - lt_debug("%s: /proc/scalingmode -> %s\n", __func__, m[mode]); - n = proc_put("/proc/scalingmode", m[mode], strlen(m[mode])); + lt_debug("%s: /proc/scalingmode -> %s\n", __func__, m[mo]); + n = proc_put("/proc/scalingmode", m[mo], strlen(m[mo])); if (n < 0) return 1; return 0; diff --git a/libarmbox/video.cpp b/libarmbox/video.cpp index b3e5f96..3b1f244 100644 --- a/libarmbox/video.cpp +++ b/libarmbox/video.cpp @@ -365,7 +365,9 @@ int cVideo::setAspectRatio(int aspect, int mode) // static const char *m[] = { "panscan", "letterbox", "bestfit", "nonlinear", "(unset)" }; static const char *m[] = { "letterbox", "panscan", "bestfit", "nonlinear", "(unset)" }; int n; - lt_debug("%s: a:%d m:%d %s\n", __func__, aspect, mode, m[(mode < 0||mode > 3) ? 4 : mode]); + + int mo = (mode < 0||mode > 3) ? 4 : mode; + lt_debug("%s: a:%d m:%d %s\n", __func__, aspect, mode, m[mo]); if (aspect > 3 || aspect == 0) lt_info("%s: invalid aspect: %d\n", __func__, aspect); @@ -380,8 +382,8 @@ int cVideo::setAspectRatio(int aspect, int mode) if (mode == -1) return 0; - lt_debug("%s: /proc/stb/video/policy -> %s\n", __func__, m[mode]); - n = proc_put("/proc/stb/video/policy", m[mode], strlen(m[mode])); + lt_debug("%s: /proc/stb/video/policy -> %s\n", __func__, m[mo]); + n = proc_put("/proc/stb/video/policy", m[mo], strlen(m[mo])); if (n < 0) return 1; return 0; diff --git a/libspark/video.cpp b/libspark/video.cpp index 3e331d9..a190ac8 100644 --- a/libspark/video.cpp +++ b/libspark/video.cpp @@ -361,7 +361,9 @@ int cVideo::setAspectRatio(int aspect, int mode) static const char *a[] = { "n/a", "4:3", "14:9", "16:9" }; static const char *m[] = { "panscan", "letterbox", "bestfit", "nonlinear", "(unset)" }; int n; - lt_debug("%s: a:%d m:%d %s\n", __func__, aspect, mode, m[(mode < 0||mode > 3) ? 4 : mode]); + + int mo = (mode < 0||mode > 3) ? 4 : mode; + lt_debug("%s: a:%d m:%d %s\n", __func__, aspect, mode, m[mo]); if (aspect > 3 || aspect == 0) lt_info("%s: invalid aspect: %d\n", __func__, aspect); @@ -376,8 +378,8 @@ int cVideo::setAspectRatio(int aspect, int mode) if (mode == -1) return 0; - lt_debug("%s: /proc/stb/video/policy -> %s\n", __func__, m[mode]); - n = proc_put("/proc/stb/video/policy", m[mode], strlen(m[mode])); + lt_debug("%s: /proc/stb/video/policy -> %s\n", __func__, m[mo]); + n = proc_put("/proc/stb/video/policy", m[mo], strlen(m[mo])); if (n < 0) return 1; return 0; From 6ba24f5c89f04071be0bc644240fc83e0d058873 Mon Sep 17 00:00:00 2001 From: Frankenstone Date: Fri, 27 Apr 2018 23:33:05 +0200 Subject: [PATCH 4/4] Revert "fix HD51 mix-up letterbox<->panscan" This reverts commit f10ab4605634c1ed76973b098ad0c44d9225c4e6. Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/0bd5b8751e74d85c95723daabbdec8c31f6fc805 Author: Frankenstone Date: 2018-04-27 (Fri, 27 Apr 2018) ------------------ This commit was generated by Migit --- libarmbox/video_lib.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/libarmbox/video_lib.h b/libarmbox/video_lib.h index 7a914fe..1631cb4 100644 --- a/libarmbox/video_lib.h +++ b/libarmbox/video_lib.h @@ -73,12 +73,8 @@ typedef enum { } DISPLAY_AR; typedef enum { - /* FIX for HD51 mix-up of letterbox / panscan - Standard is 1. PANSCAN 2. LETTERBOX - If next drivers are correct please revert - this and pzapit.cpp */ - DISPLAY_AR_MODE_LETTERBOX = 0, - DISPLAY_AR_MODE_PANSCAN, + DISPLAY_AR_MODE_PANSCAN = 0, + DISPLAY_AR_MODE_LETTERBOX, DISPLAY_AR_MODE_NONE, DISPLAY_AR_MODE_PANSCAN2 } DISPLAY_AR_MODE;