Line | Branch | Exec | Source |
---|---|---|---|
1 | /* | ||
2 | * MPEG macroblock reconstruction | ||
3 | * Copyright (c) 2000,2001 Fabrice Bellard | ||
4 | * Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at> | ||
5 | * | ||
6 | * This file is part of FFmpeg. | ||
7 | * | ||
8 | * FFmpeg is free software; you can redistribute it and/or | ||
9 | * modify it under the terms of the GNU Lesser General Public | ||
10 | * License as published by the Free Software Foundation; either | ||
11 | * version 2.1 of the License, or (at your option) any later version. | ||
12 | * | ||
13 | * FFmpeg is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
16 | * Lesser General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU Lesser General Public | ||
19 | * License along with FFmpeg; if not, write to the Free Software | ||
20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
21 | */ | ||
22 | |||
23 | #define NOT_MPEG12 0 | ||
24 | #define MAY_BE_MPEG12 1 | ||
25 | #define DEFINITELY_MPEG12 2 | ||
26 | |||
27 | /* put block[] to dest[] */ | ||
28 | 5005436 | static inline void put_dct(MpegEncContext *s, | |
29 | int16_t *block, int i, uint8_t *dest, int line_size, int qscale) | ||
30 | { | ||
31 | 5005436 | s->dct_unquantize_intra(s, block, i, qscale); | |
32 | 5005436 | s->idsp.idct_put(dest, line_size, block); | |
33 | 5005436 | } | |
34 | |||
35 | 23535786 | static inline void add_dequant_dct(MpegEncContext *s, | |
36 | int16_t *block, int i, uint8_t *dest, int line_size, int qscale) | ||
37 | { | ||
38 |
2/2✓ Branch 0 taken 9247658 times.
✓ Branch 1 taken 14288128 times.
|
23535786 | if (s->block_last_index[i] >= 0) { |
39 | 9247658 | s->dct_unquantize_inter(s, block, i, qscale); | |
40 | |||
41 | 9247658 | s->idsp.idct_add(dest, line_size, block); | |
42 | } | ||
43 | 23535786 | } | |
44 | |||
45 | /* generic function called after a macroblock has been parsed by the | ||
46 | decoder or after it has been encoded by the encoder. | ||
47 | |||
48 | Important variables used: | ||
49 | s->mb_intra : true if intra macroblock | ||
50 | s->mv_dir : motion vector direction | ||
51 | s->mv_type : motion vector type | ||
52 | s->mv : motion vector | ||
53 | s->interlaced_dct : true if interlaced dct used (mpeg2) | ||
54 | */ | ||
55 | static av_always_inline | ||
56 | 9948932 | void mpv_reconstruct_mb_internal(MpegEncContext *s, int16_t block[12][64], | |
57 | int lowres_flag, int is_mpeg12) | ||
58 | { | ||
59 | #define IS_MPEG12(s) (is_mpeg12 == MAY_BE_MPEG12 ? ((s)->out_format == FMT_MPEG1) : is_mpeg12) | ||
60 | 9948932 | const int mb_xy = s->mb_y * s->mb_stride + s->mb_x; | |
61 | |||
62 | 9948932 | s->current_picture.qscale_table[mb_xy] = s->qscale; | |
63 | |||
64 | /* update DC predictors for P macroblocks */ | ||
65 |
2/2✓ Branch 0 taken 7939648 times.
✓ Branch 1 taken 2009284 times.
|
9948932 | if (!s->mb_intra) { |
66 |
6/6✓ Branch 0 taken 5698762 times.
✓ Branch 1 taken 2240886 times.
✓ Branch 2 taken 2371104 times.
✓ Branch 3 taken 3327658 times.
✓ Branch 4 taken 103314 times.
✓ Branch 5 taken 2267790 times.
|
7939648 | if (is_mpeg12 != DEFINITELY_MPEG12 && (s->h263_pred || s->h263_aic)) { |
67 |
2/2✓ Branch 0 taken 371935 times.
✓ Branch 1 taken 3059037 times.
|
3430972 | if (s->mbintra_table[mb_xy]) |
68 | 371935 | ff_clean_intra_table_entries(s); | |
69 | } else { | ||
70 | 4508676 | s->last_dc[0] = | |
71 | 4508676 | s->last_dc[1] = | |
72 | 4508676 | s->last_dc[2] = 128 << s->intra_dc_precision; | |
73 | } | ||
74 |
6/6✓ Branch 0 taken 1691431 times.
✓ Branch 1 taken 317853 times.
✓ Branch 2 taken 1253852 times.
✓ Branch 3 taken 437579 times.
✓ Branch 4 taken 28866 times.
✓ Branch 5 taken 1224986 times.
|
2009284 | } else if (is_mpeg12 != DEFINITELY_MPEG12 && (s->h263_pred || s->h263_aic)) |
75 | 466445 | s->mbintra_table[mb_xy] = 1; | |
76 | |||
77 | #if IS_ENCODER | ||
78 |
3/6✓ Branch 0 taken 4868423 times.
✗ Branch 1 not taken.
✓ Branch 2 taken 4868423 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 4868423 times.
✗ Branch 5 not taken.
|
4868423 | if ((s->avctx->flags & AV_CODEC_FLAG_PSNR) || s->frame_skip_threshold || s->frame_skip_factor || |
79 |
4/4✓ Branch 0 taken 3999661 times.
✓ Branch 1 taken 868762 times.
✓ Branch 2 taken 1236488 times.
✓ Branch 3 taken 2763173 times.
|
4868423 | !((s->intra_only || s->pict_type == AV_PICTURE_TYPE_B) && |
80 |
2/2✓ Branch 0 taken 1019792 times.
✓ Branch 1 taken 1085458 times.
|
2105250 | s->avctx->mb_decision != FF_MB_DECISION_RD)) // FIXME precalc |
81 | #endif /* IS_ENCODER */ | ||
82 | { | ||
83 | uint8_t *dest_y, *dest_cb, *dest_cr; | ||
84 | int dct_linesize, dct_offset; | ||
85 | 8863474 | const int linesize = s->current_picture.f->linesize[0]; //not s->linesize as this would be wrong for field pics | |
86 | 8863474 | const int uvlinesize = s->current_picture.f->linesize[1]; | |
87 |
4/4✓ Branch 0 taken 5037009 times.
✓ Branch 1 taken 43500 times.
✓ Branch 2 taken 3830933 times.
✓ Branch 3 taken 1206076 times.
|
8863474 | const int readable = IS_ENCODER || lowres_flag || s->pict_type != AV_PICTURE_TYPE_B; |
88 |
2/2✓ Branch 0 taken 43500 times.
✓ Branch 1 taken 8819974 times.
|
8863474 | const int block_size = lowres_flag ? 8 >> s->avctx->lowres : 8; |
89 | |||
90 | /* avoid copy if macroblock skipped in last frame too */ | ||
91 | /* skip only during decoding as we might trash the buffers during encoding a bit */ | ||
92 | if (!IS_ENCODER) { | ||
93 | 5080509 | uint8_t *mbskip_ptr = &s->mbskip_table[mb_xy]; | |
94 | |||
95 |
2/2✓ Branch 0 taken 386574 times.
✓ Branch 1 taken 4693935 times.
|
5080509 | if (s->mb_skipped) { |
96 | 386574 | s->mb_skipped = 0; | |
97 | av_assert2(s->pict_type!=AV_PICTURE_TYPE_I); | ||
98 | 386574 | *mbskip_ptr = 1; | |
99 |
2/2✓ Branch 0 taken 1119383 times.
✓ Branch 1 taken 3574552 times.
|
4693935 | } else if(!s->current_picture.reference) { |
100 | 1119383 | *mbskip_ptr = 1; | |
101 | } else{ | ||
102 | 3574552 | *mbskip_ptr = 0; /* not skipped */ | |
103 | } | ||
104 | } | ||
105 | |||
106 | 8863474 | dct_linesize = linesize << s->interlaced_dct; | |
107 |
2/2✓ Branch 0 taken 8669189 times.
✓ Branch 1 taken 194285 times.
|
8863474 | dct_offset = s->interlaced_dct ? linesize : linesize * block_size; |
108 | |||
109 |
2/2✓ Branch 0 taken 7657398 times.
✓ Branch 1 taken 1206076 times.
|
8863474 | if (readable) { |
110 | 7657398 | dest_y = s->dest[0]; | |
111 | 7657398 | dest_cb = s->dest[1]; | |
112 | 7657398 | dest_cr = s->dest[2]; | |
113 | } else { | ||
114 | 1206076 | dest_y = s->sc.b_scratchpad; | |
115 | 1206076 | dest_cb = s->sc.b_scratchpad + 16 * linesize; | |
116 | 1206076 | dest_cr = s->sc.b_scratchpad + 32 * linesize; | |
117 | } | ||
118 | |||
119 |
2/2✓ Branch 0 taken 7722952 times.
✓ Branch 1 taken 1140522 times.
|
8863474 | if (!s->mb_intra) { |
120 | /* motion handling */ | ||
121 | /* decoding or more than one mb_type (MC was already done otherwise) */ | ||
122 | |||
123 | #if !IS_ENCODER | ||
124 |
2/2✓ Branch 0 taken 2213799 times.
✓ Branch 1 taken 2240886 times.
|
4454685 | if (HAVE_THREADS && is_mpeg12 != DEFINITELY_MPEG12 && |
125 |
2/2✓ Branch 0 taken 60133 times.
✓ Branch 1 taken 2153666 times.
|
2213799 | s->avctx->active_thread_type & FF_THREAD_FRAME) { |
126 |
1/2✓ Branch 0 taken 60133 times.
✗ Branch 1 not taken.
|
60133 | if (s->mv_dir & MV_DIR_FORWARD) { |
127 | 60133 | ff_thread_await_progress(&s->last_picture_ptr->tf, | |
128 | lowest_referenced_row(s, 0), 0); | ||
129 | } | ||
130 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 60133 times.
|
60133 | if (s->mv_dir & MV_DIR_BACKWARD) { |
131 | ✗ | ff_thread_await_progress(&s->next_picture_ptr->tf, | |
132 | lowest_referenced_row(s, 1), 0); | ||
133 | } | ||
134 | } | ||
135 | |||
136 |
2/2✓ Branch 0 taken 41123 times.
✓ Branch 1 taken 4413562 times.
|
4454685 | if (lowres_flag) { |
137 | 41123 | const h264_chroma_mc_func *op_pix = s->h264chroma.put_h264_chroma_pixels_tab; | |
138 | |||
139 |
2/2✓ Branch 0 taken 37429 times.
✓ Branch 1 taken 3694 times.
|
41123 | if (s->mv_dir & MV_DIR_FORWARD) { |
140 | 37429 | MPV_motion_lowres(s, dest_y, dest_cb, dest_cr, 0, s->last_picture.f->data, op_pix); | |
141 | 37429 | op_pix = s->h264chroma.avg_h264_chroma_pixels_tab; | |
142 | } | ||
143 |
2/2✓ Branch 0 taken 18960 times.
✓ Branch 1 taken 22163 times.
|
41123 | if (s->mv_dir & MV_DIR_BACKWARD) { |
144 | 18960 | MPV_motion_lowres(s, dest_y, dest_cb, dest_cr, 1, s->next_picture.f->data, op_pix); | |
145 | } | ||
146 | } else { | ||
147 | op_pixels_func (*op_pix)[4]; | ||
148 | qpel_mc_func (*op_qpix)[16]; | ||
149 | |||
150 |
5/6✓ Branch 0 taken 2172676 times.
✓ Branch 1 taken 2240886 times.
✓ Branch 2 taken 793655 times.
✓ Branch 3 taken 1379021 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 793655 times.
|
4413562 | if ((is_mpeg12 == DEFINITELY_MPEG12 || !s->no_rounding) || s->pict_type == AV_PICTURE_TYPE_B) { |
151 | 3619907 | op_pix = s->hdsp.put_pixels_tab; | |
152 | 3619907 | op_qpix = s->qdsp.put_qpel_pixels_tab; | |
153 | } else { | ||
154 | 793655 | op_pix = s->hdsp.put_no_rnd_pixels_tab; | |
155 | 793655 | op_qpix = s->qdsp.put_no_rnd_qpel_pixels_tab; | |
156 | } | ||
157 |
2/2✓ Branch 0 taken 4108991 times.
✓ Branch 1 taken 304571 times.
|
4413562 | if (s->mv_dir & MV_DIR_FORWARD) { |
158 | 4108991 | ff_mpv_motion(s, dest_y, dest_cb, dest_cr, 0, s->last_picture.f->data, op_pix, op_qpix); | |
159 | 4108991 | op_pix = s->hdsp.avg_pixels_tab; | |
160 | 4108991 | op_qpix = s->qdsp.avg_qpel_pixels_tab; | |
161 | } | ||
162 |
2/2✓ Branch 0 taken 929763 times.
✓ Branch 1 taken 3483799 times.
|
4413562 | if (s->mv_dir & MV_DIR_BACKWARD) { |
163 | 929763 | ff_mpv_motion(s, dest_y, dest_cb, dest_cr, 1, s->next_picture.f->data, op_pix, op_qpix); | |
164 | } | ||
165 | } | ||
166 | |||
167 | /* skip dequant / idct if we are really late ;) */ | ||
168 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 4454685 times.
|
4454685 | if (s->avctx->skip_idct) { |
169 | ✗ | if( (s->avctx->skip_idct >= AVDISCARD_NONREF && s->pict_type == AV_PICTURE_TYPE_B) | |
170 | ✗ | ||(s->avctx->skip_idct >= AVDISCARD_NONKEY && s->pict_type != AV_PICTURE_TYPE_I) | |
171 | ✗ | || s->avctx->skip_idct >= AVDISCARD_ALL) | |
172 | ✗ | goto skip_idct; | |
173 | } | ||
174 | |||
175 | /* add dct residue */ | ||
176 |
7/8✓ Branch 0 taken 41123 times.
✓ Branch 1 taken 4413562 times.
✓ Branch 2 taken 41123 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 2172676 times.
✓ Branch 5 taken 2240886 times.
✓ Branch 6 taken 1845151 times.
✓ Branch 7 taken 368648 times.
|
4454685 | if (!(IS_MPEG12(s) || s->msmpeg4_version || |
177 |
4/4✓ Branch 0 taken 1368219 times.
✓ Branch 1 taken 476932 times.
✓ Branch 2 taken 61534 times.
✓ Branch 3 taken 1306685 times.
|
1845151 | (s->codec_id == AV_CODEC_ID_MPEG4 && !s->mpeg_quant))) |
178 | #endif /* !IS_ENCODER */ | ||
179 | { | ||
180 | 3806733 | add_dequant_dct(s, block[0], 0, dest_y , dct_linesize, s->qscale); | |
181 | 3806733 | add_dequant_dct(s, block[1], 1, dest_y + block_size, dct_linesize, s->qscale); | |
182 | 3806733 | add_dequant_dct(s, block[2], 2, dest_y + dct_offset , dct_linesize, s->qscale); | |
183 | 3806733 | add_dequant_dct(s, block[3], 3, dest_y + dct_offset + block_size, dct_linesize, s->qscale); | |
184 | |||
185 | 538466 | if (!CONFIG_GRAY || !(s->avctx->flags & AV_CODEC_FLAG_GRAY)) { | |
186 |
2/2✓ Branch 0 taken 3459039 times.
✓ Branch 1 taken 347694 times.
|
3806733 | if (s->chroma_y_shift) { |
187 | 3459039 | add_dequant_dct(s, block[4], 4, dest_cb, uvlinesize, s->chroma_qscale); | |
188 | 3459039 | add_dequant_dct(s, block[5], 5, dest_cr, uvlinesize, s->chroma_qscale); | |
189 | } else { | ||
190 | 347694 | dct_linesize >>= 1; | |
191 | 347694 | dct_offset >>= 1; | |
192 | 347694 | add_dequant_dct(s, block[4], 4, dest_cb, dct_linesize, s->chroma_qscale); | |
193 | 347694 | add_dequant_dct(s, block[5], 5, dest_cr, dct_linesize, s->chroma_qscale); | |
194 | 347694 | add_dequant_dct(s, block[6], 6, dest_cb + dct_offset, dct_linesize, s->chroma_qscale); | |
195 | 347694 | add_dequant_dct(s, block[7], 7, dest_cr + dct_offset, dct_linesize, s->chroma_qscale); | |
196 | } | ||
197 | } | ||
198 | } | ||
199 | #if !IS_ENCODER | ||
200 |
4/4✓ Branch 0 taken 1675333 times.
✓ Branch 1 taken 2240886 times.
✓ Branch 2 taken 1485184 times.
✓ Branch 3 taken 190149 times.
|
3916219 | else if (is_mpeg12 == DEFINITELY_MPEG12 || (s->codec_id != AV_CODEC_ID_WMV2)) { |
201 | 3726070 | add_dct(s, block[0], 0, dest_y , dct_linesize); | |
202 | 3726070 | add_dct(s, block[1], 1, dest_y + block_size, dct_linesize); | |
203 | 3726070 | add_dct(s, block[2], 2, dest_y + dct_offset , dct_linesize); | |
204 | 3726070 | add_dct(s, block[3], 3, dest_y + dct_offset + block_size, dct_linesize); | |
205 | |||
206 | 3726070 | if (!CONFIG_GRAY || !(s->avctx->flags & AV_CODEC_FLAG_GRAY)) { | |
207 |
2/2✓ Branch 0 taken 3659119 times.
✓ Branch 1 taken 66951 times.
|
3726070 | if (s->chroma_y_shift) {//Chroma420 |
208 | 3659119 | add_dct(s, block[4], 4, dest_cb, uvlinesize); | |
209 | 3659119 | add_dct(s, block[5], 5, dest_cr, uvlinesize); | |
210 | } else { | ||
211 | //chroma422 | ||
212 | 66951 | dct_linesize = uvlinesize << s->interlaced_dct; | |
213 |
2/2✓ Branch 0 taken 65730 times.
✓ Branch 1 taken 1221 times.
|
66951 | dct_offset = s->interlaced_dct ? uvlinesize : uvlinesize*block_size; |
214 | |||
215 | 66951 | add_dct(s, block[4], 4, dest_cb, dct_linesize); | |
216 | 66951 | add_dct(s, block[5], 5, dest_cr, dct_linesize); | |
217 | 66951 | add_dct(s, block[6], 6, dest_cb+dct_offset, dct_linesize); | |
218 | 66951 | add_dct(s, block[7], 7, dest_cr+dct_offset, dct_linesize); | |
219 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 66951 times.
|
66951 | if (!s->chroma_x_shift) {//Chroma444 |
220 | ✗ | add_dct(s, block[8], 8, dest_cb+block_size, dct_linesize); | |
221 | ✗ | add_dct(s, block[9], 9, dest_cr+block_size, dct_linesize); | |
222 | ✗ | add_dct(s, block[10], 10, dest_cb+block_size+dct_offset, dct_linesize); | |
223 | ✗ | add_dct(s, block[11], 11, dest_cr+block_size+dct_offset, dct_linesize); | |
224 | } | ||
225 | } | ||
226 | } //fi gray | ||
227 | } else if (CONFIG_WMV2_DECODER) { | ||
228 | 190149 | ff_wmv2_add_mb(s, block, dest_y, dest_cb, dest_cr); | |
229 | } | ||
230 | #endif /* !IS_ENCODER */ | ||
231 | } else { | ||
232 | #if !IS_ENCODER | ||
233 | /* Only MPEG-4 Simple Studio Profile is supported in > 8-bit mode. | ||
234 | TODO: Integrate 10-bit properly into mpegvideo.c so that ER works properly */ | ||
235 |
2/2✓ Branch 0 taken 307971 times.
✓ Branch 1 taken 317853 times.
|
625824 | if (is_mpeg12 != DEFINITELY_MPEG12 && CONFIG_MPEG4_DECODER && |
236 | /* s->codec_id == AV_CODEC_ID_MPEG4 && */ | ||
237 |
2/2✓ Branch 0 taken 1350 times.
✓ Branch 1 taken 306621 times.
|
307971 | s->avctx->bits_per_raw_sample > 8) { |
238 | 1350 | ff_mpeg4_decode_studio(s, dest_y, dest_cb, dest_cr, block_size, | |
239 | uvlinesize, dct_linesize, dct_offset); | ||
240 |
4/4✓ Branch 0 taken 2377 times.
✓ Branch 1 taken 622097 times.
✓ Branch 2 taken 306621 times.
✓ Branch 3 taken 317853 times.
|
624474 | } else if (!IS_MPEG12(s)) |
241 | #endif /* !IS_ENCODER */ | ||
242 | { | ||
243 | /* dct only in intra block */ | ||
244 | 821319 | put_dct(s, block[0], 0, dest_y , dct_linesize, s->qscale); | |
245 | 821319 | put_dct(s, block[1], 1, dest_y + block_size, dct_linesize, s->qscale); | |
246 | 821319 | put_dct(s, block[2], 2, dest_y + dct_offset , dct_linesize, s->qscale); | |
247 | 821319 | put_dct(s, block[3], 3, dest_y + dct_offset + block_size, dct_linesize, s->qscale); | |
248 | |||
249 | if (!CONFIG_GRAY || !(s->avctx->flags & AV_CODEC_FLAG_GRAY)) { | ||
250 |
2/2✓ Branch 0 taken 782558 times.
✓ Branch 1 taken 38761 times.
|
821319 | if (s->chroma_y_shift) { |
251 | 782558 | put_dct(s, block[4], 4, dest_cb, uvlinesize, s->chroma_qscale); | |
252 | 782558 | put_dct(s, block[5], 5, dest_cr, uvlinesize, s->chroma_qscale); | |
253 | } else { | ||
254 | 38761 | dct_offset >>=1; | |
255 | 38761 | dct_linesize >>=1; | |
256 | 38761 | put_dct(s, block[4], 4, dest_cb, dct_linesize, s->chroma_qscale); | |
257 | 38761 | put_dct(s, block[5], 5, dest_cr, dct_linesize, s->chroma_qscale); | |
258 | 38761 | put_dct(s, block[6], 6, dest_cb + dct_offset, dct_linesize, s->chroma_qscale); | |
259 | 38761 | put_dct(s, block[7], 7, dest_cr + dct_offset, dct_linesize, s->chroma_qscale); | |
260 | } | ||
261 | } | ||
262 | } | ||
263 | #if !IS_ENCODER | ||
264 | else { | ||
265 | 317853 | s->idsp.idct_put(dest_y, dct_linesize, block[0]); | |
266 | 317853 | s->idsp.idct_put(dest_y + block_size, dct_linesize, block[1]); | |
267 | 317853 | s->idsp.idct_put(dest_y + dct_offset, dct_linesize, block[2]); | |
268 | 317853 | s->idsp.idct_put(dest_y + dct_offset + block_size, dct_linesize, block[3]); | |
269 | |||
270 | if (!CONFIG_GRAY || !(s->avctx->flags & AV_CODEC_FLAG_GRAY)) { | ||
271 |
2/2✓ Branch 0 taken 263694 times.
✓ Branch 1 taken 54159 times.
|
317853 | if (s->chroma_y_shift) { |
272 | 263694 | s->idsp.idct_put(dest_cb, uvlinesize, block[4]); | |
273 | 263694 | s->idsp.idct_put(dest_cr, uvlinesize, block[5]); | |
274 | } else { | ||
275 | 54159 | dct_linesize = uvlinesize << s->interlaced_dct; | |
276 |
2/2✓ Branch 0 taken 54119 times.
✓ Branch 1 taken 40 times.
|
54159 | dct_offset = s->interlaced_dct ? uvlinesize : uvlinesize*block_size; |
277 | |||
278 | 54159 | s->idsp.idct_put(dest_cb, dct_linesize, block[4]); | |
279 | 54159 | s->idsp.idct_put(dest_cr, dct_linesize, block[5]); | |
280 | 54159 | s->idsp.idct_put(dest_cb + dct_offset, dct_linesize, block[6]); | |
281 | 54159 | s->idsp.idct_put(dest_cr + dct_offset, dct_linesize, block[7]); | |
282 |
1/2✓ Branch 0 taken 54159 times.
✗ Branch 1 not taken.
|
54159 | if (!s->chroma_x_shift) { //Chroma444 |
283 | ✗ | s->idsp.idct_put(dest_cb + block_size, dct_linesize, block[8]); | |
284 | ✗ | s->idsp.idct_put(dest_cr + block_size, dct_linesize, block[9]); | |
285 | ✗ | s->idsp.idct_put(dest_cb + block_size + dct_offset, dct_linesize, block[10]); | |
286 | ✗ | s->idsp.idct_put(dest_cr + block_size + dct_offset, dct_linesize, block[11]); | |
287 | } | ||
288 | } | ||
289 | } //gray | ||
290 | } | ||
291 | } | ||
292 | 54159 | skip_idct: | |
293 |
2/2✓ Branch 0 taken 1206076 times.
✓ Branch 1 taken 3874433 times.
|
5080509 | if (!readable) { |
294 | 1206076 | s->hdsp.put_pixels_tab[0][0](s->dest[0], dest_y, linesize, 16); | |
295 | if (!CONFIG_GRAY || !(s->avctx->flags & AV_CODEC_FLAG_GRAY)) { | ||
296 | 1206076 | s->hdsp.put_pixels_tab[s->chroma_x_shift][0](s->dest[1], dest_cb, uvlinesize, 16 >> s->chroma_y_shift); | |
297 | 1206076 | s->hdsp.put_pixels_tab[s->chroma_x_shift][0](s->dest[2], dest_cr, uvlinesize, 16 >> s->chroma_y_shift); | |
298 | } | ||
299 | #endif /* !IS_ENCODER */ | ||
300 | } | ||
301 | } | ||
302 | 9948932 | } | |
303 | |||
304 |