embeded/i.mx 8m plus2023. 3. 23. 10:46

크아.. 볼게 너무 많아 ㅠㅠ

그런데 openAMP가 나오는게 먼가.. 쎄~~~하다 -_-

 

linux / cortex-A / rpmsg <-> rtos or baremetal / cortex-M / rpmsg-lite

 

성능 향상은 openAMP와는 넘사벽일 수도 있는 설정이 존재하고

Core A와 Core B 이기종(heterogeneous) 장치간의 통신을 지원한다.

[링크 : https://github.com/nxp-mcuxpresso/rpmsg-lite]

'embeded > i.mx 8m plus' 카테고리의 다른 글

nxp i.mx8mp win iot part 2  (0) 2023.05.26
nxp i.mx8mp win iot  (0) 2023.05.26
i.mx8m plus cortex-m7 part.2  (0) 2023.02.23
i.mx8m plus cortex-m7  (0) 2023.02.23
i.mx8m plus win iot 실행  (0) 2023.02.23
Posted by 구차니

원본 설명.. tee는 그나마 알아듣겠는데

tee
Split data to multiple pads. Branching the data flow is useful when e.g. capturing a video where the video is shown on the screen and also encoded and written to a file. Another example is playing music and hooking up a visualisation module.

One needs to use separate queue elements (or a multiqueue) in each branch to provide separate threads for each branch. Otherwise a blocked dataflow in one branch would stall the other branches.

Example launch line
 gst-launch-1.0 filesrc location=song.ogg ! decodebin ! tee name=t ! queue ! audioconvert ! audioresample ! autoaudiosink t. ! queue ! audioconvert ! goom ! videoconvert ! autovideosink

Play song.ogg audio file which must be in the current working directory and render visualisations using the goom element (this can be easier done using the playbin element, this is just an example pipeline).

[링크 : https://gstreamer.freedesktop.org/documentation/coreelements/tee.html?gi-language=c]

 

queue는 도대체 어떻게 해석을 해야하냐..

queue
Data is queued until one of the limits specified by the , and/or properties has been reached. Any attempt to push more buffers into the queue will block the pushing thread until more space becomes available.

The queue will create a new thread on the source pad to decouple the processing on sink and source pad.

You can query how many buffers are queued by reading the property. You can track changes by connecting to the notify::current-level-buffers signal (which like all signals will be emitted from the streaming thread). The same applies to the and properties.

The default queue size limits are 200 buffers, 10MB of data, or one second worth of data, whichever is reached first.

As said earlier, the queue blocks by default when one of the specified maximums (bytes, time, buffers) has been reached. You can set the property to specify that instead of blocking it should leak (drop) new or old buffers.

The signal is emitted when the queue has less data than the specified minimum thresholds require (by default: when the queue is empty). The signal is emitted when the queue is filled up. Both signals are emitted from the context of the streaming thread.

[링크 : https://gstreamer.freedesktop.org/documentation/coreelements/queue.html?gi-language=c]

 

 

마태복음님 만세!

얼마나 직관적인가!!

Multiple outputs (tee)
This page describes the tee element, which allows audio & video streams to be sent to more than one place.

[링크 : https://github.com/matthew1000/gstreamer-cheat-sheet/blob/master/tee.md]

 

queue는 쓰레드 경계로 쓰거나 버퍼(속도가 다를 경우 완충을 위한)로 사용된다.

Queues
A queue can appear almost anywhere in a GStreamer pipeline. Like most elements, it has an input (sink) and output (src). It has two uses:

As a thread boundary - i.e. The elements after a queue will run in a different thread to those before it
As a buffer, for when different parts of the pipeline may move at different speeds.

[링크 : https://github.com/matthew1000/gstreamer-cheat-sheet/blob/master/queues.md]

 

 

+

$ gst-launch-1.0 videotestsrc ! videoconvert ! tee name=t ! queue ! autovideosink t. ! queue ! autovideosink
$ gst-launch-1.0 videotestsrc ! videoconvert ! tee name=t ! queue ! autovideosink t. ! queue ! autovideosink t. ! queue ! autovideosink

[링크 : http:// https://medium.com/may-i-lab/gstreamer-gstreamer-기초-da5015f531fc]

Posted by 구차니

장치 상태는 v4l2-ctl로 보는데 일단 비디오 포맷이 MJPG이다.

$ v4l2-ctl --all -d 0
Driver Info (not using libv4l2):
Driver name   : uvcvideo
Card type     : 720p HD Camera: 720p HD Camera
Bus info      : usb-0000:00:14.0-6
Driver version: 5.4.229
Capabilities  : 0x84A00001
Video Capture
Metadata Capture
Streaming
Extended Pix Format
Device Capabilities
Device Caps   : 0x04200001
Video Capture
Streaming
Extended Pix Format
Priority: 2
Video input : 0 (Camera 1: ok)
Format Video Capture:
Width/Height      : 640/480
Pixel Format      : 'MJPG'
Field             : None
Bytes per Line    : 0
Size Image        : 614400
Colorspace        : sRGB
Transfer Function : Default (maps to sRGB)
YCbCr/HSV Encoding: Default (maps to ITU-R 601)
Quantization      : Default (maps to Full Range)
Flags             : 
Crop Capability Video Capture:
Bounds      : Left 0, Top 0, Width 640, Height 480
Default     : Left 0, Top 0, Width 640, Height 480
Pixel Aspect: 1/1
Selection: crop_default, Left 0, Top 0, Width 640, Height 480
Selection: crop_bounds, Left 0, Top 0, Width 640, Height 480
Streaming Parameters Video Capture:
Capabilities     : timeperframe
Frames per second: 30.000 (30/1)
Read buffers     : 0
                     brightness 0x00980900 (int)    : min=0 max=127 step=1 default=64 value=64
                       contrast 0x00980901 (int)    : min=0 max=100 step=1 default=50 value=50
                     saturation 0x00980902 (int)    : min=0 max=8 step=1 default=4 value=4
                            hue 0x00980903 (int)    : min=-180 max=180 step=1 default=0 value=0
 white_balance_temperature_auto 0x0098090c (bool)   : default=1 value=1
                          gamma 0x00980910 (int)    : min=100 max=500 step=1 default=300 value=300
           power_line_frequency 0x00980918 (menu)   : min=0 max=2 default=2 value=2
      white_balance_temperature 0x0098091a (int)    : min=2800 max=6500 step=10 default=3400 value=3400 flags=inactive
                      sharpness 0x0098091b (int)    : min=0 max=8 step=1 default=4 value=4
         backlight_compensation 0x0098091c (int)    : min=0 max=1 step=1 default=0 value=0
                  exposure_auto 0x009a0901 (menu)   : min=0 max=3 default=3 value=3
              exposure_absolute 0x009a0902 (int)    : min=50 max=10000 step=1 default=166 value=166 flags=inactive

 

2개를 나란히 하는걸 보려고 했는데 일단 에러나니 패스하고

$ gst-launch-1.0 -vvv tee name=splitter v4l2src device=/dev/video0 do-timestamp=true ! image/jpeg, width=640, height=480, framerate=30/1 ! jpegparse ! jpegdec ! videoconvert ! videoscale ! xvimagesink sync=false splitter. v4l2src device=/dev/video2 do-timestamp=true ! image/jpeg, width=1280, height=720, framerate=30/1 ! jpegparse ! jpegdec ! videoconvert ! videoscale ! xvimagesink sync=false splitter.
WARNING: erroneous pipeline: unexpected reference "splitter" - ignoring

[링크 : https://gist.github.com/jetsonhacks/10b870c2948215da3e5e]

 

포인트는.. image/jpeg로 받아서 jpegparse 하고(jpeg 부분만 잘라내고)

jpegdec 하고(jpeg를 bmp 처럼 rgb로 변환)

xvimagesink에 적절한 videoscale로 맞추어서 출력하는 건가?

$ gst-launch-1.0 v4l2src device=/dev/video0 do-timestamp=true ! image/jpeg, width=1280, height=720, framerate=30/1 ! jpegparse ! jpegdec ! videoconvert ! videoscale ! xvimagesink sync=false

 

화면 프레임이 떨어지지만 최소한도로 줄이면 아래와 같이 가능도 하다.

$ gst-launch-1.0 v4l2src ! jpegparse ! jpegdec ! videoscale ! xvimagesink

'프로그램 사용 > gstreamer' 카테고리의 다른 글

gstreamer pad - sink 와 src  (0) 2023.03.27
gstreamer cheat sheet - tee, queue  (0) 2023.03.22
gstream videomixer  (0) 2023.02.17
gstream compositing - 그러니까 비디오 믹서?  (0) 2021.07.21
gst h264 filesink  (0) 2021.07.14
Posted by 구차니

#*#

'개소리 왈왈 > 직딩의 비애' 카테고리의 다른 글

외근 야근  (0) 2023.04.03
리듬.깨짐  (0) 2023.03.26
언제나 피곤  (0) 2023.03.12
피곤  (0) 2023.03.11
피곤피곤 개피곤  (0) 2023.03.09
Posted by 구차니

무분함

 

나중에 정식 제품을 사봐야지 ㅋㅋ

'개소리 왈왈 > 아마추어무선' 카테고리의 다른 글

안테나 수리  (0) 2022.08.20
김포공항 근처 다녀옴  (0) 2021.12.29
liveatc  (0) 2021.12.29
iss 주파수  (0) 2021.12.19
아부지 HAM 장비 뽀려뽀려  (0) 2021.12.18
Posted by 구차니
이론 관련/수학 관련2023. 3. 18. 18:11

유튜브 알고리즘으로 보게 된 내용

빅 데이터 등에서 차원이 높아질수록(DB에서는 개별 entity의 정보가 늘어날 수록)

유사함의 기준으로 삼을 수 있는 부분이 점점 줄어들게 되고

이는 곳 같다 , 다르다 의 판단으로 사용할 수 없게 됨을 의미한다.

그래서 적절하게 차원을 낮춰서(즉 비교 변수의 갯수를 줄여) 처리 하거나

그게 아니라면 빅 데이터로 빈 공간을 줄여서 판단의 근거로 삼거나..

 

일단은 해당 용어는 데이터 마이닝에서 나왔다고 한다.

[링크 : https://en.m.wikipedia.org/wiki/Curse_of_dimensionality]

[링크 : https://youtu.be/EXHR2-hECRM]

 

'이론 관련 > 수학 관련' 카테고리의 다른 글

추세선 알고리즘 (선형회귀)  (0) 2023.03.08
가우스 소거법  (0) 2023.01.19
텐서 합  (0) 2021.06.22
텐서 곱  (0) 2021.06.14
맵핑  (0) 2019.12.27
Posted by 구차니

15일에 먹이는데

정신이 없어서 부랴부랴 오늘 먹임

'개소리 왈왈 > 육아관련 주저리' 카테고리의 다른 글

수의사 처방제 확대시행  (0) 2023.04.05
벚꽃구경  (0) 2023.04.02
노랫만에 한강 나들이  (0) 2023.02.26
버섯탕수욕 마이쪙!  (0) 2023.02.25
돈 쓰는 날 2  (2) 2023.02.12
Posted by 구차니

특이점 주의자들이 말하는 그 특이점의 첫 발자국을 지금 보고 있는게 아닐까 라는 생각이 든다.

[링크 : https://v.daum.net/v/20230315061432560]

 

아직은 거짓이라고 생각하지만

더 많은 데이터를 통해서 검증을 해보면 실은 그게 정답이어야 했다던가

그런 차원이라면 이미 그 경계를 넘은걸지도 모르겠다.

(그래도 세종대왕 맥북던진 사건은 좀 아니지)

'개소리 왈왈 > 인공지능' 카테고리의 다른 글

클로드 괜찮네?  (0) 2024.08.14
GPT-4o?  (0) 2024.05.27
대 AI시대, 프로그래머란...?  (2) 2023.02.08
시소러스 (thesaurus)  (0) 2020.01.19
우버 자동운전 차량 첫 사고 동영상 공개  (4) 2018.03.22
Posted by 구차니
Programming/web 관련2023. 3. 15. 11:25

chatGPT 님에게 server push 예제를 알려줘라고 했더니 아래와 같이 알려주신다.

Server push is a technique that allows a server to push data to a client without the client first making a request for the data. In JavaScript, this can be achieved using the Server-Sent Events (SSE) API.
Here's an example of how you can use SSE to implement server push in JavaScript:
On the server side, you need to create an endpoint that will send the SSE messages. In this example, we'll create a simple Node.js server:
const http = require('http');

const server = http.createServer((req, res) => {
  if (req.url === '/sse') {
    res.writeHead(200, {
      'Content-Type': 'text/event-stream',
      'Cache-Control': 'no-cache',
      'Connection': 'keep-alive'
    });

    setInterval(() => {
      res.write(`data: ${new Date().toISOString()}\n\n`);
    }, 1000);
  } else {
    res.writeHead(404);
    res.end();
  }
});

server.listen(3000);
const source = new EventSource('/sse');

source.onmessage = (event) => {
  console.log(event.data);
};

 

아무튼 SSE를 검색해보는데.. jquery 연관은 잘 안보이고

EventSource.onmessage() 로 처리 가능만 하다면야 머...

[링크 : https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events]

 

 

+

golang의 REST / websocket 제거하고 cgi로 돌리려는 어마어마한 음모가! ㅠㅠ

'Programming > web 관련' 카테고리의 다른 글

webGPU  (0) 2023.05.18
chart.js log 스케일  (0) 2023.03.31
JWT 로그인 예제  (0) 2022.08.24
quirks mode  (0) 2022.08.08
grid와 flex  (0) 2022.07.04
Posted by 구차니
개소리 왈왈/블로그2023. 3. 14. 10:59

한때 블로그의 한 축으로 20년을 버텨왔던 다른 사이트가 사라진다는 말이 슬프구나..

예전 마비노기 하던 시절의 인장이랑 스샷들을 좀 빼놔야 하나?

 

그나저나 서비스 종료일 이후에 백업 관련 공지를 한다고 하다니.. 불안하다?

[이글루스 서비스 종료 및 백업 관련 일정 안내]

1. 서비스 종료일: 2023년 6월 16일

2. 신규 회원가입 및 블로그 신규 개설 중단: 2023년 3월 13일

3. 일부 기능 중지: 2023년 3월 13일 

구글 애드센스, 마이리더(RSS), API 센터, 개인 도메인 등

4. 블로그 데이터 백업: 2023년 6월 16일~2023년 12월 18일

*서비스 운영 상황에 따라 위 일정은 다소 조정될 수 있으며, 백업 관련 상세 안내는 6월 16일 다시 안내 드리도록 하겠습니다.

[링크 : http://ebc.egloos.com/8780]

'개소리 왈왈 > 블로그' 카테고리의 다른 글

블로그 방문자 수  (2) 2023.05.08
티스토리 로고변경  (4) 2023.03.29
해피빈 기부  (0) 2023.02.17
티스토리 약관 개정.. 이것 봐라?  (0) 2023.01.04
블로그 공개는 2주나 한달에 한번?  (0) 2022.12.06
Posted by 구차니