2017년 11월 29일 수요일

Memory demystify

Program Size: data=109.5 xdata=256 const=3503 code=4401
LX51 RUN COMPLETE.  0 WARNING(S),  0 ERROR(S)


START     STOP      LENGTH    ALIGN  RELOC    MEMORY CLASS   SEGMENT NAME
=========================================================================

* * * * * * * * * * *   D A T A   M E M O R Y   * * * * * * * * * * * * *
000000H   000007H   000008H   ---    AT..     DATA           "REG BANK 0"
000008H   000009H   000002H   BYTE   UNIT     DATA           ?DT?_FLASH_BYTEWRITE?FLASH
00000AH   00000BH   000002H   BYTE   UNIT     DATA           ?DT?_FLASH_BYTEREAD?FLASH
00000CH   00000DH   000002H   BYTE   UNIT     DATA           ?DT?_FLASH_PAGEERASE?FLASH
00000EH.0 00001FH.7 000012H.0 ---    ---      **GAP**
000020H.0 000020H.0 000000H.1 BIT    UNIT     BIT            ?BI?_FLASH_BYTEWRITE?FLASH
000020H.1 000020H.1 000000H.1 BIT    UNIT     BIT            ?BI?_FLASH_BYTEREAD?FLASH
000020H.2 000020H.2 000000H.1 BIT    UNIT     BIT            ?BI?_FLASH_PAGEERASE?FLASH
000020H.3 000020H.3 000000H.1 BIT    UNIT     BIT            ?BI?SMBUS0_ISR?SMB
000020H.4 000020H.4 000000H.1 BIT    UNIT     BIT            ?BI?SMB
000020H.5 000020H   000000H.3 ---    ---      **GAP**
000021H   00007EH   00005EH   BYTE   UNIT     DATA           ?DT?DATAMANAGER

00007FH   00007FH   000001H   BYTE   UNIT     IDATA          ?STACK

두 개의 Gap 을 빼면 109.5 byte 이다.

* * * * * * * * * * *  X D A T A   M E M O R Y  * * * * * * * * * * * * *
000000H   000040H   000041H   BYTE   UNIT     XDATA          ?XD?DATAMANAGER
000041H   000078H   000038H   BYTE   UNIT     XDATA          ?XD?UART
000079H   000092H   00001AH   BYTE   UNIT     XDATA          ?XD?SMB
000093H   00009BH   000009H   BYTE   UNIT     XDATA          ?XD?_FLASH_WRITE?FLASH
00009CH   0000A4H   000009H   BYTE   UNIT     XDATA          ?XD?_FLASH_READ?FLASH
0000A5H   0000ADH   000009H   BYTE   UNIT     XDATA          ?XD?_DATAMANAGER_FILLBUFFER?DATAMANAGER
0000AEH   0000B6H   000009H   BYTE   UNIT     XDATA          ?XD?SERDES_INITPROCA?SERDES
0000B7H   0000BEH   000008H   BYTE   UNIT     XDATA          ?XD?FLASH_INIT?FLASH
0000BFH   0000C6H   000008H   BYTE   UNIT     XDATA          ?XD?_TIMER_REVOCABLEDELAY?TIMER
0000C7H   0000CDH   000007H   BYTE   UNIT     XDATA          ?XD?TIMER
0000CEH   0000D4H   000007H   BYTE   UNIT     XDATA          ?XD?_BYTE2HEX?COMMON
0000D5H   0000DAH   000006H   BYTE   UNIT     XDATA          ?XD?_SMB_WRITEREGISTER?SMB
0000DBH   0000E0H   000006H   BYTE   UNIT     XDATA          ?XD?_SERDES_READREGISTER?SERDES
0000E1H   0000E5H   000005H   BYTE   UNIT     XDATA          ?XD?_SERDES_WRITEREGISTER?SERDES
0000E6H   0000E9H   000004H   BYTE   UNIT     XDATA          ?XD?_SMB_READREGISTER?SMB
0000EAH   0000EDH   000004H   BYTE   UNIT     XDATA          ?XD?_TIMER_DELAY?TIMER
0000EEH   0000F1H   000004H   BYTE   UNIT     XDATA          ?XD?_UART_TX?UART
0000F2H   0000F4H   000003H   BYTE   UNIT     XDATA          ?XD?_SMB_SLAVETXDATA?SMB
0000F5H   0000F7H   000003H   BYTE   UNIT     XDATA          ?XD?_DATAMANAGER_CLRBUFFER?DATAMANAGER
0000F8H   0000F9H   000002H   BYTE   UNIT     XDATA          ?XD?EXTINT
0000FAH   0000FBH   000002H   BYTE   UNIT     XDATA          ?XD?SERDES_INITPROCC?SERDES
0000FCH   0000FCH   000001H   BYTE   UNIT     XDATA          ?XD?_FLASH_BYTEWRITE?FLASH
0000FDH   0000FDH   000001H   BYTE   UNIT     XDATA          ?XD?_SMB_INIT?SMB
0000FEH   0000FEH   000001H   BYTE   UNIT     XDATA          ?XD?MAIN

0000FFH   0000FFH   000001H   BYTE   UNIT     XDATA          ?XD?SERDES

모두 더하면 256 byte 이다.

* * * * * * * * * * *   C O D E   M E M O R Y   * * * * * * * * * * * * *
000000H   000002H   000003H   ---    OFFS..   CODE           ?CO?SILABS_STARTUP?3
000003H   000005H   000003H   BYTE   OFFS..   CODE           ?EXTINT?00003
000006H   000009H   000004H   BYTE   UNIT     CODE           ?PR?MCU_RSTSRC_INIT?MCU
00000AH   00000AH   000001H   ---    ---      **GAP**
00000BH   00000DH   000003H   BYTE   OFFS..   CODE           ?TIMER?0000B
00000EH   000022H   000015H   BYTE   UNIT     CODE           ?C_INITSEG
000023H   000025H   000003H   BYTE   OFFS..   CODE           ?UART?00023
000026H   00003AH   000015H   BYTE   UNIT     CODE           ?PR?MCU_INIT?MCU
00003BH   00003DH   000003H   BYTE   OFFS..   CODE           ?SMB?0003B
00003EH   000072H   000035H   BYTE   UNIT     CODE           ?PR?_FLASH_BYTEWRITE?FLASH
000073H   000075H   000003H   BYTE   OFFS..   CODE           ?TIMER?00073
000076H   000213H   00019EH   BYTE   UNIT     CODE           ?PR?DATAMANAGER_TRANSMITDATATODISPLAY?DATAMANAGER
000214H   0003ABH   000198H   BYTE   UNIT     CODE           ?C?LIB_CODE
0003ACH   00045EH   0000B3H   BYTE   UNIT     CODE           ?PR?_BYTE2HEX?COMMON
00045FH   000508H   0000AAH   BYTE   UNIT     CODE           ?PR?_SMB_WRITEREGISTER?SMB
000509H   0005ACH   0000A4H   BYTE   UNIT     CODE           ?PR?SERDES_INITPROCC?SERDES
0005ADH   000640H   000094H   BYTE   UNIT     CODE           ?PR?_SERDES_WRITEREGISTER?SERDES
000641H   0006D1H   000091H   BYTE   UNIT     CODE           ?PR?SMBUS0_ISR?SMB
0006D2H   00075DH   00008CH   BYTE   UNIT     CODE           ?C_C51STARTUP
00075EH   0007E2H   000085H   BYTE   UNIT     CODE           ?PR?UART0_ISR?UART
0007E3H   000858H   000076H   BYTE   UNIT     CODE           ?PR?_SMB_READREGISTER?SMB
000859H   0008C3H   00006BH   BYTE   UNIT     CODE           ?PR?_FLASH_READ?FLASH
0008C4H   000928H   000065H   BYTE   UNIT     CODE           ?PR?_FLASH_WRITE?FLASH
000929H   00098CH   000064H   BYTE   UNIT     CODE           ?PR?_UART_TX?UART
00098DH   0009F0H   000064H   BYTE   UNIT     CODE           ?PR?_DATAMANAGER_FILLBUFFER?DATAMANAGER
0009F1H   000A4CH   00005CH   BYTE   UNIT     CODE           ?PR?_TIMER_REVOCABLEDELAY?TIMER


LX51 LINKER/LOCATER V4.66.30.0                                                        11/29/2017  18:16:47  PAGE 3


000A4DH   000AA1H   000055H   BYTE   UNIT     CODE           ?PR?_SERDES_READREGISTER?SERDES
000AA2H   000AF5H   000054H   BYTE   UNIT     CODE           ?PR?SMB_TX?SMB
000AF6H   000B48H   000053H   BYTE   UNIT     CODE           ?PR?DATAMANAGER_CHECKSMBMESSAGE?DATAMANAGER
000B49H   000B97H   00004FH   BYTE   UNIT     CODE           ?PR?SERDES_INIT?SERDES
000B98H   000BE2H   00004BH   BYTE   UNIT     CODE           ?PR?TIMER0_ISR?TIMER
000BE3H   000C27H   000045H   BYTE   UNIT     CODE           ?PR?_SMB_SLAVETXDATA?SMB
000C28H   000C6CH   000045H   BYTE   UNIT     CODE           ?PR?SERDES_INITPROCA?SERDES
000C6DH   000CAAH   00003EH   BYTE   UNIT     CODE           ?PR?TIMER3_ISR?TIMER
000CABH   000CE6H   00003CH   BYTE   UNIT     CODE           ?PR?FLASH_INIT?FLASH
000CE7H   000D1DH   000037H   BYTE   UNIT     CODE           ?CO?DATAMANAGER
000D1EH   000D4FH   000032H   BYTE   UNIT     CODE           ?PR?_DATAMANAGER_CLRBUFFER?DATAMANAGER
000D50H   000D7EH   00002FH   BYTE   UNIT     CODE           ?PR?_FLASH_PAGEERASE?FLASH
000D7FH   000DACH   00002EH   BYTE   UNIT     CODE           ?PR?_TIMER_DELAY?TIMER
000DADH   000DD5H   000029H   BYTE   UNIT     CODE           ?PR?DATAMANAGER_CHECKINT0MESSAGE?DATAMANAGER
000DD6H   000DFCH   000027H   BYTE   UNIT     CODE           ?PR?SMB_CLEARDATA?SMB
000DFDH   000E23H   000027H   BYTE   UNIT     CODE           ?PR?SMB_RX?SMB
000E24H   000E48H   000025H   BYTE   UNIT     CODE           ?PR?SMB_STX?SMB
000E49H   000E6DH   000025H   BYTE   UNIT     CODE           ?PR?MAIN_BASETASK?MAIN
000E6EH   000E92H   000025H   BYTE   UNIT     CODE           ?PR?MAIN_SCHEDULER?MAIN
000E93H   000EB6H   000024H   BYTE   UNIT     CODE           ?PR?SMB_SADDRCHECK?SMB
000EB7H   000ED9H   000023H   BYTE   UNIT     CODE           ?PR?_SMB_INIT?SMB
000EDAH   000EF8H   00001FH   BYTE   UNIT     CODE           ?PR?SERDES_INITPROCD?SERDES
000EF9H   000F14H   00001CH   BYTE   UNIT     CODE           ?PR?UART_INIT?UART
000F15H   000F2EH   00001AH   BYTE   UNIT     CODE           ?PR?_PORT_1_CHANGECONFIG?PORT
000F2FH   000F47H   000019H   BYTE   UNIT     CODE           ?PR?SMB_START?SMB
000F48H   000F60H   000019H   BYTE   UNIT     CODE           ?PR?TIMER_0_INIT?TIMER
000F61H   000F77H   000017H   BYTE   UNIT     CODE           ?PR?INT0_ISR?EXTINT
000F78H   000F8DH   000016H   BYTE   UNIT     CODE           ?PR?_FLASH_BYTEREAD?FLASH
000F8EH   000FA1H   000014H   BYTE   UNIT     CODE           ?PR?SMB_READ?SMB
000FA2H   000FB5H   000014H   BYTE   UNIT     CODE           ?PR?SMB_SRX?SMB
000FB6H   000FC9H   000014H   BYTE   UNIT     CODE           ?PR?UART_TXBUFCLEAR?UART
000FCAH   000FDBH   000012H   BYTE   UNIT     CODE           ?PR?SERDES_INITPROCB?SERDES
000FDCH   000FECH   000011H   BYTE   UNIT     CODE           ?PR?MAIN_INITTASK?MAIN
000FEDH   000FFCH   000010H   BYTE   UNIT     CODE           ?PR?EXTINT_INIT?EXTINT
000FFDH   00100CH   000010H   BYTE   UNIT     CODE           ?PR?TIMER_1_INIT?TIMER
00100DH   00101CH   000010H   BYTE   UNIT     CODE           ?PR?TIMER_2_INIT?TIMER
00101DH   00102BH   00000FH   BYTE   UNIT     CODE           ?PR?SMB_RESET?SMB
00102CH   00103AH   00000FH   BYTE   UNIT     CODE           ?PR?TIMER_INIT?TIMER
00103BH   001048H   00000EH   BYTE   UNIT     CODE           ?CO?MAIN
001049H   001056H   00000EH   BYTE   UNIT     CODE           ?PR?DATAMANAGER_INIT?DATAMANAGER
001057H   001063H   00000DH   BYTE   UNIT     CODE           ?PR?SMB_WRITE?SMB
001064H   001070H   00000DH   BYTE   UNIT     CODE           ?PR?SMB_WAITBUSY?SMB
001071H   00107DH   00000DH   BYTE   UNIT     CODE           ?PR?TIMER_3_INIT?TIMER
00107EH   001089H   00000CH   BYTE   UNIT     CODE           ?PR?_SMB_RCVEVENTADD?SMB
00108AH   001093H   00000AH   BYTE   UNIT     CODE           ?PR?PORT_0_INIT?PORT
001094H   00109CH   000009H   BYTE   UNIT     CODE           ?PR?PORT_INIT?PORT
00109DH   0010A5H   000009H   BYTE   UNIT     CODE           ?PR?TIMER_GETDELAYCOUNT?TIMER
0010A6H   0010AEH   000009H   BYTE   UNIT     CODE           ?PR?TIMER_GETSCHEDULECOUNT500MS?TIMER
0010AFH   0010B7H   000009H   BYTE   UNIT     CODE           ?PR?TIMER_GETSCHEDULECOUNT1000MS?TIMER
0010B8H   0010BFH   000008H   BYTE   UNIT     CODE           ?PR?TIMER_CLEARDELAYCOUNT?TIMER
0010C0H   0010C7H   000008H   BYTE   UNIT     CODE           ?PR?TIMER_CLEARSCHEDULECOUNT500MS?TIMER
0010C8H   0010CFH   000008H   BYTE   UNIT     CODE           ?PR?TIMER_CLEARSCHEDULECOUNT1000MS?TIMER
0010D0H   0010D7H   000008H   BYTE   UNIT     CODE           ?PR?MCU_PERIPHERALINIT?MCU
0010D8H   0010DEH   000007H   BYTE   UNIT     CODE           ?PR?PORT_1_INIT?PORT
0010DFH   0010E5H   000007H   BYTE   UNIT     CODE           ?PR?XBAR_INIT?PORT
0010E6H   0010ECH   000007H   BYTE   UNIT     CODE           ?PR?SMB_GETSMBBUSY?SMB
0010EDH   0010F3H   000007H   BYTE   UNIT     CODE           ?PR?TIMER_CLK_INIT?TIMER
0010F4H   0010FAH   000007H   BYTE   UNIT     CODE           ?PR?MCU_WDT_INIT?MCU
0010FBH   001101H   000007H   BYTE   UNIT     CODE           ?PR?GLBINT_INIT?GLBINT
001102H   001107H   000006H   BYTE   UNIT     CODE           ?PR?SMB_GETFOUNDSLAFLAG?SMB
001108H   00110DH   000006H   BYTE   UNIT     CODE           ?PR?SMB_GETFOUNDSLAADDR?SMB
00110EH   001113H   000006H   BYTE   UNIT     CODE           ?PR?SMB_CLEARFOUNDSLAFLAG?SMB


LX51 LINKER/LOCATER V4.66.30.0                                                        11/29/2017  18:16:47  PAGE 4


001114H   001119H   000006H   BYTE   UNIT     CODE           ?PR?_SMB_SETFOUNDSLAADDR?SMB
00111AH   00111FH   000006H   BYTE   UNIT     CODE           ?PR?TIMER_GETSCHEDULECOUNT100MS?TIMER
001120H   001125H   000006H   BYTE   UNIT     CODE           ?PR?TIMER_CLEARSCHEDULECOUNT100MS?TIMER
001126H   00112BH   000006H   BYTE   UNIT     CODE           ?PR?MAIN?MAIN
00112CH   001131H   000006H   BYTE   UNIT     CODE           ?PR?UART_GETRXBUFFERSIZE?UART
001132H   001ED8H   000DA7H   BYTE   UNIT     CONST          ?CO?SERDES

001ED9H   001EE0H   000008H   BYTE   UNIT     CONST          ?CO?FLASH

0 및 - 를 제외한 것을 모두 더하면 7901 여서 빌드 결과인 7904와 3 byte 다르다.
?CO? CONST:
    - ?CO?SERDES: 3495
    - ?CO?FLASH: 8
을 더하면 3503 이 되므로 이것이 Build 결과와 같은것 같다.

?PR? CODE










JTAG

The Joint Test Action Group (JTAG) is an electronics industry association formed in 1985 for developing a method of verifying designs and testing printed circuit boards after manufacture. In 1990 the Institute of Electrical and Electronics Engineers codified the results of the effort in IEEE Standard 1149.1-1990, entitled Standard Test Access Port and Boundary-Scan Architecture.

JTAG implements standards for on-chip instrumentation in electronic design automation (EDA) as a complementary tool to digital simulation.[1] It specifies the use of a dedicated debug port implementing a serial communications interface for low-overhead access without requiring direct external access to the system address and data buses. The interface connects to an on-chip test access port (TAP) that implements a stateful protocol to access a set of test registers that present chip logic levels and device capabilities of various parts.

The JTAG standards have been extended by many semiconductor chip manufacturers with specialized variants to provide vendor-specific features.[2]
JTAG (Joint Test Action Group)는 1985 년에 제조 된 전자 산업 협회로, 설계 검증 및 제조 후 인쇄 회로 기판 테스트 방법을 개발했습니다. 1990 년에 전기 전자 기술 연구소 (Institute of Electrical and Electronics Engineers)는 표준 테스트 액세스 포트 및 경계 스캔 아키텍처라는 IEEE 표준 1149.1-1990에서의 노력 결과를 성문화했습니다.

JTAG은 디지털 시뮬레이션에 대한 보완 도구로서 전자 설계 자동화 (EDA)에서 온칩 계측 표준을 구현합니다. 시스템 주소 및 데이터 버스에 직접 외부 액세스하지 않고도 오버 헤드가 적은 액세스를 위해 직렬 통신 인터페이스를 구현하는 전용 디버그 포트를 사용합니다. 이 인터페이스는 상태 로직을 구현하는 온칩 테스트 액세스 포트 (TAP)에 연결되어 칩 로직 레벨 및 다양한 부품의 장치 성능을 나타내는 테스트 레지스터 세트에 액세스한다.

JTAG 표준은 많은 반도체 칩 제조업체들에 의해 특화된 변형으로 확장되어 벤더 특정 기능을 제공합니다. [2]

History
In the 1980s, multi-layer circuit boards and non-lead-frame integrated circuits (ICs) were becoming standard and connections were being made between ICs that were not available to probes. The majority of manufacturing and field faults in circuit boards were due to poor solder joints on the boards, imperfections among board connections, or the bonds and bond wires from IC pads to pin lead frames. The Joint Test Action Group (JTAG) was formed in 1985 to provide a pins-out view from one IC pad to another so these faults could be discovered.
1980 년대에 다층 회로 보드와 비 리드 프레임 IC (non-lead-frame integrated circuits)가 표준화되었고 프로브에 사용할 수 없었던 IC간에 연결이 이루어지고있었습니다. 회로 기판의 제조 및 필드 오류의 대부분은 보드의 납땜 조인트 불량, 보드 연결 불완전 또는 IC 패드에서 핀 리드 프레임으로 본드 및 본드 와이어로 인해 발생했습니다. JTAG (Joint Test Action Group)는 1985 년에 하나의 IC 패드에서 다른 IC 패드로 핀 아웃 뷰를 제공하기 위해 형성되었으므로 이러한 결함을 발견 할 수있었습니다.

The industry standard became an IEEE standard in 1990 as IEEE Std. 1149.1-1990[3] after many years of initial use. In the same year, Intel released their first processor with JTAG (the 80486) which led to quicker industry adoption by all manufacturers. In 1994, a supplement that contains a description of the boundary scan description language (BSDL) was added. Further refinements regarding the use of all-zeros for EXTEST, separating the use of SAMPLE from PRELOAD and better implementation for OBSERVE_ONLY cells were made and released in 2001.[4] Since 1990, this standard has been adopted by electronics companies around the world. Boundary scan is now mostly synonymous with JTAG, but JTAG has essential uses beyond such manufacturing applications.
산업 표준은 1990 년 IEEE 표준으로 IEEE 표준이되었습니다. 1149.1-1990 [3]. 같은 해 인텔은 JTAG (80486)를 탑재 한 첫 번째 프로세서를 출시하여 모든 제조업체의 산업 채택이 빨라졌습니다. 1994 년에는 BSDL (boundary scan description language)에 대한 설명이 포함 된 보완 물이 추가되었습니다. EXTEST에 대해 모두 0을 사용하는 것과 관련된 추가 세부 사항, PRELOAD에서 SAMPLE의 사용을 분리하고 OBSERVE_ONLY 셀에 대한 더 나은 구현이 작성되어 2001 년에 릴리스되었습니다. 1990 년이 표준은 전 세계의 전자 회사에서 채택했습니다. 바운더리 스캔은 현재 JTAG과 거의 동의어이지만 JTAG은 이러한 제조 애플리케이션 이외의 필수 용도로 사용됩니다.

Debugging
Although JTAG's early applications targeted board level testing, the JTAG standard was designed to assist with device, board, and system testing, diagnosis, and fault isolation. Today JTAG is used as the primary means of accessing sub-blocks of integrated circuits, making it an essential mechanism for debugging embedded systems which may not have any other debug-capable communications channel.[citation needed] On most systems, JTAG-based debugging is available from the very first instruction after CPU reset, letting it assist with development of early boot software which runs before anything is set up. An in-circuit emulator (or, more correctly, a "JTAG adapter") uses JTAG as the transport mechanism to access on-chip debug modules inside the target CPU. Those modules let software developers debug the software of an embedded system directly at the machine instruction level when needed, or (more typically) in terms of high level language source code.
JTAG의 초기 응용 프로그램은 보드 레벨 테스트를 대상으로했지만 JTAG 표준은 장치, 보드 및 시스템 테스트, 진단 및 오류 격리를 지원하도록 설계되었습니다. 오늘날 JTAG는 집적 회로의 하위 블록에 액세스하는 주요 수단으로 사용되어 다른 디버그 가능 통신 채널이없는 임베디드 시스템을 디버깅하는 데 필수적인 메커니즘입니다. [표창장은 필요 없습니다] 대부분의 시스템에서 JTAG 기반 디버깅 CPU 리셋 후 첫 번째 명령에서 사용할 수 있으므로 아무 것도 설정되기 전에 실행되는 초기 부팅 소프트웨어 개발을 지원합니다. 인서 킷 에뮬레이터 (또는보다 정확하게는 "JTAG 어댑터")는 JTAG를 전송 메커니즘으로 사용하여 대상 CPU 내부의 온칩 디버그 모듈에 액세스합니다. 이러한 모듈을 통해 소프트웨어 개발자는 필요할 때 기계 명령어 레벨에서 또는 직접 (일반적으로) 고급 언어 소스 코드 측면에서 임베디드 시스템의 소프트웨어를 직접 디버깅 할 수 있습니다.

System software debug support is for many software developers the main reason to be interested in JTAG. Many silicon architectures such as PowerPC, MIPS, ARM, x86 built an entire software debug, instruction tracing, and data tracing infrastructure around the basic JTAG protocol. Frequently individual silicon vendors however only implement parts of these extensions. Some examples are ARM CoreSight and Nexus as well as Intel's BTS (Branch Trace Storage), LBR (Last Branch Record), and IPT (Intel Processor Trace) implementations. There are many other such silicon vendor-specific extensions that may not be documented except under NDA. The adoption of the JTAG standard helped move JTAG-centric debugging environments away from early processor-specific designs. Processors can normally be halted, single stepped, or let run freely. One can set code breakpoints, both for code in RAM (often using a special machine instruction) and in ROM/flash. Data breakpoints are often available, as is bulk data download to RAM. Most designs have “halt mode debugging”, but some allow debuggers to access registers and data buses without needing to halt the core being debugged. Some toolchains can use ARM Embedded Trace Macrocell (ETM) modules, or equivalent implementations in other architectures to trigger debugger (or tracing) activity on complex hardware events, like a logic analyzer programmed to ignore the first seven accesses to a register from one particular subroutine.
시스템 소프트웨어 디버그 지원은 많은 소프트웨어 개발자들에게 JTAG에 관심을 갖는 주된 이유입니다. PowerPC, MIPS, ARM, x86과 같은 많은 실리콘 아키텍처는 기본 JTAG 프로토콜을 중심으로 전체 소프트웨어 디버그, 명령 추적 및 데이터 추적 인프라를 구축했습니다. 그러나 종종 개별 실리콘 벤더는 이러한 확장 기능의 일부만 구현합니다. ARM CoreSight 및 Nexus는 물론 Intel의 BTS (Branch Trace Storage), LBR (Last Branch Record) 및 IPT (Intel Processor Trace) 구현을 예로들 수 있습니다. NDA를 제외하고는 문서화되지 않은 실리콘 벤더 관련 확장이 많이 있습니다. JTAG 표준을 채택함으로써 JTAG 중심의 디버깅 환경을 초기 프로세서 별 설계에서 벗어나게되었습니다. 프로세서는 일반적으로 정지되거나, 단일 단계로 실행되거나, 자유롭게 실행될 수 있습니다. RAM 코드 (종종 특수 기계 명령어 사용)와 ROM / 플래시 모두에 대해 코드 중단 점을 설정할 수 있습니다. 대량 데이터를 RAM에 다운로드 할 때처럼 데이터 중단 점을 사용할 수 있습니다. 대부분의 설계는 "정지 모드 디버깅"을 가지고 있지만, 일부는 디버거가 디버깅중인 코어를 정지시키지 않고도 레지스터와 데이터 버스에 액세스 할 수 있도록 허용합니다. 일부 툴체인은 ETM (ARM Embedded Trace Macrocell) 모듈 또는 다른 아키텍처의 동등한 구현을 사용하여 하나의 특정 서브 루틴에서 레지스터에 대한 처음 7 개의 액세스를 무시하도록 프로그래밍 된 로직 분석기와 같이 복잡한 하드웨어 이벤트에서 디버거 (또는 추적) 활동을 트리거 할 수 있습니다 .
Sometimes FPGA developers also use JTAG to develop debugging tools.[5] The same JTAG techniques used to debug software running inside a CPU can help debug other digital design blocks inside an FPGA. For example, custom JTAG instructions can be provided to allow reading registers built from arbitrary sets of signals inside the FPGA, providing visibility for behaviors which are invisible to boundary scan operations. Similarly, writing such registers could provide controllability which is not otherwise available.
때때로 FPGA 개발자는 JTAG을 사용하여 디버깅 도구를 개발합니다. CPU 내부에서 실행되는 소프트웨어를 디버깅하는 데 사용되는 것과 동일한 JTAG 기술을 사용하면 FPGA 내의 다른 디지털 설계 블록을 디버깅하는 데 도움이 될 수 있습니다. 예를 들어, 사용자 정의 JTAG 명령어를 제공하여 FPGA 내부의 임의의 신호 세트로 작성된 레지스터를 읽을 수 있으므로 바운더리 스캔 작업에서 볼 수없는 동작을 볼 수 있습니다. 유사하게, 그러한 레지스터를 작성하는 것은 다르게 이용 가능하지 않은 제어 가능성을 제공 할 수있다.

Storing firmware
JTAG allows device programmer hardware to transfer data into internal non-volatile device memory (e.g. CPLDs). Some device programmers serve a double purpose for programming as well as debugging the device. In the case of FPGAs, volatile memory devices can also be programmed via the JTAG port, normally during development work. In addition, internal monitoring capabilities (temperature, voltage and current) may be accessible via the JTAG port.
JTAG는 디바이스 프로그래머 하드웨어가 내부의 비 휘발성 디바이스 메모리 (예 : CPLD)로 데이터를 전송할 수있게한다. 일부 디바이스 프로그래머는 디바이스를 디버깅하는 것뿐만 아니라 프로그래밍을위한 이중 목적을 제공합니다. FPGA의 경우, 일반적으로 개발 작업 중에 JTAG 포트를 통해 휘발성 메모리 장치를 프로그래밍 할 수 있습니다. 또한 내부 모니터링 기능 (온도, 전압 및 전류)은 JTAG 포트를 통해 액세스 할 수 있습니다.
JTAG programmers are also used to write software and data into flash memory. This is usually done using data bus access like the CPU would use, and is sometimes actually handled by a CPU, but in other cases memory chips have JTAG interfaces themselves. Some modern debug architectures provide internal and external bus master access without needing to halt and take over a CPU. In the worst case, it is usually possible to drive external bus signals using the boundary scan facility.
JTAG 프로그래머는 소프트웨어와 데이터를 플래시 메모리에 기록하는데도 사용됩니다. 이것은 일반적으로 CPU가 사용하는 것처럼 데이터 버스 액세스를 사용하여 수행되며 때로는 실제로 CPU에서 처리되지만 다른 경우에는 메모리 칩 자체에서 JTAG 인터페이스를 사용합니다. 일부 최신 디버그 아키텍처는 CPU를 중단하고 CPU를 인계하지 않고도 내부 및 외부 버스 마스터 액세스를 제공합니다. 최악의 경우 바운더리 스캔 기능을 사용하여 외부 버스 신호를 구동 할 수 있습니다.
As a practical matter, when developing an embedded system, emulating the instruction store is the fastest way to implement the "debug cycle" (edit, compile, download, test, and debug).[citation needed] This is because the in-circuit emulator simulating an instruction store can be updated very quickly from the development host via, say, USB. Using a serial UART port and bootloader to upload firmware to Flash makes this debug cycle quite slow and possibly expensive in terms of tools; installing firmware into Flash (or SRAM instead of Flash) via JTAG is an intermediate solution between these extremes.
실제로 임베디드 시스템을 개발할 때 인스트럭션 저장소를 에뮬레이션하는 것이 "디버그 사이클"(편집, 컴파일, 다운로드, 테스트 및 디버그)을 구현하는 가장 빠른 방법입니다. [표창장은 필요 없습니다] 인스트럭션 스토어를 시뮬레이트하는 에뮬레이터는 USB를 통해 개발 호스트에서 매우 빠르게 업데이트 될 수 있습니다. 펌웨어를 플래시에 업로드하기 위해 직렬 UART 포트와 부트 로더를 사용하면이 디버그주기가 상당히 느리고 도구 측면에서 비용이 많이 들게됩니다. JTAG을 통해 플래시 (또는 플래시 대신 SRAM)에 펌웨어를 설치하는 것은 이러한 극단적 인 해결책의 중간 단계입니다.

Boundary scan testing
JTAG boundary scan technology provides access to many logic signals of a complex integrated circuit, including the device pins. The signals are represented in the boundary scan register (BSR) accessible via the TAP. This permits testing as well as controlling the states of the signals for testing and debugging. Therefore, both software and hardware (manufacturing) faults may be located and an operating device may be monitored.
JTAG 바운더리 스캔 기술은 디바이스 핀을 포함한 복잡한 집적 회로의 많은 로직 신호에 대한 액세스를 제공한다. 신호는 TAP를 통해 액세스 할 수있는 바운더리 스캔 레지스터 (BSR)에 표시됩니다. 이것은 테스트와 디버깅을 위해 신호의 상태를 제어 할뿐만 아니라 테스트를 허용합니다. 따라서 소프트웨어 및 하드웨어 (제조) 오류가있을 수 있으며 운영 장치를 모니터링 할 수 있습니다.
When combined with built-in self-test (BIST), the JTAG scan chain enables a low overhead, embedded solution to testing an IC for certain static faults (shorts, opens, and logic errors). The scan chain mechanism does not generally help diagnose or test for timing, temperature or other dynamic operational errors that may occur. Test cases are often provided in standardized formats such as SVF, or its binary sibling XSVF, and used in production tests. The ability to perform such testing on finished boards is an essential part of Design For Test in today's products, increasing the number of faults that can be found before products ship to customers.
BIST (Built-in Self-Test)와 결합하면 JTAG 스캔 체인은 특정 정적 결함 (단락, 개방 및 논리 오류)에 대해 IC를 테스트하는 오버 헤드가 적은 임베디드 솔루션을 가능하게합니다. 스캔 체인 메커니즘은 일반적으로 발생할 수있는 타이밍, 온도 또는 기타 동적 작동 오류를 진단하거나 테스트하는 데 도움이되지 않습니다. 테스트 사례는 SVF 또는 이진 형제 XSVF와 같은 표준화 된 형식으로 제공되며 프로덕션 테스트에 사용됩니다. 완성 된 보드에서 이러한 테스트를 수행하는 기능은 오늘날의 제품에서 Design For Test의 필수적인 부분으로, 제품이 고객에게 출시되기 전에 발견 할 수있는 결함 수를 증가시킵니다.


Electrical characteristics
A JTAG interface is a special interface added to a chip. Depending on the version of JTAG, two, four, or five pins are added. The four and five pin interfaces are designed so that multiple chips on a board can have their JTAG lines daisy-chained together if specific conditions are met.[6] The two pin interface is designed so that multiple chips can be connected in a star topology. In either case a test probe need only connect to a single "JTAG port" to have access to all chips on a circuit board.
JTAG 인터페이스는 칩에 추가 된 특별한 인터페이스입니다. JTAG의 버전에 따라 2 개, 4 개 또는 5 개의 핀이 추가됩니다. 4 핀 및 5 핀 인터페이스는 특정 조건이 충족 될 경우 보드상의 여러 칩이 JTAG 라인을 데이지 체인 방식으로 연결할 수 있도록 설계되었습니다. 두 개의 핀 인터페이스는 다중 칩이 스타 토폴로지로 연결될 수 있도록 설계되었습니다. 두 경우 모두 테스트 프로브는 회로 기판의 모든 칩에 액세스 할 수 있도록 단일 "JTAG 포트"에만 연결하면됩니다.

Daisy-chained JTAG (IEEE 1149.1)

The connector pins are

TDI (Test Data In)
TDO (Test Data Out)
TCK (Test Clock)
TMS (Test Mode Select)
TRST (Test Reset) optional.


Test reset signal is not shown in the image.

The TRST pin is an optional active-low reset to the test logic - usually asynchronous, but sometimes synchronous, depending on the chip. If the pin is not available, the test logic can be reset by switching to the reset state synchronously, using TCK and TMS. Note that resetting test logic doesn't necessarily imply resetting anything else. There are generally some processor-specific JTAG operations which can reset all or part of the chip being debugged.
TRST 핀은 테스트 로직에 대한 선택적 액티브 로우 리셋이다. 일반적으로 칩에 따라 비동기이지만 때로는 동기식이다. 핀을 사용할 수없는 경우 TCK 및 TMS를 사용하여 리셋 상태로 동기식으로 전환하여 테스트 로직을 리셋 할 수 있습니다. 테스트 로직을 리셋한다고해서 반드시 다른 것을 리셋하는 것은 아닙니다. 일반적으로 디버깅중인 칩의 전부 또는 일부를 재설정 할 수있는 일부 프로세서 별 JTAG 작업이 있습니다.
Since only one data line is available, the protocol is serial. The clock input is at the TCK pin. One bit of data is transferred in from TDI, and out to TDO per TCK rising clock edge. Different instructions can be loaded. Instructions for typical ICs might read the chip ID, sample input pins, drive (or float) output pins, manipulate chip functions, or bypass (pipe TDI to TDO to logically shorten chains of multiple chips).
하나의 데이터 회선 만 사용할 수 있으므로 프로토콜은 직렬입니다. 클록 입력은 TCK 핀에있다. 1 비트의 데이터가 TDI에서 전송되고 TCK 상승 클록 에지 당 TDO로 전송됩니다. 다른 지침을로드 할 수 있습니다. 일반적인 IC에 대한 지침은 칩 ID, 샘플 입력 핀, 드라이브 (또는 부동) 출력 핀, 칩 기능 조작 또는 바이 패스 (여러 칩의 체인을 논리적으로 단축하기 위해 TDI에서 TDO로 파이프)를 읽을 수 있습니다.
As with any clocked signal, data presented to TDI must be valid for some chip-specific Setup time before and Hold time after the relevant (here, rising) clock edge. TDO data is valid for some chip-specific time after the falling edge of TCK.
클록 신호와 마찬가지로, TDI에 제공되는 데이터는 관련 클록 에지 이후의 특정 칩 설정 시간 및 홀드 시간에 유효해야합니다. TDO 데이터는 TCK의 하강 에지 이후에 특정 칩 특정 시간 동안 유효합니다.
The maximum operating frequency of TCK varies depending on all chips in the chain (the lowest speed must be used), but it is typically 10-100 MHz (100-10 ns per bit). Also TCK frequencies depend on board layout and JTAG adapter capabilities and state. One chip might have a 40 MHz JTAG clock, but only if it is using a 200 MHz clock for non-JTAG operations; and it might need to use a much slower clock when it is in a low power mode. Accordingly, some JTAG adapters have adaptive clocking using an RTCK (Return TCK) signal. Faster TCK frequencies are most useful when JTAG is used to transfer lots of data, such as when storing a program executable into flash memory.
TCK의 최대 작동 주파수는 체인의 모든 칩에 따라 다르지만 (최저 속도를 사용해야 함) 일반적으로 10-100MHz (비트 당 100-10ns)입니다. 또한 TCK 주파수는 보드 레이아웃과 JTAG 어댑터 기능 및 상태에 따라 달라집니다. 하나의 칩은 40MHz JTAG 클록을 가질 수 있지만 비 JTAG 동작을 위해 200MHz 클럭을 사용하는 경우에만 해당된다. 저전력 모드 일 때 훨씬 느린 클록을 사용해야 할 수도 있습니다. 따라서 일부 JTAG 어댑터에는 RTCK (Return TCK) 신호를 사용하는 적응 형 클럭킹이 있습니다. 빠른 TCK 주파수는 프로그램 실행 파일을 플래시 메모리에 저장할 때와 같이 JTAG을 사용하여 많은 양의 데이터를 전송할 때 가장 유용합니다.
Clocking changes on TMS steps through a standardized JTAG state machine. The JTAG state machine can reset, access an instruction register, or access data selected by the instruction register.
표준화 된 JTAG 상태 머신을 통해 TMS 단계의 클럭 변경. JTAG 상태 머신은 리셋하거나, 명령 레지스터에 액세스하거나, 명령 레지스터에 의해 선택된 데이터에 액세스 할 수있다.

JTAG platforms often add signals to the handful defined by the IEEE 1149.1 specification. A System Reset (SRST) signal is quite common, letting debuggers reset the whole system, not just the parts with JTAG support. Sometimes there are event signals used to trigger activity by the host or by the device being monitored through JTAG; or, perhaps, additional control lines.
JTAG 플랫폼은 종종 IEEE 1149.1 사양에 정의 된 소수에 신호를 추가합니다. 시스템 재설정 (SRST) 신호는 JTAG을 지원하는 부품뿐만 아니라 전체 시스템을 재설정하는 디버거를 허용하는 매우 일반적인 신호입니다. 때로는 JTAG를 통해 모니터링되는 장치 또는 호스트에 의해 활동을 트리거하는 데 사용되는 이벤트 신호가 있습니다. 또는 아마도 추가 제어 라인이 필요합니다.
Even though few consumer products provide an explicit JTAG port connector, the connections are often available on the printed circuit board as a remnant from development prototyping and/or production. When exploited, these connections often provide the most viable means for reverse engineering.
일부 소비자 제품이 명시적인 JTAG 포트 커넥터를 제공하더라도 개발 프로토 타입 및 / 또는 생산의 나머지 부분으로 인쇄 회로 기판에서 종종 연결을 사용할 수 있습니다. 악용 될 때 이러한 연결은 종종 리버스 엔지니어링을위한 가장 실용적인 수단을 제공합니다.









STARTUP.A51

The file STARTUP.A51  contains the startup code for a C51 target program. This source file is located in the \FSI\LIB  directory. Include a copy of this file in each 8051 project that needs custom startup code.
STARTUP.A51 파일에는 C51 대상 프로그램의 시작 코드가 들어 있습니다. 이 소스 파일은 \ FSI \ LIB 디렉토리에 있습니다. 사용자 지정 시작 코드가 필요한 각 8051 프로젝트에이 파일의 복사본을 포함시킵니다.

This code is executed immediately upon reset of the target system and optionally performs the following operations in order:
이 코드는 대상 시스템을 다시 설정하면 즉시 실행되며 선택적으로 다음 작업을 순서대로 수행합니다.


  Clears internal data memory
  Clears external data memory
  Clears paged external data memory

  Initializes the small model reentrant stack and pointer
  Initializes the large model reentrant stack and pointer
  Initializes the compact model reentrant stack and pointer

  Initializes the 8051 hardware stack pointer

  Transfers control to the main C function.

STARTUP.A51  provides assembly constants you may change to control the actions taken at startup. These are defined in the following table.
STARTUP.A51은 시작할 때 취하는 동작을 제어하기 위해 변경할 수있는 어셈블리 상수를 제공합니다. 이들은 다음 표에 정의되어 있습니다.

IDATALEN
Indicates the number of bytes of idata that are to be initialized to 0.  The default is 80h because most 8051 derivatives contain at least 128 bytes of internal data memory. Use a value of 100h for the 8052 and other derivatives that have 256 bytes of internal data memory.

If your target system supports a power-down mode and you want to disable internal data memory clearing, set IDATALEN  to 0. However, you must ensure that the byte variable ?C_DSTK_LEVEL is set to zero. This is required by functions included from the library.

 XDATASTART
Specifies the xdata address to start initializing to 0.

 XDATALEN
Indicates the number of bytes of xdata to be initialized to 0. The default is 0.

 PDATASTART
Specifies the pdata address to start initializing to 0.

 PDATALEN
Indicates the number of bytes of pdata to be initialized to 0. The default is 0.

 IBPSTACK
Indicates whether or not the small model reentrant stack pointer (?C_IBP) should be initialized. A value of 1 causes this pointer to be initialized. A value of 0 prevents initialization of this pointer. The default is 0.

 IBPSTACKTOP
Specifies the top start address of the small model reentrant stack area. The default is 0xFF in idata memory.

C51 does not check to see if the stack area available satisfies the requirements of the applications. It is your responsibility to perform such a test.

 XBPSTACK
Indicates whether or not the large model reentrant stack pointer (?C_XBP) should be initialized. A value of 1 causes this pointer to be initialized. A value of 0 prevents initialization of this pointer. The default is 0.

 XBPSTACKTOP
Specifies the top start address of the large model reentrant stack area. The default is 0xFFFF in xdata memory.

C51 does not check to see if the stack area available satisfies the requirements of the applications. It is your responsibility to perform such a test.

 PBPSTACK
Indicates whether the compact model reentrant stack pointer (?C_PBP) should be initialized. A value of 1 causes this pointer to be initialized. A value of 0 prevents initialization of this pointer. The default is 0.

 PBPSTACKTOP
Specifies the top start address of the compact model reentrant stack area. The default is 0xFF in pdata memory.

C51 does not check to see if the stack area available satisfies the requirements of the applications. It is your responsibility to perform such a test.

 PPAGEENABLE
Enables (a value of 1) or disables (a value of 0) the initialization of port 2 of the 8051 device. The default is 0. The addressing of port 2 allows the mapping of 256 byte variable memory in any arbitrary xdata page.

 PPAGE
Specifies the value to write to Port 2 of the 8051 for pdata memory access. This value represents the xdata memory page to use for pdata.  This is the upper 8 bits of the absolute address range to use for pdata.

As an example, if the pdata area begins at address 1000h (page 10h) in the xdata memory, PPAGEENABLE  should be set to 1 and PPAGE  should be set to 10h. The L51 Linker/Locator must contain a value between 1000h and 10FFh in the PDATA control directive. For example:

L51 <input modules> PDATA (1050H)

Neither L51 nor C51 checks to see if the PDATA control directive and the PPAGE  assembler constant are specified correctly. You must ensure that these parameters contain suitable values.


Memory Models (Link)
컴파일러 옵션에서 어떤 모델(Small, Compact, Large) 를 쓸건지 체크를 하면 그에 맞춰서 Complie 이 된다. 보통 XDATA 를 사용하는 Large 를 선택한다.








2017년 11월 26일 일요일

Tooling in the automotive industry

Tooling is an important process in the production of automobiles today. The current market is moving from high-volume and low-mix to low-volume and high-mix car production. Every single part of a new car requires a unique tool. Once the product design department finalizes the design of a new part, such as for example a deck-lid, fender, bracket or cross member, it is released to the feasibility and tooling departments, where an appropriate tool to produce the part is then designed. With so many new auto plants and new vehicle designs being launched faster than ever before, companies which make these tools must find effective ways to meet these demands.
오늘날 자동차 생산에서 공구 가공은 중요한 프로세스입니다. 현재 시장은 대량 생산 및 저비용에서 저용량 및 하이 믹스 자동차 생산으로 이동하고 있습니다. 새 차의 모든 부분에는 고유 한 도구가 필요합니다. 제품 디자인 부서에서 갑판 뚜껑, 흙 받이, 브래킷 또는 크로스 멤버와 같은 새 부품의 설계를 완료하면 실현 가능성 및 툴링 부서에 배포되고 부품을 생산하기위한 적절한 도구가 설계됩니다 . 많은 새로운 자동차 공장과 새로운 차량 설계가 그 어느 때보다도 빠르게 출시됨에 따라 이러한 도구를 만드는 회사는 이러한 요구를 충족 할 수있는 효과적인 방법을 찾아야합니다.

Tooling: Every single part of a new car requires a unique tool.
새 차의 모든 부분에는 고유 한 도구가 필요합니다

Up until now, a tooling company could manufacture one tool that ran, for example, 500,000 parts for one model. Now, it is necessary to manufacture five or six tools that stamp 100,000 parts in five or six styles to support a platform of customized vehicles. This poses huge challenges for tooling companies as they have to find an efficient way to reduce overall lead time and costs and at the same time to ensure high tool and part quality. In order to do this, the number of press tryouts and optimization loops as well as the total lead time in the tooling process must be reduced.
지금까지 툴 제조 회사는 한 모델에 대해 예를 들어 500,000 개의 부품을 실행하는 하나의 툴을 제조 할 수있었습니다. 이제 맞춤 차량의 플랫폼을 지원하기 위해 5 개 또는 6 개의 스타일로 10 만 개의 부품을 스탬프 처리하는 5 개 또는 6 개의 공구를 제조해야합니다. 이는 전반적인 리드 타임과 비용을 줄이는 동시에 효율적인 툴과 부품 품질을 보장 할 수있는 효율적인 방법을 찾아야하기 때문에 툴링 회사에게는 커다란 도전 과제입니다. 이를 수행하기 위해 프레스 트라이 아웃 횟수와 최적화 루프 수 및 툴링 공정의 총 리드 타임을 줄여야합니다.

In order to achieve these goals, tooling engineers look for the best solutions to quickly and efficiently setup the entire tooling process, make process modifications and evaluate different process layouts to select the best one. The rapid verification of multiple new concepts for quality and cost improvements is very important as well as the identification of complex forming problems during the early phase of tool development. The main goal is to increase the reliability of stamping tools in order to achieve efficient and reliable production or, in other words, to find the best optimized tool designs for a robust stamping process.
이러한 목표를 달성하기 위해 툴링 엔지니어는 전체 툴링 프로세스를 빠르고 효율적으로 설정하고 프로세스를 수정하며 다양한 프로세스 레이아웃을 평가하여 최상의 툴을 선택하는 최상의 솔루션을 모색합니다. 품질 및 비용 향상을위한 여러 가지 새로운 개념의 신속한 검증은 도구 개발의 초기 단계에서 복잡한 성형 문제를 확인하는 것뿐만 아니라 매우 중요합니다. 주요 목표는 효율적이고 신뢰할 수있는 생산을 달성하기 위해 스탬핑 툴의 신뢰성을 높이는 것입니다. 즉, 견고한 스탬핑 공정을위한 최적의 최적화 된 툴 디자인을 찾는 것입니다.

YCbCr

YCbCr, Y′CbCr, or Y Pb/Cb Pr/Cr, also written as YCBCR or Y'CBCR, is a family of color spaces used as a part of the color image pipeline in video and digital photography systems. Y′ is the luma component and CB and CR are the blue-difference and red-difference chroma components. Y′ (with prime) is distinguished from Y, which is luminance, meaning that light intensity is nonlinearly encoded based on gamma corrected RGB primaries.
YCBCR 또는 Y'CBCR로도 쓰여진 YCbCr, Y'CbCr 또는 Y Pb / Cb Pr / Cr은 비디오 및 디지털 사진 시스템에서 컬러 이미지 파이프 라인의 일부로 사용되는 색 공간 계열입니다. Y '는 휘도 성분이고 CB 및 CR은 청색 및 적색 차 성분의 색차 성분이다. Y '(프라임과 함께)는 Y와 구별되며, 이는 광도가 감마 보정 된 RGB 원색을 기반으로 비선형 적으로 인코딩된다는 것을 의미합니다.

Y′CbCr color spaces are defined by a mathematical coordinate transformation from an associated RGB color space. If the underlying RGB color space is absolute, the Y′CbCr color space is an absolute color space as well; conversely, if the RGB space is ill-defined, so is Y′CbCr.
Y'CbCr 색상 공간은 연관된 RGB 색상 공간의 수학 좌표 변환에 의해 정의됩니다. 기본 RGB 색상 공간이 절대적인 경우 Y'CbCr 색상 공간은 절대 색상 공간이기도합니다. 반대로 RGB 공간이 잘못 정의 된 경우 Y'CbCr도 잘못 정의됩니다.

Rationale
Cathode ray tube displays are driven by red, green, and blue voltage signals, but these RGB signals are not efficient as a representation for storage and transmission, since they have a lot of redundancy.

YCbCr and Y′CbCr are a practical approximation to color processing and perceptual uniformity, where the primary colors corresponding roughly to red, green and blue are processed into perceptually meaningful information. By doing this, subsequent image/video processing, transmission and storage can do operations and introduce errors in perceptually meaningful ways. Y′CbCr is used to separate out a luma signal (Y′) that can be stored with high resolution or transmitted at high bandwidth, and two chroma components (CB and CR) that can be bandwidth-reduced, subsampled, compressed, or otherwise treated separately for improved system efficiency.

One practical example would be decreasing the bandwidth or resolution allocated to "color" compared to "black and white", since humans are more sensitive to the black-and-white information (see image example to the right). This is called chroma subsampling.
음극선 관 디스플레이는 적색, 녹색 및 청색 전압 신호에 의해 구동되지만 이러한 RGB 신호는 많은 중복성을 가지고 있기 때문에 저장 및 전송의 표현으로는 효율적이지 않습니다.

YCbCr 및 Y'CbCr은 색상 처리 및 지각 균일성에 대한 실질적인 근사치이며, 대략적으로 적색, 녹색 및 청색에 대응하는 원색이 지각 적으로 의미있는 정보로 처리된다. 이렇게하면 후속 이미지 / 비디오 처리, 전송 및 저장이 작업을 수행하고 오류를 지각 적으로 의미있는 방식으로 도입 할 수 있습니다. Y'CbCr은 고해상도로 저장되거나 고 대역폭으로 전송 될 수있는 휘도 신호 (Y ')와 대역폭 감소, 서브 샘플링, 압축 또는 기타 두 가지 색도 요소 (CB 및 CR)를 분리하는 데 사용됩니다 향상된 시스템 효율성을 위해 별도로 처리됩니다.

한 가지 실용적인 예는 "흑백"에 비해 "컬러"에 할당 된 대역폭 또는 해상도를 줄이는 것입니다. 왜냐하면 인간은 흑백 정보에 더 민감하기 때문입니다 (오른쪽 이미지 예제 참조). 이것을 크로마 서브 샘플링이라고합니다.

YCbCr
YCbCr is sometimes abbreviated to YCC. Y′CbCr is often called YPbPr when used for analog component video, although the term Y′CbCr is commonly used for both systems, with or without the prime.

Y′CbCr is often confused with the YUV color space, and typically the terms YCbCr and YUV are used interchangeably, leading to some confusion. The main difference is that YUV is analog and YCbCr is digital.

Y′CbCr signals (prior to scaling and offsets to place the signals into digital form) are called YPbPr, and are created from the corresponding gamma-adjusted RGB (red, green and blue) source using three defined constants KR, KG, and KB as follows:
YCbCr은 때때로 YCC로 축약됩니다. Y'CbCr은 아날로그 구성 요소 비디오 용으로 사용되는 경우 YPbPr이라고도하며, Y'CbCr이라는 용어는 소수 또는 유선 모두 시스템에 공통으로 사용됩니다.

Y'CbCr은 종종 YUV 색 공간과 혼동되며 일반적으로 YCbCr 및 YUV라는 용어는 서로 혼용되어 혼란을 야기합니다. 주요 차이점은 YUV가 아날로그이고 YCbCr이 디지털이라는 것입니다.

Y'CbCr 신호 (신호를 디지털 형식으로 변환하기위한 스케일링 및 오프셋 이전)는 YPbPr이라고하며, 정의 된 상수 KR, KG 및 KB를 사용하여 해당 감마 조정 RGB (적색, 녹색 및 청색) 소스로부터 생성됩니다 다음과 같이

where KR, KG, and KB are ordinarily derived from the definition of the corresponding RGB space, and required to satisfy {\displaystyle K_{R}+K_{G}+K_{B}=1} {\displaystyle K_{R}+K_{G}+K_{B}=1}. (The equivalent matrix manipulation is often referred to as the "color matrix".)

Here, the prime ′ symbols mean gamma correction is being used; thus R′, G′ and B′ nominally range from 0 to 1, with 0 representing the minimum intensity (e.g., for display of the color black) and 1 the maximum (e.g., for display of the color white). The resulting luma (Y) value will then have a nominal range from 0 to 1, and the chroma (PB and PR) values will have a nominal range from -0.5 to +0.5. The reverse conversion process can be readily derived by inverting the above equations.

When representing the signals in digital form, the results are scaled and rounded, and offsets are typically added. For example, the scaling and offset applied to the Y′ component per specification (e.g. MPEG-2[1]) results in the value of 16 for black and the value of 235 for white when using an 8-bit representation. The standard has 8-bit digitized versions of CB and CR scaled to a different range of 16 to 240. Consequently, rescaling by the fraction (235-16)/(240-16) = 219/224 is sometimes required when doing color matrixing or processing in YCbCr space, resulting in quantization distortions when the subsequent processing is not performed using higher bit depths.

The scaling that results in the use of a smaller range of digital values than what might appear to be desirable for representation of the nominal range of the input data allows for some "overshoot" and "undershoot" during processing without necessitating undesirable clipping. This "head-room" and "toe-room" can also be used for extension of the nominal color gamut, as specified by xvYCC.

The value 235 accommodates a maximum black-to-white overshoot of 255 - 235 = 20, or 20 / ( 235 - 16 ) = 9.1%, which is slightly larger than the theoretical maximum overshoot (Gibbs' Phenomenon) of about 8.9% of the maximum step. The toe-room is smaller, allowing only 16 / 219 = 7.3% overshoot, which is less than the theoretical maximum overshoot of 8.9%.

Since the equations defining YCbCr are formed in a way that rotates the entire nominal RGB color cube and scales it to fit within a (larger) YCbCr color cube, there are some points within the YCbCr color cube that cannot be represented in the corresponding RGB domain (at least not within the nominal RGB range). This causes some difficulty in determining how to correctly interpret and display some YCbCr signals. These out-of-range YCbCr values are used by xvYCC to encode colors outside the BT.709 gamut.
여기서, KR, KG 및 KB는 통상적으로 대응하는 RGB 공간의 정의로부터 유도되고, {\ displaystyle K_ {R} + K_ {G} + K_ {B} = 1} + K_ {G} + K_ {B} = 1}이다. (동등한 행렬 조작은 종종 "색 행렬"이라고도합니다.)

여기에서 프라임 기호는 감마 보정이 사용되고 있음을 의미합니다. 따라서, R ', G'및 B '는 명목상 0 내지 1의 범위를 가지며, 0은 (예를 들어, 컬러 블랙의 디스플레이를위한) 최소 강도를 나타내고, 1은 (예를 들어, 컬러 화이트의 디스플레이를위한) 최대 강도를 나타낸다. 결과 루마 (Y) 값은 0에서 1까지의 공칭 범위를 가지며 채도 (PB 및 PR) 값은 공칭 범위 -0.5에서 +0.5까지입니다. 역변환 과정은 상기 방정식을 반전시킴으로써 쉽게 유도 될 수있다.

디지털 형식으로 신호를 나타낼 때 결과는 크기가 조정되고 반올림되며 일반적으로 오프셋이 추가됩니다. 예를 들어, 스펙 당 Y '컴포넌트에 적용된 스케일링 및 오프셋 (예 : MPEG-2 [1])은 8 비트 표현을 사용할 때 검정에 대해 16의 값을, 흰색에 대해 235의 값을 산출합니다. 표준에는 CB 및 CR의 8 비트 디지털화 된 버전이 16에서 240의 다른 범위로 조정됩니다. 따라서 색상 매트릭스를 수행 할 때 분수 (235-16) / (240-16) = 219/224로 재분석 할 때가 있습니다 또는 YCbCr 공간에서 처리함으로써, 후속 처리가 더 높은 비트 깊이를 사용하여 수행되지 않을 때 양자화 왜곡을 초래할 수있다.

입력 데이터의 공칭 범위를 나타내는 데 바람직한 것으로 보이는 것보다 작은 범위의 디지털 값을 사용하는 스케일링은 바람직하지 않은 클리핑을 필요로하지 않고 처리 중에 일부 "오버 슈트"및 "언더 슈트"를 허용합니다. 이 "head-room"및 "toe-room"은 xvYCC에 지정된 공칭 색상 영역의 확장에도 사용될 수 있습니다.

235 값은 255-235 = 20 또는 20 / (235-16) = 9.1 %의 최대 검정 / 흰색 오버 슛을 수용하며 이는 이론적 인 최대 오버 슛 (Gibbs '현상)의 약 8.9 %보다 약간 큽니다 최대 단계. 토우 룸은 작아서 이론적 인 최대 오버 슈트 인 8.9 %보다 적은 16/219 = 7.3 % 오버 슛을 허용합니다.

YCbCr을 정의하는 방정식은 공칭 RGB 색상 큐브 전체를 회전하고 (더 큰) YCbCr 색상 큐브에 맞도록 크기가 조정되므로 YCbCr 색상 큐브 내에 해당 RGB 도메인으로 표현할 수없는 점이 있습니다 (적어도 공칭 RGB 범위 내에 있지는 않음). 이로 인해 일부 YCbCr 신호를 올바르게 해석하고 표시하는 방법을 결정하는 데 약간의 어려움이 있습니다. 이러한 범위를 벗어나는 YCbCr 값은 xvYCC에서 BT.709 영역 외부의 색을 인코딩하는 데 사용됩니다.


YUV

참조: Link

YUV is a color encoding system typically used as part of a color image pipeline. It encodes a color image or video taking human perception into account, allowing reduced bandwidth for chrominance components, thereby typically enabling transmission errors or compression artifacts to be more efficiently masked by the human perception than using a "direct" RGB-representation. Other color encodings have similar properties, and the main reason to implement or investigate properties of Y′UV would be for interfacing with analog or digital television or photographic equipment that conforms to certain Y′UV standards.
YUV는 일반적으로 컬러 이미지 파이프 라인의 일부로 사용되는 컬러 인코딩 시스템입니다. 이는 인간의 인식을 고려한 컬러 이미지 또는 비디오를 인코딩하여 크로 미 넌스 구성 요소의 대역폭을 줄임으로써 전송 오류 또는 압축 아티팩트를 일반적으로 "직접"RGB 표현을 사용하는 것보다 인간의 인식으로보다 효율적으로 마스킹 할 수있게합니다. 다른 컬러 인코딩은 유사한 속성을 가지고 있으며 Y'UV의 속성을 구현하거나 조사하는 주된 이유는 특정 Y'UV 표준을 준수하는 아날로그 또는 디지털 TV 또는 사진 장비와 인터페이스하기위한 것입니다.

The scope of the terms Y′UV, YUV, YCbCr, YPbPr, etc., is sometimes ambiguous and overlapping. Historically, the terms YUV and Y′UV were used for a specific analog encoding of color information in television systems, while YCbCr was used for digital encoding of color information suited for video and still-image compression and transmission such as MPEG and JPEG. Today, the term YUV is commonly used in the computer industry to describe file-formats that are encoded using YCbCr.
용어 Y'UV, YUV, YCbCr, YPbPr 등의 범위는 때로는 모호하며 중복됩니다. 역사적으로, YUV 및 Y'UV는 텔레비전 시스템에서 컬러 정보의 특정 아날로그 인코딩에 사용되었고, YCbCr은 비디오 및 MPEG 및 JPEG와 같은 정지 이미지 압축 및 전송에 적합한 컬러 정보의 디지털 인코딩에 사용되었습니다. 오늘날 YUV라는 용어는 YCbCr을 사용하여 인코딩 된 파일 형식을 설명하기 위해 컴퓨터 업계에서 일반적으로 사용됩니다.

The Y′UV model defines a color space in terms of one luma (Y′) and two chrominance (UV) components. The Y′UV color model is used in the PAL composite color video (excluding PAL-N) standard. Previous black-and-white systems used only luma (Y′) information. Color information (U and V) was added separately via a sub-carrier so that a black-and-white receiver would still be able to receive and display a color picture transmission in the receiver's native black-and-white format.
Y'UV 모델은 하나의 휘도 (Y ') 및 2 개의 색차 (UV) 성분으로 색 공간을 정의합니다. Y'UV 컬러 모델은 PAL 합성 컬러 비디오 (PAL-N 제외) 표준에 사용됩니다. 이전의 흑백 시스템은 루마 (Y ') 정보 만 사용했습니다. 컬러 정보 (U 및 V)는 서브 캐리어를 통해 개별적으로 추가되어, 흑백 수신기는 여전히 수신기의 네이티브 흑백 포맷의 컬러 화상 전송을 수신하고 디스플레이 할 수있게됩니다.

Y′ stands for the luma component (the brightness) and U and V are the chrominance (color) components; luminance is denoted by Y and luma by Y′ – the prime symbols (') denote gamma compression,[1] with "luminance" meaning perceptual (color science) brightness, while "luma" is electronic (voltage of display) brightness.
Y '는 휘도 성분 (밝기)을 나타내며 U와 V는 색차 성분 (색)을 나타냅니다. 휘도는 Y로 표시되고 luma는 Y '로 표시됩니다. - 소수점 기호 (')는 감마 압축을 나타내며, '휘도'는 지각 (색 과학) 밝기를 의미하고 '루마'는 전자식 밝기입니다.

The YPbPr color model used in analog component video and its digital version YCbCr used in digital video are more or less derived from it, and are sometimes called Y′UV. (CB/PB and CR/PR are deviations from grey on blue–yellow and red–cyan axes, whereas U and V are blue–luminance and red–luminance differences respectively.) The Y′IQ color space used in the analog NTSC television broadcasting system is related to it, although in a more complex way. The YDbDr color space used in the analog SECAM and PAL-N television broadcasting systems, are also related.
아날로그 컴포넌트 비디오에 사용 된 YPbPr 컬러 모델디지털 비디오에 사용되는 YCbCr 디지털 버전은 다소 차이가 있으며 Y'UV라고도합니다. (CB / PB 및 CR / PR은 청색 - 황색 및 적색 - 시안 축상의 회색으로부터의 편차이고, U 및 V는 각각 청색 - 휘도 및 적색 - 휘도 차이이다.) 아날로그 NTSC 텔레비전에서 사용되는 Y'IQ 색 공간 방송 시스템은 좀 더 복잡한 방식으로 관련되어있다. 아날로그 SECAM 및 PAL-N 텔레비전 방송 시스템에 사용되는 YDbDr 색 공간 또한 관련되어 있습니다.

As for etymology, Y, Y′, U, and V are not abbreviations. The use of the letter Y for luminance can be traced back to the choice of XYZ primaries. This lends itself naturally to the usage of the same letter in luma (Y′), which approximates a perceptually uniform correlate of luminance. Likewise, U and V were chosen to differentiate the U and V axes from those in other spaces, such as the x and y chromaticity space. See the equations below or compare the historical development of the math.
어원에 관해서는 Y, Y ', U, V는 원래 단어를 축약한 것이 아닙니다. 휘도에 문자 Y를 사용하는 것은 XYZ 기본 색의 선택으로 거슬러 올라갈 수 있습니다. 이것은 휘도의 지각 적으로 일정한 상관 관계를 근사화하는 luma (Y ')에서 같은 문자를 사용하는 데 자연스럽게 적합합니다. 마찬가지로 U 및 V는 x 및 y 색도 공간과 같은 다른 공간의 U 및 V 축을 구분하기 위해 선택되었습니다. 아래의 방정식을 보거나 수학의 역사적 발전을 비교하십시오.

역사
Y′UV was invented when engineers wanted color television in a black-and-white infrastructure. They needed a signal transmission method that was compatible with black-and-white (B&W) TV while being able to add color. The luma component already existed as the black and white signal; they added the UV signal to this as a solution.

The UV representation of chrominance was chosen over straight R and B signals because U and V are color difference signals. In other words, the U and V signals tell the television to shift the color of a certain pixel without altering its brightness. Or the U and V signals tell the monitor to make one color brighter at the cost of the other and by how much it should be shifted. The higher the (or the lower when negative) the U and V values are, the more the saturated (colorful) the pixel gets. The closer the U and V values get to zero, the lesser it shifts the color meaning that the red, green and blue lights will be more equally bright, producing a greyer pixel. This is the benefit of using color difference signals, i.e. instead of telling how much red there is to a color, it tells by how much it is more red than green or blue. In turn this meant that when the U and V signals would be zero or absent, it would just display a greyscale image. If R and B were to have been used, these would have non-zero values even in a B&W scene, requiring all three data-carrying signals. This was important in the early days of color television, because old black and white TV signals had no U and V signals present, meaning the color TV would just display it as B&W TV out of the box. In addition, black and white receivers could take the Y′ signal and ignore the U- and V-color signals, making Y′UV backward-compatible with all existing black-and-white equipment, input and output. If the color-TV standard wouldn't have used color difference signals, it could mean a color TV would make funny colors out of a B&W broadcast or it would need additional circuitry to translate the B&W signal to color. It was necessary to assign a narrower bandwidth to the chrominance channel because there was no additional bandwidth available. If some of the luminance information arrived via the chrominance channel (as it would have if RB signals were used instead of differential UV signals), B&W resolution would have been compromised.
Y'UV는 엔지니어가 컬러 텔레비전을 흑백 인프라로 원할 때 발명되었습니다. 컬러를 추가 할 수있는 흑백 (B & W) TV와 호환되는 신호 전송 방법이 필요했습니다. 루마 성분은 이미 흑백 신호로 존재합니다. 그들은 솔루션에 자외선 신호를 추가했습니다.

U와 V는 색차 신호이기 때문에 직선의 R과 B 신호보다 색차의 UV 표현이 선택되었습니다. 즉, U 및 V 신호는 텔레비전에 밝기를 변경하지 않고 특정 픽셀의 색상을 이동 시키도록 지시합니다. 또는 U 및 V 신호는 모니터가 다른 색상의 비용으로 한 색상을 더 밝게 만들고 이동해야하는 정도를 알려줍니다. U 및 V 값이 높을수록 (또는 음수 일 때 더 낮아짐) 픽셀이 더 포화 된 (색상이 다양해질수록). U와 V 값이 0에 가까울수록 빨강, 녹색 및 파랑 조명이 더 밝아 져 회색 픽셀이 생성된다는 의미의 색상이 조금씩 이동합니다. 이는 색상 차이 신호를 사용하는 이점입니다. 즉, 색상에 빨간색이 얼마나 많은지 알려주지 않고 녹색 또는 파란색보다 더 많이 빨간색으로 표시합니다. 이것은 U 및 V 신호가 0이거나 없을 때 그레이 스케일 이미지 만 표시한다는 것을 의미합니다. R과 B를 사용하면 B & W 장면에서도 3 가지 데이터 운반 신호가 모두 필요하므로 0이 아닌 값을 갖게됩니다. 오래된 흑백 TV 신호에는 U 및 V 신호가 없으므로 컬러 TV 초기에는 중요했습니다. 즉, 컬러 TV는 B & W TV를 그대로 상자에 넣어 표시합니다. 또한 흑백 수신기는 Y '신호를 받아 U 및 V 색상 신호를 무시할 수 있으므로 기존의 모든 흑백 장비, 입력 및 출력과 Y'UV의 역 호환이 가능합니다. 컬러 TV 표준이 색차 신호를 사용하지 않는다면 컬러 TV가 흑백 방송에서 재미있는 색상을 만들거나 흑백 신호를 색상으로 변환하는 추가 회로가 필요하다는 것을 의미 할 수 있습니다. 사용 가능한 추가 대역폭이 없었기 때문에 색차 채널에 더 좁은 대역폭을 할당해야했습니다. 휘도 정보 중 일부가 색차 채널을 통해 도착한 경우 (차동 UV 신호 대신 RB 신호가 사용 된 것처럼) B & W 해상도가 손상되었을 수 있습니다.


Y'UV 는 RGB 와 서로 계산될 수 있다.
Y는 휘도
Y'는 루마
UV 는 색차

R, G, B 는 색의 값

그러면 왜 센서에서 바로 받은 값인 RGB를 사용하지 않고 Y'UV를 사용하느냐?


Conversion to/from RGB


Numerical approximations


Luminance/chrominance systems in general
The primary advantage of luma/chroma systems such as Y′UV, and its relatives Y′IQ and YDbDr, is that they remain compatible with black and white analog television (largely due to the work of Georges Valensi). The Y′ channel saves all the data recorded by black and white cameras, so it produces a signal suitable for reception on old monochrome displays. In this case, the U and V are simply discarded. If displaying color, all three channels are used, and the original RGB information can be decoded.
Y'UV 및 그 친척 Y'IQ 및 YDbDr과 같은 루마 / 크로마 시스템의 주요 이점은 흑백 아날로그 TV와 호환이 가능하다는 것입니다 (주로 Georges Valensi의 작업으로 인해). Y '채널은 흑백 카메라로 기록 된 모든 데이터를 저장하므로 오래된 흑백 디스플레이의 수신에 적합한 신호를 생성합니다. 이 경우 U와 V는 단순히 버려집니다. 색상을 표시하면 세 개의 채널이 모두 사용되고 원본 RGB 정보가 디코딩 될 수 있습니다.

Another advantage of Y′UV is that some of the information can be discarded in order to reduce bandwidth. The human eye has fairly little spatial sensitivity to color: the accuracy of the brightness information of the luminance channel has far more impact on the image detail discerned than that of the other two. Understanding this human shortcoming, standards such as NTSC and PAL reduce the bandwidth of the chrominance channels considerably. (Bandwidth is in the temporal domain, but this translates into the spatial domain as the image is scanned out.)
Y'UV의 또 다른 이점은 대역폭을 줄이기 위해 일부 정보를 삭제할 수 있다는 것입니다. 인간의 눈은 색에 대한 공간 감도가 거의 없습니다. 휘도 채널의 밝기 정보의 정확도는 다른 두 가지보다 더 세부적인 이미지 세부 사항에 훨씬 더 많은 영향을 미칩니다. NTSC 및 PAL과 같은 표준에서는 이러한 인간적인 단점을 이해하여 색차 채널의 대역폭을 상당히 줄입니다. (대역폭은 시간 영역에 있지만 이미지가 스캔되면 공간 영역으로 변환됩니다.)

Therefore, the resulting U and V signals can be substantially "compressed". In the NTSC (Y′IQ) and PAL systems, the chrominance signals had significantly narrower bandwidth than that for the luminance. Early versions of NTSC rapidly alternated between particular colors in identical image areas to make them appear adding up to each other to the human eye, while all modern analogue and even most digital video standards use chroma subsampling by recording a picture's color information at reduced resolution. Only half the horizontal resolution compared to the brightness information is kept (termed 4:2:2 chroma subsampling), and often the vertical resolution is also halved (giving 4:2:0). The 4:x:x standard was adopted due to the very earliest color NTSC standard which used a chroma subsampling of 4:1:1 (where the horizontal color resolution is quartered while the vertical is full resolution) so that the picture carried only a quarter as much color resolution compared to brightness resolution. Today, only high-end equipment processing uncompressed signals uses a chroma subsampling of 4:4:4 with identical resolution for both brightness and color information.
따라서, 결과적인 U 및 V 신호는 실질적으로 "압축"될 수있다. NTSC (Y'IQ) 및 PAL 시스템에서 색차 신호는 휘도보다 신호 대역폭이 상당히 좁습니다. 초기 버전의 NTSC는 동일한 이미지 영역에서 특정 색상을 신속하게 번갈아 가며 서로 눈을 가깝게 보이게하는 반면 현대의 모든 아날로그 및 대부분의 디지털 비디오 표준은 축소 된 해상도로 사진의 색상 정보를 기록하여 크로마 하위 샘플링을 사용합니다. 밝기 정보에 비해 수평 해상도의 절반 만 유지됩니다 (4 : 2 : 2 크로마 하위 샘플링이라고 함). 종종 수직 해상도도 절반으로 감소합니다 (4 : 2 : 0 제공). 4 : 1 : 1의 크로마 서브 샘플링을 사용하는 가장 초기의 컬러 NTSC 표준 (가로 해상도는 4 배, 세로 해상도는 4 등분)으로 인해 4 : x : x 표준이 채택되었습니다. 밝기 해상도보다 4 분의 1 컬러 해상도. 오늘날, 비 압축 신호를 처리하는 고급 장비 만이 밝기 및 색상 정보 모두에 대해 동일한 해상도로 4 : 4 : 4의 채도 서브 샘플링을 사용합니다.

The I and Q axes were chosen according to bandwidth needed by human vision, one axis being that requiring the most bandwidth, and the other (fortuitously at 90 degrees) the minimum. However, true I and Q demodulation was relatively more complex, requiring two analog delay lines, and NTSC receivers rarely used it.
I 및 Q 축은 인간의 시력에 필요한 대역폭에 따라 선택되었으며, 한 축은 가장 많은 대역폭을 필요로하고, 다른 축은 (최소 90도에서 우연히) 최소값을 필요로합니다. 그러나 사실 I 및 Q 복조는 상대적으로 더 복잡하여 두 개의 아날로그 지연 라인이 필요했으며 NTSC 리시버는 거의 사용하지 않았습니다.

However, this color space conversion is lossy, particularly obvious in crosstalk from the luma to the chroma-carrying wire, and vice versa, in analogue equipment (including RCA connectors to transfer a digital signal, as all they carry is analogue composite video, which is either YUV, YIQ, or even CVBS). Furthermore, NTSC and PAL encoded color signals in a manner that causes high bandwidth chroma and luma signals to mix with each other in a bid to maintain backward compatibility with black and white television equipment, which results in dot crawl and cross color artifacts. When the NTSC standard was created in the 1950s, this was not a real concern since the quality of the image was limited by the monitor equipment, not the limited-bandwidth signal being received. However today′s modern television is capable of displaying more information than is contained in these lossy signals. To keep pace with the abilities of new display technologies, attempts were made since the late 1970s to preserve more of the Y′UV signal while transferring images, such as SCART (1977) and S-Video (1987) connectors.
그러나이 색 공간 변환은 손실이 많습니다. 아날로그 장비 (디지털 신호를 전송하는 RCA 커넥터 포함, 루마에서 크로마 전송 와이어로의 크로스 토크에서 특히나 그 반대의 경우도 마찬가지 임)는 아날로그 합성 비디오입니다. YUV, YIQ 또는 CVBS 임). 또한 NTSC 및 PAL은 고 대역폭 크로마 및 루마 신호가 흑백 TV 장비와의 역 호환성을 유지하기 위해 서로 섞여서 도트 크롤 및 크로스 컬러 아티팩트를 발생시키는 방식으로 색상 신호를 인코딩했습니다. 1950 년대에 NTSC 표준이 만들어 졌을 때 이미지의 품질이 제한된 대역폭 신호가 아닌 모니터 장비에 의해 제한 되었기 때문에 이것은 실제 관심사가 아니 었습니다. 그러나 오늘날의 현대 TV는 이러한 손실 신호에 포함 된 것보다 많은 정보를 표시 할 수 있습니다. 새로운 디스플레이 기술의 능력에 발 맞추어 1970 년대 말 SCART (1977) 및 S-Video (1987) 커넥터와 같은 이미지를 전송하는 동안 Y'UV 신호를 더 많이 보존하려는 시도가있었습니다.

Instead of Y′UV, Y′CbCr was used as the standard format for (digital) common video compression algorithms such as MPEG-2. Digital television and DVDs preserve their compressed video streams in the MPEG-2 format, which uses a full Y′CbCr color space, although retaining the established process of chroma subsampling. The professional CCIR 601 digital video format also uses Y′CbCr at the common chroma subsampling rate of 4:2:2, primarily for compatibility with previous analog video standards. This stream can be easily mixed into any output format needed.
Y'UV 대신 Y'CbCr이 MPEG-2와 같은 (디지털) 공통 비디오 압축 알고리즘의 표준 형식으로 사용되었습니다. 디지털 텔레비전과 DVD는 압축 된 비디오 스트림을 MPEG-2 형식으로 보존합니다.이 형식은 확립 된 채도 서브 샘플링 프로세스를 유지하면서도 전체 Y'CbCr 색 공간을 사용합니다. 전문가 용 CCIR 601 디지털 비디오 형식은 이전 아날로그 비디오 표준과의 호환성을 위해 4 : 2 : 2의 공통 크로마 하위 샘플링 속도로 Y'CbCr을 사용합니다. 이 스트림은 필요한 모든 출력 형식으로 쉽게 혼합 될 수 있습니다.

Y′UV is not an absolute color space. It is a way of encoding RGB information, and the actual color displayed depends on the actual RGB colorants used to display the signal. Therefore, a value expressed as Y′UV is only predictable if standard RGB colorants are used (i.e. a fixed set of primary chromaticities, or particular set of red, green, and blue).
Y'UV는 절대 색 공간이 아닙니다. 이것은 RGB 정보를 인코딩하는 방법이며, 실제 표시되는 색은 신호를 표시하는 데 사용되는 실제 RGB 색소에 따라 다릅니다. 따라서,  Y'UV로 표현 된 값은 표준 RGB 색소가 사용되는 경우 (즉, 1 차 색도의 고정 된 세트 또는 적색, 녹색 및 청색의 특정 세트) 에만 예측 가능합니다.

Furthermore, the range of colors and brightnesses (known as the color gamut) of RGB (whether it be BT.601 or Rec.709) is far smaller than the range of colors and brightnesses allowed by Y′UV. This can be very important when converting from Y′UV (or Y′CbCr) to RGB, since the formulas above can produce "invalid" RGB values – i.e., values below 0% or very far above 100% of the range (e.g., outside the standard 16–235 luma range (and 16–240 chroma range) for TVs and HD content, or outside 0–255 for standard definition on PCs). Unless these values are dealt with they will usually be "clipped" (i.e., limited) to the valid range of the channel affected. This changes the hue of the color, which is very undesirable, so it is therefore often considered better to desaturate the offending colors such that they fall within the RGB gamut.[9] Likewise, when RGB at a given bit depth is converted to YUV at the same bit depth, several RGB colors can become the same Y′UV color, resulting in information loss.
또한 RGB (BT.601이든 Rec.709이든)의 색상과 밝기 (색상 영역으로 알려짐)의 범위는 Y'UV가 허용하는 색상 및 밝기의 범위보다 훨씬 작습니다. 위의 공식은 범위의 0 % 이하 또는 100 %를 훨씬 초과하는 값 (예 : 0 %)을 생성 할 수 있기 때문에 Y'UV (또는 Y'CbCr)에서 RGB로 변환 할 때 매우 중요 할 수 있습니다. TV 및 HD 컨텐츠의 표준 16-235 루마 범위 (및 16-240 크로마 범위)를 벗어나거나 PC의 표준 정의를위한 0-255 범위를 벗어납니다. 이 값을 처리하지 않으면 영향을받는 채널의 유효 범위에 대해 일반적으로 "클리핑"(즉, 제한)됩니다. 이렇게하면 색상의 색조가 바뀌므로 매우 바람직하지 않습니다. 따라서 RGB 색상 영역에 해당하는 색상을 채도 감소시키는 것이 더 좋습니다. [9] 마찬가지로 특정 비트 심도의 RGB가 동일한 비트 심도에서 YUV로 변환되면 여러 RGB 색상이 동일한 Y'UV 색상이되어 정보가 손실 될 수 있습니다.


Relation with Y′CbCr
Y′UV is often used as a term for YCbCr. However, they are completely different formats with different scale factors.
Y'UV는 종종 YCbCr의 용어로 사용됩니다. 그러나, 그들은 다른 스케일 팩터와 완전히 다른 포맷입니다.

Nevertheless, the relationship between them in the standard case is simple. In particular, the Y channel is the same in both, both Cb and U are proportional to (B-Y), and both Cr and V are proportional to (R-Y).
그럼에도 불구하고, 표준 경우에 그들 사이의 관계는 간단합니다. 특히 Y 채널은 둘 다 동일하며 Cb와 U는 (B-Y)에 비례하고 Cr과 V는 (R-Y)에 비례합니다.


Types of sampling


Converting between Y′UV and RGB



Y′UV444 to RGB888 conversion
Y′UV420p is a planar format, meaning that the Y′, U, and V values are grouped together instead of interspersed. The reason for this is that by grouping the U and V values together, the image becomes much more compressible. When given an array of an image in the Y′UV420p format, all the Y′ values come first, followed by all the U values, followed finally by all the V values.

The Y′V12 format is essentially the same as Y′UV420p, but it has the U and V data switched: the Y′ values are followed by the V values, with the U values last. As long as care is taken to extract U and V values from the proper locations, both Y′UV420p and Y′V12 can be processed using the same algorithm.

As with most Y′UV formats, there are as many Y′ values as there are pixels. Where X equals the height multiplied by the width, the first X indices in the array are Y′ values that correspond to each individual pixel. However, there are only one fourth as many U and V values. The U and V values correspond to each 2 by 2 block of the image, meaning each U and V entry applies to four pixels. After the Y′ values, the next X/4 indices are the U values for each 2 by 2 block, and the next X/4 indices after that are the V values that also apply to each 2 by 2 block.

Translating Y′UV420p to RGB is a more involved process compared to the previous formats. Lookup of the Y′, U and V values can be done using the following method:
Y'UV420p는 평면 형식이므로 Y ', U 및 V 값이 산재되어있는 대신 함께 그룹화됩니다. 그 이유는 U와 V 값을 함께 그룹화하면 이미지가 훨씬 압축 될 수 있기 때문입니다. Y'UV420p 형식의 이미지 배열이 주어지면 모든 Y 값이 먼저오고 그 다음에는 모든 U 값이옵니다. 마지막으로 모든 V 값이옵니다.

Y'V12 형식은 기본적으로 Y'UV420p와 동일하지만 U 및 V 데이터가 전환됩니다. Y 값 뒤에는 V 값이 나오고 U 값이 마지막에옵니다. 올바른 위치에서 U 및 V 값을 추출하는 데주의를 기울이는 한 동일한 알고리즘을 사용하여 Y'UV420p 및 Y'V12를 모두 처리 할 수 ​​있습니다.

대부분의 Y'UV 형식과 마찬가지로 픽셀만큼 많은 Y '값이 있습니다. X가 높이에 폭을 곱한 값인 경우 배열의 첫 번째 X 인덱스는 각 픽셀에 해당하는 Y '값입니다. 그러나 U와 V 값이 4 분의 1에 불과합니다. U 및 V 값은 이미지의 각 2 x 2 블록에 해당합니다. 즉, 각 U 및 V 항목은 4 개의 픽셀에 적용됩니다. Y '값 다음에 다음 X / 4 인덱스는 각 2 x 2 블록에 대한 U 값이고 그 다음 X / 4 인덱스는 각 2 x 2 블록에도 적용되는 V 값입니다.

Y'UV420p를 RGB로 변환하는 것은 이전 형식에 비해 더 복잡한 프로세스입니다. Y ', U 및 V 값의 검색은 다음 방법을 사용하여 수행 할 수 있습니다.
Y'UV420p는 평면 형식이므로 Y ', U 및 V 값이 산재되어있는 대신 함께 그룹화됩니다. 그 이유는 U와 V 값을 함께 그룹화하면 이미지가 훨씬 압축 될 수 있기 때문입니다. Y'UV420p 형식의 이미지 배열이 주어지면 모든 Y 값이 먼저오고 그 다음에는 모든 U 값이옵니다. 마지막으로 모든 V 값이옵니다.

Y'V12 형식은 기본적으로 Y'UV420p와 동일하지만 U 및 V 데이터가 전환됩니다. Y 값 뒤에는 V 값이 나오고 U 값이 마지막에옵니다. 올바른 위치에서 U 및 V 값을 추출하는 데주의를 기울이는 한 동일한 알고리즘을 사용하여 Y'UV420p 및 Y'V12를 모두 처리 할 수 ​​있습니다.

대부분의 Y'UV 형식과 마찬가지로 픽셀만큼 많은 Y '값이 있습니다. X가 높이에 폭을 곱한 값인 경우 배열의 첫 번째 X 인덱스는 각 픽셀에 해당하는 Y '값입니다. 그러나 U와 V 값이 4 분의 1에 불과합니다. U 및 V 값은 이미지의 각 2 x 2 블록에 해당합니다. 즉, 각 U 및 V 항목은 4 개의 픽셀에 적용됩니다. Y '값 다음에 다음 X / 4 인덱스는 각 2 x 2 블록에 대한 U 값이고 그 다음 X / 4 인덱스는 각 2 x 2 블록에도 적용되는 V 값입니다.

Y'UV420p를 RGB로 변환하는 것은 이전 형식에 비해 더 복잡한 프로세스입니다. Y ', U 및 V 값의 검색은 다음 방법을 사용하여 수행 할 수 있습니다.


2017년 11월 23일 목요일

kiss goodbye

Baby不要再哭泣 這一幕多麼熟
Baby bu yao zai ku qi, zhe yi mu duo yao shou xi
Baby, don't cry anymore, this scene is so familiar

緊握著妳的手彼此 都捨不得分
jin wo zhao ni de shou bi ci, dou she bu de fen chi
Tightly holding your hand, we are both unwilling to separate
緊: 진할 진
握: 쥘 악
著: 나타날 저
妳: 너 니
的: 관형어 뒤에 쓰여, 관형어와 중심어 사이가 종속 관계임을 나타냄
手: 손 수
彼: 저 피
此: 이 차

都: 모두
捨: 버릴 사
不: 아닐 부
得: 얻을 득
分: 나눌 분
離: 떠날 리


此: 서로
不得: 얻을 수 없다, Bùdé
離: 분리 된, Fēnlí不得離: 분리 없다.

每一次想開口 但不如保持安靜
mei yi ci xiang kai kou dan bu ru bao chi an jing
Every time I want to say something I instead preserve the silence

給我一分鐘專心好好欣賞妳的
gei wo yi fen zhong zhuan xin, hao hao xin shang ni de mei
Give me a minute to concentrate on admiring your beauty


幸福搭配悲傷 同時在我心交叉
xing fu da pei bei shang, tong shi zai wo xin jiao cha
Happiness complements sorrow, crossing paths within my heart at the same time

挫折的眼淚不能測試愛的重量
cuo zhe de yan lei bu neng ce shi ai de zhong liang
Tears of frustration cannot measure the weight of love

付出的愛收不回 還欠妳的我不能
fu chu de ai shou bu hui, hai qian ni de wo bu neng gei
I can’t withdraw the love I already gave and I can't give you all the love I owe you 

別把我心也帶走去跟隨
bie ba wo xin ye dai zou, qu gen sui
Don't take along my heart to follow you


*
每一次和妳分開 深深地被妳打
mei yi ci he ni fen kai, shen shen de bei ni da bai
Every time we part ways, I am deeply defeated by you

每一次放棄妳的溫柔 痛苦難以釋懷
mei yi ci fang qi ni de wen rou, tong ku nan yi shi huai
Every time I give up your tenderness, it is hard to release my pain 

每一次和妳分開 每一次Kiss You Goodbye
mei yi ci he ni fen kai, mei yi ci kiss you Goodbye
Every time we part ways, Every time I kiss you goodbye

愛情的滋味此刻我終於最明白
ai qing de zi wei ci ke wo zhong yu zui ming bai (wo zhong yu ming bai)
at that moment I finally fully understand the taste of love


幸福搭配悲傷 同時在我心交叉
xing fu da pei bei shang, tong shi zai wo xin jiao cha
Happiness complements sorrow, crossing paths within my heart at the same time

挫折的眼淚不能測試愛的重量
cuo zhe de yan lei bu neng ce shi ai de zhong liang
Tears of frustration cannot measure the weight of love 

付出的愛收不回 還欠妳的我不能
fu chu de ai shou bu hui, dan qian ni de wo bu neng gei
I cannot withdraw the love I already gave and I can't give you all the love I owe you

我才明白愛最真實的滋
wo cai ming bai ai zui zhen shi de zi wei
I finally understand the truest taste of love