mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
dispmanx: fix grabber issues with certain widths and support cropping (#634)
* dispmanx: fix grabber issues with certain widths and support cropping The dispmanx grabber will produce garbage output if the destination pitch is not set to a multiple of 64 bytes (16 RGBA pixels). It can also fail when retrieving only a part of the image (eg in 3DSBS or TAB mode). Handle these cases by capturing the full image into a separate buffer with the pitch set to an appropriate value and manually handle 3D SBS/TAB left/top half copying. At this point supporting cropping like in the V4L2 grabber is rather easy and added as well. This'll help handling overscan setups (old TVs) and removing (possibly asymmetric) overscan borders. Cropping is disabled in video capture mode (when the DISPMANX_SNAPSHOT_FILL flag is set). Signed-off-by: Matthias Reichl <hias@horus.com> * hyperion-dispmanx: add optional crop values and 3D mode options Signed-off-by: Matthias Reichl <hias@horus.com> * hyperiond: support cropping on the dispmanx grabber Honor cropLeft, cropRight, cropTop and cropBottom settings in the framegrabber section of the conf file to control cropping. Signed-off-by: Matthias Reichl <hias@horus.com> Former-commit-id: bbb55f6621b90384e417f37da4f2543d112ef57a
This commit is contained in:
committed by
brindosch
parent
4ccda40250
commit
f584b05de5
@@ -231,6 +231,11 @@ int main(int argc, char** argv)
|
||||
frameGrabberConfig["frequency_Hz"].asUInt(),
|
||||
frameGrabberConfig.get("priority",900).asInt(),
|
||||
&hyperion);
|
||||
dispmanx->setCropping(
|
||||
frameGrabberConfig.get("cropLeft", 0).asInt(),
|
||||
frameGrabberConfig.get("cropRight", 0).asInt(),
|
||||
frameGrabberConfig.get("cropTop", 0).asInt(),
|
||||
frameGrabberConfig.get("cropBottom", 0).asInt());
|
||||
|
||||
if (xbmcVideoChecker != nullptr)
|
||||
{
|
||||
|
Reference in New Issue
Block a user