首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件开发 >

Hi3515 CX25828视频芯片手册腾挪侦测模块的翻译

2012-12-26 
Hi3515 CX25828视频芯片手册移动侦测模块的翻译今天下午,一种莫名其妙的冲动,使我下定决心翻译 CX25828视

Hi3515 CX25828视频芯片手册移动侦测模块的翻译

    今天下午,一种莫名其妙的冲动,使我下定决心翻译 CX25828视频芯片手册移动侦测模块,刚开始还只是想了解了解,但我突然想做这个伟大的决定-->把他翻译出来;这可能会让那些英语很ok的人或者高手见笑,可我此时此刻对这种超越自己能力以及对英语的情结之心是难以意表的。见笑了,见笑了。Hi3515 CX25828视频芯片手册腾挪侦测模块的翻译,欢迎拍砖。。。。。

    我刚开始做移动侦测是直接调用Hi3515 API完成的,搞了很长一段时间,觉得太郁闷了,很多参数或者功能都不太如意,所以,就想着从底层出发,通过I2C配置协处理器CX25828视频芯片的motion detect模块,翻译之后,真有点豁然开朗的感觉。由于对移动侦测有些了解,所以,翻译起来有些感觉,但,肯定有很多错误或不准确的地方,欢迎指正。Hi3515 CX25828视频芯片手册腾挪侦测模块的翻译

    关于移动侦测技术原理与实现详情见:http://blog.csdn.net/huangminqiang201209/article/details/8252527

 

2.7 Motion Detection:移动侦测

The CX25828 includes programmable motiondetection logic which can immediately trigger flags to the host processor viathe IRQ pin when motion is detected on any of the incoming analog videostreams. This way, when the host receives a motion detection interrupt, it can,for example, alert other devices in the system to wake up and perform a certainfunction. These configuration parameters include:

大致意思:CX25828芯片有移动侦测模块,当侦测到有类似视频流输入时会立刻触发主芯片(Hi3515)IRQ中断。通过这种方法,当主机接收到移动侦测中断时,它可以例如唤醒系统其他设备以及运行某些操作,配置参数包括:

? Block Sizes forNTSC (720x480) and PAL (720x576)//块大小:N/P值

? Even or Oddfield for Motion Detection or no Motion Detection//奇/偶场或无侦测

? Black/WhiteDetection //黑白侦测

? DetectionFrequency  //侦测频率

? Motion DetectionThresholds  //侦测阈值

? Motion DetectionLimits  //侦测限制

? Register Mask tomask off particular Motion Detection bits/functions //屏蔽寄存器,屏蔽特定侦测位或函数

 

The CX25828 implements a hardware-basedmotion detection algorithm. The motion detection, as well as other imagecontent based detection, is done through comparison of average luma valuesacross fields, employing a grid-like system to divide the fields into 192distinct regions. Each region can also be enabled or disabled through registercontrol. The 192 distinct regions are referred to as blocks, organized as shownin Figure 1. Motion detection is performed on the unscaled output of the videodecoders and on one field per frame.

大致意思:CX25828芯片移动侦测的实现是基于硬件的。移动侦测的完成是通过对图片场平均亮度值比较,它把图片分为192个小区域,每个区域都通过寄存器控制,192个区域如192个块一样在表1(呵呵,表太大了,不好输出)显示。运动检测过程是在未调整输出的视频解码器并且每帧进行一场侦测。

 

Motion and Still Image (No Motion)detection are mutually exclusive, i.e., they should not be enabled simultaneously.Black or White detection can be enabled simultaneously with either Motion orStill Image detection. Each is enabled or disabled through the programmablemotion detection interrupt mask registers. The interrupt status for eachdecoder is reflected in a 5-bit interrupt status register provided for each ofthe detection methods, i.e., motion detection, white detection, blackdetection, still image detection, and end of field detection.

大致意思:运动或非运动侦测是相对独立的,不能同时使能。黑/白侦测的使能是通过中断屏蔽寄存器控制,与运动侦测无关。侦测方法中,比如移动侦测、黑白侦测、静止图像检测以及尾场侦测等,每个编码器的中断屏蔽寄存器状态位都是第5bit。

 

The motion detection logic can immediatelytrigger interrupts to the host processor via IRQ pin. Please refer to sectionMotion Detection Interrupt under Interrupts section for further details.

大致意思:运动侦测能通过IRQ管脚触发主机中断,请根据以下中断部分获取更多信息。

 

2.7.1 Related Registers:相关寄存器

The following section discusses the motiondetection feature in detail.

大致意思:接下来详细讨论移动侦测特点。

 

2.7.1.1 Programmable Block Size:可编程大小

Block sizes are programmable to cover thePAL and NTSC video resolutions. Block sizes shown below, in pixel units, arehalved in the vertical direction to represent the actual number of rowscalculated for an interlaced frame. The following registers program the blocksize.

大致意思:可编程大小包括PAL和NTSC视频分辨率,如下,每个像素单元,一半在垂直方向的实际行数计算的交错帧,下面的寄存器将对此进行配置。

? PAL (720x576) -Block size of 44x24  //P值块大小

? NTSC (720x480) -Block size of 44x20 //N值块大小

MDET_[0-7]_GRID_XCNT:0x810

[7:0]grid_blk_xcnt à Width of block used in motion detection. For unscaledvideo this shouldbe set to 44. For scaled video it should be a multiple of 16:块的宽度,用于未压缩视频应该是44,用于缩放视频应该是16,默认44.

寄存器地址:

MDET_0_GRID_XCNTAddress:0x810

MDET_1_GRID_XCNTAddress:0x910

MDET_2_GRID_XCNTAddress:0xA10

MDET_3_GRID_XCNTAddress:0xB10

MDET_4_GRID_XCNTAddress:0xC10

MDET_5_GRID_XCNTAddress:0xD10

MDET_6_GRID_XCNTAddress:0xE10

MDET_7_GRID_XCNTAddress:0xF10

注:每个寄存器间相差0x100,下面只写0的地址

MDET_[0-7]_GRID_YCNT:0x814

[7:0]grid_blk_ycnt à Height of block used in motion detection. Forunscaled NTSC this value is 20. For unscaled PAL this value is 24. For scaledvideo, this should be a multiple of 12:块的高度,用于未压缩视频应该是24,用于缩放视频应该是12,默认12.

                  

2.7.1.2 Programmable Detection Frequency:侦测频率

Motion detection and other analyticsperformed by this block are performed on frames separated by a particularnumber of frames. This parameter can be programmed using the skip_frm_cntregister field. The following registers define the detection frequency.

大致意思:运动检测和其他分析执行这一块进行帧分隔的一个特定数量的帧。这个参数可以被编程使用的skip_frm_cnt寄存器。下面的寄存器定义了侦测的频率

MDET_[0-7]_SKIP:0x80C

[12:8] skip_regionà Offsets the 16x12 grid from the left edge by theprogrammed number of pixels:向左边缘偏移16x 12块的像素数。

[7:0] skip_frm_cntà Specify number of frames to skip. The default value 0processes every frame:跳过指定数量的帧,默认0

 

2.7.1.3 Programmable Field Selection:现场可编程选择

The top_bot_field_sel register fieldindicates which fields can be used for motion detection, flat field detection,and constant frame detection. The supported modes are top field mode and bottomfield mode.

In top field mode, average lumacalculations and subsequent comparisons are only performed on top fields. Inbottom field mode, average luma calculations and subsequent comparisons areonly performed on bottom fields. The following registers program the field selectionfor motion detection.

大致意思:top_bot_field_sel寄存器可用于移动侦测,平常侦测和固定帧检测。它支持底场模式和顶场模式。

顶场模式中,平均亮度计算和随后的比较只在顶场执行,底场模式也一样。下面的寄存器配置了场选择。

MDET_[0-7]_CTRL:0x800

[0:0] ch_soft_rst —>Writea 1 to issue soft reset to channel. Self-Clearing:写1重置通道,自动清除。

[1:1] sram_rst—>写1重置读取的本地内存地址,必须在读内存之前完成。

[2:2] channel_en—>1使能这个通道,0不使能这个通道

[3:3] top_bot_field_se—>1选择顶场,0选择底场。

 

2.7.1.4 Programmable Motion Detection Threshold:可编程运动检测阈值

The motion detection threshold, mot_thresh,is an 8-bit programmable value used to determine the presence of motion. Thisvalue represents a minimum delta between scaled block average luma values toindicate motion within a block. The mot_numblk_det_thresh is an 8-bitprogrammable register field that controls how many blocks must detect motionbefore the frame comparison indicates motion detected to the host and externalinterrupt. The mot_numblk_det indicates the total number of blocks within the192 grid regions that have detected motion. The following registers define themotion detection thresholds.

大致意思:移动侦测阈值,mot_thresh,是一个8位可编程值用来决定移动。这个值表明块的最小亮度在平均亮度值之内就确定移动(似乎有点点问题,哎)。mot_numblk_det_thresh是一个8位的可编程寄存器场,它控制必须移动侦测前帧比较的数量,并报告主机和外部中断。mot_numblk_det寄存器表示192个块中总共移动的块数。下面的寄存器定义了移动侦测的阈值。

MDET_[0-7]_MOTION_THRESH :0x820    

[7:0] mot_thresh—>Motionsensitivity threshold:敏感度阈值

[15:8]mot_numblk_det_thresh—>Number of blocks required for still frame.:静止帧的块数

[23:16]still_frm_thresh—>Number of consecutive still frames required beforeinterrupt:中断前连续静止帧数

[31:24]still_numblk_det—>Number of blocks in the current field that meet stillframe detection criteria:当前场满足移动侦测标准块的数目。

 

2.7.1.6 Programmable Black and White Detection:可编程的黑色和白色的侦测

Black and White detection is performed oneach field/frame that is used for motion detection. In order to detect theBlack and White, the following thresholds and limits are used. For every pixelof the field indicated by the top_bot_field_sel register field of theMDET_[0-7]_CTRL register, if the luma value is less than the black threshold,the black detection counter will be incremented. If the luma value is greaterthan the white threshold, the white detection counter will be incremented. If,at the end of the field, the black detection counter is greater than the blackfield limit value, a black detection will be signaled for that channel. If, atthe end of the field, the white detection counter is greater than the whitefield limit value, a white detection will be signaled for that channel. Theblack and white detection counters will be reset before the beginning of thenext field for detection.

大致意思:黑色和白色侦测用于移动侦测的每个场/帧。下面的阈值和限制用于黑白侦测,每场的像素由top_bot_field_sel寄存器中的MDET_[0-7]_CTRL寄存器决定,假如亮度值小于黑色的阈值,黑色检测计数器将递增。如果亮度值大于白色亮度阈值,白色检测计数器将会递增。在尾场,如果黑色计数器大于黑色场限制值,这个通道将发送黑色检测信号。白色同样。白色和黑色计数器在下一场侦测时将重置。

MDET_[0-7]_BLACK_THRESH :0x828

[7:0]black_thresh—>Threshold for black pixel detection.Pixel must be less thanthis value to be considered “black”:黑色侦测像素阈值,像素必须小于“black”。

[31:8]black_pix_cnt_thresh—>Black frame detected if number of “black” pixels isgreater than this value:如果“black”个数大于此值则黑帧检测。

MDET_[0-7]_WHITE_THRESH:0x82C白色侦测,类似黑色。

 

2.7.1.7 Programmable Motion Detection Interrupt Mask:可编程移动侦测中断屏蔽

A motion detection interrupt mask registeris provided to enable/disable the different types of detection; i.e., whitedetection, black detection, still image detection, motion detection, and end offield detection.

大致意思:中断屏蔽寄存器用于控制不同类型的侦测。如黑/白侦测、静止图像检测以及尾场侦测等。

MDET_[0-7]_INTR_MSK:0x804

[0:0] eof_msk—>Endof field interrupt enable:尾场中断使能

[1:1] mot_det_msk—>Motiondetected interrupt enable:移动侦测中断使能

[2:2]no_mot_det_msk—>No Motion detected interrupt enable:无侦测中断使能

[3:3]black_det_msk —> Black detection Interrupt enable.:黑侦测中断使能

[4:4]white_det_msk —>White detection Interrupt enable:白侦测中断使能

注:初始化默认都为1,即都使能。

 

2.7.1.8 Programmable Motion Interrupt Status:可编程的移动中断状态

A 5-bit interrupt status register isprovided for each of the detection methods, i.e., white detection, blackdetection, still image detection, motion detection, and end of field detection.

大致意思:一个5位的中断状态寄存器提供给每一种检测方法。如黑/白侦测、静止图像检测以及尾场侦测等。

MDET_[0-7]_INTR_STAT:0x808

[4:4] white_det_stat—>White detection interrupt status. Write a 1 to clear.

[3:3]black_det_stat—>Black detection interrupt status. Write a 1 to clear.

[2:2]no_mot_det_stat —>No motion interrupt status. Write a 1 to clear.

[1:1] mot_det_stat—>Motion interrupt status. Write a 1 to clear.

[0:0] eof_stat —>Endof field interrupt status. Write a 1 to clear.:尾场中断状态,写1清零

 

2.7.1.9 Programmable Motion Detection Mask:可编程移动侦测掩码

A 192-bit register field is provided toprevent individual blocks from causing the motion detection counter fromincrementing. This will allow areas of the field to be masked off from motiondetection. This mask will not affect the incrementing of the constant framecounter. The mask is controlled by the following registers.

大致意思:提供一个192bit的寄存器来防止特定块造成的运动检测计数器递增。它将允许屏蔽场的区域,这不会影响不断帧计数器递增,由下面的寄存器控制。

MDET_[0-7]_MOT_MASK0:0x834

[31:0]mot_msk_31_0 —> Enable motion masking on a per block basis. Each frame isdivided into 192 blocks. There is one mask bit per block.:使能每一块运动屏蔽,每帧192块,每个块1bit。

MDET_[0-7]_MOT_MASK1:0x838

MDET_[0-7]_MOT_MASK2:0x83C

MDET_[0-7]_MOT_MASK3:0x840

MDET_[0-7]_MOT_MASK4:0x844

MDET_[0-7]_MOT_MASK5:0x848

注:初始化都为0xffffffff,6*32=192.

 

2.7.1.10 Programmable Motion Detection Status:可编程移动侦测状态

A 192-bit register field is provided toindicate that motion has been detected for each of the 192 blocks. The motiondetection block status is tracked by the following registers.

大致意思:提供一个192bit的寄存器来检测192块中每一块是否移动,侦测块的状态有下面的寄存器触发。

MDET_[0-7]_MOT_STAT0::0x84C

[31:0]mot_stat_31_0 —> Status of motion detection for each block in the frame. A 1indicates motion detected:每帧图像移动侦测的状态,1表示检测到移动。

MDET_[0-7]_MOT_STAT1 :0x850

MDET_[0-7]_MOT_STAT2 :0x854

MDET_[0-7]_MOT_STAT3 :0x858

MDET_[0-7]_MOT_STAT4 :0x85C

MDET_[0-7]_MOT_STAT5 :0x860

注:初始化都为0,6*32=192.只读。

因为是第一次一下子就翻译那么多,而且就一下午时间,所以,难免有失误,望提醒纠正。


人生中一次伟大的事情就是这样完成的!!!

                                                                          2012.12.13  18:08  黄敏强

1楼weihuanzhen_yeah_net3天前 17:41
貌似我用的3516的

热点排行