From b052a833286fe2827d863bd8d9fcf0c005eb472c Mon Sep 17 00:00:00 2001 From: Vipin Thomas <vipin.thomas@stud.th-deg.de> Date: Sat, 12 Jun 2021 13:48:08 +0000 Subject: [PATCH] Update pixel.cpp --- pixel.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pixel.cpp b/pixel.cpp index 0998f7c..f252f49 100644 --- a/pixel.cpp +++ b/pixel.cpp @@ -38,7 +38,10 @@ void pixel( #pragma HLS INTERFACE axis port=dout pkt_t pkt=din.read(); - pkt.data=stegno(character,pkt.data,position1,position2); + if (count_streams == 0){ + charIn=toAscii((char)character); + } + pkt.data=stegno(charIn,pkt.data,position1,position2); // switch(selector) // { // case 0: @@ -71,7 +74,7 @@ void pixel( int stegno(int c,int data,int position1,int position2){ - charIn=toAscii((char)c); + if((count_streams >= 3 * (position1 - 1)) && (count_streams < 3 * (position2))){ addNum=charIn%10; charIn=(int)charIn/10; -- GitLab