📄 vid_dct.mdl
字号:
}
}
Block {
BlockType Display
Name "Error"
Ports [1]
Position [730, 45, 820, 75]
ShowName off
Decimation "1"
}
Block {
BlockType SubSystem
Name "IDCT2D"
Ports [1, 1]
Position [445, 106, 495, 144]
ShowName off
TreatAsAtomicUnit off
MaskDisplay "disp('2D-IDCT')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "IDCT2D"
Location [401, 375, 883, 472]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [25, 38, 55, 52]
}
Block {
BlockType Reference
Name "Frame Status\nConversion"
Ports [1, 1]
Position [305, 27, 355, 63]
ShowName off
SourceBlock "dspsigattribs/Frame Status\nConversion"
SourceType "Frame Status Conversion"
growRefPort off
outframe "Sample-based"
}
Block {
BlockType Reference
Name "IDCT"
Ports [1, 1]
Position [80, 30, 120, 60]
ShowName off
SourceBlock "dspxfrm3/IDCT"
SourceType "IDCT"
CompMethod "Table lookup"
}
Block {
BlockType Reference
Name "IDCT1"
Ports [1, 1]
Position [235, 30, 275, 60]
ShowName off
SourceBlock "dspxfrm3/IDCT"
SourceType "IDCT"
CompMethod "Table lookup"
}
Block {
BlockType Reference
Name "Transpose1"
Ports [1, 1]
Position [165, 30, 195, 60]
ShowName off
SourceBlock "dspmtrx3/Transpose"
SourceType "Transpose"
Hermitian off
}
Block {
BlockType Outport
Name "Out1"
Position [385, 38, 415, 52]
}
Line {
SrcBlock "IDCT1"
SrcPort 1
DstBlock "Frame Status\nConversion"
DstPort 1
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "IDCT"
DstPort 1
}
Line {
SrcBlock "Transpose1"
SrcPort 1
DstBlock "IDCT1"
DstPort 1
}
Line {
SrcBlock "IDCT"
SrcPort 1
DstBlock "Transpose1"
DstPort 1
}
Line {
SrcBlock "Frame Status\nConversion"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
}
}
Block {
BlockType Reference
Name "Original"
Ports [1]
Position [145, 155, 195, 185]
SourceBlock "dspsnks4/Matrix\nViewer"
SourceType "Matrix Viewer"
ImageParams off
CMapStr "gray(256)"
YMin "0"
YMax "255"
AxisColorbar off
AxisParams off
AxisOrigin "Upper left corner"
XLabel "X-axis"
YLabel "Y-axis"
ZLabel "Z-axis"
FigPos "[18 381 304 245]"
AxisZoom on
}
Block {
BlockType Reference
Name "Reconstructed"
Ports [1]
Position [580, 108, 625, 142]
SourceBlock "dspsnks4/Matrix\nViewer"
SourceType "Matrix Viewer"
ImageParams off
CMapStr "gray(256)"
YMin "0"
YMax "255"
AxisColorbar off
AxisParams off
AxisOrigin "Upper left corner"
XLabel "X-axis"
YLabel "Y-axis"
ZLabel "Z-axis"
FigPos "[330 378 329 248]"
AxisZoom on
}
Block {
BlockType SubSystem
Name "Subsystem2"
Ports [1, 1]
Position [630, 40, 685, 80]
ShowName off
TreatAsAtomicUnit off
MaskDisplay "disp('Absolute\\nError')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
Port {
PortNumber 1
Name "Error"
TestPoint off
LinearAnalysisOutput off
LinearAnalysisInput off
RTWStorageClass "Auto"
DataLogging off
DataLoggingNameMode "SignalName"
DataLoggingDecimateData off
DataLoggingDecimation "2"
DataLoggingLimitDataPoints off
DataLoggingMaxPoints "5000"
}
System {
Name "Subsystem2"
Location [388, 220, 800, 309]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [25, 38, 55, 52]
}
Block {
BlockType Abs
Name "Abs"
Position [95, 32, 125, 58]
ShowName off
}
Block {
BlockType Gain
Name "Gain1"
Position [270, 32, 295, 58]
ShowName off
Gain "1/(128*128)"
}
Block {
BlockType Reference
Name "Reshape"
Ports [1, 1]
Position [155, 33, 185, 57]
ShowName off
SourceBlock "simulink/Math\nOperations/Reshape"
SourceType "Reshape"
OutputDimensionality "1-D array"
OutputDimensions "[1,1]"
}
Block {
BlockType Sum
Name "Sum"
Ports [1, 1]
Position [220, 35, 240, 55]
ShowName off
IconShape "round"
Inputs "1"
}
Block {
BlockType Outport
Name "Out1"
Position [315, 38, 345, 52]
}
Line {
SrcBlock "Abs"
SrcPort 1
DstBlock "Reshape"
DstPort 1
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Gain1"
DstPort 1
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "Abs"
DstPort 1
}
Line {
SrcBlock "Gain1"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "Reshape"
SrcPort 1
DstBlock "Sum"
DstPort 1
}
}
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [520, 50, 540, 70]
ShowName off
IconShape "round"
Inputs "|+-"
}
Block {
BlockType SubSystem
Name "Video Source"
Ports [0, 1]
Position [15, 37, 55, 83]
TreatAsAtomicUnit off
System {
Name "Video Source"
Location [43, 174, 483, 268]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType DataTypeConversion
Name "Data Type Conversion"
Position [305, 36, 360, 64]
ShowName off
DataType "single"
}
Block {
BlockType FromWorkspace
Name "From\nWorkspace"
Position [25, 38, 90, 62]
ShowName off
VariableName "vidR"
SampleTime "1/15"
Interpolate off
OutputAfterFinalValue "Cyclic repetition"
}
Block {
BlockType Reference
Name "Reshape"
Ports [1, 1]
Position [140, 38, 170, 62]
NamePlacement "alternate"
ShowName off
SourceBlock "simulink/Math\nOperations/Reshape"
SourceType "Reshape"
OutputDimensionality "Customize"
OutputDimensions "[240 320]"
}
Block {
BlockType Reference
Name "Submatrix1"
Ports [1, 1]
Position [205, 29, 250, 71]
ShowName off
SourceBlock "dspmtrx3/Submatrix"
SourceType "Submatrix"
RowSpan "Range of rows"
RowStartMode "Offset from middle"
RowStartIndex "-52"
RowEndMode "Offset from middle"
RowEndIndex "75"
ColSpan "Range of columns"
ColStartMode "Offset from middle"
ColStartIndex "-64"
ColEndMode "Offset from middle"
ColEndIndex "63"
}
Block {
BlockType Outport
Name "vid"
Position [385, 43, 415, 57]
}
Line {
SrcBlock "From\nWorkspace"
SrcPort 1
DstBlock "Reshape"
DstPort 1
}
Line {
SrcBlock "Submatrix1"
SrcPort 1
DstBlock "Data Type Conversion"
DstPort 1
}
Line {
SrcBlock "Reshape"
SrcPort 1
DstBlock "Submatrix1"
DstPort 1
}
Line {
SrcBlock "Data Type Conversion"
SrcPort 1
DstBlock "vid"
DstPort 1
}
}
}
Line {
SrcBlock "DCT2D"
SrcPort 1
DstBlock "Dead Zone"
DstPort 1
}
Line {
SrcBlock "IDCT2D"
SrcPort 1
Points [0, 0; 30, 0]
Branch {
DstBlock "Sum"
DstPort 2
}
Branch {
DstBlock "Reconstructed"
DstPort 1
}
}
Line {
SrcBlock "Dead Zone"
SrcPort 1
DstBlock "IDCT2D"
DstPort 1
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Subsystem2"
DstPort 1
}
Line {
Name "Error"
Labels [0, 0]
SrcBlock "Subsystem2"
SrcPort 1
DstBlock "Error"
DstPort 1
}
Line {
SrcBlock "Video Source"
SrcPort 1
Points [30, 0]
Branch {
DstBlock "Sum"
DstPort 1
}
Branch {
Points [0, 65; 0, 0]
Branch {
DstBlock "DCT2D"
DstPort 1
}
Branch {
Points [0, 45]
DstBlock "Original"
DstPort 1
}
}
}
Annotation {
Name "DCT-based Video\nCompression Demo"
Position [291, 26]
ForegroundColor "blue"
FontSize 14
FontWeight "bold"
}
Annotation {
Name "Adjust Threshold setting in Dead Zone block\nwh"
"ile simulation runs to change compression\n0: No compression\n40: ~95% compre"
"ssion\n512: Handful of non-zero coeffs left"
Position [364, 199]
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -