[FFmpeg-soc] [soc]: r1447 - in rv40: rv34.h rv34data.h rv40.c rv40data.h
kostya
subversion at mplayerhq.hu
Sun Nov 18 09:01:21 CET 2007
Author: kostya
Date: Sun Nov 18 09:01:21 2007
New Revision: 1447
Log:
These tables are for RV40 loop filter only
Modified:
rv40/rv34.h
rv40/rv34data.h
rv40/rv40.c
rv40/rv40data.h
Modified: rv40/rv34.h
==============================================================================
--- rv40/rv34.h (original)
+++ rv40/rv34.h Sun Nov 18 09:01:21 2007
@@ -115,15 +115,6 @@ typedef struct RV34DecContext{
}RV34DecContext;
/**
- * Loop filter tables
- */
-extern const uint8_t ff_rv34_dither_l[16];
-extern const uint8_t ff_rv34_dither_r[16];
-extern const uint8_t ff_rv34_alpha_tab[32];
-extern const uint8_t ff_rv34_beta_tab[32];
-extern const uint8_t ff_rv34_filter_clip_tbl[3][32];
-
-/**
* Common decoding functions
*/
int ff_rv34_get_start_offset(GetBitContext *gb, int blocks);
Modified: rv40/rv34data.h
==============================================================================
--- rv40/rv34data.h (original)
+++ rv40/rv34data.h Sun Nov 18 09:01:21 2007
@@ -143,51 +143,4 @@ static const uint16_t rv34_mb_max_sizes[
*/
static const uint8_t rv34_mb_bits_sizes[6] = { 6, 7, 9, 11, 13, 14 };
-/**
- * Dither values for deblocking filter - left/top values
- */
-const uint8_t ff_rv34_dither_l[16] = {
- 0x40, 0x50, 0x20, 0x60, 0x30, 0x50, 0x40, 0x30,
- 0x50, 0x40, 0x50, 0x30, 0x60, 0x20, 0x50, 0x40
-};
-/**
- * Dither values for deblocking filter - right/bottom values
- */
-const uint8_t ff_rv34_dither_r[16] = {
- 0x40, 0x30, 0x60, 0x20, 0x50, 0x30, 0x30, 0x40,
- 0x40, 0x40, 0x50, 0x30, 0x20, 0x60, 0x30, 0x40
-};
-
-/**
- * @begingroup loopfilter coefficients used by RV40 loop filter
- * @{
- */
-/** alpha parameter for RV40 loop filter - almost the same as in JVT-A003r1 */
-const uint8_t ff_rv34_alpha_tab[32] = {
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 122, 96, 75, 59, 47, 37,
- 29, 23, 18, 15, 13, 11, 10, 9,
- 8, 7, 6, 5, 4, 3, 2, 1
-};
-/** beta parameter for RV40 loop filter - almost the same as in JVT-A003r1 */
-const uint8_t ff_rv34_beta_tab[32] = {
- 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 4, 4, 4, 6, 6,
- 6, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 13, 14, 15, 16, 17
-};
-/** clip table for RV40 loop filter - the same as in JVT-A003r1 */
-const uint8_t ff_rv34_filter_clip_tbl[3][32] = {
- {
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
- },
- {
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 5, 5
- },
- {
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1,
- 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5, 5, 7, 8, 9
- }
-};
-/** @} */ // end loopfilter group
#endif /* FFMPEG_RV34DATA_H */
Modified: rv40/rv40.c
==============================================================================
--- rv40/rv40.c (original)
+++ rv40/rv40.c Sun Nov 18 09:01:21 2007
@@ -344,8 +344,8 @@ static inline void rv40_adaptive_loop_fi
sflag = (mult * FFABS(t)) >> 7;
if(sflag > 1) continue;
- p0 = (RV34_STRONG_FILTER(src, step, -3, 1, -3) + ff_rv34_dither_l[dmode + i]) >> 7;
- p1 = (RV34_STRONG_FILTER(src, step, -1, 3, -1) + ff_rv34_dither_r[dmode + i]) >> 7;
+ p0 = (RV34_STRONG_FILTER(src, step, -3, 1, -3) + rv40_dither_l[dmode + i]) >> 7;
+ p1 = (RV34_STRONG_FILTER(src, step, -1, 3, -1) + rv40_dither_r[dmode + i]) >> 7;
if(!sflag){
src[-1*step] = p0;
src[ 0*step] = p1;
@@ -359,8 +359,8 @@ static inline void rv40_adaptive_loop_fi
else
src[ 0*step] = src[-1*step];
}
- p0 = (RV34_STRONG_FILTER(src, step, -4, 0, -4) + ff_rv34_dither_l[dmode + i]) >> 7;
- p1 = (RV34_STRONG_FILTER(src, step, -1, 3, -1) + ff_rv34_dither_r[dmode + i]) >> 7;
+ p0 = (RV34_STRONG_FILTER(src, step, -4, 0, -4) + rv40_dither_l[dmode + i]) >> 7;
+ p1 = (RV34_STRONG_FILTER(src, step, -1, 3, -1) + rv40_dither_r[dmode + i]) >> 7;
if(!sflag){
src[-2*step] = p0;
src[ 1*step] = p1;
@@ -403,9 +403,9 @@ static void rv40_loop_filter(RV34DecCont
int i, j;
int no_up, no_left;
uint8_t *Y, *U, *V;
- const int alpha = ff_rv34_alpha_tab[s->qscale], beta = ff_rv34_beta_tab[s->qscale];
+ const int alpha = rv40_alpha_tab[s->qscale], beta = rv40_beta_tab[s->qscale];
//XXX these are probably not correct
- const int thr = s->qscale, lim0 = ff_rv34_filter_clip_tbl[1][s->qscale], lim1 = ff_rv34_filter_clip_tbl[2][s->qscale];
+ const int thr = s->qscale, lim0 = rv40_filter_clip_tbl[1][s->qscale], lim1 = rv40_filter_clip_tbl[2][s->qscale];
s->first_slice_line = 1;
s->mb_x= 0;
Modified: rv40/rv40data.h
==============================================================================
--- rv40/rv40data.h (original)
+++ rv40/rv40data.h Sun Nov 18 09:01:21 2007
@@ -65,4 +65,52 @@ static const uint8_t rv40_luma_quant[2][
16, 17, 18, 19, 20, 20, 21, 21, 22, 23, 23, 23, 24, 24, 24, 24 }
};
+/**
+ * @begingroup loopfilter coefficients used by RV40 loop filter
+ * @{
+ */
+/**
+ * Dither values for deblocking filter - left/top values
+ */
+static const uint8_t rv40_dither_l[16] = {
+ 0x40, 0x50, 0x20, 0x60, 0x30, 0x50, 0x40, 0x30,
+ 0x50, 0x40, 0x50, 0x30, 0x60, 0x20, 0x50, 0x40
+};
+/**
+ * Dither values for deblocking filter - right/bottom values
+ */
+static const uint8_t rv40_dither_r[16] = {
+ 0x40, 0x30, 0x60, 0x20, 0x50, 0x30, 0x30, 0x40,
+ 0x40, 0x40, 0x50, 0x30, 0x20, 0x60, 0x30, 0x40
+};
+
+/** alpha parameter for RV40 loop filter - almost the same as in JVT-A003r1 */
+static const uint8_t rv40_alpha_tab[32] = {
+ 128, 128, 128, 128, 128, 128, 128, 128,
+ 128, 128, 122, 96, 75, 59, 47, 37,
+ 29, 23, 18, 15, 13, 11, 10, 9,
+ 8, 7, 6, 5, 4, 3, 2, 1
+};
+/** beta parameter for RV40 loop filter - almost the same as in JVT-A003r1 */
+static const uint8_t rv40_beta_tab[32] = {
+ 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 4, 4, 4, 6, 6,
+ 6, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 13, 14, 15, 16, 17
+};
+/** clip table for RV40 loop filter - the same as in JVT-A003r1 */
+static const uint8_t rv40_filter_clip_tbl[3][32] = {
+ {
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ },
+ {
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 5, 5
+ },
+ {
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1,
+ 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5, 5, 7, 8, 9
+ }
+};
+/** @} */ // end loopfilter group
+
#endif /* FFMPEG_RV40DATA_H */
More information about the FFmpeg-soc
mailing list