yading@10: /* yading@10: * Copyright (C) 2004 Michael Niedermayer yading@10: * yading@10: * This file is part of FFmpeg. yading@10: * yading@10: * FFmpeg is free software; you can redistribute it and/or yading@10: * modify it under the terms of the GNU Lesser General Public yading@10: * License as published by the Free Software Foundation; either yading@10: * version 2.1 of the License, or (at your option) any later version. yading@10: * yading@10: * FFmpeg is distributed in the hope that it will be useful, yading@10: * but WITHOUT ANY WARRANTY; without even the implied warranty of yading@10: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU yading@10: * Lesser General Public License for more details. yading@10: * yading@10: * You should have received a copy of the GNU Lesser General Public yading@10: * License along with FFmpeg; if not, write to the Free Software yading@10: * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA yading@10: */ yading@10: yading@10: #include "libavutil/intmath.h" yading@10: #include "libavutil/log.h" yading@10: #include "libavutil/opt.h" yading@10: #include "avcodec.h" yading@10: #include "dsputil.h" yading@10: #include "snow_dwt.h" yading@10: #include "internal.h" yading@10: #include "snow.h" yading@10: yading@10: #include "rangecoder.h" yading@10: #include "mathops.h" yading@10: yading@10: #include "mpegvideo.h" yading@10: #include "h263.h" yading@10: yading@10: #undef NDEBUG yading@10: #include yading@10: yading@10: static av_always_inline void predict_slice_buffered(SnowContext *s, slice_buffer * sb, IDWTELEM * old_buffer, int plane_index, int add, int mb_y){ yading@10: Plane *p= &s->plane[plane_index]; yading@10: const int mb_w= s->b_width << s->block_max_depth; yading@10: const int mb_h= s->b_height << s->block_max_depth; yading@10: int x, y, mb_x; yading@10: int block_size = MB_SIZE >> s->block_max_depth; yading@10: int block_w = plane_index ? block_size>>s->chroma_h_shift : block_size; yading@10: int block_h = plane_index ? block_size>>s->chroma_v_shift : block_size; yading@10: const uint8_t *obmc = plane_index ? ff_obmc_tab[s->block_max_depth+s->chroma_h_shift] : ff_obmc_tab[s->block_max_depth]; yading@10: int obmc_stride= plane_index ? (2*block_size)>>s->chroma_h_shift : 2*block_size; yading@10: int ref_stride= s->current_picture.linesize[plane_index]; yading@10: uint8_t *dst8= s->current_picture.data[plane_index]; yading@10: int w= p->width; yading@10: int h= p->height; yading@10: yading@10: if(s->keyframe || (s->avctx->debug&512)){ yading@10: if(mb_y==mb_h) yading@10: return; yading@10: yading@10: if(add){ yading@10: for(y=block_h*mb_y; yline[y]; yading@10: for(x=0; x>= FRAC_BITS; yading@10: if(v&(~255)) v= ~(v>>31); yading@10: dst8[x + y*ref_stride]= v; yading@10: } yading@10: } yading@10: }else{ yading@10: for(y=block_h*mb_y; yline[y]; yading@10: for(x=0; xwidth; yading@10: int y; yading@10: const int qlog= av_clip(s->qlog + b->qlog, 0, QROOT*16); yading@10: int qmul= ff_qexp[qlog&(QROOT-1)]<<(qlog>>QSHIFT); yading@10: int qadd= (s->qbias*qmul)>>QBIAS_SHIFT; yading@10: int new_index = 0; yading@10: yading@10: if(b->ibuf == s->spatial_idwt_buffer || s->qlog == LOSSLESS_QLOG){ yading@10: qadd= 0; yading@10: qmul= 1<stride_line + b->buf_y_offset) + b->buf_x_offset; yading@10: memset(line, 0, b->width*sizeof(IDWTELEM)); yading@10: v = b->x_coeff[new_index].coeff; yading@10: x = b->x_coeff[new_index++].x; yading@10: while(x < w){ yading@10: register int t= ( (v>>1)*qmul + qadd)>>QEXPSHIFT; yading@10: register int u= -(v&1); yading@10: line[x] = (t^u) - u; yading@10: yading@10: v = b->x_coeff[new_index].coeff; yading@10: x = b->x_coeff[new_index++].x; yading@10: } yading@10: } yading@10: yading@10: /* Save our variables for the next slice. */ yading@10: save_state[0] = new_index; yading@10: yading@10: return; yading@10: } yading@10: yading@10: static int decode_q_branch(SnowContext *s, int level, int x, int y){ yading@10: const int w= s->b_width << s->block_max_depth; yading@10: const int rem_depth= s->block_max_depth - level; yading@10: const int index= (x + y*w) << rem_depth; yading@10: int trx= (x+1)<block[index-1] : &null_block; yading@10: const BlockNode *top = y ? &s->block[index-w] : &null_block; yading@10: const BlockNode *tl = y && x ? &s->block[index-w-1] : left; yading@10: const BlockNode *tr = y && trxblock[index-w+(1<level + 2*top->level + tl->level + tr->level; yading@10: int res; yading@10: yading@10: if(s->keyframe){ yading@10: set_blocks(s, level, x, y, null_block.color[0], null_block.color[1], null_block.color[2], null_block.mx, null_block.my, null_block.ref, BLOCK_INTRA); yading@10: return 0; yading@10: } yading@10: yading@10: if(level==s->block_max_depth || get_rac(&s->c, &s->block_state[4 + s_context])){ yading@10: int type, mx, my; yading@10: int l = left->color[0]; yading@10: int cb= left->color[1]; yading@10: int cr= left->color[2]; yading@10: int ref = 0; yading@10: int ref_context= av_log2(2*left->ref) + av_log2(2*top->ref); yading@10: int mx_context= av_log2(2*FFABS(left->mx - top->mx)) + 0*av_log2(2*FFABS(tr->mx - top->mx)); yading@10: int my_context= av_log2(2*FFABS(left->my - top->my)) + 0*av_log2(2*FFABS(tr->my - top->my)); yading@10: yading@10: type= get_rac(&s->c, &s->block_state[1 + left->type + top->type]) ? BLOCK_INTRA : 0; yading@10: yading@10: if(type){ yading@10: pred_mv(s, &mx, &my, 0, left, top, tr); yading@10: l += get_symbol(&s->c, &s->block_state[32], 1); yading@10: cb+= get_symbol(&s->c, &s->block_state[64], 1); yading@10: cr+= get_symbol(&s->c, &s->block_state[96], 1); yading@10: }else{ yading@10: if(s->ref_frames > 1) yading@10: ref= get_symbol(&s->c, &s->block_state[128 + 1024 + 32*ref_context], 0); yading@10: if (ref >= s->ref_frames) { yading@10: av_log(s->avctx, AV_LOG_ERROR, "Invalid ref\n"); yading@10: return AVERROR_INVALIDDATA; yading@10: } yading@10: pred_mv(s, &mx, &my, ref, left, top, tr); yading@10: mx+= get_symbol(&s->c, &s->block_state[128 + 32*(mx_context + 16*!!ref)], 1); yading@10: my+= get_symbol(&s->c, &s->block_state[128 + 32*(my_context + 16*!!ref)], 1); yading@10: } yading@10: set_blocks(s, level, x, y, l, cb, cr, mx, my, ref, type); yading@10: }else{ yading@10: if ((res = decode_q_branch(s, level+1, 2*x+0, 2*y+0)) < 0 || yading@10: (res = decode_q_branch(s, level+1, 2*x+1, 2*y+0)) < 0 || yading@10: (res = decode_q_branch(s, level+1, 2*x+0, 2*y+1)) < 0 || yading@10: (res = decode_q_branch(s, level+1, 2*x+1, 2*y+1)) < 0) yading@10: return res; yading@10: } yading@10: return 0; yading@10: } yading@10: yading@10: static void dequantize_slice_buffered(SnowContext *s, slice_buffer * sb, SubBand *b, IDWTELEM *src, int stride, int start_y, int end_y){ yading@10: const int w= b->width; yading@10: const int qlog= av_clip(s->qlog + b->qlog, 0, QROOT*16); yading@10: const int qmul= ff_qexp[qlog&(QROOT-1)]<<(qlog>>QSHIFT); yading@10: const int qadd= (s->qbias*qmul)>>QBIAS_SHIFT; yading@10: int x,y; yading@10: yading@10: if(s->qlog == LOSSLESS_QLOG) return; yading@10: yading@10: for(y=start_y; ystride_line) + b->buf_y_offset) + b->buf_x_offset; yading@10: for(x=0; x>(QEXPSHIFT)); //FIXME try different bias yading@10: }else if(i>0){ yading@10: line[x]= (( i*qmul + qadd)>>(QEXPSHIFT)); yading@10: } yading@10: } yading@10: } yading@10: } yading@10: yading@10: static void correlate_slice_buffered(SnowContext *s, slice_buffer * sb, SubBand *b, IDWTELEM *src, int stride, int inverse, int use_median, int start_y, int end_y){ yading@10: const int w= b->width; yading@10: int x,y; yading@10: yading@10: IDWTELEM * line=0; // silence silly "could be used without having been initialized" warning yading@10: IDWTELEM * prev; yading@10: yading@10: if (start_y != 0) yading@10: line = slice_buffer_get_line(sb, ((start_y - 1) * b->stride_line) + b->buf_y_offset) + b->buf_x_offset; yading@10: yading@10: for(y=start_y; ystride_line) + b->buf_y_offset) + b->buf_x_offset; yading@10: for(x=0; xspatial_decomposition_count; level++){ yading@10: for(orientation=level ? 1:0; orientation<4; orientation++){ yading@10: int q; yading@10: if (plane_index==2) q= s->plane[1].band[level][orientation].qlog; yading@10: else if(orientation==2) q= s->plane[plane_index].band[level][1].qlog; yading@10: else q= get_symbol(&s->c, s->header_state, 1); yading@10: s->plane[plane_index].band[level][orientation].qlog= q; yading@10: } yading@10: } yading@10: } yading@10: } yading@10: yading@10: #define GET_S(dst, check) \ yading@10: tmp= get_symbol(&s->c, s->header_state, 0);\ yading@10: if(!(check)){\ yading@10: av_log(s->avctx, AV_LOG_ERROR, "Error " #dst " is %d\n", tmp);\ yading@10: return -1;\ yading@10: }\ yading@10: dst= tmp; yading@10: yading@10: static int decode_header(SnowContext *s){ yading@10: int plane_index, tmp; yading@10: uint8_t kstate[32]; yading@10: yading@10: memset(kstate, MID_STATE, sizeof(kstate)); yading@10: yading@10: s->keyframe= get_rac(&s->c, kstate); yading@10: if(s->keyframe || s->always_reset){ yading@10: ff_snow_reset_contexts(s); yading@10: s->spatial_decomposition_type= yading@10: s->qlog= yading@10: s->qbias= yading@10: s->mv_scale= yading@10: s->block_max_depth= 0; yading@10: } yading@10: if(s->keyframe){ yading@10: GET_S(s->version, tmp <= 0U) yading@10: s->always_reset= get_rac(&s->c, s->header_state); yading@10: s->temporal_decomposition_type= get_symbol(&s->c, s->header_state, 0); yading@10: s->temporal_decomposition_count= get_symbol(&s->c, s->header_state, 0); yading@10: GET_S(s->spatial_decomposition_count, 0 < tmp && tmp <= MAX_DECOMPOSITIONS) yading@10: s->colorspace_type= get_symbol(&s->c, s->header_state, 0); yading@10: s->chroma_h_shift= get_symbol(&s->c, s->header_state, 0); yading@10: s->chroma_v_shift= get_symbol(&s->c, s->header_state, 0); yading@10: yading@10: if(s->chroma_h_shift == 1 && s->chroma_v_shift==1){ yading@10: s->avctx->pix_fmt= AV_PIX_FMT_YUV420P; yading@10: }else if(s->chroma_h_shift == 0 && s->chroma_v_shift==0){ yading@10: s->avctx->pix_fmt= AV_PIX_FMT_YUV444P; yading@10: }else if(s->chroma_h_shift == 2 && s->chroma_v_shift==2){ yading@10: s->avctx->pix_fmt= AV_PIX_FMT_YUV410P; yading@10: } else { yading@10: av_log(s, AV_LOG_ERROR, "unsupported color subsample mode %d %d\n", s->chroma_h_shift, s->chroma_v_shift); yading@10: s->chroma_h_shift = s->chroma_v_shift = 1; yading@10: s->avctx->pix_fmt= AV_PIX_FMT_YUV420P; yading@10: return AVERROR_INVALIDDATA; yading@10: } yading@10: yading@10: s->spatial_scalability= get_rac(&s->c, s->header_state); yading@10: // s->rate_scalability= get_rac(&s->c, s->header_state); yading@10: GET_S(s->max_ref_frames, tmp < (unsigned)MAX_REF_FRAMES) yading@10: s->max_ref_frames++; yading@10: yading@10: decode_qlogs(s); yading@10: } yading@10: yading@10: if(!s->keyframe){ yading@10: if(get_rac(&s->c, s->header_state)){ yading@10: for(plane_index=0; plane_index<2; plane_index++){ yading@10: int htaps, i, sum=0; yading@10: Plane *p= &s->plane[plane_index]; yading@10: p->diag_mc= get_rac(&s->c, s->header_state); yading@10: htaps= get_symbol(&s->c, s->header_state, 0)*2 + 2; yading@10: if((unsigned)htaps > HTAPS_MAX || htaps==0) yading@10: return -1; yading@10: p->htaps= htaps; yading@10: for(i= htaps/2; i; i--){ yading@10: p->hcoeff[i]= get_symbol(&s->c, s->header_state, 0) * (1-2*(i&1)); yading@10: sum += p->hcoeff[i]; yading@10: } yading@10: p->hcoeff[0]= 32-sum; yading@10: } yading@10: s->plane[2].diag_mc= s->plane[1].diag_mc; yading@10: s->plane[2].htaps = s->plane[1].htaps; yading@10: memcpy(s->plane[2].hcoeff, s->plane[1].hcoeff, sizeof(s->plane[1].hcoeff)); yading@10: } yading@10: if(get_rac(&s->c, s->header_state)){ yading@10: GET_S(s->spatial_decomposition_count, 0 < tmp && tmp <= MAX_DECOMPOSITIONS) yading@10: decode_qlogs(s); yading@10: } yading@10: } yading@10: yading@10: s->spatial_decomposition_type+= get_symbol(&s->c, s->header_state, 1); yading@10: if(s->spatial_decomposition_type > 1U){ yading@10: av_log(s->avctx, AV_LOG_ERROR, "spatial_decomposition_type %d not supported\n", s->spatial_decomposition_type); yading@10: return -1; yading@10: } yading@10: if(FFMIN(s->avctx-> width>>s->chroma_h_shift, yading@10: s->avctx->height>>s->chroma_v_shift) >> (s->spatial_decomposition_count-1) <= 1){ yading@10: av_log(s->avctx, AV_LOG_ERROR, "spatial_decomposition_count %d too large for size\n", s->spatial_decomposition_count); yading@10: return -1; yading@10: } yading@10: yading@10: yading@10: s->qlog += get_symbol(&s->c, s->header_state, 1); yading@10: s->mv_scale += get_symbol(&s->c, s->header_state, 1); yading@10: s->qbias += get_symbol(&s->c, s->header_state, 1); yading@10: s->block_max_depth+= get_symbol(&s->c, s->header_state, 1); yading@10: if(s->block_max_depth > 1 || s->block_max_depth < 0){ yading@10: av_log(s->avctx, AV_LOG_ERROR, "block_max_depth= %d is too large\n", s->block_max_depth); yading@10: s->block_max_depth= 0; yading@10: return -1; yading@10: } yading@10: yading@10: return 0; yading@10: } yading@10: yading@10: static av_cold int decode_init(AVCodecContext *avctx) yading@10: { yading@10: int ret; yading@10: yading@10: if ((ret = ff_snow_common_init(avctx)) < 0) { yading@10: ff_snow_common_end(avctx->priv_data); yading@10: return ret; yading@10: } yading@10: yading@10: return 0; yading@10: } yading@10: yading@10: static int decode_blocks(SnowContext *s){ yading@10: int x, y; yading@10: int w= s->b_width; yading@10: int h= s->b_height; yading@10: int res; yading@10: yading@10: for(y=0; ydata; yading@10: int buf_size = avpkt->size; yading@10: SnowContext *s = avctx->priv_data; yading@10: RangeCoder * const c= &s->c; yading@10: int bytes_read; yading@10: AVFrame *picture = data; yading@10: int level, orientation, plane_index; yading@10: int res; yading@10: yading@10: ff_init_range_decoder(c, buf, buf_size); yading@10: ff_build_rac_states(c, 0.05*(1LL<<32), 256-8); yading@10: yading@10: s->current_picture.pict_type= AV_PICTURE_TYPE_I; //FIXME I vs. P yading@10: if(decode_header(s)<0) yading@10: return -1; yading@10: if ((res=ff_snow_common_init_after_header(avctx)) < 0) yading@10: return res; yading@10: yading@10: // realloc slice buffer for the case that spatial_decomposition_count changed yading@10: ff_slice_buffer_destroy(&s->sb); yading@10: if ((res = ff_slice_buffer_init(&s->sb, s->plane[0].height, yading@10: (MB_SIZE >> s->block_max_depth) + yading@10: s->spatial_decomposition_count * 11 + 1, yading@10: s->plane[0].width, yading@10: s->spatial_idwt_buffer)) < 0) yading@10: return res; yading@10: yading@10: for(plane_index=0; plane_index<3; plane_index++){ yading@10: Plane *p= &s->plane[plane_index]; yading@10: p->fast_mc= p->diag_mc && p->htaps==6 && p->hcoeff[0]==40 yading@10: && p->hcoeff[1]==-10 yading@10: && p->hcoeff[2]==2; yading@10: } yading@10: yading@10: ff_snow_alloc_blocks(s); yading@10: yading@10: if(ff_snow_frame_start(s) < 0) yading@10: return -1; yading@10: //keyframe flag duplication mess FIXME yading@10: if(avctx->debug&FF_DEBUG_PICT_INFO) yading@10: av_log(avctx, AV_LOG_ERROR, "keyframe:%d qlog:%d\n", s->keyframe, s->qlog); yading@10: yading@10: if ((res = decode_blocks(s)) < 0) yading@10: return res; yading@10: yading@10: for(plane_index=0; plane_index<3; plane_index++){ yading@10: Plane *p= &s->plane[plane_index]; yading@10: int w= p->width; yading@10: int h= p->height; yading@10: int x, y; yading@10: int decode_state[MAX_DECOMPOSITIONS][4][1]; /* Stored state info for unpack_coeffs. 1 variable per instance. */ yading@10: yading@10: if(s->avctx->debug&2048){ yading@10: memset(s->spatial_dwt_buffer, 0, sizeof(DWTELEM)*w*h); yading@10: predict_plane(s, s->spatial_idwt_buffer, plane_index, 1); yading@10: yading@10: for(y=0; ycurrent_picture.data[plane_index][y*s->current_picture.linesize[plane_index] + x]; yading@10: s->mconly_picture.data[plane_index][y*s->mconly_picture.linesize[plane_index] + x]= v; yading@10: } yading@10: } yading@10: } yading@10: yading@10: { yading@10: for(level=0; levelspatial_decomposition_count; level++){ yading@10: for(orientation=level ? 1 : 0; orientation<4; orientation++){ yading@10: SubBand *b= &p->band[level][orientation]; yading@10: unpack_coeffs(s, b, b->parent, orientation); yading@10: } yading@10: } yading@10: } yading@10: yading@10: { yading@10: const int mb_h= s->b_height << s->block_max_depth; yading@10: const int block_size = MB_SIZE >> s->block_max_depth; yading@10: const int block_h = plane_index ? block_size>>s->chroma_v_shift : block_size; yading@10: int mb_y; yading@10: DWTCompose cs[MAX_DECOMPOSITIONS]; yading@10: int yd=0, yq=0; yading@10: int y; yading@10: int end_y; yading@10: yading@10: ff_spatial_idwt_buffered_init(cs, &s->sb, w, h, 1, s->spatial_decomposition_type, s->spatial_decomposition_count); yading@10: for(mb_y=0; mb_y<=mb_h; mb_y++){ yading@10: yading@10: int slice_starty = block_h*mb_y; yading@10: int slice_h = block_h*(mb_y+1); yading@10: yading@10: if (!(s->keyframe || s->avctx->debug&512)){ yading@10: slice_starty = FFMAX(0, slice_starty - (block_h >> 1)); yading@10: slice_h -= (block_h >> 1); yading@10: } yading@10: yading@10: for(level=0; levelspatial_decomposition_count; level++){ yading@10: for(orientation=level ? 1 : 0; orientation<4; orientation++){ yading@10: SubBand *b= &p->band[level][orientation]; yading@10: int start_y; yading@10: int end_y; yading@10: int our_mb_start = mb_y; yading@10: int our_mb_end = (mb_y + 1); yading@10: const int extra= 3; yading@10: start_y = (mb_y ? ((block_h * our_mb_start) >> (s->spatial_decomposition_count - level)) + s->spatial_decomposition_count - level + extra: 0); yading@10: end_y = (((block_h * our_mb_end) >> (s->spatial_decomposition_count - level)) + s->spatial_decomposition_count - level + extra); yading@10: if (!(s->keyframe || s->avctx->debug&512)){ yading@10: start_y = FFMAX(0, start_y - (block_h >> (1+s->spatial_decomposition_count - level))); yading@10: end_y = FFMAX(0, end_y - (block_h >> (1+s->spatial_decomposition_count - level))); yading@10: } yading@10: start_y = FFMIN(b->height, start_y); yading@10: end_y = FFMIN(b->height, end_y); yading@10: yading@10: if (start_y != end_y){ yading@10: if (orientation == 0){ yading@10: SubBand * correlate_band = &p->band[0][0]; yading@10: int correlate_end_y = FFMIN(b->height, end_y + 1); yading@10: int correlate_start_y = FFMIN(b->height, (start_y ? start_y + 1 : 0)); yading@10: decode_subband_slice_buffered(s, correlate_band, &s->sb, correlate_start_y, correlate_end_y, decode_state[0][0]); yading@10: correlate_slice_buffered(s, &s->sb, correlate_band, correlate_band->ibuf, correlate_band->stride, 1, 0, correlate_start_y, correlate_end_y); yading@10: dequantize_slice_buffered(s, &s->sb, correlate_band, correlate_band->ibuf, correlate_band->stride, start_y, end_y); yading@10: } yading@10: else yading@10: decode_subband_slice_buffered(s, b, &s->sb, start_y, end_y, decode_state[level][orientation]); yading@10: } yading@10: } yading@10: } yading@10: yading@10: for(; yddwt, cs, &s->sb, s->temp_idwt_buffer, w, h, 1, s->spatial_decomposition_type, s->spatial_decomposition_count, yd); yading@10: } yading@10: yading@10: if(s->qlog == LOSSLESS_QLOG){ yading@10: for(; yqsb, yq); yading@10: for(x=0; xsb, s->spatial_idwt_buffer, plane_index, 1, mb_y); yading@10: yading@10: y = FFMIN(p->height, slice_starty); yading@10: end_y = FFMIN(p->height, slice_h); yading@10: while(y < end_y) yading@10: ff_slice_buffer_release(&s->sb, y++); yading@10: } yading@10: yading@10: ff_slice_buffer_flush(&s->sb); yading@10: } yading@10: yading@10: } yading@10: yading@10: emms_c(); yading@10: yading@10: ff_snow_release_buffer(avctx); yading@10: yading@10: if(!(s->avctx->debug&2048)) yading@10: av_frame_ref(picture, &s->current_picture); yading@10: else yading@10: av_frame_ref(picture, &s->mconly_picture); yading@10: yading@10: *got_frame = 1; yading@10: yading@10: bytes_read= c->bytestream - c->bytestream_start; yading@10: if(bytes_read ==0) av_log(s->avctx, AV_LOG_ERROR, "error at end of frame\n"); //FIXME yading@10: yading@10: return bytes_read; yading@10: } yading@10: yading@10: static av_cold int decode_end(AVCodecContext *avctx) yading@10: { yading@10: SnowContext *s = avctx->priv_data; yading@10: yading@10: ff_slice_buffer_destroy(&s->sb); yading@10: yading@10: ff_snow_common_end(s); yading@10: yading@10: return 0; yading@10: } yading@10: yading@10: AVCodec ff_snow_decoder = { yading@10: .name = "snow", yading@10: .type = AVMEDIA_TYPE_VIDEO, yading@10: .id = AV_CODEC_ID_SNOW, yading@10: .priv_data_size = sizeof(SnowContext), yading@10: .init = decode_init, yading@10: .close = decode_end, yading@10: .decode = decode_frame, yading@10: .capabilities = CODEC_CAP_DR1 /*| CODEC_CAP_DRAW_HORIZ_BAND*/, yading@10: .long_name = NULL_IF_CONFIG_SMALL("Snow"), yading@10: };