Revision 2ba8f6b8 libavcodec/h263.c

View differences:

libavcodec/h263.c
22 22
 * qpel decoding, gmc decoding, interlaced decoding, 
23 23
 * by Michael Niedermayer <michaelni@gmx.at>
24 24
 */
25

  
26
/**
27
 * @file h263.c
28
 * @brief h263/mpeg4 codec
29
 *
30
 */
25 31
 
26 32
//#define DEBUG
27 33
#include "common.h"
......
1474 1480
    }
1475 1481
}
1476 1482

  
1483
/**
1484
 * encodes a 8x8 block.
1485
 * @param block the 8x8 block
1486
 * @param n block index (0-3 are luma, 4-5 are chroma)
1487
 */
1477 1488
static void h263_encode_block(MpegEncContext * s, DCTELEM * block, int n)
1478 1489
{
1479 1490
    int level, run, last, i, j, last_index, last_non_zero, sign, slevel, code;
......
1799 1810
    s->c_dc_scale= s->c_dc_scale_table[ s->qscale ];
1800 1811
}
1801 1812

  
1813
/**
1814
 * predicts the dc.
1815
 * @param n block index (0-3 are luma, 4-5 are chroma)
1816
 * @param dc_val_ptr a pointer to the dc_val entry for the current MB will be stored here
1817
 * @param dir_ptr pointer to an integer where the prediction direction will be stored
1818
 * @return the quantized predicted dc
1819
 */
1802 1820
static inline int ff_mpeg4_pred_dc(MpegEncContext * s, int n, UINT16 **dc_val_ptr, int *dir_ptr)
1803 1821
{
1804 1822
    int a, b, c, wrap, pred, scale;
......
1856 1874
    return pred;
1857 1875
}
1858 1876

  
1877
/**
1878
 * predicts the ac.
1879
 * @param n block index (0-3 are luma, 4-5 are chroma)
1880
 * @param dir the ac prediction direction
1881
 */
1859 1882
void mpeg4_pred_ac(MpegEncContext * s, DCTELEM *block, int n,
1860 1883
                   int dir)
1861 1884
{
......
1954 1977
    }
1955 1978
}
1956 1979

  
1980
/**
1981
 * encodes the dc value.
1982
 * @param n block index (0-3 are luma, 4-5 are chroma)
1983
 */
1957 1984
static inline void mpeg4_encode_dc(PutBitContext * s, int level, int n)
1958 1985
{
1959 1986
#if 1
......
1995 2022
#endif
1996 2023
}
1997 2024
#ifdef CONFIG_ENCODERS
2025
/**
2026
 * encodes a 8x8 block
2027
 * @param n block index (0-3 are luma, 4-5 are chroma)
2028
 */
1998 2029
static inline void mpeg4_encode_block(MpegEncContext * s, DCTELEM * block, int n, int intra_dc, 
1999 2030
                               UINT8 *scan_table, PutBitContext *dc_pb, PutBitContext *ac_pb)
2000 2031
{
......
2626 2657
}
2627 2658

  
2628 2659
/**
2660
 * gets the average motion vector for a GMC MB.
2629 2661
 * @param n either 0 for the x component or 1 for y
2630 2662
 * @returns the average MV for a GMC MB
2631 2663
 */
......
3591 3623
    return 0;
3592 3624
}
3593 3625

  
3626
/**
3627
 * decodes the dc value.
3628
 * @param n block index (0-3 are luma, 4-5 are chroma)
3629
 * @param dir_ptr the prediction direction will be stored here
3630
 * @return the quantized dc
3631
 */
3594 3632
static inline int mpeg4_decode_dc(MpegEncContext * s, int n, int *dir_ptr)
3595 3633
{
3596 3634
    int level, pred, code;
......
4476 4514
    return 0;
4477 4515
}
4478 4516

  
4517
/**
4518
 * decodes the user data stuff in the header.
4519
 * allso inits divx/xvid/lavc_version/build
4520
 */
4479 4521
static int decode_user_data(MpegEncContext *s, GetBitContext *gb){
4480 4522
    char buf[256];
4481 4523
    int i;

Also available in: Unified diff