1 /*
2 * This file is part of FFmpeg.
3 *
4 * FFmpeg is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * FFmpeg is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with FFmpeg; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 */
18
19 #include <stdint.h>
20
24
26
29 {
32 unsigned int mb_h = (
frame->height + 15) / 16;
33 unsigned int mb_w = (
frame->width + 15) / 16;
34 unsigned int nb_mb = mb_h * mb_w;
35 unsigned int block_idx;
36
38
40 if (!sd)
41 return 0;
46
50 if (table_w)
51 *table_w = mb_w;
52 if (table_h)
53 *table_h = mb_h;
54 if (qscale_type)
55 *qscale_type = par->
type;
56
59 return 0;
60 }
61
62 for (block_idx = 0; block_idx < nb_mb; block_idx++) {
64 (*table)[block_idx] = par->
qp +
b->delta_qp;
65 }
66
67 return 0;
68 }
69