MCPcopy Create free account
hub / github.com/MediaArea/MediaInfoLib / predict

Function predict

Source/MediaInfo/Video/File_Ffv1.cpp:1561–1578  ·  view source on GitHub ↗

---------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

1559
1560//---------------------------------------------------------------------------
1561static inline int32s predict(pixel_t *current, pixel_t *current_top, bool is_overflow_16bit)
1562{
1563 int32s LeftTop, Top, Left;
1564 if (is_overflow_16bit)
1565 {
1566 LeftTop = (int16s)current_top[-1];
1567 Top = (int16s)current_top[0];
1568 Left = (int16s)current[-1];
1569 }
1570 else
1571 {
1572 LeftTop = current_top[-1];
1573 Top = current_top[0];
1574 Left = current[-1];
1575 }
1576
1577 return get_median_number(Left, Left + Top - LeftTop, Top);
1578}
1579
1580//---------------------------------------------------------------------------
1581static inline int get_context_3(pixel_t quant_table[MAX_CONTEXT_INPUTS][256], pixel_t *src, pixel_t *last)

Callers 1

lineMethod · 0.85

Calls 1

get_median_numberFunction · 0.85

Tested by

no test coverage detected