From 31902f2448b14a03d9e428256cf30fe12f40ecef Mon Sep 17 00:00:00 2001 From: Saxon Date: Thu, 2 Jan 2020 11:30:51 +1030 Subject: [PATCH] codec/mjpeg/jpeg.go: componenting consts for SOF0 and SOS headers --- codec/mjpeg/jpeg.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/codec/mjpeg/jpeg.go b/codec/mjpeg/jpeg.go index 1cd7b92b..b2d5b149 100644 --- a/codec/mjpeg/jpeg.go +++ b/codec/mjpeg/jpeg.go @@ -73,15 +73,15 @@ const ( // SOF0 (start of frame) header fields. const ( - sofLen = 17 - sofPrecision = 8 - sofNoOfComponents = 3 + sofLen = 17 // Length of SOF0 segment excluding marker. + sofPrecision = 8 // Data precision in bits/sample. + sofNoOfComponents = 3 // Number of components (1 = grey scaled, 3 = color YcbCr or YIQ 4 = color CMYK) ) // SOS (start of scan) header fields. const ( - sosLen = 12 - sosComponentsInScan = 3 + sosLen = 12 // Length of SOS segment excluding marker. + sosComponentsInScan = 3 // Number of components in scan. ) var (