int val;
char buf[20];
int ret = 0;
+ int cont2;
- count = min_t(size_t, count, (sizeof(buf)-1));
- if (copy_from_user(buf, userbuf, count))
+ cont2 = min_t(size_t, count, (sizeof(buf) - 1));
+ if (copy_from_user(buf, userbuf, cont2))
return -EFAULT;
- buf[count] = 0;
+ buf[cont2] = 0;
ret = kstrtoint(buf, 0, &val);
if (ret != 0) {
pr_info("cfg_en_osd_100 do nothing!\n");
hdr10_plus_pkt_update = HDRPLUS_PKT_UPDATE;
pr_csc(2, "update_hdr10_plus_pkt on\n");
} else {
+ if (!vdev)
+ return;
vdev->fresh_tx_hdr_pkt(
&cur_send_info);
vdev->fresh_tx_hdr10plus_pkt(0,
return;
}
if (hdr10_plus_pkt_update == HDRPLUS_PKT_UPDATE) {
+ if (!vdev)
+ return;
vdev->fresh_tx_hdr_pkt(
&cur_send_info);
vdev->fresh_tx_hdr10plus_pkt(
pr_csc(2, "send_hdr10_plus_pkt update\n");
} else if ((hdr10_plus_pkt_update == HDRPLUS_PKT_REPEAT) &&
(get_hdr10_plus_pkt_delay() > 1)) {
+ if (!vdev)
+ return;
vdev->fresh_tx_hdr_pkt(
&cur_send_info);
vdev->fresh_tx_hdr10plus_pkt(
int hdr10_plus_ootf_gen(void)
{
- int referenceCurve_flag = 1;
-
+ /*int referenceCurve_flag = 1;*/
int order, i;
uint64_t Kx, Ky;
uint64_t AnchorY[15];
HDR_MAX
};
- int productPeak = 700;
-
-/* for (i = 0; i < POINTS; i++) {
- * curveX[i] = 0;
- * curveY[i] = 0;
- * gain[i] = 0;
- * gain_ter[i] = 0;
- * }
- */
+ int productpeak = 700;
memset(curveX, 0, sizeof(uint64_t) * POINTS);
memset(curveY, 0, sizeof(uint64_t) * POINTS);
/* the final tv OOTF curve params init*/
EBZCurveParametersInit(&productBezierParams);
+
/* the bezier parameters from metadata init*/
EBZCurveParametersInit(&referenceBezierParams);
/*step 1. get metadata from vframe*/
MetaDataInit(&metadata, &hdr10_plus_sei);
+
/*step 2. get bezier params from metadata*/
getMetaData(&metadata, &referenceBezierParams);
+
/*step 3. gen final guided OOTF*/
- if (referenceCurve_flag == 0)
+ /*if (referenceCurve_flag == 0)*/
/* Basis OOTF : Direct calculation of product TM curve from*/
/*ST-2094 percentile metadata */
- basisOOTF(&metadata, &basisOOTF_Params, productPeak,
+ /*basisOOTF(&metadata, &basisOOTF_Params, productPeak,*/
/* here length(minBezierParams->Anchor) =order*/
- metadata.maxSceneSourceLuminance, &productBezierParams);
- else
- GuidedOOTF(&metadata, &basisOOTF_Params, &referenceBezierParams,
- productPeak, &productBezierParams);
+ /*metadata.maxSceneSourceLuminance, &productBezierParams);*/
+ /*else*/
+
+ GuidedOOTF(
+ &metadata, &basisOOTF_Params,
+ &referenceBezierParams, productpeak,
+ &productBezierParams);
/*step 4. get guided bezier params*/
Kx = (uint64_t)productBezierParams.Sx;