專利名稱:媒體重放設備中使用的膠片顆粒仿真技術的制作方法
技術領域:
本發(fā)明涉及一種用于在圖像中仿真膠片顆粒的技術,更具體地,涉及一種用于在媒體設備重放的圖像中仿真膠片顆粒的技術。
背景技術:
電影膠片包括分散在感光乳劑中的鹵化銀晶體,所述感光乳劑涂抹在膠片基底上 的薄層中。這些晶體的曝光和顯影形成了包括銀的分散微粒的照相圖像。在彩色負片中, 在顯影后對銀進行化學去除,在形成銀晶體的位置處出現(xiàn)微小的染料滴。這些染料小滴通 常被稱作彩色膠片中的‘顆?!?。由于銀晶體隨機地形成于原始感光乳劑中,所以顆粒隨機 地分布在所產(chǎn)生的圖像上。在均勻曝光的區(qū)域中,一些晶體在曝光后顯影,而其它晶體并非 如此。顆粒的大小和形狀有所不同。膠片形成越快,所形成的銀塊和所產(chǎn)生的染料滴就 越大,并且更趨于以隨機圖案組合在一起。典型地,顆粒圖案被稱作‘顆粒度’。裸眼不能區(qū) 分變化范圍在0. 0002mm至大約0. 002mm的單個顆粒。然而,眼睛能夠分辨被稱作滴的顆粒 組。觀看者把這些滴的組識別為膠片顆粒。隨著圖像分辨率變得更大,對膠片顆粒的感知 變得更高。膠片顆粒在電影圖像和高清晰度圖像上變得明顯可察覺,而膠片顆粒在SDTV中 逐漸喪失了重要性,并在較小格式中變得不可察覺。典型地,電影膠片包含依賴于圖像的噪聲,這個噪聲來自照相膠片的曝光和顯影 的物理工藝、或來自后續(xù)的圖像編輯。照相膠片具有特有的準隨機圖案或紋理,這個圖案或 紋理來自照相感光乳劑的物理顆粒度??蛇x擇地,可以根據(jù)計算產(chǎn)生的圖像仿真類似的圖 案,以便把這些圖案與照相膠片相混合。在這兩種情況下,這個依賴于圖像的噪聲被稱作顆 粒。通常,適度的顆粒紋理在電影中呈現(xiàn)出期望的特征。在某些實例中,膠片顆粒提供了利 于二維圖像的正確感知的可視提示。膠片顆粒通常在單一膠片中變化,以提供關于時間參 考、視點等的多種線索。在電影業(yè)中,存在用于控制顆粒紋理的多種其它的技術和藝術用 途。因此,在圖像處理和傳送鏈中保持圖像的顆粒外觀已經(jīng)成為電影業(yè)中的需求。若干商業(yè)上可用的產(chǎn)品具有對膠片顆粒進行仿真的能力,通常用于把計算機產(chǎn)生 的對象混合到自然場景中。來自Eastman Kodak Co,Rochester New York的Cineon :是 一種最早的數(shù)字膠片應用程序,用于實現(xiàn)顆粒仿真,它產(chǎn)生了多種顆粒類型的非常真實的 結果。然而,由于Gineon 應用程序針對高顆粒尺寸設置產(chǎn)生了可察覺的對角線條紋,所以Cineon 應用程序沒有為多種高速膠片產(chǎn)生良好的性能。此外,當對圖像進行前期處理時, 例如圖像被復制或進行數(shù)字處理時,Cineon 應用程序不能以足夠的保真度來仿真顆粒。另一個商業(yè)上可用的、對膠片顆粒進行仿真的產(chǎn)品是來自VisualInfinity Inc的 Grain Surgery ,它用作Adobe After Effects 的插件。Grain Surgery 產(chǎn)品通過對隨機數(shù)的集合進行濾波而產(chǎn)生合成的顆粒。這個方 法受到高計算復雜度這個缺點的影響。這些已有的方案中沒有一個方案能夠解決對壓縮視頻中的膠片顆粒進行恢復的 問題。膠片顆粒構成了高頻準隨機現(xiàn)象,典型地不能進行使用常規(guī)空間和時間方法的壓縮, 其中所述方法利用了視頻序列冗余的優(yōu)點。試圖使用MPEG-2或ITU-T/IS0 H. 264壓縮技 術來處理源自膠片的圖像,通常這會導致不可接受的低壓縮度或顆粒紋理的完全丟失。因此,存在對用于在媒體播放器重放的圖像中仿真膠片顆粒的技術的需求
發(fā)明內容
簡要地,根據(jù)本發(fā)明,提供了一種用于仿真膠片顆粒塊以便添加到圖像塊的方法, 用于確保正常和特效(trick)播放模式下在圖像重放期間的比特精確性。所述方法從至少 部分地根據(jù)塊屬性而建立至少一個參數(shù)開始。之后,根據(jù)所述至少一個參數(shù),以比特精度來 建立至少一個膠片顆粒塊。
圖1示出了膠片顆粒處理鏈中發(fā)射機和接收機的組合的示意框圖,用于實踐本發(fā) 明的技術;圖2示出了根據(jù)本發(fā)明的膠片顆粒仿真系統(tǒng)的示意框圖;圖3示出了用于產(chǎn)生模2本原多項式的移位寄存器的框圖,用于根據(jù)圖2的方法 對膠片顆粒進行仿真;以及圖4是一個像素格柵,它示出了在根據(jù)圖2的方法產(chǎn)生膠片顆粒時隨機數(shù)的使用。
具體實施例方式為了理解用于對包括單獨膠片顆粒塊的比特精確的膠片顆粒圖案進行仿真的本 發(fā)明的技術,對膠片顆粒仿真的簡要概述將是有益的。圖1示出了發(fā)射機10的示意框圖, 它接收輸入視頻信號并相應地在其輸出產(chǎn)生壓縮后的視頻流。另外,發(fā)射機10還產(chǎn)生指示 樣本中出現(xiàn)膠片顆粒(如果存在的話)的信息。實際中,發(fā)射機10可以包括有線電視系統(tǒng) 的首端陣列的一部分、或把壓縮后的視頻分配給一個或多個下游接收機11的其它系統(tǒng),圖 1中僅示出一個接收機11。發(fā)射機10還可以采取例如DVD 12的呈現(xiàn)媒體的編碼器的形式。 接收機11對已編碼的視頻流進行解碼,并根據(jù)膠片顆粒信息和已解碼的視頻(兩者均從發(fā) 射機10接收,或如果是DVD等則直接從媒體自身接收)來仿真膠片顆粒,從而產(chǎn)生具有已 仿真膠片顆粒的輸出視頻流。接收機11可以采取機頂盒的形式、或采取對已壓縮的視頻進 行解碼并在該視頻中仿真膠片顆粒的其它機制的形式。具體地,接收機11可以采取具有如 下能力的DVD再現(xiàn)設備的形式對用于重放的圖像進行解碼、把膠片顆?;烊朐搱D像、以及 以正常和特效播放速度來重放該圖像。
膠片顆粒的整體管理要求發(fā)射機10(即編碼器)提供關于輸入視頻中的膠片顆粒 的信息。換句話說,發(fā)射機10對膠片顆?!敖!?。此外,接收機11(即解碼器)根據(jù)從發(fā)射 機10接收到的膠片顆粒信息來仿真膠片顆粒。通過使接收機11能夠在視頻編碼過程期間 在難以保持膠片顆粒時在視頻信號中仿真膠片顆粒,發(fā)射機10提高了壓縮后視頻的品質。在圖1所示的實施例中,發(fā)射機10包括視頻編碼器13,視頻編碼器13使用任意已 知的視頻壓縮技術對視頻流進行編碼,例如ITU-TRec. H. 264 | IS0/IEC 14496-10視頻壓縮 標準??蛇x地,采用圖1中虛線所示濾波器等的形式的膠片顆粒去除器14可以存在于編碼 器13的上游,以便在編碼之前去除輸入視頻流中的任意膠片顆粒。當輸入視頻不包含膠片 顆粒時,不需要膠片顆粒去除器14。膠片顆粒建模器16接受輸入視頻流和膠片顆粒去除器14的輸出信號(當存在 時)。使用這個輸入信息,膠片顆粒建模器16在輸入視頻信號中建立膠片顆粒。以最簡單 的形式,膠片顆粒建模器16可以包括查找表,所述查找表包含不同膠片原料的膠片顆粒模 型。輸入視頻信號中的信息可以規(guī)定在轉換為視頻信號前最初用于記錄圖像的具體膠片原 料,從而允許膠片顆粒建模器16針對這個膠片原料選擇適合的膠片顆粒模型??蛇x擇地, 如下文所述,膠片顆粒建模器16可以包括處理器或專用邏輯電路,它們執(zhí)行一個或多個算 法以對輸入視頻進行采樣并確定所呈現(xiàn)的膠片顆粒圖案。
典型地,接收機11包括視頻解碼器18,用于對從發(fā)射機10接收到的壓縮后的視頻 流進行解碼。解碼器18的結構將取決于發(fā)射機10內的編碼器13所執(zhí)行的壓縮類型。因 此,例如在發(fā)射機10內使用采用ITU-TRec. H. 264| IS0/IEC 14496-10視頻壓縮標準來壓縮 輸出視頻的編碼器13,這表示需要與H. 264兼容的解碼器18。在接收機11內,膠片顆粒仿 真器20從膠片顆粒建模器16接收膠片顆粒信息。膠片顆粒仿真器20可以采取具有對膠 片顆粒進行仿真的能力的已編程處理器或專用邏輯電路的形式,從而使膠片顆粒通過組合 器22與已解碼的視頻流進行組合。膠片顆粒仿真旨在把對原始膠片內容的外觀進行仿真的膠片顆粒樣本進行合成。 如上所述,膠片顆粒建模發(fā)生在圖1的發(fā)射機10中,而膠片顆粒仿真發(fā)生在接收機11中。 具體地,在解碼視頻流的輸出的上游,膠片顆粒仿真與來自發(fā)射機10的輸入視頻流的解碼 一同在接收機11中發(fā)生。注意,出現(xiàn)在接收機11中的解碼過程不會使用具有附加膠片顆 粒的圖像。相反,膠片顆粒仿真組成了用于在已解碼圖像中合成仿真的膠片顆粒以進行顯 示的后處理方法。為此,ITU-TRec. H. 264 IIS0/IEC 14496-10視頻壓縮標準不包含關于膠 片顆粒仿真過程的說明。然而,膠片顆粒仿真需要與輸入視頻信號中的顆粒圖案有關的信 息,當按照ITU-T Rec. H. 264| IS0/IEC 14496-10視頻壓縮標準的修正1 (保真度范圍擴展) 所規(guī)定的而使用該壓縮標準時,這個信息典型地在膠片顆粒特征補充增強信息(SEI)消息 中傳送。本發(fā)明的膠片顆粒仿真技術實現(xiàn)了比特精確的膠片顆粒仿真,且可以應用于例如 HD DVD播放機的消費產(chǎn)品。其它潛在的應用可能包括機頂盒、電視機、甚至是例如可攜式 攝像機的記錄設備等。這個仿真技術規(guī)范遵從ITU-T Rec. H. 264|lS0/IEC 14496-10標準。 在視頻比特流的解碼之后以及像素顯示之前執(zhí)行膠片顆粒仿真。膠片顆粒仿真過程要求對 膠片顆粒補充信息進行解碼,該信息最終在ITU-TRec. H. 264 | IS0/IEC 14496-10標準[1] 的修正1 (保真度范圍擴展)所規(guī)定的膠片顆粒特性SEI消息中傳送。提供影響膠片顆粒特性SEI消息的規(guī)范,以確保所述技術滿足在品質和復雜度方面的高清晰度系統(tǒng)的要求。膠片顆粒特性SEI消息規(guī)范如上所述,膠片顆粒特性出現(xiàn)在伴隨著圖像的ITU-TRec. H. 264 | IS0/IEC 14496-10膠片顆粒特性SEI消息中。膠片顆粒特性消息中的參數(shù)值被約束如下model_id規(guī)定了仿真模型。在所示實施例中,該值等于0,表示膠片顆粒仿真模型 是頻率濾波。separate_colour_description_present_flag 規(guī)定了對膠片顆粒參數(shù)進行估計 的顏色空間是否與對視頻序列進行編碼的顏色空間不同。在所示實施例中,該值等于0,表 示用于膠片顆粒仿真的顏色空間與用于編碼的顏色空間相同。blendingjiiodejd規(guī)定了用于把所仿真的膠片顆粒與已解碼的圖像進行混合的 混合模式。在所示實施例中,該值等于0,對應于加法混合模式。
log2_scale_factor規(guī)定了用于表現(xiàn)SEI消息中的膠片顆粒參數(shù)的對數(shù)縮放因 數(shù)。在所示實施例中,該值處于范圍[2,7]中,以確保能夠使用16比特運算來執(zhí)行膠片顆 粒仿真。intensity_interval_lower_bound[c] [i]禾口 intensitv_interval_upper_ bound[c] [i]規(guī)定了對膠片顆粒參數(shù)進行建模的顏色分量c的強度間隔i的界限。對于所 有的c和任意的強度值v,由于不允許多次生成的(multi-generational)膠片顆粒,所以存 在滿足 intensity_interval_lower_bound[c] [i] < = ν 以及 intensity_interval_upper_ bound[c] [i] >= ν的單一的強度間隔i。num_model_values_minusl [c]規(guī)定了顏色分量c的每一個強度間隔中出現(xiàn)的模 型值的個數(shù)。對于所有的c,該值處于范圍W,2]中,它規(guī)定了不支持帶通濾波和相交顏色 相關。comp_model_value[c] [i]
規(guī)定了顏色分量c和強度間隔i的膠片顆粒強度。 對于所有的c和i,該值處于范圍
中,以確保能夠使用16比特運算來執(zhí)行膠片顆粒仿真。comp_model_value[c] [i] [1]規(guī)定了描述顏色分量c和強度間隔i的膠片顆粒形 狀的特征的水平高截頻。對于所有的c和i,該值處于范圍[2,14]中,它包括所有需要的顆 粒圖案。comp_model_value[c] [i] [2]規(guī)定了描述顏色分量c和強度間隔i的膠片顆粒形 狀的特征的垂直高截頻。對于所有的c和i,該值處于范圍[2,14]中,它包括所有需要的顆 粒圖案。film_grain_characteristics_repetition_period 指示另一個膠片顆粒特性 SEI消息是否應當出現(xiàn)在比特流中,并且規(guī)定了另一個膠片顆粒特性SEI消息將會出現(xiàn)時 的圖像順序數(shù)目間隔。在所示實施例中,該值等于0,以規(guī)定膠片顆粒特性SEI消息僅應用 于當前的已解碼圖像。根據(jù)本發(fā)明,膠片顆粒特性SEI消息必須出現(xiàn)在要求插入膠片顆粒的所有圖像之 前。這個方法確保了例如DVD播放機等的媒體再現(xiàn)設備的特效播放模式和常規(guī)播放模式下 的比特精確性,并允許按照解碼順序和顯示順序插入比特精確的膠片顆粒,前提是使用比 特精確的技術來執(zhí)行膠片顆粒仿真。
把所有顏色分量c和強度間隔組合到SEI消息中,不同對(compjiiodelvalue [c] [i] [1], comp_model_value[c] [i] [2])的個數(shù)不能超過 10。根據(jù)本發(fā)明,ITU-T Rec. H. 264| IS0/IEC 14496-10標準所規(guī)定的膠片顆粒特性SEI消息中所有其它參數(shù)都沒有約
束ο比特精確的膠片顆粒仿真除非參數(shù) film_grain_characteristics_cancel_flag 為 1,否則在當前圖像中執(zhí) 行膠片顆粒仿真。當前的ITU-T Rec. H. 264 | IS0/IEC 14496-10視頻壓縮標準規(guī)范允許在所 有顏色分量中執(zhí)行膠片顆粒仿真。如果膠片顆粒特性SEI消息中的C0mp_m0del_present_ flag[c]等于1,則執(zhí)行膠片顆粒仿真并把仿真的膠片顆粒添加到已解碼圖像的顏色分量 c。根據(jù)本發(fā)明,通過首先規(guī)定膠片顆粒圖案數(shù)據(jù)庫而執(zhí)行比特精確的膠片顆粒仿真。之后, 使用均勻偽隨機數(shù)發(fā)生器執(zhí)行膠片顆粒圖案的偽隨機選擇。然后對所選擇的圖案進行一系 列精確的操作。典型地,針對每一個顏色分量獨立地執(zhí)行膠片顆粒仿真。 膠片顆粒仿真操作序列圖2示出了用于進行仿真并把膠片顆粒添加到已解碼圖像而執(zhí)行的操作序列。通 過把c設置為0、1或2,把仿真過程細分為針對三原色中特定一個顏色的仿真過程。在所示 實施例中,膠片顆粒仿真以光柵掃描順序而執(zhí)行,其中塊大小為8X8像素,但其它實施方 式也是可能的。所述操作序列從執(zhí)行步驟100開始,以建立膠片顆粒參數(shù)。針對所仿真膠片顆粒 建立膠片顆粒參數(shù)的過程的一部分包括提取源自DVD12再現(xiàn)時的、或源自機頂盒200的 輸入視頻信號所攜帶的膠片顆粒信息。利用使用ITU-T Rec. H. 264|lS0/IEC 14496-10視 頻編碼標準進行編碼的輸入視頻信號,膠片顆粒信息將會在SEI消息中出現(xiàn)。提取SEI消 息需要使用圖2中所示的H. 264 IMPEG-4AVC兼容解碼器101對輸入的H. 264編碼輸入視頻 信號進行解碼。實際中,解碼器101可以存在于機頂盒200或用于在DVD 12上再現(xiàn)信息的 DVD播放機中。SEI消息包含若干參數(shù),包括intensity_interval_lower_bound[c] [i]禾口 intensity_interval_upper_ bound[c] [i]i Willll^/Λ 0num_intensity_intervals_minusl [c]白勺{t。 $ 解碼器101執(zhí)行解碼后,把這些SEI消息參數(shù)與針對顯示緩沖器102中存儲的已解碼圖像 中每一個非重疊的8X8像素塊的顏色分量c而計算的平均像素強度進行比較。對于來自已解碼圖像的顏色分量c的每一個非重疊8 X 8像素塊來說,以如下方式 在步驟103中計算平均值avg = 0for(k = 0 ;k < 8 ;k++)for(l = 0 ;1 < 8 ;1++)avg+ = decoded_picture[c][m+k][n+1]avg = (avg+32) >>6其中(m,n)是塊的左上方坐標,而decoded_picture [c] [m+k] [n+1]是顏色分量c的坐標(m+k,n+l)處的已解碼像素值。針對從0 至 num_intensity_intervals_minusl [c]的 i 值,把平均值與 SEI 消息參數(shù) intensity_interval_lower_bound[c] [i]禾口 intensity_interval_upper_bound[c] [i]進行比較。與大于或等于intensity_interval_lower_bound[c] [i]且小于或等于 intensity_interval_upper_bound[c] [i]的塊平均值相對應的i值(由s表示)用于為步 驟100中建立的當前塊選擇膠片顆粒參數(shù)。如果不存在滿足先前條件的值,則不會對當前 塊執(zhí)行膠片顆粒仿真。在這種情況下,不會執(zhí)行在下文所述的步驟104中的膠片顆粒塊的 創(chuàng)建過程。在這個情況下,下文所述的解塊步驟108接收其所有像素都等于0的8X8塊作 為輸入。在所示實施例中,SEI消息包含描述了二維濾波器屬性的水平高截頻和垂直高截 頻(有時被稱作截止頻率),所述濾波器描述了期望膠片顆粒圖案的特征。按照如下方式對 SEI消息中出現(xiàn)的色度分量(C = 1,2)(以4:4:4的色度格式出現(xiàn)時)的截頻進行縮放,以 適合于4:2:0的色度格式comp_model_value [c] [s] [1] = Clip (2,14,(comp_model_value [c] [s] [1] << 1))comp_model_value [c] [s] [2] = Clip (2,14,(comp_model_value [c] [s] [2] << 1))
步驟104啟動膠片顆粒塊的建立過程,膠片顆粒塊典型地但不必然具有8 X 8像素 的大小。建立8X8像素的膠片顆粒塊的步驟包括從膠片顆粒數(shù)據(jù)庫105獲取具有8X8 膠片顆粒樣本的塊,以及把所述樣本縮放至適當?shù)膹姸?。縮放是期望但非必須的。典型地, 數(shù)據(jù)庫105包括169個具有4096個膠片顆粒樣本的圖案,每一個圖案表示64X64膠片顆 粒圖案。數(shù)據(jù)庫105以2進制補碼的形式存儲從-127至127的值。典型地,使用特定的一 對截頻對每一個膠片顆粒圖案進行合成,所述一對截頻建立了定義膠片顆粒圖案的二維濾 波器。在SEI消息中傳送的截頻使得能夠在膠片顆粒仿真期間訪問具有膠片顆粒圖案的數(shù) 據(jù)庫105。創(chuàng)建具有8 X 8像素的膠片顆粒塊不僅包括從數(shù)據(jù)庫中檢索具有8 X 8膠片顆粒樣 本的塊,而且還包括把這些樣本縮放至適合的強度。截頻C0mp_m0del_value[C][S][l]和 comp_model_value[c] [s] [2]確定了數(shù)據(jù)庫中哪個圖案用作膠片顆粒樣本的來源,并且兩 個隨機產(chǎn)生的值從哪個圖案中選擇8X8的塊。這些隨機值表示64X64像素圖案中的水平 和垂直偏移,并使用如下過程來創(chuàng)建k_offset = (MSB16 (χ (r, ec)) % 52)k_offset& = OxFFFCk_offset+ = m&0x0008l_offset = (LSB16 (x (r, ec)) % 56)l_offset& = 0xFFFC8l_offset+ = n&0x0008其中x(r,ec)指示當利用種子e。來啟動圖3中所示的隨機數(shù)發(fā)生器114時,由該 隨機數(shù)發(fā)生器產(chǎn)生的偽隨機數(shù)序列X中的第r個符號。如圖3所示,隨機數(shù)發(fā)生器114包 括32比特移位寄存器,其最高有效16比特和最低有效16比特構成了上面出現(xiàn)的值MSB16 和LSB16。(m,η)是已解碼圖像中當前的8X8塊的坐標。對于k_offset,第一個等式產(chǎn)生 了均勻分布在范圍W,51]中的偽隨機值,第二個等式把該值限制為4的倍數(shù),而最后第一等式在16等于8時把k_offset加上8。針對l_offset執(zhí)行等效的操作。實際中,圖3中的偽隨機數(shù)發(fā)生器114利用模2本原多項式算符x31+x3+l以及32 比特移位寄存器來隨機地從數(shù)據(jù)庫105中存儲的具有64X64像素的膠片顆粒圖案中選擇 具有8X8像素的膠片顆粒塊。在所示實施例中,根據(jù)下面的等式對偽隨機數(shù)發(fā)生器114的 種子進行初始化ec = Seed_LUT [ (ABS (POC) +idr_pic_id < < 5+offset [c]) % 173]其中ABS (·)表示絕對值POC是當前圖像的圖像順序數(shù)目,它應當從ITU-TRec. H. 264|lS0/IEC 14496-10 標準所規(guī)定的視頻流中導出;以及idr_pic_id 應當從 ITU-T Rec. H. 264 | IS0/IEC 14496-10 視頻流的片頭中讀出, 以便對IDR圖像進行識別。為了確保適合的膠片顆粒仿真,HD DVD系統(tǒng)規(guī)范規(guī)定idr_pic_id針對每一個已 編碼的IDR而改變;然而offset [3] = {0,58,115}為每一個顏色分量提供了不同的偏移; 而SeecLLUT出現(xiàn)在附件A的子條款A. 3中。在暫停期間,把偽隨機數(shù)發(fā)生器114的種子初 始化為圖像開始處的相同值??蛇x擇地,可以按照如下方式對種子進行初始化ec = Seed_LUT [ (PicOrderCnt+PicOrderCnt_off set <<5+color_offset [c]) % 256]其中color_offset [3] = {0,85,170}而 Seed_LUT 包含 256 個值而不是 173 個。每經(jīng)過16個像素(水平地)和16行(垂直地),就對通過圖3中的偽隨機數(shù)發(fā)生 器114所創(chuàng)建的偽隨機值x(r,ec)進行更新。已解碼圖像中每一個具有16X 16像素的非 重疊區(qū)域使用相同的偽隨機數(shù)x(r,e。)。如圖4所示,所產(chǎn)生的偽隨機值X(r,e。)的序列遵 循16X 16像素格柵上的光柵掃描順序,因此實現(xiàn)了先前討論的對具有8X8像素的塊進行 光柵掃描排序。在所示實施例中,作為膠片顆粒塊創(chuàng)建步驟104的一部分,在計算隨機偏移后,按 照如下方式對從數(shù)據(jù)庫中提取出的64個膠片顆粒值進行縮放scale_factor = (BIT0 (χ (r, ej) == 0) ? comp_model_value [c] [s]_comp_model_value [c] [s]
scale_factor >>= (c = = 0) ? 0:1for(k = 0 ;k < 8 ;k++)for(l = 0 ;1 < 8 ;1++) {g = scale—factor氺database[h][v][k+k_offset][l+l_offset]film_grain_block[k] [1] = (((g+2i。成—咖ιwh) > > log2_scale_ factor) +32) >>6}其中 h 等于 comp_model_value[c] [s] [1]_2, ν 等于 comp_model_value[c] [s] [2] -2,因數(shù)6對附件A的附錄Α. 3中提供的膠片顆粒值進行縮放,BIT0表示LSB。在步驟108中進行解塊,其中在相鄰的膠片顆粒塊之間施加解塊濾波器(未示 出),以確保膠片顆粒圖案的無縫形成。在所示實施例中,解塊濾波器僅施加到相鄰塊之間的垂直邊沿。假定以光柵掃描順序對膠片顆粒塊進行仿真,而且current_fg_bl0ck中最左 邊的像素與preVi0US_fg_bl0Ck中最右邊的像素相鄰,則按照如下方式借助于3抽頭濾波 器執(zhí)行解塊濾波for(k = 0 ;k < 8 ;k++) {11 = previous_fg_block[6][k]10 = previous_fg_block[7][k]rO = current_fg_block
[k]rl = current_fg_b1ock[1][k]current_fg_block
[k] = (10+(rO << l)+rl+2) >>2previous_fg_block[7] [k] = (11+(10 << l)+r0+2) >>2}在膠片顆粒仿真過程結束時,通過混合塊110把已解塊的膠片顆粒塊與相應的已 解碼圖像塊進行混合,產(chǎn)生的結果在顯示之前被剪輯至W,255]for (k = 0 ;k < 8 ;k++)for(l = 0 ;1 < 8 ;1++)display—picture[c][m+k][n+1] = Clip (0,255,decoded_picture[c] [m+k] [n+1] +fg_block[k] [1])其中(m,n)是塊的左上方坐標,decoded_picture [c] [m+k] [n+1]是顏色分量c中 在坐標(m+k,n+l)處的已解碼像素值,而display_picture[c] [m+k] [n+1]是相同坐標處的 視頻輸出。開關元件111在控制元件112的控制下控制已解塊的膠片顆粒塊至塊100 的通路??刂圃?12響應于以下內容來控制開關元件SEI消息參數(shù)film_grain_ characteristics_cancel_flag 是否等于 1、或是否已經(jīng)超出參數(shù) film_grain_ characteristics_i^petition_period所規(guī)定的幀范圍,這指示了是否應當按照上文所述 而執(zhí)行膠片顆粒仿真。盡管與機頂盒200分開地示出,然而包括步驟100、103、104、108的整個過程以及 元件101、102、105、106、109、111和112可以容易地存在于機頂盒中。這對于用于在DVD 12 上再現(xiàn)內容的DVD播放機(未示出)也一樣。附件A通過存儲預計算的數(shù)值列表或通過在初始化過程中計算數(shù)值,可以實現(xiàn)對膠片顆 粒圖案數(shù)據(jù)105的比特精確的表示。數(shù)據(jù)庫創(chuàng)建過程可以通過提供如下內容而執(zhí)行數(shù)據(jù)庫105的比特精確的創(chuàng)建(1)具有高斯隨機數(shù)的LUT ; (2)例如發(fā)生器106的均勻偽隨機數(shù)發(fā)生器,整型變換;也可以通過執(zhí)行下文所 述的一系列操作而執(zhí)行數(shù)據(jù)庫105的比特精確的創(chuàng)建。創(chuàng)建具有水平截頻h+2和垂直截頻 v+2的64X64膠片顆粒圖案,產(chǎn)生以database[h] [ν]表示的數(shù)據(jù)庫。這個數(shù)據(jù)庫創(chuàng)建過程 要求創(chuàng)建database [h] [ν]中所有可能的圖案,其中h和ν的范圍是從0至12。為了形成單獨的64X64塊圖像,從具有高斯隨機數(shù)的LUT中讀取至多4096個值。附錄Α. 3中提供的具有高斯隨機數(shù)的LUT包括2048個值,每一個值都以2進制補碼的形式 存儲且范圍從-127至127。部分2中定義的均勻偽隨機數(shù)發(fā)生器(PRNG)用于隨機地訪問 具有高斯隨機數(shù)的LUT。在初始化步驟,應當把64X64塊圖像的值設置為0,并按照如下方式對PRNG的種 子進行初始化ehv = Seed_LUT[h+v*13](A-I)按照如下方式創(chuàng)建64X64的塊圖像fh = ((h+3) << 2)-1fv = ((v+3) << 2)-1for(l = 0, r = 0, 1 < = fv ;1++)for (k = 0 ;k < = fh ;k+ = 4) {B[k] [1] = Gaussian_LUT[x(r, ehv) % 2048]B[k+1] [1] = Gaussian_LUT[x(r, ehv+l) % 2048](A_2)B[k+2] [1] = Gaussian_LUT[x(r, ehv+2) % 2048]B[k+3] [1] = Gaussian_LUT[x(r, ehv+3) % 2048]r++}B
= 0其中x(r,ehv)是在以種子ehv初始化的多項式χ迭代r次創(chuàng)建的偽隨機值。計算64 X 64逆整型變換64X64系數(shù)矩陣的逆變換將會產(chǎn)生膠片顆粒database[h] [ν]。按照如下方式計 算逆變換database[h] [ν] = (((R64TXB+128)))8) XR64+128) >> 8對水平的8 X 8塊邊沿進行解塊64X64膠片顆粒圖案的創(chuàng)建過程的最后步驟包括對水平的8X8塊邊沿進行解 塊。通過根據(jù)下式削減像素值而執(zhí)行解塊for(l = 0 ;1 < 64 ;1+ = 8) {for(k = 0 ;k < 64 ;k++) {database[h][ν][k][1] = (database[h][ν][k][1]*deblock_factor[ν])>>7database [h] [v] [k] [1+7]=(database[h] [v] [k] [1+7]*deblock_factor[v]) >> 7}}其中針對優(yōu)選實施例把debl0Ck_faCt0r[v]定義為deblock_factor[v] = {66,71,77,84,90,96,103,109,116,122,128,128,128}上文描述了一種用于在圖像中仿真膠片顆粒的技術, 更具體地是一種用于在媒體設備重放的圖像中仿真膠片顆粒的技術。附錄A-Gaussian_LUT[2048] = {
0xF5,OxOB,0x67,0xF5,0x29,OxDE,OxOC,0x3B,0x4D,0x61,OxAA,0x03,0x41, 0xB2,0x2D,0x37,OxCE,0x15,OxOD,0xF6,0xEC,0xEE,0x21,0x81,OxlO,0xFB,0x97,0x12,0x13, 0x46,0x2F,0xF6,OxDA,0x2A,OxFE,0x4A,OxBD,0x34,0xA6,0x21,0xD2,0x14,OxFE,0xC9,0x31, 0x00,0xC7,0xD7,0x00,0x78,0x81,0x95,OxDO,0x09,OxOE,0x7F,0x7A,0x6C,0x33,0x7F,0x01, 0x06,0x71,0x13,OxlD,OxOC,0x4C,0x70,0x51,0xC3,0x81,0x6F,OxCD,0xE3,0x02,OxCF,0xE9, 0x3A,0xE4,0xB7,OxOB,0x70,0x42, 0x4E, OxFE,0x8E,0xA9,OxFB,O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,OxAC,0x7F,0x43, 0x2D,0xll,0x2F};A. 2. 2PRNG種子的查找表Seed_LUT[173]={1,207848544,1756511882,930434649,763249220,575194890,947173707,1920384370,447133882,1339935731,1377796300,271174457,1198069869,1661621657, 17439B6060,2077926481,1331742148,786140364,1525112071,1771594297,1242061040,192056172, 2018356587,166385984,21118553, 1721162627,993618401,953874363,156353104,1884552607, 712894377,
965972274,2058965522,288658836,1626536144,1501102010,301172797,447403389, 1040582505,1522100413,870342432,1775643800,1221041362,1779102756,1180374639,852637658, 154216717 6,1149026881,100447073,926671075,1933929005,542294649,1011053571,1671222556, 1429688165,1891395211,2055647522,22995785,1442532213,675966795,1703505481,2013843651, 1671669678,1085040259,430705574,2130376611,1261527Β26,15976504,2011754792, 216863804, 2105395052,1127940,1783279601,1602691796,1505476467,1408080649,180336353,1381547875, 339789689,965351473,427101312,902100963,744024896,1284331604,1241185038,1426959894, 2000290842,1266758843,18789461,1665712481,264198500,1301146210,1273389250,794389433, 2049226913,1879367632,1300700193,212009030,1957319695,637701834,482780409,1365890669, 1376040417,1512315348,1024598031,1844999775,1933157338,1643399146,276675769,1707241504,1016480493,1361917086,1730782380,1621217915,1585942753,1325639711,275717433,1581177009, 509579973,1040197139,519836363,1962657404, 1906334341,723415919,1151165652,1369484037, 915816613,582076062,47146038,182628210,1964983821,1885918321,370125606,534524292, 2051583970,1032364471,
1972079688,2047231194,563260760,1594071307,1354079352,2002807836, 632717840,992281895,1683480361,1484871997,103701272,345400458,1333607727,1396534806, 1265043691,257575830,1832801323,207421923,1878496261,913255098,1480038377,1655631378, 199918889,1047339733,584606242,116703068,1435852453,1851149566,1450020992,2073300909, 331912080,66022624,
2137983702,884423146,1325171092,1765065345,708316132};Α. 2. 3變換矩陣iDCT64[64] [64] = {{/*Row 0*/32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32},{/*Row 1*/45,45,45,45,44,44,43,42,41,40,39,38,37,36,34,33,31,30,28,26,24,22,20,18,16,14,12,10,8,6,3,1,-1,-3,-6,-8,-10,-12, -14, -16, -18, -20, -22, -24, -26,-28,-30,-31,-33,-34,-36, -37, -38, -39, -40, -41, -42,43, -44,-44,-45,-45,-45,-45},{/*Row 2*/45,45,44,43,41,39,36,34,30,27,23,19,15,11,7,2,-2,-7,-11,-15,-19, -23, -27, -30, -34, -36, -39,-41,-43,-44,-45,-45,-45,45,-44, -43, -41, -39, -36, -34, -30, -27, -23,-19,-15,-11,-7,-2,2,7,11,15,19,23,27,30,34,36,39,41,43,44,45,45},{/*Row 3*/45,44,42,39,36,31,26,20,14,8,1,-6,-12,-18,-24,-30,-34,-38,-41, -44,-45, -45, -45, -43,-40,-37,-33,-28,-22,-16,-10,-3,3,10,16,22,28,33,37,40,43,45,45,45,44,41,38,34,30,24,18,12,6,-1,-8,-14, -20, -26, -31, -36, -39,-42,-44,-45},{/*Row 4*/45,43,40,35,29,21,13,4,_4,-13, -21, -29,-35,-40,-43,-45,-45,-43,-40,-35, -29, -21, -13, -4,4,13,21,29,35,40,43,45,
45,43,40,35,29,21,13,4,_4,-13, -21, -29,-35,-40,-43,-45,-45,-43,-40,-35, -29, -21, -13, -4,4,13,21,29,35,40,43,45},{/*Row 5*/45,42,37,30,20,10,_1,-12, -22, -31, -38, -43,-45,-45,-41,-36, -28,-18, -8,3,14,24,33,39,44,45,44,40,34,26,16,6,-6,-16,-26,-34, -40,-44,-45,-44,-39,-33,-24,-14,-3,8,18,28,36,41,45,45,43,38,31,22,12,1,-10,-20,-30,-37,-42,-45,{/*Row 6*/45,41,34,23,11,_2,-15, -27, -36, -43, -45,-44,-39,-30,-19,-7,7,19,30,39,44,45,43,36,27,15,2, -11,-23,-34,-41,-45,-45,-41,-34, -23, -11,2,15,27,36,43,45,44,39,30,19,7,-7,-19,-30,-39, -44, -45, -43, -36, -27, -15,-2,11,23,34,41,45},{/*Row 7*/45,39,30,16,1,-14, -28, -38, -44, -45, -40,-31,-18,-3,12,26,37,44,45,41,33,20,6,-10, -24, -36,-43,-45,-42,-34,-22,-8,8,22,34,42,45,43,36,24,10,-6,-20,-33,-41,-45,-44,-37,-26,-12,3,18,31,40,45,44,38,28,14,-1,-16,-30,-39,-45},{/*Row 8*/44,38,25,9,-9,-25,-38, -44, -44, -38, -25,-9,9,25,38,44,44,38,25,9,-9,-25,-38, -44, -44, -38,-25,-9,9,25,38,44,44,38,25,9,-9,-25,-38, -44, -44, -38, -25,-9,9,25,38,44,44,38,25,9,-9,-25,-38, -44, -44, -38, -25,-9,9,25,38,44},{/*Row 9*/44,36,20,1,-18, -34, -44, -45, -37, -22, -3,16,33,43,45,38,24,6, -14,-31, -42,-45,-39, -26, _8,12,30,41,45,40,28,10,-10,-28,-40,-45,-41,-30, -12,8,26,39,45,42,31,14,-6,-24,-38,-45,-43, -33, —16,3,22,37,45,44,34,18,-1,-20,-36,-44},{/*Row 10*/44,34,15,_7,-27, -41,-45,-39, -23, _2,19,36,45,43,30,11,-11,-30,-43,-45,-36, -19,2,23,39,45,41,27,7,-15,-34,-44,-44,-34,-15,7,27,41,45,39,23,2,-19, -36,-45,-43,-30,-11,11,30,43,45,36,19,_2,-23, -39, -45,-41,-27,-7,15,34,44},{/*Row 11*/44,31,10,-14, -34, -45,-42,-28, _6,18,37,45,40,24,1,-22,-39,-45,-38, -20,3,26,41,45,36,16,-8,-30,-43,-44,-33,-12,12,33,44,43,30,8, -16, -36, -45,-41,-26,-3,20,38,45,39,22,-1,-24,-40, -45, -37, —18,6,28,42,45,34,14,-10,-31,-44},{/*Row 12*/43,29,4,-21, -40,-45,-35, -13,13,35,45,40,21,-4,-29,-43,
-43,-29,_4,21,40,45,35,13,-13, -35, -45,-40,-21,4,29,43,43,29,4, -21, -40,-45,-35, -13,13,35,45,40,21,-4,-29,-43,-43,-29,_4,21,40,45,35,13,-13, -35, -45,-40,-21,4,29,43},{/*Row 13*/43,26,_1,-28, -44,-42,-24,3,30,44,41,22,-6,-31,-45,-40,-20,8,33,45,39,18, -10, -34、-45,-38,-16,12,36,45,37,14,-14,-37,-45,-36, -12,16,38,45,34,10,-18,-39,-45,-33,-8,20,
40,45,31,6,-22, -41,-44,-30, _3,24,42,44,28,1,-26,-43},{/*Row 14*/43,23, _7,-34, -45, -36, -11,19,41,44,27, -2,-30,-45,-39,-15,15,39,45,30,2, -27, -44,-41,-19,11,36,45,34,7,-23,-43,-43,-23,7,34,45,36,11,-19, -41,-44,-27,2,30,45,39,15,-15,-39,-45,-30, -2,27,44,41,19,-11, -36, -45,-34,-7,23,43},{/*Row 15*/42,20,-12, -38, -45, —28,3,33,45,34,6,-26,-44,-39,-14,18,41,43,22,-10, -37, -45,-30,1,31,45,36,8,-24,-44,-40,-16,16,40,44,24, _8,-36, -45,-31, -1,30,45,37,10,-22,-43,-41,-18,14,39,44,26,-6,-34, -45,-33, -3,28,45,38,12,-20,-42},{/*Row 16*/42,17,-17,-42,-42,-17,17,42,42,17,-17,-42,-42,-17,17,42,42,17,-17,-42,-42,-17,17,42,42,17,-17,-42,-42,-17,17,42,42,17,-17,-42,-42,-17,17,42,42,17,-17,-42,-42,-17,17,42,42,17,-17,-42, -42, -17,17,42,42,17,-17,-42,-42,-17,17,42},{/*Row 17*/41,14,-22,-44, -37, _6,30,45,31,-3,-36,-45,-24,12,40,42,16,-20,-44,-38, _8,28,45,33,-1,-34,-45,-26,10,39,43,18,-18,-43,-39,-10,26,45,34,1,-33,-45,-28,8,38,44,20,-16,-42,-40,-12,24,45,36,3, -31, -45,-30,6,37,44,22,-14,-41},{/*Row 18*/41,11,-27,-45,-30,7,39,43,15,-23, -45,-34,2,36,44,19,-19,-44,-36,-2,34,45,23, -15, -43,-39,-7,30,45,27, -11,-41,-41,-11,27,45,30, _7,-39, -43,-15,23,45,34,-2,-36,-44,-19,19,44,36,2, -34, -45,-23,15,43,39,7, -30,-45,-27,11,41},{/*Row 19*/40,8, -31,-45,-22,18,44,34, _3,-38, -42,-12,28,45,26,-14,-43,-37,-1,36,44,16,-24, -45, -30,10,41,39,6,-33,-45,-20,20,45,33, _6,-39, -41,-10,30,45,24,-16,-44,-36,1,37,43,14,-26,-45,-28,12,42,38,3,-34, -44,-18,22,45,31,-8,-40},{/*Row 20*/
40,4,-35,-43,-13,29,45,21,-21, -45,-29,13,43,35,-4,-40,-40,-4,35,43,13,-29, -45,-21,21,45,29,-13,-43,-35,4,40,40,4,-35,-43,-13,29,45,21,-21, -45,-29,13,43,35,-4,-40,
-40,-4,35,43,13,-29, -45,-21,21,45,29,-13,-43,-35,4,40},{/*Row 21*/39,1,-38,-40, -3,37,41,6,-36, -42, -8,34,43,10,-33,-44,-12,31,44,14,-30, -45,-16,28,45,18,-26,-45,-20,24,45,22,-22,-45,-24,20,45,26,-18, -45,-28,16,45,30, -14,-44,-31,12,44,33,-10, -43,-34,8,42,36,-6,-41,-37,3,40,38,-1,-39},{/*Row 22*/39,-2,-41,-36,7,43,34,-11, -44,-30,15,45,27,-19,-45,-23,23,45,19,-27, -45,-15,30,44,11,-34,-43,-7,36,41,2, -39,-39,2,41,36, _7,-43,-34,11,44,30, -15, -45,-27,19,45,23,-23,-45,—19,27,45,15,-30, -44,—11,34,43,7,-36,-41,-2,39},{/*Row 23*/38,-6,-43,-31,16,45,22, -26, -45, -12,34,41,1,-40,-36,10,44,28,-20, -45,-18, 30,44,8,-37, -39,3,42,33,-14,-45,-24,24,45,14,-33, -42, -3,39,37,_8,-44,-30,18,45,20,-28,-44,-10,36,40, _1,-41,-34,12,45,26, -22, -45,-16,31,43,6, -38},{/*Row 24*/38,-9,-44,-25, 25,44,9,-38, -38,9,44,25,-25,-44,-9,38,38,-9,-44,-25, 25,44,9,-38, -38,9,44,25,-25,-44,-9,38,38,-9,-44,-25, 25,44,9,-38, -38,9,44,25,-25,-44,-9,38,38,-9,-44,-25, 25,44,9,-38, -38,9,44, 25,-25,-44,-9,38},{/*Row 25*/37,-12,-45,—18,33,40,_6,-44,—24,28,43,1,-42,-30,22,45,8,-39,-34,16,45,14,-36, -38,10,45,20,-31,-41,3,44,26,-26,-44,-3,41,31, -20, -45,-10,38,36, -14,-45,-16,34,39, -8,-45,-22,30,42,_1,-43,-28,24,44,6,-40,-33,18,45,12,-37},{/*Row 26*/36,-15,-45,-11,39,34, -19, -45,-7,41,30, -23,-44,-2,43,27,-27,-43,2,44,23, -30, -41,7,45,19,-34,-39,11,45,15,-36,-36,15,45,11,-39, -34,19,45,7, -41,-30,23,44,2, -43,-27,27,43, -2,-44,-23,30,41, -7,-45,-19,34,39, -11,-45,-15,36},{/*Row 27*/36,-18,-45,-3,43,24,-31, -39,12,45,10,-40,-30,26,42,-6,-45,-16,37,34,-20, -44, -1,44,22, -33,-38,14,45,8,-41,-28,28,41, -8,-45,-14,38,33, -22, -44,1,44,20, -34,-37,16,45,6,-42,-26,30,40,-10, -45,-12,39,31,-24, -43,3,45,18,-36},
{/*Row 28*/35,-21,-43,4,45,13,-40,-29,29,40,-13, -45,-4,43,21,-35,-35,21,43,_4,-45,-13,40,29,-29, -40,13,45,4,-43,-21,35,35,-21,-43,4,45,13,-40,-29,29,40, -13, -45,-4,43,21, -35,-35,21,43,-4,-45,—13,40,29,-29, -40,13,45,4,-43,-21,35},{/*Row 29*/34,-24,-41,12,45,1,-45,-14,40,26,-33, -36,22,42,-10,-45,-3,44,16,-39, —28,31,37,-20, -43,8,45,6,-44,-18,38,30,
-30,-38,18,44,_6,-45, -8,43,20,-37, -31,28,39,-16,-44,3,45,10,-42,—22,36,33,-26, -40,14,45,-1,-45,-12,41,24,-34},{/*Row 30*/34,-27,-39,19,43, -11, -45,2,45,7, -44,-15,41,23, -36,-30,30,36, -23, -41,15,44, _7,-45, -2,45,11,-43,-19,39,27, -34,-34,27,39,-19, -43,11,45, _2,-45, -7,44,15,-41,-23,36,30,-30,-36,23,41,-15,44,7,45,2,-45,-11,43,19,-39,-27,34},{/*Row 31*/33,-30,—36,26,38,-22, -40,18,42,-14, -44,10,45,-6,-45,1,45,3,-45,-8,44,12,-43,-16,41,20,-39,-24,37,28,-34,-31,31,34, -28,-37,24,39, -20, -41,16,43, -12,-44,8,45, -3,-45,-1,45,6, -45,-10,44,14,-42,-18,40,22,-38, -26,36,30,-33},{/*Row 32*/32,-32,-32,32,32,-32,-32,32,32,-32,-32,32,32,-32,-32,32,32,-32,-32,32,32,-32,-32,32,32,-32,-32,32,32,-32,-32,32,32,-32,-32,32,32,-32,-32,32,32,-32,-32,32,32,-32,-32,32,32,-32,-32,32,32,-32,-32,32,32,-32,-32,32,32,-32,-32,32},{/*Row 33*/31,-34,—28,37,24,-39, -20,41,16,-43,-12,44,8,-45,-3,45,-1,-45,6,45,-10, -44,14,42,-18, -40,22,38,-26,-36,30,33,-33,-30,36,26,-38, -22,40,18,-42,-14,44,10,-45,-6,45,1,-45,3,45,-8,-44,12,43,-16, -41,20,39,-24,-37,28,34,-31},{/*Row 34*/30,-36,-23,41,15,-44,-7,45, _2,-45,11,43, -19,-39,27,34,-34,-27,39,19,-43,-11,45,2, -45,7,44, -15,-41,23,36,-30,-30,36,23, -41,-15,44,7, -45,2,45, -11, -43,19,39, -27,-34,34,27, -39, -19,43,11,-45,-2,45, -7,-44,15,41, -23,-36,30},{/*Row 35*/30,-38,-18,44,6, -45,8,43, -20, -37,31,28, -39,-16,44,3,-45,10,42,-22, —36,33,26,-40,-14,45,1,-45,12,41,-24,-34,34,24, -41,-12,45, _1,-45,14,40, -26,-33,36,22, -42,-10,45,
-3,-44,16,39,-28, —31,37,20,-43,-8,45,-6,-44,18,38,-30},{/*Row 36*/29,-40,-13,45,_4,-43,21,35,-35,-21,43,4,-45,13,40,-29,-29,40,13,-45,4,43,-21, -35,35,21,-43,-4,45,-13,-40,29, 29,-40,-13,45,_4,-43,21,35,-35,-21,43,4,-45,13,40,-29,-29,40,13,-45,4,43,-21, -35,35,21,-43,-4,45,-13,-40,29},{/*Row 37*/28,-41,-8,45,-14, —38,33,22,-44,-1,44, -20,-34,37,16,-45,6,42, -26,-30,40,10,-45,12,39, -31,-24,43,3, -45,18,36,-36,-18,45, _3,-43,24,31, -39,-12,45, -10,-40,30,26, -42,-6,45,-16,-37,34,20, -44,1,44, -22,-33,38,14,-45,8,41, -28},{/*Row 38*/27,-43,-2,44, -23, -30,41,7, -45,19,34, -39,-11,45, -15,-36,36,15,-45,11,39, -34, -19,45, -7,-41,30,23,-44,2,43, -27,-27,43,2, -44,23,30, -41,-7,45, -19,-34,39,11,-45,15,36,-36,-15,45, -11, -39,34,19,-45,7,41, -30,-23,44, -2,-43,27},{/*Row 39*/26,-44,3,41, -31, -20,45, -10, -38,36,14,-45,16,34, -39,-8,45,-22,-30,42,1,-43,28,24,-44,6,40,-33,-18,45,-12,-37,37,12,-45,18,33,-40,-6,44, -24,-28,43,-1,-42,30,22,-45,8,39,-34,-16,45,-14, -36,38,10,-45,20,31,-41,-3,44,-26},{/*Row 40*/25,-44,9,38,-38, -9,44, -25, -25,44,-9,-38,38,9,-44,25,25,-44,9,38,-38, -9,44, -25, -25,44,-9,-38,38,9,-44,25,25,-44,9,38,-38, -9,44, -25, -25,44,-9,-38,38,9,-44,25,25,-44,9,38,-38, -9,44, -25, -25,44, -9,-38,38,9,-44,25},{/*Row 41*/24,-45,14,33,-42,3,39,-37, -8,44, -30,-18,45,-20,-28,44,-10,-36,40,1,-41,34,12,-45,26,22, -45,16,31, -43,6,38,-38,-6,43, -31, -16,45, -22, -26,45, -12,-34,41, -1,-40,36,10,-44,28,20,-45,18,30,-44,8,37,-39,-3,42,-33,-14,45,-24},{/*Row 42*/23,-45,19,27,-45,15,30,-44,11,34,-43,7,36,-41,2,39,-39,-2,41, -36, -7,43, -34, -11,44, -30,-15,45,-27,-19,45,-23,-23,45, -19, -27,45, -15, -30,44, -11, -34,43, -7,-36,41, -2,-39,39,2,-41,36,7,-43,34,11,-44,30,15,-45,27,19,-45,23},{/*Row 43*/22,-45,24,20,-45,26,18,-45,28,16,-45,30,14,-44,31,12,-44,33,10,-43,34,8,-42,36,6,-41,37,3,-40,38,1,-39,
39,-1,-38,40, _3,-37,41, _6,-36,42, -8,-34,43, -10,-33,44,-12,-31,44,-14, -30,45,-16, -28,45,-18,-26,45,-20,-24,45,-22},{/*Row 44*/21,-45,29,13,-43,35,4,-40,40,_4,-35,43,-13,-29,45,-21,-21,45,-29, -13,43,-35, -4,40,-40,4,35,-43,13,29,-45,21,21,-45,29,13,-43,35,4,-40,40,_4,-35,43,-13,-29,45,-21,-21,45,-29, -13,43,-35, -4,40,-40,4,35,-43,13,29,-45,21},{/*Row 45*/20,-45,33,6,-39,41,-10, -30,45,-24, -16,44,-36,-1,37, -43,14,26,-45,28,12,-42,38,-3,-34,44,-18,-22,45,-31,-8,40,-40,8,31, -45,22,18,-44,34,3, -38,42, -12,-28,45, -26,-14,43,-37,1,36, -44,16,24,-45,30,10,-41,39,-6,-33,45,-20},{/*Row 46*/19,-44,36, _2,-34,45, -23, -15,43, -39,7,30, -45,27,11,-41,41,-11,-27,45, -30, -7,39, -43,15,23, -45,34,2, -36,44, -19,-19,44, -36,2,34, -45,23,15,-43,39, -7,-30,45, -27,-11,41,-41,11,27, -45,30,7, -39,43, -15, -23,45, -34,-2,36, -44,19},{/*Row 47*/18,-43,39,-10, -25,45,-34,1,33, -45,28,8,-38,44,-20,-16,42,-40,12,24,-45,36,_3,-31,45,-30,-6,37,-44,22,14,-41,41,-14,-22,44, -37,6,30, -45,31,3, -36,45, -24,-12,40, -42,16,20,-44,38,_8,-28,45,-33, -1,34, -45,26,10,-39,43,-18},{/*Row 48*/17,-42,42, -17, -17,42, -42,17,17,-42,42, -17,-17,42, -42,17,17,-42,42, -17, -17,42, -42,17,17,-42,42, -17,-17,42, -42,17,17,-42,42, -17, -17,42, -42,17,17,-42,42, -17,-17,42, -42,17,17,-42,42, -17, -17,42, -42,17,17,-42,42, -17,-17,42, -42,17},{/*Row 49*/16,-40,44, -24, -8,36, -45,31, _1,-30,45, -37,10,22, -43,41,-18,-14,39,-44,26,6,-34,45,-33,3,28,-45,38,-12,-20,42,-42,20,12,-38,45,-28, -3,33, -45,34,-6,-26,44,-39,14,18,-41,43, -22, -10,37, -45,30,1,-31,45, -36,8,24, -44,40, -16},{/*Row 50*/15,-39,45, -30,2,27, -44,41, -19, -11,36, -45,34, -7,-23,43,-43,23,7, -34,45, -36,11,19,-41,44, -27,-2,30, -45,39, -15,-15,39, -45,30, _2,-27,44, -41,19,11,-36,45, -34,7,23, -43,43,-23,-7,34,-45,36, -11, -19,41, -44,27,2, -30,45, -39,15},{/*Row 51*/14,-37,45, -36,12,16,-38,45, -34,10,18,-39,45, -33,8,20,
-40,45,-31,6,22,-41,44,-30,3,24,-42,44,-28,1,26, -43,43,-26,-1,28, -44,42,-24, -3,30, -44,41,-22,-6,31,-45,40,-20,-8,33,-45,39,-18, -10, 34,-45,38,-16,-12,36,-45,37,-14},{/*Row 52*/13,-35,45,-40,21,4,-29,43,-43,29,-4,-21,40,-45,35,-13,-13,35,-45,40,-21, -4,29,-43,43,-29,4,21,-40,45,-35,13,13,-35,45, -40,21,4, -29,43, -43,29, -4,-21,40, -45,35, -13,-13,35,-45,40,-21, -4,29,-43,43,-29,4,21,-40,45,-35,13}, {/*Row 53*/12,-33,44,-43,30,_8,-16,36,-45,41,-26,3,20,-38,45,-39,22,1,-24,40,-45,37, -18, -6,28, -42,45,-34,14,10,-31,44,-44,31, -10,-14,34, -45,42, -28,6,18,-37,45, -40,24, -1,-22,39,-45,38,-20, -3,26, -41,45,-36,16,8,-30,43,-44,33,-12},{/*Row 54*/11,-30,43, -45,36, -19, -2,23, -39,45, -41,27, -7,-15,34, -44,44,-34,15,7, -27,41, -45,39, -23,2,19,-36,45, -43,30, -11,-11,30, -43,45, -36,19,2, -23,39, -45,41, -27,7,15,-34,44,-44,34, -15, -7,27, -41,45, -39,23, -2,-19,36, -45,43, -30,11},{/*Row 55*/10,-28,40, -45,41, -30,12,8, -26,39, -45,42, -31,14,6, -24,38,-45,43,-33,16,3,-22,37,-45,44,-34,18,1,-20,36,-44,44,-36,20, _1,-18,34, -44,45, -37,22, -3,-16,33, -43,45, -38,24,-6,-14,31,-42,45,-39,26,-8,-12,30,-41,45,-40,28,-10},{/*Row 56*/9,-25,38,-44,44,-38, 25,-9,-9,25,-38,44,-44,38,-25,9,9,-25,38,-44,44,-38, 25,-9,-9,25,-38,44,-44,38,-25,9,9,-25,38,-44,44,-38, 25,-9,-9,25,-38,44,-44,38,-25,9,9,-25,38,-44,44,-38, 25, -9, -9,25, -38,44,-44,38,-25,9},{/*Row 57*/8,-22,34,-42,45, -43,36,-24,10,6,-20,33,-41,45,-44,37,-26,12,3, -18,31, -40,45, -44,38, -28,14,1,-16,30, -39,45,-45,39, -30,16,_1,-14,28, -38,44, -45,40, -31,18,-3,-12,26,-37,44,-45,41,-33,20,_6,-10,24,-36,43,-45,42,-34,22,-8},{/*Row 58*/7,-19,30, -39,44, -45,43, -36,27, -15,2,11,-23,34, -41,45,-45,41, -34,23, -11, _2,15,-27,36, -43,45,44,39,-30,19,-7,-7,19,-30,39, -44,45, -43,36, -27,15,-2,-11,23, -34,41, -45,45,-41,34, -23,11,2, -15,27, -36,43, -45,44, -39,30, -19,7},{/*Row 59*/
6,-16,26, -34,40, -44,45, -44,39,-33,24, -14,3,8, -18,28,-36,41,-45,45,-43,38, -31,22, -12,1,10,-20,30,-37,42,-45,45,-42,37, -30,20, -10, _1,12,-22,31, -38,43, -45,45, -41,36,-28,18,-8,-3,14,-24, 33,-39,44,-45,44,-40,34,-26,16,-6}, {/*Row 60*/4,-13,21,-29,35,-40,43,-45,45,-43,40,-35,29,-21,13,-4,-4,13,-21,29,-35,40,-43,45,-45,43,-40,35,-29,21,-13,4,4,-13,21, -29,35, -40,43, -45,45, -43,40, -35,29, -21,13,-4,-4,13,-21,29,-35,40,-43,45,-45,43,-40,35,-29,21,-13,4},{/*Row 61*/3,-10,16,-22,28,-33,37,-40,43, -45,45, -45,44,-41,38,-34,30,-24,18,-12,6,1,_8,14,-20,26, -31,36, -39,42,-44,45,-45,44, -42,39, -36,31, -26,20, -14,8, -1,-6,12,-18,24, -30,34,-38,41,-44,45,-45,45,-43,40,-37,33,-28,22,-16,10,-3},{/*Row 62*/2,-7,11,-15,19,-23,27, -30,34, -36,39, -41,43, -44,45, -45,45,-45,44, -43,41, -39,36, -34,30, -27,23, -19,15,-11,7, -2,-2,7, -11,15,-19,23, -27,30, -34,36, -39,41, -43,44, -45,45,-45,45, -44,43, -41,39, -36,34, -30,27, -23,19,-15,11,-7,2},{/*Row 63*/1,-3,6, -8,10,-12,14,-16,18,-20,22, -24,26, -28,30, -31,33,-34,36,-37,38,-39,40,-41,42,-43,44,-44,45,-45,45,-45,45,-45,45,-45,44,-44,43,-42,41,-40,39,-38,37,-36,34,-33,31,-30,28,-26,24, -22,20, -18,16,-14,12,-10,8, -6,3, -1}。
權利要求
一種用于仿真膠片顆粒塊的方法,包括步驟至少部分地根據(jù)圖像塊的屬性來建立至少一個參數(shù);以及基于根據(jù)所述至少一個參數(shù)而產(chǎn)生的至少一個膠片顆粒圖案,仿真至少一個膠片顆粒塊。
2.根據(jù)權利要求1所述的方法,還包括步驟把膠片顆粒塊與所述圖像塊進行混合。
3.根據(jù)權利要求1所述的方法,其中,在所述仿真步驟之前接收伴隨著所述圖像塊的 補充膠片顆粒信息消息。
4.根據(jù)權利要求3所述的方法,還包括步驟按照解碼順序把所述膠片顆粒塊與所述 圖像塊進行混合。
5.根據(jù)權利要求3所述的方法,還包括步驟按照顯示順序把所述膠片顆粒塊與所述 圖像塊進行混合。
6.根據(jù)權利要求1所述的方法,還包括步驟按照解碼順序來仿真所述至少一個膠片 顆粒塊。
7.根據(jù)權利要求1所述的方法,還包括步驟按照顯示順序來仿真所述至少一個膠片 顆粒塊。
8.根據(jù)權利要求1所述的方法,其中,所述建立步驟還包括步驟接收伴隨所述圖像塊并包含多個參數(shù)的膠片顆粒信息消息,每一個所述參數(shù)表示將要 在所述圖像塊中仿真的膠片顆粒的屬性;從所述多個參數(shù)中選擇至少一個參數(shù)。
9.根據(jù)權利要求1所述的方法,其中,所述仿真步驟還包括對所述圖像塊的色度分量的截頻進行縮放;計算所述圖像塊的平均像素值;把所述塊的平均像素值與伴隨著將與所述膠片顆粒塊進行混合的圖像塊的膠片顆粒 信息消息中的相應強度值進行比較;從膠片顆粒塊數(shù)據(jù)庫中檢索膠片顆粒塊;以及對相鄰塊之間的垂直邊沿進行解塊。
10.根據(jù)權利要求9所述的方法,其中,在接收到具有4:4:4色度格式的至少一個參數(shù) 時,把所述色度分量的截頻縮放至4 2 0格式。
11.根據(jù)權利要求9所述的方法,其中,所述檢索膠片顆粒塊的步驟還包括步驟隨機 地檢索膠片顆粒塊。
12.根據(jù)權利要求9所述的方法,其中,所述檢索步驟還包括步驟從預計算的膠片顆 粒塊的數(shù)據(jù)庫中檢索膠片顆粒塊。
13.根據(jù)權利要求12所述的方法,還包括步驟通過存儲169個具有4096個預計算 膠片顆粒樣本的圖案而建立膠片顆粒塊數(shù)據(jù)庫,每一個樣本具有2進制補碼形式且范圍 從-127 至 127。
14.根據(jù)權利要求9所述的方法,還包括步驟通過如下步驟建立膠片顆粒塊數(shù)據(jù)庫規(guī)定具有高斯隨機值的查找表;隨機地訪問所述查找表;對從所述查找表中隨機訪問的值執(zhí)行整型逆變換;以及對從所述整型逆變換中獲得的圖案的水平邊沿進行解塊。
15.根據(jù)權利要求1所述的方法,其中,如果伴隨著所述圖像塊的膠片顆粒消息規(guī)定了 禁止仿真,則不執(zhí)行膠片顆粒仿真。
16.根據(jù)權利要求9所述的方法,還包括步驟如果像素值處于所有指定的頻帶之外, 則禁止膠片顆粒仿真。
17.一種用于針對圖像塊而仿真膠片顆粒塊的方法,包括步驟至少部分地根據(jù)所述圖像塊的屬性來建立至少一個參數(shù);根據(jù)所述至少一個參數(shù),以比特精度來仿真至少一個膠片顆粒塊;以及把膠片顆粒塊與所述圖像塊進行混合。
18.根據(jù)權利要求17所述的方法,其中,在所述仿真步驟之前接收伴隨著所述圖像塊 的補充膠片顆粒信息消息。
19.根據(jù)權利要求18所述的方法,還包括步驟按照解碼順序把所述膠片顆粒塊與所 述圖像塊進行混合。
20.根據(jù)權利要求17所述的方法,還包括步驟按照顯示順序把所述膠片顆粒塊與所 述圖像塊進行混合。
21.根據(jù)權利要求17所述的方法,還包括步驟按照解碼順序來仿真所述至少一個膠 片顆粒塊。
22.根據(jù)權利要求17所述的方法,還包括步驟按照顯示順序來仿真所述至少一個膠 片顆粒塊。
23.一種用于對與圖像塊進行混合的膠片顆粒塊進行仿真的設備,包括用于至少部分地根據(jù)圖像塊的屬性來建立至少一個參數(shù)的裝置;以及用于通過根據(jù)所述至少一個參數(shù)而產(chǎn)生至少一個膠片顆粒圖案來仿真至少一個膠片 顆粒塊的裝置。
24.根據(jù)權利要求23所述的設備,還包括用于至少把膠片顆粒塊與所述圖像塊進行 混合的裝置。
25.根據(jù)權利要求23所述的設備,其中,混合裝置按照解碼順序把所述膠片顆粒塊與 所述圖像塊混合。
26.根據(jù)權利要求23所述的設備,其中,混合裝置按照顯示順序把所述膠片顆粒塊與 所述圖像塊混合。
27.根據(jù)權利要求23所述的設備,其中,所述用于仿真膠片顆粒的裝置按照解碼順序 來仿真所述至少一個膠片顆粒塊。
28.根據(jù)權利要求23所述的設備,其中,所述用于仿真膠片顆粒的裝置按照解碼順序 來仿真所述至少一個膠片顆粒塊。
29.根據(jù)權利要求23所述的設備,其中,所述建立裝置還包括用于接收伴隨所述圖像塊并包含多個參數(shù)的膠片顆粒信息消息的裝置,每一個所述參 數(shù)表示將要在所述圖像塊中仿真的膠片顆粒的屬性;以及用于從所述多個參數(shù)中選擇至少一個參數(shù)的裝置。
30.根據(jù)權利要求23所述的設備,其中,所述仿真裝置還包括用于對所述圖像塊的色度分量的截頻進行縮放的裝置;用于計算所述圖像塊的平均像素值的裝置;用于把所述塊的平均像素值與伴隨著將與所述膠片顆粒塊進行混合的圖像塊的膠片 顆粒信息消息中的相應強度值進行比較的裝置; 膠片顆粒塊數(shù)據(jù)庫;用于從所述膠片顆粒塊數(shù)據(jù)庫中檢索膠片顆粒塊的裝置;以及 用于對相鄰塊之間的垂直邊沿進行解塊的裝置。
31.根據(jù)權利要求30所述的設備,其中,在接收到具有4:4:4色度格式的至少一個參數(shù) 時,縮放裝置把所述色度分量的截頻縮放至4 2 0格式。
32.根據(jù)權利要求30所述的設備,其中,所述用于檢索膠片顆粒塊的裝置隨機地檢索 所述膠片顆粒塊。
33.根據(jù)權利要求30所述的設備,其中,所述數(shù)據(jù)庫包含預計算的膠片顆粒塊。
34.根據(jù)權利要求30所述的設備,其中,所述數(shù)據(jù)庫包含169個具有4096個預計算膠 片顆粒樣本的圖案,每一個樣本具有2進制補碼形式且范圍從-127至127。
35.一種計算機可讀介質,用于使計算機對與圖像塊進行混合的膠片顆粒進行仿真,包 括步驟第一裝置,用于使所述計算機至少部分地根據(jù)圖像塊的屬性來建立至少一個參數(shù);以及第二裝置,用于使所述計算機根據(jù)所述至少一個參數(shù),以比特精度來仿真至少一個膠 片顆粒塊。
36.一種用于對與圖像塊進行混合的膠片顆粒塊進行仿真的方法,包括步驟 至少部分地根據(jù)所述圖像塊的屬性來建立至少一個參數(shù);以及通過訪問膠片顆粒圖案數(shù)據(jù)庫,根據(jù)所述至少一個參數(shù)來仿真所述至少一個膠片顆粒塊。
37.根據(jù)權利要求36所述的方法,還包括步驟把所述膠片顆粒圖案數(shù)據(jù)庫存儲在非 易失性存儲器中。
38.根據(jù)權利要求36所述的方法,還包括步驟在系統(tǒng)初始化時創(chuàng)建所述膠片顆粒圖案數(shù)據(jù)庫。
全文摘要
通過首先至少部分地根據(jù)圖像塊的屬性來建立至少一個參數(shù),來仿真膠片顆粒塊以便添加到圖像塊?;诟鶕?jù)所述至少一個參數(shù)而產(chǎn)生的至少一個膠片顆粒圖案,仿真至少一個膠片顆粒塊。具體地,使用比特精確的技術來產(chǎn)生ce膠片顆粒圖案。
文檔編號H04N7/26GK101841721SQ20101018670
公開日2010年9月22日 申請日期2005年11月22日 優(yōu)先權日2004年11月24日
發(fā)明者克里斯蒂娜·戈米拉, 吉恩·拉什, 杰弗里·艾倫·庫珀 申請人:湯姆森許可貿易公司